:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #eaeff7;
  --line: #d9e0ec;
  --fg: #152238;
  --fg-dim: #4a5a78;
  --fg-mute: #7c89a3;
  --accent: #2f6fd0;  --accent-soft: #7fb8f2;  --know: #2e5a9e;  --know-bg: #e8eef9;  --meas: #1f7f74;  --meas-bg: #e3f3f0;  --reason: #c65a1e; --reason-bg: #fbece0;  --verify: #c0392b; --verify-bg: #fbe9e7;  --code: #3b4f7a;  --code-bg: #eef1f7;  --pass: #1f8a4c;
  --fail: #c0392b;
  --skip: #7c89a3;
  --hero-bg: #0e1a33;
  --font-display: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-display); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem); line-height: 1.15; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--font-mono); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.wrap.narrow { max-width: 820px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav-brand .auto { color: var(--accent); }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.02em; text-decoration: none; font-size: 1.05rem; }
.brand-mark { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--accent); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--meas); }
.nav-links { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { text-decoration: none; color: var(--fg-dim); font-size: 0.92rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); background: var(--surface); }
.nav-cta { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 0.95rem; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.hero .btn-primary { background: var(--accent-soft); color: #0e1a33; }
.btn-outline { border-color: var(--line); color: var(--fg); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.btn-ghost { border-color: var(--line); color: var(--fg-dim); padding: 7px 14px; font-size: 0.88rem; }
.btn-ghost:hover { color: var(--fg); border-color: var(--fg-mute); }
@media (max-width: 760px) { .nav-cta { display: none; } .nav { gap: 12px; } }

.hero { position: relative; overflow: hidden; min-height: min(92vh, 940px); display: grid; align-items: center; background: var(--hero-bg); color: #fff;
  --fg: #ffffff; --fg-dim: #c7d2e6; --fg-mute: #8d9bb8; --surface: #16243f; --surface-2: #1d2f52; --line: #2c3f66; --accent: var(--accent-soft); }
.wordmark { font-weight: 800; font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem); letter-spacing: -0.02em; margin-bottom: 14px; }
.wordmark .auto { color: var(--accent-soft); }
.hero-mosaic {
  position: absolute; top: -30%; bottom: -30%; left: max(42%, 660px); right: -5%;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  transform: rotateZ(-5deg); transform-origin: center;
}
.mcol { display: flex; flex-direction: column; gap: 12px; animation: mdrift 14s ease-in-out infinite alternate; }
.mcol:nth-child(even) { animation-direction: alternate-reverse; margin-top: -140px; }
.mcol:nth-child(3n) { animation-duration: 17s; }
@keyframes mdrift { from { transform: translateY(-11%); } to { transform: translateY(11%); } }
.tile { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #16243f; aspect-ratio: 25 / 16;
  border: 1px solid rgba(255,255,255,.10); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.tile.sq { aspect-ratio: 1 / 1; }
.tile.tw, .tile.real { aspect-ratio: 4 / 3; }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile.real video, .tile.dual video { width: 200%; max-width: none; object-position: 0 50%; }
.tile.real figcaption b { background: #f5b041; color: #1a1205; }
.tile figcaption { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 0.68rem; line-height: 1.3; color: #dfe6f3; }
.tile figcaption b { font-family: var(--font-mono); font-weight: 600; font-size: 0.64rem; color: #fff; background: rgba(9,14,25,.78); padding: 2px 7px; border-radius: 999px; }
.tile figcaption span { background: rgba(9,14,25,.62); padding: 2px 7px; border-radius: 999px; }
.fam { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(9,14,25,.7); }
.fam-real { background: #f5b041; } .fam-tw { background: #c084fc; } .fam-rs { background: #35d0c0; }
.fam-plus { background: #7fb8f2; } .fam-long { background: #f0a16b; } .fam-pro { background: #a3b8d8; }
.hero-veil { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--hero-bg) 0%, var(--hero-bg) max(40%, 640px), transparent calc(max(40%, 640px) + 18%)),
    linear-gradient(180deg, transparent 80%, var(--hero-bg) 100%); }
@media (max-width: 900px) {
  .hero-mosaic { left: -10%; right: -10%; opacity: .45; transform: rotateZ(-5deg); }
  .hero-veil { background: linear-gradient(180deg, color-mix(in srgb, var(--hero-bg) 55%, transparent) 0%, var(--hero-bg) 85%); }
  .tile figcaption { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mcol { animation: none; } }
.hero-content { position: relative; z-index: 2; align-self: center; max-width: 720px; padding: 72px clamp(24px, 3vw, 48px) 72px clamp(24px, 6vw, 120px); }
.hero h1 { font-size: clamp(1.9rem, 1.1rem + 1.9vw, 2.9rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; max-width: 16.5ch; }
.lede { max-width: 48ch; color: var(--fg-dim); font-size: 1.05rem; margin: 24px 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; margin: 32px 0 0; max-width: 460px; }
.hero-stats div { border-left: 2px solid var(--line); padding-left: 14px; }
.hero-stats dt { font-size: 0.84rem; color: var(--fg-dim); font-weight: 600; }
.hero-stats dd { margin: 2px 0 0; font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hero-stats dd span { font-size: 1.1rem; color: var(--fg-dim); margin-left: 2px; }
.hero-stats small { color: var(--fg-mute); font-size: 0.8rem; }
@media (max-width: 760px) { .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero-content { padding-top: 80px; padding-bottom: 72px; } }
.layer-tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.tag { display: inline-block; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 4px; vertical-align: 1px; }
.tag-dem { background: color-mix(in srgb, var(--pass) 14%, transparent); color: var(--pass); }
.tag-inf { background: color-mix(in srgb, var(--know) 14%, transparent); color: var(--know); }
.tag-unt { background: color-mix(in srgb, var(--verify) 14%, transparent); color: var(--verify); }
.verdicts { display: flex; gap: 6px; margin-top: 8px; }
.v { font-family: var(--font-mono); font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.v-fail { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 50%, transparent); }
.v-pass { color: var(--pass); border-color: color-mix(in srgb, var(--pass) 50%, transparent); }
.v-skip { color: var(--skip); border-color: color-mix(in srgb, var(--skip) 50%, transparent); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.dot-know { background: var(--know); } .dot-meas { background: var(--meas); } .dot-reason { background: var(--reason); } .dot-verify { background: var(--verify); } .dot-code { background: var(--code); }

.section { padding-block: 64px; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 24px; }
.sub-block { margin-top: 48px; }
.sub-block.first { margin-top: 0; margin-bottom: 32px; }
.sub-block > h3 { font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.6rem); }
.sub-block > .sub { max-width: 70ch; margin: 8px 0 24px; }
.ex-kicker { font-family: var(--font-mono); font-size: 0.76rem; color: var(--fg-mute); }
.sub { color: var(--fg-dim); margin-top: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.prose { max-width: 60ch; }
.prose p { color: var(--fg-dim); }
.prose b { color: var(--fg); }
.prose h3 { margin-bottom: 12px; }
.pillars { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }
.pillars li { color: var(--fg-dim); font-size: 0.95rem; padding: 16px 18px; border-radius: 10px; background: var(--bg-alt); }
.pillars li:nth-child(1) { background: var(--know-bg); }
.pillars li:nth-child(2) { background: var(--meas-bg); }
.pillars li:nth-child(3) { background: var(--reason-bg); }
.pillars li b { color: var(--fg); display: inline; }
.fig { margin: 0; }
.fig img { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 30px rgba(21,34,56,.06); }
.fig figcaption { color: var(--fg-mute); font-size: 0.86rem; margin-top: 10px; line-height: 1.5; }
.inline-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

.method-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.mtab { font: inherit; font-weight: 700; font-size: 0.95rem; color: var(--fg-dim); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.mtab.active { color: var(--fg); border-color: var(--fg-mute); background: var(--surface-2); }
.mtab[data-panel="m-kb"].active { background: var(--know-bg); border-color: var(--know); color: var(--know); }
.mtab[data-panel="m-ground"].active { background: var(--meas-bg); border-color: var(--meas); color: var(--meas); }
.mtab[data-panel="m-search"].active { background: var(--reason-bg); border-color: var(--reason); color: var(--reason); }
.method-panel { border-radius: 18px; padding: 22px 24px; }
#m-kb.active { background: var(--know-bg); } #m-ground.active { background: var(--meas-bg); } #m-search.active { background: var(--reason-bg); }
.method-panel { display: none; }
.method-panel.active { display: block; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ground-demo { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.ground-demo img { width: 100%; }
.callouts { position: absolute; inset: 0; }
.callout { position: absolute; transform: translate(-50%, -50%); }
.callout .pt { width: 14px; height: 14px; border-radius: 50%; background: var(--meas); box-shadow: 0 0 0 0 color-mix(in srgb, var(--meas) 60%, transparent); animation: ping 2.2s ease-out infinite; cursor: pointer; border: 2px solid #fff; }
.callout:nth-child(2) .pt { animation-delay: .4s; } .callout:nth-child(3) .pt { animation-delay: .8s; } .callout:nth-child(4) .pt { animation-delay: 1.2s; } .callout:nth-child(5) .pt { animation-delay: 1.6s; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--meas) 55%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
.callout .bubble {
  position: absolute; left: 16px; top: -10px; min-width: 190px; max-width: 240px;
  background: rgba(14,26,51,.9); border: 1px solid var(--meas);
  border-radius: 10px; padding: 8px 10px; font-family: var(--font-mono); font-size: 0.7rem; line-height: 1.45; color: #fff;
  opacity: 0; transform: translateX(-6px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; z-index: 3;
}
.callout .bubble b { color: #5fd3c2; display: block; font-size: 0.74rem; margin-bottom: 2px; }
.callout .bubble .derive { color: #f0a16b; margin-top: 4px; }
.callout:hover .bubble, .callout.open .bubble, .ground-demo.show-all .bubble { opacity: 1; transform: none; }
.callout.flip .bubble { left: auto; right: 16px; }
.ground-caption { padding: 10px 14px; font-size: 0.82rem; color: var(--fg-mute); border-top: 1px solid var(--line); }

.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 36px; font-size: 0.86rem; color: var(--fg-dim); }
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--line), var(--line)); }
.step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 20px; }
.step-marker { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); font-family: var(--font-mono); font-weight: 600; font-size: 0.8rem; color: var(--fg-dim); position: relative; z-index: 1; }
.step.is-fail .step-marker { border-color: var(--fail); color: var(--fail); }
.step.is-pass .step-marker { border-color: var(--pass); color: var(--pass); }
.step.is-exp .step-marker { border-color: var(--reason); color: var(--reason); }
.step.is-meas .step-marker { border-color: var(--meas); color: var(--meas); }
.step-body { min-width: 0; }
.step-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.step-title h3 { font-size: 1.35rem; }
.step-title .when { font-family: var(--font-mono); font-size: 0.74rem; color: var(--fg-mute); letter-spacing: 0.06em; text-transform: uppercase; }
.step-sum { color: var(--fg-dim); max-width: 70ch; margin-bottom: 18px; }
.step-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .step-grid { grid-template-columns: 1fr; } }
.media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #0e1a33; position: relative; }
.media video { width: 100%; aspect-ratio: 25 / 8; object-fit: cover; }
.media .media-label { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; align-items: center; font-family: var(--font-mono); font-size: 0.7rem; color: #fff; background: rgba(14,26,51,.75); padding: 4px 8px; border-radius: 6px; }
.media .play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(transparent, rgba(0,0,0,.35)); cursor: pointer; border: 0; color: #fff; }
.media .play::after { content: "▶"; width: 54px; height: 54px; border-radius: 50%; background: var(--accent-soft); color: #0e1a33; display: grid; place-items: center; font-size: 1.1rem; padding-left: 4px; }
.media.playing .play { display: none; }

.layers { display: grid; gap: 10px; }
.layer-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ltab { font: inherit; font-size: 0.8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--fg-dim); cursor: pointer; display: inline-flex; align-items: center; }
.ltab.active { color: var(--fg); background: var(--surface-2); border-color: var(--fg-mute); }
.ltab { background: #fff; }
.layer-block { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); border-left-width: 4px; background: var(--surface); font-size: 0.9rem; color: var(--fg-dim); display: none; }
.layer-block.active { display: block; animation: fade .3s ease; }
.layer-block p { margin: 0 0 .6em; }
.layer-block p:last-child { margin-bottom: 0; }
.layer-block b { color: var(--fg); }
.layer-block pre { margin: 0; white-space: pre-wrap; font-size: 0.78rem; line-height: 1.5; color: var(--fg); max-height: 360px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.layer-block.layer-know { border-color: color-mix(in srgb, var(--know) 45%, var(--line)); } .layer-block.layer-know .layer-tag { color: #8fb3ec; }
.layer-block.layer-meas { border-color: color-mix(in srgb, var(--meas) 45%, var(--line)); } .layer-block.layer-meas .layer-tag { color: #5fd3c2; }
.layer-block.layer-reason { border-color: color-mix(in srgb, var(--reason) 45%, var(--line)); } .layer-block.layer-reason .layer-tag { color: #f0a16b; }
.layer-block.layer-verify { border-color: color-mix(in srgb, var(--verify) 45%, var(--line)); } .layer-block.layer-verify .layer-tag { color: #ff8f85; }
.layer-block.layer-code { border-color: color-mix(in srgb, var(--code) 45%, var(--line)); } .layer-block.layer-code .layer-tag { color: #9fb4e0; }
.vignette .layer-block { display: block; }
.vignette .layer-block + .layer-block { margin-top: 10px; }
.hyp-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.74rem; margin-top: 6px; }
.hyp-table th, .hyp-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid rgba(21,34,56,.12); font-variant-numeric: tabular-nums; color: var(--fg); }
.hyp-table th { color: var(--fg-mute); font-weight: 500; }
.hyp-table .bad { color: var(--fail); } .hyp-table .good { color: var(--pass); }
.verdict-line { font-family: var(--font-mono); font-size: 0.76rem; margin-top: 8px; }
.verdict-line.refuted { color: var(--fail); } .verdict-line.supported { color: var(--pass); }
.stage-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.fix { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px !important; }

.vignette { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .vignette { grid-template-columns: 1fr; } }
.vig-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #0e1a33; position: relative; }
.vig-media video { width: 100%; aspect-ratio: 25 / 8; object-fit: cover; }
.vig-label { padding: 8px 12px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-dim); background: var(--surface); display: flex; gap: 10px; align-items: center; }
.vig-text .layer-block { font-size: 0.86rem; }

.kb-controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 0.86rem; font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg-dim); cursor: pointer; display: inline-flex; align-items: center; }
.chip.active { color: var(--fg); background: var(--surface-2); border-color: var(--fg-mute); }
#kb-search, #ex-search { font: inherit; font-size: 0.92rem; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); min-width: 260px; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.kb-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 16px 18px; cursor: pointer; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; min-width: 0; }
.kb-card:hover { box-shadow: 0 10px 28px rgba(21,34,56,.08); }
.kb-card:hover { border-color: var(--fg-mute); transform: translateY(-1px); }
.kb-card.open { grid-column: 1 / -1; cursor: default; }
.kb-type { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; display: flex; align-items: center; margin-bottom: 8px; }
.kb-card h4 { margin: 0 0 6px; font-size: 1rem; line-height: 1.35; }
.kb-cond { color: var(--fg-mute); font-size: 0.84rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-card.open .kb-cond { display: block; color: var(--fg-dim); }
.kb-detail { display: none; margin-top: 14px; }
.kb-card.open .kb-detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; animation: fade .3s ease; }
@media (max-width: 900px) { .kb-card.open .kb-detail { grid-template-columns: 1fr; } }
.kb-detail h5 { margin: 0 0 6px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); }
.kb-detail .block + .block { margin-top: 14px; }
.kb-strat { margin: 0; padding-left: 18px; color: var(--fg-dim); font-size: 0.9rem; }
.kb-strat b { color: var(--fg); }
.kb-text { margin: 0; font-size: 0.9rem; color: var(--fg-dim); line-height: 1.6; }
.kb-know { font-size: 0.9rem; color: var(--fg-dim); line-height: 1.6; }
.kb-know .s { display: inline; }
.kb-open { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.kb-open li { font-family: var(--font-mono); font-size: 0.76rem; color: var(--meas); padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--meas) 35%, var(--line)); background: var(--meas-bg); border-radius: 8px; }
.kb-open li small { display: block; color: var(--fg-mute); font-family: var(--font-display); font-size: 0.78rem; margin-top: 2px; }
.kb-xref { font-size: 0.8rem; color: var(--fg-mute); }
.kb-close { font: inherit; font-size: 0.8rem; color: var(--fg-dim); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; float: right; }
.kb-empty { color: var(--fg-mute); padding: 30px; text-align: center; grid-column: 1 / -1; }

.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.task-card { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); position: relative; }
.task-card video { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; background: #0e1a33; }
.task-card.sq video { aspect-ratio: 1 / 1; }
.task-meta { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.task-meta b { font-size: 0.9rem; }
.task-meta small { font-family: var(--font-mono); font-size: 0.7rem; color: var(--fg-mute); }
.task-score { font-family: var(--font-mono); font-size: 0.74rem; color: var(--pass); font-variant-numeric: tabular-nums; }

.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px 22px; min-width: 0; box-shadow: 0 6px 24px rgba(21,34,56,.05); }
.card-wide { grid-column: 1 / -1; }
.card-head h3 { margin-bottom: 4px; }
.card-head p { color: var(--fg-mute); font-size: 0.86rem; margin-bottom: 14px; }
.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 340px; }
@media (max-width: 900px) { .res-grid { grid-template-columns: 1fr; } .chart-box, .chart-box.tall { height: 260px; } }
.heat { overflow-x: auto; }
.heat table { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 0.82rem; }
.heat th { font-weight: 600; color: var(--fg-mute); text-align: left; padding: 4px 6px; font-size: 0.76rem; }
.heat th.col { text-align: center; }
.heat td { text-align: center; padding: 9px 4px; border-radius: 6px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.heat td.row-label { text-align: left; color: var(--fg-dim); font-family: var(--font-display); font-weight: 500; background: transparent; white-space: nowrap; }
.heat td.zero { color: var(--fail); background: #fff; outline: 1px solid var(--fail); }
.heat tr.mean td { font-weight: 800; }

#case-tabs, #cmp-tabs, #task-tabs { margin-bottom: 20px; }
.case-fig { display: none; }
.case-fig.active { display: block; animation: fade .3s ease; }

.bib { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); padding: 18px 20px; }
.bib pre { margin: 0; white-space: pre-wrap; font-size: 0.86rem; color: var(--fg); }
.copy { position: absolute; right: 12px; top: 12px; font: inherit; font-size: 0.8rem; font-weight: 700; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); cursor: pointer; }
.foot { padding: 24px 0 32px; color: var(--fg-mute); font-size: 0.84rem; border-top: 1px solid var(--line); }

.fig2 { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 14px 14px 12px; box-shadow: 0 10px 30px rgba(21,34,56,.06); }
.fig2-stage { position: relative; cursor: pointer; }
.fig2-stage img { width: 100%; display: block; }
.fig2-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.fig2 [data-ph] { opacity: 0; transition: opacity .45s ease; }
.fig2 [data-ph].on { opacity: 1; }
.fig2 .o-dim { opacity: 0; transition: opacity .6s ease; }
.fig2 .o-dim.on { opacity: .62; }
.fig2 .o-halo.on { animation: o-halo 1.4s ease-in-out infinite; }
@keyframes o-halo { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
.fig2 .o-glow.on { animation: o-glow 1.4s ease-in-out infinite; }
@keyframes o-glow { 0%, 100% { stroke-width: 3; } 50% { stroke-width: 6; } }
.fig2 .o-flow.on { animation: o-flow .7s linear infinite; }
@keyframes o-flow { to { stroke-dashoffset: -44; } }
.fig2 .o-pulse.on { animation: o-pulse .9s ease-in-out infinite; }
@keyframes o-pulse { 0%, 100% { opacity: 0; } 50% { opacity: .32; } }
.fig2 .o-ring.on { animation: o-ring 1.3s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes o-ring { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.fig2 .o-box.on { animation: o-box .55s cubic-bezier(.2,.9,.2,1.2) both; transform-box: fill-box; transform-origin: center; }
@keyframes o-box { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
.fig2 .o-chip.on { animation: o-chip .6s cubic-bezier(.2,.9,.2,1.3) both; transform-box: fill-box; transform-origin: center; }
@keyframes o-chip { from { opacity: 0; transform: scale(.4) translateY(10px); } to { opacity: 1; transform: none; } }
.fig2 .o-stamp.on { animation: o-stamp .55s cubic-bezier(.2,.9,.2,1.4) both; transform-box: fill-box; transform-origin: center; }
@keyframes o-stamp { 0% { opacity: 0; transform: scale(2.2) rotate(-14deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
.fig2 .o-scan.on { animation: o-scan 1.6s ease-in-out infinite; }
@keyframes o-scan { 0% { transform: translateY(0); } 50% { transform: translateY(var(--h, 270px)); } 100% { transform: translateY(0); } }
.fig2 .o-dot { opacity: 0; }
.fig2 .o-dot.on { opacity: 1; }
.fig2-badge { position: absolute; left: 14px; top: 10px; display: flex; gap: 8px; align-items: center; background: rgba(14,26,51,.88); color: #fff; border-radius: 999px; padding: 6px 12px 6px 8px; font-size: 0.82rem; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.fig2-num { font-family: var(--font-mono); font-size: 0.7rem; background: var(--accent-soft); color: #0e1a33; border-radius: 999px; padding: 2px 8px; }
.fig2-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 14px; }
.fig2-step { position: relative; font: inherit; font-size: 0.82rem; font-weight: 700; color: var(--fg-mute); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px 12px; cursor: pointer; overflow: hidden; text-align: left; }
.fig2-step i { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--accent); }
.fig2-step.done { color: var(--fg-dim); } .fig2-step.done i { width: 100%; background: var(--line); }
.fig2-step.active { color: var(--fg); border-color: var(--accent); background: #fff; }
.fig2-step.active i { animation: fig2fill var(--d, 3s) linear forwards; }
@keyframes fig2fill { from { width: 0; } to { width: 100%; } }
.fig2-caption { margin-top: 12px; padding: 0 4px; font-size: 1rem; color: var(--fg-dim); min-height: 1.6em; }
.fig2-hint { font-size: 0.86rem; color: var(--fg-mute); margin-top: 10px; }
@media (max-width: 760px) { .fig2-steps { grid-template-columns: repeat(3, 1fr); } .fig2-step { font-size: 0.74rem; } }
@media (prefers-reduced-motion: reduce) { .fig2 [data-ph] { opacity: 1; } .fig2 .o-dim { display: none; } .fig2 [class^="o-"].on { animation: none !important; } }

.media, .vig-media { --cam-h: auto; }
.media[data-cam] video, .vig-media[data-cam] video { transition: object-position .35s ease, width .35s ease; }
.media[data-cam="scene"] video, .vig-media[data-cam="scene"] video { object-fit: cover; object-position: 0 50%; width: 200%; height: 100%; aspect-ratio: auto; max-width: none; margin: 0; }
.media[data-cam="wrist"] video, .vig-media[data-cam="wrist"] video { object-fit: cover; object-position: 100% 50%; width: 200%; height: 100%; margin: 0 0 0 -100%; aspect-ratio: auto; max-width: none; }
.media[data-cam="scene"], .media[data-cam="wrist"], .vig-media[data-cam="scene"], .vig-media[data-cam="wrist"] { aspect-ratio: 25 / 16; }
.cam-switch { position: absolute; right: 10px; top: 10px; display: flex; gap: 4px; background: rgba(14,26,51,.72); padding: 4px; border-radius: 999px; backdrop-filter: blur(6px); }
.cam { font: inherit; font-size: 0.7rem; font-weight: 700; color: #c7d2e6; background: transparent; border: 0; border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.cam.active { background: var(--accent-soft); color: #0e1a33; }
.stamps { position: absolute; left: 10px; top: 10px; display: grid; gap: 6px; pointer-events: none; max-width: 60%; }
.stamp { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; padding: 5px 10px; border-radius: 6px; color: #fff; background: rgba(14,26,51,.78); border-left: 3px solid var(--accent-soft); opacity: 0; transform: translateX(-10px); transition: opacity .35s ease, transform .35s ease; }
.stamp.on { opacity: 1; transform: none; }
.stamp-hyp { border-left-color: #f0a16b; }
.stamp-test { border-left-color: var(--accent-soft); }
.stamp-fail { background: var(--fail); border-left-color: #fff; font-weight: 800; letter-spacing: .06em; }
.stamp-pass { background: var(--pass); border-left-color: #fff; font-weight: 800; }
.task-card { cursor: pointer; }
.cmp { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); padding: 18px; }
.cmp-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cmp-head span { color: var(--fg-mute); font-family: var(--font-mono); font-size: 0.78rem; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .cmp-grid { grid-template-columns: 1fr; } }
.cmp-pane .media[data-cam="both"] video { aspect-ratio: 25 / 8; }
.cmp-pane .media[data-cam="single"] video { aspect-ratio: 25 / 16; width: 100%; margin: 0; object-fit: cover; object-position: center; }
.cmp-fail .media { border-color: color-mix(in srgb, var(--fail) 50%, var(--line)); }
.cmp-pass .media { border-color: color-mix(in srgb, var(--pass) 50%, var(--line)); }
.cmp-note { font-size: 0.9rem; color: var(--fg-dim); margin: 10px 2px 0; }
.cmp-bar { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.cmp-scrub { flex: 1; accent-color: var(--accent); }
.cmp-time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--fg-mute); min-width: 4.5em; text-align: right; }
.cmp-why { margin: 14px 2px 0; color: var(--fg-dim); font-size: 0.95rem; }
.cmp-why b { color: var(--fg); }

.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ex-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.ex-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(21,34,56,.10); border-color: var(--accent-soft); }
.ex-thumb { position: relative; background: #0e1a33; aspect-ratio: 25 / 10; overflow: hidden; }
.ex-thumb video { width: 200%; max-width: none; height: 100%; object-fit: cover; object-position: 0 50%; }
.ex-nothumb { width: 100%; height: 100%; display: grid; place-items: center; color: #8d9bb8; font-family: var(--font-mono); font-size: 0.75rem; background: linear-gradient(135deg, #16243f, #0e1a33); }
.ex-nothumb.big { aspect-ratio: 25 / 10; border-radius: var(--radius); }
.ex-bench { position: absolute; left: 8px; top: 8px; font-family: var(--font-mono); font-size: 0.64rem; color: #fff; background: rgba(14,26,51,.75); padding: 3px 8px; border-radius: 999px; }
.ex-meta { padding: 10px 12px 12px; }
.ex-meta b { font-size: 0.9rem; display: block; line-height: 1.35; }
.ex-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--fg-mute); }
.ex-stats .v { font-size: 0.66rem; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(14,26,51,.72); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: min(1240px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 40px 100px rgba(0,0,0,.4); padding: 26px 28px 30px; animation: fade .25s ease; }
.modal-close { position: absolute; right: 16px; top: 14px; font: inherit; font-family: var(--font-mono); font-size: 0.78rem; border: 1px solid var(--line); background: var(--bg-alt); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.ex-head h3 { font-size: 1.4rem; margin: 6px 0 8px; }
.ex-grid2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; margin-top: 18px; align-items: start; }
@media (max-width: 1000px) { .ex-grid2 { grid-template-columns: 1fr; } }
.ex-media .media[data-cam="both"] video { width: 100%; aspect-ratio: 25 / 8; }
.ex-tabs .layer-tabs { margin-bottom: 10px; }
.ex-panel { max-height: 62vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-alt); padding: 14px; }
.ex-pre { margin: 0; white-space: pre-wrap; font-size: 0.78rem; line-height: 1.55; color: var(--fg); font-family: var(--font-mono); }
.ex-code { background: #0e1a33; color: #e8ecf2; border-radius: 10px; padding: 14px; }
.ex-stages { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ex-stages small { color: var(--fg-mute); margin-left: 6px; font-weight: 500; }
.ex-note { color: var(--fg-mute); margin: 0; }
.ex-exp { border-left: 4px solid var(--reason); background: var(--reason-bg); border-radius: 10px; padding: 12px 14px; font-size: 0.88rem; color: var(--fg-dim); }
.ex-exp + .ex-exp { margin-top: 10px; }
.ex-exp p { margin: 4px 0; } .ex-exp b { color: var(--fg); }
.ex-exp details { margin-top: 6px; } .ex-exp summary { cursor: pointer; font-weight: 700; color: var(--reason); font-size: 0.82rem; }
.ex-exp .ex-pre { margin-top: 8px; font-size: 0.72rem; background: #fff; padding: 10px; border-radius: 8px; }
.m-dl { margin: 0; display: grid; gap: 4px; }
.m-dl > div { display: grid; grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1.4fr); gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 0.8rem; }
.m-dl dt { font-family: var(--font-mono); color: var(--meas); word-break: break-word; }
.m-dl dd { margin: 0; color: var(--fg); min-width: 0; }
.m-dl .m-dl > div { border-bottom: 0; padding: 2px 0; }
.m-val { font-family: var(--font-mono); font-size: 0.78rem; word-break: break-word; }

.media[data-cam="scene"], .media[data-cam="wrist"], .vig-media[data-cam="scene"], .vig-media[data-cam="wrist"] { aspect-ratio: 25 / 16; overflow: hidden; }
.media[data-cam="scene"] video, .media[data-cam="wrist"] video, .vig-media[data-cam="scene"] video, .vig-media[data-cam="wrist"] video { display: block; }

.real-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .real-grid { grid-template-columns: 1fr; } }
.real-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.real-card .vig-media { border: 0; border-radius: 0; }
.real-card .vig-label { font-family: inherit; font-size: 0.86rem; color: var(--fg-dim); display: block; padding: 12px 14px; }
.real-card .vig-label b { display: block; color: var(--fg); font-size: 0.95rem; }
.real-card .vig-media video { aspect-ratio: 8 / 3; }
.real-card .vig-media[data-cam="scene"], .real-card .vig-media[data-cam="wrist"] { aspect-ratio: 4 / 3; }

.score-table { width: 100%; max-width: 640px; margin-top: 32px; border-collapse: collapse; font-size: 0.92rem; }
.score-table caption { caption-side: bottom; text-align: left; color: var(--fg-mute); font-size: 0.82rem; padding-top: 10px; line-height: 1.5; }
.score-table th, .score-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.score-table th:first-child, .score-table td:first-child { text-align: left; }
.score-table th { font-weight: 600; color: var(--fg-dim); font-size: 0.84rem; }
.score-table td.best { font-weight: 800; color: var(--accent); }

.scrubbable { position: relative; cursor: ew-resize; touch-action: pan-y; }
.scrubbable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.scrub-bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,255,255,.18); z-index: 2; pointer-events: none; }
.scrub-bar i { display: block; height: 100%; width: 0; background: var(--accent-soft); }
.scrub .scrub-bar { height: 4px; }
.scrub .scrub-bar i { background: var(--accent); }
.scrub-hint { position: absolute; left: 12px; top: 12px; font-family: var(--font-mono); font-size: 0.66rem; color: #fff; background: rgba(14,26,51,.72); padding: 3px 9px; border-radius: 999px; opacity: 0; transition: opacity .15s ease-out; pointer-events: none; z-index: 2; white-space: nowrap; }
.scrub-hint .h-touch, .scrub-hint .h-on { display: none; }
.scrubbable:hover .scrub-hint, .scrubbable:focus-visible .scrub-hint, .scrub .scrub-hint { opacity: 1; }
.scrub .scrub-hint { background: var(--accent); }
.scrub .scrub-hint .h-mouse, .scrub .scrub-hint .h-touch { display: none; }
.scrub .scrub-hint .h-on { display: inline; }
.task-card .scrub-hint { left: auto; right: 10px; }
.media:has(.stamps) .scrub-hint { left: auto; right: 12px; top: auto; bottom: 12px; }
@media (hover: none) { .scrub-hint .h-mouse { display: none; } .scrub-hint .h-touch { display: inline; } }
.vignette .vig-label { position: absolute; left: 10px; bottom: 10px; padding: 4px 8px; border-radius: 6px; color: #fff; background: rgba(14,26,51,.75); z-index: 2; }
.chip small { margin-left: 6px; font-weight: 500; color: var(--fg-mute); font-variant-numeric: tabular-nums; }
.ex-more { margin: 20px auto 0; display: flex; cursor: pointer; font-family: inherit; }
.btn:active, .chip:active, .mtab:active, .ltab:active { transform: scale(0.97); }
@media (max-width: 600px) { #kb-search, #ex-search { min-width: 0; width: 100%; } }
.authors { margin: -8px 0 24px; font-size: 1rem; font-weight: 600; color: var(--fg); }
.authors .affil { display: inline-block; margin-top: 4px; font-size: .9rem; font-weight: 400; color: var(--fg-dim); }
.btn.is-disabled { opacity: .55; cursor: not-allowed; }
.btn.is-disabled:hover { transform: none; }
.btn.is-disabled:active { transform: none; }
.hero-note { margin: 18px 0 0; font-size: 0.8rem; color: var(--fg-mute); max-width: 52ch; }
.fig2-pop { position: absolute; width: 27%; z-index: 3; pointer-events: none; padding: 14px 16px; border-radius: 12px;
  background: rgba(255,255,255,.97); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(21,34,56,.18); }
.fig2-pop.in { animation: popin .22s cubic-bezier(.23,1,.32,1); }
@keyframes popin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fig2-pop-h { display: block; font-size: 1rem; color: var(--fg); margin-bottom: 4px; }
.fig2-pop-t { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--fg-dim); }
@media (max-width: 900px) { .fig2-pop { position: static; width: auto; margin-top: 12px; box-shadow: none; } }

.real-list { display: grid; gap: 14px; }
.real-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.real-feature { border: 0; border-radius: 0; background: #000; }
.media.real-feature[data-cam="both"] video { width: 100%; aspect-ratio: 8 / 3; object-fit: cover; margin: 0; }
.media.real-feature[data-cam="scene"], .media.real-feature[data-cam="wrist"] { aspect-ratio: 8 / 3; }
.media.real-feature[data-cam="scene"] video, .media.real-feature[data-cam="wrist"] video { object-fit: contain; }
.real-feature .cam-switch { transform: scale(.85); transform-origin: top right; }
.cam-tag { display: none; }
.real-info { padding: 18px 24px; display: flex; flex-direction: column; justify-content: center; }
.real-info h3 { font-size: 1.12rem; margin: 0 0 2px; }
.real-info p { color: var(--fg-dim); font-size: 0.88rem; line-height: 1.45; margin: 0 0 12px; }
.rbar { display: grid; grid-template-columns: 70px minmax(0, 1fr) 40px; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--fg-dim); margin-top: 6px; }
.rbar i { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.rbar i b { display: block; height: 100%; border-radius: 3px; background: var(--fg-mute); }
.rbar em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.rbar.ours { color: var(--fg); font-weight: 700; }
.rbar.ours i b { background: var(--accent); }
.real-note { color: var(--fg-mute); font-size: 0.82rem; margin: 16px 0 0; max-width: 90ch; }
@media (max-width: 900px) { .real-row { grid-template-columns: 1fr; } }

.panel-text { max-width: 78ch; margin-bottom: 18px; }
.panel-text h3 { margin-bottom: 8px; }
.panel-text p { color: var(--fg-dim); margin: 0; }
.afig { margin-top: 0; }
.af-stage svg { pointer-events: none; }
.af-dim { opacity: .74; }
.af-hole, .af-ring, .af-dot { opacity: 0; transition: opacity .35s ease-out; }
.af-hole.on, .af-dot.on { opacity: 1; }
.af-ring.on { opacity: 1; animation: o-halo 1.6s ease-in-out infinite; }
.afig .fig2-pop { width: 29%; }
@media (prefers-reduced-motion: reduce) { .af-ring.on { animation: none; } }
.afig .fig2-badge { display: none; }

.kb-examples { margin-top: 28px; }
.kb-examples h4 { font-size: 1.1rem; margin: 0; }
.kb-examples > .sub { margin: 6px 0 16px; font-size: 0.92rem; max-width: 90ch; }
.kb-entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kb-entry { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 0.86rem; }
.kb-entry-head { padding: 16px 18px 14px; background: var(--tone-bg); }
.kb-know { --tone: var(--know); --tone-bg: var(--know-bg); }
.kb-meas { --tone: var(--meas); --tone-bg: var(--meas-bg); }
.kb-reason { --tone: var(--reason); --tone-bg: var(--reason-bg); }
.kb-pill { display: inline-block; font-size: 0.72rem; font-weight: 700; color: #fff; background: var(--tone); padding: 3px 10px; border-radius: 999px; }
.kb-entry h4 { margin: 10px 0 6px; font-size: 1rem; line-height: 1.35; color: var(--fg); }
.kb-entry .kb-cond { margin: 0; color: var(--fg-dim); font-size: 0.84rem; line-height: 1.5; display: block; -webkit-line-clamp: unset; }
.kb-sec { padding: 12px 18px; border-top: 1px solid var(--line); }
.kb-sec h5 { margin: 0 0 8px; font-size: 0.78rem; font-weight: 700; color: var(--fg-mute); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kb-sec h5 small { display: inline-flex; gap: 4px; font-weight: 500; }
.kb-strat { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kb-strat li b { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--tone); border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); border-radius: 6px; padding: 2px 7px; margin-bottom: 3px; }
.kb-strat li span { display: block; color: var(--fg-dim); line-height: 1.45; }
.kb-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kf { color: var(--fg-dim); line-height: 1.5; padding-left: 12px; position: relative; }
.kf::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--pass); }
.kf-inferred::before { background: var(--know); } .kf-untested::before { background: var(--verify); }
.kq-row { display: flex; flex-wrap: wrap; gap: 6px; }
.kq { font-size: 0.78rem; font-weight: 600; color: var(--meas); background: var(--meas-bg); border: 1px solid color-mix(in srgb, var(--meas) 40%, transparent); border-radius: 6px; padding: 3px 8px; }
.kb-none { margin: 0; color: var(--fg-mute); font-size: 0.82rem; }
@media (max-width: 1000px) { .kb-entries { grid-template-columns: 1fr; } }
.ex-thumb.single video { width: 100%; object-position: center; }
.media[data-cam="single"] video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; max-width: none; }

.timeline::before { display: none; }
.step { grid-template-columns: minmax(0, 1fr); }
.step-marker { display: none; }
.step-sum { margin-bottom: 14px; }
.legend { margin-bottom: 14px; }
.run-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.run-rail { list-style: none; margin: 0; padding: 0; position: sticky; top: 84px; display: grid; gap: 4px; --prog: 0; }
.run-rail::before, .run-rail::after { content: ""; position: absolute; left: 17px; top: 22px; width: 2px; border-radius: 1px; }
.run-rail::before { bottom: 22px; background: var(--line); }
.run-rail::after { height: calc((100% - 44px) * var(--prog)); background: var(--accent); transition: height .25s cubic-bezier(.23,1,.32,1); }
.run-step { position: relative; z-index: 1; width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: left; font: inherit; background: none; border: 0; border-radius: 12px; padding: 8px 10px 8px 2px; cursor: pointer; color: var(--fg-dim); transition: background-color .14s ease-out; }
.run-step:hover { background: var(--bg-alt); }
.run-step.active { background: color-mix(in srgb, var(--accent) 8%, #fff); color: var(--fg); }
.rs-n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; border: 2px solid var(--line); background: #fff; color: var(--fg-mute); transition: transform .14s ease-out; }
.run-step.active .rs-n { transform: scale(1.1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.run-step.is-meas .rs-n { border-color: var(--meas); color: var(--meas); } .run-step.is-fail .rs-n { border-color: var(--fail); color: var(--fail); }
.run-step.is-exp .rs-n { border-color: var(--reason); color: var(--reason); } .run-step.is-pass .rs-n { border-color: var(--pass); color: var(--pass); }
.run-step.active.is-meas .rs-n { background: var(--meas); color: #fff; } .run-step.active.is-fail .rs-n { background: var(--fail); color: #fff; }
.run-step.active.is-exp .rs-n { background: var(--reason); color: #fff; } .run-step.active.is-pass .rs-n { background: var(--pass); color: #fff; }
.rs-txt { display: grid; gap: 2px; padding-top: 6px; }
.rs-t { font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.rs-w { font-size: 0.74rem; color: var(--fg-mute); line-height: 1.3; }
.run-layout .step-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
@media (max-width: 900px) {
  .run-layout { grid-template-columns: 1fr; }
  .run-rail { position: static; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; }
  .run-rail::before, .run-rail::after { display: none; }
}
.chart-box { height: 250px; } .chart-box.tall { height: 300px; }
.res-grid { gap: 14px; }
.card { padding: 16px 18px; }
.ex-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.kb-controls { margin-bottom: 14px; }
#bibtex { padding-block: 48px; }
#bibtex h2 { margin-bottom: 14px; }
.step[hidden] { display: none; }
#walkthrough > h3 { margin-bottom: 18px; }

.rs-n { width: 14px; height: 14px; margin: 4px 0 0 11px; border-width: 3px; }
.run-step.active .rs-n { transform: scale(1.25); }
.run-rail::before, .run-rail::after { left: 17px; top: 18px; }
.rs-txt { padding-top: 0; }
.rs-turn { font-size: 0.9rem; font-weight: 700; color: var(--fg); }
.run-step.is-meas .rs-turn { color: var(--meas); } .run-step.is-fail .rs-turn { color: var(--fail); }
.run-step.is-exp .rs-turn { color: var(--reason); } .run-step.is-pass .rs-turn { color: var(--pass); }
.rs-t { font-weight: 500; color: var(--fg-dim); }
.run-step.active .rs-t { color: var(--fg); }
.run-layout .step-sum { font-size: 1rem; max-width: none; }
.run-layout .step-grid { align-items: start; }
.run-layout .layers { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.run-layout .layer-tabs { flex-wrap: nowrap; gap: 4px; }
.run-layout .ltab { font-size: 0.76rem; padding: 5px 10px; white-space: nowrap; }
.run-layout .layer-block.active { max-height: 330px; overflow: auto; }
.run-layout .ground-demo .callout .bubble { max-width: 210px; }
.gd-img { position: relative; }

:root { --radius: 3px; }
.hero h1 { font-weight: 700; letter-spacing: -0.015em; }
.btn, .chip, .ltab, .cam-switch, .cam, .tag, .v, .kb-pill, .kq, .kb-strat li b, .fig2-step, .fig2-pop, .fig2, .fig2-badge, .fig2-num,
.card, .media, .vig-media, .real-row, .task-card, .ex-card, .ex-bench, .method-panel, .layer-block, .kb-entry, .run-step, .bib, .copy,
.modal-card, .modal-close, .ground-demo, .tile, .scrub-hint, .media-label, .stamp, .tile figcaption b, .tile figcaption span, #ex-search,
.cmp, .layer-block pre, .ex-pre, .ex-panel, .ex-code, .ex-exp, .callout .bubble, .heat td, .pillars li, .fig img, .ex-nothumb, .run-rail .run-step,
.rbar i, .rbar i b, .real-feature, .media.real-feature, .speed-tag, .cam-tag, .kb-close, .hyp-table, .mtab { border-radius: var(--radius) !important; }
.card, .fig img, .fig2, .kb-entry, .real-row, .modal-card, .tile, .ex-card:hover, .kb-card:hover, .real-feature { box-shadow: none !important; }
.btn:hover, .ex-card:hover, .kb-card:hover { transform: none; }
.card, .fig2, .kb-entry, .real-row, .task-card, .ex-card, .bib { border-color: #cfd6e2; }
.section-alt { background: #f6f7f9; }
.method-panel { border: 1px solid #cfd6e2; }

.method-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 0; border: 1px solid #cfd6e2; border-bottom: 0; }
.mtab { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "k t go" "k d go"; column-gap: 12px; row-gap: 2px; align-items: center;
  text-align: left; padding: 16px 18px 16px; border: 0 !important; border-right: 1px solid #cfd6e2 !important; background: #f6f7f9; color: var(--fg-dim);
  border-top: 3px solid transparent !important; transition: background-color .14s ease-out, color .14s ease-out; }
.mtab:last-child { border-right: 0 !important; }
.mtab:hover { background: #fff; color: var(--fg); }
.mtab:hover .mt-go { transform: translateX(3px); opacity: 1; }
.mtab:active { transform: none; }
.mt-k { grid-area: k; font-size: 1.05rem; font-weight: 600; color: var(--fg-mute); }
.mt-t { grid-area: t; font-weight: 700; font-size: 0.98rem; color: inherit; }
.mt-d { grid-area: d; font-size: 0.82rem; font-weight: 500; color: var(--fg-mute); }
.mt-go { grid-area: go; font-size: 1.1rem; opacity: .45; transition: transform .14s ease-out, opacity .14s ease-out; }
.mtab.active { background: #fff; color: var(--fg); }
.mtab.active .mt-go { opacity: 0; }
.mtab[data-panel="m-kb"] { border-top-color: color-mix(in srgb, var(--know) 35%, transparent) !important; }
.mtab[data-panel="m-ground"] { border-top-color: color-mix(in srgb, var(--meas) 35%, transparent) !important; }
.mtab[data-panel="m-search"] { border-top-color: color-mix(in srgb, var(--reason) 35%, transparent) !important; }
.mtab[data-panel="m-kb"].active { border-top-color: var(--know) !important; background: var(--know-bg); }
.mtab[data-panel="m-ground"].active { border-top-color: var(--meas) !important; background: var(--meas-bg); }
.mtab[data-panel="m-search"].active { border-top-color: var(--reason) !important; background: var(--reason-bg); }
.mtab.active .mt-k { color: inherit; }
.mtab[data-panel="m-kb"].active .mt-k { color: var(--know); } .mtab[data-panel="m-ground"].active .mt-k { color: var(--meas); } .mtab[data-panel="m-search"].active .mt-k { color: var(--reason); }
.method-panel { border-top: 0 !important; border-radius: 0 0 var(--radius) var(--radius) !important; }
@media (max-width: 900px) { .method-tabs { grid-template-columns: 1fr; } .mtab { border-right: 0 !important; border-bottom: 1px solid #cfd6e2 !important; } }
.run-layout .layer-block.active { max-height: 300px; }
.run-layout { grid-template-columns: 172px minmax(0, 1fr); gap: 20px; }
.run-step { gap: 8px; padding: 6px 6px 6px 0; }
.rs-turn { font-size: 0.82rem; }
.rs-t { font-size: 0.78rem; line-height: 1.3; }
.run-layout .ground-demo { max-width: none; }
.run-layout .step-grid > .ground-demo, .run-layout .step-grid > .media { width: 100%; }
.run-layout .step-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: 18px; }
.run-layout .layer-block.active { max-height: 340px; }
.mt-k { font-variant-ligatures: none; font-feature-settings: "liga" 0, "dlig" 0, "calt" 0; }
.callout:hover, .callout.open { z-index: 4; }
.callouts:hover .callout.open:not(:hover) .bubble { opacity: 0; }
.callout .bubble { min-width: 170px; max-width: 220px; font-size: 0.68rem; }

.res-table-wrap { overflow-x: auto; margin-bottom: 18px; }
.res-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; background: #fff; border-top: 2px solid var(--fg); border-bottom: 2px solid var(--fg); }
.res-table th, .res-table td { padding: 7px 8px; text-align: center; white-space: nowrap; }
.res-table thead th { font-weight: 600; color: var(--fg-dim); font-size: 0.8rem; }
.res-table thead tr:first-child th { border-bottom: 1px solid #cfd6e2; }
.res-table thead tr:last-child th { border-bottom: 1px solid var(--fg); }
.res-table th.grp { color: var(--fg); }
.res-table tbody th { text-align: left; font-weight: 600; color: var(--fg); }
.res-table td { color: var(--fg-dim); }
.res-table td.all, .res-table th.all { border-left: 1px solid #e3e7ee; }
.res-table td.best { font-weight: 800; color: var(--fg); }
.res-table tr.ours { background: color-mix(in srgb, var(--accent) 7%, #fff); border-top: 1px solid #cfd6e2; }
.res-table tr.ours th, .res-table tr.ours td.best { color: var(--accent); }
.res-table tr.delta td, .res-table tr.delta th { font-style: italic; font-size: 0.8rem; color: var(--pass); font-weight: 600; }
.res-table tr.delta th { color: var(--fg-mute); }
.res-cap { font-size: 0.8rem; color: var(--fg-mute); margin: 8px 0 0; max-width: 110ch; }
.res-grid.res-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.res-4 .card-head p { font-size: 0.8rem; margin-bottom: 10px; }
.res-4 .card-head h3 { font-size: 1rem; margin-bottom: 2px; }
.kpi { font-size: 1.6rem; font-weight: 800; color: var(--accent); letter-spacing: -0.01em; line-height: 1.1; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 0.95rem; font-weight: 700; }
.res-4 .chart-box { height: 200px; }
.res-4 .heat td { padding: 6px 4px; }
@media (max-width: 900px) { .res-grid.res-4 { grid-template-columns: 1fr; } }
.res-table thead th[rowspan] { text-align: left; vertical-align: bottom; border-bottom: 1px solid var(--fg); }
.kpi span { margin-left: 1px; }

.fam-block + .fam-block { margin-top: 22px; }
.fam-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 6px; margin-bottom: 10px; border-bottom: 1px solid #cfd6e2; }
.fam-head h4 { margin: 0; font-size: 1rem; }
.fam-head span { font-size: 0.82rem; color: var(--fg-mute); }
#task-grid .task-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
#task-grid .task-card { cursor: default; }
.tc-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #0e1a33; }
.tc-media video { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; aspect-ratio: auto; max-width: none; }
.tc-media.half video { width: 200%; object-position: 0 50%; }
.tc-media.two3 video { width: 150%; object-position: 0 50%; }
.task-meta { align-items: flex-start; }
.task-meta b { font-size: 0.86rem; line-height: 1.35; display: block; }
.task-meta small { display: block; margin-top: 2px; }
@media (max-width: 900px) { #task-grid .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fam-block { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; }
.fam-block + .fam-block { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e3e7ee; }
.fam-head { display: block; border: 0; padding: 4px 0 0; margin: 0; }
.fam-head h4 { font-size: 1rem; margin-bottom: 4px; }
.fam-head span { display: block; line-height: 1.4; }
#task-grid .task-card { cursor: pointer; transition: border-color .14s ease-out; }
#task-grid .task-card:hover, #task-grid .task-card:focus-visible { border-color: var(--accent); }
.ex-media .tc-media { border: 1px solid #cfd6e2; }
@media (max-width: 900px) { .fam-block { grid-template-columns: 1fr; gap: 8px; } }
.tc-open { display: block; margin-top: 6px; font-size: 0.76rem; font-weight: 600; color: var(--accent); }
#task-grid .task-card .task-meta { cursor: pointer; }
#task-grid .task-card { cursor: default; }
.res-table { table-layout: fixed; min-width: 860px; }
.res-table col.c-method { width: 150px; }
.res-table td, .res-table thead tr:last-child th { text-align: right; padding-right: 14px; }
.res-table td.all, .res-table th.all { border-left: 0; }
.res-table .gs { border-left: 1px solid #cfd6e2; }
.res-table th.grp { text-align: center; padding-right: 8px; }
.res-table td.all { background: rgba(21, 34, 56, 0.035); }
.res-table tr.ours td.all { background: transparent; }
.res-table tbody th sub { line-height: 0; }
.res-table thead th[rowspan] { padding-left: 8px; }
.res-table th.grp { white-space: normal; line-height: 1.3; vertical-align: bottom; }
.res-table td.best { font-weight: 800; color: var(--fg); }
.res-table tr.ours td.best { color: var(--accent); }
.res-table td.gs, .res-table th.gs { border-left: 1px solid #cfd6e2; }
.res-cap { max-width: none; }
.res-grid.res-3 { grid-template-columns: 1.25fr 1fr 1fr; }
.res-3 .card-head p { font-size: 0.8rem; margin-bottom: 10px; }
.res-3 .card-head h3 { font-size: 1rem; margin-bottom: 2px; }
.res-3 .chart-box { height: 220px; }
.res-3 .heat td { padding: 6px 3px; }
.res-3 .heat td.row-label { white-space: normal; }
@media (max-width: 1000px) { .res-grid.res-3 { grid-template-columns: 1fr; } }
.res-grid.res-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-head h3 .down { color: var(--pass); font-weight: 800; margin-left: 2px; }

.lead-claim { font-size: 1.12rem; line-height: 1.55; color: var(--fg); max-width: 80ch; margin: 10px 0 0; }
.lead-claim b { color: var(--accent); }
.res-table tr.ours { background: color-mix(in srgb, var(--accent) 12%, #fff); }
.res-table tr.ours th { font-weight: 800; box-shadow: inset 3px 0 0 var(--accent); }
.res-table tr.ours td { font-size: 0.95rem; }
.res-table .gain { position: absolute; left: 14px; right: 14px; bottom: 5px; height: 3px; background: color-mix(in srgb, var(--pass) 12%, transparent); }
.res-table .gain i { position: absolute; right: 0; top: 0; bottom: 0; background: var(--pass); }
.res-3 .card { display: flex; flex-direction: column; }
.res-3 .card-head p { min-height: 3em; line-height: 1.5; }
.res-3 .chart-box { height: 250px; margin-top: auto; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; min-height: 20px; margin: 10px 0 4px; font-size: 0.76rem; color: var(--fg-dim); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-legend i { width: 10px; height: 10px; display: inline-block; }
.res-3 .chart-box { margin-top: 0; }
.res-3 .chart-legend { margin-top: auto; }

/* Mobile: keep the example-run section inside the viewport (later desktop rules above override the earlier breakpoint). */
@media (max-width: 900px) {
  .run-layout { grid-template-columns: minmax(0, 1fr); }
  .run-layout .step-grid, .step-grid { grid-template-columns: minmax(0, 1fr); }
  .run-layout .layer-tabs, .layer-tabs { flex-wrap: wrap; }
  .run-layout .ground-demo, .run-layout .layers, .run-layout .step-grid > *, .run-layout .layer-block { max-width: 100%; min-width: 0; width: 100%; }
  .hyp-table { display: block; max-width: 100%; overflow-x: auto; }
  .run-rail { position: static; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; }
}
html, body { overflow-x: clip; }

/* Mobile: animated figures. The caption popup becomes static and would stretch the stage, so pin the overlay SVG to the image height; .afig's 29% popup width must not win over the phone rule. */
@media (max-width: 900px) {
  .fig2-stage svg { bottom: auto; height: auto; }
  .fig2 .fig2-stage .fig2-pop, .afig .fig2-stage .fig2-pop, .fig2-stage .fig2-pop { position: static; width: auto; margin-top: 12px; box-shadow: none; }
  .fig2-steps { grid-template-columns: repeat(3, 1fr) !important; }
}
