:root {
  color-scheme: light;
  --ink: #122828;
  --muted: #4e6263;
  --line: #d9e3e1;
  --surface: #f2f6f4;
  --paper: #fff;
  --deep: #082d2a;
  --green: #126354;
  --mint: #b7f0d6;
  --phase-a: #158879;
  --phase-b: #ad6410;
  --phase-c: #495ab3;
  --onset: #a44253;
  font: 16px/1.55 Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--surface); }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
button, select { font: inherit; }
[hidden] { display: none !important; }
a { color: inherit; }
button, summary, select { cursor: pointer; }
:focus-visible { outline: 3px solid #2e916d; outline-offset: 4px; }
.skip-link { position: absolute; z-index: 9; inset: 12px auto auto 12px; transform: translateY(-200%); background: white; padding: 10px; }
.skip-link:focus { transform: translateY(0); }
.shell { width: min(1170px, calc(100% - 56px)); margin-inline: auto; }
.masthead {
  color: #f5fffb;
  background: radial-gradient(ellipse at 87% 79%, #0d5447 0, transparent 49%), linear-gradient(116deg, #062724 16%, #0a3832 94%);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 18px; border-bottom: 1px solid #a3dbc327; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.22rem; font-weight: 730; letter-spacing: -.045em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--deep); background: var(--mint); font: bold 1.5rem/1 Georgia, serif; }
nav { display: flex; gap: 28px; }
nav a { text-decoration: none; color: #d6ede2; font-size: .9rem; }
nav a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.context-label { font-size: .81rem; color: #b2d4c6; }
.affiliation { display: flex; align-items: center; gap: 13px; }
.hct-logo { display: block; width: 180px; height: auto; padding: 3px 6px; border-radius: 5px; background: #fff; }
.hero { display: grid; grid-template-columns: 1.4fr minmax(300px, .86fr); align-items: center; gap: clamp(30px, 6vw, 87px); padding-block: 46px 53px; }
.hero h1 { font-size: clamp(2.65rem, 5.2vw, 4.4rem); line-height: 1.01; letter-spacing: -.066em; font-weight: 710; }
.hero p { max-width: 500px; margin-block: 18px 21px; color: #d0e9dd; font-size: 1.02rem; }
.hero-button { display: inline-flex; min-height: 44px; align-items: center; padding: 9px 16px; border-radius: 7px; background: var(--mint); color: #113f32; text-decoration: none; font-size: .91rem; font-weight: 700; }
.hero-button:hover { background: #d2fae6; }
.validation { padding: 20px 22px 19px; background: #f8fffc; color: var(--ink); border: 1px solid #b9decf; border-radius: 15px; box-shadow: 0 18px 34px #061c1950; }
.validation h2 { margin-bottom: 12px; font-size: .92rem; font-weight: 700; }
.validation-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 13px; border-top: 1px solid var(--line); }
.validation-row:last-child { padding-bottom: 0; }
.validation-row > div:first-child { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .85rem; }
.scenario { display: inline-grid; place-items: center; width: 30px; height: 29px; flex: 0 0 auto; border-radius: 5px; background: #d5f4e4; color: #165345; font-size: .78rem; font-weight: 800; }
.scenario.alternate { color: #824a17; background: #f8ead8; }
.validation-score { display: grid; white-space: nowrap; text-align: right; }
.validation-score strong { font-size: clamp(1.53rem, 3vw, 2.25rem); letter-spacing: -.06em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.validation-score small { margin-top: 3px; color: var(--muted); font-size: .76rem; }
.lab { padding-block: 38px 20px; scroll-margin-top: 12px; }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.section-top h2, .method h2 { font-size: clamp(1.65rem, 3vw, 2rem); letter-spacing: -.04em; line-height: 1.15; }
.section-top p { margin-top: 4px; }
.muted, .metadata, .caption { color: var(--muted); }
.muted { font-size: .92rem; }
.metadata { font-size: .81rem; }
.case-controls { display: flex; align-items: end; gap: 10px; }
.select-label { display: grid; gap: 3px; min-width: 196px; color: var(--muted); font-weight: 600; font-size: .875rem; }
.select-wrap { position: relative; }
.select-wrap::after { content: ''; position: absolute; right: 12px; top: 45%; width: 7px; height: 7px; border: solid #47655d; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-50%); pointer-events: none; }
select, .button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 6px; font-size: .875rem; font-weight: 650; }
select { width: 100%; padding-right: 28px; border: 1px solid #bdccc7; appearance: none; background: #fff; color: var(--ink); }
.primary { background: var(--green); color: white; border: 1px solid var(--green); }
.primary:hover { background: #0a4f42; }
.quiet { color: var(--green); background: #fff; border: 1px solid #c9dbd4; }
.quiet:hover, .quiet[aria-pressed="true"] { background: #e5f4eb; }
.explorer { display: grid; grid-template-columns: minmax(0, 1.98fr) minmax(285px, 1fr); gap: 14px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.wave-panel, .prediction-panel { min-width: 0; padding: 17px; }
.panel-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.panel-top h3 { font-size: 1.1rem; letter-spacing: -.025em; }
.panel-top p { margin-top: 3px; }
.segmented { display: inline-flex; flex: 0 0 auto; padding: 2px; gap: 2px; border-radius: 7px; background: #eaf1ee; }
.segmented button { min-height: 34px; padding: 4px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: .82rem; font-weight: 650; }
.segmented button[aria-pressed="true"] { color: var(--green); background: #fff; box-shadow: 0 1px 3px #1335251c; }
.plot-wrap { margin-top: 9px; }
canvas { display: block; width: 100%; height: 258px; }
.plot-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 1px; }
.plot-footer .quiet { min-height: 36px; padding: 4px 9px; font-size: .78rem; }
.legend { display: flex; gap: 13px; flex-wrap: wrap; font-size: .81rem; color: var(--muted); }
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.key { width: 13px; border-top: 2px solid; }
.key.phase-a { border-color: var(--phase-a); }
.key.phase-b { border-color: var(--phase-b); }
.key.phase-c { border-color: var(--phase-c); }
.key.onset { border-color: var(--onset); border-top-style: dashed; }
.wave-detail { margin-top: 8px; min-height: 1.25em; font-variant-numeric: tabular-nums; }
.prediction-panel { display: flex; flex-direction: column; gap: 13px; }
.prediction-summary { background: #e7f6ef; color: #184d3d; border: 1px solid #cce8da; border-radius: 8px; padding: 11px 13px; }
.prediction-summary.ready { background: #f1f6f3; border-color: #dce8e2; color: var(--ink); }
.prediction-summary.mismatch { background: #fff4e7; border-color: #f0dcc1; color: #75481f; }
.caption { font-size: .82rem; }
.prediction-summary strong { display: block; margin-top: 1px; font-size: clamp(1.12rem, 2vw, 1.4rem); letter-spacing: -.025em; line-height: 1.25; }
.prediction-summary p { margin-top: 5px; font-size: .82rem; }
.ground-truth { display: grid; grid-template-columns: auto 1fr; gap: 4px 9px; font-size: .84rem; }
.ground-truth dt { color: var(--muted); }
.ground-truth dd { justify-self: end; font-weight: 650; text-align: end; }
.score-section { padding-top: 9px; border-top: 1px solid var(--line); }
.score-section h4 { margin-bottom: 8px; font-size: .87rem; }
.scores { display: grid; gap: 6px; }
.score { display: grid; grid-template-columns: 3ch 1fr 7ch; gap: 8px; align-items: center; font-size: .79rem; }
.score span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.score progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 999px; background: #e5ece9; overflow: hidden; }
.score progress::-webkit-progress-bar { background: #e5ece9; }
.score progress::-webkit-progress-value { background: #54a487; }
.score progress::-moz-progress-bar { background: #54a487; }
.score.winner { font-weight: 750; }
.score.winner progress::-webkit-progress-value { background: var(--green); }
.score.winner progress::-moz-progress-bar { background: var(--green); }
.pair { width: 100%; margin-top: auto; min-height: 36px; font-size: .81rem; }
.evidence-grid { display: grid; grid-template-columns: minmax(0, 1.98fr) minmax(285px, 1fr); gap: 14px; margin-top: 14px; }
.evidence-grid:has(#topology[hidden]) { grid-template-columns: 1fr; }
.readings, .topology { min-width: 0; padding: 15px 17px; }
.readings h3, .topology h3 { font-size: 1.04rem; letter-spacing: -.021em; }
.readings > p, .topology > p { margin-top: 3px; }
.reading-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 9px; }
.reading-tables caption { text-align: start; font-weight: 700; padding-bottom: 2px; }
.reading-tables table { font-size: .79rem; }
.reading-tables :is(th, td):not(:first-child) { text-align: right; padding-right: 0; }
.reading-tables tbody td:last-child { color: var(--green); font-weight: 650; white-space: nowrap; }
.topology-results { display: grid; gap: 7px; margin-top: 10px; }
.topology-row { padding: 8px 10px; border: 1px solid #d4e9df; border-radius: 7px; background: #eff8f3; }
.topology-row.topology-mismatch { border-color: #efdcc4; background: #fffaef; }
.topology-row dt { font-size: .82rem; font-weight: 750; }
.topology-row dt span { margin-left: 4px; color: var(--muted); font-weight: 500; }
.topology-row dd { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; column-gap: 8px; font-size: .84rem; }
.topology-row dd span { color: var(--green); font-size: .79rem; font-variant-numeric: tabular-nums; }
.topology-mismatch dd span { color: #8b5225; }
.features { margin-top: 14px; padding: 13px 17px; }
.features summary { color: var(--green); font-size: .94rem; font-weight: 700; }
.tree-panel { margin-top: 10px; }
.tree-steps { margin: 8px 0 11px; padding-left: 1.5rem; font-size: .88rem; }
.tree-steps li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.tree-steps strong { display: inline-block; margin-left: 8px; font-variant-numeric: tabular-nums; }
.tree-result { color: var(--green); font-size: .9rem; font-weight: 700; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-block: 13px; }
.feature-grid h3 { font-size: .94rem; }
table { width: 100%; border-collapse: collapse; margin-top: 5px; font-size: .87rem; }
th, td { padding: 5px 6px 5px 0; text-align: start; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
td { font-variant-numeric: tabular-nums; }
.method { padding-block: 28px 35px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 19px; }
.method-grid article { padding-top: 11px; border-top: 2px solid #a3c8bb; }
.method-grid h3 { margin-bottom: 4px; font-size: 1rem; }
.method-grid p { color: var(--muted); font-size: .94rem; }
.model-specs { display: flex; flex-wrap: wrap; gap: 12px 25px; margin-top: 23px; padding-block: 10px; border-block: 1px solid var(--line); }
.model-specs div { display: inline-flex; align-items: baseline; gap: 7px; }
.model-specs dt { color: var(--muted); font-size: .84rem; }
.model-specs dd { font-weight: 700; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px 23px; color: var(--muted); font-size: .85rem; }

@media (max-width: 900px) {
  .context-label { display: none; }
}
@media (max-width: 760px) {
  .shell { width: min(100% - 32px, 610px); }
  .topbar nav { gap: 15px; }
  .hct-logo { width: 155px; }
  .hero { grid-template-columns: 1fr; gap: 23px; padding-block: 34px 29px; }
  .hero p { margin-block: 13px 16px; }
  .validation { padding: 13px 15px; }
  .validation-row { padding-block: 10px; }
  .lab { padding-top: 27px; }
  .section-top { display: grid; gap: 12px; }
  .explorer, .evidence-grid { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 420px) {
  .shell { width: calc(100% - 24px); }
  .hero h1 { font-size: clamp(2.3rem, 10vw, 2.75rem); }
  .topbar nav { gap: 10px; }
  nav a { font-size: .76rem; }
  .case-controls { flex-wrap: wrap; }
  .select-label { flex: 1 1 150px; min-width: 145px; }
  .wave-panel, .prediction-panel, .readings, .topology { padding: 13px; }
  .reading-tables { grid-template-columns: 1fr; gap: 8px; }
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .footer { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
