/* ============================================================
   The Short Memory — timeline styles
   Design test. Six entries of forty-eight.
   ============================================================ */

:root {
  /* paper */
  --ground:      #b6b6b1;
  --sheet:       #dfdfd9;
  --sheet-raise: #e7e7e1;
  --sheet-edge:  rgba(23, 23, 26, .10);

  /* ink */
  --ink:         #17171a;
  --ink-soft:    #4e4e55;
  --ink-faint:   #5f5f66;

  /* the spine */
  --gold:        #9a7b2e;   /* decorative only: spine, nodes, rules */
  --gold-bright: #c3a04a;
  --gold-wash:   rgba(154, 123, 46, .14);
  --gold-ink:    #5c4a1c;   /* gold as TEXT — 4.5:1 on --ground */

  --rule:        rgba(23, 23, 26, .16);
  --shadow:      0 1px 0 rgba(23,23,26,.06), 0 12px 28px -18px rgba(23,23,26,.55);

  /* type */
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* scale */
  --s-1: .78rem;
  --s0:  1rem;
  --s1:  1.16rem;
  --s2:  1.45rem;
  --s3:  2rem;
  --s4:  2.9rem;
  --s5:  4.2rem;

  --spine-w: 2px;
  --measure: 63ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:      #131315;
    --sheet:       #1d1d20;
    --sheet-raise: #24242a;
    --sheet-edge:  rgba(232, 232, 226, .09);
    --ink:         #e8e8e2;
    --ink-soft:    #a8a8a2;
    --ink-faint:   #94948f;
    --gold:        #c9a44e;
    --gold-bright: #e2c076;
    --gold-wash:   rgba(201, 164, 78, .13);
    --gold-ink:    #d8b661;
    --rule:        rgba(232, 232, 226, .14);
    --shadow:      0 1px 0 rgba(0,0,0,.4), 0 14px 34px -20px rgba(0,0,0,.9);
  }
}

:root[data-theme="dark"] {
  --ground:      #131315;
  --sheet:       #1d1d20;
  --sheet-raise: #24242a;
  --sheet-edge:  rgba(232, 232, 226, .09);
  --ink:         #e8e8e2;
  --ink-soft:    #a8a8a2;
  --ink-faint:   #94948f;
  --gold:        #c9a44e;
  --gold-bright: #e2c076;
  --gold-wash:   rgba(201, 164, 78, .13);
  --gold-ink:    #d8b661;
  --rule:        rgba(232, 232, 226, .14);
  --shadow:      0 1px 0 rgba(0,0,0,.4), 0 14px 34px -20px rgba(0,0,0,.9);
}

/* ---------- reset-ish ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--s0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration-color: var(--gold);
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* subtle paper tooth over the whole ground */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image:
    repeating-linear-gradient(0deg,   rgba(0,0,0,.014) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg,  rgba(0,0,0,.014) 0 1px, transparent 1px 3px);
}

.wrap { position: relative; z-index: 1; }

/* ============================================================
   Masthead
   ============================================================ */

.masthead {
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 7rem) clamp(1.25rem, 5vw, 3rem) clamp(2.5rem, 6vw, 4.5rem);
}

.masthead__kicker {
  font-family: var(--mono);
  font-size: var(--s-1);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 1.4rem;
}

.masthead h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.6rem, 8vw, var(--s5));
  line-height: 1.02;
  letter-spacing: -.022em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
  max-width: 20ch;
}

.masthead h1 em {
  font-style: italic;
  color: var(--gold-ink);
}

.masthead__standfirst {
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.4vw, var(--s2));
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 2.5rem;
}

.masthead__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: var(--s-1);
  color: var(--ink-faint);
}

.masthead__meta b {
  color: var(--ink);
  font-weight: 600;
}

/* ============================================================
   The spine
   ============================================================ */

.timeline {
  position: relative;
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem) clamp(4rem, 10vw, 8rem);
}

/* the unlit track */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(1.25rem, 5vw, 3rem);
  width: var(--spine-w);
  background: var(--gold);
  opacity: .18;
}

/* the lit portion — grows as you scroll */
.spine-lit {
  position: absolute;
  top: 0;
  left: clamp(1.25rem, 5vw, 3rem);
  width: var(--spine-w);
  height: 100%;
  transform-origin: top center;
  transform: scaleY(var(--progress, 1));
  background: linear-gradient(
    to bottom,
    var(--gold) 0%,
    var(--gold-bright) 88%,
    var(--gold-bright) 100%
  );
  will-change: transform;
}

/* the travelling head of the line */
.spine-lit::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-bright);
  transform: translate(-50%, 50%) scaleY(calc(1 / max(var(--progress, 1), .001)));
  box-shadow: 0 0 12px 2px var(--gold-wash);
}

/* no JS, or reduced motion: the spine is simply lit */
.no-js .spine-lit { --progress: 1; }
.no-js .spine-lit::after { display: none; }

@media (min-width: 62rem) {
  .timeline::before,
  .spine-lit {
    left: 50%;
    margin-left: calc(var(--spine-w) / -2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spine-lit { transform: none; }
  .spine-lit::after { display: none; }
}

/* ---------- era headings sit astride the spine ---------- */

.era {
  position: relative;
  margin: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  padding-left: 3.5rem;
}

.era__rule {
  display: inline-block;
  background: var(--ground);
  padding: .5rem 1rem .5rem 0;
}

.era__num {
  font-family: var(--mono);
  font-size: var(--s-1);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  display: block;
  margin-bottom: .3rem;
}

.era h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, var(--s3));
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0;
  max-width: 26ch;
}

@media (min-width: 62rem) {
  .era {
    padding-left: 0;
    text-align: center;
  }
  .era__rule {
    padding: .9rem 2rem;
  }
  .era h2 { margin-inline: auto; }
}

/* ============================================================
   Entries
   ============================================================ */

.entry {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

/* the node on the spine */
.entry__node {
  position: absolute;
  left: 0;
  top: .55rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--ground);
  transform: translateX(calc(var(--spine-w) / 2 - 50%));
  margin-left: 0;
}

.entry__date {
  display: block;
  font-family: var(--mono);
  font-size: var(--s-1);
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--gold-ink);
  margin-bottom: .7rem;
  font-variant-numeric: tabular-nums;
}

.entry__seq {
  color: var(--ink-faint);
  letter-spacing: .12em;
}

/* ---------- the sheet ---------- */

.sheet {
  background: var(--sheet);
  border: 1px solid var(--sheet-edge);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 3.5vw, 2.2rem);
}

.sheet h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.35rem, 3.2vw, var(--s2));
  line-height: 1.2;
  letter-spacing: -.012em;
  margin: 0 0 .9rem;
  text-wrap: balance;
}

.sheet p {
  margin: 0 0 1rem;
  max-width: var(--measure);
  color: var(--ink-soft);
}

.sheet p:last-of-type { margin-bottom: 0; }

.sheet strong { color: var(--ink); font-weight: 600; }

/* ---------- the pulled figure ---------- */

.figure-out {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  flex-wrap: wrap;
  margin: 1.3rem 0;
  padding: .9rem 0 .9rem 1.1rem;
  border-left: 3px solid var(--gold);
  background: var(--gold-wash);
}

.figure-out__num {
  font-family: var(--display);
  font-size: clamp(1.9rem, 5vw, var(--s3));
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.figure-out__label {
  font-family: var(--mono);
  font-size: var(--s-1);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 34ch;
}

/* ---------- photo ---------- */

.shot {
  margin: 0 0 1.3rem;
}

.shot img {
  width: 100%;
  height: auto;
  background: var(--sheet-raise);
}

/* placeholder frame — delete once real images land */
.shot--placeholder .shot__frame {
  aspect-ratio: 3 / 2;
  display: grid;
  place-content: center;
  gap: .4rem;
  text-align: center;
  padding: 1rem;
  background:
    repeating-linear-gradient(
      135deg,
      var(--sheet-raise) 0 10px,
      transparent 10px 20px
    );
  border: 1px dashed var(--rule);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: var(--s-1);
}

.shot__frame b {
  display: block;
  color: var(--ink-soft);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .7rem;
}

.shot figcaption {
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.5;
  color: var(--ink-faint);
  padding-top: .55rem;
  border-top: 1px solid var(--rule);
  margin-top: .55rem;
}

/* ---------- document facsimile ----------
   Used where no freely-licensed photograph exists. The record shows the
   record: a court judgment, a police line, an Amnesty reference number. */

.doc {
  margin: 0 0 1.3rem;
}

.doc__paper {
  position: relative;
  background: var(--sheet-raise);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  padding: 1.15rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

/* faint rule-ruled paper, like a photocopied form */
.doc__paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 1.55rem,
    var(--rule) 1.55rem calc(1.55rem + 1px)
  );
}

.doc__paper > * { position: relative; }

.doc__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .4rem 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.doc__org { color: var(--ink); font-weight: 500; }
.doc__ref { color: var(--gold-ink); font-variant-numeric: tabular-nums; }

.doc__quote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--ink);
  text-wrap: balance;
}

.doc__quote::before { content: "\201C"; }
.doc__quote::after  { content: "\201D"; }

.doc__body {
  margin: 0;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 58ch;
}

.doc__foot {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .9rem;
  padding-top: .6rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--ink-faint);
}

.doc__foot span::after {
  content: " ·";
  color: var(--gold-ink);
}
.doc__foot span:last-child::after { content: ""; }

.doc figcaption {
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.5;
  color: var(--ink-faint);
  padding-top: .5rem;
  margin-top: .5rem;
  border-top: 1px solid var(--rule);
}

/* ---------- sources ---------- */

.sources {
  margin-top: 1.4rem;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
}

.sources__label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .55rem;
}

.sources ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .38rem;
  counter-reset: src;
}

.sources li {
  counter-increment: src;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.5;
  color: var(--ink-faint);
  padding-left: 1.9rem;
  position: relative;
}

.sources li::before {
  content: counter(src, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--gold-ink);
}

.sources a { color: var(--ink-soft); }
.sources a:hover { color: var(--ink); }

.sources cite {
  font-style: normal;
  color: var(--ink-faint);
}

/* ============================================================
   The feature — the one entry that breaks the spine
   ============================================================ */

.entry--feature .sheet {
  background: var(--sheet-raise);
  border-color: var(--gold);
  border-width: 1px;
}

/* the feature carries its own date inside the sheet */
.entry--feature .entry__stamp { display: none; }
.entry--feature .entry__node { display: none; }
.entry--feature { padding-left: 0; }

.feature__hed {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.6rem, 4.2vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -.018em;
  margin: 0 0 .7rem;
  text-wrap: balance;
}

.feature__deck {
  font-family: var(--body);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 1.8rem;
}

.versus {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (min-width: 44rem) {
  .versus { grid-template-columns: 1fr 1fr; }
}

.versus__side {
  background: var(--sheet);
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.versus__date {
  font-family: var(--mono);
  font-size: var(--s-1);
  letter-spacing: .06em;
  color: var(--gold-ink);
  font-variant-numeric: tabular-nums;
}

.versus__who {
  font-family: var(--display);
  font-size: var(--s1);
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
}

.versus__rows {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 0;
  font-size: .9rem;
}

.versus__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule);
}

.versus__row:last-child { border-bottom: 0; padding-bottom: 0; }

.versus__row dt {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.versus__row dd {
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}

.versus__row dd.is-loud {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1;
  color: var(--gold-ink);
}

.feature__verdict {
  margin: 1.6rem 0 0;
  padding-top: 1.2rem;
  border-top: 2px solid var(--gold);
  font-family: var(--display);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  line-height: 1.45;
  color: var(--ink);
  max-width: 54ch;
}

/* ============================================================
   Wide layout — alternate the sheets across the spine
   ============================================================ */

@media (min-width: 62rem) {
  .entry {
    display: grid;
    grid-template-columns: 1fr 4.5rem 1fr;
    align-items: start;
    padding-left: 0;
    margin-bottom: clamp(3.5rem, 7vw, 6rem);
  }

  .entry__node {
    position: relative;
    left: auto;
    top: .5rem;
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    transform: none;
  }

  /* odd entries: sheet left, date right */
  .entry:nth-of-type(odd) .entry__body { grid-column: 1; text-align: right; }
  .entry:nth-of-type(odd) .entry__stamp { grid-column: 3; text-align: left; }

  /* even entries: date left, sheet right */
  .entry:nth-of-type(even) .entry__body { grid-column: 3; }
  .entry:nth-of-type(even) .entry__stamp { grid-column: 1; text-align: right; }

  .entry__body, .entry__stamp { grid-row: 1; }

  /* text inside a right-aligned sheet still reads left */
  .entry:nth-of-type(odd) .sheet { text-align: left; }
  .entry:nth-of-type(odd) .sheet p { margin-left: auto; margin-right: 0; }

  .entry__stamp { padding-top: .1rem; }

  .entry__date { margin-bottom: .35rem; }

  .entry__stampnote {
    font-family: var(--mono);
    font-size: .74rem;
    line-height: 1.5;
    color: var(--ink-faint);
    max-width: 24ch;
    display: block;
  }

  .entry:nth-of-type(odd) .entry__stampnote { margin-right: auto; }
  .entry:nth-of-type(even) .entry__stampnote { margin-left: auto; }

  /* the feature spans everything */
  .entry--feature {
    grid-template-columns: 1fr;
    padding: 0 clamp(0rem, 4vw, 4rem);
  }
  .entry--feature .entry__node { display: none; }
  .entry--feature .entry__body { grid-column: 1; text-align: left; }
  .entry--feature .entry__stamp { display: none; }
}

/* on narrow screens the date sits above the sheet */
@media (max-width: 61.99rem) {
  .entry__stampnote { display: none; }
}

/* ============================================================
   Roll-on — the sheet unfolds as it reaches the spine head
   ============================================================ */

:root {
  --ease-out: cubic-bezier(.16, .84, .28, 1);
}

/* the sheet tips up from its lower edge, like paper being laid down */
.js .entry__body {
  opacity: 0;
  transform: perspective(1400px) rotateX(7deg) translateY(26px);
  transform-origin: 50% 100%;
  transition:
    opacity .78s var(--ease-out),
    transform .78s var(--ease-out);
}

.js .entry.is-in .entry__body {
  opacity: 1;
  transform: none;
}

/* the date stamp slides out of the spine */
.js .entry__stamp {
  opacity: 0;
  transition: opacity .6s var(--ease-out) .1s, transform .6s var(--ease-out) .1s;
}

.js .entry:nth-of-type(odd)  .entry__stamp { transform: translateX(-14px); }
.js .entry:nth-of-type(even) .entry__stamp { transform: translateX(14px); }
.js .entry.is-in .entry__stamp { opacity: 1; transform: none; }

/* the node fills in when the entry lands */
.js .entry__node {
  background: var(--ground);
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px var(--ground);
  transform: scale(.6);
  transition: background .45s var(--ease-out) .12s,
              transform .45s var(--ease-out) .12s,
              box-shadow .45s var(--ease-out) .12s;
}

@media (max-width: 61.99rem) {
  .js .entry__node {
    transform: translateX(calc(var(--spine-w) / 2 - 50%)) scale(.6);
  }
  .js .entry.is-in .entry__node {
    transform: translateX(calc(var(--spine-w) / 2 - 50%)) scale(1);
  }
}

.js .entry.is-in .entry__node {
  background: var(--gold);
  transform: scale(1);
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px var(--ground), 0 0 14px 1px var(--gold-wash);
}

/* the contents of a sheet stagger in behind it */
.js .entry__body .stagger > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}

.js .entry.is-in .entry__body .stagger > * {
  opacity: 1;
  transform: none;
}

.js .entry.is-in .entry__body .stagger > :nth-child(1) { transition-delay: .16s; }
.js .entry.is-in .entry__body .stagger > :nth-child(2) { transition-delay: .23s; }
.js .entry.is-in .entry__body .stagger > :nth-child(3) { transition-delay: .30s; }
.js .entry.is-in .entry__body .stagger > :nth-child(4) { transition-delay: .37s; }
.js .entry.is-in .entry__body .stagger > :nth-child(5) { transition-delay: .44s; }
.js .entry.is-in .entry__body .stagger > :nth-child(6) { transition-delay: .51s; }
.js .entry.is-in .entry__body .stagger > :nth-child(7) { transition-delay: .58s; }

/* era headings drift up */
.js .era {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.js .era.is-in { opacity: 1; transform: none; }

/* everything resolves instantly if motion is unwelcome */
@media (prefers-reduced-motion: reduce) {
  .js .entry__body,
  .js .entry__stamp,
  .js .entry__node,
  .js .era,
  .js .entry__body .stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .js .entry__node { background: var(--gold); }
}

/* ============================================================
   Foot
   ============================================================ */

.colophon {
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 5vw, 3rem) clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--rule);
}

.colophon h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--s2);
  margin: 0 0 1rem;
}

.colophon p {
  max-width: var(--measure);
  color: var(--ink-soft);
  margin: 0 0 1rem;
  font-size: .93rem;
}

.colophon .note {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ink-faint);
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
  max-width: 60ch;
}

/* skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sheet);
  color: var(--ink);
  padding: .7rem 1.1rem;
  z-index: 10;
  font-family: var(--mono);
  font-size: var(--s-1);
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- caveat block ----------
   Where the page argues against itself. Deliberately quieter than the
   evidence around it, but never hidden. */

.caveat {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border: 1px dashed var(--rule);
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.caveat__label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

.caveat p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- the claim ----------
   Stated once, at the top, so nobody has to infer it and nobody can
   inflate it. Deliberately set as argument, not as evidence. */

.claim {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border-left: 3px solid var(--gold);
  background: var(--sheet);
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.claim__label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0;
}

.claim p:not(.claim__label) {
  margin: 0;
  font-size: .95rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 68ch;
}

.claim em { color: var(--ink); font-style: italic; }

/* ============================================================
   Closing sections — manifesto, author, method
   ============================================================ */

.colophon {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 6vw, 4rem);
}

.manifesto__hed {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -.018em;
  margin: 0 0 1.6rem;
  text-wrap: balance;
}

.manifesto__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-left: 3px solid var(--gold);
  padding-left: clamp(1.1rem, 3vw, 2rem);
}

.manifesto__body h3,
.method h3 {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 1.2rem 0 0;
}

.manifesto__body h3:first-child { margin-top: 0; }

.manifesto__body p,
.method p {
  margin: 0;
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.68;
}

.manifesto__body strong,
.method strong { color: var(--ink); font-weight: 600; }
.manifesto__body em { color: var(--ink); font-style: italic; }

/* ---------- author ---------- */

.author {
  display: grid;
  gap: clamp(1.2rem, 4vw, 2.4rem);
  align-items: start;
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--rule);
}

@media (min-width: 44rem) {
  .author { grid-template-columns: minmax(9rem, 13rem) 1fr; }
}

.author__photo {
  width: 100%;
  max-width: 13rem;
  height: auto;
  border: 1px solid var(--sheet-edge);
  box-shadow: var(--shadow);
  background: var(--sheet);
}

.author__text {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.author__label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

.author__name {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0;
}

.author__text p:not(.author__label) {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: .95rem;
  line-height: 1.68;
}

.author__links {
  list-style: none;
  margin: .4rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
  font-family: var(--mono);
  font-size: .82rem;
}

.author__links a { color: var(--ink); }

.method { padding-top: clamp(1.5rem, 4vw, 2.5rem); border-top: 1px solid var(--rule); }
.method { display: flex; flex-direction: column; gap: 1rem; }

/* ---------- the close ----------
   The last thing anyone reads. Warmer ground, wider measure, and the
   final line given room. The only place on the page that argues forwards. */

.hope {
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.hope__hed {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -.018em;
  margin: 0 0 .5rem;
  text-wrap: balance;
}

.hope p {
  margin: 0;
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.hope strong { color: var(--ink); font-weight: 600; }
.hope em { color: var(--ink); font-style: italic; }

.hope__last {
  font-family: var(--display) !important;
  font-size: clamp(1.4rem, 3.6vw, 1.95rem) !important;
  line-height: 1.3 !important;
  letter-spacing: -.012em;
  color: var(--ink) !important;
  margin-top: 1.2rem !important;
  padding-top: 1.4rem;
  border-top: 2px solid var(--gold);
  max-width: 30ch !important;
  text-wrap: balance;
}

/* ---------- masthead nav ---------- */

.masthead__nav {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.8rem;
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: var(--s-1);
}

.masthead__nav a {
  color: var(--gold-ink);
  text-decoration-color: var(--rule);
}

.masthead__nav a:hover { color: var(--ink); text-decoration-color: var(--gold); }

/* ---------- author: intro grid, then the creed below it ---------- */

.author { display: flex; flex-direction: column; gap: clamp(1.6rem, 4vw, 2.4rem); }

.author__intro {
  display: grid;
  gap: clamp(1.2rem, 4vw, 2.4rem);
  align-items: start;
}

@media (min-width: 44rem) {
  .author__intro { grid-template-columns: minmax(9rem, 13rem) 1fr; }
}

.author__creed {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-top: clamp(1.4rem, 4vw, 2rem);
  border-top: 1px solid var(--rule);
}

.author__creed p {
  margin: 0;
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.author__creed strong { color: var(--ink); font-weight: 600; }
.author__creed em { color: var(--ink); font-style: italic; }

/* section anchors shouldn't show a focus ring when jumped to */
[id][tabindex="-1"]:focus { outline: none; }

/* ============================================================
   Changelog page — moved out of the HTML so the CSP can stay strict
   ============================================================ */

  .log {
    max-width: 74rem;
    margin: 0 auto;
    padding: clamp(3rem, 9vw, 6rem) clamp(1.25rem, 5vw, 3rem) clamp(4rem, 9vw, 7rem);
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 5vw, 3rem);
  }

  .log__kicker {
    font-family: var(--mono);
    font-size: var(--s-1);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-ink);
    margin: 0 0 1.2rem;
  }

  .log h1 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(2.2rem, 6.5vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: 0 0 1.4rem;
    max-width: 20ch;
    text-wrap: balance;
  }

  .log__intro {
    border-left: 3px solid var(--gold);
    padding-left: clamp(1.1rem, 3vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: .9rem;
  }

  .log__intro p {
    margin: 0;
    max-width: 64ch;
    color: var(--ink-soft);
    font-size: .98rem;
    line-height: 1.68;
  }

  .log__intro strong { color: var(--ink); font-weight: 600; }
  .log__intro em { color: var(--ink); font-style: italic; }

  .release {
    display: grid;
    gap: 1rem clamp(1.5rem, 4vw, 3rem);
    padding-top: clamp(1.6rem, 4vw, 2.4rem);
    border-top: 1px solid var(--rule);
  }

  @media (min-width: 52rem) {
    .release { grid-template-columns: 14rem 1fr; }
  }

  .release__meta {
    display: flex;
    flex-direction: column;
    gap: .3rem;
  }

  .release__v {
    font-family: var(--display);
    font-size: clamp(1.8rem, 4vw, 2.3rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }

  .release__date {
    font-family: var(--mono);
    font-size: .78rem;
    letter-spacing: .06em;
    color: var(--gold-ink);
    font-variant-numeric: tabular-nums;
  }

  .release__body { display: flex; flex-direction: column; gap: .8rem; }

  .release__body h2 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    line-height: 1.2;
    letter-spacing: -.012em;
    margin: 0;
  }

  .release__body p {
    margin: 0;
    max-width: 64ch;
    color: var(--ink-soft);
    font-size: .95rem;
    line-height: 1.68;
  }

  .release__body ul {
    margin: .2rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: 64ch;
  }

  .release__body li {
    position: relative;
    padding-left: 1.4rem;
    color: var(--ink-soft);
    font-size: .93rem;
    line-height: 1.6;
  }

  .release__body li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
  }

  .release__body strong { color: var(--ink); font-weight: 600; }

  .log__back {
    font-family: var(--mono);
    font-size: .88rem;
    padding-top: clamp(1.4rem, 4vw, 2rem);
    border-top: 1px solid var(--rule);
    margin: 0;
  }

/* ============================================================
   404 page — moved out of the HTML so the CSP can stay strict
   ============================================================ */

  .lost {
    max-width: 74rem;
    margin: 0 auto;
    padding: clamp(5rem, 16vw, 12rem) clamp(1.25rem, 5vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    align-items: flex-start;
  }
  .lost h1 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(2.2rem, 7vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: 0;
    max-width: 18ch;
    text-wrap: balance;
  }
  .lost p {
    margin: 0;
    max-width: 52ch;
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.6;
  }
  .lost__code {
    font-family: var(--mono);
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-ink);
    margin: 0;
  }
  .lost__back {
    font-family: var(--mono);
    font-size: .9rem;
    margin-top: .6rem;
  }
