:root {
  --ink: #14282c;
  --subtle: #50666a;
  --teal: #006b61;
  --mint: #b2edcb;
  --paper: #fcfdfb;
  --band: #eff5f2;
  --rule: #d7e4de;
  --deep: #0b272c;
  --radius: 12px;
  --gutter: clamp(18px, 4.3vw, 70px);
  --type: "Geist", "Segoe UI", Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--type); }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 82px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible, video:focus-visible {
  outline: 3px solid #008678; outline-offset: 4px;
}
img { display: block; width: 100%; height: auto; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
.wrap { width: min(1336px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 20; transform: translateY(-150%);
  background: white; color: var(--teal); padding: 9px 14px; border-radius: 6px;
}
.skip:focus { transform: none; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  background: #fcfdfbf2; border-bottom: 1px solid var(--rule); backdrop-filter: blur(16px);
}
.navigation { min-height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-size: 1.19rem; font-weight: 740; letter-spacing: -.045em; }
.mark {
  height: 16px; width: 16px; border: 2px solid var(--teal); border-radius: 4px;
  background: var(--mint); transform: rotate(-10deg); display: inline-block; flex-shrink: 0;
}
.navlinks { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 38px); }
.navlinks a, .cite-link { font-size: .92rem; font-weight: 600; white-space: nowrap; }
.navlinks a { color: var(--subtle); }
.navlinks a:hover, .footer a:hover { color: var(--teal); }
.cite-link { justify-self: end; padding: 5px 14px; border: 1px solid var(--rule); border-radius: 8px; }
.cite-link:hover { background: var(--band); }

.hero {
  position: relative; isolation: isolate; display: flex; align-items: flex-end;
  min-height: clamp(31rem, 82svh, 57rem); overflow: hidden; color: #f4fff8; background: var(--deep);
}
.hero > video, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero > video { object-fit: cover; object-position: center 53%; }
.hero-shade {
  background:
    linear-gradient(0deg, #081c22dd 0%, #091d2370 37%, transparent 75%),
    linear-gradient(90deg, #091d23b5 0%, #091d235e 43%, #091d2314 76%);
}
.hero-content {
  position: relative; padding-block: 50px clamp(32px, 6vh, 78px);
}
.hero h1 {
  font-size: clamp(4.2rem, 11.4vw, 10.4rem); line-height: .91; font-weight: 730; letter-spacing: -.085em;
  margin: 0 0 22px -.035em; text-shadow: 0 2px 50px #0a222855;
}
.hero h1 span { color: var(--mint); }
.paper-title { max-width: 39ch; font-size: clamp(1.15rem, 2vw, 1.68rem); line-height: 1.35; font-weight: 490; }
.project-resources, .hero-links { display: flex; flex-wrap: wrap; gap: 8px; }
.project-resources { margin-top: 24px; }
.project-resources .button { padding-inline: 14px; }
.hero-links { margin-top: 12px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 43px;
  padding: 9px 18px; border: 1px solid transparent; border-radius: 8px;
  font-size: .92rem; line-height: 1.35; font-weight: 650; transition: background-color .2s, border-color .2s;
}
.primary { background: var(--mint); color: #15392f; }
.primary:hover { background: #d4f9e2; }
.quiet { border-color: #e6faf098; color: white; background: #112e344d; }
.quiet:hover { background: #112e3499; }
.hero a:focus-visible, .contact-band button:focus-visible, .contact-band a:focus-visible { outline-color: var(--mint); }

.section { padding-block: clamp(48px, 7.5vw, 106px); }
.section-intro { margin-bottom: clamp(25px, 4vw, 46px); }
h2 {
  font-size: clamp(2.3rem, 5.2vw, 4.75rem); font-weight: 690; letter-spacing: -.064em; line-height: 1.05;
}
.section-intro p { margin-top: 15px; max-width: 74ch; color: var(--subtle); font-size: clamp(1rem, 1.9vw, 1.19rem); }
.band { background: var(--band); }
.overview-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}
.overview .section-intro { margin-bottom: 24px; }
.section-analysis { max-width: 76ch; margin-top: clamp(17px, 2.5vw, 30px); color: var(--subtle); }
.section-analysis p + p { margin-top: .75em; }
.authors { max-width: 970px; color: var(--subtle); }
.author-list { color: var(--ink); font-weight: 550; }
.author-list > span { white-space: nowrap; }
.authors p + p { margin-top: 4px; }
.author-affiliations > span { margin-left: 1em; }
.authors sup { color: var(--teal); }
.author-notes { font-size: .88rem; }
.metrics {
  display: grid; grid-template-columns: 1.1fr 1fr 1fr; align-items: center;
  margin-top: clamp(30px, 4.5vw, 60px); border-block: 1px solid var(--rule); padding-block: 23px;
}
.metrics > * { padding-inline: clamp(12px, 3vw, 36px); }
.metrics > *:first-child { padding-left: 0; font-weight: 650; }
.metrics > div { border-left: 1px solid var(--rule); display: grid; gap: 3px; }
.metrics strong { color: var(--teal); font-size: clamp(2.05rem, 4.8vw, 3.7rem); line-height: 1.07; font-variant-numeric: tabular-nums; letter-spacing: -.07em; }
.metrics small { font-size: .48em; letter-spacing: -.01em; }
.metrics span { color: var(--subtle); font-size: .95rem; font-weight: 450; }

h3 { font-size: clamp(1.38rem, 3vw, 2rem); line-height: 1.12; font-weight: 660; letter-spacing: -.038em; }
.subhead { display: flex; align-items: end; justify-content: space-between; margin: 0 0 18px; }
.subhead p { color: var(--subtle); margin-top: 7px; }
.rollout-switcher { margin-bottom: clamp(18px, 2.6vw, 36px); }
.clip-grid { display: grid; gap: clamp(12px, 1.7vw, 24px); }
.video-frame { border-radius: var(--radius); overflow: hidden; background: #112b30; aspect-ratio: 16 / 9; }
.video-frame video { display: block; width: 100%; height: 100%; object-fit: contain; }
.rollout-controls {
  display: grid; grid-template-columns: auto minmax(0, 1fr) 5ch; gap: clamp(8px, 1.6vw, 20px);
  align-items: center; margin-bottom: 14px;
}
.rollout-play {
  min-width: 8.9rem; min-height: 40px; padding: 5px 13px; font-size: .89rem; font-weight: 630;
  color: white; background: var(--deep); border: 1px solid var(--deep); border-radius: 8px;
}
.rollout-play:hover { background: var(--teal); border-color: var(--teal); }
.rollout-controls input { min-width: 0; width: 100%; margin: 0; accent-color: var(--teal); }
.rollout-time { color: var(--subtle); text-align: end; font-size: .88rem; font-variant-numeric: tabular-nums; }
.playback-speed {
  display: inline-block; margin-inline-start: .3em; padding: .13em .46em; border-radius: 4px;
  background: #e4f1eb; color: var(--deep); font-size: .73rem; font-weight: 650;
  line-height: 1.3; vertical-align: .1em; white-space: nowrap;
}
.rollout-error { margin: 0 0 12px; color: var(--subtle); }
.rollout-player video:not([controls]) { cursor: pointer; }
.rollout-views {
  --view-gap: clamp(10px, 1.2vw, 18px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: var(--view-gap);
}
.rollout-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--view-gap); }
.rollout-pair + .rollout-pair { margin-top: var(--view-gap); }
.rollout-pair .video-frame { aspect-ratio: 4 / 3; }
.rollout-views .clip figcaption { margin-top: 6px; }
.rollout-views .clip figcaption strong { font-size: .9rem; }
.rollout-note { margin-top: 9px; color: var(--subtle); font-size: .8rem; line-height: 1.55; }
.rollout-note strong { color: var(--ink); }
.ball-comparison + .ball-comparison {
  margin-top: clamp(28px, 4vw, 52px);
  padding-top: clamp(20px, 3vw, 34px);
  border-top: 1px solid var(--rule);
}
.rollout-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 30px);
}
.rollout-card {
  min-width: 0;
  padding: clamp(12px, 1.5vw, 20px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
}
.rollout-card--success { --result-color: #1c6e46; }
.rollout-card--failure { --result-color: #992f36; }
.rollout-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 12px;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  font-weight: 660;
  line-height: 1.3;
}
.rollout-card-title sub { line-height: 0; }
.rollout-result { color: var(--result-color); }
.clip figcaption {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px;
  flex-wrap: wrap; margin-top: 10px; line-height: 1.35;
}
.clip figcaption strong { font-size: 1rem; font-weight: 660; }
.clip figcaption span, .text-button { font-size: .88rem; color: var(--subtle); }
.disclosure { margin-top: 22px; border-top: 1px solid var(--rule); padding-top: 14px; }
.disclosure summary { cursor: pointer; width: fit-content; color: var(--teal); font-weight: 630; }
.disclosure[open] summary { margin-bottom: 17px; }

.scorecard {
  margin-top: clamp(30px, 4.8vw, 62px);
  padding: clamp(16px, 3vw, 34px); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper);
}
.score-chart figcaption { font-weight: 680; }
.score-legend {
  display: flex; flex-wrap: wrap; gap: 9px 24px; padding: 0; margin: 9px 0 25px;
  list-style: none; font-size: .88rem;
}
.score-legend li {
  position: relative; padding-inline-start: 1.2em; color: var(--ink); line-height: 1.35; font-weight: 640;
}
.score-legend li::before {
  position: absolute; inset-block-start: .28em; inset-inline-start: 0; width: .78em; height: .78em;
  border-radius: 2px; background: var(--method-color); content: '';
}
.score-category { display: block; color: var(--subtle); font-size: .78rem; font-weight: 450; }
.score-legend li:nth-child(1), .score-bar:nth-child(1) { --method-color: #507b9d; }
.score-legend li:nth-child(2), .score-bar:nth-child(2) { --method-color: #c17861; }
.score-legend li:nth-child(3), .score-bar:nth-child(3) { --method-color: #8765b1; }
.score-legend li:nth-child(4), .score-bar:nth-child(4) { --method-color: #006b61; }
.score-plot {
  --plot-height: clamp(142px, 21vw, 252px);
  display: grid; grid-template-columns: 3ch minmax(0, 1fr); gap: 10px;
  font-variant-numeric: tabular-nums;
}
.score-axis {
  display: flex; flex-direction: column; justify-content: space-between;
  height: var(--plot-height); text-align: end; color: var(--subtle);
  font-size: .78rem; line-height: 0;
}
.score-groups {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 3.5vw, 50px); padding-inline: clamp(5px, 2.6vw, 32px);
  background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--rule) calc(25% - 1px) 25%)
    top / 100% var(--plot-height) no-repeat;
  border-top: 1px solid var(--rule);
}
.score-bars {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end;
  height: var(--plot-height); gap: clamp(2px, .45vw, 6px);
}
.score-bar {
  position: relative; height: var(--rate); min-height: 1px; border-radius: 3px 3px 0 0;
  background: var(--method-color);
}
.score-bar span {
  position: absolute; inset: auto 0 100%; line-height: 1.45;
  text-align: center; color: var(--ink); font-size: .75rem;
}
.score-bar:nth-child(4) span { font-weight: 700; }
.score-task {
  margin-top: 8px; text-align: center; font-size: .89rem; font-weight: 630; line-height: 1.3;
}
.score-details { margin-top: 16px; }
.score-details summary { cursor: pointer; width: fit-content; color: var(--teal); font-size: .9rem; font-weight: 630; }
.score-details[open] summary { margin-bottom: 12px; }
.score-table-scroll { overflow-x: auto; }
.score-table { width: 100%; min-width: 470px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.score-table caption { text-align: left; font-weight: 650; margin-bottom: 12px; }
.score-table th, .score-table td { padding: 9px 12px; border-bottom: 1px solid var(--rule); text-align: end; }
.score-table th:first-child { text-align: start; padding-left: 0; }
.score-table thead th { font-size: .91rem; }
.score-table tbody th { font-weight: 600; }
.score-table .score-tacit { color: var(--teal); font-weight: 680; }
.score-table tfoot th, .score-table tfoot td { border: 0; font-weight: 650; }

.segmented { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.segmented button {
  min-height: 40px; padding: 5px 13px; background: white; color: var(--subtle); border: 1px solid var(--rule);
  border-radius: 8px; font-size: .89rem; font-weight: 630; white-space: nowrap;
}
.segmented button[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: white; }
.segmented button[aria-pressed="false"]:hover { color: var(--teal); border-color: var(--teal); }
.text-button { border: 0; background: transparent; color: var(--teal); padding: 2px 0; font-weight: 620; line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { text-decoration-thickness: 2px; }

.simulation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sim-task { padding: clamp(13px, 1.7vw, 23px); border: 1px solid var(--rule); border-radius: var(--radius); }
.sim-task-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.sim-task h4 { font-size: 1.14rem; line-height: 1.3; }
.sim-inputs {
  display: grid; gap: 3px; margin-top: 7px; color: var(--subtle);
  font-size: .84rem; line-height: 1.4;
}
.sim-inputs div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.sim-inputs dt { color: var(--ink); font-weight: 650; }
.sim-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.sim-pair .clip figcaption { column-gap: 6px; }
.sim-pair .clip figcaption span, .comparison-input { font-size: .8rem; }
.comparison-input { margin-top: 3px; color: var(--subtle); line-height: 1.35; }

.contact-band { background: var(--deep); color: #effcf5; }
.contact-band .section-intro p { color: #c1d9d2; }
.contact-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contact-stage .video-frame { aspect-ratio: 966 / 480; border: 1px solid #375656; }
.contact-stage figcaption { margin-top: 12px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 14px; }
.contact-stage figcaption span { color: #c1d9d2; }
.contact-figures { border-color: #375656; margin-top: 26px; }
.contact-figures summary { color: var(--mint); }

.paper-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.method-grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.method-grid .paper-figure { display: grid; grid-template-rows: 1fr auto; }
.method-grid .paper-figure a { display: grid; align-items: center; }
.paper-figure {
  min-width: 0; background: white; color: var(--ink); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden;
}
.paper-figure a { padding: clamp(9px, 1.5vw, 20px); display: block; cursor: zoom-in; }
.paper-figure a:focus-visible { outline-offset: -4px; }
.paper-figure figcaption { border-top: 1px solid var(--rule); padding: 10px 14px; font-size: .9rem; color: var(--subtle); }

.citation { display: grid; grid-template-columns: minmax(175px, .34fr) minmax(0, 1fr); gap: clamp(18px, 5vw, 56px); align-items: start; }
.citation .section-intro { margin-bottom: 0; }
.copy { margin-top: 15px; background: #e5f2eb; border-color: var(--rule); color: var(--teal); }
.copy:hover { background: #d7eddf; }
#copy-status { display: block; min-height: 1.5em; margin-top: 6px; color: var(--subtle); font-size: .87rem; }
pre {
  min-width: 0; max-width: 100%; overflow: auto; margin: 0; padding: 18px;
  font: .86rem/1.55 Consolas, "Courier New", monospace; color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--band);
}
.footer { background: var(--band); border-top: 1px solid var(--rule); }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 23px; }
.footer a:last-child { font-size: .9rem; }

dialog {
  width: min(1120px, 95vw); max-height: 92svh; border: 1px solid var(--rule); border-radius: 14px;
  color: var(--ink); background: var(--paper); padding: clamp(10px, 2vw, 20px);
}
dialog::backdrop { background: #081a24cc; }
dialog[open] { display: grid; gap: 12px; }
dialog img { max-height: 72svh; object-fit: contain; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-close {
  justify-self: end; min-height: 38px; padding: 5px 12px; background: var(--band);
  color: var(--teal); border: 1px solid var(--rule); border-radius: 8px; font-weight: 620;
}
.dialog-close:hover { border-color: var(--teal); }
#sensor-dialog video {
  display: block; width: 100%; min-width: 0; max-height: 65svh; object-fit: contain;
  background: var(--deep); border-radius: 8px;
}
.sensor-description { color: var(--subtle); font-size: .86rem; }
#sensor-description { margin-top: 0; }

@media (max-width: 900px) {
  .overview-story { grid-template-columns: minmax(0, 1fr); }
  .overview-copy { display: contents; }
  .overview .section-intro { margin-bottom: 0; }
  .overview-story .authors { grid-row: 3; }
}
@media (max-width: 760px) {
  .rollout-comparison-grid, .method-grid, .simulation-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  section[id] { scroll-margin-top: 104px; }
  .navigation { min-height: auto; grid-template-columns: 1fr auto; gap: 0 16px; padding-block: 9px 0; }
  .navlinks {
    grid-column: 1 / -1; grid-row: 2; padding: 10px 2px 11px; gap: 16px;
    overflow-x: auto; scrollbar-width: thin;
  }
  .navlinks a { font-size: .85rem; }
  .hero { min-height: clamp(25rem, 65svh, 38rem); }
  .hero > video { object-position: 49% center; }
  .hero-shade { background: linear-gradient(0deg, #081e24ec 0%, #081e246e 50%, transparent 90%); }
  .hero-content { padding-block: 26px 20px; }
  .hero h1 { font-size: clamp(3.05rem, 12.2vw, 6rem); margin-bottom: 12px; }
  .project-resources { margin-top: 17px; }
  .hero-links .button { padding-inline: 12px; }
  .metrics { grid-template-columns: 1fr 1fr; padding-block: 13px; row-gap: 15px; }
  .metrics > p { grid-column: 1 / -1; }
  .metrics > div:nth-child(2) { padding-left: 0; border-left: 0; }
  .metrics span { font-size: .88rem; }
  .method-grid, .paper-grid, .citation, .contact-stage { grid-template-columns: 1fr; }
  .clip-grid { row-gap: 19px; }
  .score-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-bar span { display: none; }
  .score-task { font-size: .76rem; }
  .score-table { min-width: 0; font-size: .8rem; }
  .score-table th, .score-table td { padding: 7px 4px; }
  .score-table thead th { font-size: inherit; }
  .contact-stage figcaption span { font-size: .92rem; }
}
@media (max-width: 410px) {
  .project-resources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics strong { font-size: 2.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
