/* Deliberately single-theme: the brand is an instrument panel read in the dark.
     Every color is painted explicitly so the page holds on any host ground. */
  :root {
    color-scheme: dark;
    --ground: #0E1116;
    --surface: #151A21;
    --raised: #1B212A;
    --line: #2B3340;
    --line-soft: #222832;
    --ink: #D7DCE3;
    --ink-2: #A8B2BF;
    --muted: #8B95A3;
    --faint: #5C6675;
    --accent: #6CB6FF;
    --accent-lift: #9FD0FF;
    --accent-soft: rgba(108, 182, 255, 0.13);
    --accent-line: rgba(108, 182, 255, 0.45);
    /* The one warm note left: a measured fall, against the cool accent a rise
       is drawn in. Nothing else on the page is this colour. */
    --fall: #F0A04B;
    --bar: #3A4454;

    --f-display: "Chakra Petch", "Bahnschrift", "Arial Narrow", sans-serif;
    --f-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
    --f-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

    --s-1: 0.75rem;
    --s-2: 0.875rem;
    --s-3: 1rem;
    --s-4: 1.25rem;
    --s-5: 1.75rem;
    --s-6: clamp(2.1rem, 4.4vw, 3.4rem);
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--f-body);
    font-size: var(--s-3);
    line-height: 1.55;
    padding-inline: clamp(16px, 4vw, 48px);
    -webkit-font-smoothing: antialiased;
  }

  .wrap { max-width: 1180px; margin-inline: auto; }
  /* The table page earns more width than a reading page: nine columns compared
     side by side is the whole point of it, and a column pushed off the edge is
     a column nobody compares. */
  .wrap-wide { max-width: 1480px; }

  a { color: inherit; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

  .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
  .label {
    font-family: var(--f-mono);
    font-size: var(--s-1);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }

  /* ---------- header ---------- */
  .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 22px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
  }
  .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
  .brand svg { width: 64px; height: 28px; flex: none; }
  .wordmark {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
  }
  .nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
  .nav a {
    text-decoration: none;
    font-size: var(--s-2);
    color: var(--ink-2);
  }
  .nav a:hover { color: var(--ink); }
  /* The language chooser: a disclosure, not a row of codes, because the row
     stopped fitting at the fourth language. Closed it names the language being
     read; open it lists them all, each a link to this same page. */
  .lang { position: relative; font-family: var(--f-mono); font-size: var(--s-1); }
  .lang > summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-2);
    cursor: pointer;
    list-style: none;
  }
  .lang > summary::-webkit-details-marker { display: none; }
  .lang > summary::after { content: "\25BE"; color: var(--faint); }
  .lang > summary:hover { color: var(--ink); }
  .lang[open] > summary { color: var(--ink); border-color: var(--accent); }
  .lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 148px;
    padding: 4px;
    background: var(--ground);
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  .nav .lang-menu a {
    padding: 6px 10px;
    border-radius: 7px;
    color: var(--faint);
    font-size: var(--s-1);
    text-decoration: none;
  }
  .nav .lang-menu a:hover { color: var(--ink); background: var(--line); }
  .nav .lang-menu a[aria-current="page"] { background: var(--accent); color: var(--ground); font-weight: 500; }
  /* On a phone the menu wraps to its own row at the left, where a list hung
     from the right edge of the button would run off the screen. */
  @media (max-width: 767px) {
    .lang-menu { right: auto; left: 0; }
  }

  /* Wide screens keep the header in view as a slim strip, so the sections and
     the other language are one click away from anywhere on a long page. Not on
     phones: there the menu wraps to two rows and would hold a fifth of the
     screen for good. Jumps to a section stop below the strip, not under it. */
  @media (min-width: 768px) {
    .top {
      position: sticky;
      top: 0;
      z-index: 5;
      padding-block: 14px;
      background: rgba(14, 17, 22, 0.92);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }
    [id] { scroll-margin-top: 84px; }
    /* Below the strip that is holding the top of the screen, not under it. */
    .log-table th { top: 68px; }
  }

  .preview-note {
    display: flex;
    gap: 10px;
    align-items: baseline;
    flex-wrap: wrap;
    padding-block: 10px;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--s-1);
    color: var(--muted);
  }

  /* ---------- hero ---------- */
  /* One column: the cards that used to sit beside it were the densest thing
     on the page and said again what the table below says. */
  .hero { padding-block: clamp(36px, 5vw, 60px) clamp(24px, 3vw, 36px); }
  .eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
  .rec {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
  }
  @media (prefers-reduced-motion: no-preference) {
    .rec { animation: rec 2.4s ease-in-out infinite; }
    @keyframes rec { 50% { box-shadow: 0 0 0 7px rgba(108, 182, 255, 0.04); } }
  }
  h1 {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: var(--s-6);
    line-height: 1.04;
    letter-spacing: -0.01em;
    margin: 0 0 22px;
    text-wrap: balance;
  }
  h1 em { font-style: normal; color: var(--accent); }
  .lede {
    max-width: 52ch;
    color: var(--ink-2);
    font-size: 1.07rem;
    margin: 0 0 30px;
  }
  .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
  /* Quieter than the lede and set in the mono face: it is a reading about the
     log, not a sentence about the subject. */
  /* The choices above the rows. Quiet until chosen: a filter bar that shouts
     competes with the log it is there to narrow. */
  .filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
  .filters a {
    display: inline-flex; align-items: baseline; gap: 8px;
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: var(--s-2);
    color: var(--ink-2);
    text-decoration: none;
  }
  .filters a:hover { border-color: var(--accent-line); color: var(--ink); }
  .filters .filter-on { border-color: var(--accent-line); color: var(--ink); background: var(--accent-soft); }
  .filter-count { color: var(--muted); font-size: var(--s-1); }

  /* The coin box. Sized to a symbol rather than to the column: a field as wide
     as the page invites a sentence, and this one only ever takes a name. */
  .coin-search { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
  /* The completions under any field that names a datalist, drawn here rather
     than by the browser — see js/components/combobox.js for why. The frame
     class is set by that file on whatever contains the field; width and
     position come from the field itself, measured when the list opens. */
  .combobox-frame { position: relative; }
  .combobox-list {
    position: absolute;
    z-index: 20;
    margin: 0;
    padding: 4px;
    list-style: none;
    max-height: 17rem;
    overflow-y: auto;
    background: var(--ground);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  }
  .combobox-list[hidden] { display: none; }
  .combobox-option {
    padding: 6px 11px;
    border-radius: 7px;
    font-family: var(--f-mono);
    font-size: var(--s-2);
    color: var(--ink-2);
    cursor: pointer;
  }
  .combobox-option:hover,
  .combobox-option.is-active { background: var(--accent-soft); color: var(--ink); }
  .coin-search input {
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--f-mono);
    font-size: var(--s-2);
  }
  .coin-search input::placeholder { color: var(--faint); }
  .coin-search input:focus-visible,
  .coin-search button:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
  .coin-search button {
    padding: 7px 17px;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--ink);
    font-family: var(--f-body);
    font-size: var(--s-2);
    cursor: pointer;
  }
  .coin-search button:hover { background: var(--accent-line); color: var(--ground); }

  /* Read aloud, never drawn: the box's label, which the design carries in the
     placeholder and a screen reader cannot. */
  .visually-hidden {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap;
  }

  .record-summary {
    margin: 18px 0 0;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--muted);
  }
  .btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--f-mono);
    font-size: var(--s-2);
    text-decoration: none;
    padding: 11px 18px;
    border: 1px solid var(--accent-line);
    border-radius: 3px;
    color: var(--ink);
    background: var(--accent-soft);
  }
  .btn:hover { border-color: var(--accent); }
  .btn-quiet { border-color: var(--line); background: transparent; color: var(--ink-2); }
  .btn-quiet:hover { border-color: var(--muted); color: var(--ink); }

  /* the one lifted object on the page */
  .instrument {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 22px 22px 18px;
  }
  .inst-head {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    align-items: baseline;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--line);
    margin-bottom: 16px;
  }
  .inst-sym { font-family: var(--f-display); font-weight: 600; font-size: var(--s-4); }
  .inst-reading {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    margin-bottom: 6px;
  }
  .reading-num {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    line-height: 1;
    color: var(--accent);
  }
  .reading-txt { color: var(--ink-2); font-size: var(--s-2)}
  .chart-wrap { position: relative; }
  .chart-wrap svg { display: block; width: 100%; height: auto; }
  .inst-foot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    font-size: var(--s-1);
    color: var(--muted);
  }
  .inst-foot b { display: block; font-family: var(--f-mono); font-weight: 500; color: var(--ink); font-size: var(--s-2); }

  /* ---------- sections ---------- */
  section { padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
  .sec-head {
    display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap;
    margin-bottom: 28px;
  }
  h2 {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: var(--s-5);
    line-height: 1.15;
    margin: 6px 0 0;
    text-wrap: balance;
  }
  .sec-note { color: var(--muted); font-size: var(--s-2); margin: 0; }

  /* ---------- event log ---------- */
  .log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .event {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 250px 150px;
    gap: 24px;
    padding-block: 22px;
    border-bottom: 1px solid var(--line);
    align-items: start;
  }
  .ev-time { font-family: var(--f-mono); font-size: var(--s-2); color: var(--ink-2); line-height: 1.45; }
  .ev-time span { display: block; color: var(--muted); font-size: var(--s-1); }
  .ev-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
  .ev-sym { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; }
  a.ev-sym, .inst-sym a { color: inherit; text-decoration: none; }
  a.ev-sym:hover, .inst-sym a:hover { text-decoration: underline; text-decoration-color: var(--accent-line); }

  /* An event's own page. */
  .crumb { font-size: var(--s-1); color: var(--muted); margin: 28px 0 10px; }
  .crumb a { color: var(--ink-2); text-decoration: none; }
  .crumb a:hover { color: var(--ink); }
  .facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; font-size: var(--s-2); }
  .facts dt { color: var(--muted); }
  .facts dd { margin: 0; color: var(--ink); }
  .back { display: inline-block; margin-top: 8px; color: var(--ink-2); text-decoration: none; font-size: var(--s-2); }
  .back:hover { color: var(--ink); }

  /* The link from the home page's newest events to all of them, and the archive's pages. */
  .more { margin: 18px 0 0; font-size: var(--s-2); }
  .more a, .pager a { color: var(--ink-2); text-decoration: none; }
  .more a:hover, .pager a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-line); }
  .sec-head h1 {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: var(--s-5);
    line-height: 1.15;
    margin: 6px 0 0;
    text-wrap: balance;
  }
  .pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
    font-size: var(--s-2);
    color: var(--muted);
  }
  .pager a[rel="next"] { justify-self: end; }

  /* The operator's traffic page; plain rows, no chrome. */
  .stats { border-collapse: collapse; width: 100%; max-width: 640px; font-size: var(--s-2); }
  .stats th, .stats td { border-bottom: 1px solid var(--line); padding: 7px 0; text-align: left; }
  .stats th { font-weight: 400; color: var(--ink-2); word-break: break-all; }
  .stats td { font-family: var(--f-mono); text-align: right; color: var(--ink); width: 6em; }
  .chip {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 2px 7px;
    color: var(--ink-2);
  }
  .venue { font-size: var(--s-1); color: var(--muted); font-family: var(--f-mono); }
  .ev-desc { margin: 0; color: var(--ink-2); font-size: 0.95rem; max-width: 60ch; }
  .ev-desc strong { color: var(--ink); font-weight: 600; }
  .venues { display: block; margin: 4px 0 0; font-size: var(--s-1); color: var(--muted); }
  .ev-chart svg { display: block; width: 100%; height: auto; }
  .ev-chart .cap { font-size: 0.7rem; color: var(--muted); font-family: var(--f-mono); margin-top: 4px; }
  .follow { font-size: var(--s-1); color: var(--muted); display: grid; gap: 6px; }
  .state {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--f-mono); font-size: 0.72rem;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--ink-2);
  }
  .state i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--muted); display: inline-block; }
  .state.done i { background: var(--ink-2); border-color: var(--ink-2); }
  .follow .both { font-family: var(--f-mono); color: var(--ink-2); font-size: var(--s-1); line-height: 1.6; }

  /* ---------- the log as a table ---------- */
  /* Dense on purpose: this page is read by someone scanning a market, not
     someone reading prose. The row height, the mono figures and the quiet
     rules are all in service of comparing one row against the next. */
  .terminal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 26px;
  }
  .terminal-head h1 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin: 6px 0 0; }
  .terminal-head .coin-search { margin: 0; }

  .terminal-body { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 32px; align-items: start; }
  .terminal-main { min-width: 0; }

  /* The column of types. A link per type, the open one marked — not a row of
     checkboxes, because each type already has its own address. */
  .side-group { display: flex; flex-direction: column; gap: 2px; }
  .side-group .label { margin-bottom: 8px; }
  .side-group a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: var(--s-2);
    color: var(--ink-2);
    text-decoration: none;
  }
  .side-group a:hover { background: var(--line-soft); color: var(--ink); }
  .side-group a.on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
  .side-count { color: var(--muted); font-size: var(--s-1); }

  /* A narrow screen cannot hold nine columns, so the table scrolls sideways
     inside its own box rather than stretching the page. */
  .table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
  }
  .log-table { width: 100%; border-collapse: collapse; font-size: var(--s-2); }
  /* The column heads stay in view down a page of fifty rows — but below the
     site's own strip, not under it. The offset matches the one anchors jump
     to; on phones the strip does not stick, so neither does this. */
  .log-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 11px 12px;
    background: var(--raised);
    border-bottom: 1px solid var(--line);
    font-family: var(--f-mono);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    white-space: nowrap;
  }
  .log-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
  .log-table tbody tr:last-child td { border-bottom: 0; }
  .log-table tbody tr:hover { background: var(--line-soft); }
  /* Set by the script, so the hand only appears where a click does something. */
  .log-table tbody tr.is-openable { cursor: pointer; }
  .log-table tbody tr.is-openable a { cursor: pointer; }
  .log-table .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
  /* Figures right-aligned so the digits line up down the column and a reader
     compares magnitudes by their width alone. */
  .log-table th.col-fig, .log-table td.col-fig { text-align: right; }
  .col-num { color: var(--faint); font-size: var(--s-1); }
  .col-when { color: var(--ink-2); font-size: var(--s-1); }
  /* The row's identifier, so it carries weight — but not the accent, which on
     this page means something you can follow. Nothing here can be followed. */
  .col-coin { color: var(--ink); font-weight: 500; }
  .col-trigger { color: var(--ink-2); }
  /* The word carries its own explanation. Dotted rather than underlined, so it
     does not read as a link to somewhere. */
  .has-tip { border-bottom: 1px dotted var(--faint); cursor: help; }
  .log-table .rise { color: var(--accent-lift); }
  .log-table .fall { color: var(--fall); }
  .unmeasured { color: var(--faint); text-align: right; }

  /* The row's own number is the control that opens it: a real button, drawn to
     look like the figure it replaces until it is reached or hovered. */
  .row-toggle {
    appearance: none;
    padding: 2px 6px;
    margin: -2px -6px;
    border: 0;
    border-radius: 5px;
    background: none;
    color: inherit;
    font: inherit;
    font-family: var(--f-mono);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
  }
  .row-toggle:hover { color: var(--ink); background: var(--line); }
  .row-toggle[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
  .log-table tr.is-open > td { background: var(--line-soft); }

  .detail-row > td { padding: 0; background: var(--ground); white-space: normal; }
  /* Pinned to the left edge of the scrolling box, so a detail opened on a
     narrow screen stays where it can be read while the columns beside it
     scroll. Width is measured when the row opens: the table is wider than the
     screen there, and a detail inheriting that width would sit mostly off it. */
  .detail-pin { position: sticky; left: 0; }
  /* Shown by dropping display:none, which restarts the animation — so a row
     opened a second time from what was already fetched arrives the same way
     as the first. */
  @media (prefers-reduced-motion: no-preference) {
    .detail-row:not([hidden]) .event-detail,
    .detail-row:not([hidden]) .detail-state { animation: detail-in 160ms ease-out; }
    @keyframes detail-in {
      from { opacity: 0; transform: translateY(-4px); }
      to { opacity: 1; transform: none; }
    }
  }
  .event-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px 32px;
    padding: 20px 14px 24px;
  }
  .event-detail section { min-width: 0; }
  /* The reading runs the width of the row: it is the sentence the columns
     abbreviate, and breaking it into one of four narrow tracks would make it
     read as one more fact among the others. */
  .detail-reading {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 4px;
  }
  .detail-reading .reading-num {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--ink);
  }
  .detail-reading .reading-txt { color: var(--ink-2); font-size: var(--s-2)}
  .event-detail .label { margin-bottom: 8px; }
  .event-detail .facts { margin: 0; font-size: var(--s-2); }
  .event-detail .sec-note { font-size: var(--s-1); }
  .event-detail .venues { margin: 0; padding: 0; list-style: none; font-size: var(--s-1); color: var(--ink-2); }
  .event-detail .def { margin: 0 0 8px; font-size: var(--s-2); color: var(--ink-2); }
  .event-detail .base { font-size: var(--s-1); color: var(--muted); line-height: 1.5; }
  .event-detail .base b { display: block; color: var(--ink-2); font-weight: 500; }
  .detail-more {
    display: inline-block;
    margin-top: 10px;
    font-size: var(--s-1);
    color: var(--accent);
    text-decoration: none;
  }
  .detail-more:hover { color: var(--accent-lift); text-decoration: underline; }
  /* The time left, written where the three figures will go. Mono so it does
     not twitch as the digits change, quiet because it is a wait, not a
     reading. */
  .localtime { color: var(--muted); font-size: var(--s-1); margin-left: 6px; }
  .localtime:empty { display: none; }
  .watching { margin: 0; font-size: var(--s-2); color: var(--ink-2); }
  .countdown {
    margin-left: 8px;
    font-family: var(--f-mono);
    font-variant-numeric: tabular-nums;
    font-size: var(--s-1);
    color: var(--accent);
  }
  .countdown:empty { display: none; }
  .detail-state { margin: 0; padding: 18px 14px; font-size: var(--s-2); color: var(--muted); }
  .detail-failed { color: var(--fall); }
  .detail-failed a { color: var(--accent); }

  .table-note {
    margin: 14px 0 0;
    font-size: var(--s-1);
    color: var(--muted);
    line-height: 1.6;
  }

  /* ---------- what we measure ---------- */
  /* Two by two. Four types in three columns left the fourth alone on a row,
     and at four across the definitions broke every five words. No vertical
     rules: a sibling selector drawing them would also draw one down the left
     of the third card, which starts a row rather than continuing one. */
  .types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; border-top: 1px solid var(--line); }
  .type { padding: 26px 0; display: flex; flex-direction: column; gap: 14px; }
  .types > .type:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 26px; }
  h3 { font-family: var(--f-display); font-weight: 600; font-size: var(--s-4); margin: 0; }
  .def { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
  .formula {
    font-family: var(--f-mono); font-size: var(--s-1); color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-soft);
    padding: 10px 12px; border-radius: 3px; line-height: 1.6;
  }
  .two {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
    margin-top: auto;
  }
  .two div { border-top: 1px solid var(--line); padding-top: 10px; }
  .two .k { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .two .v { font-family: var(--f-display); font-weight: 600; font-size: 1.35rem; color: var(--ink); line-height: 1.2; }
  .two .s { font-size: 0.78rem; color: var(--muted); }
  .base { font-size: 0.8rem; color: var(--muted); }
  /* The arithmetic and the venue list, for whoever wants to check rather than
     read. Closed by default: a formula on the front page is the opposite of
     the plain sentence above it. */
  .type-more { margin-top: auto; }
  .type-more > summary {
    cursor: pointer;
    font-family: var(--f-mono);
    font-size: var(--s-1);
    color: var(--accent);
    list-style: none;
  }
  .type-more > summary::-webkit-details-marker { display: none; }
  .type-more > summary::before { content: "+ "; }
  .type-more[open] > summary::before { content: "\2212 "; }
  .type-more > summary:hover { color: var(--accent-lift); }
  .type-more > * + * { margin-top: 12px; }

  /* One finished record, in a sentence, above a table whose newest rows have
     no next day yet. */
  .example-line { margin: 0 0 14px; font-size: var(--s-2); color: var(--ink-2); max-width: 90ch; }

  /* Four small adjustments that used to be style attributes on the elements
     themselves. They are here so the site can promise a content policy with no
     'unsafe-inline' in it: a page that allows inline style allows injected
     style, and the promise would be worth less than the sentence saying it. */
  .flush { margin: 0; }
  .sec-first { border-top: 0; padding-top: 0; }
  .sec-loose { padding-top: 28px; }
  .note-small { font-size: 0.8rem; color: var(--muted); }
  .label-strong { color: var(--ink-2); }

  .base b { color: var(--ink-2); font-weight: 500; font-family: var(--f-mono); }

  /* Where a card's numbers were measured, and what is actually watched. Kept
     visible rather than in a footnote: the two differ, and a reader should not
     have to hunt for that. */
  .source {
    display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px;
    margin: 0; padding-top: 10px; border-top: 1px dashed var(--line);
    font-size: 0.78rem;
  }
  .source dt { font-family: var(--f-mono); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.68rem; padding-top: 2px; }
  .source dd { margin: 0; color: var(--ink-2); }

  /* ---------- method ---------- */
  /* Three across, two rows. Six steps laid out by auto-fit spread into one
     long row on a wide screen, which reads as a list of labels rather than as
     six things worth a sentence each. */
  .method { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px; }
  .method div { border-left: 2px solid var(--line); padding-left: 16px; }
  .method h4 { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; margin: 0 0 6px; }
  .method p { margin: 0; color: var(--ink-2); font-size: 0.93rem; }

  /* ---------- disclaimer ---------- */
  .disclaimer {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 26px 28px;
  }
  .disclaimer p { margin: 0; max-width: 72ch; color: var(--ink-2); font-size: 0.95rem; }
  .disclaimer p + p { margin-top: 10px; }

  .foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
  .foot-links a { color: var(--muted); text-decoration: none; }
  .foot-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-line); }

  /* A standing page: one column of text, at a width that reads. */
  .doc { max-width: 72ch; padding-block: 8px 24px; }
  .doc h1 { font-family: var(--f-display); font-weight: 600; font-size: var(--s-5); margin: 0 0 18px; }
  .doc h2 { font-size: var(--s-4); margin: 28px 0 8px; }
  .doc p { color: var(--ink-2); margin: 0 0 12px; }
  .doc a { color: var(--ink); text-decoration-color: var(--accent-line); }
  .doc code { font-family: var(--f-mono); font-size: 0.9em; color: var(--ink); }
  .doc-date { color: var(--muted); font-size: var(--s-1); font-family: var(--f-mono); }
  .doc .facts { margin-bottom: 20px; }

  footer {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding-block: 28px 40px;
    font-size: var(--s-1); color: var(--muted); font-family: var(--f-mono);
  }

  /* ---------- tooltip ---------- */
  .tip[hidden] { display: none; }
  .tip {
    position: fixed; z-index: 10; pointer-events: none;
    background: var(--raised); border: 1px solid var(--line);
    color: var(--ink); font-family: var(--f-mono); font-size: 0.75rem;
    padding: 7px 10px; border-radius: 3px; line-height: 1.45;
    max-width: 240px;
  }
  .tip b { color: var(--ink); font-weight: 500; }
  .tip span { color: var(--muted); display: block; }

  svg text { font-family: var(--f-mono); }

  /* ---------- responsive ---------- */
  @media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; }
    /* The type column becomes a row of chips above the table: a sidebar at this
       width leaves the table too narrow to compare anything in. */
    .terminal-body { grid-template-columns: 1fr; gap: 20px; }
    .side-group { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .side-group .label { flex-basis: 100%; margin-bottom: 0; }
    .side-group a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
    .event { grid-template-columns: 130px minmax(0, 1fr); }
    .ev-chart { grid-column: 2; }
    .follow { grid-column: 2; }
    .types { grid-template-columns: 1fr; }
    .method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .type { padding: 24px 0; }
    .types > .type + .type { border-top: 1px solid var(--line); }
  }
  @media (max-width: 600px) {
    .terminal-head { align-items: flex-start; }
    .event { grid-template-columns: 1fr; gap: 12px; }
    .ev-chart, .follow { grid-column: 1; }
    .method { grid-template-columns: 1fr; }
    .disclaimer { grid-template-columns: 1fr; gap: 10px; }
    .nav { gap: 16px; }
    .inst-foot { grid-template-columns: 1fr; }
  }
