/* FreeAct: neutral academic layout with consistent scientific chart colours. */
.viz-root {
  color-scheme: light;
  --page: #f1f2f4;
  --band: #f1f2f4;
  --surface-1: #ffffff;
  --surface-2: #f5f5f7;
  --text-primary: #16181d;
  --text-secondary: #555b65;
  --text-muted: #69717c;
  --grid: #e9ebef;
  --axis: #c6cbd3;
  --border: rgba(17, 17, 17, 0.09);
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 8px 24px -12px rgba(17, 17, 17, 0.12);
  --accent: #245ac7;
  --accent-soft: rgba(42, 120, 214, 0.10);
  /* identity: FreeAct / UniVLA / LAPA, also x / y / z */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --div-neg: #2a78d6;
  --div-mid: #f0efec;
  --div-pos: #e34948;
  --seq-0: #f0efec;
  --seq-1: #104281;
  --good: #278344;
  --critical: #d03b3b;
  --overlay-tok: #2a78d6;
  --overlay-trk: #eda100;
}
:root[data-theme="dark"] .viz-root {
    color-scheme: dark;
    --page: #0f0f0f;
    --band: #151514;
    --surface-1: #1a1a19;
    --surface-2: #232321;
    --text-primary: #f0efec;
    --text-secondary: #c3c2b7;
    --text-muted: #8d8c86;
    --grid: #2c2c2a;
    --axis: #44443f;
    --border: rgba(255, 255, 255, 0.09);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    --accent: #3987e5;
    --accent-soft: rgba(57, 135, 229, 0.16);
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --div-neg: #3987e5;
    --div-mid: #383835;
    --div-pos: #e66767;
    --seq-0: #2c2c2a;
    --seq-1: #86b6ef;
    --good: #80cf94;
    --critical: #ed8585;
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { margin: 0; }
body { background: #f1f2f4; -webkit-font-smoothing: antialiased; }
.viz-root {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background: var(--page);
  line-height: 1.65;
  font-size: 15px;
}
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 860px; }
.wrap.narrow { max-width: 916px; }
.center { text-align: center; }
a { color: var(--accent); }
h1, h2, h3 { letter-spacing: -0.01em; }
h2 { font-size: clamp(25px,3vw,32px); line-height: 1.3; margin: 0 0 6px; font-weight: 700; text-wrap: balance; }
h3 { font-size: 15px; margin: 24px 0 6px; font-weight: 650; }
code { font-size: 0.88em; font-family: ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.sub { color: var(--text-secondary); margin: 6px 0 12px; font-size: 14px; max-width: 920px; }
.muted { color: var(--text-muted); font-weight: 400; }
.kicker { font-size: 12.5px; font-weight: 650; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 6px; }

img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--page) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-in { max-width: 1160px; margin: 0 auto; padding: 0 28px; height: 52px; display: flex; align-items: center; gap: 28px; }
.topbar .brand { font-weight: 750; font-size: 16px; color: var(--text-primary); text-decoration: none; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; font-size: 13.5px; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: var(--text-secondary); text-decoration: none; padding: 5px 10px; border-radius: 8px; white-space: nowrap; transition: background .15s, color .15s; }
.nav-links a:hover { color: var(--text-primary); background: var(--surface-2); }
.nav-links a.active { color: var(--text-primary); background: var(--surface-2); font-weight: 600; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 60px 0 44px; background: var(--page); }
.venue { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--text-secondary); padding: 5px 12px; border: 1px solid var(--border); border-radius: 5px; }
.hero-heading { max-width: 1060px; }
h1.title { margin: 22px auto 20px; font-weight: 650; line-height: 1.22; letter-spacing: -.028em; text-wrap: balance; }
h1.title .name { display: block; font-size: clamp(40px, 5vw, 58px); color: var(--text-primary); margin-bottom: 10px; letter-spacing: -.04em; }
.paper-title { display: block; font-size: clamp(24px, 3.2vw, 37px); }
.title-zh { font-size: 16px; color: var(--text-secondary); margin: 0 auto 24px; max-width: 760px; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: 15px; font-weight: 500; }
.authors sup { color: var(--text-muted); font-weight: 400; }
.affil { color: var(--text-secondary); font-size: 13px; margin-top: 8px; }
.affil.small { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 24px 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px;
  background: var(--text-primary); color: #fff; text-decoration: none; font-size: 14.5px; font-weight: 600;
  transition: transform .15s, box-shadow .15s, opacity .15s; box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn svg.fill { fill: currentColor; stroke: none; }
.btn.disabled { background: var(--surface-2); color: var(--text-muted); box-shadow: none; cursor: not-allowed; border: 1px solid var(--border); }
.btn.disabled:hover { transform: none; }
.btn em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--page); border: 1px solid var(--border); }

/* pipeline strip */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 14px 0 0; position: relative; }
.pipe-step { position: relative; background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); padding-bottom: 14px; }
.pipe-step:not(:last-child)::after { display: none;
  content: ""; position: absolute; right: -11px; top: calc(37.5% - 8px); z-index: 2; width: 16px; height: 16px; border-radius: 50%;
  background: var(--page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4l4 4-4 4' fill='none' stroke='%23898781' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  border: 1px solid var(--border);
}
.pipe-step img, .pipe-step video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #000; }
.pipe-step .ps-k { font-size: 11.5px; color: var(--accent); font-weight: 650; margin: 12px 14px 0; letter-spacing: 0.03em; }
.pipe-step .ps-t { font-weight: 650; font-size: 15px; margin: 1px 14px 0; }
.pipe-step .ps-d { font-size: 12.5px; color: var(--text-secondary); margin: 3px 14px 0; line-height: 1.5; }
.pipe-tokens { aspect-ratio: 1 / 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; background: var(--surface-2); }
.pipe-tokens .row4 { display: flex; gap: 7px; }
.pipe-tokens .tk { font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; padding: 7px 10px 6px; border-radius: 9px; background: var(--surface-1); border: 1px solid var(--border); min-width: 44px; text-align: center; box-shadow: var(--shadow); }
.pipe-tokens .tk i { display: block; height: 4px; border-radius: 2px; margin-top: 5px; }
.pipe-tokens .cap { font-size: 12px; color: var(--text-muted); }
.tldr { max-width: 850px; margin: 22px auto 0; text-align: left; color: var(--text-secondary); font-size: 14px; }
.tldr b { color: var(--text-primary); }

/* ---------------------------------------------------------------- sections */
.sec { --sec-bg: var(--page); background: var(--sec-bg); padding: 84px 0; border-top: 1px solid var(--border); }
main > .sec:nth-of-type(odd) { --sec-bg: var(--band); }
.sec-head { max-width: 920px; margin-bottom: 22px; }
.answer { margin: 10px 0 0; font-size: 15.5px; color: var(--text-secondary); }
.answer b { color: var(--text-primary); }
.prose { font-size: 16px; color: var(--text-secondary); text-align: left; margin: 14px 0 0; line-height: 1.85; }
.prose b, .prose em { color: var(--text-primary); }
.panel { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; box-shadow: none; margin-top: 16px; }
h3.sub-h { font-size: 18px; margin: 44px 0 4px; }

/* method */
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0 26px; }
.stage-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.stage-card b { font-size: 15px; display: block; margin-top: 10px; }
.stage-card p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }
.stage-card.alt { background: transparent; border-style: dashed; box-shadow: none; }
.sn { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent); }
.fig-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; margin-bottom: 12px; }
.fig-tabs button { border: 0; background: transparent; border-radius: 9px; padding: 6px 14px; font-size: 13.5px; color: var(--text-secondary); }
.fig-tabs button[aria-selected="true"] { background: var(--surface-1); color: var(--text-primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.paper-fig { margin: 0; }
.fig-bg { position: relative; background: #fff; border-radius: 16px; border: 1px solid var(--border); padding: 18px; box-shadow: var(--shadow); }
.fig-bg img { width: 100%; display: block; }
.paper-fig figcaption { font-size: 13.5px; color: var(--text-secondary); margin: 12px 4px 0; max-width: 980px; line-height: 1.7; }
.paper-fig figcaption b { color: var(--text-primary); }
.kpi-head { margin-top: 52px; }
.kpi-head h3 { font-size: 18px; margin: 0; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.kpi { display: block; text-decoration: none; color: inherit; background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.kpi:hover { transform: translateY(-2px); border-color: var(--axis); }
.kpi .kq { font-size: 12px; color: var(--accent); font-weight: 650; letter-spacing: 0.03em; }
.kpi .kt { font-weight: 600; font-size: 14.5px; margin: 4px 0 12px; line-height: 1.45; }
.kpi .kv { font-size: clamp(24px,2.5vw,30px); font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .kv small { font-size: 15px; font-weight: 550; color: var(--text-secondary); }
.kpi .kd { font-size: 12.5px; color: var(--text-secondary); margin-top: 8px; line-height: 1.55; }

/* ---------------------------------------------------------------- controls */
.controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 14px; font-size: 13.5px; }
.controls label { color: var(--text-secondary); display: flex; gap: 6px; align-items: center; min-width: 0; max-width: 100%; white-space: nowrap; }
.controls label select { min-width: 0; text-overflow: ellipsis; }
select, button {
  font: inherit; font-size: 13px; color: var(--text-primary); background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 9px; min-height: 40px; padding: 8px 10px; cursor: pointer; transition: border-color .15s, background .15s;
}
select { padding-right: 26px; appearance: none; -webkit-appearance: none; max-width: 100%;
  background: var(--surface-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23898781' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") right 8px center / 12px no-repeat; }
select:hover, button:hover { border-color: var(--axis); }
button[aria-pressed="true"] { background: var(--text-primary); color: var(--page); border-color: var(--text-primary); }
.seg { display: inline-flex; }
.seg button, .seg select { border-radius: 0; margin-left: -1px; }
.seg > :first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.seg > :last-child { border-radius: 0 9px 9px 0; }
.chip-btn { border-radius: 999px; padding: 3px 11px; }
.sticky-controls { position: sticky; top: 60px; z-index: 6; padding: 10px 0; margin: 22px 0 6px;
  background: color-mix(in srgb, var(--sec-bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.transport { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--text-secondary); }
.transport .pp { min-width: 56px; background: var(--text-primary); color: var(--page); border-color: var(--text-primary); font-weight: 600; }
.transport input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
.transport .t { font-variant-numeric: tabular-nums; min-width: 96px; text-align: right; }

/* ---------------------------------------------------------------- setting */
.setting-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.setting-grid figure { margin: 0; }
.setting-grid video { width: 100%; aspect-ratio: 1 / 1; display: block; border-radius: 12px; background: #000; }
.setting-grid figcaption { font-size: 13px; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }
.setting-grid figcaption b { color: var(--text-primary); }
.missing { aspect-ratio: 1 / 1; border: 1px dashed var(--axis); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; text-align: center; padding: 12px; }

/* ---------------------------------------------------------------- paper results */
.result-card { min-width: 0; padding: 26px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-1); }
.result-card h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.5; }
.result-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.result-card .sub { font-size: 13px; line-height: 1.8; }
.result-source, .result-caption-small { color: var(--text-muted); font-size: 11px; line-height: 1.7; }
.result-source { white-space: nowrap; }
.result-caption-small { margin: 18px 0 0; }
.result-control { display: inline-flex; align-items: center; gap: 12px; margin: 14px 0 8px; font-size: 12px; color: var(--text-secondary); }
.result-control select { min-height: 36px; max-width: 100%; padding: 4px 28px 4px 10px; font: inherit; }
.result-table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.result-table th, .result-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.result-table thead th { color: var(--text-muted); font-weight: 500; font-size: 11px; }
.result-table tbody th { font-weight: 550; }
.result-table tr:last-child th, .result-table tr:last-child td { border-bottom: 0; }
.result-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.result-table th:last-child { text-align: right; }
.coverage-card { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 36px; padding: 30px; }
.coverage-copy h3 { font-size: 24px; margin: 12px 0; max-width: 380px; text-wrap: balance; }
.coverage-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 26px 0 0; }
.coverage-facts > div:last-child { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--border); }
.coverage-facts dt { color: var(--text-secondary); font-size: 12px; }
.coverage-facts dd { margin: 4px 0; font-size: 30px; line-height: 1.5; letter-spacing: -.03em; font-weight: 600; font-variant-numeric: tabular-nums; }
.coverage-facts dd span { color: var(--text-muted); font-size: 18px; }
.coverage-facts > div:last-child dd { font-size: 20px; letter-spacing: 0; }
.coverage-facts > div dd.coverage-note { color: var(--text-muted); font-size: 11px; font-weight: 400; letter-spacing: 0; margin: 2px 0; }
.coverage-native { min-width: 0; padding: 18px 16px 14px; border: 1px solid var(--border); border-radius: 8px; }
.coverage-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 14px; font-size: 12px; color: var(--text-secondary); }
.coverage-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.coverage-legend i { display: block; width: 17px; height: 2px; background: var(--curve); }
.coverage-plot { min-height: 265px; }
.coverage-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.coverage-plot text { font: 11px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: var(--text-muted); font-variant-numeric: tabular-nums; }
.coverage-plot .coverage-axis-label { font-size: 12px; fill: var(--text-secondary); }
.coverage-plot .coverage-grid { stroke: var(--grid); stroke-width: 1; }
.coverage-plot .coverage-axis { stroke: var(--axis); stroke-width: 1; }
.coverage-plot .coverage-guide { stroke: var(--axis); stroke-dasharray: 3 4; pointer-events: none; }
.coverage-sample { cursor: crosshair; outline: none; }
.coverage-sample rect { fill: transparent; }
.coverage-sample:focus-visible rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 3; }
.coverage-plot .coverage-point { stroke-width: 1.5; pointer-events: none; }
.coverage-plot .coverage-point.active { stroke-width: 2; }
.coverage-detail { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.coverage-detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--text-muted); }
.coverage-detail-head b { font-size: 12px; font-weight: 550; color: var(--text-primary); }
.coverage-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.coverage-values > div { min-width: 0; }
.coverage-values span { display: block; color: var(--text-secondary); font-size: 11px; }
.coverage-values strong { display: block; margin-top: 2px; font-size: 17px; font-weight: 550; font-variant-numeric: tabular-nums; color: var(--curve); }
.result-figure { margin: 0; min-width: 0; }
.result-figure .fig-bg { padding: 42px 16px 16px; box-shadow: none; border-radius: 8px; }
.result-figure img { display: block; width: 100%; height: auto; }
.result-figure figcaption { color: var(--text-secondary); font-size: 12px; line-height: 1.8; margin: 14px 2px 0; }
.result-figure figcaption b { color: var(--text-primary); font-weight: 600; }
.result-block-head { margin: 52px 0 22px; }
.result-block-head h3 { margin: 0 0 10px; font-size: 25px; }
.probe-card .result-control { margin: 0; }
.probe-results { margin-top: 18px; }
.probe-results td, .probe-results thead th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.probe-results .ours { background: var(--accent-soft); }
.probe-results .ours td, .probe-results .ours th { font-weight: 650; color: var(--text-primary); }
.geometry-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.8fr); align-items: start; gap: 20px; margin-top: 24px; }
.result-next { display: inline-flex; align-items: center; gap: 24px; margin-top: 32px; padding: 10px 0; font-size: 13px; font-weight: 550; text-decoration: none; border-bottom: 1px solid var(--axis); }
.result-next:hover { border-color: var(--accent); }
.refinement-note { padding: 18px 0 18px 20px; margin: 20px 0; border-left: 2px solid var(--accent); color: var(--text-secondary); font-size: 13px; line-height: 1.8; }
.refinement-note b { color: var(--text-primary); font-weight: 600; }
@media (max-width: 800px) {
  .coverage-card, .geometry-grid { grid-template-columns: minmax(0, 1fr); }
  .result-card { padding: 20px; }
  .coverage-card { gap: 24px; }
  .coverage-copy h3 { font-size: 21px; max-width: none; }
  .coverage-facts dd { font-size: 26px; }
  .coverage-native { padding: 16px 10px 14px; }
  .result-card-head { gap: 6px; }
  .result-block-head h3 { font-size: 22px; }
  .geometry-grid .result-figure:first-child .fig-bg { max-width: 440px; margin: 0 auto; }
  .probe-card .result-control { margin-top: 12px; }
}

/* ---------------------------------------------------------------- Q1 stage */
.stage { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.video-wrap { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 1 / 1; }
.video-wrap video { width: 100%; height: 100%; display: block; }
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.overlay-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-secondary); margin-top: 8px; }
.overlay-key span { display: inline-flex; align-items: center; gap: 6px; }
.dot.track { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: var(--overlay-trk); display: inline-block; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.arrow { width: 22px; height: 0; border-top: 3px solid; display: inline-block; position: relative; }
.arrow::after { content: ""; position: absolute; right: -2px; top: -6px; border: 4.5px solid transparent; border-left: 7px solid; border-left-color: inherit; }
.arrow.tok { border-color: var(--overlay-tok); }
.arrow.trk { border-color: var(--overlay-trk); border-top-style: dashed; }
.video-badge { position: absolute; left: 10px; top: 10px; font-size: 12px; color: #fff; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); padding: 3px 9px; border-radius: 7px; pointer-events: none; }
.side-block { margin-bottom: 18px; }
.side-block h3 { margin: 0 0 8px; font-size: 14px; }
.artifact-list { display: flex; flex-direction: column; gap: 6px; }
.artifact {
  text-align: left; display: flex; gap: 10px; align-items: baseline; padding: 8px 11px; border-radius: 10px;
  border: 1px solid transparent; background: var(--surface-2); font-size: 13px; line-height: 1.45; width: 100%;
}
.artifact:hover { border-color: var(--axis); }
.artifact .at { font-variant-numeric: tabular-nums; color: var(--text-muted); flex: none; min-width: 42px; }
.artifact.on { border-color: var(--critical); background: color-mix(in srgb, var(--critical) 8%, var(--surface-2)); }
.artifact-empty { font-size: 13px; color: var(--text-muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.token-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 10px; }
.chip { border-radius: 10px; padding: 7px 9px; font-size: 11.5px; color: var(--text-secondary); background: var(--surface-2); }
.chip .code { font-size: 20px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.chip .sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.readout { font-size: 13.5px; color: var(--text-secondary); line-height: 1.75; }
.readout b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.stat-big { display: flex; gap: 24px; flex-wrap: wrap; }
.stat-big div { font-size: 12px; color: var(--text-muted); }
.stat-big b { display: block; font-size: 24px; color: var(--text-primary); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* gallery */
.gallery { scroll-snap-type: x proximity; display: flex; gap: 10px; overflow-x: auto; padding: 3px 3px 8px; scrollbar-width: thin; }
.thumb { scroll-snap-align: start; flex: 0 0 104px; position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; transition: transform .15s, outline-color .15s; }
.thumb img { width: 100%; aspect-ratio: 1 / 1; display: block; object-fit: cover; }
.thumb .tl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 4px;
  font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.78)); padding: 14px 7px 5px; font-variant-numeric: tabular-nums; }
.thumb:hover { transform: translateY(-2px); }
.thumb.on { outline-color: var(--accent); }
.scatter-grid { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 24px; align-items: start; }

/* ---------------------------------------------------------------- charts */
.chart { margin-top: 16px; position: relative; }
.panel > .chart:first-child, .scatter-grid .chart, .two-col .chart { margin-top: 0; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .title, .table-wrap .title { font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); margin: 2px 0 6px; }
.legend .key { display: inline-flex; align-items: center; gap: 5px; }
.legend .line { width: 16px; height: 0; border-top: 2px solid; display: inline-block; }
.legend .line.dash { border-top-style: dashed; }
.legend .box { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
svg text { font-family: inherit; }
.tick text { fill: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.tick line, .gridline { stroke: var(--grid); stroke-width: 1; }
.baseline { stroke: var(--axis); stroke-width: 1; }
.cursor { stroke: var(--text-primary); stroke-width: 1; opacity: 0.5; pointer-events: none; }
.hit { fill: transparent; cursor: crosshair; }
.bar-label { fill: var(--text-primary); font-size: 12px; font-variant-numeric: tabular-nums; }
.bar-cat { fill: var(--text-secondary); font-size: 12px; }
.drow:hover rect:first-child { fill: var(--surface-2); }

/* ---------------------------------------------------------------- Q2 */
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0 0; }
.method-step { background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; font-size: 13px; color: var(--text-secondary); line-height: 1.55; }
.method-step b { display: block; color: var(--text-primary); font-size: 14.5px; margin: 8px 0 2px; }
.triptych { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.triptych figure { margin: 0; }
.triptych video { width: 100%; display: block; border-radius: 12px; background: #000; aspect-ratio: 1 / 1; }
.triptych figcaption { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }
.triptych figcaption b { color: var(--text-primary); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--grid); max-width: none; }

/* ---------------------------------------------------------------- Q3 */
.policy-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.policy-col { background: var(--surface-1); border: 1px solid var(--border); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.policy-col h3 { margin: 0; font-size: 15.5px; }
.policy-col .meta { font-size: 12px; color: var(--text-muted); margin: 2px 0 8px; min-height: 2.6em; line-height: 1.45; }
.policy-col .meta code { font-size: 11px; }
.policy-col video { width: 100%; display: block; border-radius: 10px; background: #000; aspect-ratio: 1 / 1; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; padding: 2px 10px; border-radius: 999px; }
.badge.ok { background: color-mix(in srgb, var(--good) 13%, transparent); color: var(--good); }
.badge.fail { background: color-mix(in srgb, var(--critical) 12%, transparent); color: var(--critical); }
.badge.ok::before { content: "✓"; font-weight: 800; }
.badge.fail::before { content: "✕"; font-weight: 800; }
.badge-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--text-muted); }

/* ---------------------------------------------------------------- details, tables */
details.more { margin-top: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-1); }
details.more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-primary); padding: 13px 18px; list-style: none; display: flex; align-items: center; gap: 10px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(-45deg); transition: transform .2s; }
details.more[open] summary::before { transform: rotate(45deg); }
.more-body { padding: 0 18px 16px; }
.ground-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
table { border-collapse: collapse; font-size: 13px; width: 100%; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--grid); text-align: right; font-variant-numeric: tabular-nums; }
th { color: var(--text-secondary); font-weight: 600; }
th:first-child, td:first-child { text-align: left; }
td[rowspan] { vertical-align: top; color: var(--text-secondary); }
.box-inline { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }

/* citation */
.bibtex { position: relative; margin-top: 16px; }
.bibtex pre { margin: 0; background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; font-size: 13px; line-height: 1.65;
  overflow-x: auto; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--text-primary); }
.bibtex .copy { position: absolute; right: 12px; top: 12px; font-size: 12px; padding: 4px 11px; }

.foot { border-top: 1px solid var(--border); padding: 28px 0 40px; font-size: 12.5px; color: var(--text-muted); }
.foot .wrap { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }

/* tooltip */
.tooltip {
  position: fixed; z-index: 30; pointer-events: none; background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font-size: 12px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.25); max-width: 320px; font-variant-numeric: tabular-nums;
}
.tooltip .tt-h { font-weight: 600; margin-bottom: 3px; }
.tooltip .row { display: flex; justify-content: space-between; gap: 14px; color: var(--text-secondary); }
.tooltip .row b { color: var(--text-primary); font-weight: 600; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .stages { grid-template-columns: 1fr 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipe-step:nth-child(2)::after { display: none; }
  .scatter-grid { grid-template-columns: 1fr 1fr; }
  .scatter-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .wrap, .topbar-in { padding: 0 18px; }
  .topbar-in { gap: 14px; }
  .hero { padding: 40px 0; }
  .sec { padding: 52px 0; }
  h2 { font-size: 23px; }
  .panel { padding: 14px; border-radius: 14px; }
  .stage, .ground-grid, .triptych, .policy-cols, .setting-grid, .kpis, .method, .two-col, .scatter-grid, .stages, .pipeline { grid-template-columns: minmax(0, 1fr); }
  .pipe-step::after { display: none; }
  .prose { text-align: left; }
  .transport { flex-wrap: wrap; }
  .transport .t { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Research overview: type, evidence, then the interactive media. */
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 20px; top: -70px; z-index: 100; padding: 12px 20px; background: var(--surface-1); border-radius: 8px; }
.skip-link:focus { top: 10px; }
.topbar { background: color-mix(in srgb, var(--page) 90%, transparent); }
.topbar-in { height: 60px; gap: 22px; }
.topbar .brand { font-size: 19px; font-weight: 700; letter-spacing: -.05em; }
.nav-links { margin-left: auto; }
.nav-links a { font-size: 12px; padding: 8px; border-radius: 4px; }
.nav-links a.active { box-shadow: inset 0 -2px var(--accent); background: transparent; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 40px; padding: 0; font-size: 22px; border: 0; background: transparent; }
.menu-toggle { display: none; }
.reading-progress { height: 2px; position: absolute; bottom: -1px; width: 100%; overflow: hidden; }
.reading-progress span { display: block; width: 100%; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.venue { border: 0; padding: 0; color: var(--accent); font-size: 12px; letter-spacing: .09em; }
h1.title .name { margin-bottom: 12px; }
.hero-heading .paper-title { font-weight: 600; }
.btn { box-shadow: none; font-size: 13px; }
.btn.primary { background: var(--accent); }
:root[data-theme="dark"] .btn { background: #e9ebef; color: #17191e; }
:root[data-theme="dark"] .btn.primary { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn.disabled { background: var(--surface-2); color: var(--text-muted); }
.paper-results { display: flex; align-items: center; justify-content: center; gap: 42px; margin: 36px 0 0; }
.paper-results > div { min-width: 130px; text-align: center; display: flex; flex-direction: column; gap: 5px; }
.paper-results strong { font-size: 40px; font-weight: 600; letter-spacing: -.05em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.paper-results strong span { font-size: 22px; margin-left: 2px; }
.paper-results > div > span { font-size: 12px; color: var(--text-secondary); }
.paper-results > div:nth-of-type(2) strong { color: var(--accent); }
.result-arrow { color: var(--axis); font-size: 24px; font-weight: 300; }
.result-caption { text-align: center; color: var(--text-muted); font-size: 11px; margin: 14px 0 28px; }
.hero-lab { background: #191d26; color: #f5f6f8; padding: 20px; border-radius: 16px; }
.demo-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 13px; font-weight: 550; padding-bottom: 4px; }
.demo-toolbar button { background: #292f3b; border-color: #414959; color: #f0f3fa; font-size: 12px; min-height: 36px; }
.hero-lab .pipeline { gap: 14px; }
.hero-lab .pipe-step { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding-bottom: 4px; }
.hero-lab .pipe-step video { border-radius: 7px; }
.hero-lab .pipe-step .ps-k { color: #a9b4c8; font-size: 10px; letter-spacing: .07em; margin-left: 0; }
.hero-lab .pipe-step .ps-t { color: #f6f7fa; font-size: 14px; margin-left: 0; }
.hero-lab .pipe-step .ps-d { color: #b7bfcc; font-size: 11px; margin-left: 0; }
.hero-lab .pipe-tokens { background: #242b39; border: 1px solid #3b465a; border-radius: 7px; }
.hero-lab .pipe-tokens .tk { background: #303a4c; color: #f2f5ff; border-color: #4b5871; box-shadow: none; font-weight: 500; }
.hero-lab .pipe-tokens .cap { color: #b9c4d8; font-size: 10px; }
.hero-lab :focus-visible { outline-color: #a7c5ff; }
.sec-head { margin-bottom: 26px; }
.answer { line-height: 1.9; }
.kicker { color: var(--text-muted); font-size: 11px; letter-spacing: .08em; margin-bottom: 12px; }
.stages { gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 28px 0; }
.stage-card { background: transparent; border: 0; border-right: 1px solid var(--border); border-radius: 0; box-shadow: none; padding: 20px; }
.stage-card:first-child { padding-left: 0; }
.stage-card:last-child { border: 0; }
.stage-card.alt { border-style: solid; }
.sn { background: transparent; color: var(--text-muted); border: 1px solid var(--axis); border-radius: 50%; }
.fig-bg { padding-top: 46px; border-radius: 10px; box-shadow: none; }
.figure-expand { position: absolute; right: 12px; top: 8px; background: #fff; color: #303746; min-height: 32px; font-size: 12px; }
.fig-tabs { max-width: 100%; }
.fig-tabs button { white-space: normal; }
.kpi { border-radius: 10px; box-shadow: none; padding: 22px; display: flex; flex-direction: column; border-top: 2px solid var(--axis); }
.kpi:hover { border-top-color: var(--accent); }
.kpi .kv { margin-top: auto; }
.kpi .kd { min-height: 4.6em; }
.controls { gap: 12px; }
.controls label { flex-wrap: wrap; white-space: normal; font-size: 12px; }
.controls label select { max-width: min(100%, 460px); }
.video-badge { max-width: calc(100% - 20px); }
.policy-col { border-radius: 10px; box-shadow: none; border-top: 3px solid var(--axis); }
.policy-col:nth-child(2) { border-top-color: var(--series-1); }
.policy-col:nth-child(3) { border-top-color: var(--series-2); }
.chart { overflow-x: auto; overflow-y: hidden; }
.chart svg { max-width: none; }
.stage > *, .two-col > *, .scatter-grid > *, .ground-grid > * { min-width: 0; }
.table-wrap, .more-body { overflow-x: auto; }
.tooltip { max-width: min(320px, calc(100vw - 16px)); }
.bibtex pre { padding-top: 56px; box-shadow: none; border-radius: 10px; }
.resource-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 48px; }
.resource-links a { display: flex; flex-direction: column; gap: 6px; padding: 16px 12px; border-bottom: 1px solid var(--axis); text-decoration: none; }
.resource-links a:hover { border-color: var(--accent); }
.resource-links span { font-size: 10px; color: var(--text-muted); }
.resource-links b { font-size: 13px; color: var(--text-primary); }
#q1-answer b[style*="overlay-trk"] { color: #8a5a00 !important; }
:root[data-theme="dark"] #q1-answer b[style*="overlay-trk"] { color: #f2bb4b !important; }
.figure-expand:focus-visible, #close-figure:focus-visible { outline-color: #245ac7; }
.back-top { position: fixed; right: 24px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%; box-shadow: var(--shadow); z-index: 10; }
#figure-dialog { width: min(96vw, 1600px); max-height: 92vh; border: 1px solid #ddd; border-radius: 10px; padding: 60px 24px 20px; background: #fff; color: #17191d; overflow: auto; }
#figure-dialog::backdrop { background: #11151bcc; backdrop-filter: blur(5px); }
#figure-dialog img { display: block; width: 100%; min-width: 900px; }
#figure-dialog p { font-size: 12px; }
#close-figure { position: sticky; top: 0; float: right; margin-top: -44px; background: #fff; color: #17191d; z-index: 2; }
.no-script { padding: 24px; text-align: center; }
@media (max-width: 960px) {
  .topbar-in { gap: 14px; }
  .nav-links a { padding: 8px 5px; font-size: 11px; }
  .hero-lab .pipeline { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stage-card { border-bottom: 1px solid var(--border); }
  .stage-card:first-child { padding-left: 20px; }
  .stage-card:nth-child(2) { border-right: 0; }
}
@media (max-width: 800px) {
  .nav-actions { margin-left: auto; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 16px; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 60px; background: var(--surface-1); padding: 14px 20px 20px; border-bottom: 1px solid var(--border); grid-template-columns: 1fr 1fr; box-shadow: var(--shadow); }
  .nav-links.open { display: grid; }
  .nav-links a { padding: 12px; font-size: 14px; }
  .desktop-break { display: none; }
  .hero { padding: 36px 0; }
  .paper-results { gap: 12px; margin-top: 30px; }
  .paper-results > div { min-width: 0; flex: 1; }
  .paper-results strong { font-size: 34px; }
  .paper-results > div > span { font-size: 11px; }
  .result-caption { font-size: 10px; }
  .hero-lab { padding: 14px; border-radius: 10px; }
  .hero-lab .pipe-tokens .tk { min-width: 22px; padding: 4px; font-size: 14px; }
  .hero-lab .row4 { gap: 4px; }
  .hero-lab .pipe-tokens .cap { font-size: 9px; }
  .hero-lab .pipe-step .ps-d { font-size: 10px; }
  .sec { padding: 56px 0; }
  .controls label { width: 100%; }
  .controls select { flex: 1; }
  .sticky-controls { position: static; }
  .kpi .kd { min-height: 0; }
  .kpi .kv { margin-top: 6px; }
  .scatter-grid { grid-template-columns: minmax(0, 1fr); }
  .transport { gap: 6px; }
  .transport .t { font-size: 11px; }
  .transport input { flex-basis: 100%; order: 1; }
  .panel { padding: 16px; }
  .fig-bg { padding: 42px 8px 12px; }
  .resource-links { grid-template-columns: 1fr 1fr; }
  .back-top { right: 16px; bottom: 16px; }
}
@media print {
  .topbar, .transport, .controls, .back-top, .figure-expand { display: none !important; }
  .sec { break-inside: avoid; padding: 24px 0; }
}

/* Shared interaction rhythm: short responses, no perpetual decorative animation. */
.viz-root { --ease: cubic-bezier(.2,.7,.2,1); --fast: 150ms; --normal: 220ms; }
button, .btn, .nav-links a, .thumb, .kpi, .resource-links a {
  -webkit-tap-highlight-color: transparent;
  transition: color var(--fast), background-color var(--fast), border-color var(--fast),
    box-shadow var(--fast), transform var(--fast) var(--ease);
}
button:active:not(:disabled), .btn:active { transform: translateY(1px); }
button:disabled { opacity: .4; cursor: default; }
.nav-links a { position: relative; }
.nav-links a.active { box-shadow: none; }
.nav-links a::after { content: ''; position: absolute; inset: auto 8px 2px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform var(--normal) var(--ease); transform-origin: left; }
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a:focus-visible, button:focus-visible, .btn:focus-visible { outline-offset: 3px; }
.hero { padding-top: 46px; }
.hero-heading .title { margin-top: 18px; }
.demo-toolbar { font-variant-numeric: tabular-nums; }
.demo-toolbar button { min-width: 112px; }
.panel { border-color: color-mix(in srgb, var(--axis) 55%, transparent); }
.controls { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--grid); }
.controls:empty { padding: 0; border: 0; }
.controls select { min-height: 42px; }
.transport { min-height: 48px; padding: 8px 0 2px; }
.transport .pp { min-width: 64px; }
.transport input[type="range"] { cursor: pointer; height: 24px; touch-action: pan-y; }
.transport .step { min-width: 40px; }
.transport .t { font-size: 11px; white-space: nowrap; }
.chip { border: 1px solid transparent; }
.chip:focus-visible { border-color: var(--accent); }
.chip .code-value { min-width: 2ch; }
.gallery { padding: 6px 4px 12px; scroll-padding-inline: 4px; overscroll-behavior-x: contain; }
.thumb.on { outline-color: var(--accent); }
.thumb img { transition: opacity var(--normal); }
.policy-col .badge-row { min-height: 26px; }
.policy-col h3 { font-size: 16px; }
.policy-col .meta { line-height: 1.6; min-height: 3.6em; }
.policy-cols:empty { min-height: 400px; }
#app-videos:empty { min-height: 300px; }
#policy-summary:empty { min-height: 300px; }
#scatter-x:empty, #scatter-y:empty, #baseline-bars:empty { min-height: 300px; }
.load-state { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.load-state button { font-size: 12px; min-height: 32px; }
.group-playback-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; color: var(--text-secondary); font-size: 12px; }
.group-playback-state button { min-height: 36px; font-size: 12px; }
.video-loop-surface { position: relative; width: 100%; }
.video-wrap > .video-loop-surface { height: 100%; }
.video-loop-cover { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.triptych figcaption .cap { display: block; min-height: 3em; font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.readout-tail { min-height: 1.75em; font-size: 12px; }
.motion-readout { min-height: 3.5em; }
.setting-grid:empty { min-height: 360px; }
@media (max-width: 720px) {
  .setting-grid:empty { min-height: calc(300vw - 80px); }
  .motion-readout { min-height: 5.25em; }
}
.demo-toolbar small { margin-left: 12px; color: #b7bfcc; font-size: 11px; font-weight: 400; }
.playback-note { font-size: 12px; color: var(--text-muted); }
.chart:focus-within { outline-offset: 3px; }
.chart svg { vertical-align: top; }
.table-wrap { overscroll-behavior-x: contain; }
.table-wrap th { white-space: nowrap; }
.more-body { padding-top: 8px; }
.modal-open { overflow: hidden; }
#figure-dialog { padding: 64px 24px 24px; }
.back-top { transition: background-color var(--fast), transform var(--fast); }
.back-top:hover { transform: translateY(-2px); }
.resource-links a:hover b { color: var(--accent); }
@media (hover: hover) {
  .kpi:hover { transform: translateY(-2px); box-shadow: 0 7px 22px -16px #0006; }
  .thumb:hover img { opacity: .88; }
}
@media (max-width: 800px) {
  .hero { padding-top: 32px; }
  .nav-links.open { animation: menu-in var(--normal) var(--ease); }
  .menu-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
  .menu-toggle span { display: inline-block; transition: transform var(--normal) var(--ease); }
  .controls { gap: 10px; }
  .controls label { display: grid; grid-template-columns: 36px minmax(0,1fr); }
  .controls label select { width: 100%; }
  .controls .seg { max-width: 100%; }
  .policy-cols:empty { min-height: 1100px; }
  #app-videos:empty { min-height: 950px; }
  .transport .t { margin-left: auto; }
  .gallery::after { content: ''; flex: 0 0 5px; }
  .hero-lab .pipe-step .ps-t { font-size: 13px; }
  .hero-lab .pipe-step .ps-d { font-size: 11px; }
  .hero-lab .pipe-tokens .cap { font-size: 10px; padding: 0 6px; text-align: center; }
}
@keyframes menu-in { from { opacity: .5; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .kpi:hover, .btn:hover, .thumb:hover, .back-top:hover { transform: none; }
}
