:root {
  color-scheme: light;
  --page: #f4f6f8;
  --surface: #ffffff;
  --ink: #16222e;
  --ink-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f8fafb;
  --line: #d7dee5;
  --line-strong: #b9c5ce;
  --paper: #16222e;
  --muted: #51606e;
  --coral: #e8720c;
  --cyan: #0e8f7e;
  --acid: #7c4dbe;
  --violet: #1874b8;
  --error: #c22f2f;
  --ue: #2ca02c;
  --header-h: 58px;
  --content: min(1120px, calc(100vw - 64px));
  --serif: Charter, "Bitstream Charter", Sitka, Cambria, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::selection {
  background: var(--acid);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--acid);
  color: var(--ink);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 32px;
  border-bottom: 1px solid transparent;
  transition: background 200ms ease, border-color 200ms ease;
}

.site-header.is-scrolled {
  background: rgba(10, 12, 14, 0.88);
  border-color: var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.brand-mark {
  position: relative;
  width: 26px;
  height: 22px;
  display: inline-block;
}

.brand-mark i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  filter: blur(0.1px);
}

.brand-mark i:nth-child(1) {
  left: 0;
  top: 7px;
  background: var(--coral);
}

.brand-mark i:nth-child(2) {
  left: 8px;
  top: 1px;
  background: var(--cyan);
  opacity: 0.9;
}

.brand-mark i:nth-child(3) {
  right: 0;
  bottom: 1px;
  background: var(--acid);
  opacity: 0.88;
}

.desktop-nav {
  display: flex;
  gap: 30px;
  color: #c8cbc8;
  font-size: 12px;
  font-weight: 600;
}

.desktop-nav a {
  position: relative;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: var(--paper);
  transition: right 180ms ease;
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after {
  right: 0;
}

.header-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.header-link span {
  font-size: 16px;
  transition: transform 180ms ease;
}

.header-link:hover span {
  transform: translate(3px, -3px);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 64px) max(32px, calc((100vw - 1320px) / 2)) 80px;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22%;
  z-index: -1;
  background: linear-gradient(transparent, var(--ink));
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to right, black, transparent 72%);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-copy {
  width: min(720px, 62vw);
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 24px 0 30px;
  max-width: 760px;
  font-size: clamp(66px, 8.5vw, 142px);
  font-weight: 600;
  line-height: 0.78;
  letter-spacing: -0.07em;
}

.hero h1 em,
.section h2 em,
.recap-card h2 em {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--coral);
}

.hero-deck {
  width: min(580px, 90%);
  margin: 0;
  color: #c9ccca;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.6;
  letter-spacing: -0.015em;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 38px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button span {
  font-size: 16px;
}

.button-primary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.button-primary:hover {
  background: var(--acid);
  border-color: var(--acid);
}

.button-ghost:hover {
  border-color: var(--paper);
}

.hero-annotation {
  position: absolute;
  right: max(28px, calc((100vw - 1320px) / 2));
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--mono);
  text-align: right;
}

.hero-annotation span {
  color: #6d7474;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-annotation strong {
  font-size: 11px;
  font-weight: 500;
}

.hero-annotation-a {
  top: 26%;
}

.hero-annotation-b {
  bottom: 22%;
}

.scroll-cue {
  position: absolute;
  left: 32px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #777d7b;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-90deg) translateY(100%);
  transform-origin: left bottom;
}

.scroll-cue i {
  display: inline-block;
  width: 52px;
  height: 1px;
  overflow: hidden;
  background: #383d3d;
}

.scroll-cue i::after {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--paper);
  animation: scrollCue 2s ease-in-out infinite;
}

@keyframes scrollCue {
  0%,
  100% {
    transform: translateX(-26px);
  }
  55% {
    transform: translateX(55px);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-delay-1 {
  animation-delay: 80ms;
}

.reveal-delay-2 {
  animation-delay: 170ms;
}

.reveal-delay-3 {
  animation-delay: 260ms;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.answer-strip {
  display: grid;
  grid-template-columns: 0.8fr 1.8fr 1fr;
  align-items: center;
  min-height: 120px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.answer-strip > * {
  height: 100%;
  margin: 0;
  padding: 26px 32px;
  display: flex;
  align-items: center;
}

.answer-strip > * + * {
  border-left: 1px solid var(--line);
}

.answer-strip-lead {
  gap: 24px;
  font-family: var(--serif);
  font-size: 20px;
}

.index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: #959a98;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.answer-strip-flow {
  justify-content: center;
  gap: clamp(10px, 1.8vw, 28px);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.answer-strip-flow i {
  color: var(--coral);
  font-size: 16px;
  font-style: normal;
}

.answer-strip-note {
  color: #a7acab;
  font-size: 13px;
  line-height: 1.5;
}

.answer-strip-note strong {
  color: var(--cyan);
}

.section {
  width: var(--content);
  margin: 0 auto;
  padding: 150px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
}

.section-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 14px;
}

.section-heading h2,
.camera-copy h2,
.sources h2 {
  margin: 0;
  font-size: clamp(48px, 6.4vw, 92px);
  font-weight: 550;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.section-heading h2 em,
.camera-copy h2 em {
  color: var(--cyan);
}

.section-heading > div:last-child > p {
  max-width: 590px;
  margin: 30px 0 0;
  color: #9ca19f;
  font-size: 16px;
  line-height: 1.7;
}

.section-heading.compact {
  margin-bottom: 72px;
}

.pipeline-tabs {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #0c0f11;
}

.pipeline-tab {
  position: relative;
  min-height: 72px;
  padding: 14px 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #737a78;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease;
}

.pipeline-tab:last-child {
  border-right: 0;
}

.pipeline-tab span {
  display: block;
  margin-bottom: 8px;
  color: #4c5351;
  font-size: 8px;
}

.pipeline-tab::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--acid);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.pipeline-tab:hover,
.pipeline-tab:focus-visible {
  color: var(--paper);
}

.pipeline-tab.is-active {
  background: #171c1e;
  color: var(--paper);
}

.pipeline-tab.is-active::after {
  transform: scaleX(1);
}

.lab-shell {
  border: 1px solid var(--line);
  background: var(--ink-soft);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
}

.lab-toolbar {
  min-height: 68px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.lab-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #afb5b3;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 14px rgba(217, 255, 111, 0.55);
}

.camera-picker {
  display: flex;
  align-items: center;
  gap: 14px;
}

.camera-picker > span {
  color: #6f7674;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.camera-buttons {
  display: flex;
}

.camera-buttons button {
  width: 34px;
  height: 30px;
  border: 1px solid var(--line);
  border-right: 0;
  background: transparent;
  color: #6f7674;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
}

.camera-buttons button:last-child {
  border-right: 1px solid var(--line);
}

.camera-buttons button:hover,
.camera-buttons button:focus-visible {
  color: var(--paper);
}

.camera-buttons button.is-active {
  background: var(--cyan);
  color: var(--ink);
  border-color: var(--cyan);
}

.lab-main {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(300px, 0.75fr);
  min-height: 590px;
}

.lab-visual {
  position: relative;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

#process-canvas {
  display: block;
  width: 100%;
  height: 590px;
  min-height: 590px;
}

.canvas-hint {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  color: #636967;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-explanation {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 34px 30px 28px;
}

.step-count,
.mini-label {
  margin: 0 0 16px;
  color: #69706d;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.lab-explanation h3 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 35px;
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.lab-explanation #step-copy {
  margin: 0;
  color: #a5aaa8;
  font-size: 13px;
  line-height: 1.65;
}

.step-detail {
  padding: 18px;
  border-left: 2px solid var(--coral);
  background: rgba(255, 255, 255, 0.025);
}

.step-detail span {
  display: block;
  margin-bottom: 9px;
  color: #707775;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-detail code {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
}

.change-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.change-pills span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  color: #a0a6a4;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lab-controls {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 8px;
}

.icon-button,
.play-button {
  height: 44px;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
}

.icon-button {
  font-size: 16px;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--paper);
}

.play-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.play-button:hover,
.play-button:focus-visible {
  background: var(--acid);
  border-color: var(--acid);
}

.play-icon {
  font-size: 9px;
}

.iteration-footer {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  border-top: 1px solid var(--line);
}

.iteration-footer > div {
  min-height: 78px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.iteration-footer > div + div {
  border-left: 1px solid var(--line);
}

.iteration-footer span {
  color: #646b69;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.iteration-footer strong {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.loss-section {
  width: 100%;
  padding-left: max(32px, calc((100vw - 1320px) / 2));
  padding-right: max(32px, calc((100vw - 1320px) / 2));
  background: var(--paper);
  color: var(--ink);
}

.loss-section .eyebrow {
  color: #c34838;
}

.loss-section .index {
  border-color: rgba(10, 12, 14, 0.2);
  color: #6c706c;
}

.loss-section .section-heading h2 em {
  color: #c34838;
}

.loss-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border: 1px solid rgba(10, 12, 14, 0.18);
}

.loss-formula-card,
.loss-meter-card {
  min-height: 500px;
  padding: clamp(30px, 4vw, 60px);
}

.loss-formula-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(10, 12, 14, 0.18);
  overflow: hidden;
}

.loss-formula-card::after {
  content: "ℒ";
  position: absolute;
  right: -34px;
  bottom: -120px;
  z-index: 0;
  color: rgba(10, 12, 14, 0.035);
  font-family: var(--serif);
  font-size: 330px;
}

.formula-labels {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 44px;
  color: #6e716d;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.formula {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: clamp(7px, 1vw, 15px);
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(25px, 2.5vw, 36px);
  letter-spacing: -0.04em;
}

.formula i {
  color: #727570;
  font-style: normal;
}

.formula b {
  font-weight: 400;
}

.formula-l1 {
  color: #b94536;
}

.formula-ssim {
  color: #167b86;
}

.formula sub {
  font-size: 0.45em;
}

.lambda-control {
  position: relative;
  z-index: 1;
  display: block;
}

.lambda-control > span:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.lambda-control b {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
}

.lambda-control output {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.lambda-control input {
  width: 100%;
  height: 2px;
  margin: 0;
  border-radius: 0;
  appearance: none;
  background: linear-gradient(90deg, #b94536 0 20%, rgba(10, 12, 14, 0.16) 20% 100%);
  outline: none;
}

.lambda-control input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  cursor: grab;
}

.lambda-control input::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  cursor: grab;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  color: #747873;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.range-labels i {
  font-style: normal;
}

.text-button {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin-top: 24px;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid #8c8e89;
  background: transparent;
  color: #515450;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

.loss-meter-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #e8e4da;
}

.loss-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 62px;
}

.loss-meter-head > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.loss-meter-head span {
  color: #727570;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loss-meter-head strong {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.loss-meter-head strong i {
  font-style: normal;
}

.total-loss {
  text-align: right;
}

.total-loss strong {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.meter-row + .meter-row {
  margin-top: 30px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
  color: #4e514d;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meter-label strong {
  font-size: 10px;
}

.meter-track {
  height: 7px;
  background: rgba(10, 12, 14, 0.1);
  overflow: hidden;
}

.meter-track i {
  display: block;
  height: 100%;
  transition: width 220ms ease;
}

#l1-meter {
  width: 28.4%;
  background: #b94536;
}

#ssim-meter {
  width: 45.2%;
  background: #167b86;
}

.code-note {
  margin: 54px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(10, 12, 14, 0.14);
  color: #666a65;
  font-size: 11px;
  line-height: 1.7;
}

.code-note code,
.camera-facts code,
.renderer-equations code {
  font-family: var(--mono);
  color: var(--ink);
  font-size: 0.94em;
}

.loss-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(10, 12, 14, 0.18);
  border-top: 0;
}

.loss-notes article {
  position: relative;
  min-height: 240px;
  padding: 32px;
}

.loss-notes article + article {
  border-left: 1px solid rgba(10, 12, 14, 0.18);
}

.note-number {
  display: block;
  margin-bottom: 42px;
  color: #878a85;
  font-family: var(--mono);
  font-size: 9px;
}

.loss-notes h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.loss-notes p {
  margin: 0;
  color: #686b66;
  font-size: 12px;
  line-height: 1.65;
}

.camera-section {
  padding-bottom: 110px;
}

.camera-layout {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: clamp(60px, 8vw, 120px);
  align-items: start;
}

.camera-copy > .eyebrow {
  display: inline-block;
  margin: 0 0 28px 16px;
}

.camera-copy h2 {
  font-size: clamp(52px, 6vw, 86px);
}

.camera-copy .lead {
  max-width: 520px;
  margin: 32px 0 52px;
  color: #afb4b2;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.45;
}

.camera-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.camera-facts li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.camera-facts li > span {
  color: #636a68;
  font-family: var(--mono);
  font-size: 8px;
}

.camera-facts h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.camera-facts p {
  margin: 0;
  color: #8e9492;
  font-size: 12px;
  line-height: 1.65;
}

.camera-facts code {
  color: var(--cyan);
}

.camera-demo-card {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  border: 1px solid var(--line);
  background: var(--ink-soft);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.demo-card-head {
  min-height: 72px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.demo-card-head > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-card-head span {
  color: #666d6b;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-card-head strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
}

.fixed-badge {
  padding: 7px 9px;
  border: 1px solid rgba(97, 220, 232, 0.32);
  color: var(--cyan) !important;
}

#camera-canvas {
  display: block;
  width: 100%;
  height: 520px;
  cursor: crosshair;
}

.camera-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.camera-readout > div {
  min-height: 78px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.camera-readout > div + div {
  border-left: 1px solid var(--line);
}

.camera-readout span {
  color: #626967;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.camera-readout strong,
.camera-readout code {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}

.camera-readout strong {
  color: var(--acid);
}

.camera-answer {
  margin-top: 90px;
  padding: 40px 0 0 50%;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 32px;
  border-top: 1px solid var(--line);
}

.camera-answer span {
  color: var(--coral);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.camera-answer p {
  max-width: 560px;
  margin: 0;
  color: #9ca19f;
  font-size: 15px;
  line-height: 1.65;
}

.camera-answer strong {
  color: var(--paper);
}

.camera-answer a {
  display: inline-block;
  margin-top: 12px;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.camera-answer a:hover,
.camera-answer a:focus-visible {
  color: var(--cyan);
}

.render-section {
  width: 100%;
  padding-left: max(32px, calc((100vw - 1320px) / 2));
  padding-right: max(32px, calc((100vw - 1320px) / 2));
  background: #111618;
}

.renderer-heading h2 em {
  color: var(--coral);
}

.renderer-lab {
  display: grid;
  grid-template-columns: 1fr 290px;
  min-height: 650px;
  border: 1px solid var(--line);
  background: #0c1012;
}

.renderer-stage {
  position: relative;
  overflow: hidden;
}

#raster-canvas {
  display: block;
  width: 100%;
  height: 650px;
}

.raster-stage-label {
  position: absolute;
  left: 22px;
  top: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
}

.raster-stage-label span {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #8d9492;
  font-size: 8px;
}

.raster-stage-label strong {
  font-size: 9px;
  letter-spacing: 0.08em;
}

.renderer-controls {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  border-left: 1px solid var(--line);
}

.raster-step {
  position: relative;
  padding: 24px;
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.raster-step:last-child {
  border-bottom: 0;
}

.raster-step::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--coral);
  transform: scaleY(0);
  transition: transform 180ms ease;
}

.raster-step > span {
  grid-row: 1 / 3;
  color: #59615f;
  font-family: var(--mono);
  font-size: 8px;
}

.raster-step strong {
  color: #878e8c;
  font-size: 13px;
  font-weight: 600;
}

.raster-step small {
  margin-top: 7px;
  color: #59615f;
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.raster-step:hover strong,
.raster-step:focus-visible strong,
.raster-step.is-active strong {
  color: var(--paper);
}

.raster-step.is-active {
  background: #151b1d;
}

.raster-step.is-active::before {
  transform: scaleY(1);
}

.raster-step.is-active > span {
  color: var(--coral);
}

.renderer-equations {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-top: 0;
}

.renderer-equations article {
  padding: 42px;
}

.renderer-equations article + article {
  border-left: 1px solid var(--line);
}

.equation-large {
  margin: 18px 0 26px;
  color: var(--cyan);
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.035em;
}

.renderer-equations article:nth-child(2) .equation-large {
  color: var(--acid);
}

.renderer-equations p:last-child {
  max-width: 550px;
  margin: 0;
  color: #858c8a;
  font-size: 12px;
  line-height: 1.7;
}

.renderer-equations code {
  color: var(--paper);
}

.ray-contrast {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 50px;
  margin-top: 84px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.contrast-title {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contrast-title:last-child {
  text-align: right;
}

.contrast-title span {
  color: #626a68;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contrast-title strong {
  color: #7f8784;
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 35px);
  font-weight: 400;
}

.contrast-title.is-splat strong {
  color: var(--paper);
}

.contrast-mark {
  color: var(--coral);
  font-family: var(--serif);
  font-size: 48px;
}

.model-section {
  padding-bottom: 100px;
}

.model-section .section-heading h2 em {
  color: var(--violet);
}

.parameter-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
}

.parameter-grid article {
  position: relative;
  min-height: 300px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  transition: background 180ms ease;
}

.parameter-grid article + article {
  border-left: 1px solid var(--line);
}

.parameter-grid article:hover {
  background: rgba(255, 255, 255, 0.025);
}

.parameter-grid article > span {
  position: absolute;
  right: 16px;
  top: -22px;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 128px;
  line-height: 1;
  opacity: 0.12;
  transition: opacity 180ms ease, transform 220ms ease;
}

.parameter-grid article:hover > span {
  opacity: 0.25;
  transform: translateY(6px);
}

.parameter-grid h3 {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
}

.parameter-grid p {
  margin: 0;
  color: #777e7c;
  font-size: 11px;
  line-height: 1.65;
}

.covariance-note {
  width: min(760px, 75%);
  margin: 50px 0 0 auto;
  padding-left: 26px;
  border-left: 2px solid var(--violet);
  color: #8f9693;
  font-size: 14px;
  line-height: 1.75;
}

.covariance-note strong {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
}

.recap-section {
  width: 100%;
  padding: 80px max(32px, calc((100vw - 1320px) / 2));
}

.recap-card {
  position: relative;
  min-height: 680px;
  padding: clamp(48px, 7vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--coral);
  color: var(--ink);
  overflow: hidden;
}

.recap-card::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -170px;
  top: -250px;
  border: 1px solid rgba(10, 12, 14, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(10, 12, 14, 0.035), 0 0 0 140px rgba(10, 12, 14, 0.025);
}

.recap-card .eyebrow {
  color: rgba(10, 12, 14, 0.65);
}

.recap-card h2 {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 24px 0 70px;
  font-size: clamp(52px, 7vw, 104px);
  font-weight: 550;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.recap-card h2 em {
  color: var(--paper);
}

.recap-loop {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 25px 0;
  border-top: 1px solid rgba(10, 12, 14, 0.22);
  border-bottom: 1px solid rgba(10, 12, 14, 0.22);
}

.recap-loop > div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 10px;
}

.recap-loop span {
  grid-row: 1 / 3;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 8px;
  opacity: 0.55;
}

.recap-loop strong {
  font-size: 12px;
}

.recap-loop small {
  color: rgba(10, 12, 14, 0.64);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.5;
  text-transform: uppercase;
}

.recap-loop > i {
  font-size: 18px;
  font-style: normal;
}

.recap-loop .loop-back {
  font-size: 25px;
}

.recap-answer {
  position: relative;
  z-index: 1;
  margin-top: 46px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--serif);
}

.recap-answer span {
  font-size: 20px;
}

.recap-answer strong {
  color: var(--paper);
  font-size: 43px;
  font-weight: 400;
}

.slam-section {
  padding-top: 130px;
  padding-bottom: 120px;
}

.slam-heading h2 em {
  color: var(--acid);
}

.slam-boundary {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1.65fr);
  gap: 44px;
  align-items: start;
  margin-bottom: 70px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.slam-boundary > span {
  color: var(--coral);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.slam-boundary p {
  max-width: 920px;
  margin: 0;
  color: #969d9a;
  font-size: 15px;
  line-height: 1.75;
}

.slam-boundary strong {
  color: var(--paper);
  font-weight: 600;
}

.state-shift {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
  align-items: stretch;
}

.state-shift article {
  min-height: 300px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: #0d1012;
}

.state-shift article.is-slam {
  border-color: rgba(217, 255, 111, 0.35);
  background: linear-gradient(145deg, rgba(217, 255, 111, 0.07), rgba(97, 220, 232, 0.025));
}

.state-shift article > span {
  color: #727a77;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.state-shift article.is-slam > span {
  color: var(--acid);
}

.state-shift h3 {
  margin: 38px 0 auto;
  font-family: var(--serif);
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.state-shift article > code {
  display: block;
  margin: 34px 0 14px;
  color: var(--cyan);
  font-family: var(--serif);
  font-size: 17px;
}

.state-shift article.is-slam > code {
  color: var(--acid);
}

.state-shift article p {
  margin: 0;
  color: #757d7a;
  font-size: 11px;
  line-height: 1.65;
}

.state-shift article p code {
  color: #a7afac;
}

.state-shift-arrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coral);
}

.state-shift-arrow i {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: 1px;
  background: rgba(255, 114, 94, 0.35);
}

.state-shift-arrow span {
  position: relative;
  z-index: 1;
  margin-top: -42px;
  padding: 5px 8px;
  background: var(--ink);
  color: #747c79;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.state-shift-arrow b {
  position: absolute;
  right: 9px;
  top: calc(50% - 14px);
  font-size: 24px;
  font-weight: 400;
}

.slam-lab {
  margin-top: 72px;
  border: 1px solid var(--line);
  background: #0c1012;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.3);
}

.slam-lab-topbar {
  min-height: 54px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: #7c8481;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.slam-lab-topbar span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.slam-lab-topbar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 12px rgba(217, 255, 111, 0.5);
}

.slam-lab-topbar strong {
  color: var(--paper);
  font-weight: 600;
}

.slam-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.slam-tab {
  min-height: 86px;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 3px 8px;
  align-content: center;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #686f6d;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.slam-tab:last-child {
  border-right: 0;
}

.slam-tab:hover {
  background: rgba(255, 255, 255, 0.025);
}

.slam-tab.is-active {
  background: rgba(217, 255, 111, 0.07);
  color: var(--paper);
  box-shadow: inset 0 -2px var(--acid);
}

.slam-tab > span {
  grid-row: 1 / 3;
  padding-top: 2px;
  color: #545b59;
  font-family: var(--mono);
  font-size: 8px;
}

.slam-tab.is-active > span {
  color: var(--acid);
}

.slam-tab strong {
  font-size: 11px;
  font-weight: 600;
}

.slam-tab small {
  color: #606765;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slam-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
}

.slam-visual-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slam-visual-panel {
  min-width: 0;
  margin: 0;
  background: #101518;
}

.slam-visual-panel + .slam-visual-panel {
  border-left: 1px solid var(--line);
}

.slam-visual-panel figcaption {
  min-height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  color: #7f8784;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.slam-visual-panel figcaption > span {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--cyan);
}

.slam-visual-panel figcaption b {
  margin-left: auto;
  color: #59615f;
  font-weight: 500;
}

#slam-canvas,
#slam-graph {
  display: block;
  width: 100%;
  height: 410px;
}

#slam-graph {
  background: radial-gradient(circle at 50% 46%, rgba(97, 220, 232, 0.04), transparent 52%), #0d1214;
}

.slam-graph-edge {
  fill: none;
  stroke: #3d4745;
  stroke-width: 2;
}

.slam-graph-edge.is-splat {
  stroke: var(--cyan);
  stroke-dasharray: 5 5;
  opacity: 0.72;
}

.slam-graph-edge.is-loop {
  stroke: var(--acid);
  stroke-width: 3;
}

.slam-graph-edge.is-drift {
  stroke: var(--coral);
  stroke-dasharray: 7 6;
}

.slam-graph-node {
  fill: #151c1f;
  stroke: #737d7a;
  stroke-width: 2;
}

.slam-graph-node.is-fixed {
  fill: rgba(97, 220, 232, 0.12);
  stroke: var(--cyan);
}

.slam-graph-node.is-current {
  fill: rgba(255, 114, 94, 0.14);
  stroke: var(--coral);
}

.slam-graph-node.is-map {
  fill: rgba(199, 166, 255, 0.12);
  stroke: var(--violet);
}

.slam-graph-node.is-loop {
  fill: rgba(217, 255, 111, 0.12);
  stroke: var(--acid);
}

.slam-factor-diamond {
  fill: #0d1214;
  stroke: var(--acid);
  stroke-width: 2;
}

.slam-graph-label {
  fill: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.slam-graph-caption {
  fill: #68716e;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-anchor: middle;
}

.slam-stage-copy {
  min-width: 0;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: #0b0f11;
}

.slam-stage-copy .mini-label {
  color: var(--acid);
}

.slam-stage-copy h3 {
  margin: 28px 0 18px;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.slam-stage-copy > p:not(.mini-label) {
  margin: 0;
  color: #858d8a;
  font-size: 12px;
  line-height: 1.7;
}

.slam-equation {
  margin: 28px 0;
  padding: 16px;
  border-left: 2px solid var(--cyan);
  background: rgba(97, 220, 232, 0.045);
  color: var(--cyan);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
}

.slam-state-grid {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.slam-state-grid > div {
  min-height: 70px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.slam-state-grid span {
  color: #5c6462;
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.slam-state-grid strong {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.slam-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.slam-controls button {
  min-height: 64px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #8b9390;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slam-controls button:last-child {
  border-right: 0;
}

.slam-controls button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.03);
  color: var(--paper);
}

.slam-controls button:disabled {
  color: #3d4442;
  cursor: not-allowed;
}

#slam-play {
  color: var(--acid);
}

.factor-bridge {
  margin-top: 110px;
  padding: 60px 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr);
  gap: 70px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.factor-bridge-copy h3 {
  margin: 24px 0;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.factor-bridge-copy > p:not(.eyebrow) {
  margin: 0;
  color: #858d8a;
  font-size: 12px;
  line-height: 1.75;
}

.factor-bridge-copy .factor-caveat {
  margin-top: 18px !important;
  padding-left: 16px;
  border-left: 1px solid var(--coral);
  color: #717976 !important;
  font-size: 10px !important;
}

.factor-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.factor-flow article {
  min-width: 0;
  min-height: 180px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: #0e1214;
}

.factor-flow article > span {
  color: #59615f;
  font-family: var(--mono);
  font-size: 7px;
}

.factor-flow strong {
  margin: 36px 0 auto;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
}

.factor-flow code {
  margin-top: 20px;
  color: var(--cyan);
  font-family: var(--serif);
  font-size: 13px;
  white-space: nowrap;
}

.factor-flow > i {
  color: var(--coral);
  font-style: normal;
}

.slam-deep-dive {
  margin-top: 70px;
  min-height: 130px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 1px solid rgba(217, 255, 111, 0.28);
  background: linear-gradient(110deg, rgba(217, 255, 111, 0.07), rgba(97, 220, 232, 0.025));
}

.slam-deep-dive > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slam-deep-dive > div span {
  color: #727a77;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slam-deep-dive > div strong {
  max-width: 660px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
}

.slam-deep-dive > a {
  flex: 0 0 auto;
  padding: 15px 18px;
  border: 1px solid var(--acid);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease;
}

.slam-deep-dive > a:hover,
.slam-deep-dive > a:focus-visible {
  background: var(--acid);
  color: var(--ink);
}

.sources {
  width: var(--content);
  margin: 0 auto;
  padding: 140px 0;
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 70px;
}

.sources h2 {
  margin-top: 24px;
  font-size: clamp(42px, 5vw, 72px);
}

.source-links {
  border-top: 1px solid var(--line);
}

.source-links a {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 90px;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
  transition: padding 180ms ease, color 180ms ease;
}

.source-links a:hover,
.source-links a:focus-visible {
  padding-left: 18px;
  color: var(--acid);
}

.source-links span {
  font-family: var(--serif);
  font-size: 20px;
}

.source-links i {
  color: #68706d;
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.source-links b {
  font-size: 18px;
  font-weight: 400;
}

.site-footer {
  min-height: 120px;
  padding: 30px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: #5f6764;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer p {
  max-width: 580px;
  margin: 0;
}

.site-footer cite {
  color: #929895;
  font-style: normal;
}

/* --------------------------------------------------------------------------
   Scientific notebook theme — shared with the VA / incidence-point chapter
   -------------------------------------------------------------------------- */

body {
  background-color: var(--page);
  background-image: linear-gradient(var(--grid, #e6ebef) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid, #e6ebef) 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.62;
}

body::selection {
  background: rgba(124, 77, 190, 0.2);
  color: var(--ink);
}

.skip-link {
  background: var(--acid);
  color: #fff;
}

.site-header {
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  background: rgba(255, 255, 255, 0.91);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(22, 34, 46, 0.02);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
}

.brand {
  color: var(--ink);
  font-size: 10px;
}

.desktop-nav {
  gap: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.desktop-nav a::after {
  background: var(--acid);
}

.header-link {
  color: var(--acid);
  font-size: 9px;
}

.hero {
  min-height: 760px;
  padding: calc(var(--header-h) + 84px) max(32px, calc((100vw - 1120px) / 2)) 90px;
}

.hero::after {
  height: 34%;
  background: linear-gradient(transparent, var(--page));
}

.hero-grid {
  background-image: linear-gradient(rgba(22, 34, 46, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 34, 46, 0.04) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to right, black, transparent 78%);
}

.hero-copy {
  width: min(650px, 62vw);
}

.hero h1 {
  margin: 20px 0 28px;
  font-family: var(--serif);
  font-size: clamp(58px, 7vw, 92px);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--coral);
}

.hero-deck,
.section-heading > div:last-child > p,
.camera-copy .lead,
.camera-facts p,
.camera-answer p,
.renderer-equations p:last-child,
.parameter-grid p,
.covariance-note,
.slam-boundary p,
.state-shift article p,
.slam-stage-copy > p:not(.mini-label),
.factor-bridge-copy > p:not(.eyebrow) {
  color: var(--muted);
}

.hero-deck {
  font-size: 18px;
  line-height: 1.65;
}

.button {
  min-height: 43px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-primary {
  border-color: var(--acid);
  background: var(--acid);
  color: #fff;
}

.button-primary:hover {
  border-color: #5d3691;
  background: #5d3691;
}

.button-ghost:hover {
  border-color: var(--ink);
}

.hero-annotation span,
.scroll-cue,
.answer-strip-note,
.step-count,
.mini-label,
.canvas-hint {
  color: var(--muted);
}

.scroll-cue i {
  background: var(--line);
}

.scroll-cue i::after {
  background: var(--acid);
}

.answer-strip {
  width: var(--content);
  min-height: 104px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

.answer-strip-note strong {
  color: var(--cyan);
}

.section {
  padding: 108px 0;
}

.section-heading {
  grid-template-columns: 0.48fr 1.52fr;
  gap: 42px;
  margin-bottom: 48px;
}

.section-heading h2,
.camera-copy h2,
.sources h2 {
  font-family: var(--serif);
  font-size: clamp(43px, 5vw, 64px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.section-heading h2 em,
.camera-copy h2 em {
  color: var(--cyan);
}

.section-heading > div:last-child > p {
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.65;
}

.eyebrow {
  color: var(--acid);
  font-size: 9px;
}

.index {
  border-color: var(--line-strong);
  color: var(--muted);
}

.pipeline-tabs,
.lab-shell,
.camera-demo-card,
.renderer-lab,
.state-shift article,
.slam-lab,
.factor-flow article {
  background: var(--surface);
  box-shadow: none;
}

.pipeline-tab,
.camera-buttons button,
.raster-step,
.slam-tab,
.slam-controls button {
  color: var(--muted);
}

.pipeline-tab:hover,
.pipeline-tab:focus-visible,
.pipeline-tab.is-active,
.camera-buttons button:hover,
.camera-buttons button:focus-visible,
.raster-step:hover strong,
.raster-step:focus-visible strong,
.raster-step.is-active strong,
.slam-tab.is-active,
.slam-controls button:hover:not(:disabled) {
  color: var(--ink);
}

.pipeline-tab.is-active,
.raster-step.is-active,
.slam-tab.is-active {
  background: rgba(124, 77, 190, 0.07);
}

.lab-status,
.lab-explanation #step-copy,
.change-pills span,
.camera-facts p,
.camera-answer p,
.renderer-equations p:last-child,
.parameter-grid p,
.covariance-note,
.slam-lab-topbar,
.slam-stage-copy > p:not(.mini-label),
.factor-bridge-copy > p:not(.eyebrow),
.source-links i,
.site-footer {
  color: var(--muted);
}

.status-dot,
.slam-lab-topbar i {
  background: var(--acid);
  box-shadow: none;
}

.step-detail,
.slam-equation {
  background: rgba(232, 114, 12, 0.06);
}

.step-detail code,
.camera-facts code,
.camera-answer strong,
.renderer-equations code,
.covariance-note strong,
.slam-boundary strong,
.state-shift article p code,
.slam-state-grid strong,
.factor-flow strong {
  color: var(--ink);
}

.icon-button,
.play-button {
  background: var(--surface);
  color: var(--ink);
}

.play-button {
  border-color: var(--acid);
  background: var(--acid);
  color: #fff;
}

.play-button:hover,
.play-button:focus-visible {
  border-color: #5d3691;
  background: #5d3691;
}

.loss-section,
.render-section {
  width: var(--content);
  padding-left: 0;
  padding-right: 0;
  background: transparent;
  color: var(--ink);
}

.loss-grid,
.loss-notes,
.renderer-lab,
.renderer-equations,
.parameter-grid {
  border-color: var(--line);
  background: var(--surface);
}

.loss-formula-card,
.loss-notes article,
.renderer-equations article,
.parameter-grid article {
  border-color: var(--line) !important;
}

.loss-meter-card {
  background: #f8fafb;
}

.loss-section .index,
.loss-grid,
.loss-notes {
  border-color: var(--line);
}

.loss-section .eyebrow,
.loss-section .section-heading h2 em,
.formula-l1 {
  color: var(--coral);
}

.formula-ssim {
  color: var(--cyan);
}

.lambda-control input::-webkit-slider-thumb,
.lambda-control input::-moz-range-thumb {
  border-color: var(--surface);
  background: var(--ink);
}

.camera-copy .lead {
  font-size: 21px;
}

.camera-demo-card {
  box-shadow: 0 12px 34px rgba(22, 34, 46, 0.07);
}

.fixed-badge {
  border-color: rgba(14, 143, 126, 0.35);
  color: var(--cyan) !important;
}

.camera-readout strong {
  color: var(--acid);
}

.render-section {
  background: transparent;
}

.renderer-lab,
.renderer-equations {
  background: var(--surface);
}

.raster-step.is-active {
  background: rgba(232, 114, 12, 0.06);
}

.raster-step strong,
.contrast-title strong {
  color: var(--muted);
}

.contrast-title.is-splat strong {
  color: var(--ink);
}

.parameter-grid article:hover {
  background: rgba(124, 77, 190, 0.04);
}

.recap-section {
  padding: 60px max(32px, calc((100vw - 1120px) / 2));
}

.recap-card {
  min-height: 530px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.recap-card::before {
  border-color: rgba(232, 114, 12, 0.18);
  box-shadow: 0 0 0 70px rgba(232, 114, 12, 0.035), 0 0 0 140px rgba(232, 114, 12, 0.02);
}

.recap-card .eyebrow,
.recap-loop span,
.recap-loop small {
  color: var(--muted);
}

.recap-card h2 {
  font-family: var(--serif);
  font-size: clamp(46px, 6vw, 72px);
}

.recap-card h2 em,
.recap-answer strong {
  color: var(--coral);
}

.recap-loop {
  border-color: var(--line);
}

.slam-heading h2 em {
  color: var(--acid);
}

.slam-boundary {
  margin-bottom: 54px;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--acid);
  background: var(--surface);
}

.slam-boundary > span {
  color: var(--acid);
}

.state-shift article.is-slam {
  border-color: rgba(124, 77, 190, 0.35);
  background: linear-gradient(145deg, rgba(124, 77, 190, 0.06), rgba(14, 143, 126, 0.025));
}

.state-shift article.is-slam > span,
.state-shift article.is-slam > code,
.slam-stage-copy .mini-label,
#slam-play {
  color: var(--acid);
}

.state-shift-arrow span {
  background: var(--page);
  color: var(--muted);
}

.slam-lab {
  box-shadow: 0 14px 38px rgba(22, 34, 46, 0.07);
}

.slam-visual-panel,
.slam-stage-copy,
#slam-graph {
  background: var(--surface);
}

.slam-graph-node {
  fill: #fff;
  stroke: #7c8995;
}

.slam-graph-node.is-fixed {
  fill: rgba(14, 143, 126, 0.08);
}

.slam-graph-node.is-current {
  fill: rgba(232, 114, 12, 0.09);
}

.slam-graph-node.is-map {
  fill: rgba(24, 116, 184, 0.08);
}

.slam-graph-node.is-loop {
  fill: rgba(124, 77, 190, 0.08);
}

.slam-factor-diamond {
  fill: #fff;
}

.slam-graph-label {
  fill: var(--ink);
}

.slam-graph-caption {
  fill: var(--muted);
}

.slam-equation {
  border-color: var(--cyan);
  color: #0a6b5e;
}

.factor-flow article {
  background: var(--surface);
}

.slam-deep-dive {
  border-color: rgba(124, 77, 190, 0.3);
  background: linear-gradient(110deg, rgba(124, 77, 190, 0.06), rgba(14, 143, 126, 0.025));
}

.slam-deep-dive > a {
  border-color: var(--acid);
  color: var(--acid);
}

.slam-deep-dive > a:hover,
.slam-deep-dive > a:focus-visible {
  background: var(--acid);
  color: #fff;
}

.sources {
  padding: 108px 0;
}

.source-links a:hover,
.source-links a:focus-visible {
  color: var(--acid);
}

.site-footer {
  padding-left: max(24px, calc((100vw - 1120px) / 2));
  padding-right: max(24px, calc((100vw - 1120px) / 2));
  background: rgba(255, 255, 255, 0.72);
}

.site-footer cite {
  color: var(--ink);
}

/* Radio optimization chapter */

.radio-section {
  padding-top: 116px;
}

.radio-heading h2 em {
  color: var(--coral);
}

.radio-handoff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  margin-bottom: 38px;
}

.radio-handoff > div {
  min-height: 142px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--surface);
}

.radio-handoff span,
.radio-next > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.radio-handoff strong {
  margin: 20px 0 auto;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
}

.radio-handoff code {
  margin-top: 10px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
}

.radio-handoff > div:last-child code {
  color: var(--coral);
}

.radio-handoff > i {
  color: var(--coral);
  font-family: var(--serif);
  font-size: 28px;
  font-style: normal;
}

.radio-assumption {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 30px;
  margin-bottom: 38px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--acid);
  background: var(--surface);
}

.radio-assumption > span {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.radio-assumption p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.radio-assumption strong {
  color: var(--ink);
}

.radio-loop {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 52px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.radio-loop > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 2px 8px;
}

.radio-loop span {
  grid-row: 1 / 3;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 8px;
}

.radio-loop strong {
  font-size: 12px;
}

.radio-loop small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.4;
  text-transform: uppercase;
}

.radio-loop > i {
  color: var(--coral);
  font-style: normal;
}

.radio-lab {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(22, 34, 46, 0.07);
}

.radio-lab-bar {
  min-height: 52px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.radio-lab-bar span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.radio-lab-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.radio-lab-bar strong {
  color: var(--ink);
}

.radio-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--line);
}

.radio-tab {
  min-width: 0;
  min-height: 82px;
  padding: 13px 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 3px 6px;
  align-content: center;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.radio-tab:last-child {
  border-right: 0;
}

.radio-tab:hover,
.radio-tab:focus-visible {
  background: rgba(124, 77, 190, 0.04);
  color: var(--ink);
}

.radio-tab.is-active {
  background: rgba(124, 77, 190, 0.07);
  color: var(--ink);
  box-shadow: inset 0 -2px var(--acid);
}

.radio-tab > span {
  grid-row: 1 / 3;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 8px;
}

.radio-tab strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-tab small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.radio-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.68fr);
  min-height: 620px;
}

.radio-figure {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-right: 1px solid var(--line);
}

.radio-figure figcaption {
  min-height: 50px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.radio-figure figcaption > span {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--coral);
}

.radio-figure figcaption b {
  margin-left: auto;
  color: var(--acid);
  font-weight: 600;
}

#radio-opt-svg {
  width: 100%;
  height: 520px;
  display: block;
  background-color: #fbfcfd;
  background-image: linear-gradient(#e9edf1 1px, transparent 1px),
    linear-gradient(90deg, #e9edf1 1px, transparent 1px);
  background-size: 26px 26px;
}

#radio-opt-svg text {
  font-family: var(--mono);
}

.radio-legend {
  min-height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  text-transform: uppercase;
}

.radio-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.radio-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.radio-legend .is-measurement {
  background: var(--coral);
}

.radio-legend .is-incidence {
  background: var(--cyan);
}

.radio-legend .is-ue {
  background: var(--ue);
}

.radio-legend .is-wall {
  border-radius: 0;
  background: var(--ink);
}

.radio-rail {
  min-width: 0;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--surface);
}

.radio-case-copy h3 {
  margin: 14px 0 14px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.radio-case-copy > p:not(.mini-label) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.68;
}

.radio-case-copy > code {
  display: block;
  margin-top: 18px;
  padding: 13px 14px;
  border-left: 2px solid var(--coral);
  background: rgba(232, 114, 12, 0.055);
  color: #b45607;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
}

.radio-control-group {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.radio-control-group label {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.radio-control-group output {
  flex: 0 0 auto;
  color: var(--acid);
}

.radio-control-group input {
  width: 100%;
  height: 3px;
  margin: 16px 0 9px;
  appearance: none;
  border-radius: 0;
  background: linear-gradient(90deg, var(--acid), var(--cyan));
  outline: none;
}

.radio-control-group input:disabled {
  background: var(--line);
  opacity: 0.7;
}

.radio-control-group input::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 1px var(--acid);
  cursor: grab;
}

.radio-control-group input::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 1px var(--acid);
  cursor: grab;
}

.radio-control-group p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.radio-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.radio-readout > div {
  min-height: 60px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.radio-readout span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.radio-readout strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.radio-readout strong.is-rejected {
  color: var(--error);
}

.radio-sweep {
  min-height: 44px;
  margin-top: auto;
  border: 1px solid var(--acid);
  background: var(--surface);
  color: var(--acid);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.radio-sweep:hover,
.radio-sweep:focus-visible,
.radio-sweep[aria-pressed="true"] {
  background: var(--acid);
  color: #fff;
}

.radio-caption {
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.radio-caption strong {
  color: var(--ink);
}

.radio-next {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 32px;
  margin-top: 54px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.radio-next > span {
  color: var(--coral);
}

.radio-next p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  :root {
    --content: calc(100vw - 48px);
  }

  .answer-strip {
    grid-template-columns: 0.8fr 1.7fr;
  }

  .answer-strip-note {
    grid-column: 1 / -1;
    min-height: 70px;
    border-left: 0 !important;
    border-top: 1px solid var(--line);
    justify-content: center;
    text-align: center;
  }

  .pipeline-tabs {
    grid-template-columns: repeat(4, 1fr);
  }

  .desktop-nav {
    gap: 18px;
  }

  .pipeline-tab:nth-child(4) {
    border-right: 0;
  }

  .pipeline-tab:nth-child(n + 5) {
    border-top: 1px solid var(--line);
  }

  .lab-main {
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  }

  .camera-layout {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 48px;
  }

  #camera-canvas {
    height: 460px;
  }

  .parameter-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .parameter-grid article:nth-child(4) {
    border-left: 0;
  }

  .parameter-grid article:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .recap-loop {
    grid-template-columns: 1fr auto 1fr;
    row-gap: 20px;
  }

  .recap-loop .loop-back {
    display: none;
  }

  .slam-stage {
    grid-template-columns: 1fr;
  }

  .slam-stage-copy {
    min-height: 420px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .factor-bridge {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

@media (max-width: 780px) {
  :root {
    --header-h: 64px;
    --content: calc(100vw - 32px);
  }

  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .desktop-nav {
    display: none;
  }

  .header-link {
    font-size: 9px;
  }

  .hero {
    min-height: 760px;
    align-items: flex-start;
    padding: 126px 20px 80px;
  }

  .hero-copy {
    width: 100%;
  }

  .hero h1 {
    margin-top: 22px;
    font-size: clamp(55px, 17vw, 88px);
    line-height: 0.82;
  }

  .hero-deck {
    width: 93%;
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-annotation,
  .scroll-cue {
    display: none;
  }

  .hero::after {
    height: 35%;
  }

  .answer-strip {
    grid-template-columns: 1fr;
  }

  .answer-strip > * {
    min-height: 80px;
    border-left: 0 !important;
  }

  .answer-strip > * + * {
    border-top: 1px solid var(--line);
  }

  .answer-strip-flow {
    padding-left: 14px;
    padding-right: 14px;
    gap: 7px;
    font-size: 8px;
    overflow: hidden;
  }

  .section {
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .section-heading,
  .section-heading.compact {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 44px;
  }

  .section-heading > div:first-child {
    padding-top: 0;
  }

  .section-heading h2,
  .camera-copy h2 {
    font-size: clamp(46px, 13vw, 68px);
  }

  .pipeline-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pipeline-tabs::-webkit-scrollbar {
    display: none;
  }

  .pipeline-tab {
    min-width: 126px;
    border-top: 0 !important;
    border-right: 1px solid var(--line) !important;
  }

  .lab-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .camera-picker {
    width: 100%;
    justify-content: space-between;
  }

  .camera-picker > span {
    display: none;
  }

  .camera-buttons {
    width: 100%;
  }

  .camera-buttons button {
    flex: 1;
  }

  .lab-main {
    grid-template-columns: 1fr;
  }

  .lab-visual {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #process-canvas {
    height: 720px;
    min-height: 720px;
  }

  .lab-explanation {
    min-height: 500px;
  }

  .iteration-footer {
    grid-template-columns: 1fr;
  }

  .iteration-footer > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .loss-section,
  .render-section {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .loss-formula-card {
    border-right: 0;
    border-bottom: 1px solid rgba(10, 12, 14, 0.18);
  }

  .loss-formula-card,
  .loss-meter-card {
    min-height: 460px;
    padding: 30px 22px;
  }

  .formula-labels {
    display: none;
  }

  .formula {
    flex-wrap: wrap;
    font-size: 30px;
    white-space: normal;
  }

  .loss-notes {
    grid-template-columns: 1fr;
  }

  .loss-notes article {
    min-height: auto;
  }

  .loss-notes article + article {
    border-left: 0;
    border-top: 1px solid rgba(10, 12, 14, 0.18);
  }

  .note-number {
    margin-bottom: 24px;
  }

  .camera-layout {
    grid-template-columns: 1fr;
  }

  .camera-copy > .eyebrow {
    margin-left: 10px;
  }

  .camera-demo-card {
    position: static;
  }

  #camera-canvas {
    height: 430px;
  }

  .camera-readout {
    grid-template-columns: 1fr;
  }

  .camera-readout > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .camera-answer {
    margin-top: 60px;
    padding-left: 0;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .renderer-lab {
    grid-template-columns: 1fr;
  }

  #raster-canvas {
    height: 540px;
  }

  .renderer-controls {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .raster-step:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .raster-step:nth-child(3) {
    border-bottom: 0;
  }

  .renderer-equations {
    grid-template-columns: 1fr;
  }

  .renderer-equations article {
    padding: 30px 24px;
  }

  .renderer-equations article + article {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .ray-contrast {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contrast-title:last-child {
    text-align: left;
  }

  .contrast-mark {
    font-size: 30px;
  }

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

  .parameter-grid article {
    min-height: 200px;
  }

  .parameter-grid article + article,
  .parameter-grid article:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .covariance-note {
    width: 100%;
  }

  .slam-boundary {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .state-shift {
    grid-template-columns: 1fr;
  }

  .state-shift-arrow {
    min-height: 74px;
  }

  .state-shift-arrow i,
  .state-shift-arrow span {
    display: none;
  }

  .state-shift-arrow b {
    position: static;
    transform: rotate(90deg);
  }

  .slam-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .slam-tabs::-webkit-scrollbar {
    display: none;
  }

  .slam-tab {
    min-width: 150px;
  }

  .slam-visual-grid {
    grid-template-columns: 1fr;
  }

  .slam-visual-panel + .slam-visual-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  #slam-canvas,
  #slam-graph {
    height: 360px;
  }

  .slam-controls {
    grid-template-columns: 1fr;
  }

  .slam-controls button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .slam-controls button:last-child {
    border-bottom: 0;
  }

  .factor-flow {
    grid-template-columns: 1fr;
  }

  .factor-flow article {
    min-height: 150px;
  }

  .factor-flow > i {
    justify-self: center;
    transform: rotate(90deg);
  }

  .slam-deep-dive {
    align-items: flex-start;
    flex-direction: column;
  }

  .radio-handoff,
  .radio-assumption,
  .radio-next {
    grid-template-columns: 1fr;
  }

  .radio-handoff > i {
    justify-self: center;
    transform: rotate(90deg);
  }

  .radio-loop {
    grid-template-columns: 1fr;
  }

  .radio-loop > i {
    justify-self: center;
    transform: rotate(90deg);
  }

  .radio-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .radio-tabs::-webkit-scrollbar {
    display: none;
  }

  .radio-tab {
    min-width: 132px;
  }

  .radio-workbench {
    grid-template-columns: 1fr;
  }

  .radio-figure {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #radio-opt-svg {
    height: 460px;
  }

  .recap-section {
    padding: 40px 16px;
  }

  .recap-card {
    padding: 38px 24px;
  }

  .recap-card h2 {
    font-size: clamp(47px, 13vw, 68px);
  }

  .recap-loop {
    grid-template-columns: 1fr;
  }

  .recap-loop > i {
    transform: rotate(90deg);
  }

  .recap-answer {
    flex-direction: column;
    gap: 18px;
  }

  .sources {
    grid-template-columns: 1fr;
    gap: 50px;
    padding: 100px 0;
  }

  .source-links a {
    grid-template-columns: 1fr auto;
  }

  .source-links i {
    display: none;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
