/* Article entrances */
.story-arrow {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid #ab7884;
  border-radius: 50%;
  color: var(--wine);
  font: 1.05rem/1 var(--sans);
  transition: color .2s, background-color .2s;
}
.story-arrow svg { width: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; }
a[data-reader]:hover .story-arrow { color: var(--white); background: var(--wine); }
/* A magazine spread on desktop, a reading sheet on mobile. */
html:has(.reader[open]) { overflow: hidden; }
.reader {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(1040px, calc(100% - 80px));
  height: min(900px, calc(100dvh - 84px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 100px #23101855;
  overflow: hidden;
}
.reader[open] { animation: reader-in .26s ease-out both; }
.reader::backdrop { background: #2718209c; backdrop-filter: blur(5px); }
.reader-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.reader-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px clamp(15px, 3vw, 34px);
  background: #f3ece2;
  border-bottom: 1px solid var(--line);
}
.reader-imprint { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); }
.reader-imprint > span:first-child { font: 1.6rem/1 var(--serif); letter-spacing: -.055em; }
.reader-imprint i { color: var(--wine); }
.reader-imprint .eyebrow { border-left: 1px solid var(--line); padding-left: clamp(12px, 2vw, 24px); color: var(--wine); }
.reader-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ad7884;
  border-radius: 50%;
  background: transparent;
  color: var(--wine);
  cursor: pointer;
}
.reader-close:hover { background: var(--wine); color: var(--white); }
.reader-close:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.reader-close svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.45; }
.reader-track { position: absolute; inset: auto 0 -1px; height: 2px; pointer-events: none; }
.reader-track span { display: block; height: 100%; background: var(--wine); transform: scaleX(0); transform-origin: left; }
.reader-scroll { overflow: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
.reader-status { padding: 30px; }
.reader-status a { text-decoration: underline; color: var(--wine); }
.reader-cover {
  display: grid;
  grid-template-columns: 1fr .95fr;
  min-height: 350px;
  background: #efe5d8;
  border-bottom: 1px solid var(--line);
}
.reader-heading { align-self: center; padding: clamp(24px, 4vw, 60px); }
.reader-heading h1 { font-size: clamp(2.6rem, 5.2vw, 5.1rem); letter-spacing: -.055em; margin: .18em 0 .24em; }
.reader-heading h1:focus { outline: none; }
.reader-heading .deck { font: 1.22rem/1.42 var(--serif); color: var(--muted); max-width: 40ch; }
.reader-cover img { height: 100%; min-height: 0; max-height: 430px; }
.reader-article .story-body { width: min(100% - 48px, 60ch); padding-block: 32px 54px; }
.reader-article .story-body h2 { line-height: 1.1; }
.reader-article .story-body section:first-child h2 { margin-top: 0; }
.reader-article .story-body section p { font: 1.2rem/1.63 var(--serif); }
.reader-article .story-body section:first-child p::first-letter {
  float: left;
  color: var(--wine);
  font: italic 3.2em/.88 var(--serif);
  margin-right: .09em;
}
.reader-article .related ul { list-style: none; padding: 0; }
.reader-article .related li { margin: 0; border-bottom: 1px solid var(--line); }
.reader-article .related a { display: block; padding-block: 10px; text-decoration: none; }
.reader-article .related a:hover { text-decoration: underline; }
 .reader-article .related a::after { content: ""; display: inline-block; width: .42em; height: .42em; margin-left: .7em; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg) translateY(-.1em); }

@keyframes reader-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 620px) {
  .reader { inset: auto 0 0; width: 100%; height: calc(100dvh - 18px); border-radius: 16px 16px 0 0; }
  .reader-cover { grid-template-columns: 1fr; min-height: 0; }
  .reader-heading { padding: 25px 22px 23px; }
  .reader-cover img { height: auto; aspect-ratio: 1.95; max-height: 250px; }
  .reader-article .story-body { width: calc(100% - 44px); padding-top: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .reader[open] { animation: none; }
}
