/* ==========================================================================
   The Curve — design system
   Rule: no CSS gradients anywhere. Depth comes from blur, alpha, hairlines
   and shadow only. Every fill is a solid colour or a solid colour with alpha.
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-tight-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('../fonts/source-serif-4-latin-opsz-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url('../fonts/source-serif-4-latin-opsz-italic.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('../fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* field */
  --ink: #0a0c10;
  --ink-raised: #0e1116;

  /* text */
  --text: #edeff2;
  --text-dim: #98a0aa;
  --text-faint: #6b727c;

  /* material */
  --glass-1: rgb(255 255 255 / 0.03);
  --glass-2: rgb(255 255 255 / 0.05);
  --glass-3: rgb(255 255 255 / 0.08);
  --hairline: rgb(255 255 255 / 0.10);
  --hairline-soft: rgb(255 255 255 / 0.06);
  --edge-catch: rgb(255 255 255 / 0.08);

  /* semantic — reserved for bid/ask data only, never for UI chrome */
  --bid: #2fa37a;
  --ask: #c4453c;
  --bid-fill: rgb(47 163 122 / 0.16);
  --ask-fill: rgb(196 69 60 / 0.16);

  /* radius is hierarchy, not decoration */
  --r-overlay: 22px;
  --r-panel: 14px;
  --r-chip: 5px;

  /* type */
  --display: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 68ch;
  --shell: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
}

/* --- Reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Field ---------------------------------------------------------------- */

body {
  min-height: 100vh;
  background-color: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The footprint motif. A tiled bid/ask cell grid at 4% opacity, sitting behind
   everything. This is what the glass refracts — without it, blurred panels have
   nothing to pick up and the material reads as flat grey. Solid strokes only. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Cpath d='M0 .5h120M0 20.5h120M0 40.5h120'/%3E%3Cpath d='M.5 0v60M59.5 0v60M119.5 0v60'/%3E%3C/g%3E%3Cg fill='%23ffffff'%3E%3Crect x='12' y='8' width='18' height='4'/%3E%3Crect x='72' y='28' width='30' height='4'/%3E%3Crect x='16' y='48' width='10' height='4'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* --- Glass ---------------------------------------------------------------- */

.glass {
  background-color: var(--glass-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow:
    inset 0 1px 0 var(--edge-catch),
    0 16px 40px rgb(0 0 0 / 0.45);
}

.glass--quiet {
  background-color: var(--glass-1);
  border-color: var(--hairline-soft);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .glass--quiet, .nav { background-color: var(--ink-raised); }
}

/* --- Type ----------------------------------------------------------------- */

h1, h2, h3, h4, .display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.021em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); letter-spacing: -0.018em; }
h3 { font-size: 1.16rem; font-weight: 500; letter-spacing: -0.012em; }

p + p { margin-top: 1.05em; }

a {
  color: inherit;
  text-decoration-color: rgb(255 255 255 / 0.32);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 160ms ease-out;
}
a:hover { text-decoration-color: var(--text); }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 2px;
}

.lede {
  font-size: 1.16em;
  line-height: 1.55;
  color: var(--text);
}

.dim { color: var(--text-dim); }

.meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
/* --- App shell: fixed left sidebar ---------------------------------------- */

body.app { min-height: 100vh; }
:root { --doc: 1080px; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.main > main { flex: 1 0 auto; padding: clamp(34px, 4.5vw, 68px) clamp(22px, 4vw, 60px) clamp(48px, 6vw, 80px); }
.main > main > * { max-width: var(--doc); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  padding: 12px 18px;
  background-color: var(--ink-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-chip);
  z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

/* --- Sidebar -------------------------------------------------------------- */

.side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 90;
  width: 296px;
  max-width: 86vw;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 14px 40px;
  border-right: 1px solid var(--hairline);
  background-color: var(--glass-3);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  scrollbar-width: thin;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 380ms cubic-bezier(.2,.85,.25,1), visibility 380ms;
  box-shadow: 8px 0 50px rgb(0 0 0 / 0.55);
}
body.side-open .side { transform: translateX(0); visibility: visible; }

.side-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background-color: rgb(0 0 0 / 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 340ms ease-out, visibility 340ms;
}
body.side-open .side-scrim { opacity: 1; visibility: visible; }

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 0;
  margin-bottom: 26px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text);
}
.wordmark > span { display: flex; flex-direction: column; line-height: 1.15; }
.wordmark__sub {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-top: 3px;
}
.mark { width: 26px; height: 26px; flex: none; color: var(--text); overflow: visible; }

.side__nav { display: grid; gap: 2px; }

.side__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--r-chip);
  border-left: 2px solid transparent;
  font-family: var(--display);
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: -0.008em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 160ms ease-out, background-color 160ms ease-out;
}
.side__item:hover { color: var(--text); background-color: var(--glass-1); }
.side__item[aria-current='page'] {
  color: var(--text);
  background-color: var(--glass-2);
  border-left-color: var(--text);
}
.side__sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.side__item--flat { flex-direction: row; align-items: center; }
.side__item--dash { justify-content: space-between; margin-top: 2px; }
.side__tag {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  border: 1px solid var(--hairline-soft);
  border-radius: 3px;
  padding: 1px 5px;
}

.side__group { margin-block: 2px; }
.side__row { display: flex; align-items: stretch; gap: 2px; }
.side__row .side__item { flex: 1; min-width: 0; }

.side__arrow {
  flex: none;
  width: 30px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: var(--r-chip);
  color: var(--text-faint);
  cursor: pointer;
  transition: color 160ms ease-out, background-color 160ms ease-out, transform 200ms ease-out;
}
.side__arrow svg { width: 12px; height: 12px; transition: transform 200ms ease-out; }
.side__arrow:hover { color: var(--text); background-color: var(--glass-1); }
.side__arrow[aria-expanded='true'] svg { transform: rotate(90deg); }

.side__children[hidden] { display: none; }
.side__children {
  display: grid;
  gap: 1px;
  margin: 3px 0 8px 12px;
  padding-left: 10px;
  border-left: 1px solid var(--hairline-soft);
}
.side__children a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: var(--r-chip);
  font-family: var(--display);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 160ms ease-out, background-color 160ms ease-out;
}
.side__children a:hover { color: var(--text); background-color: var(--glass-1); }
.side__children a[aria-current='page'] { color: var(--text); background-color: var(--glass-2); }
.side__children .n {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.side__children .is-reading { font-style: italic; }

/* Menu button — always present, top left */
.side-toggle {
  position: fixed;
  top: 16px; left: 16px;
  z-index: 100;
  display: grid;
  place-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background-color: var(--glass-3);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--edge-catch), 0 8px 24px rgb(0 0 0 / 0.4);
  cursor: pointer;
  transition: background-color 180ms ease-out;
}
.side-toggle:hover { background-color: rgb(255 255 255 / 0.12); }
.side-toggle span {
  display: block;
  width: 17px; height: 1.5px;
  background-color: var(--text);
  border-radius: 1px;
  transition: transform 220ms ease-out, opacity 180ms ease-out;
}
body.side-open .side-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.side-open .side-toggle span:nth-child(2) { opacity: 0; }
body.side-open .side-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.main > main { padding-top: clamp(78px, 8vw, 104px); }

/* --- Home ----------------------------------------------------------------- */

.home .main > main { max-width: none; }
.home .main > main > * { max-width: 1240px; }

.hero--center { text-align: center; padding-block: clamp(40px, 7vw, 96px) clamp(30px, 4vw, 56px); }
.hero__title {
  font-size: clamp(3rem, 1.4rem + 7vw, 6.6rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.94;
}
.hero__lede {
  max-width: 58ch;
  margin: 26px auto 0;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.26rem);
  line-height: 1.55;
  color: var(--text-dim);
}

.curve-figure { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--hairline-soft); padding-top: 24px; }
.curve-figure svg { width: 100%; height: auto; }
.curve-figure figcaption {
  margin: 16px auto 0;
  max-width: 68ch;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-faint);
}

.pcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}
.pcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 26px 32px;
  text-decoration: none;
  transition: transform 200ms ease-out, background-color 200ms ease-out;
}
.pcard:hover { transform: translateY(-2px); background-color: var(--glass-3); }
.pcard h2 { font-size: 1.5rem; }
.pcard__sub {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin-top: 7px;
}
.pcard p:not(.pcard__sub) { margin-top: 14px; font-size: 0.95rem; line-height: 1.55; color: var(--text-dim); }
.pcard__count { margin-top: auto; padding-top: 20px; }

.home-note {
  text-align: center;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 34px;
  border-top: 1px solid var(--hairline-soft);
}
.home-note p:first-child { max-width: 60ch; margin-inline: auto; color: var(--text-dim); font-size: 1.02rem; }
.home-note .meta { margin-top: 14px; }

/* --- Pillar and topic pages ---------------------------------------------- */

.ph { padding-bottom: 8px; }
.ph--tight .ph__intro { max-width: 66ch; }
.ph__kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.ph__kicker a { color: var(--text-dim); text-decoration-color: rgb(255 255 255 / 0.25); }
.ph h1 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.5rem); }
.ph__intro { max-width: 72ch; margin-top: 22px; font-size: 1.06rem; line-height: 1.62; color: var(--text-dim); }
.ph__intro p + p { margin-top: 1em; }
.ph__stat { margin-top: 22px; }

.ph__body { margin-top: clamp(36px, 5vw, 56px); }

.tindex__head {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.tindex__head + .tindex { margin-bottom: 46px; }

.tindex { display: grid; }
.tindex__item + .tindex__item { border-top: 1px solid var(--hairline-soft); }
.tindex__item a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 20px 12px 20px 4px;
  text-decoration: none;
  border-radius: var(--r-chip);
  transition: background-color 180ms ease-out, padding-left 180ms ease-out;
}
.tindex__item a:hover { background-color: var(--glass-1); padding-left: 12px; }
.tindex__n { font-family: var(--mono); font-size: 0.76rem; color: var(--text-faint); }
.tindex__body { display: block; min-width: 0; }
.tindex__name {
  display: block;
  font-family: var(--display);
  font-size: 1.14rem;
  font-weight: 500;
  letter-spacing: -0.014em;
  color: var(--text);
}
.tindex__blurb {
  display: block;
  margin-top: 6px;
  max-width: 76ch;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-dim);
}
.tindex__count {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .tindex__item a { grid-template-columns: 30px minmax(0,1fr); }
  .tindex__count { display: none; }
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 160ms ease-out;
}
.pager a:hover { color: var(--text); }
.pager__next { text-align: right; margin-left: auto; }

/* --- Entries -------------------------------------------------------------- */

.entries { display: grid; }
.entry {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--hairline-soft);
}
.entry:first-child { border-top: 0; }
.entry dt { font-family: var(--display); font-weight: 500; font-size: 1.04rem; letter-spacing: -0.012em; }
.entry dt .aka { display: block; margin-top: 5px; color: var(--text-faint); font-weight: 400; font-size: 0.8rem; font-family: var(--mono); }
.entry dd { font-size: 0.98rem; line-height: 1.6; color: var(--text); }
.entry dd > p + p { margin-top: 0.7em; }
.entry__context { color: var(--text-dim); }
.entry__see {
  display: block;
  margin-top: 0.85em;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-faint);
}
.entry__see a { text-decoration-color: rgb(255 255 255 / 0.22); }
@media (max-width: 760px) {
  .entry { grid-template-columns: 1fr; gap: 8px; }
}

/* --- Long-form article ---------------------------------------------------- */

.article-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
.rail { position: sticky; top: 32px; }
.rail dl { display: grid; gap: 16px; }
.rail dt { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--text-faint); margin-bottom: 3px; }
.rail dd { font-family: var(--display); font-size: 0.87rem; font-weight: 500; }
@media (max-width: 860px) {
  .article-shell { grid-template-columns: 1fr; }
  .rail { position: static; }
  .rail dl { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

.article { max-width: var(--measure); }
.article > * + * { margin-top: 1.15em; }
.article h1 { font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3.1rem); }
.article h2 { margin-top: 2.1em; }
.article h3 { margin-top: 1.7em; }
.article ul { margin-left: 1.1em; }
.article li { list-style: disc; margin-top: 0.45em; padding-left: 0.3em; }
.article li::marker { color: var(--text-faint); }

.definition {
  padding: 22px 26px;
  border-left: 2px solid var(--hairline);
  background-color: var(--glass-1);
  border-radius: 0 var(--r-panel) var(--r-panel) 0;
  font-size: 1.08em;
  line-height: 1.5;
}
.definition strong { color: var(--text); font-weight: 600; }

.callout { padding: 20px 24px; font-size: 0.95em; line-height: 1.58; }
.callout h3 { margin: 0 0 8px; }

.column-page { padding-block: clamp(16px, 3vw, 40px); }
.column-page .article { margin-inline: auto; }

.pullquote {
  margin-block: 2em;
  padding: 34px 34px 30px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem);
  line-height: 1.22;
  letter-spacing: -0.026em;
  text-wrap: balance;
}
.pullquote cite {
  display: block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-style: normal;
  color: var(--text-faint);
}

/* --- Figures, tables, semantics ------------------------------------------- */

figure.diagram {
  padding: 24px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-panel);
  background-color: var(--glass-1);
}
figure.diagram svg { width: 100%; height: auto; }
figure.diagram figcaption { margin-top: 16px; font-size: 0.85rem; line-height: 1.55; color: var(--text-faint); }

.svg-label { font-family: var(--mono); font-size: 10px; fill: var(--text-faint); }
.svg-value { font-family: var(--mono); font-size: 11px; fill: var(--text); }
.svg-line  { stroke: var(--hairline); stroke-width: 1; fill: none; }

.table-wrap { overflow-x: auto; }
table.spec { width: 100%; border-collapse: collapse; font-family: var(--display); font-size: 0.9rem; }
table.spec th, table.spec td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--hairline-soft); }
table.spec th { font-weight: 500; color: var(--text-dim); }
table.spec td.figure { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--r-chip);
  border: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.bid { color: var(--bid); }
.ask { color: var(--ask); }
.cell-bid { fill: var(--bid-fill); stroke: var(--bid); stroke-width: 1; }
.cell-ask { fill: var(--ask-fill); stroke: var(--ask); stroke-width: 1; }
.txt-bid { fill: var(--bid); }
.txt-ask { fill: var(--ask); }

/* --- Footer --------------------------------------------------------------- */

.foot {
  flex: none;
  border-top: 1px solid var(--hairline-soft);
  padding: 40px clamp(22px, 4vw, 60px) 56px;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.foot__inner {
  max-width: var(--doc);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.foot__note { max-width: 64ch; line-height: 1.6; text-wrap: pretty; }
.foot__rule { width: 44px; height: 1px; background-color: var(--hairline); border: 0; margin: 0; }
.foot__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 500;
}
.foot__links a { text-decoration: none; color: var(--text-dim); transition: color 160ms ease-out; }
.foot__links a:hover { color: var(--text); }
.foot__copy { font-size: 0.76rem; max-width: 56ch; line-height: 1.55; }

/* ==========================================================================
   Dashboard — a deliberately different language: instrument panel, not essay.
   Mono throughout, square corners, no glass, dot grid instead of footprint.
   Same palette, different world.
   ========================================================================== */

body.dash { color: var(--text); }
body.dash::before {
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23ffffff'/%3E%3C/svg%3E");
}

.dash-wrap {
  font-family: var(--mono);
  max-width: 1180px;
  margin-inline: auto;
}

.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.dash-head__left { display: flex; align-items: center; gap: 16px; }
.dash-tag { font-size: 0.68rem; letter-spacing: 0.18em; color: var(--text); }
.dash-tag--dim { color: var(--text-faint); letter-spacing: 0.12em; }
.dash-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  border: 1px solid var(--hairline-soft);
  padding: 3px 9px;
}
.dash-dot { width: 6px; height: 6px; background-color: var(--ask); display: inline-block; }

.dash-hero { padding-block: clamp(52px, 9vw, 110px) clamp(44px, 6vw, 72px); }
.dash-hero__label { font-size: 0.62rem; letter-spacing: 0.2em; color: var(--text-faint); }
.dash-hero__title {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 1rem + 7vw, 5.6rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-top: 16px;
  color: var(--text);
}
.dash-hero__body {
  font-family: var(--body);
  max-width: 60ch;
  margin-top: 26px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-dim);
}
.dash-hero__meta { margin-top: 22px; font-size: 0.62rem; letter-spacing: 0.14em; color: var(--text-faint); }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background-color: var(--hairline-soft);
  border: 1px solid var(--hairline-soft);
}
.dash-panel {
  background-color: var(--ink-raised);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  min-height: 190px;
}
.dash-panel__head {
  display: flex;
  gap: 12px;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--hairline-soft);
}
.dash-panel__body { flex: 1; display: grid; gap: 9px; align-content: center; padding-block: 18px; }
.dash-panel__body--fig { align-content: center; justify-items: start; gap: 8px; }
.dash-fig { font-size: 2rem; font-weight: 300; color: var(--text-faint); letter-spacing: 0.04em; }
.dash-fig__unit { font-size: 0.58rem; letter-spacing: 0.14em; color: var(--text-faint); }
.dash-panel__foot {
  font-family: var(--body);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-faint);
  padding-top: 12px;
  border-top: 1px dashed var(--hairline-soft);
}

.skel { height: 7px; background-color: rgb(255 255 255 / 0.06); }
.skel--w45 { width: 45%; } .skel--w50 { width: 50%; } .skel--w60 { width: 60%; }
.skel--w70 { width: 70%; } .skel--w80 { width: 80%; } .skel--w85 { width: 85%; } .skel--w90 { width: 90%; }

.dash-note {
  font-family: var(--body);
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-faint);
  max-width: 70ch;
}

/* --- Search (lives inside the drawer, so it only exists when the menu is open) */

.side__search { position: relative; margin-bottom: 18px; }

.side__search input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  border-radius: 9px;
  border: 1px solid var(--hairline-soft);
  background-color: rgb(255 255 255 / 0.04);
  color: var(--text);
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: -0.008em;
}
.side__search input::placeholder { color: var(--text-faint); }
.side__search input:focus {
  outline: none;
  border-color: var(--hairline);
  background-color: rgb(255 255 255 / 0.07);
}
.side__search input:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.side__search svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--text-faint);
  pointer-events: none;
}

.side__results { margin-top: 10px; display: grid; gap: 1px; }
.side__results:empty { display: none; }
.side__results a {
  display: block;
  padding: 9px 11px;
  border-radius: var(--r-chip);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.side__results a:hover, .side__results a:focus-visible {
  background-color: var(--glass-2);
  border-left-color: var(--text);
}
.side__results .r-title {
  display: block;
  font-family: var(--display);
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text);
}
.side__results .r-where {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.side__results .r-none {
  padding: 10px 11px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
}
.side__nav--dim { opacity: 0.25; pointer-events: none; }

/* --- Centred page headers ------------------------------------------------- */

.doc .ph { text-align: center; }
.doc .ph__intro { margin-inline: auto; }
.doc .ph__intro p { text-align: left; }
.doc .ph--tight .ph__intro { text-align: center; }
.doc .ph--tight .ph__intro span { display: inline-block; text-align: center; }

.doc .article > h1:first-child,
.doc .article > .article__lede { text-align: center; }
.doc .article > h1:first-child + .meta { text-align: center; }
.doc .column-page .article > h1 { text-align: center; }

.doc .tindex__head { text-align: center; }

/* --- Timeline ------------------------------------------------------------- */

.tl-figure {
  margin-top: clamp(30px, 4vw, 48px);
  padding: 26px 22px 20px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-panel);
  background-color: var(--glass-1);
  overflow-x: auto;
}
.tl-figure svg { min-width: 900px; width: 100%; height: auto; }

.tl-node { cursor: pointer; }
.tl-node circle.hit { fill: transparent; stroke: none; }
.tl-node circle.dot {
  fill: var(--ink);
  stroke: var(--text-dim);
  stroke-width: 1.5;
  transition: r 160ms ease-out, stroke 160ms ease-out, fill 160ms ease-out;
}
.tl-node:hover circle.dot, .tl-node.is-active circle.dot { fill: var(--text); stroke: var(--text); r: 6; }
.tl-node:focus { outline: none; }
.tl-node:focus-visible circle.dot { stroke: var(--text); r: 7; }
.tl-node text { font-family: var(--mono); font-size: 9.5px; fill: var(--text-faint); }
.tl-node:hover text, .tl-node.is-active text { fill: var(--text); }
.tl-stem { stroke: var(--hairline); stroke-width: 1; }
.tl-node.is-active .tl-stem, .tl-node:hover .tl-stem { stroke: var(--text-dim); }
.tl-axis { stroke: var(--hairline); stroke-width: 1; }

.tl-detail {
  margin-top: 20px;
  padding: 24px 26px;
  min-height: 150px;
}
.tl-detail__year {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}
.tl-detail__title {
  font-family: var(--display);
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 8px;
}
.tl-detail__body { margin-top: 12px; max-width: 72ch; color: var(--text-dim); line-height: 1.6; }
.tl-detail__link { margin-top: 14px; }

.tl-list { margin-top: 44px; }
.tl-list__item { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--hairline-soft); }
.tl-list__year { font-family: var(--mono); font-size: 0.8rem; color: var(--text-faint); }
.tl-list__title { font-family: var(--display); font-weight: 500; }
.tl-list__body { margin-top: 6px; font-size: 0.94rem; line-height: 1.55; color: var(--text-dim); }
.js .tl-list { display: none; }
@media (max-width: 640px) {
  .tl-list__item { grid-template-columns: 1fr; gap: 4px; }
}

/* --- Drawer head: close button lives inside, so nothing overlaps the logo --- */

.side__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}
.side__head .wordmark { margin-bottom: 0; padding-top: 0; }

.side__close {
  flex: none;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--hairline-soft);
  background-color: rgb(255 255 255 / 0.04);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 160ms ease-out, background-color 160ms ease-out;
}
.side__close svg { width: 15px; height: 15px; }
.side__close:hover { color: var(--text); background-color: rgb(255 255 255 / 0.09); }

/* the fixed hamburger steps aside once the drawer is open */
body.side-open .side-toggle { opacity: 0; pointer-events: none; }
.side-toggle { transition: opacity 180ms ease-out, background-color 180ms ease-out; }

.side__label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 12px;
  margin: 20px 0 8px;
  border-top: 1px solid var(--hairline-soft);
  padding-top: 18px;
}

/* --- Page mark: the emblem that sits above every heading ------------------ */

.pagemark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(24px, 3.5vw, 40px);
  color: var(--text);
}
.pagemark__emblem { width: 54px; height: 54px; }
.pagemark__name {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}
.pagemark__by {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.pagemark__by span { color: var(--text-dim); }
.pagemark__name + .pagemark__by { margin-top: -6px; }

.home .pagemark { margin-bottom: 22px; }
.home .pagemark__emblem { width: 62px; height: 62px; }

.dash .pagemark { display: none; }

/* ==========================================================================
   Motion. Everything below is opt-out: prefers-reduced-motion collapses all of
   it to the finished state, and none of it is required to read the site.
   ========================================================================== */

/* --- Page arrival --------------------------------------------------------- */

@keyframes pageIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

html.js:not(.intro-armed) body:not(.is-revealed) .pagemark,
html.js:not(.intro-armed) body:not(.is-revealed) .ph,
html.js:not(.intro-armed) body:not(.is-revealed) .article-shell,
html.js:not(.intro-armed) body:not(.is-revealed) .column-page,
html.js:not(.intro-armed) body:not(.is-revealed) .dash-wrap {
  animation: pageIn 700ms cubic-bezier(.2,.7,.3,1) both;
}
html.js:not(.intro-armed) body:not(.is-revealed) .ph { animation-delay: 90ms; }
html.js:not(.intro-armed) body:not(.is-revealed) .ph__body {
  animation: pageIn 760ms cubic-bezier(.2,.7,.3,1) 220ms both;
}
html.js:not(.intro-armed) body:not(.is-revealed) .foot {
  animation: pageIn 700ms cubic-bezier(.2,.7,.3,1) 320ms both;
}

/* --- Menu ----------------------------------------------------------------- */

.side__head, .side__search, .side__nav > * {
  opacity: 0;
  transform: translateX(-16px);
}
body.side-open .side__head,
body.side-open .side__search,
body.side-open .side__nav > * {
  opacity: 1;
  transform: none;
  transition: opacity 420ms ease-out, transform 520ms cubic-bezier(.2,.8,.3,1);
}
body.side-open .side__head   { transition-delay: 70ms; }
body.side-open .side__search { transition-delay: 130ms; }
body.side-open .side__nav > *:nth-child(1) { transition-delay: 170ms; }
body.side-open .side__nav > *:nth-child(2) { transition-delay: 205ms; }
body.side-open .side__nav > *:nth-child(3) { transition-delay: 240ms; }
body.side-open .side__nav > *:nth-child(4) { transition-delay: 275ms; }
body.side-open .side__nav > *:nth-child(5) { transition-delay: 310ms; }
body.side-open .side__nav > *:nth-child(6) { transition-delay: 345ms; }
body.side-open .side__nav > *:nth-child(7) { transition-delay: 375ms; }
body.side-open .side__nav > *:nth-child(8) { transition-delay: 405ms; }
body.side-open .side__nav > *:nth-child(9) { transition-delay: 430ms; }
body.side-open .side__nav > *:nth-child(n+10) { transition-delay: 455ms; }

.side__children { transition: none; }
.side__children a { transition: color 160ms ease-out, background-color 160ms ease-out; }

/* --- Intro ---------------------------------------------------------------- */

/* Hold the home page back at frame one so nothing flashes before the overlay
   exists. Only ever applied on a first visit, and removed by script. */
html.intro-armed body.home .pagemark,
html.intro-armed body.home .hero__title,
html.intro-armed body.home .hero__lede,
html.intro-armed body.home .curve-figure,
html.intro-armed body.home .pcard,
html.intro-armed body.home .home-note,
html.intro-armed .foot,
html.intro-armed .side-toggle { opacity: 0; }

html.intro-armed body.home .pagemark { opacity: 0 !important; }
body.intro-running { overflow: hidden; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.intro__veil {
  position: absolute;
  inset: 0;
  background-color: var(--ink);
  transition: opacity 620ms ease-out;
}
.intro__veil::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Cpath d='M0 .5h120M0 20.5h120M0 40.5h120'/%3E%3Cpath d='M.5 0v60M59.5 0v60M119.5 0v60'/%3E%3C/g%3E%3C/svg%3E");
}
.intro__stage {
  position: relative;
  display: grid;
  place-items: center;
  gap: 34px;
}
.intro__mark { will-change: transform; }
.intro__mark svg {
  width: min(46vmin, 340px);
  height: auto;
  color: var(--text);
  animation: introBreathe 2600ms ease-in-out infinite;
}
@keyframes introBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.018); }
}
.intro__word {
  display: grid;
  justify-items: center;
  gap: 8px;
  transition: opacity 320ms ease-out;
  animation: pageIn 700ms ease-out 200ms both;
}
.intro__name {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}
.intro__by {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Content arriving behind the travelling mark */
body.is-revealed .pagemark,
body.is-revealed .hero__title,
body.is-revealed .hero__lede,
body.is-revealed .curve-figure,
body.is-revealed .pcard,
body.is-revealed .home-note,
body.is-revealed .foot,
body.is-revealed .side-toggle {
  opacity: 1 !important;
  animation: pageIn 860ms cubic-bezier(.2,.7,.3,1) both;
  animation-delay: calc(var(--i, 0) * 110ms);
}
body.is-revealed.no-stagger .pagemark,
body.is-revealed.no-stagger .hero__title,
body.is-revealed.no-stagger .hero__lede,
body.is-revealed.no-stagger .curve-figure,
body.is-revealed.no-stagger .pcard,
body.is-revealed.no-stagger .home-note { animation: none; }

/* --- Consent dialog ------------------------------------------------------- */

body.consent-open { overflow: hidden; }

.consent {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 20px;
}
.consent__scrim {
  position: absolute;
  inset: 0;
  background-color: rgb(4 5 7 / 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 280ms ease-out;
}
.consent.is-in .consent__scrim { opacity: 1; }

.consent__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  padding: 34px 34px 30px;
  border-radius: var(--r-overlay);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 300ms ease-out, transform 380ms cubic-bezier(.2,.8,.3,1);
}
.consent.is-in .consent__panel { opacity: 1; transform: none; }

.consent__kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.consent__title {
  font-family: var(--display);
  font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  margin-top: 10px;
}
.consent__body { margin-top: 16px; font-size: 0.97rem; line-height: 1.6; color: var(--text-dim); }
.consent__body p + p, .consent__body ul { margin-top: 0.85em; }
.consent__body ul { margin-left: 1.05em; }
.consent__body li { list-style: disc; margin-top: 0.45em; padding-left: 0.25em; }
.consent__body li::marker { color: var(--text-faint); }
.consent__links { color: var(--text); }

.consent__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.consent__btn {
  flex: 1 1 auto;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid var(--hairline);
  background-color: rgb(255 255 255 / 0.05);
  color: var(--text-dim);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 180ms ease-out, color 180ms ease-out, transform 180ms ease-out;
}
.consent__btn:hover { background-color: rgb(255 255 255 / 0.1); color: var(--text); transform: translateY(-1px); }
.consent__btn--primary {
  background-color: var(--text);
  border-color: var(--text);
  color: var(--ink);
}
.consent__btn--primary:hover { background-color: #fff; color: var(--ink); }
.consent__foot { margin-top: 18px; font-size: 0.84rem; color: var(--text-faint); }

/* --- Agree bar on the terms page ----------------------------------------- */

.consent-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 120;
  width: min(720px, calc(100% - 32px));
  transform: translate(-50%, 24px);
  opacity: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 16px 20px;
  border-radius: var(--r-overlay);
  transition: opacity 320ms ease-out, transform 420ms cubic-bezier(.2,.8,.3,1);
}
.consent-bar.is-in { opacity: 1; transform: translate(-50%, 0); }
.consent-bar p { flex: 1 1 300px; font-size: 0.92rem; line-height: 1.5; color: var(--text-dim); }
.consent-bar .consent__btn { flex: 0 0 auto; }

/* --- Reduced motion: collapse everything to the finished state ------------ */

@media (prefers-reduced-motion: reduce) {
  html.js .main > main,
  html.js .foot,
  .intro__word,
  body.is-revealed .pagemark,
  body.is-revealed .hero__title,
  body.is-revealed .hero__lede,
  body.is-revealed .curve-figure,
  body.is-revealed .pcard,
  body.is-revealed .home-note { animation: none !important; opacity: 1 !important; }
  .intro__mark svg { animation: none; }
  .side__head, .side__search, .side__nav > * { opacity: 1; transform: none; }
  .consent__panel, .consent__scrim, .consent-bar { transition: none; }
}
