/* EmoHarness project page. Colors follow the paper's figures:
   purple = MHE, blue = student / GPT-6.1 Sol, amber = audio-derived evidence. */
:root {
  color-scheme: light;
  --ink: #26303b;
  --ink-2: #3b4655;
  --muted: #5b6875;
  --faint: #6e7a86;
  --line: #e2e7ec;
  --line-2: #cfd8e0;
  --wash: #f6f8fa;
  --surface: #ffffff;

  --mhe: #6a3d9a;
  --mhe-tint: #f3eef8;
  --mhe-line: #d8c9e8;
  --student: #3f6ea5;
  --sol: #2c8bb8;
  --audio: #8a5c12;
  --audio-mark: #b8862b;
  --audio-tint: #fbf5e8;
  --audio-line: #ecd9b3;
  --ok: #2c7a4b;
  --ok-tint: #e8f3ec;
  --err: #b0443a;
  --err-tint: #f9ebe8;
  --video: #a3adb8;
  --shared: #66737f;

  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 6px;
  --container: 1120px;
  --topbar: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--surface);
  font-feature-settings: "cv11", "ss03";
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; }
a { color: var(--student); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
code, pre { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
:focus-visible { outline: 3px solid #9b7cc4; outline-offset: 3px; border-radius: 4px; }
strong, b { font-weight: 650; }

h2 { font-size: 30px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 750; }
h3 { font-size: 17px; line-height: 1.4; letter-spacing: -0.005em; font-weight: 650; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 40px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 50; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }

.brand-emo { color: var(--mhe); }
.brand-harness { color: var(--student); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.page-nav { display: flex; gap: 4px; }
.page-nav a { padding: 6px 11px; font-size: 14px; font-weight: 500; color: var(--muted); border-radius: 8px; }
.page-nav a:hover { color: var(--ink); background: var(--wash); text-decoration: none; }
.page-nav a.active { color: var(--mhe); background: var(--mhe-tint); font-weight: 600; }
.menu-toggle { display: none; align-items: center; gap: 8px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; font-size: 14px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 72px; background: linear-gradient(180deg, #fbfaff 0%, #ffffff 520px); }
.title-block { text-align: center; }
.wordmark { display: flex; justify-content: center; align-items: center; gap: 16px; font-size: 56px; line-height: 1.1; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 14px; }
.wordmark img { width: 76px; height: 76px; }
.hero h1 { max-width: 860px; margin: 0 auto 24px; font-size: 27px; line-height: 1.38; font-weight: 600; letter-spacing: -0.015em; color: var(--ink-2); }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: 17px; font-weight: 500; color: var(--ink); }
.authors a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.authors a:hover { color: var(--student); text-decoration-color: currentColor; }
sup { font-size: 0.68em; margin-left: 1px; color: var(--muted); font-weight: 500; }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 22px; margin-top: 10px; font-size: 15px; color: var(--muted); }
.affiliations sup { margin: 0 3px 0 0; }
.resource-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.pill { display: inline-flex; align-items: center; gap: 9px; padding: 9px 22px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; border: 1px solid var(--ink); transition: background-color .15s, border-color .15s; }
.pill:hover { background: var(--mhe); border-color: var(--mhe); text-decoration: none; }
.pill.secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.pill.secondary:hover { border-color: var(--mhe); color: var(--mhe); background: var(--surface); }

.hero-showcase { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 56px; align-items: start; margin-top: 60px; }
.hero-kicker { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--mhe); margin-bottom: 12px; }
.hero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mhe); box-shadow: 0 0 0 4px var(--mhe-tint); }
.hero-idea { font-size: 36px; line-height: 1.2; font-weight: 750; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 20px; text-wrap: balance; }
.hero-caption { font-size: 16px; line-height: 1.75; color: var(--ink-2); max-width: 34em; }
.hero-caption + .hero-caption { margin-top: 12px; }
.property-label { margin-top: 26px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.property-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.property-tags li { font-size: 13.5px; line-height: 1.4; padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink-2); }
.property-tags strong { color: var(--err); font-weight: 650; margin-right: 3px; }

/* Case demo card */
.case-demo { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 20px 20px 16px; box-shadow: 0 1px 2px rgba(38, 48, 59, .04), 0 12px 32px -18px rgba(60, 40, 100, .22); }
.demo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.demo-head h2 { font-size: 19px; letter-spacing: -0.01em; font-weight: 700; }
.demo-tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.demo-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.demo-question { margin-top: 12px; padding: 10px 12px; background: var(--wash); border-radius: var(--radius-sm); }
.q-text { font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.q-sub { font-size: 13px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.chip-ref { font-size: 12.5px; color: var(--ok); border: 1.5px solid #9ccbb0; border-radius: 999px; padding: 0 9px; font-weight: 600; background: var(--surface); }
.demo-frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.demo-frames figure { position: relative; }
.demo-frames img { width: 100%; aspect-ratio: 643 / 349; object-fit: cover; border-radius: 7px; }
.demo-frames figcaption { position: absolute; top: 5px; left: 5px; font-size: 11px; font-weight: 600; line-height: 1; padding: 4px 6px; border-radius: 5px; background: rgba(20, 26, 33, .72); color: #fff; font-variant-numeric: tabular-nums; }
.demo-evidence { display: grid; gap: 6px; margin-top: 12px; }
.ev { display: grid; grid-template-columns: 42px auto 1fr auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.4; }
.ev-seen { background: #eef2f6; }
.ev-said { background: var(--audio-tint); }
.ev-kind { font-weight: 700; font-size: 12.5px; }
.ev-seen .ev-kind { color: var(--ink-2); }
.ev-said .ev-kind { color: var(--audio); }
.ev-ids { display: flex; gap: 4px; }
.ev-ids code { font-size: 11.5px; font-weight: 500; padding: 1px 5px; border-radius: 4px; color: #fff; background: #475463; }
.ev-said .ev-ids code { background: var(--audio); }
.ev-hint { font-size: 12.5px; font-style: italic; color: var(--muted); white-space: nowrap; }
.ev-said .ev-hint { color: var(--audio); }

.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.rung { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 10px 9px; text-align: left; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.rung:hover { border-color: #b7c2cc; background: #fbfcfd; }
.rung-name { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.answer { font-size: 13px; font-weight: 600; line-height: 1.3; display: block; padding-left: 15px; text-indent: -15px; }
.answer::before { display: inline-block; width: 15px; text-indent: 0; font-weight: 700; }
.answer.wrong { color: var(--err); }
.answer.wrong::before { content: "\2715"; font-size: 11px; }
.answer.right { color: var(--ok); }
.answer.right::before { content: "\2713"; font-size: 13px; }
.rung[aria-selected="true"] { border-color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-2); }
.rung-mhe[aria-selected="true"] { border-color: var(--mhe); box-shadow: inset 0 0 0 1px var(--mhe); background: var(--mhe-tint); }
.rung-mhe .rung-name { color: var(--mhe); }
.step { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--wash); min-height: 96px; }
.step[hidden] { display: none; }
.step.reveal { animation: step-in .35s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.step-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.adds { font-weight: 600; color: var(--ink-2); }
#step-mhe .adds { color: var(--mhe); }
.step-calls { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.notes { list-style: none; display: grid; gap: 3px; }
.notes li { position: relative; padding-left: 20px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.notes li::before { position: absolute; left: 2px; top: 0; font-weight: 700; }
.n-ok::before { content: "\2713"; color: var(--ok); }
.n-err::before { content: "\2715"; color: var(--err); font-size: 12px; }
.n-lim::before { content: "\2013"; color: var(--faint); }
.n-audio::before { content: "\266A"; color: var(--audio); }
.demo-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 10px; }
.demo-foot p { font-size: 12px; line-height: 1.55; color: var(--muted); }
.replay { flex: none; font-size: 12.5px; padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.replay:hover { border-color: var(--mhe); color: var(--mhe); }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.band { background: var(--wash); border-block: 1px solid #edf0f3; }
#overview { padding: 72px 0; }
.section-intro { margin-top: 14px; max-width: 46em; font-size: 16.5px; line-height: 1.75; color: var(--ink-2); }

/* Overview */
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 56px; align-items: start; }
.tldr { margin-top: 14px; font-size: 20px; line-height: 1.65; font-weight: 450; color: var(--ink); text-wrap: pretty; }
.tldr strong { font-weight: 700; }
.decomp { margin-top: 30px; padding: 22px 24px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); --label-w: 196px; --val-w: 112px; --gap: 16px; }
.decomp-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.decomp-axis { position: relative; height: 18px; margin: 16px calc(var(--val-w) + var(--gap)) 0 calc(var(--label-w) + var(--gap)); font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.decomp-axis span { position: absolute; left: calc(var(--x) / 16 * 100%); transform: translateX(-50%); }
.decomp-rows { list-style: none; display: grid; gap: 2px; margin-bottom: 10px; }
.decomp-rows li { display: grid; grid-template-columns: var(--label-w) 1fr var(--val-w); gap: var(--gap); align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.decomp-rows li:first-child { border-top: 0; }
.d-label { display: flex; flex-direction: column; line-height: 1.35; }
.d-label strong { font-size: 14.5px; font-weight: 600; }
.d-label span { font-size: 12.5px; color: var(--muted); }
.d-track { position: relative; height: 22px; background: linear-gradient(90deg,
  transparent calc(12.5% - 0.5px), #9aa6b2 calc(12.5% - 0.5px), #9aa6b2 calc(12.5% + 0.5px), transparent calc(12.5% + 0.5px),
  transparent calc(37.5% - 0.5px), #e6eaee calc(37.5% - 0.5px), #e6eaee calc(37.5% + 0.5px), transparent calc(37.5% + 0.5px),
  transparent calc(62.5% - 0.5px), #e6eaee calc(62.5% - 0.5px), #e6eaee calc(62.5% + 0.5px), transparent calc(62.5% + 0.5px),
  transparent calc(87.5% - 0.5px), #e6eaee calc(87.5% - 0.5px), #e6eaee calc(87.5% + 0.5px), transparent calc(87.5% + 0.5px)); }
.d-range { position: absolute; top: 5px; height: 12px; border-radius: 4px; left: calc((var(--lo) + 2) / 16 * 100%); width: max(4px, calc((var(--hi) - var(--lo)) / 16 * 100%)); }
.d-audio .d-range { background: var(--audio-mark); }
.d-shared .d-range { background: var(--shared); }
.d-mhe .d-range { background: var(--mhe); }
.d-total .d-range { background: var(--ink); }
.d-total .d-label strong { font-weight: 700; }
.d-val { font-size: 13.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.abstract > summary, .table-details > summary, .more > summary {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 7px 14px;
  font-size: 14px; font-weight: 550; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer;
}
.abstract > summary:hover, .table-details > summary:hover, .more > summary:hover { border-color: var(--mhe); color: var(--mhe); }
.when-open { display: none; }
details[open] > summary .when-open { display: inline; }
details[open] > summary .when-closed { display: none; }
.chevron { transition: transform .2s; }
details[open] > summary .chevron { transform: rotate(180deg); }
.abstract-body { margin-top: 14px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.abstract-body p { font-size: 15px; line-height: 1.85; color: var(--ink-2); hyphens: auto; }

/* Figures */
.figure-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; }
.figure-card.wide { margin-top: 32px; padding: 18px; }
.figure-card figcaption { margin-top: 12px; padding: 0 4px 2px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.figure-card figcaption strong { color: var(--ink-2); font-weight: 600; }
.zoomable { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; }
.zoomable img { width: 100%; border-radius: 6px; }
.teaser { position: sticky; top: calc(var(--topbar) + 20px); }

/* Method */
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 44px; }
.method-grid article > p { margin-top: 12px; font-size: 15.5px; line-height: 1.75; color: var(--ink-2); }
.method-grid h3 { padding-top: 14px; border-top: 2px solid var(--line); }
.calls { list-style: none; counter-reset: call; margin-top: 14px; display: grid; gap: 12px; }
.calls li { counter-increment: call; position: relative; padding-left: 40px; font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.calls li::before { content: counter(call); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--ink-2); }
.calls strong { color: var(--ink); }
.method-grid code, .fine code { font-size: 0.86em; padding: 1px 5px; border-radius: 4px; background: #eef1f5; color: var(--ink); }
.fine { margin-top: 14px; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.method-grid .fine { font-size: 13.5px; color: var(--muted); }
.gates { margin-top: 12px; border: 1px solid var(--mhe-line); border-radius: var(--radius); overflow: hidden; }
.gates div { display: grid; grid-template-columns: 136px 1fr; gap: 12px; padding: 9px 14px; font-size: 14.5px; line-height: 1.5; border-top: 1px solid var(--mhe-line); }
.gates div:first-child { border-top: 0; }
.gates dt { font-weight: 650; color: var(--mhe); }
.gates dd { color: var(--ink-2); }
.scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.scope-col { padding: 18px 22px; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.scope-edit { background: var(--mhe-tint); border-color: var(--mhe-line); }
.scope-edit h3 { color: var(--mhe); }
.scope-fixed { background: var(--wash); }
.scope ul { list-style: none; margin-top: 8px; display: grid; gap: 4px; }
.scope li { position: relative; padding-left: 18px; font-size: 15px; color: var(--ink-2); }
.scope li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
.scope-edit li::before { background: var(--mhe); opacity: 1; }

/* Results chart */
.chart-card { position: relative; margin-top: 32px; padding: 22px 26px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); --row-label: 150px; --row-gap: 14px; }
.chart-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: #eef1f4; border-radius: 10px; }
.segmented button { padding: 6px 12px; font-size: 13.5px; font-weight: 550; color: var(--muted); background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(38, 48, 59, .12); }
.chart-title { margin-top: 20px; font-size: 15px; font-weight: 650; }
.bars { margin-top: 10px; display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: var(--row-label) 1fr; align-items: center; gap: var(--row-gap); min-height: 38px; border-radius: 8px; }
.bar-row:hover .bar-track, .bar-row:focus-visible .bar-track { background-color: #f4f6f8; }
.bar-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; line-height: 1.25; }
.bar-name small { display: block; font-size: 12px; font-weight: 450; color: var(--muted); }
.swatch { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.bar-track { position: relative; height: 26px; border-radius: 4px; background-image: repeating-linear-gradient(90deg, #e9edf1 0 1px, transparent 1px 20%); background-size: 100% 100%; }
.bar { position: absolute; left: 0; top: 4px; height: 18px; width: calc(var(--v) / 50 * 100%); background: var(--c); border-radius: 0 4px 4px 0; transition: width .45s cubic-bezier(.2, .7, .2, 1); }
.whisker { position: absolute; top: 8px; height: 10px; left: calc(var(--lo) / 50 * 100%); width: calc((var(--hi) - var(--lo)) / 50 * 100%); border-left: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); transition: left .45s, width .45s; }
.whisker::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--ink); }
.bar-val { position: absolute; top: 50%; left: calc(var(--end) / 50 * 100% + 8px); transform: translateY(-50%); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; transition: left .45s cubic-bezier(.2, .7, .2, 1); white-space: nowrap; }
.bar-axis { display: grid; grid-template-columns: var(--row-label) 1fr; gap: var(--row-gap); margin-top: 4px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bar-ticks { grid-column: 2; position: relative; height: 18px; }
.bar-ticks span { position: absolute; left: calc(var(--x) / 50 * 100%); transform: translateX(-50%); }
.bar-ticks span:first-child { transform: none; }
.chart-note { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.chart-tooltip { position: absolute; z-index: 5; pointer-events: none; min-width: 180px; padding: 9px 11px; background: var(--ink); color: #fff; border-radius: 8px; font-size: 12.5px; line-height: 1.5; box-shadow: 0 6px 20px rgba(20, 26, 33, .25); }
.chart-tooltip strong { display: block; font-size: 13px; margin-bottom: 2px; }
.chart-tooltip span { display: block; color: #d4dae0; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; margin-top: 14px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
caption { caption-side: top; text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 8px; }
th, td { padding: 8px 10px; font-size: 14px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: 12.5px; font-weight: 650; color: var(--muted); border-bottom: 1.5px solid var(--line-2); }
tbody th { font-weight: 550; }
.results-table .col-sum { background: #f7f8fa; }
.results-table .group-gap { border-left: 1px solid var(--line-2); }
tr.row-mhe th, tr.row-mhe td { background: var(--mhe-tint); }
td b { font-weight: 700; }

.findings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 44px; }
.findings article { padding-top: 14px; border-top: 2px solid var(--line-2); }
.findings article:nth-child(1) { border-top-color: var(--audio-mark); }
.findings article:nth-child(2) { border-top-color: var(--shared); }
.findings article:nth-child(3) { border-top-color: var(--mhe); }
.findings p { margin-top: 8px; font-size: 15px; line-height: 1.75; color: var(--ink-2); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 48px; align-items: start; margin-top: 56px; }
.split > div > p { margin-top: 12px; font-size: 15.5px; line-height: 1.75; color: var(--ink-2); }
.split > div > h3 + p { margin-top: 10px; }
#intentqa .split { margin-top: 32px; }
.qa-table td, .qa-table th { padding: 9px 10px; }
abbr[title] { text-decoration: none; cursor: help; }

/* Cases */
.case-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.case-tabs button { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 14.5px; font-weight: 550; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.case-tabs button:hover { border-color: #b7c2cc; }
.case-tabs button[aria-selected="true"] { border-color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-2); color: var(--ink); }
.badge { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 5px; color: #fff; }
.badge.ok { background: var(--ok); }
.badge.err { background: var(--err); }
.case-panel { margin-top: 18px; }
.case-panel[hidden] { display: none; }
.case-panel > p { max-width: 50em; font-size: 15.5px; line-height: 1.75; color: var(--ink-2); }
.case-panel .figure-card.wide { margin-top: 18px; }
.more > summary { margin-top: 24px; }
.more .figure-card.wide { margin-top: 16px; }

/* Limits */
.limits-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; margin-top: 36px; }
.limits-grid article { padding-top: 14px; border-top: 2px solid var(--line-2); }
.limits-grid p { margin-top: 8px; font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.figure-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.use-note { margin-top: 40px; padding: 18px 22px; border-left: 3px solid var(--line-2); background: var(--wash); border-radius: 0 var(--radius) var(--radius) 0; }
.use-note h3 { font-size: 15px; }
.use-note p { margin-top: 6px; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); max-width: 60em; }

/* Citation */
.cite-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.copy-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 14px; font-weight: 550; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.copy-btn:hover { border-color: var(--mhe); color: var(--mhe); }
.copy-btn.copied { border-color: var(--ok); color: var(--ok); }
.bibtex { margin: 18px 0 0; padding: 20px 22px; overflow-x: auto; background: #1f2731; color: #e6eaee; border-radius: var(--radius-lg); font-size: 13.5px; line-height: 1.7; }

/* Footer */
.footer { padding: 36px 0 44px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 750; letter-spacing: -0.02em; margin-bottom: 4px; }

/* Lightbox */
.lightbox { width: min(96vw, 1500px); max-width: none; max-height: 94vh; padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 24px 80px rgba(10, 14, 20, .45); overflow: hidden; }
.lightbox::backdrop { background: rgba(18, 22, 28, .72); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.lightbox-caption { font-size: 13px; line-height: 1.55; color: var(--ink-2); max-width: 90ch; }
.lightbox-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.lightbox-open { font-size: 13px; }
.lightbox-close { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); cursor: pointer; }
.lightbox-stage { overflow: auto; padding: 16px; flex: 1; min-height: 0; }
.lightbox-stage img { margin: 0 auto; max-height: calc(94vh - 110px); width: auto; }

/* Example clips: one player, a playlist beside it */
.clips { margin-top: 64px; }
.clips-intro { margin-top: 10px; max-width: 46em; font-size: 15.5px; line-height: 1.75; color: var(--ink-2); }
.clip-viewer { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 24px; }
.clip-stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 12px 16px; scroll-margin-top: calc(var(--topbar) + 12px); }
.clip-panel[hidden] { display: none; }
.clip-panel video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; background: #11161c; border-radius: var(--radius); }
.clip-info { padding: 14px 4px 0; }
.clip-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1.5; }
.clip-task { font-weight: 700; color: var(--ink); font-size: 15px; }
.clip-split { border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.clip-split.seen { color: var(--student); background: #eaf1f9; }
.clip-split.held { color: var(--mhe); background: var(--mhe-tint); }
.clip-dur { color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.clip-meta .clip-dur { margin-left: auto; }
.clip-ref { margin-top: 6px; font-size: 14px; color: var(--muted); }
.clip-ref strong { color: var(--ok); }
.clip-labels { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.clip-labels li { padding: 2px 9px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); background: var(--wash); border: 1px solid var(--line); border-radius: 999px; }
.clip-labels li.is-ref { color: var(--ok); font-weight: 650; background: var(--ok-tint); border-color: #b9dcc6; }
.clip-list { display: flex; flex-direction: column; gap: 6px; }
.clip-list [role="tab"] { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 6px 12px 6px 6px; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.clip-list [role="tab"]:hover { border-color: #b7c2cc; }
.clip-list [role="tab"][aria-selected="true"] { border-color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-2); }
.clip-list img { display: block; width: 80px; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #11161c; border-radius: var(--radius-sm); }
.clip-tab-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.clip-tab-task { font-size: 14px; font-weight: 650; color: var(--ink); }
.clip-tab-ref { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-tab-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .page-nav a { padding: 6px 8px; font-size: 13.5px; }
  .hero-showcase { gap: 36px; }
  .hero-idea { font-size: 32px; }
}
@media (max-width: 920px) {
  .container { padding: 0 24px; }
  .topbar-inner { padding: 0 16px; }
  .menu-toggle { display: inline-flex; }
  .page-nav { display: none; position: absolute; top: var(--topbar); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px -16px rgba(20, 26, 33, .3); }
  .page-nav.open { display: flex; }
  .page-nav a { padding: 10px 12px; font-size: 15px; }
  .hero-showcase, .overview-grid, .method-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .teaser { position: static; max-width: 520px; }
  .findings { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .clip-viewer { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .clip-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wide-break { display: none; }
}
@media (max-width: 680px) {
  body { font-size: 15.5px; }
  .container { padding: 0 16px; }
  h2 { font-size: 25px; }
  .hero { padding: 36px 0 52px; }
  .wordmark { font-size: 40px; gap: 12px; }
  .wordmark img { width: 54px; height: 54px; }
  .hero h1 { font-size: 21px; }
  .authors { font-size: 15.5px; gap: 2px 14px; }
  .affiliations { font-size: 13.5px; flex-direction: column; gap: 0; }
  .hero-showcase { margin-top: 40px; }
  .hero-idea { font-size: 27px; }
  .case-demo { padding: 16px 14px 14px; }
  .ladder { grid-template-columns: repeat(2, 1fr); }
  .ev { grid-template-columns: auto 1fr; row-gap: 2px; }
  .ev-ids { grid-column: 2; grid-row: 1; justify-self: start; }
  .ev-text { grid-column: 1 / -1; }
  .ev-hint { grid-column: 1 / -1; }
  .section { padding: 56px 0; }
  #overview { padding: 52px 0; }
  .tldr { font-size: 18px; }
  .decomp { padding: 18px 16px 14px; --label-w: 1fr; }
  .decomp-axis { display: none; }
  .decomp-rows li { grid-template-columns: 1fr auto; grid-template-areas: "label val" "track track"; row-gap: 6px; }
  .d-label { grid-area: label; }
  .d-val { grid-area: val; }
  .d-track { grid-area: track; }
  .scope, .limits-grid, .figure-pair { grid-template-columns: minmax(0, 1fr); }
  .chart-card { padding: 18px 14px 14px; --row-label: 92px; --row-gap: 8px; }
  .bar-name { font-size: 13px; }
  .bar-name small { font-size: 11px; }
  .gates div { grid-template-columns: 1fr; gap: 0; }
  .qa-table th, .qa-table td { padding: 8px 6px; font-size: 13px; }
  .figure-card.wide { padding: 10px; }
  .clips { margin-top: 48px; }
  .clip-stage { padding: 8px 8px 14px; }
  .clip-list { grid-template-columns: minmax(0, 1fr); }
  .clip-list [role="tab"] { grid-template-columns: 68px minmax(0, 1fr) auto; }
  .clip-list img { width: 68px; }
  .cite-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .topbar, .menu-toggle, .replay, .copy-btn, .lightbox { display: none !important; }
  .band { background: none; }
}
