/* ==========================================================================
   THE AI PATRIKA: the paper
   Layout concept: a broadsheet lying on a lamplit walnut desk. Pages are
   leaves you turn; each leaf is a sheet of aged newsprint laid out on a
   six-column grid (container queries, so the same sheet can be rendered at
   broadsheet width inside the opening animation even on a phone).
   ========================================================================== */

:root {
  /* paper & ink */
  --paper: #e8dfc8;            /* aged newsprint */
  --paper-age: #c9b58c;        /* yellowed edges */
  --paper-fox: rgba(150, 105, 50, 0.10);
  --ink: #1d1a15;              /* warm press black, never pure */
  --ink-body: #26221b;
  --ink-soft: #4a4337;
  --ink-faded: #6e6553;
  --rule: #2b261e;
  --rule-soft: rgba(43, 38, 30, 0.55);
  --stamp: #9e2f24;            /* newsagent's rubber stamp, used once */

  /* desk & chrome */
  --desk: #2a1d14;
  --desk-hi: #4a3424;
  --desk-ink: #e9dcc0;
  --desk-ink-soft: rgba(233, 220, 192, 0.62);
  --lamp: rgba(255, 214, 150, 0.22);
  --shadow: rgba(0, 0, 0, 0.55);

  /* type */
  --f-nameplate: "Old Standard TT", "Bodoni 72", "Didot", "Times New Roman", serif;
  --f-banner: "League Gothic", "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --f-head: "Old Standard TT", "Bodoni 72", "Didot", "Times New Roman", serif;
  --f-body: "Libre Caslon Text", "Iowan Old Style", "Palatino Linotype", "Georgia", serif;
  --f-fell: "Libre Caslon Text", "Iowan Old Style", "Georgia", serif;   /* italics: decks, captions */
  --f-sc: "Old Standard TT", "Georgia", serif;                         /* small caps, set with font-variant */
  --f-wire: "Old Standard TT", "Georgia", serif;

  /* scale (mobile first; widened by container queries) */
  --body-size: 1.0625rem;      /* 17px on a phone */
  --body-lh: 1.45;
  --g: 1.1rem;                 /* column gutter */
  --sheet-max: 1180px;
  --tb-h: 3rem;

  color-scheme: light;
}

/* Lamplight: the room is dark, the paper is still paper. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #c9bea4;
    --paper-age: #9c8a66;
    --paper-fox: rgba(110, 75, 35, 0.12);
    --ink: #17140f;
    --ink-body: #1f1b15;
    --ink-soft: #3d372d;
    --ink-faded: #5c5444;
    --rule: #221e17;
    --rule-soft: rgba(34, 30, 23, 0.6);
    --stamp: #8a2a20;
    --desk: #140d08;
    --desk-hi: #2a1c12;
    --desk-ink: #d9cbb0;
    --desk-ink-soft: rgba(217, 203, 176, 0.55);
    --lamp: rgba(255, 196, 120, 0.16);
    --shadow: rgba(0, 0, 0, 0.75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #c9bea4;
  --paper-age: #9c8a66;
  --paper-fox: rgba(110, 75, 35, 0.12);
  --ink: #17140f;
  --ink-body: #1f1b15;
  --ink-soft: #3d372d;
  --ink-faded: #5c5444;
  --rule: #221e17;
  --rule-soft: rgba(34, 30, 23, 0.6);
  --stamp: #8a2a20;
  --desk: #140d08;
  --desk-hi: #2a1c12;
  --desk-ink: #d9cbb0;
  --desk-ink-soft: rgba(217, 203, 176, 0.55);
  --lamp: rgba(255, 196, 120, 0.16);
  --shadow: rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

/* ---------- base ---------- */
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink-body);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
[hidden] { display: none !important; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }

/* ---------- the desk ---------- */
.desk {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 70% 55% at 50% 18%, var(--lamp), transparent 70%),
    repeating-linear-gradient(92deg, transparent 0 7px, rgba(0,0,0,.05) 7px 8px, transparent 8px 19px, rgba(255,255,255,.025) 19px 20px),
    repeating-linear-gradient(88deg, transparent 0 41px, rgba(0,0,0,.08) 41px 43px, transparent 43px 97px),
    linear-gradient(180deg, var(--desk-hi), var(--desk) 60%);
  background-color: var(--desk);
}

.toolbar {
  flex: none;
  height: var(--tb-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  color: var(--desk-ink);
  font-family: var(--f-sc); font-variant-caps: small-caps;
  font-size: .95rem;
  letter-spacing: .04em;
  z-index: 5;
}
.tb-right { display: flex; align-items: center; gap: .45rem; }
.tb-left { display: flex; align-items: center; gap: .45rem; }
a.tb-btn { text-decoration: none; display: inline-flex; align-items: center; }
.tb-folio { min-width: 7.5em; text-align: center; white-space: nowrap; }
.tb-btn {
  background: transparent;
  border: 1px solid var(--desk-ink-soft);
  border-radius: 2px;
  color: var(--desk-ink);
  padding: .3em .7em .25em;
  cursor: pointer;
  font-family: var(--f-sc); font-variant-caps: small-caps;
  letter-spacing: .05em;
  line-height: 1.1;
  white-space: nowrap;
}
.toolbar .tb-btn { min-height: 2.1rem; }
.tb-btn:hover { background: rgba(255,255,255,.07); }
.tb-btn:active { background: rgba(255,255,255,.13); }
.tb-btn:disabled { opacity: .32; cursor: default; background: transparent; }
.tb-btn svg {
  display: block; width: 1.25rem; height: 1.25rem;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
/* a control that is only a picture: home, sound, the page arrows */
.tb-icon, .tb-arrow {
  display: inline-grid; place-items: center;
  width: 2.3rem; height: 2.1rem; padding: 0;
}
#btn-sound .snd-off { display: none; }
#btn-sound[aria-pressed="false"] .snd-on { display: none; }
#btn-sound[aria-pressed="false"] .snd-off { display: inline; }
#btn-sound[aria-pressed="false"] { color: var(--desk-ink-soft); }

/* the foot of the desk: turn back, where you are, turn on */
.pager {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: .45rem max(16px, env(safe-area-inset-right, 0px)) calc(.45rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  color: var(--desk-ink);
  font-family: var(--f-sc); font-variant-caps: small-caps;
  font-size: .95rem;
  letter-spacing: .05em;
  box-shadow: 0 -1px 0 rgba(255,255,255,.06), 0 -10px 18px -10px rgba(0,0,0,.55);
  z-index: 5;
}
.pager .tb-arrow { width: 3.4rem; height: 2.4rem; }
.pager .tb-arrow svg { width: 1.4rem; height: 1.4rem; }
@media (max-width: 560px) {
  #btn-replay { display: none; }
  .toolbar { font-size: .88rem; }
  .pager { justify-content: space-between; font-size: .9rem; }
}

/* ---------- the stage & leaves ---------- */
.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  perspective: 2400px;
  perspective-origin: 50% 30%;
}
.loading {
  color: var(--desk-ink-soft);
  font-family: var(--f-fell);
  font-style: italic;
  text-align: center;
  margin-top: 30vh;
}
.leaf {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  transform-origin: calc(50% - min(50%, var(--sheet-max) / 2)) 50%;
  backface-visibility: hidden;
  will-change: auto;
  padding-bottom: 2.5rem;
}
.leaf[aria-hidden="true"] { visibility: hidden; }
.leaf.is-under { visibility: visible; }
.leaf-shade {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,0) 60%);
}

/* ---------- the sheet of newsprint ---------- */
.sheet {
  container: paper / inline-size;
  position: relative;
  max-width: var(--sheet-max);
  margin: 0 auto;
  padding-block: 1.1rem 2rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background-color: var(--paper);
  background-image:
    /* foxing: a few age spots */
    radial-gradient(circle at 12% 18%, var(--paper-fox) 0 .6rem, transparent 1.6rem),
    radial-gradient(circle at 83% 41%, var(--paper-fox) 0 .3rem, transparent 1.1rem),
    radial-gradient(circle at 64% 87%, var(--paper-fox) 0 .5rem, transparent 1.4rem),
    radial-gradient(circle at 28% 66%, var(--paper-fox) 0 .2rem, transparent .8rem),
    /* yellowed edges */
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 58%, var(--paper-age) 130%),
    /* pulp fibres */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .55' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .5 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"),
    /* grain */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .24 0 0 0 0 .16 0 0 0 .55 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 18px 40px -12px var(--shadow), 0 2px 6px rgba(0,0,0,.35);
  color: var(--ink-body);
  isolation: isolate;
}
/* the fold crease across the middle of every sheet, and the quarter fold */
.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent calc(50% - 14px), rgba(0,0,0,.045) calc(50% - 1px), rgba(255,255,255,.35) 50%, rgba(0,0,0,.06) calc(50% + 1px), transparent calc(50% + 16px)),
    linear-gradient(90deg, transparent calc(50% - 10px), rgba(0,0,0,.03) calc(50% - 1px), rgba(255,255,255,.18) 50%, transparent calc(50% + 10px));
  mix-blend-mode: multiply;
  z-index: 3;
}
@container paper (max-width: 699px) {
  .sheet::after { background: linear-gradient(180deg, transparent calc(50% - 14px), rgba(0,0,0,.045) calc(50% - 1px), rgba(255,255,255,.35) 50%, rgba(0,0,0,.06) calc(50% + 1px), transparent calc(50% + 16px)); }
}

@media (min-width: 700px) {
  .leaf { padding-top: 1.25rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .sheet { padding-block: 1.6rem 2.6rem; padding-inline: 2rem; }
}
@media (min-width: 1100px) {
  .sheet { padding-inline: 2.6rem; }
}

/* the ink itself: uneven inking on display type */
.inked {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.55 1.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.55 1.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  -webkit-mask-size: 180px 180px;
          mask-size: 180px 180px;
}
.bitten { filter: url(#ink); }
.bitten-heavy { filter: url(#ink-heavy); }
.clone .bitten, .clone .bitten-heavy { filter: none; }

/* ---------- masthead ---------- */
.masthead {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: .4rem;
  text-align: center;
  position: relative;
}
.nameplate {
  margin: 0;
  font-family: var(--f-nameplate);
  font-weight: 700;
  color: var(--ink);
  font-size: clamp(1.8rem, 10.6cqi, 7.2rem);
  line-height: .95;
  letter-spacing: -.012em;
  white-space: nowrap;
}
.nameplate .amp { font-size: .78em; vertical-align: .06em; padding-inline: .04em; }
.motto {
  margin: .15rem 0 0;
  font-family: var(--f-fell);
  font-style: italic;
  font-size: clamp(.95rem, 2.1cqi, 1.25rem);
  color: var(--ink-soft);
}
.motto::before, .motto::after { content: " ❦ "; font-style: normal; font-size: .8em; color: var(--ink-faded); }
.motto::after { content: " ❧ "; }
.ear {
  display: none;
  border: 3px double var(--rule);
  padding: .5rem .6rem .55rem;
  font-size: .82rem;
  line-height: 1.3;
  color: var(--ink-soft);
}
.ear h3 {
  margin: 0 0 .25rem;
  font-family: var(--f-sc); font-variant-caps: small-caps;
  font-weight: 400;
  font-size: .95rem;
  letter-spacing: .08em;
  color: var(--ink);
}
.ear p { margin: 0; font-family: var(--f-fell); font-style: italic; }
.stamp {
  position: absolute;
  right: .2rem;
  top: -.3rem;
  transform: rotate(-9deg);
  border: 2px solid var(--stamp);
  outline: 1px solid var(--stamp);
  outline-offset: 2px;
  color: var(--stamp);
  font-family: var(--f-sc); font-variant-caps: small-caps;
  font-size: .62rem;
  letter-spacing: .14em;
  line-height: 1.15;
  padding: .18rem .4rem .12rem;
  opacity: .8;
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' seed='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 2.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' seed='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 2.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
}
.emblem {
  display: block;
  width: clamp(2.2rem, 6cqi, 4.2rem);
  height: auto;
  margin: 0 auto -.2rem;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.25);
}

.folio-bar {
  margin-top: .55rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 -4px 0 -1px var(--paper), 0 -5px 0 0 var(--rule);
  padding: .28rem 0 .2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .1rem 1rem;
  font-family: var(--f-sc); font-variant-caps: small-caps;
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--ink);
}
.folio-bar span { white-space: nowrap; }
.folio-bar .sep { color: var(--ink-faded); }

@container paper (min-width: 700px) {
  .masthead { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1.2rem; }
  .ear { display: block; max-width: 15rem; }
  .ear.left { justify-self: start; text-align: left; }
  .ear.right { justify-self: end; text-align: right; }
  .stamp { right: 1.4rem; top: auto; bottom: -.55rem; font-size: .7rem; transform: rotate(-7deg); }
  .folio-bar { justify-content: space-between; font-size: .88rem; }
}
@container paper (max-width: 699px) {
  .folio-bar .sep, .folio-bar .opt { display: none; }
  .stamp { display: none; }
  .group.m-first { order: -1; }
}

/* inside-page head: the folio line and section heading */
.folio-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .25rem;
  font-family: var(--f-sc); font-variant-caps: small-caps;
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--ink);
}
.folio-line .mid { display: none; }
@container paper (min-width: 700px) { .folio-line .mid { display: inline; } }
.section-head {
  text-align: center;
  padding: .7rem 0 .55rem;
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 3px 0 -1px var(--paper), 0 4px 0 0 var(--rule);
  margin-bottom: .2rem;
}
.section-head h2 {
  margin: 0;
  font-family: var(--f-nameplate);
  font-weight: 700;
  font-size: clamp(1.9rem, 7.2cqi, 4rem);
  line-height: 1;
  color: var(--ink);
}
.section-head p {
  margin: .2rem 0 0;
  font-family: var(--f-fell);
  font-style: italic;
  color: var(--ink-soft);
  font-size: clamp(.95rem, 1.8cqi, 1.15rem);
}

/* ---------- banner ---------- */
.banner-wrap { margin: .55rem 0 .1rem; padding-bottom: .35rem; border-bottom: 1px solid var(--rule); }
.banner {
  margin: 0;
  text-align: center;
  font-family: var(--f-banner);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 12.5cqi, 9.4rem);
  line-height: .86;
  letter-spacing: .012em;
  color: var(--ink);
  text-wrap: balance;
}

/* ---------- the grid: rows of modules ---------- */
.row-wrap { padding-top: .7rem; }
.row-wrap + .row-wrap { border-top: 1px solid var(--rule); box-shadow: 0 -4px 0 -1px var(--paper), 0 -5px 0 0 var(--rule); margin-top: .8rem; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-inline: calc(var(--g) / -2);
  overflow: hidden; /* hides the outermost rules; unlike clip-path it lets pictures blend into the paper */
}
.group {
  min-width: 0;
  padding-inline: calc(var(--g) / 2);
  padding-top: .7rem;
  padding-bottom: .4rem;
  border-left: 1px solid var(--rule-soft);
  border-top: 1px solid var(--rule);
  margin-top: -1px;
  margin-left: -1px;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.group > .block + .block { border-top: 1px solid var(--rule-soft); padding-top: .9rem; }
.group > .block + .block.cutoff { border-top: 0; }
.group > .block + .block.cutoff::before {
  content: "";
  display: block;
  width: 34%;
  margin: -.35rem auto .75rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  height: 2px;
}

@container paper (min-width: 700px) {
  .page { --g: 1.3rem; }
  .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group.s3, .group.s4, .group.s5, .group.s6 { grid-column: span 2; }
}
@container paper (min-width: 980px) {
  .row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .group.s1 { grid-column: span 1; }
  .group.s2 { grid-column: span 2; }
  .group.s3 { grid-column: span 3; }
  .group.s4 { grid-column: span 4; }
  .group.s5 { grid-column: span 5; }
  .group.s6 { grid-column: span 6; }
}

/* ---------- stories ---------- */
.story { min-width: 0; }
.kicker {
  display: block;
  font-family: var(--f-sc); font-variant-caps: small-caps;
  font-size: .8rem;
  letter-spacing: .14em;
  color: var(--ink-faded);
  margin-bottom: .2rem;
}
.hed {
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
  hyphens: manual;
}
.deck {
  margin: .3rem 0 0;
  font-family: var(--f-fell);
  font-style: italic;
  color: var(--ink-soft);
  text-wrap: balance;
  line-height: 1.22;
}
.dash {
  border: 0;
  width: 28%;
  margin: .45rem auto;
  border-top: 1px solid var(--rule);
}
.byline {
  margin: .45rem 0 .35rem;
  font-family: var(--f-sc); font-variant-caps: small-caps;
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--ink-faded);
}
.body p {
  margin: 0;
  font-size: var(--body-size);
  line-height: var(--body-lh);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-indent: 1.15em;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-feature-settings: "liga", "kern";
  orphans: 2;
  widows: 2;
  text-shadow: 0 0 .4px rgba(30, 25, 18, .55);
}
.body p:first-child { text-indent: 0; }
.dateline { font-family: var(--f-sc); font-variant-caps: small-caps; letter-spacing: .04em; color: var(--ink); }
.drop::first-letter {
  -webkit-initial-letter: 3 2;
  initial-letter: 3 2;
  font-family: var(--f-head);
  font-weight: 700;
  color: var(--ink);
  margin-right: .12em;
}
@supports not ((initial-letter: 3) or (-webkit-initial-letter: 3)) {
  .drop::first-letter { float: left; font-size: 3.5em; line-height: .78; padding: .06em .08em 0 0; }
}

/* lead: big Scotch headline, decks, moving photograph, columns of text */
.v-lead .hed { font-family: var(--f-head); font-weight: 700; font-size: clamp(1.75rem, 4.4cqi, 3.1rem); line-height: 1.04; letter-spacing: -.005em; }
.v-lead .deck { font-size: clamp(1.1rem, 2cqi, 1.45rem); }
/* feature: medium Scotch */
.v-feature .hed { font-family: var(--f-head); font-weight: 700; font-size: clamp(1.45rem, 2.9cqi, 2.15rem); line-height: 1.06; }
.v-feature .deck { font-size: 1.08rem; }
/* column: the period single-column story with stacked decks */
.v-column .story-head { text-align: center; }
.v-column .hed { font-family: var(--f-banner); font-weight: 400; text-transform: uppercase; font-size: clamp(1.7rem, 3.2cqi, 2.15rem); line-height: .95; letter-spacing: .02em; }
.v-column .deck { font-size: 1.02rem; }
.v-column .deck.caps { font-family: var(--f-head); font-style: normal; font-weight: 700; text-transform: uppercase; font-size: .88rem; letter-spacing: .05em; color: var(--ink); line-height: 1.25; }
.v-column .byline { text-align: center; }
/* brief: a paragraph with a run-in head */
.v-brief .hed { font-family: var(--f-head); font-weight: 700; font-size: 1.12rem; line-height: 1.15; }
.v-brief .body p { font-size: calc(var(--body-size) * .94); }

@container paper (min-width: 700px) {
  .page { --body-size: 1rem; --body-lh: 1.44; }
  .cols-2 .body, .cols-3 .body, .cols-4 .body { columns: 2; column-gap: var(--g); column-rule: 1px solid var(--rule-soft); }
}
@container paper (min-width: 980px) {
  .page { --body-size: .97rem; --body-lh: 1.43; }
  .cols-3 .body { columns: 3; }
  .cols-4 .body { columns: 4; }
  .v-lead.cols-3 .hed, .v-lead.cols-4 .hed { font-size: clamp(2.2rem, 3.9cqi, 3.2rem); }
}
.body > * { break-inside: avoid-column; }
.body p { break-inside: auto; }

/* the jump */
.jump {
  display: block;
  margin: .5rem 0 0 auto;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--f-fell);
  font-style: italic;
  font-size: .95rem;
  color: var(--ink);
  text-align: right;
}
.jump:hover { text-decoration: underline; text-underline-offset: 2px; }
.cont-head {
  margin: 0 0 .4rem;
  text-align: center;
}
.cont-head .hed { font-family: var(--f-head); font-weight: 700; font-size: 1.25rem; line-height: 1.12; }
.cont-head .from { display: block; margin-top: .15rem; font-family: var(--f-fell); font-style: italic; font-size: .92rem; color: var(--ink-soft); }
.flash { animation: flash 1.8s ease-out 1; }
@keyframes flash { 0%, 30% { background: rgba(158, 47, 36, .14); } 100% { background: transparent; } }

/* notes inside stories */
.note {
  margin-top: .65rem;
  padding: .5rem .65rem .55rem;
  border: 1px solid var(--rule-soft);
  break-inside: avoid;
  font-size: calc(var(--body-size) * .9);
  line-height: 1.4;
}
.note b {
  font-family: var(--f-sc); font-variant-caps: small-caps;
  font-weight: 400;
  letter-spacing: .08em;
  font-size: .82rem;
  color: var(--ink);
  margin-right: .3em;
}
.note.why { border-style: solid; border-width: 1px 0; padding-inline: 0; }
.note.eng { font-family: var(--f-body); background: rgba(43, 38, 30, .045); }
.note.try { font-family: ui-monospace, Menlo, monospace; font-size: .86rem; background: rgba(43, 38, 30, .045); word-break: break-word; }
.sources {
  margin: .5rem 0 0;
  font-family: var(--f-fell);
  font-style: italic;
  font-size: .82rem;
  line-height: 1.35;
  color: var(--ink-faded);
}
.sources a { color: var(--ink-soft); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.sources .label { font-family: var(--f-sc); font-variant-caps: small-caps; font-style: normal; letter-spacing: .06em; }
.film-link { white-space: nowrap; }

/* pull quote */
.pull {
  margin: .7rem 0;
  padding: .55rem 0 .5rem;
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  text-align: center;
  break-inside: avoid;
}
.pull q { quotes: "\201C" "\201D"; font-family: var(--f-fell); font-style: italic; font-size: 1.22rem; line-height: 1.25; color: var(--ink); }
.pull cite { display: block; margin-top: .3rem; font-family: var(--f-sc); font-variant-caps: small-caps; font-style: normal; font-size: .78rem; letter-spacing: .08em; color: var(--ink-faded); }

/* ---------- photographs ---------- */
.photo { margin: .55rem 0 .6rem; break-inside: avoid; }
.plate {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  background: #8c8169;
  border: 1px solid var(--rule);
  mix-blend-mode: multiply;
  isolation: isolate;
}
.photo.wide .plate { aspect-ratio: 16 / 10; }
.photo.tall .plate { aspect-ratio: 4 / 5; }
.plate video, .plate img.still {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  filter: grayscale(1) sepia(.28) contrast(1.32) brightness(.98);
}
.moving video { animation: weave 3.2s steps(8) infinite; }
@keyframes weave {
  0% { transform: translate(0, 0); } 25% { transform: translate(.4px, -.3px); }
  50% { transform: translate(-.3px, .4px); } 75% { transform: translate(.3px, .2px); } 100% { transform: translate(0, 0); }
}
/* halftone screen */
.plate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  /* a soft vignette that stays put, over the halftone screen */
  background-image:
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 62%, rgba(25, 18, 8, .45) 100%),
    radial-gradient(circle at 50% 50%, rgba(20, 16, 10, .55) 0 .7px, transparent 1.25px);
  background-size: 100% 100%, 3px 3px;
  mix-blend-mode: multiply;
  opacity: .6;
}
/* film grain and flicker only: this layer jitters, so nothing dark may live on it */
.plate::after {
  content: "";
  position: absolute;
  inset: -50%;
  z-index: 3;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='1' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .08 0 0 0 0 .05 0 0 0 .9 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: .35;
}
.moving .plate::after { animation: grain .9s steps(6) infinite, flicker 2.6s linear infinite; }
@keyframes grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-6%, 4%); } 33% { transform: translate(5%, -7%); }
  50% { transform: translate(-3%, 6%); } 67% { transform: translate(7%, 2%); } 83% { transform: translate(-5%, -4%); } 100% { transform: translate(0, 0); }
}
@keyframes flicker { 0%, 100% { opacity: .35; } 8% { opacity: .42; } 9% { opacity: .3; } 48% { opacity: .38; } 50% { opacity: .44; } 51% { opacity: .34; } }
.plate .play {
  position: absolute; inset: 0; z-index: 4; border: 0; background: transparent; cursor: pointer;
}
.photo figcaption {
  margin-top: .3rem;
  font-family: var(--f-fell);
  font-size: .86rem;
  line-height: 1.3;
  color: var(--ink-soft);
  text-align: left;
}
.photo figcaption .cap-lead { font-family: var(--f-sc); font-variant-caps: small-caps; letter-spacing: .06em; color: var(--ink); }
.photo figcaption .credit { display: block; text-align: right; font-family: var(--f-sc); font-variant-caps: small-caps; font-size: .7rem; letter-spacing: .08em; color: var(--ink-faded); margin-top: .1rem; }
.engraving .plate { background: transparent; border: 0; aspect-ratio: auto; mix-blend-mode: multiply; }
.engraving .plate::before, .engraving .plate::after { display: none; }
.engraving img.still { position: static; inset: auto; width: 100%; height: auto; filter: grayscale(1) contrast(1.3) sepia(.15); mix-blend-mode: multiply; }

/* ---------- boxes & departments ---------- */
.box {
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: 3px;
  margin: 4px;
  padding: .6rem .7rem .65rem;
}
.box-title {
  margin: 0 0 .4rem;
  text-align: center;
  font-family: var(--f-banner);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
}
.box-title small { display: block; font-family: var(--f-fell); font-style: italic; text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--ink-soft); margin-top: .15rem; }
.dept-title {
  margin: 0 0 .45rem;
  text-align: center;
  font-family: var(--f-banner);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.75rem;
  letter-spacing: .03em;
  line-height: .95;
  color: var(--ink);
  padding-bottom: .3rem;
  border-bottom: 3px double var(--rule);
}
.dept-title small { display: block; font-family: var(--f-fell); font-style: italic; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--ink-soft); margin-top: .2rem; }

/* index */
.index-list { list-style: none; margin: 0; padding: 0; font-family: var(--f-body); font-size: .92rem; }
.index-list li + li { margin-top: .22rem; }
.index-list button {
  display: flex; width: 100%; align-items: baseline; gap: .3rem;
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--ink-body);
}
.index-list .name { flex: none; max-width: 75%; }
.index-list .lead { flex: 1 1 auto; border-bottom: 1px dotted var(--ink-faded); transform: translateY(-.25em); min-width: 1rem; }
.index-list .num { flex: none; font-family: var(--f-sc); font-variant-caps: small-caps; font-variant-numeric: lining-nums; }
.index-list button:hover .name { text-decoration: underline; }

/* weather */
.weather p { margin: 0; font-size: .9rem; line-height: 1.38; }
.weather p + p { margin-top: .3rem; }
.weather b { font-family: var(--f-sc); font-variant-caps: small-caps; font-weight: 400; letter-spacing: .06em; color: var(--ink); }

/* telegrams */
.telegrams ul { list-style: none; margin: 0; padding: 0; }
.telegrams li {
  font-family: var(--f-wire);
  font-size: .86rem;
  line-height: 1.42;
  color: var(--ink-body);
  padding: .45rem 0;
}
.telegrams li + li { border-top: 1px dashed var(--rule-soft); }
.telegrams .place { letter-spacing: .06em; color: var(--ink); }
.telegrams .stop { color: var(--ink-faded); letter-spacing: .06em; }
.telegrams a { text-decoration: none; border-bottom: 1px dotted var(--ink-faded); }

/* quote of the day */
.qotd { text-align: center; }
.qotd .mark { display: block; font-family: var(--f-head); font-size: 3.4rem; line-height: .6; color: var(--ink); margin-top: .5rem; }
.qotd blockquote { margin: .2rem 0 0; font-family: var(--f-fell); font-style: italic; font-size: 1.12rem; line-height: 1.3; color: var(--ink); }
.qotd cite { display: block; margin-top: .35rem; font-style: normal; font-family: var(--f-sc); font-variant-caps: small-caps; font-size: .78rem; letter-spacing: .08em; color: var(--ink-faded); }

/* numbers */
.numbers ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.numbers li { display: grid; grid-template-columns: auto 1fr; gap: .55rem; align-items: baseline; }
.numbers .fig { font-family: var(--f-banner); font-size: 1.9rem; line-height: .9; color: var(--ink); font-variant-numeric: lining-nums; }
.numbers .lab { font-size: .86rem; line-height: 1.3; }
.group.s1 .numbers li { grid-template-columns: 1fr; gap: .1rem; }
.group.s1 .numbers .fig { font-size: 1.75rem; }

/* ledger table */
.ledger .scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ledger table { width: 100%; border-collapse: collapse; font-size: .84rem; line-height: 1.3; font-variant-numeric: lining-nums tabular-nums; }
.ledger th {
  font-family: var(--f-sc); font-variant-caps: small-caps; font-weight: 400; letter-spacing: .06em; font-size: .76rem; color: var(--ink);
  text-align: left; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule); padding: .3rem .4rem .25rem 0;
}
.ledger td { padding: .32rem .4rem .3rem 0; border-bottom: 1px dotted var(--rule-soft); vertical-align: top; }
.ledger td.amt { white-space: nowrap; font-weight: 700; color: var(--ink); }
.ledger td.co { font-weight: 700; color: var(--ink); }
.ledger td.what { color: var(--ink-soft); font-style: italic; min-width: 12rem; }
.ledger tr:last-child td { border-bottom: 2px solid var(--rule); }
.ledger .tnote { margin: .4rem 0 0; font-family: var(--f-fell); font-style: italic; font-size: .8rem; color: var(--ink-faded); }
.ledger a { text-decoration: none; }
.ledger .where { font-weight: 400; font-style: italic; color: var(--ink-faded); }

/* notices: journals, workshop, classifieds */
.notices ul { list-style: none; margin: 0; padding: 0; }
.notices li { padding: .45rem 0; break-inside: avoid; }
.notices li + li { border-top: 1px solid var(--rule-soft); }
.notices .n-title { font-family: var(--f-head); font-weight: 700; font-size: .98rem; line-height: 1.2; color: var(--ink); }
.notices .n-meta { display: block; font-family: var(--f-fell); font-style: italic; font-size: .85rem; color: var(--ink-faded); margin-top: .1rem; }
.notices .n-body { margin: .2rem 0 0; font-size: .9rem; line-height: 1.38; text-align: justify; hyphens: auto; }
.notices a { text-decoration: none; border-bottom: 1px dotted var(--ink-faded); }
.notices.classified ul { columns: 1; column-gap: var(--g); column-rule: 1px solid var(--rule-soft); }
.notices.classified li { border: 0; padding: .35rem 0 .45rem; }
.notices.classified li + li::before { content: ""; display: block; width: 30%; margin: 0 auto .45rem; border-top: 1px solid var(--rule-soft); }
.notices.classified .n-title { font-family: var(--f-banner); font-weight: 400; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .03em; }
.notices.classified .n-body { font-size: .86rem; text-indent: 0; }
.notices.classified .n-price { font-family: var(--f-sc); font-variant-caps: small-caps; letter-spacing: .05em; font-size: .78rem; color: var(--ink); }
@container paper (min-width: 700px) { .notices.classified ul { columns: 2; } }
@container paper (min-width: 980px) { .notices.classified.wide ul { columns: 3; } }

/* editorial */
.editorial .kicker { text-align: center; }
.editorial .ed-title { margin: 0 0 .5rem; text-align: center; font-family: var(--f-head); font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 2.8cqi, 2rem); line-height: 1.1; color: var(--ink); text-wrap: balance; }
@container paper (min-width: 980px) {
  .group.s4 .editorial .body, .group.s5 .editorial .body, .group.s6 .editorial .body { columns: 2; column-gap: var(--g); column-rule: 1px solid var(--rule-soft); }
}
.editorial .signoff { margin: .5rem 0 0; text-align: right; font-family: var(--f-sc); font-variant-caps: small-caps; letter-spacing: .1em; font-size: .82rem; color: var(--ink); }

/* puzzle */
.puzzle ol { margin: 0; padding-left: 1.4rem; font-size: .92rem; line-height: 1.4; }
.puzzle li + li { margin-top: .2rem; }
.puzzle .intro { margin: 0 0 .4rem; font-style: italic; font-family: var(--f-fell); font-size: .92rem; }
.puzzle .answers { margin-top: .6rem; transform: rotate(180deg); font-size: .78rem; color: var(--ink-faded); text-align: center; font-family: var(--f-fell); }

/* house notice */
.notice-ad {
  text-align: center;
  border: 2px solid var(--rule);
  padding: .3rem;
}
.notice-ad .inner { border: 1px solid var(--rule); padding: .75rem .8rem .8rem; }
.notice-ad .orn { display: block; font-size: 1.1rem; letter-spacing: .5em; color: var(--ink-soft); }
.notice-ad h3 { margin: .25rem 0; font-family: var(--f-banner); font-weight: 400; font-size: 2rem; line-height: .95; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); }
.notice-ad p { margin: .3rem 0 0; font-size: .92rem; line-height: 1.38; }
.notice-ad .price { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.notice-ad .fine { font-family: var(--f-fell); font-style: italic; font-size: .82rem; color: var(--ink-faded); }

/* credits & colophon */
.credits ul { list-style: none; margin: 0; padding: 0; font-size: .78rem; line-height: 1.35; color: var(--ink-soft); }
.credits li + li { margin-top: .25rem; }
.credits a { color: var(--ink-soft); }
.colophon {
  margin-top: 1.2rem;
  padding-top: .45rem;
  border-top: 1px solid var(--rule);
  box-shadow: 0 -4px 0 -1px var(--paper), 0 -5px 0 0 var(--rule);
  text-align: center;
  font-family: var(--f-sc); font-variant-caps: small-caps;
  font-size: .76rem;
  letter-spacing: .06em;
  line-height: 1.5;
  color: var(--ink-soft);
}
.colophon p { margin: 0; }
.page-foot {
  margin-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--f-fell);
  font-style: italic;
  font-size: .9rem;
}
.page-foot button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--ink); }
.page-foot button:hover { text-decoration: underline; }
.page-foot .spacer { flex: 1; }

/* ---------- contents dialog ---------- */
.index-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(10, 6, 3, .55);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.index-card {
  width: min(26rem, 100%);
  background-color: var(--paper);
  color: var(--ink-body);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: -6px;
  padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: 0 20px 50px var(--shadow);
}
.index-card h2 { margin: 0 0 .8rem; text-align: center; font-family: var(--f-nameplate); font-weight: 700; font-size: 1.8rem; color: var(--ink); }
.index-card ol { list-style: none; margin: 0 0 1rem; padding: 0; }
.index-card li + li { border-top: 1px dotted var(--rule-soft); }
.index-card li button { width: 100%; display: flex; gap: .6rem; align-items: baseline; padding: .5rem 0; background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink-body); }
.index-card .pnum { font-family: var(--f-banner); font-size: 1.5rem; width: 1.4rem; color: var(--ink); }
.index-card .ptitle { font-family: var(--f-head); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.index-card .pstrap { display: block; font-family: var(--f-fell); font-style: italic; font-size: .88rem; color: var(--ink-faded); }
.index-archive { margin: 0 0 1rem; padding-top: .7rem; border-top: 2px solid var(--rule); }
.index-archive h3 { margin: 0 0 .3rem; text-align: center; font-family: var(--f-sc); font-variant-caps: small-caps; font-weight: 400; font-size: .9rem; letter-spacing: .12em; color: var(--ink-faded); }
.index-archive ul { list-style: none; margin: 0; padding: 0; max-height: 11rem; overflow-y: auto; }
.index-archive li a, .index-archive li .now { display: block; padding: .4rem 0; font-family: var(--f-fell); font-size: .98rem; color: var(--ink-body); text-decoration: none; }
.index-archive li a:hover { text-decoration: underline; }
.index-archive li .now { font-style: italic; color: var(--ink-faded); }
.index-card .tb-btn { color: var(--ink); border-color: var(--rule-soft); display: block; margin: 0 auto; }

/* ---------- the opening ritual ---------- */
.opening {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  background:
    radial-gradient(ellipse 65% 55% at 45% 40%, var(--lamp), transparent 72%),
    repeating-linear-gradient(92deg, transparent 0 7px, rgba(0,0,0,.05) 7px 8px, transparent 8px 19px, rgba(255,255,255,.025) 19px 20px),
    repeating-linear-gradient(88deg, transparent 0 41px, rgba(0,0,0,.08) 41px 43px, transparent 43px 97px),
    linear-gradient(180deg, var(--desk-hi), var(--desk) 70%);
  background-color: var(--desk);
}
.opening-scene { position: absolute; inset: 0; perspective: 1800px; perspective-origin: 50% 40%; }
.fold {
  position: absolute;
  left: 0; top: 0;
  transform-style: preserve-3d;
  cursor: pointer;
  outline: none;
}
.fold:focus-visible .fold-top { outline: 2px solid var(--stamp); outline-offset: 4px; }
.fold-top, .fold-bottom {
  position: absolute;
  left: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.fold-top { top: 0; box-shadow: inset 0 -10px 14px -10px rgba(0,0,0,.35); }
.fold-bottom { transform-origin: 50% 0; }
.fold-bottom-shade { position: absolute; inset: 0; z-index: 9; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.15)); opacity: 1; }
.fold .clone {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.fold .clone .sheet { box-shadow: none; }
.fold .clone .sheet::after { display: none; }
.fold-shadow {
  position: absolute;
  left: 0; top: 0;
  border-radius: 2px;
  background: rgba(0,0,0,.55);
  filter: blur(14px);
  transform-origin: 50% 0;
}
.opening-hint {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  margin: 0;
  text-align: center;
  font-family: var(--f-fell);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--desk-ink);
  letter-spacing: .02em;
  animation: hint 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes hint { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.opening-skip {
  position: absolute;
  top: calc(.8rem + env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
}

/* a cup of chai, seen from above */
.cup { position: absolute; width: 150px; height: 150px; pointer-events: none; }
.saucer {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #f6f0e4 0 30%, #e4dccb 52%, #cfc4ad 64%, #f1eadc 67%, #d8cdb6 76%, #b9ad94 100%);
  box-shadow: 6px 14px 26px rgba(0,0,0,.55);
}
.cup-body {
  position: absolute; left: 25px; top: 25px; width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, #ffffff 0 40%, #ece5d6 70%, #cbbfa6 100%);
  box-shadow: 3px 8px 14px rgba(0,0,0,.35), inset 0 0 0 2px rgba(0,0,0,.05);
}
.chai {
  position: absolute; left: 11px; top: 11px; width: 78px; height: 78px; border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, rgba(255, 236, 205, .55) 0 10%, transparent 34%),
    radial-gradient(circle at 50% 50%, #b5824f 0 45%, #9a6a3c 75%, #7b5130 100%);
  box-shadow: inset 0 4px 10px rgba(0,0,0,.35);
}
.cup-handle {
  position: absolute; left: 118px; top: 62px; width: 34px; height: 24px; border-radius: 12px;
  border: 7px solid #ece4d3; border-left: 0;
  box-shadow: 3px 5px 8px rgba(0,0,0,.3);
}
.steam { position: absolute; left: 45px; top: 15px; width: 60px; height: 80px; }
.steam i {
  position: absolute; bottom: 30px; width: 18px; height: 46px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.4), transparent 70%);
  filter: blur(6px);
  opacity: 0;
  animation: steam 4.2s ease-in-out infinite;
}
.steam i:nth-child(1) { left: 6px; animation-delay: 0s; }
.steam i:nth-child(2) { left: 22px; animation-delay: 1.4s; }
.steam i:nth-child(3) { left: 38px; animation-delay: 2.8s; }
@keyframes steam {
  0% { transform: translate(0, 10px) scale(.6); opacity: 0; }
  30% { opacity: .9; }
  100% { transform: translate(-14px, -60px) scale(1.4) rotate(-20deg); opacity: 0; }
}

/* ---------- static (all pages stacked) ---------- */
body.static { overflow: auto; }
body.static .desk { height: auto; }
body.static .stage { perspective: none; }
body.static .leaf { position: relative; inset: auto; overflow: visible; padding-bottom: 1.5rem; visibility: visible; }
body.static .toolbar, body.static .pager { display: none; }

/* ---------- iOS-style floating controls at the top ----------
   No bar: frosted round buttons float over the paper, and the page scrolls beneath them. */
.toolbar {
  position: absolute; top: 0; left: 0; right: 0;
  height: auto; padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
  background: none; pointer-events: none;
}
.toolbar > * { pointer-events: auto; }
.toolbar .tb-btn {
  --glass: rgba(255, 253, 248, .66); --glass-ink: #1d1a15;
  height: 44px; min-height: 0; padding: 0 17px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px;
  background: var(--glass); color: var(--glass-ink);
  -webkit-backdrop-filter: blur(18px) saturate(1.7); backdrop-filter: blur(18px) saturate(1.7);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 6px 18px -8px rgba(0, 0, 0, .45);
  font-family: "Fredoka", -apple-system, system-ui, sans-serif; font-variant-caps: normal; font-size: .95rem; font-weight: 500; letter-spacing: 0;
  transition: transform .4s cubic-bezier(.34, 1.4, .64, 1), background-color .2s;
}
.toolbar .tb-btn:hover { background: var(--glass); }
.toolbar .tb-btn:active { transform: scale(.9); transition-duration: .1s; background: var(--glass); }
.toolbar .tb-icon { width: 44px; padding: 0; }
.toolbar .tb-btn svg { width: 1.2rem; height: 1.2rem; stroke-width: 1.8; }
#btn-sound[aria-pressed="false"] { color: rgba(29, 26, 21, .45); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toolbar .tb-btn { --glass: rgba(34, 30, 25, .62); --glass-ink: #f3eee6; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .12), 0 6px 18px -8px rgba(0, 0, 0, .7); }
}
:root[data-theme="dark"] .toolbar .tb-btn { --glass: rgba(34, 30, 25, .62); --glass-ink: #f3eee6; }
/* room for the floating buttons above the masthead */
.sheet { padding-top: calc(env(safe-area-inset-top, 0px) + 4rem); }
body.static .sheet { padding-top: 1.1rem; }
@media (prefers-reduced-motion: reduce) { .toolbar .tb-btn { transition: none; } }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .moving video, .moving .plate::after, .steam i, .opening-hint { animation: none !important; }
}

/* ---------- the paper page-turn ---------- */
.curl-flap, .curl-cast { position: absolute; inset: 0; pointer-events: none; }
.curl-cast { z-index: 2; }
.curl-flap {
  z-index: 4;
  background-color: var(--paper);
  /* the back of the sheet: shading across the bend, over the same pulp grain as the front */
  background-image: var(--grad, none),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .24 0 0 0 0 .16 0 0 0 .55 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ---------- iOS-style floating pager at the foot ---------- */
.pager {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 12px) max(16px, env(safe-area-inset-left, 0px));
  background: none; box-shadow: none; pointer-events: none;
}
.pager > * { pointer-events: auto; }
.pager .tb-btn, .pager .tb-folio {
  --glass: rgba(255, 253, 248, .66); --glass-ink: #1d1a15;
  border: 0; border-radius: 999px;
  background: var(--glass); color: var(--glass-ink);
  -webkit-backdrop-filter: blur(18px) saturate(1.7); backdrop-filter: blur(18px) saturate(1.7);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 6px 18px -8px rgba(0, 0, 0, .45);
}
.pager .tb-arrow { width: 46px; height: 46px; padding: 0; display: inline-grid; place-items: center; transition: transform .4s cubic-bezier(.34, 1.4, .64, 1), opacity .2s; }
.pager .tb-arrow svg { width: 1.3rem; height: 1.3rem; stroke-width: 1.9; }
.pager .tb-arrow:hover { background: var(--glass); }
.pager .tb-arrow:active { transform: scale(.88); transition-duration: .1s; background: var(--glass); }
.pager .tb-arrow:disabled { opacity: 0; pointer-events: none; }
.pager .tb-folio {
  min-width: 0; padding: .5rem .95rem;
  font-family: "Fredoka", -apple-system, system-ui, sans-serif; font-variant-caps: normal; font-size: .88rem; font-weight: 500; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pager .tb-btn, :root:not([data-theme="light"]) .pager .tb-folio { --glass: rgba(34, 30, 25, .62); --glass-ink: #f3eee6; }
}
:root[data-theme="dark"] .pager .tb-btn, :root[data-theme="dark"] .pager .tb-folio { --glass: rgba(34, 30, 25, .62); --glass-ink: #f3eee6; }
.leaf { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 5.5rem); }

/* ---------- sources: one quiet line that opens ---------- */
.sources { margin: .7rem 0 0; font-family: var(--f-body); font-style: normal; font-size: .82rem; color: var(--ink-faded); }
.sources summary {
  display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; list-style: none;
  font-family: var(--f-sc); font-variant-caps: small-caps; letter-spacing: .06em; font-size: .9rem;
}
.sources summary::-webkit-details-marker { display: none; }
.sources summary::after { content: "›"; font-size: 1.1em; transition: transform .2s; }
.sources[open] summary::after { transform: rotate(90deg); }
.sources ol { margin: .35rem 0 0; padding-left: 1.2rem; display: grid; gap: .2rem; }
.sources a { color: var(--ink-soft); }
.notice-last { display: none; }

/* ==========================================================================
   On a phone: a broadsheet set for one column.
   Ragged right, calmer story heads, sidebars as ruled sections, not boxes.
   ========================================================================== */
@container paper (max-width: 699px) {
  .body p {
    text-align: left; hyphens: manual; -webkit-hyphens: manual;
    font-size: 1.125rem; line-height: 1.58;
  }
  .body p + p { margin-top: .15em; }

  /* one deck under the headline, then straight into the story */
  .story-head .deck ~ .deck { display: none; }
  .story-head .deck { margin-top: .35rem; }

  /* the reader has Contents; the subscription notice waits for the last page */
  .block.index { display: none; }
  .notice-ad { display: none; }
  .notice-ad.notice-last { display: block; margin-top: 1.4rem; }

  /* sidebars: a heavy rule above, a hairline below, no double box */
  .box {
    border: 0; outline: 0; margin: 1.4rem 0 0; padding: .9rem 0 1rem;
    border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule-soft);
  }
  .box-title { text-align: left; font-size: 1.6rem; margin-bottom: .6rem; }
  .box-title small { margin-top: .2rem; }

  /* By the Numbers: a two-up grid of big figures */
  .numbers ol { grid-template-columns: 1fr 1fr; gap: 1.1rem .9rem; }
  .numbers li, .group.s1 .numbers li { grid-template-columns: 1fr; gap: .25rem; align-content: start; }
  .numbers .fig, .group.s1 .numbers .fig { font-size: 2.5rem; line-height: .9; }
  .numbers .lab { font-size: .84rem; line-height: 1.32; color: var(--ink-soft); }

  /* Said this week: a hanging quote, no frame */
  .qotd { text-align: left; position: relative; padding-left: 2.1rem; }
  .qotd .box-title { margin-left: -2.1rem; }
  .qotd .mark { position: absolute; left: -.1rem; top: 2.6rem; font-size: 4.2rem; line-height: 1; margin: 0; }
  .qotd blockquote { font-size: 1.3rem; line-height: 1.32; }
  .qotd cite { margin-top: .6rem; }

  /* the forecast reads like a weather strip */
  .weather p { font-size: .95rem; line-height: 1.45; padding: .45rem 0; }
  .weather p + p { margin-top: 0; border-top: 1px dotted var(--rule-soft); }
}

@media (prefers-reduced-transparency: reduce) {
  .toolbar .tb-btn, .pager .tb-btn, .pager .tb-folio { --glass: #fffdf8; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-transparency: reduce) and (prefers-color-scheme: dark) {
  .toolbar .tb-btn, .pager .tb-btn, .pager .tb-folio { --glass: #221e19; }
}
@media (prefers-contrast: more) {
  .toolbar .tb-btn, .pager .tb-btn, .pager .tb-folio { box-shadow: 0 0 0 1.5px currentColor; }
}
