:root {
  color-scheme: light;
  --ink: #17212a;
  --ink-2: #26333d;
  --muted: #5d6c6c;
  --paper: #f3f0e7;
  --paper-2: #e9e4d8;
  --surface: #fffdf7;
  --deep: #101522;
  --deep-2: #16202e;
  --deep-3: #1b2935;
  --line: #d7d1c4;
  --line-dark: rgba(199, 243, 107, 0.16);
  --lime: #c7f36b;
  --lime-dark: #4f7815;
  --cyan: #65d7e3;
  --purple: #9c8cff;
  --coral: #ff7868;
  --amber: #f4b968;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;
  --serif: Georgia, "Times New Roman", serif;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 8px 12px;
  border-radius: 7px;
  background: #fff;
  color: #111;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid rgba(198, 221, 216, 0.12);
  background: rgba(16, 21, 34, 0.86);
  color: #edf5f3;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  width: min(var(--max), calc(100% - 40px));
  min-height: 66px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 780;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--deep);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-left: auto;
}

.site-header nav a {
  color: #b8c8c7;
  font-family: var(--mono);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  transition: color 150ms ease;
  white-space: nowrap;
}

.site-header nav a span {
  margin-right: 3px;
  color: var(--lime);
}

.site-header nav a:hover {
  color: #fff;
}

.hero {
  min-height: 100vh;
  padding: 128px 0 70px;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 24%, rgba(101, 215, 227, 0.14), transparent 27%),
    radial-gradient(circle at 19% 78%, rgba(156, 140, 255, 0.15), transparent 30%),
    linear-gradient(145deg, #0d1320, #111a26 58%, #101522);
  color: #edf6f3;
}

.hero-inner {
  width: min(var(--max), calc(100% - 40px));
  min-height: calc(100vh - 198px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(500px, 1.16fr);
  align-items: center;
  gap: clamp(42px, 6vw, 88px);
}

.eyebrow,
.section-index,
.card-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow {
  color: #9cafac;
}

.eyebrow span {
  padding-inline: 6px;
  color: var(--lime);
}

.hero h1 {
  max-width: 700px;
  margin: 22px 0 26px;
  font-family: var(--serif);
  font-size: clamp(3.8rem, 7.2vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.hero h1 em,
.section-heading h2 em {
  color: var(--lime);
  font-weight: 400;
}

.hero-lede {
  max-width: 610px;
  margin: 0;
  color: #bed0cd;
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.72;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.77rem;
  font-weight: 700;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--deep);
}

.button.primary:hover {
  background: #d5ff7d;
}

.button.secondary:hover {
  border-color: var(--cyan);
  background: rgba(101, 215, 227, 0.08);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 45px 0 0;
  border-top: 1px solid rgba(198, 221, 216, 0.14);
  border-left: 1px solid rgba(198, 221, 216, 0.14);
}

.hero-facts div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid rgba(198, 221, 216, 0.14);
  border-bottom: 1px solid rgba(198, 221, 216, 0.14);
}

.hero-facts dt {
  color: #809994;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-facts dd {
  margin: 5px 0 0;
  color: #e3efec;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.45;
}

.hero-figure {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(154, 202, 193, 0.16);
  border-radius: 22px;
  background: rgba(15, 29, 39, 0.66);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.31);
}

.hero-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.hero-panel {
  fill: #101b28;
  stroke: rgba(134, 189, 181, 0.16);
}

.hero-grid-lines path {
  fill: none;
  stroke: #93b4ae;
  stroke-opacity: 0.055;
  stroke-width: 1;
}

.machine-card rect,
.loss-card rect {
  fill: #172735;
  stroke: rgba(166, 210, 201, 0.22);
}

.machine-card.renderer rect {
  fill: #1b2d38;
  stroke: rgba(199, 243, 107, 0.45);
}

.machine-index {
  fill: #92aaa6;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

.machine-symbol {
  fill: var(--lime);
  font-family: var(--serif);
  font-size: 45px;
}

.machine-detail {
  fill: #bfd0cd;
  font-family: var(--mono);
  font-size: 10px;
}

.renderer circle {
  fill: var(--coral);
}

.mini-ray {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 3;
  filter: url(#heroGlow);
}

.mini-surface {
  stroke: var(--purple);
  stroke-width: 5;
}

.machine-formula,
.loss-formula {
  fill: #e6f0ed;
  font-family: var(--serif);
  font-size: 22px;
}

.output-axis {
  fill: none;
  stroke: #718b87;
  stroke-width: 1;
}

.output-curve {
  fill: none;
  stroke: var(--lime);
  stroke-width: 3;
}

.flow,
.top-flow,
.loss-link {
  fill: none;
  stroke-linecap: round;
  stroke-width: 2.5;
}

.forward-flow,
.top-flow {
  stroke: url(#forwardGradient);
}

.top-flow {
  stroke-dasharray: 4 9;
  stroke-opacity: 0.7;
}

.backward-flow,
.loss-link {
  stroke: url(#backwardGradient);
  stroke-dasharray: 6 8;
}

.flow-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.5px;
}

.forward-label {
  fill: var(--lime);
}

.backward-label {
  fill: var(--purple);
}

.hero-figure figcaption {
  padding: 3px 10px 6px;
  color: #9fb5b1;
  font-size: 0.75rem;
  line-height: 1.55;
}

.section {
  padding: clamp(88px, 10vw, 138px) 0;
}

.forward-section,
.visibility-section {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.section-heading {
  display: grid;
  grid-template-columns: 190px minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: end;
  gap: 30px;
  margin-bottom: 62px;
}

.section-index,
.card-kicker {
  color: var(--lime-dark);
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 5.3vw, 5.6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.forward-section .section-heading h2 em,
.visibility-section .section-heading h2 em {
  color: #6354d7;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.75;
}

.section-heading.light .section-index,
.lab-section .card-kicker,
.optimize-section .card-kicker {
  color: var(--lime);
}

.section-heading.light h2,
.section-heading.light > p:last-child {
  color: #edf6f3;
}

.section-heading.light > p:last-child {
  color: #b5c8c4;
}

.definition-grid {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 20px;
}

.definition-card,
.parameter-grid article,
.derivation-grid article,
.visibility-explanation article,
.reality-intro,
.source-list a {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.definition-card {
  padding: clamp(28px, 4vw, 45px);
}

.definition-card.diff-card {
  border-color: #c4bdf0;
  background:
    radial-gradient(circle at 90% 10%, rgba(156, 140, 255, 0.1), transparent 32%),
    var(--surface);
}

.definition-card h3,
.parameter-grid h3,
.derivation-grid h3,
.visibility-explanation h3,
.application-grid h3,
.mode-card h3,
.reality-intro h3,
.sources-heading h3 {
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.28;
}

.definition-card h3 {
  max-width: 620px;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  font-weight: 400;
}

.definition-card > p:last-child {
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

code,
.formula-block {
  font-family: var(--mono);
}

.equation {
  margin-top: 28px;
}

.equation.compact {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 1.8rem;
}

.equation.compact code,
.equation.stack code {
  padding: 8px 12px;
  border-radius: 7px;
  background: var(--deep);
  color: var(--lime);
  font-size: 0.84rem;
}

.equation.stack {
  display: grid;
  gap: 13px;
}

.equation.stack > div {
  display: grid;
  grid-template-columns: 60px 24px minmax(0, max-content);
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.flow-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
  margin-top: 22px;
}

.flow-strip > div {
  position: relative;
  min-width: 0;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ebe7dc;
}

.flow-strip > div > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.67rem;
}

.flow-strip strong,
.flow-strip small {
  display: block;
}

.flow-strip strong {
  font-size: 0.87rem;
}

.flow-strip small {
  margin-top: 5px;
  color: #556361;
  font-family: var(--mono);
  font-size: 0.57rem;
}

.flow-strip > i {
  align-self: center;
  color: #7465dc;
  font-style: normal;
  font-weight: 800;
}

.parameter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-top: 54px;
}

.parameter-grid article {
  min-height: 210px;
  padding: 28px;
}

.parameter-grid span,
.visibility-explanation article > span,
.application-grid article > span {
  display: block;
  margin-bottom: 28px;
  color: #6354d7;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.parameter-grid p,
.visibility-explanation p,
.application-grid p,
.reality-intro > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.scope-note,
.warning-note {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid #cdc5e7;
  border-radius: 10px;
  background: #ebe6f4;
}

.scope-note strong,
.warning-note strong {
  color: #4d40a5;
  font-size: 0.82rem;
}

.scope-note p,
.warning-note p {
  margin: 0;
  color: #5d6570;
  font-size: 0.82rem;
}

.renderer-family-demo,
.sionna-sampling {
  margin-top: clamp(76px, 10vw, 118px);
  padding-top: clamp(64px, 8vw, 92px);
  border-top: 1px solid #cdc6b8;
}

.family-intro,
.sionna-heading {
  display: grid;
  grid-template-columns: 190px minmax(0, 1.15fr) minmax(290px, 0.85fr);
  align-items: end;
  gap: 30px;
  margin-bottom: 42px;
}

.family-intro h2,
.sionna-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.65rem, 4.7vw, 4.85rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.family-intro h2 em,
.sionna-heading h2 em {
  color: #6354d7;
  font-weight: 400;
}

.family-intro > p:last-child,
.sionna-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.72;
}

.family-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.family-picker legend {
  width: 100%;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.family-picker label {
  position: relative;
  cursor: pointer;
}

.family-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.family-picker span {
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 9px 12px;
  border: 1px solid #c9c2b5;
  border-radius: 9px;
  background: #eae5d9;
  color: #52605f;
  font-size: 0.75rem;
  font-weight: 760;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.family-picker input:checked + span {
  border-color: #6354d7;
  background: #6354d7;
  color: #fff;
}

.family-picker input:focus-visible + span {
  outline: 3px solid var(--lime-dark);
  outline-offset: 3px;
}

.family-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.33fr) minmax(330px, 0.67fr);
  overflow: hidden;
  border: 1px solid rgba(169, 204, 197, 0.2);
  border-radius: 17px;
  background: #111b28;
  box-shadow: 0 30px 70px rgba(29, 37, 44, 0.16);
}

.family-stage,
.sionna-figure {
  min-width: 0;
  margin: 0;
}

.family-stage {
  padding: 16px;
  border-right: 1px solid rgba(169, 204, 197, 0.15);
}

.family-stage svg,
.sionna-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.family-stage figcaption,
.sionna-figure figcaption {
  padding: 9px 6px 1px;
  color: #9eb4b0;
  font-size: 0.7rem;
  line-height: 1.55;
}

.family-inspector {
  min-width: 0;
  padding: clamp(26px, 3.5vw, 40px);
  color: #eaf3f1;
}

.family-mode-copy h3 {
  margin: 5px 0 12px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.family-mode-copy > p:last-child {
  margin: 0;
  color: #abc0bc;
  font-size: 0.8rem;
}

.family-control {
  margin-top: 25px;
}

.family-control-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  color: #b8cbc7;
  font-size: 0.73rem;
}

.family-control-label em {
  color: var(--lime);
  font-style: normal;
}

.family-control-label output {
  flex: 0 0 auto;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.family-control input[type="range"],
.sionna-controls input[type="range"] {
  accent-color: var(--lime);
}

.family-sensitivity-button {
  width: 100%;
  min-height: 45px;
  margin-top: 17px;
  padding: 9px 14px;
  border: 1px solid rgba(156, 140, 255, 0.42);
  border-radius: 8px;
  background: rgba(156, 140, 255, 0.08);
  color: #d8d0ff;
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 750;
}

.family-sensitivity-button[aria-pressed="true"] {
  background: #7665e7;
  color: #fff;
}

.family-perturbation-note {
  margin: 8px 2px 0;
  color: #879f9a;
  font-size: 0.62rem;
  line-height: 1.48;
}

.family-pipeline {
  display: grid;
  gap: 6px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.family-pipeline li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(169, 204, 197, 0.11);
  border-radius: 7px;
  color: #718783;
  opacity: 0.55;
}

.family-pipeline li.is-revealed {
  color: #c9d9d6;
  opacity: 1;
}

.family-pipeline li.is-current {
  border-color: rgba(199, 243, 107, 0.42);
  background: rgba(199, 243, 107, 0.06);
  color: #f0f7f5;
}

.family-pipeline span {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.57rem;
}

.family-pipeline strong {
  font-size: 0.69rem;
  font-weight: 680;
}

.family-formula {
  margin-top: 18px;
  padding: 11px 12px;
  overflow-x: auto;
  border: 1px solid rgba(199, 243, 107, 0.15);
  border-radius: 7px;
  background: #0d1621;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.61rem;
  line-height: 1.55;
}

.family-facts {
  display: grid;
  gap: 10px;
  margin: 17px 0 0;
}

.family-facts div {
  padding-top: 9px;
  border-top: 1px solid rgba(169, 204, 197, 0.11);
}

.family-facts dt {
  color: #7f9994;
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.family-facts dd {
  margin: 2px 0 0;
  color: #c6d6d3;
  font-size: 0.68rem;
  line-height: 1.5;
}

.family-overlap-note,
.sionna-reference-note {
  margin: 14px 0 0;
  padding: 16px 19px;
  border: 1px solid #d1c9b9;
  border-radius: 9px;
  background: #eae5d9;
  color: #5b6967;
  font-size: 0.78rem;
}

.family-overlap-note strong {
  color: #4d40a5;
}

.family-bg,
.sionna-bg {
  fill: #0d1723;
}

.family-eyebrow,
.family-small-label,
.family-direct-label,
.sionna-figure-label {
  font-family: var(--mono);
}

.family-eyebrow {
  fill: #79918c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

.family-small-label,
.family-direct-label {
  fill: #a8bdb8;
  font-size: 9px;
}

.family-camera rect,
.family-camera path {
  fill: #65d7e3;
  stroke: #dff8f7;
  stroke-width: 1.4;
}

.family-camera text,
.family-light text {
  fill: #a8bdb8;
  font-family: var(--mono);
  font-size: 10px;
}

.family-image-plane {
  stroke: #65d7e3;
  stroke-dasharray: 5 6;
  stroke-width: 2;
}

.family-floor {
  stroke: #66827b;
  stroke-width: 3;
}

.family-box {
  fill: #2d4854;
  stroke: #7799a1;
  stroke-width: 1.5;
}

.family-box-side {
  fill: #3c5d67;
  stroke: #7799a1;
  stroke-width: 1.5;
}

.family-light circle {
  fill: #f4b968;
}

.family-light path {
  fill: none;
  stroke: #f4b968;
  stroke-width: 2;
}

.family-object-guide {
  fill: rgba(255, 120, 104, 0.05);
  stroke: rgba(255, 120, 104, 0.35);
  stroke-dasharray: 4 6;
}

.family-output-frame {
  fill: none;
  stroke: #77918b;
  stroke-width: 1.5;
}

.family-mode-layer {
  display: none;
}

.family-mode-layer.is-active {
  display: block;
}

.family-stage-step {
  opacity: 0.1;
  transition: opacity 180ms ease;
}

.family-stage-step.is-revealed {
  opacity: 1;
}

.family-raster-object > path:first-child,
.family-raster-output > path:first-child {
  fill: #df6f5f;
  stroke: #ff9c8e;
  stroke-width: 1.2;
}

.family-mesh-line {
  fill: none;
  stroke: #ffd1c9;
  stroke-width: 1.15;
}

.family-project-line {
  fill: none;
  stroke: #ff7868;
  stroke-dasharray: 4 6;
  stroke-width: 1.4;
}

.family-project-line.splat {
  stroke: #9c8cff;
}

.family-fragments rect {
  fill: #20333f;
  stroke: #77918b;
}

.family-fragments .winner {
  fill: #ff7868;
  stroke: #ffd1c9;
}

.family-density {
  fill: url(#familyDensity);
}

.family-density-core {
  fill: rgba(255, 120, 104, 0.58);
}

.family-volume-rays path {
  fill: none;
  stroke: #65d7e3;
  stroke-opacity: 0.48;
  stroke-width: 1.3;
}

.family-samples circle {
  fill: #c7f6f8;
  stroke: #0d1723;
  stroke-width: 1;
}

.family-weight-strip rect {
  fill: #65d7e3;
}

.family-weight-strip text {
  fill: #8ba5a0;
  font-family: var(--mono);
  font-size: 8px;
}

.family-world-splats ellipse,
.family-output-splats ellipse {
  fill: url(#familyGaussian);
  stroke: #c9c0ff;
  stroke-opacity: 0.55;
  stroke-width: 1;
}

.family-world-splats circle {
  fill: #fff;
}

.family-order-chips circle {
  fill: #7665e7;
  stroke: #d8d0ff;
}

.family-order-chips text {
  fill: #fff;
  font-family: var(--mono);
  font-size: 8px;
  text-anchor: middle;
}

.family-primary-rays line,
.family-secondary-rays line,
.family-secondary-rays path {
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.7;
}

.family-secondary-rays line,
.family-secondary-rays path {
  stroke-dasharray: 5 5;
  stroke-opacity: 0.8;
}

.family-hit-points circle {
  fill: #0d1723;
  stroke: var(--lime);
  stroke-width: 2.5;
}

.family-ray-output circle {
  fill: #e87c61;
  stroke: #ffd0c2;
  stroke-width: 1.2;
}

.family-sample-pixels rect {
  fill: #c7f36b;
  opacity: 0.55;
}

.family-sensitivity {
  display: none;
}

.family-sensitivity.is-visible {
  display: block;
}

.family-sensitivity circle,
.family-sensitivity path {
  fill: none;
  stroke: #9c8cff;
  stroke-dasharray: 5 6;
  stroke-width: 2;
}

.family-sensitivity text {
  fill: #cfc7ff;
  font-family: var(--mono);
  font-size: 9px;
}

.sionna-sampling {
  margin-bottom: 8px;
}

.sionna-lab {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  overflow: hidden;
  border: 1px solid rgba(169, 204, 197, 0.2);
  border-radius: 16px;
  background: #111b28;
  box-shadow: 0 28px 68px rgba(29, 37, 44, 0.15);
}

.sionna-figure {
  padding: 16px;
  border-right: 1px solid rgba(169, 204, 197, 0.15);
}

.sionna-controls {
  min-width: 0;
  padding: clamp(26px, 3.5vw, 42px);
  color: #eaf3f1;
}

.sionna-controls .family-control {
  margin-top: 0;
}

.sionna-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 24px;
}

.sionna-metric-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(169, 204, 197, 0.12);
  border-radius: 8px;
  background: #0d1621;
}

.sionna-metric-grid small,
.sionna-metric-grid strong {
  display: block;
}

.sionna-metric-grid small {
  color: #78918c;
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sionna-metric-grid strong {
  margin-top: 5px;
  color: #d8e7e4;
  font-size: 0.7rem;
  line-height: 1.4;
}

.sionna-scope {
  margin: 18px 0 0;
  padding: 13px 14px;
  border-left: 3px solid var(--lime);
  background: rgba(199, 243, 107, 0.05);
  color: #aec1bd;
  font-size: 0.73rem;
}

.sionna-wall,
.sionna-inner-wall {
  fill: none;
  stroke: #67847d;
  stroke-width: 5;
  stroke-linecap: round;
}

.sionna-sampled-ray {
  stroke: #65d7e3;
  stroke-opacity: 0.18;
  stroke-width: 1;
}

.sionna-candidate {
  fill: none;
  stroke: var(--lime);
  stroke-width: 3;
}

.sionna-provisional {
  fill: none;
  stroke: #ffb66e;
  stroke-width: 2;
  stroke-dasharray: 7 6;
  opacity: 0.88;
}

.sionna-candidate-hit {
  fill: #0d1723;
  stroke: var(--lime);
  stroke-width: 3;
}

.sionna-provisional-hit {
  fill: #0d1723;
  stroke: #ffb66e;
  stroke-width: 2;
}

.sionna-path-label {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
}

.sionna-path-label.provisional {
  fill: #ffc98e;
}

.sionna-path-label.refined {
  fill: var(--lime);
}

.sionna-source circle,
.sionna-target circle {
  fill: #152b38;
  stroke-width: 2.5;
}

.sionna-source circle {
  stroke: #ff7868;
}

.sionna-target circle {
  stroke: #65d7e3;
}

.sionna-source path,
.sionna-target path {
  stroke: #edf6f3;
  stroke-width: 1.6;
}

.sionna-source text,
.sionna-target text {
  fill: #a9bfba;
  font-family: var(--mono);
  font-size: 10px;
}

.sionna-callout rect {
  fill: #172737;
  stroke: rgba(199, 243, 107, 0.3);
}

.sionna-callout text {
  fill: #bacdc9;
  font-family: var(--mono);
  font-size: 9px;
}

.sionna-figure-label {
  fill: #829b96;
  font-size: 8px;
}

.sionna-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.sionna-pipeline li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 18px 15px;
  border: 1px solid #d1c9b9;
  border-radius: 9px;
  background: #eae5d9;
}

.sionna-pipeline li > span {
  color: #6354d7;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
}

.sionna-pipeline strong {
  display: block;
  font-size: 0.76rem;
  line-height: 1.35;
}

.sionna-pipeline p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.55;
}

.sionna-sampling-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 15px 0 0;
}

.sionna-sampling-map div {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid #cec6b8;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.28);
}

.sionna-sampling-map dt {
  color: #6354d7;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sionna-sampling-map dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.sionna-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.sionna-detail-grid article {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.sionna-detail-grid h3 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.18;
}

.sionna-detail-grid article > p:last-child {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.sionna-reference-note a {
  color: #4d40a5;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sionna-angle-note {
  display: grid;
  grid-template-columns: minmax(210px, 0.4fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid #c7bfee;
  border-radius: 9px;
  background: #e9e4f6;
}

.sionna-angle-note strong {
  color: #4d40a5;
  font-size: 0.8rem;
}

.sionna-angle-note p {
  margin: 0;
  color: #59656b;
  font-size: 0.78rem;
}

.lab-section,
.optimize-section {
  padding-inline: max(20px, calc((100vw - var(--max)) / 2));
  background:
    radial-gradient(circle at 84% 16%, rgba(101, 215, 227, 0.09), transparent 24%),
    radial-gradient(circle at 9% 82%, rgba(156, 140, 255, 0.1), transparent 25%),
    var(--deep);
  color: #edf6f3;
}

.lab-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  overflow: hidden;
  border: 1px solid rgba(170, 208, 201, 0.17);
  border-radius: 17px;
  background: #121c29;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.25);
}

.reflection-mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.reflection-mode-picker legend {
  width: 100%;
  margin-bottom: 9px;
  color: #8fa9a4;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reflection-mode-picker label {
  position: relative;
  cursor: pointer;
}

.reflection-mode-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.reflection-mode-picker span {
  display: grid;
  min-height: 50px;
  place-items: center;
  padding: 9px 14px;
  border: 1px solid rgba(169, 204, 197, 0.2);
  border-radius: 9px;
  background: #172432;
  color: #9eb5b0;
  font-size: 0.75rem;
  font-weight: 730;
}

.reflection-mode-picker input:checked + span {
  border-color: var(--lime);
  background: rgba(199, 243, 107, 0.1);
  color: #edf6f3;
}

.reflection-mode-picker input:focus-visible + span {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.reflection-mode-help {
  margin: 10px 0 18px;
  color: #9fb5b1;
  font-size: 0.76rem;
}

.is-hidden {
  display: none !important;
}

.scene-panel {
  min-width: 0;
  padding: 17px;
  border-right: 1px solid rgba(170, 208, 201, 0.14);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-topline {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 0 2px 12px;
  color: #8eaaa5;
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scene-panel svg,
.visibility-scene-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.scene-bg {
  fill: #0d1824;
  stroke: rgba(166, 210, 201, 0.12);
}

.target-surface {
  stroke: #9c8cff;
  stroke-dasharray: 7 8;
  stroke-width: 2;
}

.target-label,
.surface-label,
.gradient-label,
.edge-label,
.ray-status {
  font-family: var(--mono);
  font-size: 10px;
}

.target-label {
  fill: #a99cf4;
}

.current-surface {
  stroke: #dbe9e5;
  stroke-width: 5;
}

.surface-label {
  fill: #dce9e6;
}

.reflected-path {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.reflected-path.glow {
  stroke-width: 11;
  stroke-opacity: 0.09;
}

.normal-line {
  stroke: #78918d;
  stroke-dasharray: 3 6;
}

.gradient-arrow {
  fill: none;
  stroke: var(--lime);
  stroke-width: 2;
}

.gradient-label {
  fill: var(--lime);
}

.endpoint circle,
.visibility-endpoint circle {
  stroke-width: 2;
}

.endpoint.emitter circle,
.visibility-endpoint.source circle {
  fill: rgba(255, 120, 104, 0.18);
  stroke: var(--coral);
}

.endpoint.receiver circle,
.visibility-endpoint.sensor circle {
  fill: rgba(199, 243, 107, 0.14);
  stroke: var(--lime);
}

.endpoint path,
.visibility-endpoint path {
  fill: none;
  stroke: #eef6f4;
  stroke-width: 2;
}

.endpoint text,
.visibility-endpoint text,
.bounce text {
  fill: #aec1bd;
  font-family: var(--mono);
  font-size: 10px;
}

.bounce-halo {
  fill: rgba(101, 215, 227, 0.11);
  stroke: rgba(101, 215, 227, 0.4);
}

.bounce-core {
  fill: var(--cyan);
}

.lab-controls {
  min-width: 0;
  padding: clamp(26px, 4vw, 42px);
  background: #172432;
}

.control-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.control-heading > p:last-child {
  margin: 13px 0 0;
  color: #9fb4b0;
  font-size: 0.74rem;
  line-height: 1.58;
}

.range-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  color: #b8cbc7;
  font-size: 0.77rem;
}

.range-label em {
  color: var(--lime);
  font-style: normal;
}

.range-label output {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 6px 0 0;
  accent-color: var(--lime);
  cursor: pointer;
}

.lab-buttons {
  display: grid;
  grid-template-columns: 1.25fr 1fr auto;
  gap: 8px;
  margin-top: 18px;
}

.lab-button {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(184, 211, 205, 0.23);
  border-radius: 7px;
  background: transparent;
  color: #e8f1ef;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.lab-button:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
}

.lab-button.primary {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--deep);
}

.lab-button.quiet {
  color: #9eb2ae;
}

.lab-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.truth-button {
  width: 100%;
  min-height: 43px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px dashed rgba(156, 140, 255, 0.55);
  border-radius: 7px;
  background: rgba(156, 140, 255, 0.06);
  color: #cec5ff;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
}

.truth-button[aria-pressed="true"] {
  border-style: solid;
  background: #7665e7;
  color: #fff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 24px 0 0;
  border-top: 1px solid rgba(178, 212, 205, 0.13);
  border-left: 1px solid rgba(178, 212, 205, 0.13);
}

.metric-grid div {
  min-width: 0;
  padding: 11px;
  border-right: 1px solid rgba(178, 212, 205, 0.13);
  border-bottom: 1px solid rgba(178, 212, 205, 0.13);
}

.metric-grid dt {
  min-height: 28px;
  color: #8fa7a2;
  font-family: var(--mono);
  font-size: 0.54rem;
  line-height: 1.35;
  text-transform: uppercase;
}

.metric-grid dd {
  margin: 4px 0 0;
  color: #edf6f3;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.loss-figure,
.step-figure {
  margin: 24px 0 0;
}

.loss-figure svg,
.step-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-grid,
.step-axes {
  fill: none;
  stroke: #66807b;
  stroke-opacity: 0.35;
  stroke-width: 1;
}

.loss-path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2.5;
}

.target-marker {
  stroke: var(--purple);
  stroke-dasharray: 4 5;
}

.current-marker {
  fill: var(--lime);
  stroke: var(--deep);
  stroke-width: 2;
}

.chart-label,
.step-label {
  fill: #819a95;
  font-family: var(--mono);
  font-size: 9px;
}

.loss-figure figcaption,
.step-figure figcaption {
  margin-top: 7px;
  color: #9bb0ac;
  font-size: 0.67rem;
  line-height: 1.5;
}

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

.derivation-grid article {
  min-width: 0;
  padding: 30px;
  border-color: rgba(169, 204, 197, 0.14);
  background: #172432;
}

.derivation-grid h3 {
  color: #edf6f3;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 400;
}

.derivation-grid p:last-child {
  margin: 14px 0 0;
  color: #a9bfba;
  font-size: 0.8rem;
}

.formula-block {
  margin-top: 16px;
  padding: 11px 13px;
  overflow-x: auto;
  border: 1px solid rgba(199, 243, 107, 0.16);
  border-radius: 7px;
  background: #101b27;
  color: var(--lime);
  font-size: 0.73rem;
  white-space: nowrap;
}

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

.known-derived-grid article {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(169, 204, 197, 0.14);
  border-radius: 11px;
  background: #172432;
}

.known-derived-grid span {
  display: block;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.known-derived-grid h3 {
  margin: 18px 0 0;
  color: #edf6f3;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
}

.known-derived-grid p {
  margin: 12px 0 0;
  color: #a7bdb8;
  font-size: 0.73rem;
}

.inverse-identifiability {
  display: grid;
  grid-template-columns: minmax(210px, 0.4fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 12px;
  padding: 18px 20px;
  border: 1px solid rgba(156, 140, 255, 0.28);
  border-radius: 9px;
  background: rgba(156, 140, 255, 0.07);
}

.inverse-identifiability strong {
  color: #cfc7ff;
  font-size: 0.8rem;
}

.inverse-identifiability p {
  margin: 0;
  color: #a9bfba;
  font-size: 0.76rem;
}

.visibility-lab {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.visibility-scene-wrap {
  min-width: 0;
  padding: 17px;
  background: #e8e4da;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-topline.dark {
  color: #556361;
}

.visibility-bg {
  fill: #1a2530;
}

.visibility-ray {
  stroke: var(--lime);
  stroke-linecap: round;
  stroke-width: 4;
  transition: stroke 130ms ease;
}

.visibility-ray.blocked {
  stroke: var(--coral);
}

.blocked-tail {
  stroke: #ff7868;
  stroke-dasharray: 6 8;
  stroke-opacity: 0;
  stroke-width: 2;
}

.blocked-tail.active {
  stroke-opacity: 0.35;
}

.occluder {
  fill: #4b5661;
  stroke: #74828d;
}

.edge-handle {
  fill: var(--purple);
  stroke: #fff;
  stroke-width: 2;
}

.edge-label {
  fill: #c4d2cf;
}

.blocked-symbol {
  opacity: 0;
}

.blocked-symbol.active {
  opacity: 1;
}

.blocked-symbol circle {
  fill: #1a2530;
  stroke: var(--coral);
  stroke-width: 2;
}

.blocked-symbol path {
  stroke: var(--coral);
  stroke-width: 2;
}

.ray-status {
  fill: var(--lime);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

.ray-status.blocked {
  fill: var(--coral);
}

.visibility-controls {
  padding: clamp(26px, 4vw, 42px);
}

.visibility-controls .range-label {
  margin-top: 0;
  color: var(--muted);
}

.visibility-controls .range-label output {
  color: #6354d7;
}

.visibility-controls input[type="range"] {
  accent-color: #6354d7;
}

.visibility-formula {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f2eee5;
  color: #4f5e5d;
  font-family: var(--mono);
  font-size: 0.65rem;
}

.visibility-readout {
  display: grid;
  grid-template-columns: 1fr repeat(2, auto);
  align-items: center;
  gap: 15px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f2eee5;
}

.visibility-readout > span {
  width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: #ddecbb;
  color: #38580b;
  font-family: var(--mono);
  font-size: 0.59rem;
  font-weight: 800;
  text-transform: uppercase;
}

.visibility-readout > span.blocked {
  background: #f4d4cf;
  color: #873428;
}

.visibility-readout div {
  padding-left: 13px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.visibility-readout small,
.visibility-readout strong {
  display: block;
}

.visibility-readout small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.52rem;
  text-transform: uppercase;
}

.visibility-readout strong {
  font-family: var(--mono);
  font-size: 0.9rem;
}

.step-figure {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f2eee5;
}

.step-figure .step-label,
.step-figure figcaption {
  color: var(--muted);
  fill: var(--muted);
}

.step-axes {
  stroke: #7b8784;
  stroke-opacity: 0.5;
}

.step-function {
  fill: none;
  stroke: #6354d7;
  stroke-width: 3;
}

.step-jump {
  stroke: #6354d7;
  stroke-dasharray: 4 5;
}

.step-dot {
  fill: var(--coral);
  stroke: #fff;
  stroke-width: 2;
}

.visibility-explanation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.visibility-explanation article {
  min-height: 260px;
  padding: 28px;
}

.visibility-explanation article.problem-card {
  border-color: #e7bbb5;
  background: #f9eae6;
}

.visibility-explanation h3 {
  font-size: 1.1rem;
}

.warning-note {
  border-color: #e2bd8b;
  background: #f5e7d3;
}

.warning-note strong {
  color: #815111;
}

.optimize-section {
  border-top: 1px solid rgba(170, 208, 201, 0.08);
}

.optimizer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.code-card,
.mode-card {
  overflow: hidden;
  border: 1px solid rgba(168, 207, 199, 0.16);
  border-radius: 14px;
  background: #172432;
}

.code-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(168, 207, 199, 0.13);
  color: #8ea8a3;
  font-family: var(--mono);
  font-size: 0.6rem;
}

.code-card pre {
  margin: 0;
  padding: clamp(25px, 4vw, 42px);
  overflow-x: auto;
  color: #e6f0ed;
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1.15vw, 0.82rem);
  line-height: 1.9;
}

.code-card .comment {
  color: #809a95;
}

.code-card .keyword {
  color: var(--purple);
}

.mode-card {
  padding: clamp(28px, 4vw, 42px);
}

.mode-card h3 {
  max-width: 530px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
}

.mode-row {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 5px 20px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(168, 207, 199, 0.14);
}

.mode-row > span {
  grid-row: 1 / 3;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mode-row.featured > span {
  color: var(--lime);
}

.mode-row strong {
  color: #e5efec;
  font-size: 0.82rem;
}

.mode-row p,
.mode-caveat {
  margin: 0;
  color: #a7bcb8;
  font-size: 0.76rem;
}

.mode-caveat {
  margin-top: 24px;
  padding: 12px 14px;
  border-left: 3px solid var(--purple);
  background: #121d29;
}

.application-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 22px;
}

.application-grid article {
  min-height: 215px;
  padding: 25px;
  border: 1px solid rgba(168, 207, 199, 0.14);
  border-radius: 12px;
  background: #16222f;
}

.application-grid article > span {
  margin-bottom: 34px;
  color: var(--lime);
}

.application-grid h3 {
  color: #edf6f3;
  font-size: 1.05rem;
}

.application-grid p {
  color: #a8bcb8;
}

.reality-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  margin-top: 70px;
}

.reality-intro {
  padding: 34px;
  border-color: rgba(168, 207, 199, 0.16);
  background: #172432;
}

.reality-intro h3 {
  color: #edf6f3;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.7vw, 3.4rem);
  font-weight: 400;
}

.reality-intro > p:last-child {
  color: #a8bdb8;
}

.limitation-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(168, 207, 199, 0.15);
  list-style: none;
}

.limitation-list li {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 18px;
  padding: 18px 4px;
  border-bottom: 1px solid rgba(168, 207, 199, 0.15);
}

.limitation-list li > span {
  color: var(--purple);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.limitation-list strong {
  color: #e4efec;
  font-size: 0.87rem;
}

.limitation-list p {
  margin: 4px 0 0;
  color: #9fb4af;
  font-size: 0.76rem;
}

.sources {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 34px;
  margin-top: 90px;
  padding-top: 45px;
  border-top: 1px solid rgba(168, 207, 199, 0.15);
}

.sources-heading h3 {
  margin-top: 10px;
  color: #edf6f3;
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
}

.sources-heading > p:last-child {
  color: #9fb4af;
  font-size: 0.78rem;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.source-list a {
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 20px;
  border-color: rgba(168, 207, 199, 0.15);
  background: #16222f;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.source-list a:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: #192936;
}

.source-list span,
.source-list small {
  color: #90aaa5;
  font-family: var(--mono);
  font-size: 0.57rem;
  line-height: 1.45;
}

.source-list span {
  margin-bottom: 12px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-list strong {
  color: #e3eeeb;
  font-size: 0.82rem;
  line-height: 1.45;
}

.source-list small {
  margin-top: auto;
  padding-top: 17px;
}

footer {
  padding: 66px 0 74px;
  background: #0b101a;
  color: #dae8e4;
}

.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.25fr repeat(2, 0.8fr);
  gap: 60px;
}

.footer-brand {
  color: #f1f6f5;
}

.footer-inner > div:first-child > p {
  max-width: 390px;
  margin: 15px 0 0;
  color: #8da6a1;
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links strong {
  margin-bottom: 4px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a {
  color: #a2b8b3;
  font-size: 0.76rem;
}

.footer-links a:hover {
  color: #fff;
}

@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: minmax(0, 0.84fr) minmax(450px, 1.16fr);
    gap: 35px;
  }

  .section-heading {
    grid-template-columns: 150px 1fr;
  }

  .family-intro,
  .sionna-heading {
    grid-template-columns: 150px 1fr;
  }

  .section-heading > p:last-child,
  .family-intro > p:last-child,
  .sionna-heading > p:last-child {
    grid-column: 2;
    max-width: 680px;
  }

  .family-workbench,
  .sionna-lab {
    grid-template-columns: 1fr;
  }

  .family-stage,
  .sionna-figure {
    border-right: 0;
    border-bottom: 1px solid rgba(169, 204, 197, 0.15);
  }

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

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

@media (max-width: 900px) {
  .site-header nav {
    gap: clamp(10px, 2.5vw, 20px);
  }

  .site-header nav a span {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 112px;
  }

  .hero-inner {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-figure {
    width: min(760px, 100%);
    margin-inline: auto;
  }

  .definition-grid,
  .lab-shell,
  .visibility-lab,
  .optimizer-grid,
  .reality-grid,
  .sources {
    grid-template-columns: 1fr;
  }

  .scene-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(170, 208, 201, 0.14);
    justify-content: flex-start;
  }

  .visibility-scene-wrap {
    justify-content: flex-start;
  }

  .sources {
    gap: 22px;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .hero-inner,
  .forward-section,
  .visibility-section,
  .footer-inner {
    width: min(100% - 28px, var(--max));
  }

  .lab-section,
  .optimize-section {
    padding-inline: 14px;
  }

  .header-inner {
    min-height: 60px;
    gap: 12px;
  }

  .brand > span:last-child {
    display: none;
  }

  .site-header nav {
    gap: clamp(9px, 3vw, 16px);
  }

  .site-header nav a {
    font-size: 0.63rem;
  }

  .hero {
    padding: 100px 0 58px;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 17vw, 5.2rem);
    line-height: 0.91;
  }

  .hero-actions {
    margin-top: 25px;
  }

  .button {
    flex: 1 1 155px;
  }

  .hero-facts {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .hero-figure {
    padding: 5px;
  }

  .hero-figure figcaption {
    padding: 3px 8px 9px;
  }

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

  .section-heading {
    display: block;
    margin-bottom: 42px;
  }

  .family-intro,
  .sionna-heading {
    display: block;
    margin-bottom: 34px;
  }

  .family-intro h2,
  .sionna-heading h2 {
    margin: 13px 0 20px;
    font-size: clamp(2.55rem, 12.8vw, 4rem);
  }

  .section-heading h2 {
    margin: 13px 0 20px;
    font-size: clamp(2.75rem, 13.5vw, 4.3rem);
  }

  .section-heading > p:last-child {
    font-size: 0.89rem;
  }

  .definition-card,
  .parameter-grid article,
  .derivation-grid article,
  .visibility-explanation article,
  .reality-intro {
    padding: 24px;
  }

  .equation.stack > div {
    grid-template-columns: 50px 18px minmax(0, 1fr);
  }

  .equation.stack code {
    overflow-x: auto;
    white-space: nowrap;
  }

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

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

  .parameter-grid,
  .derivation-grid,
  .visibility-explanation,
  .application-grid,
  .sionna-sampling-map,
  .sionna-detail-grid,
  .known-derived-grid,
  .source-list,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .sionna-pipeline {
    grid-template-columns: 1fr;
  }

  .sionna-angle-note,
  .inverse-identifiability {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .family-stage,
  .sionna-figure {
    padding: 8px;
  }

  .family-inspector,
  .sionna-controls {
    padding: 24px;
  }

  .sionna-metric-grid {
    grid-template-columns: 1fr;
  }

  .scope-note,
  .warning-note {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .scene-panel,
  .visibility-scene-wrap {
    padding: 8px;
  }

  .panel-topline {
    padding: 5px 4px 9px;
  }

  .lab-controls,
  .visibility-controls,
  .mode-card {
    padding: 24px;
  }

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

  .lab-button.quiet {
    grid-column: 1 / -1;
  }

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

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

  .visibility-readout > span {
    grid-column: 1 / -1;
  }

  .visibility-readout div:first-of-type {
    padding-left: 0;
    border-left: 0;
    text-align: left;
  }

  .mode-row {
    grid-template-columns: 1fr;
  }

  .mode-row > span {
    grid-row: auto;
  }

  .reality-grid {
    margin-top: 50px;
  }

  .sources {
    margin-top: 65px;
  }

  .source-list a {
    min-height: 145px;
  }

  .footer-inner {
    gap: 30px;
  }
}

@media (max-width: 420px) {
  .site-header nav {
    gap: 10px;
  }

  .site-header nav a {
    font-size: 0.59rem;
  }

  .hero-inner,
  .forward-section,
  .visibility-section,
  .footer-inner {
    width: calc(100% - 22px);
  }

  .lab-section,
  .optimize-section {
    padding-inline: 11px;
  }

  .hero h1 {
    font-size: clamp(3.05rem, 17vw, 4.3rem);
  }

  .hero-figure figcaption {
    font-size: 0.68rem;
  }

  .lab-controls,
  .visibility-controls,
  .mode-card,
  .code-card pre {
    padding: 20px;
  }

  .family-inspector,
  .sionna-controls {
    padding: 20px;
  }

  .reflection-mode-picker {
    grid-template-columns: 1fr;
  }

  .family-direct-label,
  .family-small-label,
  .sionna-callout {
    display: none;
  }

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

  .lab-button.quiet {
    grid-column: auto;
  }
}

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

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