:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --ink: #1b1f23;
  --muted: #5b6670;
  --subtle: #7b858e;
  --line: #dfe5eb;
  --line-strong: #cbd5df;
  --blue: #2368c4;
  --blue-dark: #174a91;
  --blue-soft: #e9f2ff;
  --green: #2e7d55;
  --green-soft: #e7f4ee;
  --orange: #ce6a19;
  --orange-soft: #fff1e5;
  --red: #b44636;
  --red-soft: #fdecea;
  --shadow: 0 18px 40px rgba(35, 56, 78, 0.10);
  --radius: 8px;
  --container: 1120px;
  --narrow: 820px;
  --anchor-offset: 86px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-offset);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.58;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue-dark);
}

[data-section],
#top {
  scroll-margin-top: var(--anchor-offset);
}

button {
  font: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  max-width: var(--narrow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(223, 229, 235, 0.88);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.read-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue);
  transition: width 0.12s linear;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 760;
}

.brand img {
  width: 24px;
  height: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a,
.nav-toggle {
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  background: transparent;
  color: #303943;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 680;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active,
.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: var(--blue-soft);
  color: var(--blue-dark);
  outline: none;
}

.nav-toggle {
  display: none;
  cursor: pointer;
}

.hero {
  padding: 54px 0 38px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7fafd 100%);
}

.hero-inner {
  display: grid;
  gap: 28px;
  text-align: center;
}

.paper-head {
  max-width: 1000px;
  margin: 0 auto;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 3rem;
  line-height: 1.08;
  font-weight: 780;
  letter-spacing: 0;
}

.authors {
  margin: 20px 0 0;
  color: #303943;
  font-size: 1.14rem;
}

.authors a {
  color: var(--blue-dark);
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.authors a:hover,
.authors a:focus-visible {
  color: var(--blue);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #222a32;
  border-radius: 999px;
  padding: 0 15px;
  background: #222a32;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 720;
}

.pill.disabled {
  border-color: var(--line-strong);
  background: #eef3f7;
  color: #59636d;
}

.hero-summary {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid #b9d4f5;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 246, 255, 0.96), rgba(255, 247, 232, 0.64)),
    #f8fbff;
  box-shadow: 0 18px 48px rgba(42, 87, 128, 0.1);
  text-align: left;
}

.hero-summary span {
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-summary p {
  max-width: 860px;
  margin: 9px 0 0;
  color: #243341;
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  font-weight: 500;
  line-height: 1.58;
}

.teaser-placeholder {
  width: min(940px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(18, 32, 48, 0.42), rgba(18, 32, 48, 0.42)),
    url("../images/poster-teaser.jpg") center / cover no-repeat,
    #1f2832;
  box-shadow: var(--shadow);
}

.teaser-frame {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 28px;
  color: #fff;
  text-align: center;
}

.teaser-frame strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.2;
}

.teaser-frame p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.84);
}

.play-mark {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  position: relative;
  background: rgba(0, 0, 0, 0.22);
}

.play-mark::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 19px;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.section {
  padding: 72px 0;
  scroll-margin-top: 74px;
}

.section.soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-title {
  margin: 0 0 14px;
  font-size: 2rem;
  line-height: 1.14;
  font-weight: 760;
  letter-spacing: 0;
  text-align: center;
}

.section-kicker {
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0;
}

.lead {
  margin: 0 auto 14px;
  color: #303943;
  font-size: 1.1rem;
  line-height: 1.62;
  text-align: center;
}

.narrow p:not(.lead) {
  margin: 14px 0 0;
  color: #303943;
}

.walkthrough-start {
  padding-top: 4px;
}

.section-kicker {
  display: block;
  margin-bottom: 8px;
  text-align: center;
}

.explain-card,
.result-card,
.video-card,
.method-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.explain-card {
  padding: 22px;
}

.explain-card.highlight {
  border-color: #b9d4f5;
  background: #fbfdff;
}

.card-index,
.result-label {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0;
}

.explain-card h3,
.method-grid h3,
.result-card h3,
.video-caption h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.explain-card p,
.method-grid p,
.result-card p,
.wide-figure figcaption {
  color: var(--muted);
}

.explain-card p,
.method-grid p,
.result-card p {
  margin: 10px 0 0;
  font-size: 0.98rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.noise-overlap {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 24px;
  align-items: center;
  margin-top: 26px;
  padding: 24px;
  border: 1px solid #bdd5ef;
  border-radius: var(--radius);
  background: #fff;
}

.noise-overlap h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.38rem;
  line-height: 1.2;
}

.noise-overlap p {
  margin: 11px 0 0;
  color: #354655;
  font-size: 0.98rem;
  line-height: 1.52;
}

.overlap-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.overlap-stage {
  min-width: 0;
}

.overlap-stage span {
  display: block;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
}

.overlap-stage p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.dot-field {
  position: relative;
  height: 148px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(16, 24, 32, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 32, 0.04) 1px, transparent 1px),
    #fbfdff;
  background-size: 22px 22px;
}

.dot-field::before,
.dot-field::after {
  position: absolute;
  top: 12px;
  font-size: 0.72rem;
  font-weight: 760;
}

.dot-field::before {
  left: 12px;
  color: var(--blue-dark);
  content: "target";
}

.dot-field::after {
  right: 12px;
  color: #8a5a00;
  content: "suboptimal";
}

.dot-field i,
.dot-field b {
  position: absolute;
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.82);
}

.dot-field i {
  background: #1f74b7;
}

.dot-field b {
  background: #d98200;
}

.dot-field.separated i:nth-of-type(1) { left: 22%; top: 38%; }
.dot-field.separated i:nth-of-type(2) { left: 30%; top: 54%; }
.dot-field.separated i:nth-of-type(3) { left: 18%; top: 67%; }
.dot-field.separated i:nth-of-type(4) { left: 36%; top: 29%; }
.dot-field.separated i:nth-of-type(5) { left: 27%; top: 76%; }
.dot-field.separated b:nth-of-type(1) { left: 66%; top: 36%; }
.dot-field.separated b:nth-of-type(2) { left: 73%; top: 55%; }
.dot-field.separated b:nth-of-type(3) { left: 61%; top: 70%; }
.dot-field.separated b:nth-of-type(4) { left: 81%; top: 46%; }
.dot-field.separated b:nth-of-type(5) { left: 70%; top: 24%; }

.dot-field.overlapped i:nth-of-type(1) { left: 43%; top: 39%; }
.dot-field.overlapped i:nth-of-type(2) { left: 52%; top: 54%; }
.dot-field.overlapped i:nth-of-type(3) { left: 39%; top: 65%; }
.dot-field.overlapped i:nth-of-type(4) { left: 56%; top: 31%; }
.dot-field.overlapped i:nth-of-type(5) { left: 47%; top: 75%; }
.dot-field.overlapped b:nth-of-type(1) { left: 49%; top: 36%; }
.dot-field.overlapped b:nth-of-type(2) { left: 58%; top: 56%; }
.dot-field.overlapped b:nth-of-type(3) { left: 45%; top: 69%; }
.dot-field.overlapped b:nth-of-type(4) { left: 63%; top: 45%; }
.dot-field.overlapped b:nth-of-type(5) { left: 53%; top: 24%; }

.overlap-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.implementation-contrast {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.implementation-contrast article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: #fff;
}

.implementation-contrast h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.implementation-contrast ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.97rem;
}

.implementation-contrast li + li {
  margin-top: 7px;
}

.implementation-contrast code {
  color: var(--blue-dark);
  font-size: 0.92em;
}

.method-grid article {
  padding: 22px;
}

.method-grid code {
  color: var(--blue-dark);
  font-size: 0.92em;
}

.wide-figure.method-overview-figure {
  margin: 30px auto 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.method-overview-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.wide-figure.method-overview-figure img {
  display: block;
  width: 100%;
  background: transparent;
}

.wide-figure.method-overview-figure figcaption {
  max-width: 920px;
  margin: 12px auto 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.math {
  color: var(--blue-dark);
  font-family: "STIX Two Text", "Cambria Math", "Times New Roman", serif;
  font-size: 1.03em;
  font-style: italic;
  white-space: nowrap;
}

.math var {
  font-style: italic;
}

.math sub {
  font-family: "STIX Two Text", "Cambria Math", "Times New Roman", serif;
  font-size: 0.68em;
  font-style: normal;
  line-height: 0;
  vertical-align: -0.24em;
}

.figure-stack {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.wide-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.wide-figure img {
  width: 100%;
  background: #fff;
}

.wide-figure picture {
  display: block;
}

.wide-figure.compact img {
  max-height: 620px;
  object-fit: contain;
}

.wide-figure figcaption {
  padding: 13px 16px 16px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.task-figure {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.task-figure img {
  display: block;
  background: transparent;
}

.task-figure figcaption {
  padding: 13px 0 0;
}

.hierarchy-figure {
  margin-top: clamp(58px, 6vw, 86px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.hierarchy-figure picture {
  display: block;
  margin-top: 18px;
  overflow-x: auto;
  overflow-y: hidden;
}

.hierarchy-figure img {
  display: block;
  width: 100%;
  background: transparent;
}

.hierarchy-figure figcaption {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px solid #cfe0f1;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 12px 28px rgba(35, 56, 78, 0.06);
}

.hierarchy-figure figcaption strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
}

.hierarchy-figure figcaption p {
  margin: 8px 0 0;
}

.hierarchy-figure figcaption ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.hierarchy-figure figcaption li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfe;
}

.hierarchy-figure figcaption b {
  color: #263746;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.controlled-results {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scale-results {
  grid-template-columns: 1fr;
}

.result-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.result-subhead span {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 780;
}

.result-subhead p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.scale-heading {
  margin-top: 26px;
}

.result-card {
  overflow: hidden;
}

.result-card > div {
  padding: 22px 22px 16px;
}

.result-card img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  border-top: 1px solid var(--line);
  background: #fff;
}

.controlled-results .result-card img {
  height: 220px;
}

.scale-card {
  display: block;
}

.scale-copy {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  gap: 18px 28px;
  align-items: start;
}

.scale-keyline {
  margin-top: 0;
  padding: 12px 14px;
  border: 1px solid #bdd5ef;
  border-radius: 7px;
  background: #f2f8ff;
  color: var(--blue-dark);
  font-weight: 720;
  line-height: 1.45;
}

.scale-card img {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 18px 24px 22px;
  box-sizing: border-box;
  object-fit: contain;
  border-top: 1px solid var(--line);
  border-left: 0;
}

.expandable-figure {
  cursor: zoom-in;
}

.expandable-figure:focus-visible {
  outline: 3px solid rgba(20, 117, 255, 0.45);
  outline-offset: -3px;
}

body.lightbox-open {
  overflow: hidden;
}

.figure-lightbox[hidden] {
  display: none;
}

.figure-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 58px);
  background: rgba(9, 17, 27, 0.74);
}

.figure-lightbox-panel {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(1320px, calc(100vw - clamp(48px, 10vw, 116px)));
  max-height: calc(100vh - clamp(48px, 10vw, 116px));
  padding: 22px;
  overflow: hidden;
  overscroll-behavior: contain;
  border: 1px solid rgba(202, 216, 230, 0.8);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.figure-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(31, 45, 59, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 850;
  line-height: 1;
}

.figure-lightbox-viewport {
  overflow: auto;
  overscroll-behavior: contain;
}

.figure-lightbox-close:hover,
.figure-lightbox-close:focus-visible {
  border-color: var(--blue);
  color: var(--blue-dark);
  outline: none;
}

.figure-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - clamp(150px, 18vw, 220px));
  object-fit: contain;
  background: #fff;
}

.figure-lightbox.has-long-caption .figure-lightbox-image {
  max-height: calc(100vh - clamp(320px, 36vw, 420px));
}

.figure-lightbox-caption {
  max-width: 960px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.takeaway-panel {
  max-width: 980px;
  margin: 26px auto 0;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid #b9d4f5;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(237, 246, 255, 0.96), rgba(255, 247, 232, 0.64)),
    #f8fbff;
  box-shadow: 0 18px 48px rgba(42, 87, 128, 0.1);
  text-align: left;
}

.takeaway-panel h3 {
  margin: 0;
  color: #18232e;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.25;
}

.takeaway-panel p {
  max-width: 880px;
  margin: 12px 0 0;
  color: #243341;
  font-size: clamp(1rem, 1.55vw, 1.08rem);
  line-height: 1.56;
}

.takeaway-panel ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.takeaway-panel li {
  padding: 14px;
  border: 1px solid #c8d9ea;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: #303943;
  line-height: 1.48;
}

.takeaway-panel strong {
  color: var(--blue-dark);
}

.faq-panel {
  margin-top: 28px;
}

.faq-head {
  text-align: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.faq-head .eyebrow {
  margin: 0 0 6px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.faq-head h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
}

.faq-item h4 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
}

.faq-item p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.video-card {
  overflow: hidden;
  background: #fff;
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111820;
}

.video-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.speed-controls {
  display: inline-flex;
  gap: 6px;
}

.speed-controls button {
  min-width: 40px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: #33404c;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 730;
}

.speed-controls button:hover,
.speed-controls button:focus-visible {
  border-color: var(--blue);
  color: var(--blue-dark);
  outline: none;
}

.speed-controls button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.bibtex {
  margin: 18px 0 0;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101820;
  color: #eef6ff;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: #f7fafc;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer p {
  margin: 0;
}

@media (max-width: 980px) {
  h1 {
    font-size: 2.45rem;
  }

  .results-grid,
  .video-grid,
  .implementation-contrast,
  .controlled-results,
  .scale-copy,
  .scale-card {
    grid-template-columns: 1fr;
  }

  .scale-card img {
    height: auto;
    min-height: 0;
    padding: 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .takeaway-panel ul {
    grid-template-columns: 1fr;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .noise-overlap {
    grid-template-columns: 1fr;
  }

  .result-card img {
    height: auto;
    max-height: 420px;
  }

  .result-subhead {
    display: block;
  }

  .result-subhead p {
    margin-top: 4px;
    text-align: left;
  }

  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 18px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    padding: 6px 0 2px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .site-nav.open {
    display: flex;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding-top: 32px;
    padding-bottom: 30px;
  }

  .hero-inner {
    gap: 20px;
  }

  h1 {
    font-size: 1.88rem;
    line-height: 1.1;
  }

  .authors {
    margin-top: 15px;
  }

  .link-row {
    gap: 8px;
    margin-top: 16px;
  }

  .pill {
    min-height: 36px;
    padding: 0 14px;
  }

  .section {
    padding: 54px 0;
  }

  .section-title {
    font-size: 1.62rem;
  }

  .container {
    width: min(var(--container), calc(100% - 28px));
  }

  .teaser-frame {
    min-height: 230px;
  }

  .hero-summary {
    padding: 18px;
  }

  .noise-overlap {
    padding: 18px;
  }

  .noise-overlap h3 {
    font-size: 1.18rem;
  }

  .overlap-visual {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .overlap-arrow {
    justify-self: center;
  }

  .dot-field {
    height: 132px;
  }

  .method-overview-scroll {
    margin-inline: 0;
    padding-inline: 0;
    overflow-x: visible;
  }

  .wide-figure.method-overview-figure img {
    width: 100%;
    max-width: 100%;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .hierarchy-figure {
    margin-top: clamp(54px, 14vw, 66px);
  }

  .hierarchy-figure picture {
    margin-inline: -14px;
    margin-top: 14px;
    padding-inline: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .hierarchy-figure img {
    width: 820px;
    max-width: none;
  }

  .hierarchy-figure figcaption {
    padding: 15px 16px;
  }

  .hierarchy-figure figcaption ul {
    grid-template-columns: 1fr;
  }

  .figure-lightbox {
    padding: 18px;
  }

  .figure-lightbox-panel {
    width: calc(100vw - 36px);
    max-height: calc(100vh - 36px);
    padding: 18px;
  }

  .figure-lightbox-viewport {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .figure-lightbox-image {
    max-height: calc(100vh - 150px);
  }

  .figure-lightbox.has-long-caption .figure-lightbox-image {
    max-height: calc(100vh - 380px);
  }

  .figure-lightbox-image.is-wide {
    width: min(860px, 220vw);
    max-width: none;
  }

  .figure-lightbox-caption {
    font-size: 0.88rem;
    text-align: left;
  }

  .video-caption {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer .container {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
