:root {
  color-scheme: dark;
  --ink: #0a0c0d;
  --panel: #111416;
  --panel-soft: #171b1d;
  --panel-raised: #1d2224;
  --cream: #f1eadf;
  --muted: #9ca3a2;
  --faint: #626968;
  --line: rgba(236, 230, 217, 0.11);
  --line-strong: rgba(236, 230, 217, 0.19);
  --amber: #e3a64d;
  --amber-bright: #ffc36e;
  --blue: #bcdcf5;
  --danger: #e17967;
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  font-family: var(--sans);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 26% 42%, rgba(113, 127, 128, 0.08), transparent 34%),
    var(--ink);
}

button,
input,
select,
summary {
  font: inherit;
}

button,
summary,
select,
input[type="range"] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--amber-bright);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.museum-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: relative;
  z-index: 20;
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) auto minmax(100px, 0.42fr);
  align-items: center;
  gap: 24px;
  padding: 18px clamp(22px, 2.7vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 13, 0.82);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  color: var(--amber);
}

.brand-lockup span {
  display: grid;
  line-height: 1.05;
}

.brand-lockup small,
.eyebrow {
  color: var(--amber);
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.brand-lockup strong {
  font-family: var(--sans);
  font-size: clamp(1.75rem, 2.25vw, 2.25rem);
  font-weight: 660;
  letter-spacing: -0.035em;
}

.brand-lockup small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 450;
  letter-spacing: 0;
  text-transform: none;
}

.mode-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.mode-button {
  min-width: 112px;
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.mode-button:hover {
  color: var(--cream);
}

.mode-button.is-active {
  color: #161311;
  background: linear-gradient(135deg, #f0c27d, var(--amber));
  box-shadow: 0 5px 16px rgba(227, 166, 77, 0.2);
}

.header-actions {
  justify-self: end;
}

.icon-button {
  width: auto;
  min-width: 88px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  color: var(--cream);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-button span {
  font-size: 0.76rem;
  font-weight: 650;
}

.icon-button svg,
.primary-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.exhibit {
  position: relative;
  isolation: isolate;
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(350px, 27vw, 420px);
}

.stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 0 88%, rgba(255, 255, 255, 0.018)),
    radial-gradient(ellipse at 48% 53%, rgba(124, 138, 138, 0.1), transparent 49%);
}

.stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, black, transparent 76%);
}

.canvas-host {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.canvas-host:active {
  cursor: grabbing;
}

.canvas-host canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stage-glow {
  position: absolute;
  width: 64%;
  height: 45%;
  left: 12%;
  bottom: 15%;
  border-radius: 50%;
  background: rgba(194, 209, 207, 0.06);
  filter: blur(50px);
  pointer-events: none;
}

.stage-title {
  position: absolute;
  top: 28px;
  left: clamp(20px, 3vw, 48px);
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--faint);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  pointer-events: none;
}

.stage-title i {
  width: 62px;
  height: 1px;
  background: var(--line-strong);
}

.interaction-hint {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 86px;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(16, 19, 20, 0.82);
  box-shadow: 0 15px 42px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  transition: opacity 300ms ease, transform 300ms ease;
}

.interaction-hint.is-dismissed {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
}

.interaction-hint > svg {
  width: 24px;
  fill: none;
  stroke: var(--amber);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.interaction-hint > span {
  display: grid;
  gap: 2px;
  white-space: nowrap;
}

.interaction-hint strong {
  color: var(--cream);
  font-size: 0.76rem;
}

.interaction-hint small {
  font-size: 0.66rem;
}

.interaction-hint button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
}

.webgl-message {
  position: absolute;
  z-index: 8;
  inset: 50% auto auto 50%;
  width: min(330px, calc(100% - 40px));
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  background: rgba(18, 21, 22, 0.92);
  transform: translate(-50%, -50%);
}

.webgl-message svg {
  width: 42px;
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.5;
}

.webgl-message strong {
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.webgl-message span {
  font-size: 0.78rem;
  line-height: 1.5;
}

.stage-toolbar {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 3vw, 48px);
  bottom: 26px;
  width: min(330px, 35%);
  padding: 12px 15px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(14, 17, 18, 0.72);
  backdrop-filter: blur(12px);
}

.explode-control {
  display: grid;
  gap: 8px;
}

.explode-control > span,
.range-row > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.explode-control small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

output {
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  --fill: 50%;
  width: 100%;
  height: 22px;
  margin: 0;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--amber) var(--fill), rgba(255, 255, 255, 0.14) var(--fill));
}

input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6.5px;
  appearance: none;
  border: 3px solid #191b1c;
  border-radius: 50%;
  background: var(--amber-bright);
  box-shadow: 0 0 0 1px var(--amber), 0 3px 12px rgba(0, 0, 0, 0.45);
}

input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
}

input[type="range"]::-moz-range-progress {
  height: 3px;
  border-radius: 99px;
  background: var(--amber);
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid #191b1c;
  border-radius: 50%;
  background: var(--amber-bright);
  box-shadow: 0 0 0 1px var(--amber);
}

.leader-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.leader-layer path {
  fill: none;
  stroke: rgba(227, 166, 77, 0.68);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.leader-layer circle {
  fill: var(--amber-bright);
  filter: drop-shadow(0 0 7px rgba(227, 166, 77, 0.7));
}

.inspector {
  position: relative;
  z-index: 8;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  overscroll-behavior: contain;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.025), transparent 32%),
    var(--panel);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sheet-grabber {
  display: none;
}

.component-rail-wrap {
  flex: none;
  padding: 22px clamp(22px, 2vw, 32px) 14px;
  border-bottom: 1px solid var(--line);
}

.rail-label {
  display: block;
  margin-bottom: 10px;
  color: var(--faint);
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.component-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.component-button {
  position: relative;
  min-width: 0;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.66rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.component-button:hover {
  color: var(--cream);
  border-color: var(--line);
}

.component-button.is-active {
  color: #1a130b;
  border-color: var(--amber);
  background: var(--amber);
}

.component-button::after {
  content: attr(data-short-name);
  position: absolute;
  z-index: 4;
  top: calc(100% + 7px);
  left: 50%;
  width: max-content;
  max-width: 150px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--cream);
  background: #24282a;
  font-size: 0.66rem;
  font-weight: 550;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.component-button:hover::after,
.component-button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.inspector-panel {
  flex: none;
  padding: clamp(24px, 3.1vh, 38px) clamp(24px, 2.7vw, 38px);
}

.anatomy-panel {
  display: flex;
  flex-direction: column;
}

.component-kicker {
  display: grid;
  grid-template-columns: auto minmax(22px, 56px) auto;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.component-kicker > :first-child {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.kicker-rule {
  height: 1px;
  background: var(--line-strong);
}

.component-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: clamp(22px, 3vh, 32px) 0 18px;
  border: 1px solid rgba(227, 166, 77, 0.2);
  border-radius: 50%;
  color: var(--amber);
  background: radial-gradient(circle, rgba(227, 166, 77, 0.1), transparent 68%);
}

.component-icon svg {
  width: 58px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.inspector-panel h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.15rem, 3vw, 3.1rem);
  font-weight: 450;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.component-purpose,
.beam-intro {
  margin: 18px 0 0;
  color: #bcc1bd;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.58;
}

.why-block {
  margin-top: 24px;
  padding: 18px 0 18px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 2px solid var(--amber);
}

.why-block > span {
  color: var(--amber);
  font-size: 0.6rem;
  font-weight: 780;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.why-block p {
  margin: 8px 0 0;
  color: var(--cream);
  font-size: 0.81rem;
  line-height: 1.55;
}

.context-strip {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.context-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--amber);
  background: rgba(227, 166, 77, 0.1);
}

.context-strip p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.context-strip strong {
  font-size: 0.73rem;
}

.context-strip small {
  color: var(--muted);
  font-size: 0.66rem;
}

.mobile-explode {
  display: none;
}

.beam-panel {
  padding-top: 28px;
}

.beam-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.beam-heading h1 {
  margin-top: 8px;
  font-size: clamp(2rem, 2.7vw, 2.8rem);
}

.cct-chip {
  flex: none;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.69rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(188, 220, 245, 0.06);
}

.beam-intro {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.control-stack {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.control-row {
  min-height: 62px;
  margin: 0;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.range-row {
  display: grid;
  gap: 7px;
}

.range-row strong,
.select-row > span,
.segmented-control legend {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.range-row output {
  font-size: 0.77rem;
  font-weight: 680;
}

.segmented-control {
  min-width: 0;
}

.segmented-control legend {
  float: left;
  padding: 3px 0 0;
}

.segmented-control > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  clear: both;
  margin-top: 8px;
}

.segmented-control button {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.68rem;
  font-weight: 680;
  cursor: pointer;
}

.segmented-control button[aria-pressed="true"] {
  color: var(--cream);
  border-color: rgba(227, 166, 77, 0.5);
  background: rgba(227, 166, 77, 0.12);
}

.select-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

select {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--cream);
  background: #1c2022;
  font-size: 0.72rem;
}

.advanced-controls {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.014);
}

.advanced-controls > summary,
.methods-note > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  list-style: none;
  cursor: pointer;
}

.advanced-controls > summary::-webkit-details-marker,
.methods-note > summary::-webkit-details-marker {
  display: none;
}

.advanced-controls > summary::after,
.methods-note > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--amber);
  font-size: 1.1rem;
}

.advanced-controls[open] > summary::after,
.methods-note[open] > summary::after {
  content: "−";
}

.advanced-controls > summary span,
.methods-note > summary {
  color: var(--cream);
  font-size: 0.72rem;
  font-weight: 730;
}

.advanced-controls > summary small {
  color: var(--faint);
  font-size: 0.64rem;
}

.advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 14px;
  padding: 14px 13px 17px;
  border-top: 1px solid var(--line);
}

.advanced-grid label {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 7px;
}

.advanced-grid label > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.advanced-grid output {
  font-size: 0.61rem;
  font-variant-numeric: tabular-nums;
}

.advanced-grid input {
  grid-column: 1 / -1;
}

.methods-note {
  margin: 0 13px 13px;
  border-top: 1px solid var(--line);
}

.methods-note > summary {
  padding: 0;
}

.methods-note > div {
  padding: 0 0 12px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.76rem;
  line-height: 1.52;
}

.methods-note p {
  margin: 8px 0;
}

.methods-note strong {
  color: var(--cream);
}

.formula {
  color: var(--blue);
  white-space: nowrap;
}

.scope-note {
  padding: 10px;
  border-left: 2px solid var(--amber);
  background: rgba(227, 166, 77, 0.05);
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--sans);
  font-size: 0.64rem;
}

.source-links a {
  color: var(--amber-bright);
}

.tradeoff-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.tradeoff-readout > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tradeoff-readout span {
  color: var(--faint);
  font-size: 0.55rem;
  line-height: 1.2;
}

.tradeoff-readout em,
.metric-card em {
  color: var(--amber);
  font-style: normal;
}

.tradeoff-readout strong {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.compare-actions {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
}

.primary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #1a130a;
  background: linear-gradient(135deg, var(--amber-bright), var(--amber));
  font-size: 0.72rem;
  font-weight: 780;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(227, 166, 77, 0.13);
}

.primary-button svg {
  width: 17px;
}

.text-button {
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.7rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.inspector-footer {
  margin-top: auto;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(24px, 2.7vw, 38px);
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.59rem;
}

.inspector-footer a {
  color: var(--muted);
  text-underline-offset: 3px;
}

.metrics-rail {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 20px;
  left: 24px;
  min-height: 108px;
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 0.7fr)) minmax(230px, 1.6fr);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  overflow: hidden;
  background: rgba(14, 17, 18, 0.86);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.metric-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 14px 14px;
  border-right: 1px solid var(--line);
}

.metric-card > span,
.thermal-heading > span {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 690;
  letter-spacing: 0.035em;
  line-height: 1.25;
}

.metric-card > strong,
.thermal-heading strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.45vw, 1.55rem);
  font-weight: 480;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card strong small,
.thermal-heading small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.52em;
  font-weight: 580;
}

.metric-primary {
  background: linear-gradient(140deg, rgba(227, 166, 77, 0.1), transparent 70%);
}

.compare-value {
  color: var(--amber);
  font-size: 0.59rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.metric-thermal {
  display: grid;
  grid-template-columns: minmax(86px, 0.75fr) 1.35fr;
  align-items: center;
  gap: 10px;
  border-right: 0;
}

.thermal-heading {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.thermal-heading strong {
  line-height: 1.08;
  white-space: normal;
}

.thermal-heading strong small {
  display: block;
  margin-top: 4px;
}

#thermal-chart {
  width: 100%;
  height: 72px;
  overflow: visible;
}

.chart-grid {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.thermal-area {
  fill: rgba(188, 220, 245, 0.08);
  stroke: none;
}

.thermal-line-b {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.thermal-line-a {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
}

.beam-scale {
  position: absolute;
  z-index: 2;
  top: 22%;
  right: 8%;
  bottom: 152px;
  left: 8%;
  pointer-events: none;
}

.beam-scale > span {
  position: absolute;
  bottom: 0;
  left: var(--position);
  display: grid;
  justify-items: center;
  gap: 5px;
  color: rgba(211, 220, 222, 0.55);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.beam-scale i {
  width: 1px;
  height: 38px;
  background: linear-gradient(transparent, rgba(188, 220, 245, 0.35));
}

.beam-callouts {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.beam-callouts span {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--amber-bright);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 12px #000;
}

.beam-callouts i {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--amber), rgba(227, 166, 77, 0.1));
}

.hotspot-callout {
  top: 34%;
  left: 15%;
}

.spill-callout {
  top: 20%;
  left: 31%;
}

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

@media (max-width: 1180px) {
  .exhibit {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .metrics-rail {
    grid-template-columns: repeat(5, minmax(90px, 1fr));
  }

  .metric-thermal {
    grid-column: 1 / -1;
    min-height: 82px;
    border-top: 1px solid var(--line);
  }

  .stage[data-unused] {
    display: block;
  }
}

@media (max-width: 880px) {
  body {
    overflow: hidden;
  }

  .site-header {
    min-height: 124px;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "modes modes";
    gap: 7px 12px;
    padding: 9px 14px 10px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .brand-lockup {
    grid-area: brand;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
  }

  .brand-lockup small {
    display: none;
  }

  .brand-lockup strong {
    font-size: 1.42rem;
  }

  .mode-switch {
    grid-area: modes;
    width: 100%;
    min-height: 52px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mode-button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 11px;
    font-size: 0.69rem;
  }

  .icon-button {
    min-width: 76px;
    height: 44px;
  }

  .header-actions {
    grid-area: actions;
  }

  .exhibit {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 43dvh) minmax(0, 1fr);
  }

  .stage {
    grid-row: 1;
    border-bottom: 1px solid var(--line);
  }

  .stage-title {
    top: 16px;
    left: 16px;
    font-size: 0.54rem;
  }

  .stage-title i {
    width: 28px;
  }

  .interaction-hint {
    bottom: 18px;
    min-height: 48px;
    max-width: calc(100% - 24px);
  }

  .interaction-hint > span small {
    display: none;
  }

  .stage-toolbar {
    display: none;
  }

  .leader-layer {
    display: none;
  }

  .inspector {
    grid-row: 2;
    border-top: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.28);
  }

  .sheet-grabber {
    flex: none;
    width: 38px;
    height: 4px;
    display: block;
    margin: 8px auto 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.18);
  }

  .component-rail-wrap {
    position: sticky;
    z-index: 4;
    top: 0;
    padding: 6px 14px 10px;
    background: rgba(17, 20, 22, 0.96);
    backdrop-filter: blur(15px);
  }

  .rail-label {
    display: none;
  }

  .component-rail {
    grid-template-columns: repeat(12, 46px);
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .component-rail::-webkit-scrollbar {
    display: none;
  }

  .component-button {
    width: 46px;
    min-height: 44px;
    border-color: var(--line);
    border-radius: 50%;
    background: transparent;
    scroll-snap-align: center;
  }

  .component-button.is-active {
    color: var(--amber-bright);
    border-color: var(--amber);
    background: rgba(227, 166, 77, 0.08);
    box-shadow: inset 0 0 0 1px var(--amber), 0 0 14px rgba(227, 166, 77, 0.16);
  }

  .component-button::after {
    display: none;
  }

  .inspector-panel {
    padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  }

  .anatomy-panel {
    display: grid;
    grid-template-columns: 58px 1fr;
    column-gap: 16px;
  }

  .component-kicker,
  .component-purpose,
  .why-block,
  .context-strip,
  .mobile-explode {
    grid-column: 1 / -1;
  }

  .component-icon {
    grid-row: 2;
    width: 58px;
    height: 58px;
    margin: 18px 0 0;
  }

  .component-icon svg {
    width: 48px;
  }

  .anatomy-panel h1 {
    grid-row: 2;
    align-self: center;
    margin-top: 17px;
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .component-purpose {
    margin-top: 16px;
    font-size: 0.92rem;
    line-height: 1.47;
  }

  .why-block {
    margin-top: 18px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .context-strip {
    margin-top: 14px;
  }

  .mobile-explode {
    display: block;
    margin-top: 16px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .inspector-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .metrics-rail {
    right: 10px;
    bottom: 9px;
    left: 10px;
    min-height: 88px;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .metrics-rail::-webkit-scrollbar {
    display: none;
  }

  .metric-card {
    flex: 0 0 126px;
    min-height: 86px;
    scroll-snap-align: start;
  }

  .metric-card > strong {
    font-size: 1.17rem;
  }

  .metric-thermal {
    flex-basis: 265px;
    grid-template-columns: 90px 1fr;
    border-top: 0;
  }

  .beam-scale {
    bottom: 108px;
  }

  .beam-callouts span {
    font-size: 0.56rem;
  }

  .beam-callouts i {
    height: 28px;
  }

  .hotspot-callout {
    top: 36%;
    left: 12%;
  }

  .spill-callout {
    top: 22%;
    left: 31%;
  }

  .beam-panel {
    padding-top: 18px;
  }

  .beam-heading h1 {
    font-size: 2.35rem;
  }

  .control-row,
  .advanced-controls > summary,
  .methods-note > summary,
  select,
  .segmented-control button {
    min-height: 44px;
  }

  .control-row {
    min-height: 66px;
  }

  .select-row {
    grid-template-columns: 96px 1fr;
  }

  .advanced-grid {
    gap: 16px 14px;
  }
}

@media (max-width: 520px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .brand-mark {
    display: none;
  }

  .mode-switch {
    justify-self: center;
  }

  .exhibit {
    grid-template-rows: minmax(272px, 42dvh) minmax(0, 1fr);
  }

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

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

@media (max-height: 680px) and (orientation: landscape) {
  .site-header {
    min-height: 66px;
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "brand modes actions";
    gap: 10px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .brand-lockup strong {
    font-size: 1.08rem;
  }

  .mode-switch {
    width: auto;
    min-width: 210px;
  }

  .icon-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .icon-button span {
    display: none;
  }

  .exhibit {
    grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.8fr);
    grid-template-rows: 1fr;
  }

  .stage,
  .inspector {
    grid-row: 1;
  }

  .stage {
    grid-column: 1;
  }

  .inspector {
    grid-column: 2;
    border-left: 1px solid var(--line);
    border-radius: 0;
  }

  .sheet-grabber {
    display: none;
  }

  .component-rail-wrap {
    position: static;
  }

  .inspector-panel {
    padding-top: 16px;
  }

  .anatomy-panel {
    display: flex;
  }

  .component-icon {
    width: 52px;
    height: 52px;
    margin: 14px 0;
  }

  .anatomy-panel h1 {
    margin-top: 0;
    font-size: 2rem;
  }

  .component-purpose {
    margin-top: 10px;
  }

  .mobile-explode {
    margin-top: 12px;
  }

  .stage-toolbar {
    display: none;
  }

  .metrics-rail {
    right: 12px;
    bottom: 10px;
    left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
