/* ==========================================================================
   ROBUST-TAMP project page
   ========================================================================== */
:root {
  --ink: #17181a;
  --ink-2: #35373b;
  --muted: #72757b;
  --line: #e4e4e1;
  --line-2: #c9c9c4;
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --bg-ours: #eef6f9;

  --if: #cf5f2a;
  --when: #2b7a99;
  --where: #8b4a85;
  --ours: #2e7d9a;

  --ok: #1f7a35;
  --ok-bg: #e6f4e9;
  --ok-bd: rgba(31, 122, 53, .35);
  --bad: #c62828;
  --bad-bg: #fdeceb;
  --bad-bd: rgba(198, 40, 40, .35);

  --max: 1120px;
  --text: 760px;
  --head: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.62; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: currentColor; }
img, video { max-width: 100%; display: block; }
em { font-style: italic; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.prose { max-width: var(--text); }
.prose p { margin: 0 0 14px; text-wrap: pretty; }

/* ---------- sticky nav ---------- */
nav.top { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
nav.top .wrap { display: flex; align-items: center; gap: 22px; height: 56px; }
nav.top .brand { font-family: var(--head); font-size: 14px; font-weight: 700; letter-spacing: .2em; margin-right: auto;
  color: var(--ink); text-decoration: none; }
nav.top a.link { color: var(--muted); font-size: 14px; text-decoration: none; transition: color .15s; }
nav.top a.link:hover, nav.top a.link.active { color: var(--ink); }
@media (max-width: 900px) { nav.top a.link { display: none; } }

/* ---------- left table of contents (wide screens) ---------- */
.toc { display: none; }
@media (min-width: 1500px) {
  .toc { display: block; position: fixed; top: 120px; left: calc((100vw - var(--max)) / 2 - 170px); width: 160px; z-index: 40; }
  nav.top a.link { display: none; }
}
.toc-hd { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted);
  font-size: 13.5px; line-height: 1.35; text-decoration: none; transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--ours); }

/* ---------- hero ---------- */
header.hero { padding: 70px 0 30px; text-align: center; }
.kicker { font-family: var(--head); font-size: 15px; font-weight: 700; letter-spacing: .24em; color: #86867f; }
h1.title { font-family: var(--head); font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; line-height: 1.14;
  letter-spacing: -.02em; margin: 16px auto 20px; max-width: 980px; text-wrap: balance; }
h1.title .accent-if { color: var(--if); } h1.title .accent-when { color: var(--when); } h1.title .accent-where { color: var(--where); }
.anon { font-size: 18px; color: var(--ink-2); }
.anon small { display: block; font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; font-family: var(--head); font-size: 19px;
  font-weight: 600; color: var(--ink); }
.authors sup, .affils sup, .corresp sup { font-size: .62em; margin-left: 1px; }
.affils { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 22px; margin-top: 8px; font-size: 15.5px; color: var(--ink-2); }
.corresp { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 40px; margin-top: 20px; }
.logos img { display: block; height: 52px; width: auto; }
.logos img.cstar { height: 62px; }
.logos a { opacity: .92; transition: opacity .15s; }
.logos a:hover { opacity: 1; }
.corresp a { color: inherit; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 26px 0 0; }
.btn { display: inline-flex; align-items: center; gap: 9px; font-family: var(--head); font-size: 15.5px; font-weight: 700;
  color: #fff; background: var(--ink); padding: 11px 22px; border-radius: 999px; text-decoration: none; border: 2px solid var(--ink);
  transition: background .15s, color .15s, transform .15s; }
.btn:hover { background: var(--ours); border-color: var(--ours); transform: translateY(-1px); }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.soon { background: #fff; color: var(--muted); border-color: var(--line-2); cursor: default; }
.btn.soon:hover { transform: none; background: #fff; color: var(--muted); border-color: var(--line-2); }
.btn svg { width: 16px; height: 16px; }
.btn .tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; opacity: .8; }

/* ---------- stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 44px auto 0; max-width: 980px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 20px 12px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .num { font-family: var(--head); font-size: 36px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.stat .num .unit { font-size: 22px; margin-left: 1px; }
.stat .lab { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.35; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- teaser ---------- */
.teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 40px auto 0; }
.teaser figure { margin: 0; }
.teaser .vid { position: relative; border-radius: 10px; overflow: hidden; background: #202328; aspect-ratio: 16 / 9;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 28px rgba(0, 0, 0, .08); }
.teaser video { width: 100%; height: 100%; object-fit: cover; }
.teaser figcaption { font-size: 14.5px; color: var(--ink-2); margin-top: 10px; text-align: left; }
.teaser figcaption b { font-family: var(--head); }
.chip-tag { position: absolute; left: 12px; top: 12px; font-family: var(--head); font-size: 12.5px; font-weight: 700; letter-spacing: .06em;
  color: #fff; background: rgba(20, 20, 20, .72); padding: 4px 10px; border-radius: 6px; }
.speed-tag { position: absolute; right: 12px; top: 12px; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(20, 20, 20, .72);
  padding: 3px 9px; border-radius: 6px; }
@media (max-width: 760px) { .teaser { grid-template-columns: 1fr; } }

/* ---------- sections ---------- */
section.block { padding: 76px 0 0; }
.sec-hd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; border-bottom: 3px solid var(--ink);
  padding-bottom: 10px; margin-bottom: 26px; }
.sec-hd h2 { margin: 0; font-family: var(--head); font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.sec-hd .sub { font-family: var(--head); font-style: italic; font-weight: 500; font-size: 18px; color: #86867f; }
.sec-hd .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
h3.h3 { font-family: var(--head); font-size: 21px; font-weight: 700; margin: 40px 0 12px; letter-spacing: -.005em; }
.lead { font-size: 19px; line-height: 1.6; color: var(--ink); }
.muted { color: var(--muted); }
.note { font-size: 14px; color: var(--muted); line-height: 1.5; }
.pill-btn { font-family: var(--head); font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--ink); background: #fff;
  border: 2px solid var(--ink); border-radius: 999px; padding: 6px 15px; cursor: pointer; transition: background .15s, color .15s; }
.pill-btn:hover, .pill-btn.on { background: var(--ink); color: #fff; }
.pill-btn:disabled { opacity: .4; cursor: default; }

/* hidden for the scroll reveal only when the page script runs (html.js); visible otherwise */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

figure.fig { margin: 0; }
figure.fig img { width: 100%; border-radius: 6px; }
figure.fig figcaption { font-size: 14.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.two-col { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- IF / WHEN / WHERE cards ---------- */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px 18px; background: #fff; position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--c, var(--ink)); }
.card .badge { display: inline-block; font-family: var(--head); font-size: 13px; font-weight: 700; letter-spacing: .1em; color: #fff;
  background: var(--c); padding: 3px 9px; border-radius: 5px; }
.card h4 { font-family: var(--head); font-size: 18px; margin: 12px 0 8px; }
.card p { font-size: 15.5px; color: var(--ink-2); margin: 0; line-height: 1.55; }
@media (max-width: 900px) { .trio { grid-template-columns: 1fr; } }

/* ---------- animations (pre-rendered videos) ---------- */
.anim-box { position: relative; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.anim-box video { width: 100%; display: block; background: #fff; }
.anim-progress { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--ours); width: 0; transition: width .1s linear; }

/* ---------- decision game ---------- */
.game { border: 1px solid var(--line-2); background: var(--bg-soft); border-radius: 14px; padding: 26px 28px 24px; }
.game-hd { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 20px; }
.game-kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.game-title { font-family: var(--head); font-size: 22px; font-weight: 700; margin: 4px 0 0; }
.game-score { font-family: var(--head); font-size: 15px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.game-body { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; margin-top: 20px; align-items: start; }
.game-scene { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; background: #202328; }
.game-scene img { width: 100%; height: 100%; object-fit: cover; transition: opacity .5s; }
.game-scene .after { position: absolute; inset: 0; opacity: 0; }
.game-scene.revealed .after { opacity: 1; }
.game-scene .vlabel { position: absolute; left: 12px; top: 12px; font-family: var(--head); font-weight: 700; font-size: 14px; color: #fff;
  background: rgba(20, 20, 20, .75); padding: 3px 10px; border-radius: 6px; }
.game-q .step { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.game-q .disc { font-size: 17px; margin: 8px 0 6px; line-height: 1.5; }
.game-q .ask { font-family: var(--head); font-weight: 700; font-size: 17px; margin: 14px 0 12px; }
.opts { display: flex; flex-direction: column; gap: 9px; }
.opt { text-align: left; font-family: var(--font); font-size: 15.5px; padding: 11px 15px; border: 1.5px solid var(--line-2); background: #fff;
  border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; color: var(--ink); }
.opt:hover:not(:disabled) { border-color: var(--ink); transform: translateX(2px); }
.opt b { font-family: var(--head); }
.opt.correct { border-color: var(--ok); background: var(--ok-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt:disabled { cursor: default; }
.feedback { margin-top: 14px; font-size: 15px; line-height: 1.55; padding: 12px 14px; border-radius: 10px; background: #fff;
  border-left: 4px solid var(--c, var(--ours)); display: none; }
.feedback.show { display: block; animation: fadeUp .35s ease; }
.feedback .stats-line { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.game-nav { display: flex; gap: 10px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.dots { display: flex; gap: 6px; margin-left: auto; }
.dots i { width: 10px; height: 10px; border-radius: 5px; background: var(--line-2); display: block; }
.dots i.cur { background: var(--ink); } .dots i.ok { background: var(--ok); } .dots i.bad { background: var(--bad); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .game-body { grid-template-columns: 1fr; } }

/* ---------- variant catalogue ---------- */
.domain-hd { display: flex; align-items: baseline; gap: 12px; margin: 30px 0 14px; }
.domain-hd h3 { font-family: var(--head); font-size: 20px; margin: 0; }
.domain-hd span { color: var(--muted); font-size: 15px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.vcard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer;
  transition: transform .2s, box-shadow .2s; }
.vcard:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0, 0, 0, .1); }
.vcard .img { position: relative; aspect-ratio: 16 / 9; background: #202328; }
.vcard .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s; }
.vcard .img img.last { opacity: 0; }
.vcard:hover .img img.last { opacity: 1; }
.vcard .img .hint { position: absolute; right: 8px; bottom: 8px; font-size: 11.5px; color: #fff; background: rgba(20, 20, 20, .7);
  padding: 2px 8px; border-radius: 5px; opacity: 0; transition: opacity .3s; }
.vcard:hover .img .hint { opacity: 1; }
.vcard .body { padding: 12px 14px 14px; }
.vcard .vid { font-family: var(--head); font-size: 20px; font-weight: 700; }
.vcard .grp { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.vcard .desc { font-size: 14.5px; color: var(--ink-2); margin: 4px 0 10px; line-height: 1.45; min-height: 42px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tg { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 5px; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }
.tg.u { background: #fbeee6; color: var(--if); border-color: rgba(207, 95, 42, .3); }
.tg.d { background: #f3ebf2; color: var(--where); border-color: rgba(139, 74, 133, .3); }
.tg.n { color: var(--muted); }

/* ---------- comparison player ---------- */
.cmp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.vchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vchips .grp-lab { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 4px 0 2px; }
.vchips .sep { width: 1px; height: 26px; background: var(--line-2); margin: 0 8px; }
.vchip { font-family: var(--head); font-weight: 600; font-size: 14px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line-2);
  background: #fff; cursor: pointer; position: relative; transition: background .15s, color .15s; color: var(--ink); }
.vchip:hover { border-color: var(--ink); }
.vchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.vchip .mini { display: flex; gap: 2px; justify-content: center; margin-top: 3px; }
.vchip .mini i { width: 5px; height: 5px; border-radius: 3px; display: block; }
.cmp-ctrl { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.ibtn { width: 38px; height: 38px; border-radius: 19px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); transition: border-color .15s, background .15s; }
.ibtn:hover { border-color: var(--ink); }
.ibtn svg { width: 16px; height: 16px; }
.toggle { font-size: 13.5px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--ours); }
select.speed { font-family: var(--font); font-size: 13.5px; border: 1.5px solid var(--line-2); border-radius: 8px; padding: 6px 8px; background: #fff; }

.cmp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile .tname { display: flex; align-items: center; gap: 9px; font-family: var(--head); font-weight: 700; font-size: 16px; margin-bottom: 7px; }
.tile .tname i { width: 13px; height: 13px; border-radius: 3px; display: block; }
.tile .screen { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: #202328;
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .3s; }
.tile .reel { position: absolute; inset: 0; }
.tile .reel.out { animation: reelOut .45s cubic-bezier(.55, 0, .8, .4) forwards; }
.tile .reel.in { animation: reelIn .6s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes reelOut { to { transform: translateY(-100%); filter: blur(8px); } }
@keyframes reelIn { from { transform: translateY(100%); filter: blur(8px); } to { transform: none; filter: none; } }
.tile video { width: 100%; height: 100%; object-fit: cover; transition: filter .45s, transform .45s; }
.tile .tint { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .45s; }
.tile .verdict { position: absolute; opacity: 0; transition: opacity .45s, transform .45s; transform: translateY(6px); }
.tile.done .tint, .tile.done.ok .verdict.okv, .tile.done.bad .verdict.badv { opacity: 1; transform: none; }
.tile.done.bad video { filter: blur(6px); transform: scale(1.05); }
.tile.done.bad .tint { background: rgba(214, 40, 40, .17); }
.tile.done.ok .tint { background: rgba(34, 160, 70, .12); }
.tile.done.bad .screen { box-shadow: 0 0 0 3px rgba(198, 40, 40, .6); }
.tile.done.ok .screen { box-shadow: 0 0 0 3px rgba(31, 122, 53, .6); }
.tile .verdict.okv { left: 10px; bottom: 10px; font-family: var(--head); font-weight: 700; font-size: 14px; color: #fff; background: var(--ok);
  padding: 4px 11px; border-radius: 6px; }
.tile .verdict.badv { left: 14px; right: 14px; top: 50%; translate: 0 -50%; background: rgba(255, 255, 255, .94); border-left: 5px solid var(--bad);
  border-radius: 7px; padding: 9px 13px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.tile .verdict.badv b { font-family: var(--head); color: var(--bad); font-size: 15px; display: block; }
.tile .verdict.badv span { font-size: 13.5px; line-height: 1.38; display: block; color: var(--ink); white-space: pre-line; }
.tile .speed-tag { font-size: 11.5px; }
.infocard { border: 1px solid var(--line); background: var(--bg-soft); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; }
.infocard .ik { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.infocard .iv { font-family: var(--head); font-size: 64px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 8px 0 6px; }
.infocard .idesc { font-size: 15.5px; color: var(--ink-2); line-height: 1.45; }
.infocard .ires { margin-top: auto; font-family: var(--head); font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; min-height: 26px; }
.infocard .ires i { width: 11px; height: 11px; border-radius: 6px; display: block; }
.progress { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 12px; }
.progress div { height: 100%; width: 0; background: var(--ours); }
@media (max-width: 900px) { .cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cmp-ctrl { margin-left: 0; } }
@media (max-width: 560px) { .cmp-grid { grid-template-columns: 1fr; } }

/* ---------- scoreboard ---------- */
.score { width: 100%; border-collapse: separate; border-spacing: 5px; font-size: 14px; margin-top: 4px; }
.score th { font-family: var(--head); font-weight: 600; font-size: 13px; color: var(--ink-2); padding: 2px 0; }
.score th.grp { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500;
  border-bottom: 2px solid var(--c); padding-bottom: 5px; }
.score td.m { font-family: var(--head); font-weight: 600; font-size: 14.5px; white-space: nowrap; padding-right: 8px; }
.score td.m i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-right: 8px; vertical-align: -1px; }
.score tr.ours td.m { font-weight: 800; }
.score td.c { text-align: center; border-radius: 7px; height: 34px; min-width: 34px; font-weight: 700; cursor: pointer; transition: transform .15s;
  font-family: 'DejaVu Sans', var(--font); }
.score td.c:hover { transform: scale(1.1); }
.score td.c.ok { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1.5px var(--ok-bd); }
.score td.c.bad { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad-bd); }
.score td.c.cur { outline: 2.5px solid var(--ink); outline-offset: 1px; }
.score td.tot { font-family: var(--head); font-weight: 700; font-size: 16px; text-align: center; padding-left: 8px; white-space: nowrap; }
.score td.tot small { color: var(--muted); font-weight: 500; font-size: 12px; }
.score td.gap, .score th.gap { width: 10px; padding: 0; }
.scroll-x { overflow-x: auto; }

/* ---------- tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 7px 9px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font-family: var(--head); font-weight: 600; font-size: 13px; color: var(--ink-2); border-bottom: 2px solid var(--ink); }
table.data th.l, table.data td.l { text-align: left; }
table.data th.span { text-align: center; border-bottom: 1px solid var(--line-2); font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 500; }
table.data tr.ours td { background: var(--bg-ours); }
table.data tr.sub td { color: var(--ink-2); }
table.data tr.sub td.l { padding-left: 26px; font-style: italic; }
table.data tr.grp td { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line-2); padding-top: 14px; text-align: left; }
table.data tr.mean td { font-weight: 600; border-top: 1.5px solid var(--ink-2); }
table.data td.best { font-weight: 800; }
table.data td.gray { color: #a3a39d; }
table.data td.dim { color: var(--muted); }
.tbl-note { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* ---------- charts ---------- */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 64px; align-items: center; gap: 12px; }
.bar-row .bl { font-family: var(--head); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.bar-row .bl i { width: 11px; height: 11px; border-radius: 3px; display: block; }
.bar-track { height: 26px; background: var(--bg-soft); border-radius: 6px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; width: 0; border-radius: 6px; transition: width 1.3s cubic-bezier(.2, .8, .2, 1); position: relative; }
.bar-fill .zs { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(255, 255, 255, .35); }
.bar-row .bv { font-family: var(--head); font-weight: 700; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--ink-2); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 10px; border-radius: 2px; display: block; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } .bar-row { grid-template-columns: 130px 1fr 56px; } }
svg.chart text { font-family: var(--font); }
.donut-wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.kpi { font-family: var(--head); font-size: 15px; font-weight: 600; }

/* ---------- details / collapsibles ---------- */
details.more { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; }
details.more summary { cursor: pointer; padding: 12px 0; font-family: var(--head); font-weight: 600; font-size: 15px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+'; display: inline-block; width: 18px; font-weight: 700; }
details.more[open] summary::before { content: '\2212'; }
details.more .inner { padding-bottom: 16px; }

/* ---------- real world ---------- */
.settings { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.setting { border: 1px dashed var(--line-2); border-radius: 10px; padding: 14px; background: var(--bg-soft); min-height: 120px;
  display: flex; flex-direction: column; gap: 6px; }
.setting .n { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.setting .t { font-family: var(--head); font-weight: 700; font-size: 15px; line-height: 1.3; }
.setting .s { font-size: 12.5px; color: var(--muted); margin-top: auto; }
@media (max-width: 900px) { .settings { grid-template-columns: repeat(2, 1fr); } }

/* ---------- bibtex / footer ---------- */
.bib { position: relative; }
.bib pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; font-family: var(--mono);
  font-size: 13.5px; line-height: 1.55; overflow-x: auto; margin: 0; }
.bib .copy { position: absolute; right: 12px; top: 12px; }
footer { margin-top: 90px; border-top: 1px solid var(--line); padding: 26px 0 50px; font-size: 13.5px; color: var(--muted); text-align: center; }
