/* Confidential Collective Intelligence — page styles */

:root {
  --paper: #F2F1EC;
  --plate: #FFFFFF;
  --ink: #1C2026;
  --ink-soft: #3D444D;
  --muted: #6B7380;
  --rule: #C9D3DF;
  --rule-soft: #DFE5EC;
  --seal: #1E3D63;
  --seal-bright: #2E6BB5;
  --seal-soft: #E3EAF3;
  --seal-hatch: rgba(30, 61, 99, 0.16);
  --margin: #A63D33;
  --margin-soft: rgba(166, 61, 51, 0.10);
  --todo: #F6E7A6;
  --font-serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --essay: 41rem;
  --rail: 16rem;
  --gutter: 16px;
  --text: 1.0625rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14171C;
    --plate: #1B1F26;
    --ink: #E7E5DF;
    --ink-soft: #C4C7CD;
    --muted: #8A929E;
    --rule: #2F3A48;
    --rule-soft: #242C36;
    --seal: #8FB3DE;
    --seal-bright: #BCD5F5;
    --seal-soft: #1A2533;
    --seal-hatch: rgba(143, 179, 222, 0.18);
    --margin: #D9756B;
    --margin-soft: rgba(217, 117, 107, 0.14);
    --todo: #5A4B12;
  }
}
:root[data-theme="dark"] {
  --paper: #14171C;
  --plate: #1B1F26;
  --ink: #E7E5DF;
  --ink-soft: #C4C7CD;
  --muted: #8A929E;
  --rule: #2F3A48;
  --rule-soft: #242C36;
  --seal: #8FB3DE;
  --seal-bright: #BCD5F5;
  --seal-soft: #1A2533;
  --seal-hatch: rgba(143, 179, 222, 0.18);
  --margin: #D9756B;
  --margin-soft: rgba(217, 117, 107, 0.14);
  --todo: #5A4B12;
}

@media (min-width: 900px) {
  :root { --text: 1.125rem; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--text);
  line-height: 1.62;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-decoration-color: var(--margin); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { color: var(--margin); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--plate); padding: .5rem .75rem; font-family: var(--font-sans); }
.skip:focus { left: var(--gutter); z-index: 50; }

/* ---------- Contents rail ---------- */

.rail {
  font-family: var(--font-sans);
  font-size: .8125rem;
  line-height: 1.35;
  color: var(--ink-soft);
}
.rail-title {
  font-weight: 600;
  letter-spacing: .01em;
  margin: 0 0 .9rem;
  color: var(--ink);
  font-size: .875rem;
}
.rail ol { list-style: none; margin: 0; padding: 0; }
.rail li { margin: 0; }
.rail a {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: .25rem;
  padding: .38rem 0;
  text-decoration: none;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  padding-left: .55rem;
  margin-left: -.55rem;
}
.rail a .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.rail a:hover { color: var(--ink); }
.rail a.is-active { color: var(--ink); border-left-color: var(--margin); }
.rail a.is-active .n { color: var(--margin); }
.rail-foot { margin-top: 1.4rem; padding-top: .9rem; border-top: 1px solid var(--rule-soft); color: var(--muted); font-size: .75rem; }
.rail-foot a { display: inline; padding: 0; margin: 0; border: 0; text-decoration: underline; text-decoration-color: var(--rule); color: var(--muted); }
.rail-foot a:hover { color: var(--ink); }

@media (min-width: 1000px) {
  .rail {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--rail);
    padding: 2rem 1.25rem 4rem 1.5rem;
    overflow-y: auto;
    border-right: 1px solid var(--rule-soft);
    background: var(--paper);
  }
  .rail summary { display: none; }
  .page { margin-left: var(--rail); }
}
@media (max-width: 999px) {
  .rail {
    position: sticky; top: 0; z-index: 20;
    background: var(--paper);
    border-bottom: 1px solid var(--rule-soft);
    padding: 0 var(--gutter);
  }
  .rail details { max-width: var(--essay); margin: 0 auto; }
  .rail summary {
    cursor: pointer; list-style: none;
    padding: .8rem 0; font-weight: 600; color: var(--ink);
    display: flex; justify-content: space-between; align-items: center;
  }
  .rail summary::-webkit-details-marker { display: none; }
  .rail summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.1rem; }
  .rail details[open] summary::after { content: "–"; }
  .rail .rail-title { display: none; }
  .rail ol { padding-bottom: .8rem; }
  .rail-foot { display: none; }
}

/* ---------- Page and hero ---------- */

.page { min-height: 100vh; padding-bottom: 5rem; }
.wrap { max-width: var(--essay); margin: 0 auto; padding: 0 var(--gutter); }

.hero {
  position: relative;
  min-height: clamp(620px, 90vh, 940px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: 4rem var(--gutter) 3.5rem;
  overflow: hidden;
  isolation: isolate;
}
@media (max-width: 999px) { .hero { min-height: clamp(520px, 78vh, 760px); padding-top: 3rem; } }

.hero-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 56% 40% at 50% 40%, var(--paper) 0%, color-mix(in srgb, var(--paper) 70%, transparent) 60%, transparent 100%),
    linear-gradient(to bottom, var(--paper) 0%, transparent 18%, transparent 84%, var(--paper) 100%);
}
.hero-art svg.portal { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 100%; width: auto; max-width: none; color: var(--rule); }
.portal path, .portal line { fill: none; stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.portal .mould .m0 { stroke-width: 1.4; }
.portal .mould .m2, .portal .mould .m4 { stroke: color-mix(in srgb, var(--rule) 70%, var(--paper)); }
.portal .jamb { stroke: none; opacity: .8; }
.portal .corridor .ray { stroke: color-mix(in srgb, var(--rule) 55%, var(--paper)); }
.portal .corridor .deep { stroke: color-mix(in srgb, var(--rule) 80%, var(--paper)); }
.portal .ledger { opacity: 0; transition: opacity .9s ease; }
.portal.awake .ledger { opacity: 1; }
.portal .ledger line { stroke: var(--seal); stroke-width: 1; opacity: .7; }
.portal .threshold { stroke: var(--ink-soft); stroke-width: 1.2; opacity: .6; transition: stroke .9s ease, opacity .9s ease; }
.portal.awake .threshold { stroke: var(--seal); opacity: .9; }
.portal .out { stroke: var(--margin); stroke-width: 1.3; stroke-dasharray: 6 5; opacity: 0; transition: opacity .6s ease; }
.portal.awake .out { opacity: .9; }
.portal .corridor { transition: transform .25s ease-out; will-change: transform; }
.portal .mould { transition: transform .25s ease-out; }

/* the portal: a slight parallax against the pointer */
.hero-art { transform-style: preserve-3d; will-change: transform; }
.portal .mould { will-change: transform; }
.portal .ledger .spoke { opacity: .5; }

.hero-text { position: relative; z-index: 1; max-width: 46rem; margin: 0 auto; pointer-events: none; }
.hero-text a, .hero-text .byline { pointer-events: auto; }
.hero h1 {
  font-weight: 400;
  font-size: clamp(2.8rem, 7.4vw, 5.6rem);
  line-height: 1.0;
  letter-spacing: -.015em;
  margin: 0 0 1.4rem;
  text-wrap: balance;
}
.hero .dek {
  font-style: italic;
  font-size: clamp(1.2rem, 2.3vw, 1.6rem);
  line-height: 1.35;
  color: var(--ink-soft);
  margin: 0 auto 1.8rem;
  max-width: 34rem;
  text-wrap: balance;
}
.hero .byline {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0;
  display: flex; gap: 1.6rem; flex-wrap: wrap; align-items: baseline; justify-content: center;
}
.hero .byline a { text-decoration-color: var(--rule); color: var(--seal); }
.hero-rule { position: relative; z-index: 1; margin-top: 2.6rem; width: min(22rem, 70%); height: 1px; background: var(--rule); }
.hero-rule span { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; transform: translate(-50%, -50%) rotate(45deg); background: var(--paper); border: 1px solid var(--margin); }

/* the room diagram, now a figure in the Introduction */
.room-fig svg { width: 100%; height: auto; display: block; }
.room-fig figcaption { font-family: var(--font-sans); font-size: .8rem; color: var(--muted); margin-top: .7rem; line-height: 1.5; }

/* ---------- Essay body ---------- */

.essay section { position: relative; }
.essay section + section { margin-top: 3.6rem; }

.essay h2 {
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0 0 1.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  text-wrap: balance;
}
.essay h2 .num {
  display: block;
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--margin);
  margin-bottom: .55rem;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1240px) {
  .essay h2 .num {
    position: absolute;
    left: -4.6rem;
    width: 3.6rem;
    text-align: right;
    margin: 0;
    padding-top: .55rem;
  }
}

.essay h3 {
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 2.6rem 0 .8rem;
  letter-spacing: -.005em;
}
.essay h3 .pnum {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 500;
  color: var(--margin);
  margin-right: .6rem;
  vertical-align: .18em;
  letter-spacing: .03em;
}

.essay p { margin: 0 0 1.15em; }
.essay p.lead::first-line { }
.essay strong { font-weight: 600; }
.essay em { font-style: italic; }
.essay hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }
.essay .thanks { color: var(--muted); font-size: .95em; }

.essay ul { padding-left: 1.2rem; margin: 0 0 1.15em; }
.essay li { margin-bottom: .45em; }

/* The closing menu: three things a reader can do */
.essay ul.menu { list-style: none; padding: 0; margin: 1.8rem 0 0; border-top: 1px solid var(--rule); counter-reset: opt; }
.essay ul.menu li { margin: 0; padding: 1.15rem 0 1.15rem 3.2rem; border-bottom: 1px solid var(--rule-soft); position: relative; counter-increment: opt; }
.essay ul.menu li:last-child { border-bottom: 1px solid var(--rule); }
.essay ul.menu li::before {
  content: counter(opt);
  position: absolute; left: 0; top: 1.25rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid var(--seal); color: var(--seal);
  font-family: var(--font-sans); font-size: .85rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.essay ul.menu li strong { display: block; font-size: 1.2rem; font-weight: 500; letter-spacing: -.005em; margin-bottom: .25rem; }
@media (max-width: 520px) { .essay ul.menu li { padding-left: 2.7rem; } .essay ul.menu li::before { width: 1.7rem; height: 1.7rem; font-size: .78rem; } }

mark.todo { background: var(--todo); color: inherit; padding: 0 .15em; border-radius: 2px; }

/* ---------- Figures ---------- */

figure.fig { margin: 2.2rem 0 2.4rem; }
figure.fig svg { width: 100%; height: auto; display: block; }
figure.fig figcaption, .fig-caption {
  font-family: var(--font-sans);
  font-size: .8rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: .7rem;
}
figure.fig figcaption strong { color: var(--ink-soft); font-weight: 600; }

/* shared SVG text */
svg .t { font-family: var(--font-sans); font-size: 12px; fill: var(--ink-soft); }
svg .t.small { font-size: 10.5px; fill: var(--muted); }
svg .t.strong { fill: var(--ink); font-weight: 600; }
svg .t.margin { fill: var(--margin); font-weight: 600; }
svg .t.seal { fill: var(--seal); font-weight: 600; }
svg .mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 10px; fill: var(--seal); letter-spacing: .02em; }
svg .ink { stroke: var(--ink-soft); }
svg .rule { stroke: var(--rule); }
svg .seal-line { stroke: var(--seal); }
svg .margin-line { stroke: var(--margin); }
svg .paper-fill { fill: var(--paper); }
svg .plate-fill { fill: var(--plate); }
svg .seal-fill { fill: var(--seal-soft); }

/* Hero animation: documents drift into the room, ledger lines form, one line leaves. */
.room-fig .doc { opacity: 0; }
.room-fig .ledger-line { stroke-dasharray: 120; stroke-dashoffset: 120; }
.room-fig .out-line { stroke-dasharray: 260; stroke-dashoffset: 260; }
.room-fig .out-label { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .room-fig.play .doc { animation: doc-in 1.6s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i) * 110ms); }
  .room-fig.play .ledger-line { animation: draw 900ms ease-out forwards; animation-delay: calc(1300ms + var(--i) * 140ms); }
  .room-fig.play .out-line { animation: draw-out 1100ms ease-in-out forwards; animation-delay: 2500ms; }
  .room-fig.play .out-label { animation: fade-in 500ms ease-out forwards; animation-delay: 3300ms; }
}
.room-fig .doc-home { opacity: .9; }
@media (prefers-reduced-motion: reduce) {
  .room-fig .doc { opacity: 0; }
  .room-fig .ledger-line, .room-fig .out-line { stroke-dashoffset: 0; }
  .room-fig .out-label { opacity: 1; }
}
/* Fallback when JS never adds .play (keeps figure legible) */
.room-fig:not(.play) .doc { opacity: 0; }
.room-fig:not(.play) .ledger-line, .room-fig:not(.play) .out-line { stroke-dashoffset: 0; }
.room-fig:not(.play) .out-label { opacity: 1; }

@keyframes doc-in {
  0%   { opacity: 0; transform: translateX(0); }
  15%  { opacity: .95; }
  80%  { opacity: .8; }
  100% { opacity: 0; transform: translateX(var(--dx)); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes draw-out { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }

/* Timeline (interactive) */
.timeline .ev { cursor: pointer; }
.timeline .ev circle { fill: var(--paper); stroke: var(--seal); stroke-width: 1.6; transition: r .15s; }
.timeline .ev[data-track="catalog"] circle { stroke: var(--margin); }
.timeline .ev[data-track="econ"] circle { stroke: var(--ink-soft); }
.timeline .ev:hover circle, .timeline .ev:focus circle, .timeline .ev.is-on circle { fill: var(--seal); r: 6; }
.timeline .ev[data-track="catalog"]:hover circle, .timeline .ev[data-track="catalog"].is-on circle, .timeline .ev[data-track="catalog"]:focus circle { fill: var(--margin); }
.timeline .ev[data-track="econ"]:hover circle, .timeline .ev[data-track="econ"].is-on circle, .timeline .ev[data-track="econ"]:focus circle { fill: var(--ink-soft); }
.timeline .ev:focus { outline: none; }
.timeline-note {
  font-family: var(--font-sans);
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ink-soft);
  min-height: 3.2em;
  margin: .5rem 0 0;
  padding: .7rem .9rem;
  border-left: 2px solid var(--seal);
  background: var(--seal-soft);
}
.timeline-note b { font-weight: 600; color: var(--ink); }
.timeline-note[data-track="catalog"] { border-left-color: var(--margin); background: var(--margin-soft); }
.timeline-note[data-track="econ"] { border-left-color: var(--ink-soft); background: var(--rule-soft); }
.timeline-key { font-family: var(--font-sans); font-size: .75rem; color: var(--muted); display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: .6rem; }
.timeline-key span::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .35rem; vertical-align: -.02em; border: 1.5px solid var(--seal); }
.timeline-key .k-catalog::before { border-color: var(--margin); }
.timeline-key .k-econ::before { border-color: var(--ink-soft); }

/* Depths figure (HTML) */
.depths { border-top: 1px solid var(--rule); font-family: var(--font-sans); font-size: .875rem; line-height: 1.45; }
.depths .row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.depths .row:last-child { border-bottom: 1px solid var(--rule); }
.depths .name { font-weight: 600; color: var(--ink); }
.depths .name small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; margin-top: .15rem; }
.depths .what { color: var(--ink-soft); }
.depths .what .pair { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .3rem; font-family: var(--font-serif); font-size: 1rem; color: var(--ink); }
.depths .pair .box { padding: .15rem .5rem; border: 1px solid var(--rule); border-radius: 2px; background: var(--plate); }
.depths .pair .box.sealed { border-color: var(--seal); background: var(--seal-soft); color: var(--seal); }
.depths .pair .vs { color: var(--muted); font-family: var(--font-sans); font-size: .75rem; }
@media (max-width: 520px) { .depths .row { grid-template-columns: 1fr; gap: .3rem; } }

/* Scorecard table */
table.ledger {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: .875rem;
  line-height: 1.45;
  border-top: 1px solid var(--rule);
}
table.ledger th, table.ledger td { text-align: left; vertical-align: top; padding: .7rem .6rem .7rem 0; border-bottom: 1px solid var(--rule-soft); }
table.ledger th { font-weight: 600; color: var(--ink); width: 34%; }
table.ledger tr:last-child td, table.ledger tr:last-child th { border-bottom: 1px solid var(--rule); }
table.ledger .status { font-weight: 600; padding-right: 1rem; width: 7.5rem; }
table.ledger .met { color: var(--seal); }
table.ledger .part { color: var(--ink-soft); }
table.ledger .not { color: var(--margin); }
table.ledger td.note { color: var(--ink-soft); }
@media (max-width: 520px) {
  table.ledger thead { display: none; }
  table.ledger tr { display: grid; grid-template-columns: 1fr; padding: .6rem 0; }
  table.ledger th, table.ledger td { border: 0; padding: .1rem 0; }
  table.ledger tr { border-bottom: 1px solid var(--rule-soft); }
}


/* ---------- Plates: photographs and scans ---------- */

figure.plate { margin: 2.2rem 0 2.4rem; }
figure.plate .frame {
  background: var(--plate);
  border: 1px solid var(--rule);
  padding: .6rem;
  border-radius: 2px;
  box-shadow: 0 10px 28px -18px rgba(20, 26, 34, .35);
}
figure.plate img { display: block; width: 100%; height: auto; }
figure.plate figcaption { font-family: var(--font-sans); font-size: .8rem; line-height: 1.5; color: var(--muted); margin-top: .7rem; }
figure.plate figcaption strong { color: var(--ink-soft); font-weight: 600; }
figure.plate figcaption .credit { display: block; margin-top: .25rem; font-size: .72rem; color: var(--muted); }

/* two images side by side, matched height */
figure.plate .duo { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: .6rem; align-items: stretch; }
figure.plate .duo .frame.portrait { display: flex; }
figure.plate .duo .frame.portrait img { object-fit: cover; object-position: center top; height: 100%; }
@media (max-width: 520px) { figure.plate .duo { grid-template-columns: 1fr; } figure.plate .duo img { height: auto; } }

/* annotated photograph: numbered pins on the image, legend below */
.annot { position: relative; }
.annot img { display: block; width: 100%; height: auto; }
.annot svg.leads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.annot svg.leads line { stroke: #fff; stroke-width: 3; }
.annot svg.leads line.u { stroke: var(--margin); stroke-width: 1.5; }
.annot .pin, .annot .dot { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; background: var(--margin); box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,.35); }
.annot .pin { width: 22px; height: 22px; color: #fff; font: 600 12px/22px var(--font-sans); text-align: center; }
.annot .dot { width: 8px; height: 8px; }
.legend { list-style: none; margin: .8rem 0 0; padding: 0; font-family: var(--font-sans); font-size: .85rem; line-height: 1.5; color: var(--ink-soft); counter-reset: lg; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1.4rem; }
.legend li { position: relative; padding-left: 1.9rem; counter-increment: lg; }
.legend li::before { content: counter(lg); position: absolute; left: 0; top: .12rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--margin); color: #fff; font-size: .72rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.legend li b { color: var(--ink); font-weight: 600; }
@media (max-width: 600px) { .legend { grid-template-columns: 1fr; } }
.inset { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1.15fr); gap: .6rem; }
.inset .frame { display: flex; align-items: center; }
@media (max-width: 520px) { .inset { grid-template-columns: 1fr; } }

/* ---------- Agent note and footer ---------- */

.agents {
  margin-top: 3.5rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--rule);
  background: var(--plate);
  border-radius: 2px;
}
.agents h2 { border: 0; padding-top: 0; font-size: 1.35rem; margin-bottom: .6rem; }
.agents p { margin-bottom: .6em; font-size: 1rem; }
.agents p:last-child { margin-bottom: 0; }

.foot { font-family: var(--font-sans); font-size: .78rem; color: var(--muted); margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule-soft); display: flex; gap: 1.2rem; flex-wrap: wrap; }
.foot a { text-decoration-color: var(--rule); }

/* ---------- Ticker ---------- */

.ticker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  font-family: var(--font-sans);
  font-size: .75rem;
  line-height: 1.3;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid var(--rule-soft);
  padding: .55rem var(--gutter) max(.55rem, env(safe-area-inset-bottom));
}
@media (min-width: 1000px) { .ticker { left: var(--rail); } }
.ticker-inner { max-width: var(--essay); margin: 0 auto; }
.tk-facts { list-style: none; margin: 0; padding: 0; position: relative; min-height: 1.3em; }
.tk-facts li { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-facts li.is-on { opacity: 1; }
@media (max-width: 700px) { .tk-facts { min-height: 2.6em; } .tk-facts li { white-space: normal; } }
@media (prefers-reduced-motion: reduce) { .tk-facts li { transition: none; } }

/* ---------- Print ---------- */

@media print {
  :root { --paper: #fff; --ink: #000; --ink-soft: #222; --muted: #444; }
  .rail, .ticker, .skip { display: none !important; }
  .page { margin: 0; padding: 0; }
  .wrap { max-width: none; padding: 0; }
  body { font-size: 11pt; line-height: 1.45; }
  .hero { padding-top: 0; }
  .essay h2 { break-after: avoid; }
  figure.fig { break-inside: avoid; }
  a { text-decoration: none; }
  mark.todo { background: none; outline: 1px dashed #999; }
  @page { margin: 1in; }
}
