/* Daily History — design system.
 *
 * Editorial, asymmetric, mostly monochrome. The colour on the page comes from
 * the photographs; the chrome stays out of their way. Deliberately not the
 * centred-hero-on-a-radial-gradient layout — hierarchy here is carried by
 * scale, whitespace and rules rather than by boxing everything in a card.
 */

/* ---------------------------------------------------------------- tokens -- */
:root {
  /* Warm near-black rather than a saturated field: photographs from the 19th
     and 20th century sit badly on strong colour. */
  --ink:        #0c0a0b;
  --ink-2:      #141011;
  --ink-3:      #1d1718;
  --paper:      #f4efe7;
  --paper-dim:  #a89f97;
  --paper-faint:#6d6560;

  --accent:     #c9a24b;   /* used sparingly: labels, rules, small marks */
  --accent-lo:  #8a6f34;
  --imperial:   #7e1418;   /* a deep note, never a whole background */

  --line:       rgba(244, 239, 231, 0.13);
  --line-soft:  rgba(244, 239, 231, 0.07);

  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --maxw: 78rem;
  --measure: 36rem;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none;
}

/* A single fixed grain layer. Cheap, and it stops large flat areas from
   looking like untouched CSS. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.55;
}
main, header, footer { position: relative; z-index: 1; }
main { flex: 1; width: 100%; }

/* ------------------------------------------------------------- typography -- */
h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  letter-spacing: -0.015em;
  line-height: 1.04;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede { font-size: clamp(1.05rem, 1.6vw, 1.24rem); line-height: 1.6; color: var(--paper-dim); }

a { color: inherit; }

/* Underline that draws on hover instead of just appearing. */
.link-draw {
  position: relative; text-decoration: none; display: inline-block;
  padding-bottom: 2px;
}
.link-draw::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.link-draw:hover::after { transform: scaleX(1); transform-origin: left; }

/* ------------------------------------------------------------------ grid -- */
.shell { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.grid {
  display: grid;
  /* minmax(0, …), not a bare 1fr: a track's default minimum is min-content, so
     one long headline word ("Austria-Hungary's") widens its column, pushes the
     grid past the padded shell and shoves the whole page off the left edge. */
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2.25rem);
}

/* Same reasoning at the word level: long proper nouns and hyphenated names are
   common here, and on a 390px screen they must break rather than overflow. */
.lead-title, .story-title, .runner-title, .section-title { overflow-wrap: break-word; }

/* ---------------------------------------------------------------- header -- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem var(--gutter);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.masthead.is-stuck { border-bottom-color: var(--line); }
.mast-brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.mast-logo { width: 28px; height: 28px; border-radius: 7px; }
.mast-word {
  font-family: var(--sans); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--paper);
}
.mast-nav { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.6rem); }
.mast-link {
  font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 500; color: var(--paper-dim); text-decoration: none;
  transition: color 0.3s var(--ease);
}
.mast-link:hover { color: var(--paper); }
.btn-app {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em;
  padding: 0.55rem 1.05rem; border-radius: 100px; text-decoration: none;
  color: var(--ink); background: var(--paper);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
  white-space: nowrap;
}
.btn-app:hover { transform: translateY(-2px); background: #fff; }
@media (max-width: 560px) { .mast-link--archive { display: none; } }

/* ------------------------------------------------------- lead story hero -- */
.lead { padding-block: clamp(2.5rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem); }

.lead-date {
  grid-column: 1 / -1;
  display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap;
  padding-bottom: clamp(1.2rem, 3vw, 2.2rem);
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--line);
}
.lead-date .d-num {
  font-family: var(--serif); font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 0.85; font-weight: 600; letter-spacing: -0.03em;
}
.lead-date .d-rest { display: flex; flex-direction: column; gap: 0.25rem; }
.lead-date .d-month { font-family: var(--serif); font-size: clamp(1.1rem, 2.4vw, 1.6rem); line-height: 1; }
.lead-date .d-meta { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-faint); }

.lead-text { grid-column: 1 / -1; }
.lead-figure { grid-column: 1 / -1; margin-top: 1.8rem; }

@media (min-width: 900px) {
  /* The asymmetry: text holds seven columns on the left, the image takes five
     and drops below the headline's baseline so the two never line up flat. */
  .lead-text { grid-column: 1 / 7; }
  .lead-figure { grid-column: 8 / -1; margin-top: 3.2rem; }
}

.lead-cat {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1rem;
}
.lead-cat::before { content: ''; width: 22px; height: 1px; background: var(--accent); }

.lead-title {
  font-size: clamp(2.1rem, 5.4vw, 3.9rem);
  margin-bottom: 1.1rem;
}
.lead-title a { text-decoration: none; }

.lead-hook { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.62; color: var(--paper-dim); max-width: 42ch; }

.lead-meta {
  margin-top: 1.4rem; display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper-faint);
}
.lead-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--accent-lo); }

.lead-cta {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.9rem;
  font-size: 0.86rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--paper); text-decoration: none;
}
.lead-cta .arrow { transition: transform 0.4s var(--ease); }
.lead-cta:hover .arrow { transform: translateX(6px); }

/* Figures: no rounded-card look. A hairline and a generous caption. */
.fig { display: block; }
.fig img { display: block; width: 100%; height: auto; background: var(--ink-2); }

/* Much of this archive is portrait scans of engravings and posters. Left at
   full column width a tall one runs far past the text beside it and opens a
   dead gap. Capping the height scales it down whole — cropping to a fixed
   aspect would cut the subject out of a 19th-century print. */
.lead-figure img, .runner-fig img {
  max-height: 76vh;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}
.fig figcaption {
  margin-top: 0.7rem; font-size: 0.66rem; letter-spacing: 0.06em;
  color: var(--paper-faint); line-height: 1.5;
}
.fig a { color: var(--paper-dim); text-decoration: none; }
.fig a:hover { color: var(--accent); }

/* ------------------------------------------------------------ second run -- */
.runner { padding-block: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--line-soft); }
.runner-fig { grid-column: 1 / -1; }
.runner-text { grid-column: 1 / -1; margin-top: 1.4rem; }
@media (min-width: 900px) {
  /* Mirrored against the lead so the page alternates rather than repeats. */
  .runner-fig { grid-column: 1 / 6; }
  .runner-text { grid-column: 7 / -1; margin-top: 0; align-self: center; }
}
.runner-title { font-size: clamp(1.5rem, 3vw, 2.15rem); margin-bottom: 0.8rem; }
.runner-title a { text-decoration: none; }

/* --------------------------------------------------------------- section -- */
.section { padding-block: clamp(3rem, 8vw, 6.5rem); }
.section-head { grid-column: 1 / -1; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
@media (min-width: 900px) { .section-head { grid-column: 1 / 9; } }
.section-title { font-size: clamp(1.8rem, 4.2vw, 3rem); margin-top: 0.8rem; }
.section-intro { margin-top: 1rem; max-width: 46ch; }

/* What the app adds — a numbered editorial list, not three boxes. */
.offer { grid-column: 1 / -1; display: grid; gap: 0; }

/* Three children, so every cell is placed explicitly. Left implicit, the
   paragraph flows into row 2 of the narrow "auto" column, widens it, and the
   heading gets squeezed into one-word-per-line. */
.offer-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1rem; row-gap: 0.4rem;
  padding: 1.5rem 0; border-top: 1px solid var(--line-soft);
  align-items: start;
}
.offer-item:last-child { border-bottom: 1px solid var(--line-soft); }
.offer-num {
  grid-column: 1; grid-row: 1;
  font-family: var(--serif); font-size: 0.9rem; color: var(--accent);
  padding-top: 0.3rem; font-variant-numeric: tabular-nums;
}
.offer-h { grid-column: 2; grid-row: 1; font-size: 1.3rem; }
.offer-p {
  grid-column: 2; grid-row: 2;
  font-size: 0.92rem; line-height: 1.62; color: var(--paper-dim); max-width: 52ch;
}

/* Only wide enough for three real columns well past a large phone — at 780px
   the heading column was still breaking mid-phrase. */
@media (min-width: 940px) {
  .offer-item {
    grid-template-columns: auto 16rem minmax(0, 1fr);
    column-gap: 1.8rem; align-items: baseline;
  }
  .offer-h { grid-column: 2; grid-row: 1; }
  .offer-p { grid-column: 3; grid-row: 1; padding-top: 0.1rem; }
}

/* ------------------------------------------------------------ stat strip -- */
/* A grid, not flex: flex items shrink to the longest word in the label, which
   left the figure narrower than itself and broke "200+" across two lines. */
.stats {
  grid-column: 1 / -1; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 4vw, 4.5rem); padding-top: 0.5rem;
}
.stat b {
  display: block; font-family: var(--serif);
  font-size: clamp(1.7rem, 7vw, 3.2rem);
  font-weight: 600; line-height: 1; letter-spacing: -0.02em;
  white-space: nowrap;
}
/* Direct child only. A plain `.stat span` also matches the counter span inside
   <b>, which shrank the figure to label size and broke "200+" onto two lines. */
.stat > span {
  display: block; margin-top: 0.5rem; font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--paper-faint); line-height: 1.35;
}
@media (min-width: 760px) { .stat > span { font-size: 0.7rem; letter-spacing: 0.16em; } }

/* --------------------------------------------------------------- archive -- */
.strip { grid-column: 1 / -1; display: grid; gap: 0; }
.strip-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center;
  padding: 1.05rem 0; border-top: 1px solid var(--line-soft); text-decoration: none;
  transition: padding-inline 0.4s var(--ease);
}
.strip-row:last-child { border-bottom: 1px solid var(--line-soft); }
.strip-row:hover { padding-inline: 0.6rem; background: rgba(244,239,231,0.022); }
.strip-date { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); min-width: 6.5rem; font-variant-numeric: tabular-nums; }
.strip-title { font-family: var(--serif); font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.25; }
.strip-go { color: var(--paper-faint); transition: transform 0.4s var(--ease), color 0.4s var(--ease); }
.strip-row:hover .strip-go { transform: translateX(5px); color: var(--accent); }
@media (max-width: 620px) {
  .strip-row { grid-template-columns: 1fr auto; row-gap: 0.3rem; }
  .strip-date { grid-column: 1 / -1; }
}

/* ----------------------------------------------------------------- email -- */
.signup { grid-column: 1 / -1; }
@media (min-width: 900px) { .signup { grid-column: 1 / 8; } }
.email-form { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.6rem; max-width: 30rem; }
.email-form input {
  flex: 1; padding: 0.95rem 0; border: none; border-bottom: 1px solid var(--line);
  background: none; color: var(--paper); font-family: inherit; font-size: 1rem; outline: none;
  transition: border-color 0.3s var(--ease);
}
.email-form input::placeholder { color: var(--paper-faint); }
.email-form input:focus { border-bottom-color: var(--accent); }
.email-form button {
  padding: 0.85rem 1.5rem; border: none; border-radius: 100px; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 0.88rem;
  background: var(--paper); color: var(--ink);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.email-form button:hover { transform: translateY(-2px); background: #fff; }
.email-done { display: none; margin-top: 1.2rem; color: var(--accent); font-size: 0.95rem; }
.email-note { margin-top: 0.9rem; font-size: 0.68rem; color: var(--paper-faint); }
@media (min-width: 520px) { .email-form { flex-direction: row; align-items: center; } }

/* ---------------------------------------------------------------- footer -- */
footer {
  border-top: 1px solid var(--line-soft);
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) clamp(2rem, 4vw, 3rem);
  font-size: 0.74rem; color: var(--paper-faint);
}
.foot-in { max-width: var(--maxw); margin-inline: auto; display: grid; gap: 1.6rem; }
.foot-langs, .foot-links { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.foot-langs a, .foot-links a { color: var(--paper-dim); text-decoration: none; transition: color 0.3s var(--ease); }
.foot-langs a:hover, .foot-links a:hover, .foot-langs a.on { color: var(--accent); }
.foot-rule { height: 1px; background: var(--line-soft); }
@media (min-width: 760px) {
  .foot-in { grid-template-columns: 1fr auto; align-items: center; }
  .foot-rule, .foot-copy { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------ legal pages -- */
.legal { max-width: 42rem; margin-inline: auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); }
.legal h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin-bottom: 1.2rem; }
.legal h2 { font-size: 1.35rem; color: var(--accent); margin: 2rem 0 0.6rem; }
.legal p, .legal li { font-size: 0.95rem; line-height: 1.75; color: var(--paper-dim); margin-bottom: 0.7rem; }
.legal ul { padding-left: 1.2rem; }
.legal a { color: var(--accent); }
.back-home { display: inline-block; margin-top: 1.8rem; color: var(--accent); text-decoration: none; font-size: 0.86rem; }

/* ------------------------------------------------------------- animation -- */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes wipe { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

/* Above the fold: play immediately, staggered. Never applied to the hero
   image — animating the LCP element delays the metric it defines. */
.enter { opacity: 0; animation: rise 0.9s var(--ease) forwards; }
.enter-1 { animation-delay: 0.05s; }
.enter-2 { animation-delay: 0.14s; }
.enter-3 { animation-delay: 0.23s; }
.enter-4 { animation-delay: 0.32s; }

/* Below the fold: driven by scroll position where the browser supports it,
   which needs no JavaScript and cannot jank the main thread. */
@supports (animation-timeline: view()) {
  .rv {
    animation: rise 1s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 5% cover 26%;
  }
  .rv-wipe {
    animation: wipe 1.1s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 2% cover 30%;
  }
}
/* Fallback for browsers without scroll-driven animations: site.js adds .in. */
@supports not (animation-timeline: view()) {
  .rv, .rv-wipe { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .rv.in, .rv-wipe.in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
  .enter, .rv, .rv-wipe { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* Focus visibility survives the restyle. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ============================================================================
   MOTION
   ----------------------------------------------------------------------------
   Everything below is native CSS: view transitions, scroll-driven timelines and
   @property interpolation. No animation library, no requestAnimationFrame loop,
   nothing that can block the main thread or delay the largest paint. All of it
   is progressive — a browser without support gets the static page — and all of
   it is off under prefers-reduced-motion.
   ========================================================================== */

/* ---- Cross-document view transitions --------------------------------------
   Navigating landing -> story morphs the shared elements instead of repainting
   a new page. A view-transition-name must be unique within a document, so only
   one element may carry a given name at a time. */
@view-transition { navigation: auto; }

::view-transition-group(*) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}
::view-transition-old(root) { animation: vt-out 0.32s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 0.42s cubic-bezier(0, 0, 0.2, 1) 0.06s both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* The masthead is the same object on every page — holding it still while the
   rest moves is what makes navigation read as one continuous surface. */
.masthead { view-transition-name: masthead; }
::view-transition-group(masthead) { animation-duration: 0.01s; }
.app-bar { view-transition-name: appbar; }

/* The lead image and headline carry the same names on both pages, so the
   browser tweens them from one layout into the other. */
.vt-hero-img { view-transition-name: hero-image; }
.vt-hero-title { view-transition-name: hero-title; }
::view-transition-group(hero-image),
::view-transition-group(hero-title) { animation-duration: 0.62s; }
::view-transition-old(hero-title), ::view-transition-new(hero-title) { height: 100%; }

/* ---- Reading progress ------------------------------------------------------
   A hairline that fills with scroll position rather than with a scroll
   listener, so it costs nothing on the main thread. */
.progress {
  position: fixed; inset-inline: 0; top: 0; height: 2px; z-index: 60;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent-lo), var(--accent), var(--paper));
}
@supports (animation-timeline: scroll()) {
  .progress { animation: prog linear both; animation-timeline: scroll(root block); }
}
@keyframes prog { to { transform: scaleX(1); } }

/* ---- Headline, revealed a word at a time -----------------------------------
   The generator wraps each word so the delay can cascade. The words are still
   ordinary text in the DOM — selectable, and read normally by a crawler; this
   is only a mask over them. */
/* The padding/negative-margin pair gives the mask room for descenders — without
   it `overflow: hidden` shaves the tails off g, y and p. */
.w {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding-bottom: 0.14em; margin-bottom: -0.14em;
}
.w > i {
  display: inline-block; font-style: inherit;
  transform: translateY(102%); opacity: 0;
  animation: word 0.72s cubic-bezier(0.16, 0.84, 0.32, 1) both;
  animation-delay: calc(var(--i) * 42ms + 0.08s);
}
@keyframes word { to { transform: none; opacity: 1; } }

/* Headlines further down the page wait until they are actually in view. */
@supports (animation-timeline: view()) {
  .w-scroll > i {
    animation-timeline: view();
    animation-range: entry 8% cover 26%;
    animation-delay: 0s;
  }
}

/* ---- Hero image: a slow drift as the page scrolls ------------------------- */
@supports (animation-timeline: view()) {
  .lead-figure img {
    animation: drift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
}
@keyframes drift {
  from { transform: scale(1.06) translateY(-1.2%); }
  to   { transform: scale(1) translateY(1.2%); }
}

/* ---- Counters that run up ---------------------------------------------------
   @property makes an integer interpolable, so the count is a real animation the
   compositor owns rather than a JavaScript timer. */
@property --n { syntax: '<integer>'; initial-value: 0; inherits: false; }
.stat b { font-variant-numeric: tabular-nums; }
.stat .val { counter-reset: nv var(--n); }
.stat .val::after { content: counter(nv); }
@supports (animation-timeline: view()) {
  .stat .val {
    animation: countup 1.6s cubic-bezier(0.16, 0.84, 0.32, 1) both;
    animation-timeline: view();
    animation-range: entry 10% cover 34%;
  }
}
@keyframes countup { from { --n: 0; } to { --n: var(--to); } }
/* Without scroll-driven support the number must still be right, not zero. */
@supports not (animation-timeline: view()) { .stat .val { --n: var(--to); } }

/* ---- Pointer glow -----------------------------------------------------------
   One fixed layer positioned from custom properties the pointer handler writes.
   Compositor-only; it never triggers layout. */
.glow {
  position: fixed; z-index: 0; pointer-events: none;
  width: 46rem; height: 46rem; border-radius: 50%;
  left: var(--mx, 50%); top: var(--my, 30%);
  translate: -50% -50%;
  background: radial-gradient(circle, rgba(201, 162, 75, 0.075), transparent 62%);
  opacity: 0; transition: opacity 0.6s var(--ease);
}
body.has-pointer .glow { opacity: 1; }
@media (hover: none) { .glow { display: none; } }

/* ---- Magnetic call to action ----------------------------------------------- */
.btn-app {
  translate: var(--dx, 0) var(--dy, 0);
  transition: translate 0.25s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}

/* ---- Archive: month rail ----------------------------------------------------- */
.month-head {
  position: sticky; top: 3.4rem; z-index: 5;
  display: flex; align-items: baseline; gap: 0.8rem;
  padding: 1.5rem 0 0.6rem;
  background: linear-gradient(var(--ink) 62%, transparent);
  font-family: var(--serif); font-size: 1.1rem; color: var(--accent);
  scroll-margin-top: 5rem;
}
.month-head span {
  font-family: var(--sans); font-size: 0.63rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--paper-faint);
}

.month-jump { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.5rem 0 0.4rem; }
.month-jump a {
  font-size: 0.67rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.42rem 0.82rem; border: 1px solid var(--line); border-radius: 100px;
  color: var(--paper-dim); text-decoration: none;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.month-jump a:hover { color: var(--ink); background: var(--paper); border-color: var(--paper); }

/* ---- Keyboard hint ---------------------------------------------------------- */
.kbd-hint {
  margin-top: 1.2rem; font-size: 0.65rem; letter-spacing: 0.08em;
  color: var(--paper-faint); display: none;
}
@media (hover: hover) and (min-width: 760px) { .kbd-hint { display: block; } }
.kbd-hint kbd {
  font-family: var(--sans); font-size: 0.62rem; padding: 0.15rem 0.42rem;
  border: 1px solid var(--line); border-radius: 4px; margin: 0 0.15rem;
}

/* ---- Archive rows, dealt in one at a time ------------------------------------ */
@supports (animation-timeline: view()) {
  .arch-item {
    animation: deal 0.7s cubic-bezier(0.16, 0.84, 0.32, 1) both;
    animation-timeline: view();
    animation-range: entry 2% cover 18%;
  }
}
@keyframes deal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---- Everything above, off ---------------------------------------------------
   Kept in one block so there is a single place to verify that reduced motion is
   honoured. */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .w > i { animation: none; transform: none; opacity: 1; }
  .lead-figure img { animation: none; }
  .arch-item { animation: none; opacity: 1; transform: none; }
  .progress { display: none; }
  .glow { display: none; }
  .btn-app { translate: none; }
  .stat .val { animation: none; --n: var(--to); }
}
