/* BOTANIC-1 report Space. One stylesheet for every page.
   Identity: Living Models' palette (pale sage, near-black, neon lime as a fill),
   token cells for the wordmark (single-nucleotide tokens, the last one masked),
   and the dated phylogeny of the corpus as a medallion. Manrope for headings and
   controls, Spectral for reading, IBM Plex Mono for tokens, labels and numbers. */

:root {
  color-scheme: light;
  --paper: #f8f8f6;
  --paper-2: #eeefeb;
  --paper-3: #e2e4de;
  --card: #ffffff;
  --sage: #e2e9df;
  --sage-2: #d2ddcf;
  --ink: #0c110e;
  --ink-2: #48524b;
  --ink-3: #78827b;
  --rule: #d1d9cf;
  --rule-2: #b6c1b4;
  --lime: #d6f25c;
  --lime-2: #e6fb8f;
  --tip-accent: #d6f25c;
  --accent: #2b7a37;
  --accent-ink: #1f5f2a;
  /* Model family colours follow the report's figures. */
  --ours: #4caf3e;
  --ours-deep: #1b5e20;
  --ours-deeper: #0d3b0f;
  --ours-light: #7cb342;
  --ours-pale: #a5d6a7;
  --tree: #a4bd9f;
  --tree-2: #6f956a;
  --prior: #6e7f3c;
  --other: #b4bcb3;
  --other-ink: #6f7872;
  --plantcad: #a81616; --plantcad-2: #e05a4e; --plantcad-3: #f2afa6;
  --evo2: #2e8b84; --evo2-2: #5fbdb4; --evo2-3: #0f4c48;
  --carbon: #7a4f70; --carbon-2: #c08fb4;
  --ntv3: #d55e00; --ntv3-2: #e8a366;
  --gpn: #2f6db5; --agront: #8a6d3b;
  --baseline: #6e6e6e; --baseline-2: #9a9a9a;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 66ch;
  --page: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f1411; --paper-2: #171d19; --paper-3: #212823; --card: #141a16; --sage: #161d18; --sage-2: #1e2620;
    --ink: #e7ebe6; --ink-2: #b2bab3; --ink-3: #7e8880; --rule: #293029; --rule-2: #39423a;
    --lime: #c9ea4f; --lime-2: #566b1f; --tip-accent: #1f5f2a; --accent: #7cc46e; --accent-ink: #9ad48e;
    --ours: #6cc45c; --ours-deep: #a5d6a7; --ours-deeper: #c8e6c9; --ours-light: #4caf3e; --ours-pale: #2e7d32;
    --tree: #2f4a35; --tree-2: #558a5d; --prior: #9aaa6a; --other: #454d47; --other-ink: #8b948d;
    --plantcad: #e07a70; --plantcad-2: #f2afa6; --plantcad-3: #a81616;
    --evo2: #5fbdb4; --evo2-2: #8fd3cc; --evo2-3: #2e8b84; --carbon: #c08fb4; --carbon-2: #7a4f70;
    --ntv3: #f0955a; --ntv3-2: #d55e00; --gpn: #6fa0e0; --agront: #c2a27a; --baseline: #9a9a9a; --baseline-2: #6e6e6e;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1411; --paper-2: #171d19; --paper-3: #212823; --card: #141a16; --sage: #161d18; --sage-2: #1e2620;
  --ink: #e7ebe6; --ink-2: #b2bab3; --ink-3: #7e8880; --rule: #293029; --rule-2: #39423a;
  --lime: #c9ea4f; --lime-2: #566b1f; --tip-accent: #1f5f2a; --accent: #7cc46e; --accent-ink: #9ad48e;
  --ours: #6cc45c; --ours-deep: #a5d6a7; --ours-deeper: #c8e6c9; --ours-light: #4caf3e; --ours-pale: #2e7d32;
  --tree: #2f4a35; --tree-2: #558a5d; --prior: #9aaa6a; --other: #454d47; --other-ink: #8b948d;
  --plantcad: #e07a70; --plantcad-2: #f2afa6; --plantcad-3: #a81616;
  --evo2: #5fbdb4; --evo2-2: #8fd3cc; --evo2-3: #2e8b84; --carbon: #c08fb4; --carbon-2: #7a4f70;
  --ntv3: #f0955a; --ntv3-2: #d55e00; --gpn: #6fa0e0; --agront: #c2a27a; --baseline: #9a9a9a; --baseline-2: #6e6e6e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 17.5px; line-height: 1.6; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
img { max-width: 100%; display: block; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: 0.82em; background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 2px; }
pre { font-size: 13px; line-height: 1.55; background: var(--card); border: 1px solid var(--rule); padding: 16px 18px; overflow-x: auto; margin: 20px 0; border-radius: 6px; }
pre code { background: none; padding: 0; font-size: inherit; }
sup { font-size: 0.7em; line-height: 0; }
em, i { font-style: italic; }

/* ---- frame ---- */
.page { max-width: var(--page); margin: 0 auto; padding: 0 28px 80px; }
.page > main { padding-top: 40px; }

/* ---- top bar with the small lockup ---- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--sage) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.topbar .inner { max-width: var(--page); margin: 0 auto; padding: 10px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar .lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.topbar .lockup .wordmark { --cell: 22px; }
.topbar .lockup .org { display: flex; align-items: center; gap: 7px; font-family: var(--sans); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.topbar .living-models-mark { display: block; flex: 0 0 18px; width: 18px; height: 20px; }
.topbar nav { display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--sans); font-size: 14px; font-weight: 600; }
.topbar nav a { text-decoration: none; color: var(--ink-2); padding: 4px 0; border-bottom: 2.5px solid transparent; }
.topbar nav a:hover { color: var(--ink); }
.topbar nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--lime); }
.topbar nav a.ext::after { content: "↗"; font-size: 0.8em; margin-left: 4px; color: var(--ink-3); }

@media (max-width: 1100px) {
  .topbar .inner { flex-wrap: wrap; gap: 10px; }
  .topbar nav { gap: 8px 20px; }
}
@media (max-width: 640px) {
  .topbar .inner { padding: 10px 18px; }
  .topbar .lockup .wordmark { --cell: 18px; }
  .topbar .lockup .org { font-size: 12px; gap: 5px; }
  .topbar nav { font-size: 12px; gap: 4px 16px; }
}

/* ---- token cells ---- */
.wordmark { --cell: 64px; display: inline-flex; align-items: flex-end; gap: calc(var(--cell) * 0.09); user-select: none; }
.wordmark .cell {
  position: relative; width: var(--cell); height: var(--cell); display: grid; place-items: center;
  font-family: var(--sans); font-weight: 800; font-size: calc(var(--cell) * 0.6); line-height: 1; letter-spacing: -0.02em; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule-2); border-radius: calc(var(--cell) * 0.1);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.wordmark .cell.tok[data-state="masked"] { color: var(--ink-3); border-style: dashed; background: transparent; }
.wordmark .cell.tok[data-state="predicted"] { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.wordmark .cell .probs { position: absolute; left: 0; right: 0; bottom: calc(100% + 3px); height: calc(var(--cell) * 0.3); display: flex; align-items: flex-end; justify-content: center; gap: calc(var(--cell) * 0.05); opacity: 0; transition: opacity 0.35s ease; }
.wordmark .cell.tok[data-state="masked"] .probs, .wordmark .cell.tok[data-state="predicted"] .probs { opacity: 1; }
.wordmark .cell .probs i { display: block; width: calc(var(--cell) * 0.1); background: var(--paper-3); border-radius: 1px 1px 0 0; height: 22%; }
.wordmark .cell .probs i.top { background: var(--lime); height: 100%; }
.topbar .wordmark .probs { display: none; }

/* ---- hero: the medallion ---- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, var(--sage), var(--paper) 96%); }
.hero .inner { position: relative; max-width: var(--page); margin: 0 auto; padding: 30px 28px 40px; display: grid; justify-items: center; }
.medallion { position: relative; width: min(780px, 94vw); aspect-ratio: 1; display: grid; place-items: center; }
.medallion .hero-art { position: absolute; inset: 0; }
.medallion .hero-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hero-art .root-branch { fill: var(--tree-2); opacity: .65; transition: fill .2s ease, opacity .2s ease; }
.hero-art .root-branch.highlighted { fill: var(--accent); opacity: 1; }
.hero-art .root-tip { cursor: help; }
.hero-art .root-tip-marker { fill: var(--tree-2); stroke: var(--sage); stroke-width: .8; pointer-events: none; transition: fill .2s ease, r .2s ease; }
.hero-art .root-tip-hit { fill: transparent; }
.hero-art .root-tip:hover .root-tip-marker { fill: var(--lime); stroke: var(--accent); r: 4.2px; }
.hero-art .tree-label { font-family: var(--mono); font-size: 10.5px; fill: var(--ink-3); letter-spacing: 0.08em; }
.medallion .centre { position: relative; z-index: 2; text-align: center; padding: 44px 40px 40px; border-radius: 50%; background: radial-gradient(closest-side, var(--sage) 58%, color-mix(in srgb, var(--sage) 70%, transparent) 80%, transparent 100%); pointer-events: none; max-width: 100%; }
.medallion .centre > * { pointer-events: auto; }
.medallion .org { font-family: var(--sans); font-weight: 600; font-size: 13px; color: var(--ink-3); margin: 0; }
.medallion .wordmark { --cell: clamp(30px, 4.6vw, 58px); margin-top: 24px; }
.medallion .eyebrow { font-family: var(--sans); font-weight: 600; font-size: clamp(16px, 1.9vw, 21px); letter-spacing: -0.01em; line-height: 1.35; color: var(--ink-2); margin: 22px auto 0; max-width: 34ch; text-wrap: balance; }
.medallion .eyebrow b { color: var(--ink); font-weight: 600; }
.spec { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 26px 0 0; padding: 0; }
.spec div { display: grid; gap: 2px; text-align: left; }
.spec dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.spec dd { margin: 0; font-family: var(--sans); font-weight: 600; font-size: 14.5px; color: var(--ink); }
.spec dd b { font-weight: 600; background: linear-gradient(transparent 60%, var(--lime-2) 60%); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 0; }
.chips a { font-family: var(--sans); font-weight: 600; font-size: 13.5px; text-decoration: none; color: var(--ink); border: 1px solid var(--rule-2); background: var(--card); padding: 9px 16px; border-radius: 999px; }
.chips a:hover { background: var(--lime-2); border-color: var(--lime); }
.chips a.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips a.primary:hover { color: var(--lime); background: var(--ink); }
.chips a .ext { color: var(--ink-3); font-size: 0.85em; margin-left: 5px; font-weight: 500; }
@media (max-width: 720px) { .medallion .centre { padding: 20px 10px; } .spec { gap: 10px 18px; } }

/* ---- type ---- */
h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; font-family: var(--sans); font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 3.8vw, 42px); max-width: 30ch; }
h1 + .lede, h1 + p { margin-top: 16px !important; }
h2 { font-size: 28px; margin-top: 72px; margin-bottom: 16px; max-width: 36ch; }
h3 { font-size: 20px; margin-top: 44px; margin-bottom: 10px; max-width: 44ch; }
h4 { font-size: 17px; font-weight: 700; margin-top: 28px; margin-bottom: 6px; }
.kicker { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--rule-2); border-radius: 999px; padding: 4px 10px; margin: 0 0 14px; }
.prose p, .prose ul, .prose ol { max-width: var(--measure); margin: 0 0 18px; }
.page > .prose > :is(p:not(.kicker), ul, ol) { width: min(100%, 44rem); max-width: none; text-align: left; text-wrap: pretty; }
.prose li { margin-bottom: 6px; }
.lede { font-size: 20px; color: var(--ink-2); }
.small, .meta { font-family: var(--sans); font-size: 14px; color: var(--ink-2); }
.meta { max-width: 80ch; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.88em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 48px 0; }
.math { font-style: italic; }
.math sub, .math sup { font-style: normal; font-size: 0.7em; }

/* ---- title block ---- */
.titleblock { margin: 56px 0 8px; }
.titleblock .authors { font-family: var(--sans); font-size: 15.5px; margin: 18px 0 6px; max-width: 80ch; line-height: 1.6; }
.titleblock .authors sup { color: var(--ink-3); }
.titleblock .affil { font-family: var(--sans); font-size: 14px; color: var(--ink-2); margin: 0 0 6px; }
.titleblock .notes { font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); margin: 0; }

.card { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px 14px; margin: 26px 0; }
.card .cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.card .cardhead .label { color: var(--ink-2); }
.card .cardhead .small { color: var(--ink-3); font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }
.card svg { width: 100%; height: auto; display: block; font-family: var(--sans); }
.card svg text { font-size: 12px; }
.card .grid line { stroke: var(--rule); }
.card .axis text, .card .ann { fill: var(--ink-3); font-size: 11.5px; }
.card .lbl-2 { fill: var(--ink-2); font-size: 12px; }
.card .lbl { fill: var(--ink); font-size: 12.5px; }

/* ---- figures ---- */
figure { margin: 36px 0; }
figure.wide { max-width: var(--page); }
figure img { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 6px; background: #fff; padding: 6px; }
figcaption { font-family: var(--sans); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin-top: 12px; max-width: 92ch; }
figcaption b { color: var(--ink); }
.figlabel { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); background: var(--lime-2); padding: 2px 8px; border-radius: 999px; margin-right: 6px; }

/* Figure 1, live */
.fig1 { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 0 0 6px; overflow: hidden; }
.fig1 .panel { padding: 14px 22px 18px; border-top: 1px solid var(--rule); }
.fig1 .panel:first-child { border-top: 0; }
.fig1 .panelhead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.fig1 .panelhead .letter { font-family: var(--sans); font-weight: 800; font-size: 16px; color: var(--ink); }
.fig1 .panelhead .title { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.fig1 .panelhead .rule { flex: 1; height: 1px; background: var(--rule); }
.fig1 .panelhead .hint { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }
.fig1 svg { width: 100%; height: auto; display: block; font-family: var(--sans); }
.fig1 .axis text, .fig1 .ann { fill: var(--ink-3); font-size: 11.5px; }
.fig1 .axis line, .fig1 .axis path { stroke: var(--rule-2); }
.fig1 .grid line { stroke: var(--rule); }
.fig1 .lbl { fill: var(--ink); font-size: 12px; }
.fig1 .lbl-2 { fill: var(--ink-2); font-size: 11.5px; }
.fig1 .value { fill: var(--ink-2); font-family: var(--mono); font-size: 11px; }
svg .hit { fill: transparent; }
.fig1 a, .fig1 a text, .fig1 a:hover { text-decoration: none; color: inherit; }
.fig1 .train { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 22px; align-items: stretch; }
@media (max-width: 900px) { .fig1 .train { grid-template-columns: 1fr; } }
.fig1 .sub { font-family: var(--sans); font-size: 13px; color: var(--ink-2); margin: 0 0 6px; }
.fig1 .sub b { color: var(--ink); font-weight: 700; }
.fig1 .caption-inline { font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); margin: 6px 0 0; }
.fig1 .drawing { display: block; width: 100%; max-height: 310px; object-fit: contain; border: 0; background: #fff; border-radius: 6px; padding: 8px 10px; margin: 4px auto 0; }
.fig1 .mlm.live { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--rule); }
.mlm .legend .utr::before { display: none; }
.mlm .legend .utr { margin-left: auto; }
.mlm { position: relative; }
.mlm .seq { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; margin: 30px 0 4px; }
.mlm .base:nth-child(-n+24) { background: var(--paper-2); }
.mlm .base { position: relative; font-family: var(--mono); font-size: 14px; font-weight: 500; text-align: center; line-height: 30px; height: 30px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 3px; transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease; }
.mlm .base.masked { color: var(--ink-3); border-color: var(--ink-3); border-style: dashed; background: var(--card); }
.mlm .base.pred { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.mlm .base .probs { position: absolute; left: 0; right: 0; bottom: 100%; height: 22px; display: flex; align-items: flex-end; justify-content: center; gap: 1px; padding-bottom: 3px; opacity: 0; transition: opacity 0.3s ease; }
.mlm .base.pred .probs, .mlm .base.masked .probs { opacity: 1; }
.mlm .base .probs i { display: block; width: 3px; background: var(--paper-3); border-radius: 1px 1px 0 0; }
.mlm .base .probs i.top { background: var(--lime); }
.mlm .legend { display: flex; gap: 18px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; margin-top: 8px; }
.mlm .legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border: 1px solid var(--rule); vertical-align: -1px; margin-right: 6px; background: var(--paper); }
.mlm .legend .m::before { border-color: var(--ink-3); border-style: dashed; }
.mlm .legend .p::before { background: var(--lime); border-color: var(--lime); }
.regimes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .regimes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.regime { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: start; padding: 12px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); text-decoration: none; color: inherit; transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease; }
.regime:hover { border-color: var(--ink); background: var(--card); transform: translateY(-1px); }
.regime svg { width: 54px; height: 40px; display: block; }
.regime .t { font-family: var(--sans); font-weight: 700; font-size: 14px; color: var(--ink); margin: 0 0 3px; }
.regime .d { font-family: var(--sans); font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.4; }
.regime .n { font-family: var(--mono); font-size: 10.5px; color: var(--accent-ink); margin: 5px 0 0; }
.regime .g-fill { fill: var(--ours-deep); }
.regime .g-line { stroke: var(--ours-deep); fill: none; stroke-width: 1.5; }
.regime .g-pale { fill: var(--ours-pale); }
.regime .g-mute { fill: var(--rule-2); }
.regime .g-box { fill: var(--card); stroke: var(--ink-3); stroke-width: 1; }
.regime .g-text { font-family: var(--mono); font-size: 9px; fill: var(--ink); }
.ctx .task { cursor: default; }
.ctx .task circle, .ctx .task rect { transition: fill 0.4s ease, stroke 0.4s ease; }
.ctx .task text { fill: var(--ink-2); font-size: 12px; transition: fill 0.4s ease; }
.ctx .task.on text { fill: var(--ink); }
.ctx .sweep { fill: var(--lime); opacity: 0.35; }
.ctx .bracket { stroke: var(--ours-deep); stroke-width: 2.5; }
.ctx .bracket.ext { stroke-dasharray: 3 4; }
.ctx .bracket-label { font-family: var(--mono); font-size: 11.5px; fill: var(--ours-deep); letter-spacing: 0.06em; }
.rank .name { font-size: 11px; fill: var(--ink); }
.rank .params { font-family: var(--mono); font-size: 10px; fill: var(--ink-3); }
.rank .score { font-family: var(--mono); font-size: 11px; fill: var(--ink-2); }
.rank .chip { fill: #fff; stroke: var(--rule-2); stroke-width: 1; }

/* ---- tables ---- */
.tablewrap { overflow-x: auto; margin: 22px 0; }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 14px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
td.n, th.n { text-align: right; }
td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; }
tr.ours td { color: var(--ink); }
tr.ours td:first-child { font-weight: 700; }
tbody tr:hover td { background: var(--paper-2); }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--ink); }
th[data-sort].active { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 4px; }
caption { caption-side: bottom; text-align: left; font-size: 13.5px; color: var(--ink-2); padding: 10px 0 0; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }

/* ---- controls ---- */
.controls { display: flex; gap: 12px 28px; flex-wrap: wrap; align-items: center; font-family: var(--sans); font-size: 14px; margin: 26px 0 14px; }
.controls .group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.controls .label { margin-right: 2px; }
.seg { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg button { font-family: var(--sans); font-weight: 600; font-size: 13px; background: transparent; color: var(--ink-2); border: 0; border-right: 1px solid var(--rule-2); padding: 7px 13px; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--ink); background: var(--paper-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--lime); }
select, input[type="search"], input[type="text"] { font: inherit; font-family: var(--sans); font-size: 14px; color: var(--ink); background: var(--card); border: 1px solid var(--rule-2); border-radius: 999px; padding: 7px 12px; }
input[type="search"] { min-width: 250px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 18px; font-family: var(--sans); font-size: 14px; margin: 12px 0 20px; }
.checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 0; color: var(--ink-2); }
.checks label:hover { color: var(--ink); }
.checks input { accent-color: var(--ink); margin: 0; }
.checks .swatch { margin-right: 0; }
.checks .swatch.dashed { width: 12px; height: 3px; border-radius: 0; background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px); }

/* ---- charts ---- */
.chart { margin: 8px 0 8px; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px 10px; }
.chart svg { width: 100%; height: auto; display: block; font-family: var(--sans); }
.chart .grid line { stroke: var(--rule); stroke-width: 1; }
.chart .axis text { fill: var(--ink-3); font-size: 12px; }
.chart .axis line, .chart .axis path { stroke: var(--rule-2); }
.chart .rowlabel { fill: var(--ink); font-size: 13px; }
.chart .rowsub { fill: var(--ink-3); font-size: 11.5px; font-family: var(--mono); }
.chart .value { fill: var(--ink-2); font-family: var(--mono); font-size: 11.5px; }
.chart .marker text { fill: var(--ink-3); font-size: 11.5px; font-family: var(--mono); }
.chart .marker line { stroke: var(--rule-2); stroke-dasharray: 2 3; }
.chart .ptlabel { fill: var(--ink-2); font-size: 12px; }
.chart .ptlabel.ours { fill: var(--ink); font-weight: 600; }
.chart .leader { stroke: var(--ink-3); stroke-width: 1; }
.chart .family { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; opacity: 0.55; }
.scatter [data-family] { transition: opacity .15s ease, stroke-width .15s ease; }
.scatter .is-muted { opacity: .16; }
.scatter .family-line.is-family { opacity: 1; stroke-width: 3; }
.scatter .pt.is-family .point-dot { stroke: var(--ink); stroke-width: 2.5; }
.scatter .pt.is-family .ptlabel { fill: var(--ink); }
.scatter .pt { outline: none; }
.scatter .point-dot { pointer-events: none; }
.chart .whisker line { stroke: var(--ink); stroke-width: 1.4; pointer-events: none; }
.scatter .errbar { stroke-width: 1.6; opacity: .9; pointer-events: none; }
.scatter .pt.is-muted .errbar { opacity: .25; }
.tip .ci, .tip td.ci { color: var(--ink-3); font-size: .92em; }
.fig1 .whisker, .benchmark-ci { stroke: var(--ink); stroke-width: 1.4; pointer-events: none; }
.scatter .point-halo { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: 0; pointer-events: none; }
.scatter .pt:hover .point-halo, .scatter .pt:focus-visible .point-halo { opacity: 1; }
.chart .ann { fill: var(--ink-3); font-size: 11.5px; }
.chart .lbl { fill: var(--ink); font-size: 12.5px; }
.chart .lbl-2 { fill: var(--ink-2); font-size: 12px; }
.chart text { font-size: 12px; }
.chartnote { font-family: var(--sans); font-size: 13px; color: var(--ink-3); margin: 8px 0 0; max-width: 90ch; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }

.tip { position: fixed; z-index: 30; pointer-events: none; display: none; background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 13px; line-height: 1.45; padding: 8px 11px; border-radius: 6px; max-width: 320px; box-shadow: 0 2px 10px rgba(0,0,0,0.18); }
.tip b { font-weight: 700; color: var(--tip-accent); }
.tip table { font-size: 12.5px; margin-top: 4px; width: auto; }
.tip td, .tip th { padding: 1px 8px 1px 0; border: 0; color: inherit; text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 12.5px; }
.tip td.n { font-family: var(--mono); font-size: 12px; color: inherit; }

.heat td.cell { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px; text-align: right; padding: 6px 10px; border-bottom: 2px solid var(--paper); border-right: 2px solid var(--paper); }
.heat th { font-size: 10px; }
.heat th.fam { text-align: right; }
.heat td.name { white-space: nowrap; }
.heat .sub { color: var(--ink-3); font-size: 11.5px; margin-left: 6px; font-family: var(--mono); }

.scroller { max-height: 620px; overflow: auto; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
.scroller table { font-size: 13.5px; }
.scroller thead th { position: sticky; top: 0; background: var(--card); z-index: 1; }
.scroller td { padding: 6px 10px; }
.count { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em; }

.treemap { width: 100%; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 8px; }
.treemap svg { width: 100%; height: auto; display: block; font-family: var(--sans); }
.treemap .order-label { font-family: var(--mono); font-size: 11px; font-weight: 500; fill: var(--ink); }
.treemap .sp-label { font-size: 11px; fill: var(--ink); pointer-events: none; }
.treemap rect.sp { stroke: var(--card); stroke-width: 1; }
.treemap rect.order { fill: none; stroke: var(--card); stroke-width: 3; pointer-events: none; }
.treemap rect.sp.dim { opacity: 0.18; }
.legend { display: flex; gap: 14px; align-items: center; font-family: var(--sans); font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }
.legend .ramp { width: 160px; height: 10px; border-radius: 2px; }

.models-table td.name { white-space: nowrap; }
.note { font-family: var(--sans); font-size: 14px; color: var(--ink-2); border-left: 3px solid var(--lime); padding-left: 14px; max-width: 80ch; margin: 24px 0; }

.site-footer { margin-top: 80px; padding-top: 20px; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 13px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer p { margin: 0; max-width: 70ch; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .hero-art, .controls, .topbar { display: none; } }

/* ---- section figures: orchestration diagram, pipeline, ablations ---- */
.diagram { width: 100%; height: auto; display: block; font-family: var(--sans); }
.diagram .node rect { fill: var(--card); stroke: var(--ink-2); stroke-width: 1.2; transition: opacity 0.2s ease; }
.diagram .node.agent rect { fill: var(--lime-2); stroke: var(--ink); }
.diagram .node.cluster rect { fill: var(--paper-2); stroke: var(--rule-2); }
.diagram .node.team rect { fill: var(--card); stroke: var(--ink-3); stroke-dasharray: 4 3; }
.diagram .node .ntitle { font-weight: 700; font-size: 15px; fill: var(--ink); }
.diagram .node.team .ntitle { font-size: 12px; font-weight: 600; }
.diagram .node .nsub { font-size: 12px; fill: var(--ink-2); }
.diagram .node .nsub.team { fill: var(--ink-3); font-size: 11.5px; }
.diagram .queue rect { fill: var(--card); stroke: var(--ink-3); stroke-width: 1.2; }
.diagram .edgepath { fill: none; stroke: var(--ink-2); stroke-width: 1.5; transition: opacity 0.2s ease, stroke-width 0.2s ease; }
.diagram .edgepath.loop { stroke: var(--ink-3); }
.diagram .arrhead { fill: var(--ink-2); }
.diagram .edgelabel { font-size: 11.5px; fill: var(--ink-2); }
.diagram .edge.dim, .diagram .node.dim { opacity: 0.25; }
.diagram .edge.lit .edgepath { stroke: var(--ink); stroke-width: 2.4; }
.diagram .edge.lit .edgelabel { fill: var(--ink); font-weight: 600; }
.diagram .pulse { fill: var(--lime); stroke: var(--ink); stroke-width: 1.5; }
.diagram .node { cursor: default; }

.pipeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px 20px; font-family: var(--sans); }
@media (max-width: 900px) { .pipeline { grid-template-columns: 1fr; } }
.pipeline .col h4 { margin: 0 0 4px; font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
.pipeline .col h4 .letter { font-weight: 800; }
.pipeline .col .tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.pipeline .num { font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--ink); display: block; margin: 8px 0 2px; }
.pipeline .why { font-size: 12.5px; color: var(--ink-3); }
.pipeline ul { list-style: none; margin: 0 0 6px; padding: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.pipeline li { padding: 4px 0; border-top: 1px solid var(--rule); }
.pipeline li:first-child { border-top: 0; }
.pipeline li b { color: var(--ink); font-weight: 600; }
.pipeline .step { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; margin: 10px 0 4px; font-weight: 700; font-size: 13.5px; color: var(--ink); }
.pipeline .step .n { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--lime); font-family: var(--mono); font-size: 11px; display: grid; place-items: center; }
.pipeline .or { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ink-3); text-align: center; margin: 8px 0; }
.pipeline .bar { font-size: 13px; color: var(--ink-2); margin: 4px 0; padding: 6px 8px; background: var(--paper); border-radius: 4px; }
.weighting { display: grid; grid-template-columns: minmax(0, 560fr) minmax(0, 300fr); gap: 14px; margin-top: 10px; }
@media (max-width: 800px) { .weighting { grid-template-columns: 1fr; } }
.weighting svg { width: 100%; height: auto; display: block; font-family: var(--sans); }
.weighting .axis text, .weighting .ann, .figwrap .axis text, .figwrap .ann { fill: var(--ink-3); font-size: 11.5px; }
.weighting .axis line, .figwrap .axis line { stroke: var(--rule); }
.weighting .grid line, .figwrap .grid line { stroke: var(--rule); }
.figwrap { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px 10px; }
.figwrap svg { width: 100%; height: auto; display: block; font-family: var(--sans); }
.figwrap .lbl { fill: var(--ink); font-size: 12.5px; }
.figwrap .lbl-2 { fill: var(--ink-2); font-size: 12px; }
.figwrap .value { fill: var(--ink-2); font-family: var(--mono); font-size: 11px; }
.also { list-style: none; padding: 0; margin: 0; max-width: none !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.also li { margin: 0; border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; background: var(--card); font-family: var(--sans); font-size: 14.5px; line-height: 1.4; }
.also li a { text-decoration: none; font-weight: 600; }
.also li a:hover { text-decoration: underline; text-decoration-color: var(--lime); }
.also li .small { display: block; margin-top: 4px; }

/* authored figure with a hover layer on top */
.figstack { position: relative; background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 12px; }
.figstack img { display: block; width: 100%; height: auto; border: 0; background: transparent; }
.figstack svg.hotspots { position: absolute; left: 12px; top: 12px; width: calc(100% - 24px); height: calc(100% - 24px); overflow: visible; }
.figstack .hot { fill: transparent; stroke: transparent; stroke-width: 1.5; cursor: default; transition: stroke 0.15s ease; }
.figstack .hot:hover { stroke: var(--ink); fill: var(--lime); fill-opacity: 0.14; }
.figstack .dim { fill: #fff; opacity: 0.55; pointer-events: none; }
.figstack .pulse { fill: var(--lime); stroke: var(--ink); stroke-width: 1.2; pointer-events: none; }
