/* ==========================================================================
   Dr Hashbrowns: The Quarterly
   Design tokens. Every color is sampled from her coat or the cover photo.
   ========================================================================== */
:root {
  --ink: #1C1612;        /* her black patches. Primary text, rules, dark fields */
  --bib: #F7F3EC;        /* her white chest. Page paper */
  --wall: #B59468;       /* the wall behind the cover portrait. Cover and footer ground */
  --hashbrown: #C9802F;  /* her ginger patches. Contents field, accents on ink */
  --fawn: #E8D6BA;       /* her dilute fur. Secondary light field */
  --eye: #58632B;        /* her eyes. Verified marks, status dot */
  --muted: #6B5444;      /* supporting text on bib (6.4:1) */

  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --measure: 34em;
  --bar-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bib);
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.6;
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums; /* Fraunces defaults to old-style figures, which look like a different font */
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.support :focus-visible { outline-color: var(--bib); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -100px; z-index: 10;
  background: var(--ink); color: var(--bib); padding: 10px 14px;
  font: 500 15px/1 var(--sans); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ==========================================================================
   Top bar
   ========================================================================== */
.bar {
  display: flex; align-items: center; gap: 24px;
  height: var(--bar-h); padding: 0 var(--gutter);
  background: var(--wall);
  border-bottom: 1px solid var(--ink);
  font-family: var(--sans); font-size: 15px;
}
.bar__mark {
  font: 800 22px/1 var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  text-decoration: none; letter-spacing: -0.02em;
}
.bar__nav { display: flex; gap: 22px; margin-right: auto; }
.bar__nav a { text-decoration: none; font-weight: 500; }
.bar__nav a:hover { text-decoration: underline; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: auto; min-height: 36px; padding: 0 14px;
  font: 500 14px/1 var(--sans); color: var(--ink);
  background: transparent; border: 1px solid var(--ink); border-radius: 999px;
  cursor: pointer;
}
.status:hover { background: rgba(28, 22, 18, 0.08); }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); flex: none; }
.status.is-flicker .status__dot { background: var(--eye); }

@media (max-width: 760px) {
  .bar__nav a:not(:first-child) { display: none; }
  .bar { gap: 16px; }
}
@media (max-width: 380px) {
  .status { padding: 0 10px; font-size: 13px; }
}

/* ==========================================================================
   Cover
   ========================================================================== */
.cover {
  --photo-w: 100vw;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--wall);
  overflow: hidden;
}
.cover__masthead {
  grid-area: 1 / 1;
  position: relative; z-index: 2;
  align-self: start;
  padding: 14px var(--gutter) 0;
  pointer-events: none;
}
.masthead {
  display: flex; align-items: flex-start;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(50px, 14.1vw, 226px);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  line-height: 0.82;
  letter-spacing: -0.04em;
}
.masthead__dr {
  font-size: 0.36em; font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0.12em 0.14em 0 0;
}
.folio {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 0.6em;
  padding: 6px 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font: 500 13px/1.3 var(--sans);
}
.folio__tag { text-align: center; }

.cover__photo { grid-area: 1 / 1; position: relative; }
.cover__photo img { width: 100%; }

.roundel {
  position: absolute; right: 6%; top: 47%;
  display: grid; place-items: center;
  width: clamp(76px, 9vw, 112px); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--hashbrown); color: var(--ink);
  font: italic 600 clamp(14px, 1.4vw, 18px)/1.05 var(--display);
  text-align: center;
  transform: rotate(-10deg);
}

.cover__lines {
  grid-area: 2 / 1;
  display: grid; gap: 22px;
  padding: 28px var(--gutter) 32px;
  border-top: 1px solid var(--ink);
}
.line { display: grid; gap: 4px; }
.line__head {
  font-family: var(--display); font-weight: 700;
  font-size: 28px; line-height: 1.05; letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 100, "opsz" 72;
}
.line__dek { font: 400 16px/1.4 var(--sans); max-width: 30ch; }
.line--lead .line__head { font-size: clamp(44px, 6vw, 84px); font-weight: 800; line-height: 0.9; letter-spacing: -0.03em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
.line__link { display: grid; gap: inherit; color: inherit; text-decoration: none; }
.line__link:hover .line__head { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.08em; }
.line__link:focus-visible { outline-offset: 6px; }

.barcode { display: grid; gap: 4px; width: 168px; margin-top: 6px; }
.barcode svg { width: 132px; height: 40px; background: var(--bib); padding: 4px 6px; }
.barcode span { font: 500 11px/1.2 var(--sans); }

.cover__more { display: grid; gap: 22px; }
.lead-break { display: none; }
.cover__foot { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }

/* From 900px the photo takes a fixed share of the width and the cover lines
   fill the column beside it: the lead sits under the masthead, the rest at the foot. */
@media (min-width: 900px) {
  .cover {
    --photo-w: clamp(340px, min(44vw, calc((100svh - var(--bar-h)) * 0.72)), 1000px);
    grid-template-columns: minmax(0, 1fr) var(--photo-w);
    grid-template-rows: auto 1fr;
    /* Photo width is capped by window height so her ears clear the masthead and her paws stay in frame. */
    min-height: clamp(560px, calc(100svh - var(--bar-h)), 1120px);
  }
  .cover__masthead { grid-area: 1 / 1 / 2 / 3; }
  .masthead { font-size: clamp(50px, min(14.1vw, 25svh), 226px); }
  .cover__photo { grid-area: 1 / 2 / 3 / 3; }
  /* Absolutely placed so the photo fills its column without setting the cover's height. */
  .cover__photo img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; object-position: 50% 38%; }
  .cover__lines {
    grid-area: 2 / 1 / 3 / 2;
    grid-template-rows: auto 1fr auto auto;
    row-gap: 28px;
    border-top: 0;
    padding: 28px var(--gutter) 32px;
  }
  .line--lead { grid-row: 1; }
  .lead-break { display: inline; }
  .line--lead .line__head { font-size: clamp(72px, min(12.5vw, 19svh), 320px); line-height: 0.86; text-wrap: balance; }
  .cover__more { grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 20px; }
  .cover__more .line { padding-top: 12px; border-top: 1px solid var(--ink); align-content: start; }
  .cover__more .line__head { font-size: 24px; }
  .cover__foot { grid-row: 4; }
  .roundel { right: auto; left: -40px; top: 52%; }
}
@media (min-width: 1200px) {
  .cover__more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cover__more .line__head { font-size: clamp(24px, 1.9vw, 34px); }
  .cover__more .line__dek { font-size: 17px; }
}
@media (max-width: 899px) {
  .roundel { right: auto; left: 6%; top: 27%; }
}
@media (max-width: 699px) {
  .folio__tag { display: none; }
}

/* ==========================================================================
   Shared section furniture
   ========================================================================== */
section { position: relative; }
.pageno {
  position: absolute; top: 20px; right: var(--gutter);
  font: 500 13px/1 var(--sans);
  padding-top: 6px; border-top: 1.5px solid currentColor; min-width: 3ch; text-align: right;
}
.section-title {
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.92; letter-spacing: -0.035em;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}
.section-dek { margin-top: 14px; font: 400 17px/1.5 var(--sans); color: var(--muted); }

/* ==========================================================================
   Contents
   ========================================================================== */
.contents { background: var(--hashbrown); padding: clamp(48px, 8vw, 104px) var(--gutter); }
.contents__inner {
  display: grid; gap: 28px;
  max-width: 1280px; margin: 0 auto;
}
.contents__title {
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.86; letter-spacing: -0.045em;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}
.toc { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.toc li { border-bottom: 1px solid var(--ink); }
.toc a, .toc__soon {
  display: grid;
  grid-template-columns: 2.6ch minmax(0, 1fr);
  column-gap: 16px; row-gap: 2px;
  padding: 14px 0;
  text-decoration: none;
}
.toc__page {
  grid-row: 1 / 3;
  font-variant-numeric: lining-nums tabular-nums;
  font: 800 30px/1 var(--display);
  font-variation-settings: "SOFT" 100, "opsz" 144;
  letter-spacing: -0.03em;
}
.toc__name { font: 600 22px/1.15 var(--display); letter-spacing: -0.01em; }
.toc__dek { font: 400 15px/1.35 var(--sans); }
.toc a:hover .toc__name { text-decoration: underline; text-decoration-thickness: 2px; }
/* Forthcoming items use the same type; a dashed rule marks them instead. */
.toc li.toc__soon { border-bottom-style: dashed; }

@media (min-width: 900px) {
  .contents__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
  .toc a, .toc__soon { grid-template-columns: 3ch minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; }
  .toc__page { grid-row: auto; }
  .toc__dek { text-align: right; }
}

/* ==========================================================================
   Letter
   ========================================================================== */
.letter {
  display: grid; gap: 28px;
  padding: clamp(64px, 9vw, 128px) var(--gutter);
  max-width: calc(1280px + 2 * var(--gutter)); margin: 0 auto;
}
.letter__portrait figcaption,
.study figcaption,
.support__photo figcaption {
  margin-top: 10px; font: 400 14px/1.45 var(--sans); color: var(--muted); max-width: 46ch;
}
.letter__body { display: grid; gap: 1em; max-width: var(--measure); font-size: 20px; line-height: 1.62; }
.letter__sign { font-style: italic; font-size: 22px; margin-top: 0.4em; }

@media (min-width: 900px) {
  .letter { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); column-gap: 56px; row-gap: 40px; }
  .letter .section-title { grid-column: 1 / -1; max-width: 10ch; }
  .letter__portrait { grid-column: 1; }
  .letter__body { grid-column: 2; align-self: start; }
}

/* ==========================================================================
   Particulars
   ========================================================================== */
.particulars {
  padding: clamp(56px, 8vw, 112px) var(--gutter);
  max-width: calc(1280px + 2 * var(--gutter)); margin: 0 auto;
  border-top: 1.5px solid var(--ink);
}
.table-wrap { margin-top: 32px; overflow-x: auto; }
.facts { width: 100%; max-width: 920px; border-collapse: collapse; font-family: var(--sans); font-size: 16px; }
.facts thead th {
  text-align: left; font-weight: 500; font-size: 13px; color: var(--muted);
  padding: 0 12px 10px 0; border-bottom: 1.5px solid var(--ink);
}
.facts tbody th, .facts td { padding: 14px 12px 14px 0; border-bottom: 1px solid rgba(28, 22, 18, 0.25); vertical-align: baseline; text-align: left; }
.facts tbody th { font-weight: 500; width: 34%; }
.facts td:nth-child(2) { font-family: var(--display); font-size: 19px; }
.facts td:last-child { width: 1%; white-space: nowrap; }
.mark { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1.3; }
.mark--ok { color: var(--eye); border: 1px solid var(--eye); }
.mark--q { background: var(--hashbrown); color: var(--ink); border: 1px solid var(--hashbrown); }
.footnote { margin-top: 18px; font: 400 14px/1.5 var(--sans); color: var(--muted); max-width: 52ch; }

@media (max-width: 520px) {
  .facts { font-size: 15px; }
  .facts thead { display: none; }
  .facts tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 12px 0; border-bottom: 1px solid rgba(28, 22, 18, 0.25); }
  .facts tbody th, .facts td { border: 0; padding: 0; width: auto; }
  .facts tbody th { grid-column: 1; font-size: 13px; color: var(--muted); }
  .facts td:nth-child(2) { grid-column: 1; }
  .facts td:last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; }
}

.particulars__grid { display: grid; gap: 48px; }
.exhibit { display: grid; gap: 18px; align-content: start; max-width: 520px; }
.exhibit img { width: 100%; }
@media (min-width: 900px) {
  .particulars__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: 56px; align-items: start; }
  .exhibit { margin-top: 32px; }
}

/* ==========================================================================
   Studies: each photo is a plate with its note in the margin column.
   ========================================================================== */
.studies {
  background: var(--fawn);
  padding: clamp(64px, 9vw, 128px) var(--gutter);
  display: grid; gap: clamp(56px, 8vw, 112px);
}
.studies > :not(.pageno) { width: 100%; max-width: 1280px; margin-left: auto; margin-right: auto; }
.studies__head .section-dek { color: var(--ink); }

.plate { display: grid; gap: 18px; }
.plate img { width: 100%; }
.plate__note { display: grid; gap: 6px; align-content: end; }
.plate__no {
  font: 500 14px/1 var(--sans);
  padding-top: 10px; border-top: 1.5px solid var(--ink);
  font-variant-numeric: lining-nums;
}
.plate__title {
  font: 800 clamp(32px, 3.6vw, 52px)/0.95 var(--display);
  letter-spacing: -0.03em;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  margin-top: 6px;
}
.plate__text { font: 400 19px/1.5 var(--display); max-width: 28ch; margin-top: 6px; }

@media (min-width: 900px) {
  .plate { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: end; }
  .plate--stare picture { grid-column: 1 / 7; grid-row: 1; }
  .plate--stare .plate__note { grid-column: 8 / 12; grid-row: 1; }
  .plate--rest picture { grid-column: 4 / 13; grid-row: 1; }
  .plate--rest .plate__note { grid-column: 1 / 4; grid-row: 1; }
  .plate--box picture { grid-column: 1 / 9; grid-row: 1; }
  .plate--box .plate__note { grid-column: 9 / 13; grid-row: 1; }
}


/* ==========================================================================
   Support
   ========================================================================== */
.support { background: var(--ink); color: var(--bib); padding: clamp(64px, 9vw, 128px) var(--gutter); }
.support__inner { display: grid; gap: 32px; max-width: 1280px; margin: 0 auto; }
.support__title {
  color: var(--hashbrown);
  font-size: clamp(40px, 6.4vw, 96px);
  line-height: 0.92; letter-spacing: -0.035em;
  max-width: 13ch;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}
.support__photo figcaption { color: var(--fawn); }
.support__body { display: grid; gap: 1em; max-width: 30em; font-size: 20px; line-height: 1.6; align-self: center; }
.support__fine { font: 400 15px/1.5 var(--sans); color: var(--fawn); }
.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  font: 500 16px/1 var(--sans); text-decoration: none;
  border: 1.5px solid var(--bib); color: var(--bib); border-radius: 2px;
}
.button--primary { background: var(--hashbrown); border-color: var(--hashbrown); color: var(--ink); font-weight: 700; transition: background-color 150ms ease, border-color 150ms ease; }
.button--primary:hover { background: var(--fawn); border-color: var(--fawn); }
.support__cta { margin-top: 0.4em; }

@media (min-width: 900px) {
  .support__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 64px; row-gap: 48px; }
  .support__title { grid-column: 1 / -1; }
  .support__photo { grid-column: 1; }
  .support__body { grid-column: 2; }
}

/* ==========================================================================
   Colophon
   ========================================================================== */
.colophon {
  display: grid; gap: 20px;
  padding: 48px var(--gutter) 56px;
  background: var(--wall);
  border-top: 1px solid var(--ink);
  font: 400 14px/1.5 var(--sans);
}
.colophon__mark {
  font: 800 clamp(36px, 6vw, 64px)/0.9 var(--display);
  letter-spacing: -0.04em;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}
@media (min-width: 900px) {
  .colophon { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  .colophon__text { justify-self: end; text-align: right; }
}

/* ==========================================================================
   Profile page
   ========================================================================== */
.bar__nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

.opener {
  display: grid; gap: 32px;
  padding: clamp(56px, 8vw, 112px) var(--gutter) clamp(48px, 6vw, 88px);
  max-width: calc(1280px + 2 * var(--gutter)); margin: 0 auto;
}
.opener__text { display: grid; gap: 18px; align-content: start; }
.opener__kicker { font: 500 15px/1 var(--sans); padding-top: 10px; border-top: 1.5px solid var(--ink); }
.opener__title {
  font-size: clamp(48px, 7.4vw, 112px);
  line-height: 0.9; letter-spacing: -0.04em;
  text-wrap: balance;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}
.opener__dek { font-size: 21px; line-height: 1.5; max-width: 30ch; }
.opener__byline { font: 500 15px/1.3 var(--sans); }
.article__note {
  margin-top: 0.6em; padding-top: 14px;
  border-top: 1px solid var(--ink);
  font: italic 400 18px/1.5 var(--display);
}
.opener__photo figcaption { margin-top: 10px; font: 400 14px/1.45 var(--sans); color: var(--muted); }
@media (min-width: 900px) {
  .opener { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); column-gap: 56px; align-items: end; }
}

.article { padding: 0 var(--gutter) clamp(64px, 9vw, 128px); }
.article__body {
  max-width: var(--measure); margin: 0 auto;
  display: grid; gap: 1.1em;
  font-size: 20px; line-height: 1.65;
}
.article__lead { font-size: 24px; line-height: 1.5; }
.article__lead::first-letter {
  float: left;
  font-size: 4.2em; line-height: 0.82; font-weight: 800;
  margin: 0.06em 0.08em 0 0;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}
.pull {
  margin: 0.8em 0;
  padding: 18px 0;
  border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.pull p {
  font-size: clamp(30px, 4vw, 44px); line-height: 1.05; font-weight: 700; letter-spacing: -0.025em;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  text-wrap: balance;
}
@media (min-width: 1100px) {
  .pull { margin-left: -14rem; margin-right: -2rem; }
}

.routine { background: var(--hashbrown); padding: clamp(64px, 9vw, 120px) var(--gutter); }
.routine__inner { max-width: 1280px; margin: 0 auto; display: grid; gap: 28px; }
.routine__title {
  font-size: clamp(40px, 6vw, 88px); line-height: 0.92; letter-spacing: -0.035em;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  max-width: 10ch;
}
.routine__list { margin: 0; border-top: 1.5px solid var(--ink); }
.routine__list > div {
  display: grid; gap: 4px;
  padding: 16px 0; border-bottom: 1px solid var(--ink);
}
.routine__list dt { font: 400 16px/1.35 var(--sans); }
.routine__list dd { margin: 0; font: 700 26px/1.15 var(--display); letter-spacing: -0.015em; font-variation-settings: "SOFT" 100, "opsz" 72; }
.routine__note { font: 400 15px/1.5 var(--sans); }
@media (min-width: 900px) {
  .routine__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 48px; align-items: start; }
  .routine__list > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; }
  .routine__note { grid-column: 2; }
}

.field {
  background: var(--fawn);
  padding: clamp(64px, 9vw, 128px) var(--gutter);
  display: grid; gap: clamp(56px, 8vw, 112px);
}
.field > :not(.pageno) { width: 100%; max-width: 1280px; margin-left: auto; margin-right: auto; }
.field__head .section-dek { color: var(--ink); }
.field__pair { display: grid; gap: 18px; }
.field__frames { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.field__frames img { width: 100%; }
.field__pair--sleep .field__frames { grid-template-columns: minmax(0, 4fr) minmax(0, 3fr); align-items: end; }
@media (min-width: 900px) {
  .field__pair { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: end; }
  .field__pair .field__frames { grid-column: 1 / 8; grid-row: 1; }
  .field__pair .plate__note { grid-column: 9 / 13; grid-row: 1; }
  .field__pair--sleep .field__frames { grid-column: 4 / 13; }
  .field__pair--sleep .plate__note { grid-column: 1 / 4; }
  .plate--chair picture { grid-column: 1 / 9; grid-row: 1; }
  .plate--chair .plate__note { grid-column: 9 / 13; grid-row: 1; }
  .plate--door picture { grid-column: 5 / 13; grid-row: 1; }
  .plate--door .plate__note { grid-column: 1 / 5; grid-row: 1; }
  .plate--yuki picture { grid-column: 2 / 7; grid-row: 1; }
  .plate--yuki .plate__note { grid-column: 8 / 12; grid-row: 1; }
}


/* ==========================================================================
   Motion: one orchestrated entrance on the cover. Nothing else moves.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .masthead__name, .masthead__dr { display: inline-block; animation: rise 900ms cubic-bezier(.2, .7, .1, 1) both; }
  .masthead__dr { animation-delay: 120ms; }
  .folio { animation: fade 700ms ease-out 450ms both; }
  .cover__photo img { animation: settle 1400ms cubic-bezier(.2, .7, .1, 1) both; }
  .roundel { animation: stamp 500ms cubic-bezier(.3, 1.6, .5, 1) 1100ms both; }
  .cover__lines { animation: fade 800ms ease-out 650ms both; }
}
@keyframes rise { from { transform: translateY(22%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { transform: scale(1.04); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes stamp { from { transform: rotate(-10deg) scale(1.6); opacity: 0; } to { transform: rotate(-10deg) scale(1); opacity: 1; } }

/* Page turns between pages (cross-document view transitions).
   Forward (into the issue): the current page lifts from its left edge and turns away.
   Back (toward the cover): the previous page turns back down over the current one.
   Browsers without support simply load the next page as usual. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(root) { animation-duration: 760ms; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 760ms; animation-timing-function: cubic-bezier(.55, .06, .25, 1); animation-fill-mode: both; mix-blend-mode: normal; }
::view-transition-image-pair(root) { isolation: auto; perspective: 2200px; }

html:active-view-transition-type(forward)::view-transition-old(root) { z-index: 2; transform-origin: 0 50%; animation-name: page-out; }
html:active-view-transition-type(forward)::view-transition-new(root) { z-index: 1; animation-name: page-under; }
html:active-view-transition-type(back)::view-transition-new(root) { z-index: 2; transform-origin: 0 50%; animation-name: page-in; }
html:active-view-transition-type(back)::view-transition-old(root) { z-index: 1; animation-name: page-cover; }

@keyframes page-out {
  0%   { transform: rotateY(0); box-shadow: 0 0 0 rgba(28, 22, 18, 0); }
  60%  { box-shadow: 40px 0 80px rgba(28, 22, 18, .35); }
  100% { transform: rotateY(-92deg); box-shadow: 40px 0 80px rgba(28, 22, 18, 0); }
}
@keyframes page-under { from { filter: brightness(.82); } to { filter: none; } }
@keyframes page-in {
  0%   { transform: rotateY(-92deg); box-shadow: 40px 0 80px rgba(28, 22, 18, 0); }
  40%  { box-shadow: 40px 0 80px rgba(28, 22, 18, .35); }
  100% { transform: rotateY(0); box-shadow: 0 0 0 rgba(28, 22, 18, 0); }
}
@keyframes page-cover { from { filter: none; } to { filter: brightness(.82); } }

/* Photographs settle onto the page as they scroll into view, like plates laid down
   in a printed issue. Only applied when the script has marked the page, so photos
   are always visible without it. */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .reveal picture { display: block; overflow: hidden; clip-path: inset(6% 6% 6% 6%); opacity: 0; transition: clip-path 1100ms cubic-bezier(.2, .7, .1, 1), opacity 700ms ease-out; }
  .js-reveal .reveal picture img { transform: scale(1.08); transition: transform 1400ms cubic-bezier(.2, .7, .1, 1); }
  .js-reveal .reveal figcaption { opacity: 0; transform: translateY(14px); transition: opacity 700ms ease-out 350ms, transform 900ms cubic-bezier(.2, .7, .1, 1) 350ms; }
  .js-reveal .reveal picture + picture { transition-delay: 160ms; }
  .js-reveal .reveal picture + picture img { transition-delay: 160ms; }
  .js-reveal .reveal.is-in picture { clip-path: inset(0 0 0 0); opacity: 1; }
  .js-reveal .reveal.is-in picture img { transform: none; }
  .js-reveal .reveal.is-in figcaption { opacity: 1; transform: none; }
}


/* Tablets in the stacked cover layout: keep the photo from running taller than the screen. */
@media (min-width: 560px) and (max-width: 899px) {
  .cover__photo img { height: min(78svh, 980px); object-fit: cover; object-position: 50% 30%; }
}

/* Short desktop windows (most laptops): tighten the cover so it fits on one screen. */
@media (min-width: 900px) and (max-height: 920px) {
  .cover__lines { row-gap: 16px; padding-top: 18px; padding-bottom: 20px; }
  .cover__foot { display: none; }
  .cover__more .line { padding-top: 8px; }
  .cover__more .line__head { font-size: 22px; }
  .cover__more .line__dek { font-size: 15px; }
}

/* Wide, short windows (a maximized browser on most monitors): the cover lines sit
   beside the headline instead of under it, so the wide column has no dead space. */
@media (min-width: 1400px) and (min-aspect-ratio: 17/10) {
  .cover__lines { grid-template-columns: max-content minmax(340px, 1fr); grid-template-rows: auto 1fr auto; column-gap: 5vw; }
  /* Headline and cover lines sit on the bottom edge, level with her box. The headline
     grows with the window height so the column below the masthead is filled. */
  .line--lead { grid-column: 1; grid-row: 1 / 3; align-self: end; align-content: end; }
  .line--lead .line__head { font-size: clamp(72px, min(33svh, (100vw - var(--photo-w) - 2 * var(--gutter) - 340px - 5vw) / 2.8), 340px); }
  .cover__more { grid-column: 2; grid-row: 1 / 3; grid-template-columns: minmax(0, 1fr); max-width: 520px; align-self: end; }
  .cover__foot { grid-column: 1 / -1; grid-row: 3; }
  .cover__more .line__head { font-size: clamp(24px, 1.7vw, 32px); }
}
