/* HIJP project page */

:root {
  color-scheme: light;
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f3f2ee;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #76756f;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --hijp: #2a78d6;
  --hijp-wash: rgba(42, 120, 214, 0.1);
  --cem: #eb6834;
  --lewm: #1baf7a;
  --other: #c3c2b7;
  --other-2: #dddcd5;
  --good: #0ca30c;
  --good-text: #006300;
  --bad: #d03b3b;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 8px 24px rgba(11, 11, 11, 0.05);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --math: "STIX Two Text", "STIX Two Math", "Cambria Math", "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232321;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #9a9992;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.1);
    --hijp: #3987e5;
    --hijp-wash: rgba(57, 135, 229, 0.14);
    --cem: #d95926;
    --lewm: #199e70;
    --other: #55544f;
    --other-2: #3a3a37;
    --good-text: #0ca30c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #232321;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --muted: #9a9992;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.1);
  --hijp: #3987e5;
  --hijp-wash: rgba(57, 135, 229, 0.14);
  --cem: #d95926;
  --lewm: #199e70;
  --other: #55544f;
  --other-2: #3a3a37;
  --good-text: #0ca30c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
a { color: var(--hijp); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--hijp); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 52px; }
.brand { font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.theme-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; display: grid; place-items: center;
}
.theme-btn svg { width: 16px; height: 16px; }
@media (max-width: 720px) { .nav-links { display: none; } .theme-btn { margin-left: auto; } }

/* ---------- hero ---------- */
.hero { padding: 64px 0 24px; text-align: center; }
.kicker {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--hijp); background: var(--hijp-wash); padding: 4px 12px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.025em;
  margin: 18px auto 0; max-width: 900px; font-weight: 750;
}
.authors { display: grid; justify-items: center; gap: 2px; margin-top: 22px; font-size: 17px; font-weight: 600; color: var(--ink); }
.author-row, .affil-row { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 26px; }
.author-row span { white-space: nowrap; }
.affil { display: grid; gap: 2px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.affil-row { column-gap: 24px; }
@media (max-width: 520px) {
  .authors { grid-template-columns: repeat(2, max-content); justify-content: center; column-gap: 20px; }
  .author-row { display: contents; }
}
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--bg); background: var(--ink);
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; opacity: 0.88; }
.btn svg { width: 16px; height: 16px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.hero-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 44px;
}
@media (max-width: 760px) { .hero-grid { grid-template-columns: repeat(2, 1fr); } }
.tile {
  position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2);
  aspect-ratio: 1; box-shadow: var(--shadow);
}
.tile video, .tile > img { width: 100%; height: 100%; object-fit: cover; }
.tile .tag {
  position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 600;
  background: rgba(11, 11, 11, 0.72); color: #fff; padding: 2px 8px; border-radius: 6px;
}
.tile .goal-inset {
  position: absolute; right: 8px; top: 8px; width: 28%; border-radius: 6px; overflow: hidden;
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.tile .goal-inset span {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; font-weight: 700;
  text-align: center; color: #fff; background: rgba(11, 11, 11, 0.65); line-height: 1.5;
}
.caption { font-size: 14px; color: var(--muted); margin-top: 12px; }
.hero .caption { text-align: center; }

/* ---------- sections ---------- */
section { padding: 72px 0 8px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hijp); }
h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 6px 0 12px; font-weight: 720; }
h3 { font-size: 19px; letter-spacing: -0.01em; margin: 0 0 4px; font-weight: 680; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 760px; margin: 0; }
p { margin: 0 0 12px; }
.prose { max-width: 780px; color: var(--ink-2); }
.prose strong { color: var(--ink); }

.tldr {
  margin-top: 40px; padding: 22px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 18px; line-height: 1.55;
}
.tldr b { color: var(--hijp); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px;
}
.stat .label { font-size: 13px; color: var(--ink-2); }
.stat .value { font-size: clamp(28px, 3.6vw, 38px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-top: 4px; }
.stat .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.card-head p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 620px; }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* segmented controls */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.seg button {
  border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; font-size: 13px;
  font-weight: 560; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.seg button:disabled { opacity: 0.4; cursor: default; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { background: var(--surface-2); }

/* legend */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.key-line { width: 20px; height: 0; border-top: 2px solid; display: inline-block; }
.key-line.dash { border-top-style: dashed; }
.key-line.dot { border-top-style: dotted; border-top-width: 3px; }
.key-box { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- explorer ---------- */
.explorer { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: stretch; }
@media (max-width: 860px) { .explorer { grid-template-columns: 1fr; } }
.explorer-plot { position: relative; min-height: 260px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.explorer-plot svg { width: 100%; height: auto; }
.explorer-side { display: flex; flex-direction: column; gap: 12px; }
.racer { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.racer .who { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.racer .num { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.1; }
.racer .num small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.racer .state { font-size: 13px; color: var(--ink-2); margin-top: 4px; min-height: 20px; display: flex; align-items: center; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; padding: 1px 8px; border-radius: 999px; }
.badge svg { width: 12px; height: 12px; }
.badge.ok { color: var(--good-text); background: color-mix(in srgb, var(--good) 14%, transparent); }
.badge.fail { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.scrub { display: flex; align-items: center; gap: 10px; }
.scrub input { flex: 1; min-width: 0; accent-color: var(--hijp); }
.scrub .icon-btn { flex: none; }
.scrub output { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }

/* ---------- method ---------- */
.panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .panels { grid-template-columns: 1fr; } }
.panel {
  text-align: left; border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  background: var(--surface); cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.panel:hover { border-color: color-mix(in srgb, var(--hijp) 45%, var(--border)); }
.panel[aria-pressed="true"] { border-color: var(--hijp); box-shadow: 0 0 0 3px var(--hijp-wash); }
.panels.has-active .panel[aria-pressed="false"] { opacity: 0.62; }
.panel .ptitle { font-weight: 680; font-size: 15px; display: flex; gap: 8px; align-items: baseline; }
.panel .ptitle i { font-style: normal; color: var(--muted); font-size: 13px; font-weight: 600; }
.panel svg { width: 100%; height: auto; margin: 6px 0 4px; }
.panel .eq { font-family: var(--math); font-size: 16px; line-height: 1.4; color: var(--ink-2); text-align: center; }

/* diagram */
.dg text { font-family: var(--font); fill: var(--ink); }
.dg .mod text, .dg .lat text, .dg .obs text, .dg .losslbl, .dg .lbl.it { font-family: var(--math); }
.dg .mod rect { fill: var(--surface-2); stroke: var(--axis); stroke-width: 1.2; transition: fill 0.25s, stroke 0.25s; }
.dg .mod text { font-size: 12.5px; font-weight: 600; font-style: italic; text-anchor: middle; dominant-baseline: central; }
.dg .mod text tspan[font-weight="500"] { font-family: var(--font); font-style: normal; }
.dg .lat rect { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.2; }
.dg .lat text { font-size: 12.5px; font-style: italic; text-anchor: middle; dominant-baseline: central; }
.dg .lat.sg rect { stroke-dasharray: 4 3; }
.dg .obs circle { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.2; }
.dg .obs text { font-size: 12px; font-style: italic; text-anchor: middle; dominant-baseline: central; }
.dg .act rect { fill: color-mix(in srgb, var(--cem) 16%, var(--surface)); stroke: var(--cem); stroke-width: 1.2; }
.dg .act.pred rect { fill: var(--hijp-wash); stroke: var(--hijp); }
.dg .lbl { font-size: 11.5px; fill: var(--ink-2); text-anchor: middle; }
.dg .lbl.it { font-style: italic; }
.dg .arrow { stroke: var(--ink-2); stroke-width: 1.3; fill: none; }
.dg .loss { stroke: var(--bad); stroke-width: 1.4; stroke-dasharray: 4 3; fill: none; }
.dg .losslbl { font-size: 12px; font-weight: 700; fill: var(--bad); }
.dg .grad-path { stroke: var(--hijp); stroke-width: 2; fill: none; stroke-dasharray: 5 5; opacity: 0; }
.panel[aria-pressed="true"] .dg .mod.grad rect { fill: var(--hijp-wash); stroke: var(--hijp); stroke-width: 2; }
.panel[aria-pressed="true"] .dg .grad-path { opacity: 1; animation: flow 0.9s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }
@media (prefers-reduced-motion: reduce) { .panel[aria-pressed="true"] .dg .grad-path { animation: none; } }

.explain {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: center;
}
@media (max-width: 700px) { .explain { grid-template-columns: 1fr; } }
.explain p { margin: 0; color: var(--ink-2); font-size: 15px; }
.explain .updates { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; font-size: 12.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  white-space: nowrap;
}
.chip.on { border-color: var(--hijp); color: var(--hijp); background: var(--hijp-wash); }
.chip.off { color: var(--muted); text-decoration: line-through; }
.joint { margin-top: 16px; text-align: center; font-family: var(--math); font-size: 16px; color: var(--ink-2); }
.joint b { color: var(--ink); font-weight: 600; }

/* hindsight window */
.window { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; margin-top: 8px; }
@media (max-width: 760px) { .window { grid-template-columns: repeat(8, 1fr); } }
.frame {
  position: relative; aspect-ratio: 1; border-radius: 6px; padding: 0; cursor: pointer;
  border: 1px solid var(--border); background-color: #fff; background-repeat: no-repeat;
  background-size: 1600% 100%; transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.frame:hover { transform: translateY(-2px); }
.frame .idx {
  position: absolute; left: 3px; top: 1px; font-size: 10px; font-weight: 600; color: #898781;
  font-variant-numeric: tabular-nums;
}
.frame.past { opacity: 0.35; }
.frame.valid { box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--hijp) 35%, transparent); }
.frame.anchor { box-shadow: 0 0 0 3px var(--hijp); }
.frame.goal { box-shadow: 0 0 0 3px var(--ink); }
.frame .flag {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 6px); font-size: 11px;
  font-weight: 700; white-space: nowrap; padding: 1px 6px; border-radius: 5px; color: #fff; pointer-events: none;
}
.frame.anchor .flag { background: var(--hijp); }
.frame.goal .flag { background: var(--ink); color: var(--bg); }
.hs-readout {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px;
}
@media (max-width: 760px) { .hs-readout { grid-template-columns: 1fr; } }
.hs-readout > div { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.hs-readout .k { font-size: 12.5px; color: var(--ink-2); }
.hs-readout .v { font-size: 20px; font-weight: 600; margin-top: 2px; }
.hs-readout #hsPair, .hs-readout .v .math { font-family: var(--math); font-weight: 500; }
.hs-readout .v .detail { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.hs-readout .v.small { font-size: 15px; }

/* planning loop */
.loop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin-top: 6px; }
.node {
  min-width: 52px; height: 40px; line-height: 37px; padding: 0 10px; border-radius: 10px; display: inline-block; text-align: center;
  border: 1.5px solid var(--axis); background: var(--surface); font-family: var(--math); font-style: italic; font-size: 15px;
  transition: border-color 0.25s, background 0.25s, opacity 0.25s, transform 0.25s;
}
.node.goal { border-color: var(--ink); font-weight: 600; }
.node.pending { opacity: 0.28; }
.node.live { border-color: var(--hijp); background: var(--hijp-wash); transform: translateY(-2px); }
.node.act { min-width: 40px; height: 30px; line-height: 27px; font-size: 13px; border-color: var(--hijp); color: var(--hijp); border-radius: 8px; }
.link { color: var(--muted); font-size: 13px; }
.loop-step { font-size: 14px; color: var(--ink-2); margin-top: 14px; min-height: 24px; }
.loop-step .math { font-family: var(--math); font-size: 16px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
@media (max-width: 700px) { .compare { grid-template-columns: 1fr; } }
.compare > div { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.compare .who { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.compare .big { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }
.compare .big small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.compare .how { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr; } }
.player { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1.1fr); gap: 12px; align-items: start; }
.player .main { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.player .main video { width: 100%; height: 100%; object-fit: cover; }
.player .goalbox { border-radius: 10px; overflow: hidden; border: 3px solid var(--ink); aspect-ratio: 1; }
.player .goalbox img { width: 100%; height: 100%; object-fit: cover; }
.goal-cap { font-size: 12px; font-weight: 700; margin-top: 6px; text-align: center; color: var(--ink); }
.goal-cap span { display: block; font-weight: 500; color: var(--muted); }
.gal-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 4px 0 10px; font-size: 14px; color: var(--ink-2); }
.gal-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.player-ctl { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); }
.ax text, .tick { font-size: 11.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.gridline { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.cat { font-size: 13px; fill: var(--ink-2); }
.chart .cat.math { font-family: var(--math); font-size: 14px; }
.cat.hl { fill: var(--ink); font-weight: 700; }
.val { font-size: 12px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.val.hl { fill: var(--ink); font-weight: 700; }
.grp { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; fill: var(--muted); }
.mark { transition: opacity 0.15s; }
.mark:hover, .mark.hover { opacity: 0.78; }
.mini-title { font-size: 13px; font-weight: 650; fill: var(--ink); }
.multiples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .multiples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .multiples { grid-template-columns: 1fr; } }
.chart-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .chart-grid-2 { grid-template-columns: minmax(0, 1fr); } }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none; opacity: 0; transition: opacity 0.12s;
  background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16); padding: 8px 10px; font-size: 12.5px; min-width: 120px;
}
.tooltip.show { opacity: 1; }
.tooltip .tt-title { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tooltip .tt-row span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tooltip .tt-row b { font-variant-numeric: tabular-nums; }

details.data { margin-top: 12px; font-size: 13px; }
details.data summary { cursor: pointer; color: var(--ink-2); font-weight: 600; width: fit-content; }
.table-scroll { overflow-x: auto; margin-top: 8px; }
table.dt { border-collapse: collapse; width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
table.dt th, table.dt td { padding: 5px 8px; text-align: right; border-bottom: 1px solid var(--grid); white-space: nowrap; }
table.dt th:first-child, table.dt td:first-child { text-align: left; }
table.dt th { color: var(--ink-2); font-weight: 650; }
table.dt th .math { font-family: var(--math); }
table.dt td.best { font-weight: 700; color: var(--ink); }
table.dt tr.hl td { background: var(--hijp-wash); }

/* ---------- footer ---------- */
footer { padding: 64px 0 48px; color: var(--muted); font-size: 13px; text-align: center; }
