:root {
  --ink: #162020;
  --ink-soft: #40504f;
  --paper: #f3f6f2;
  --paper-bright: #fbfcfa;
  --line: #cdd6d1;
  --line-dark: #314342;
  --night: #0b1313;
  --night-soft: #162422;
  --mint: #77c7aa;
  --mint-deep: #087363;
  --mint-pale: #d9eee5;
  --yellow: #e7bd4c;
  --blue: #4f79ad;
  --orange: #c96c37;
  --white: #ffffff;
  --content: 1180px;
  --nav-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 43px;
  font-weight: 400;
  line-height: 1.12;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

.section-inner {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
}

.section-index,
.eyebrow,
.selection-kicker {
  margin-bottom: 14px;
  color: var(--mint-deep);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--nav-height);
  padding: 0 30px;
  color: var(--white);
  background: rgba(11, 19, 19, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-weight: 700;
}

.brand-mark {
  display: flex;
  align-items: end;
  gap: 2px;
  width: 21px;
  height: 19px;
}

.brand-mark span {
  display: block;
  width: 5px;
  background: var(--mint);
}

.brand-mark span:nth-child(1) { height: 9px; }
.brand-mark span:nth-child(2) { height: 14px; background: var(--yellow); }
.brand-mark span:nth-child(3) { height: 19px; background: var(--blue); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

.nav-links a,
.nav-paper {
  color: rgba(255, 255, 255, 0.78);
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-paper:hover {
  color: var(--white);
}

.nav-paper {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-paper svg,
.button svg,
.resource-links svg,
footer svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.hero {
  position: relative;
  min-height: 0;
  overflow: hidden;
  color: var(--ink);
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 72px 0 34px;
}

.hero .eyebrow {
  margin-bottom: 12px;
  color: var(--mint-deep);
}

.hero h1 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 82px;
  font-weight: 400;
  line-height: 1;
}

.hero-deck {
  max-width: 610px;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1.45;
}

.hero-authors {
  max-width: 980px;
  margin: -12px 0 26px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.hero-authors a {
  font: inherit;
  font-style: normal;
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 3px;
}

.hero-authors a:hover {
  color: var(--mint-deep);
  text-decoration: underline;
}

.hero-authors span {
  color: var(--line-dark);
  padding: 0 0.35em;
}

.hero-authors > .author-note {
  display: block;
  margin-top: 3px;
  padding: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.hero-authors > .author-note sup {
  font-size: 0.8em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button-primary {
  color: var(--white);
  background: var(--mint-deep);
  border-color: var(--mint-deep);
}

.button-primary:hover {
  background: var(--mint);
  border-color: var(--mint);
}

.button-secondary {
  color: var(--ink);
  background: transparent;
}

.button-secondary:hover {
  color: var(--mint-deep);
  background: var(--mint-pale);
  border-color: var(--mint-deep);
}

.hero-facts {
  margin-top: 42px;
  display: flex;
  gap: 34px;
}

.hero-facts div {
  display: grid;
  grid-template-columns: auto minmax(0, 130px);
  align-items: center;
  gap: 9px;
}

.hero-facts strong {
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
}

.hero-facts span {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.3;
}

.hero-figure {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto 64px;
}

.hero-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(22, 32, 32, 0.12);
}

.thesis-band {
  padding: 86px 0;
  background: var(--paper-bright);
  border-bottom: 1px solid var(--line);
}

.thesis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 42px;
  align-items: start;
}

.thesis-grid > div > p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
}

.thesis-proof {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.thesis-proof strong {
  display: block;
  margin-bottom: 9px;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  font-weight: 400;
  line-height: 1;
}

.thesis-proof span {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
}

.method-section,
.results-section,
.gallery-section {
  padding: 104px 0;
}

.method-section {
  color: var(--white);
  background: #050807;
  border-bottom: 1px solid var(--line-dark);
}

.method-section .section-heading > p {
  color: rgba(255, 255, 255, 0.66);
}

.method-section .section-index {
  color: var(--mint);
}

.method-section h2 {
  color: var(--white);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 70px;
  align-items: end;
  margin-bottom: 44px;
}

.section-heading > p {
  margin: 0;
  color: var(--ink-soft);
}

.method-tool {
  color: var(--white);
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--mint);
}

.method-flow {
  display: grid;
  grid-template-columns: 0.9fr 24px 1fr 24px 1.12fr 24px 1.08fr 24px 0.95fr;
  align-items: stretch;
  min-height: 330px;
  padding: 34px 30px 26px;
}

.method-figure {
  margin: 0;
  overflow: hidden;
  background: #050807;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
}

.method-figure img {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}

.flow-stage {
  min-width: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
}

.flow-arrow svg {
  width: 18px;
}

.stage-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 18px;
}

.stage-label span {
  font-size: 15px;
  font-weight: 650;
}

.stage-label small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

.method-media {
  width: min(100%, 150px);
  aspect-ratio: 2 / 3;
  margin: 20px auto 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: #050807;
}

.method-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.input-media img {
  filter: saturate(0.92) contrast(1.03);
}

.stage-note {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.52);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  line-height: 1.45;
}

.point-cloud {
  position: relative;
  width: 150px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 24px auto 0;
}

.point-cloud i {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--blue);
  border-radius: 50%;
}

.token-bank {
  display: grid;
  grid-template-columns: repeat(16, minmax(3px, 1fr));
  gap: 3px;
  width: 100%;
  aspect-ratio: 2 / 1;
  margin-top: 30px;
}

.token-cell {
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  transition: background 180ms ease, transform 180ms ease;
}

.token-cell.active {
  background: var(--yellow);
  transform: scale(1.07);
}

.physical-prefix {
  margin-top: 16px;
  padding-top: 12px;
  color: var(--yellow);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.selection-diagram {
  display: grid;
  grid-template-columns: auto 18px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 112px;
  margin-top: 26px;
  color: var(--mint);
}

.selection-source {
  display: grid;
  gap: 4px;
  text-align: center;
}

.selection-source strong {
  color: var(--yellow);
  font-size: 22px;
}

.selection-source span,
.selection-split b {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-weight: 500;
}

.selection-diagram > svg {
  width: 16px;
  color: rgba(255, 255, 255, 0.42);
}

.selection-split {
  display: grid;
  gap: 7px;
}

.selection-split span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.selection-split span:first-child {
  color: var(--mint);
  background: rgba(69, 163, 133, 0.2);
}

.selection-split span:last-child {
  color: rgba(255, 255, 255, 0.66);
}

.triplane-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  min-width: 0;
  min-height: 94px;
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.triplane-split > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
}

.selected-tokens { background: var(--mint-deep); }
.bypass-tokens { color: rgba(255, 255, 255, 0.62); background: rgba(255, 255, 255, 0.07); }

.triplane-split strong {
  font-size: 18px;
  line-height: 1;
}

.triplane-split span {
  margin-top: 5px;
  font-size: 10px;
}

.pass-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  min-width: 0;
  gap: 4px;
  margin-top: 18px;
}

.pass-dot {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  font-size: 10px;
}

.pass-dot.active {
  color: var(--night);
  background: var(--mint);
  border-color: var(--mint);
}

.output-stage {
  overflow: hidden;
}

.occupancy-output {
  position: relative;
  min-height: 0;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: #050807;
}

.occupancy-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 230px;
  object-fit: contain;
  object-position: center;
  border-radius: 3px;
  filter: saturate(0.92) contrast(1.04);
}

/* Keep the method overview on the same light canvas as the page. */
.method-section {
  color: var(--ink);
  background: var(--paper-bright);
  border-bottom-color: var(--line);
}

.method-section .section-heading > p,
.method-section .stage-label small,
.method-section .stage-note,
.method-section .selection-source span,
.method-section .selection-split b {
  color: var(--ink-soft);
}

.method-section .section-index {
  color: var(--mint-deep);
}

.method-section h2 {
  color: var(--ink);
}

.method-tool {
  color: var(--ink);
}

.method-figure {
  background: var(--paper-bright);
  border-color: var(--line);
}

.flow-stage {
  background: #ffffff;
  border-color: var(--line);
}

.flow-arrow {
  color: var(--ink-soft);
}

.method-media {
  border-color: var(--line);
  background: #ffffff;
}

.token-cell {
  background: rgba(11, 19, 19, 0.08);
}

.physical-prefix {
  color: var(--mint-deep);
  border-top-color: var(--line);
}

.selection-diagram > svg {
  color: var(--ink-soft);
}

.selection-split span {
  border-color: var(--line);
  background: #f3f6f2;
}

.selection-split span:first-child {
  background: #dceee7;
}

.selection-split span:last-child {
  color: var(--ink-soft);
}

.triplane-split {
  border-color: var(--line);
}

.bypass-tokens {
  color: var(--ink-soft);
  background: #f0f3f0;
}

.pass-dot {
  color: var(--ink-soft);
  background: #f3f6f2;
  border-color: var(--line);
}

.pass-dot.active {
  color: var(--white);
}

.occupancy-output {
  border-color: var(--line);
  background: #ffffff;
}

.explorer-section {
  padding: 104px 0 112px;
  background: var(--paper-bright);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.explorer-heading {
  align-items: center;
}

.segmented {
  display: inline-flex;
  width: max-content;
  padding: 3px;
  background: #e0e7e3;
  border-radius: 6px;
}

.segmented button,
.metric-tabs button,
.refinement-buttons button {
  min-height: 36px;
  padding: 7px 13px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.segmented button[aria-pressed="true"],
.metric-tabs button[aria-selected="true"],
.refinement-buttons button[aria-pressed="true"] {
  color: var(--white);
  background: var(--ink);
}

.metric-tabs {
  display: flex;
  gap: 3px;
  width: max-content;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.metric-tabs button {
  border-radius: 4px 4px 0 0;
}

.explorer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 54px;
  align-items: start;
}

.heatmap-wrap {
  position: relative;
  min-width: 0;
}

.heatmap {
  display: grid;
  grid-template-columns: 42px repeat(8, minmax(58px, 1fr));
  gap: 5px;
  min-width: 620px;
}

.heatmap-axis,
.heatmap-corner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.heatmap-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 4px;
  color: var(--ink);
  background: var(--mint-pale);
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  transition: transform 150ms ease, border-color 150ms ease;
}

.heatmap-cell:hover {
  transform: translateY(-2px);
}

.heatmap-cell.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px var(--paper-bright);
}

.heatmap-cell.reported::after {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--yellow);
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 50%;
}

.heatmap-legend {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0 47px;
  color: var(--ink-soft);
  font-size: 11px;
}

.legend-ramp {
  position: relative;
  height: 8px;
  overflow: hidden;
  background: #e1eee8;
  border: 1px solid var(--line);
}

.legend-ramp::before,
.legend-ramp::after {
  position: absolute;
  top: 0;
  bottom: 0;
  content: "";
}

.legend-ramp::before {
  right: 0;
  left: 33.333%;
  background: var(--mint);
}

.legend-ramp::after {
  right: 0;
  left: 66.666%;
  background: var(--mint-deep);
}

.selection-panel {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.selection-kicker {
  margin-bottom: 8px;
}

.selection-point {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
}

.selection-point span + span::before {
  margin-right: 10px;
  color: var(--line-dark);
  content: "/";
}

.selection-metrics {
  display: grid;
  gap: 13px;
}

.selection-metrics div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.selection-metrics span,
.selection-metrics small {
  color: var(--ink-soft);
  font-size: 12px;
}

.selection-metrics strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 18px;
}

.selection-panel > p:not(.selection-kicker) {
  margin: 24px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.selection-sliders {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 7px 12px;
  align-items: center;
}

.selection-sliders label {
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.refinement-section {
  padding: 96px 0;
  color: var(--white);
  background: var(--night);
}

.refinement-layout {
  display: grid;
  grid-template-columns: 0.66fr 1.34fr;
  gap: 56px;
  align-items: center;
}

.refinement-copy h2 {
  margin-bottom: 24px;
}

.refinement-copy > p:not(.section-index) {
  color: rgba(255, 255, 255, 0.64);
}

.refinement-buttons {
  display: flex;
  gap: 4px;
  width: max-content;
  margin: 28px 0 24px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.refinement-buttons button {
  color: rgba(255, 255, 255, 0.68);
}

.refinement-buttons button[aria-pressed="true"] {
  color: var(--night);
  background: var(--mint);
}

.refinement-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.refinement-metrics strong {
  margin-left: 4px;
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 600;
}

.refinement-media {
  position: relative;
  overflow: hidden;
  background: #020505;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
}

.refinement-media video {
  width: 100%;
  aspect-ratio: 8 / 3;
  object-fit: cover;
}

.media-label {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  background: rgba(5, 12, 12, 0.82);
  border-radius: 4px;
  font-size: 11px;
}

.media-label span { color: var(--mint); }

.results-section {
  background: var(--paper);
}

.result-switch {
  margin-bottom: 24px;
}

.table-responsive {
  position: relative;
  overflow-x: auto;
}

.results-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 15px;
}

.results-table th,
.results-table td {
  padding: 15px 14px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}

.results-table th:first-child,
.results-table td:first-child {
  text-align: left;
}

.results-table th {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.results-table th span {
  display: block;
  color: #4f625e;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

.results-table td:not(:first-child) {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.results-table tr.ours {
  background: #e2eee8;
}

.results-table tr.ours td:first-child {
  color: var(--mint-deep);
  font-weight: 700;
}

.results-table .best {
  font-weight: 800;
}

.generation-band {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
  margin-top: 72px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.generation-band h3 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
}

.generation-band p:not(.section-index) {
  margin: 0;
  color: var(--ink-soft);
}

.generation-measures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
}

.generation-measures div {
  min-width: 0;
  padding: 18px;
  background: var(--paper);
}

.generation-measures span {
  display: block;
  min-height: 38px;
  color: var(--ink-soft);
  font-size: 11px;
}

.generation-measures strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 18px;
}

.gallery-section {
  background: var(--paper-bright);
  border-top: 1px solid var(--line);
}

.gallery-heading {
  align-items: center;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.video-card {
  overflow: hidden;
  background: var(--night);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
}

.video-card video {
  width: 100%;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  background: #020505;
}

.video-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 10px 13px;
  color: var(--white);
}

.video-card span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  text-transform: uppercase;
}

.video-card strong {
  font-size: 12px;
  text-align: right;
}

.featured-video {
  border-color: var(--mint-deep);
}

.featured-video > div {
  background: #0c3e37;
}

.featured-video span {
  color: var(--mint);
}

.qualitative-strip {
  margin: 56px 0 0;
}

.qualitative-strip img {
  width: min(860px, 100%);
  margin: 0 auto;
}

.qualitative-strip figcaption {
  max-width: 720px;
  margin: 14px auto 0;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

/* Light, sample-first presentation for the qualitative sections. */
.reconstruction-section,
.refinement-section {
  padding: 96px 0;
  color: var(--ink);
  background: var(--paper-bright);
  border-top: 1px solid var(--line);
}

.refinement-section {
  border-bottom: 1px solid var(--line);
}

.refinement-copy > p:not(.section-index) {
  color: var(--ink-soft);
}

.refinement-buttons {
  background: #e0e7e3;
}

.refinement-buttons button {
  color: var(--ink-soft);
}

.refinement-buttons button[aria-pressed="true"] {
  color: var(--white);
  background: var(--mint-deep);
}

.refinement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  color: var(--ink-soft);
  font-size: 12px;
}

.refinement-meta strong {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 600;
}

.refinement-media {
  background: #edf3ef;
  border-color: var(--line);
}

.refinement-media video {
  display: block;
  background: #020505;
}

.media-label {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(205, 214, 209, 0.9);
}

.media-label span {
  color: var(--mint-deep);
}

.video-card {
  background: #ffffff;
  border-color: var(--line);
}

.video-card > div {
  color: var(--ink);
}

.video-card span {
  color: var(--ink-soft);
}

.featured-video > div {
  background: #dceee7;
}

.featured-video span {
  color: var(--mint-deep);
}

.resources-section {
  padding: 88px 0;
  color: var(--white);
  background: var(--night-soft);
}

.resources-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 90px;
}

.resources-layout h2 {
  font-size: 38px;
}

.resource-links {
  border-top: 1px solid var(--line-dark);
}

.resource-links a {
  display: grid;
  grid-template-columns: 24px 1fr 20px;
  gap: 14px;
  align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line-dark);
  transition: color 150ms ease, background 150ms ease;
}

.resource-links a:hover {
  color: var(--mint);
  background: rgba(255, 255, 255, 0.025);
}

.resource-links span {
  display: flex;
  flex-direction: column;
}

.resource-links strong {
  font-size: 14px;
}

.resource-links small {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
}

footer {
  color: rgba(255, 255, 255, 0.55);
  background: var(--night);
  border-top: 1px solid var(--line-dark);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  font-size: 12px;
}

.footer-inner .brand {
  color: var(--white);
}

.footer-inner p {
  margin: 0;
}

.footer-inner > a {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
}

/* Keep the navigation, resources, and footer on the light page canvas. */
.site-nav {
  color: var(--ink);
  background: rgba(251, 252, 250, 0.96);
  border-bottom-color: var(--line);
}

.nav-links a,
.nav-paper {
  color: var(--ink-soft);
}

.nav-links a:hover,
.nav-paper:hover {
  color: var(--ink);
}

/* The released page uses a light navigation canvas, including on narrow
   screens. Keep the compact menu control readable against that surface. */
.nav-toggle {
  color: var(--ink-soft);
  background: var(--paper-bright);
  border-color: var(--line);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  color: var(--mint-deep);
  border-color: #8db9a8;
  background: #f0f6f3;
}

.resources-section {
  color: var(--ink);
  background: var(--paper-bright);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.resource-links {
  border-top-color: var(--line);
}

.resource-links a {
  border-bottom-color: var(--line);
}

.resource-links a:hover {
  color: var(--mint-deep);
  background: #f0f6f3;
}

.resource-links small {
  color: var(--ink-soft);
}

footer {
  color: var(--ink-soft);
  background: var(--paper);
  border-top-color: var(--line);
}

.footer-inner .brand {
  color: var(--ink);
}

.footer-inner > a {
  color: var(--ink-soft);
  border-color: var(--line);
}

.refinement-trajectory-panel {
  padding: 18px;
}

.trajectory-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
}

.trajectory-heading strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 400;
  text-transform: none;
}

.trajectory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.trajectory-grid figure,
.sample-comparison-grid figure {
  min-width: 0;
  margin: 0;
}

.trajectory-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #071011;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.trajectory-grid figcaption,
.sample-comparison-grid figcaption {
  padding-top: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  text-align: center;
}

.reconstruction-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.reconstruction-sample {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reconstruction-sample > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.reconstruction-sample > header strong {
  color: var(--ink);
  font-size: 14px;
}

.reconstruction-sample > header span {
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}

.sample-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.sample-comparison-grid figure {
  padding-bottom: 10px;
  background: #ffffff;
}

.sample-comparison-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.reconstruction-video-sample video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #061011;
}

video.media-error {
  object-fit: contain;
  background: #edf3ef;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media (max-width: 1050px) {
  .nav-links { gap: 18px; }
  .hero h1 { font-size: 72px; }
  .thesis-grid { grid-template-columns: minmax(0, 1fr) 190px; gap: 26px; }
  .method-flow {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 20px;
  }
  .method-flow .flow-arrow { display: none; }
  .encoder-stage { grid-column: 1; grid-row: 1; }
  .prefix-stage { grid-column: 2; grid-row: 1; }
  .selection-stage { grid-column: 1; grid-row: 2; }
  .refine-stage { grid-column: 2; grid-row: 2; }
  .output-stage {
    grid-column: 1 / -1;
    grid-row: 3;
    width: min(100%, 520px);
    justify-self: center;
  }
  .generation-measures { grid-template-columns: repeat(2, 1fr); }
}

/* Keep the operating-space controls readable before the narrow-phone breakpoint. */
@media (max-width: 1080px) {
  .explorer-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
  }

  .explorer-heading h2 {
    font-size: clamp(34px, 4.5vw, 43px);
  }

  .explorer-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .selection-panel {
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .selection-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .selection-metrics div {
    display: block;
  }

  .selection-metrics span {
    display: block;
  }

  .selection-metrics strong {
    display: inline-block;
    margin-top: 5px;
  }
}

@media (max-width: 820px) {
  :root { --nav-height: 58px; }
  .section-inner { width: min(calc(100% - 32px), var(--content)); }
  .site-nav { grid-template-columns: 1fr auto auto; padding: 0 16px; }
  .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    justify-self: end;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--paper-bright);
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 7px 7px;
    box-shadow: 0 12px 24px rgba(28, 53, 47, 0.12);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 10px 12px; }
  .hero-content { width: calc(100% - 32px); }
  .hero-figure { width: calc(100% - 32px); }
  .hero-content { padding-top: 48px; }
  .hero h1 { font-size: 58px; }
  .hero-deck { max-width: 530px; font-size: 19px; }
  .hero-authors { max-width: 620px; font-size: 13px; }
  .hero-facts { gap: 18px; }
  .hero-facts div { grid-template-columns: auto 95px; }
  .hero-facts strong { font-size: 31px; }
  .thesis-band, .method-section, .results-section, .gallery-section, .explorer-section { padding: 76px 0; }
  h2 { font-size: 37px; }
  .thesis-grid { grid-template-columns: 1fr; }
  .thesis-proof { max-width: 420px; padding: 24px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .section-heading { grid-template-columns: 1fr; gap: 22px; margin-bottom: 34px; }
  .section-heading > p { max-width: 600px; }
  .explorer-layout { grid-template-columns: 1fr; }
  .heatmap-wrap { overflow-x: auto; padding-bottom: 6px; }
  .selection-panel { padding: 24px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .selection-metrics { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .selection-metrics div { display: block; }
  .selection-metrics span { display: block; }
  .selection-metrics strong { display: inline-block; margin-top: 5px; }
  .refinement-layout { grid-template-columns: 1fr; gap: 40px; }
  .generation-band { grid-template-columns: 1fr; gap: 32px; }
  .video-grid { grid-template-columns: 1fr; }
  .video-card video { aspect-ratio: 8 / 2.7; }
  .resources-layout { grid-template-columns: 1fr; gap: 38px; }
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-inner p { display: none; }
  .refinement-depth-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reconstruction-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  h2 { font-size: 32px; }
  .nav-paper { font-size: 0; }
  .nav-paper svg { width: 20px; height: 20px; }
  .hero h1 { font-size: 52px; }
  .hero-deck { font-size: 17px; }
  .hero-authors { margin-top: -8px; font-size: 12px; line-height: 1.65; }
  .hero-actions { gap: 8px; }
  .button { padding: 8px 11px; font-size: 12px; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; gap: 8px; }
  .hero-facts div { display: block; }
  .hero-facts strong, .hero-facts span { display: block; }
  .hero-facts strong { margin-bottom: 4px; }
  .hero-figure { margin-bottom: 40px; }
  .thesis-grid > div > p { font-size: 16px; }
  .method-flow { grid-template-columns: 1fr; padding: 24px 18px; }
  .method-flow .flow-arrow { display: none; }
  .method-flow .flow-stage { grid-column: 1; grid-row: auto; }
  .method-figure { margin: 0; }
  .metric-tabs { width: 100%; }
  .metric-tabs button { flex: 1; padding: 7px; font-size: 12px; }
  .segmented { max-width: 100%; }
  .heatmap { grid-template-columns: 36px repeat(8, 52px); min-width: 493px; }
  .heatmap-cell { min-height: 54px; font-size: 11px; }
  .selection-metrics { grid-template-columns: 1fr; }
  .reconstruction-section,
  .refinement-section { padding: 72px 0; }
  .refinement-media video { aspect-ratio: 8 / 4; object-fit: cover; }
  .refinement-trajectory-panel { padding: 12px; }
  .trajectory-grid { gap: 5px; }
  .trajectory-grid figcaption { font-size: 9px; }
  .generation-measures { grid-template-columns: 1fr 1fr; }
  .generation-measures div { padding: 14px; }
  .resources-layout h2 { font-size: 32px; }
  .refinement-depth-grid,
  .reconstruction-gallery { grid-template-columns: 1fr; }

  .heatmap-wrap::after,
  .table-responsive::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 6px;
    width: 28px;
    content: "";
    pointer-events: none;
    background: linear-gradient(90deg, rgba(243, 246, 242, 0), rgba(243, 246, 242, 0.96));
  }
}

/* Responsive media blocks used by the overview, refinement, and gallery. */
.hero-video-figure {
  max-width: var(--content);
}

.hero-figure video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #071011;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(22, 32, 32, 0.16);
}

.hero-video-figure {
  position: relative;
}

.video-sound-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  color: var(--white);
  background: rgba(7, 16, 17, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 6px;
  box-shadow: 0 5px 16px rgba(7, 16, 17, 0.24);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 160ms ease, border-color 160ms ease;
}

.video-sound-toggle:hover,
.video-sound-toggle:focus-visible {
  background: rgba(8, 115, 99, 0.94);
  border-color: rgba(255, 255, 255, 0.72);
}

.video-sound-toggle svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.video-sound-toggle .sound-icon-on {
  display: none;
}

.video-sound-toggle[aria-pressed="true"] .sound-icon-off {
  display: none;
}

.video-sound-toggle[aria-pressed="true"] .sound-icon-on {
  display: inline-flex;
}

.premise-figure {
  width: min(100%, 1040px);
  margin: 42px auto 0;
}

.premise-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(22, 32, 32, 0.10);
}

.refinement-video-panel {
  padding: 22px;
  background: #edf3ef;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.refinement-video-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: uppercase;
}

.refinement-video-heading strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
  text-transform: none;
  white-space: nowrap;
}

.refinement-depth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.refinement-depth-grid figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.refinement-depth-grid video {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  background: #071011;
}

.refinement-depth-grid figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px 10px;
  color: var(--ink);
  font-size: 11px;
}

.refinement-depth-grid figcaption strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
}

.refinement-depth-grid figcaption span {
  color: var(--ink-soft);
}

.reconstruction-video-sample video {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 8 / 3;
  object-fit: contain;
  background: #071011;
}

@media (max-width: 820px) {
  .refinement-depth-grid {
    grid-template-columns: 1fr;
  }

  .refinement-video-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* Interactive media selectors and synchronized playback panels. */
.refinement-heading {
  align-items: end;
  margin-bottom: 32px;
}

.refinement-heading > p {
  max-width: 420px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.refinement-depth-layout {
  display: grid;
  grid-template-columns: minmax(160px, 0.17fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.refinement-copy {
  min-width: 0;
  padding-top: 4px;
}

.sample-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 18px 0 20px;
}

.sample-picker button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  color: var(--ink-soft);
  text-align: left;
  background: #f6f9f7;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.sample-picker button:hover,
.sample-picker button[aria-pressed="true"] {
  color: var(--ink);
  background: #e2f0ea;
  border-color: #9fc9b8;
}

.sample-picker button[aria-pressed="true"] {
  box-shadow: inset 3px 0 0 var(--mint-deep);
}

.sample-picker button strong {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.sample-picker button span {
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.refinement-video-panel {
  padding: 18px;
}

.refinement-video-panel {
  min-width: 0;
}

.refinement-depth-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.refinement-depth-grid figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.refinement-depth-grid video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #071011;
}

.reconstruction-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.reconstruction-sample > header {
  padding: 11px 13px 9px;
}

.reconstruction-sample > header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reconstruction-video-sample video {
  aspect-ratio: 8 / 3;
  object-fit: cover;
}

@media (max-width: 900px) {
  .refinement-depth-layout {
    grid-template-columns: 1fr;
  }

  .sample-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reconstruction-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .refinement-video-panel {
    padding: 16px;
  }

  .refinement-depth-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reconstruction-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .refinement-depth-grid,
  .reconstruction-gallery {
    grid-template-columns: 1fr;
  }
}

/* One-sample refinement: keep the synchronized views in a single full-width frame. */
.refinement-heading {
  grid-template-columns: 1fr;
}

.refinement-depth-layout {
  display: block;
}

.refinement-video-panel {
  width: 100%;
  padding: clamp(18px, 2.4vw, 30px);
}

.refinement-depth-grid {
  gap: clamp(12px, 1.6vw, 20px);
}

.refinement-depth-grid video {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.refinement-depth-grid figcaption {
  justify-content: center;
  padding: 10px 12px 12px;
}

@media (max-width: 560px) {
  .refinement-video-panel {
    padding: 12px;
  }
}

/* Center the paper-style hero while keeping the title readable at every width. */
.hero-content {
  text-align: center;
}

.hero h1 {
  max-width: 1000px;
  margin: 0 auto 18px;
  font-size: clamp(44px, 5.8vw, 74px);
  line-height: 1.08;
  text-wrap: balance;
}

.hero h1 span {
  display: block;
  margin-bottom: 10px;
  color: var(--mint-deep);
  font-size: 1.02em;
  line-height: 1;
}

.hero-deck,
.hero-authors {
  margin-right: auto;
  margin-left: auto;
}

.hero-authors {
  margin-bottom: 5px;
}

.hero-authors sup {
  margin-left: 1px;
  color: var(--mint-deep);
  font-size: 0.72em;
  vertical-align: super;
}

.hero-affiliations {
  max-width: 1000px;
  margin: 0 auto 22px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.hero-affiliations sup {
  margin-right: 1px;
  color: var(--mint-deep);
  font-size: 0.78em;
  vertical-align: super;
}

.hero-actions,
.hero-facts {
  justify-content: center;
}

.hero-facts div {
  text-align: left;
}

.refinement-heading {
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 820px) {
  .hero h1 {
    max-width: 700px;
    font-size: clamp(34px, 8vw, 58px);
  }

  .hero h1 span {
    margin-bottom: 8px;
  }

  .hero-affiliations {
    margin-bottom: 18px;
    font-size: 11px;
  }
}
