:root {
  color-scheme: dark;
  --bg: #07111d;
  --panel: #0c1927;
  --panel-2: #0f2030;
  --panel-3: #122638;
  --line: #213447;
  --line-soft: rgba(133, 163, 190, .14);
  --text: #eaf0f6;
  --muted: #8ea2b7;
  --muted-2: #647b91;
  --accent: #e7b36c;
  --accent-bright: #ffd08b;
  --cyan: #63c6d7;
  --radius: 17px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 22% -15%, rgba(30, 66, 91, .35), transparent 42%), var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
.app-shell { width: min(1540px, 100%); margin: 0 auto; padding: 0 42px 24px; }
.site-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); gap: 16px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 30px; height: 30px; border: 1px solid rgba(231,179,108,.55); border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-22deg); }
.brand-mark span { display: block; width: 3px; border-radius: 4px; background: var(--accent); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .65; }
.brand-mark span:nth-child(2) { height: 16px; }
.brand-mark span:nth-child(3) { height: 11px; opacity: .8; }
.eyebrow, .kicker, .section-kicker, .group-label, .readout-label, .caption-label, .equation-label, .audit-heading span, .page-footer, .header-meta, .stage-status { letter-spacing: .13em; font-size: 9px; font-weight: 750; }
.eyebrow { color: var(--muted); }
.eyebrow span { color: var(--accent); padding: 0 4px; }
.brand-name { margin-top: 2px; color: #dfe8f0; font-size: 12px; font-weight: 650; letter-spacing: .025em; }
.header-meta { display: flex; align-items: center; gap: 9px; color: var(--muted-2); white-space: nowrap; }
.live-dot, .status-pulse { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #7dc6ad; box-shadow: 0 0 0 4px rgba(125,198,173,.1); }
.meta-divider { width: 1px; height: 12px; background: var(--line); margin: 0 4px; }
.page-content { padding-top: 20px; }
.intro-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 2px 18px; }
.intro-copy { max-width: 700px; }
.kicker { color: var(--accent); margin-bottom: 11px; }
.kicker span { color: var(--muted-2); padding: 0 4px; }
h1 { margin: 0; color: #f0f4f8; font-size: clamp(30px, 3vw, 42px); line-height: 1.05; letter-spacing: -.045em; font-weight: 620; }
.intro-copy p { max-width: 610px; margin: 10px 0 0; color: #9dafc0; font-size: 13px; line-height: 1.65; }
.phenomenon-stamp { width: 110px; height: 110px; flex: 0 0 110px; position: relative; display: grid; place-items: center; opacity: .9; }
.stamp-orbit { position: absolute; border: 1px solid rgba(231,179,108,.35); border-radius: 50%; }
.orbit-one { width: 80px; height: 80px; }
.orbit-two { width: 57px; height: 57px; border-color: rgba(231,179,108,.58); }
.stamp-core { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe1a9, #c88947 68%, #6b4a2d); box-shadow: 0 0 23px rgba(231,179,108,.3); }
.stamp-caption { position: absolute; bottom: -3px; text-align: center; color: #8f9fb0; font-size: 7px; line-height: 1.3; letter-spacing: .16em; font-weight: 750; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 344px; align-items: start; gap: 18px; }
.stage-column { min-width: 0; }
.stage-card, .control-card, .readout-card, .causal-step, .science-panel { background: linear-gradient(145deg, rgba(16,33,49,.98), rgba(10,23,36,.98)); border: 1px solid var(--line); border-radius: var(--radius); }
.stage-card { overflow: hidden; animation: stageReveal .78s cubic-bezier(.2,.75,.25,1) both; }
.control-card { animation: stageReveal .78s cubic-bezier(.2,.75,.25,1) .08s both; }
@keyframes stageReveal { from { opacity: 0; transform: translateY(12px) scale(.995); } to { opacity: 1; transform: translateY(0) scale(1); } }
.stage-toolbar { min-height: 58px; padding: 13px 18px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-kicker { color: var(--muted-2); font-size: 8px; }
.stage-toolbar h2, .control-heading-row h2 { margin: 3px 0 0; color: #eaf0f6; font-size: 16px; font-weight: 620; letter-spacing: -.02em; }
.stage-status { display: inline-flex; align-items: center; gap: 8px; color: #8eb6ad; font-size: 8px; white-space: nowrap; }
.status-pulse { width: 5px; height: 5px; box-shadow: none; }
.stage-viewport { position: relative; height: clamp(320px, 28vw, 380px); min-height: 300px; background: #081521; overflow: hidden; }
#labCanvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.canvas-corner-note { position: absolute; right: 15px; bottom: 10px; pointer-events: none; color: rgba(161,181,198,.58); font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.canvas-corner-note span { color: var(--accent); padding: 0 3px; }
.stage-caption { display: flex; align-items: flex-start; gap: 12px; min-height: 60px; padding: 11px 18px 12px; border-top: 1px solid var(--line-soft); background: rgba(13,27,41,.8); }
.caption-icon { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 8px; color: var(--accent); background: rgba(231,179,108,.1); font-size: 14px; }
.caption-label { color: var(--accent); font-size: 8px; margin-bottom: 3px; }
.stage-caption p { margin: 0; color: #b0bfcc; font-size: 11px; line-height: 1.5; }
.readout-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; margin-top: 11px; }
.readout-card { min-height: 83px; padding: 11px 13px 9px; border-radius: 13px; background: rgba(13,27,41,.88); }
.readout-highlight { border-color: rgba(231,179,108,.38); background: linear-gradient(145deg, rgba(45,38,31,.55), rgba(13,27,41,.95)); }
.readout-label { color: var(--muted-2); font-size: 8px; white-space: nowrap; }
.readout-value { margin-top: 5px; color: #e9f0f5; font-size: 23px; line-height: 1.1; font-weight: 590; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value small { color: #8fa4b7; font-size: 10px; font-weight: 550; letter-spacing: 0; }
.readout-highlight .readout-value { color: var(--accent-bright); }
.readout-foot { margin-top: 5px; color: #71879b; font-size: 9px; white-space: nowrap; }
.causal-strip { display: grid; grid-template-columns: 1fr 18px 1fr 18px 1fr; align-items: center; gap: 7px; margin-top: 12px; }
.causal-step { min-height: 80px; padding: 11px 12px; display: flex; gap: 9px; border-radius: 12px; background: rgba(13,27,41,.68); }
.step-number { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .08em; padding-top: 2px; }
.causal-step h3 { margin: 0 0 3px; font-size: 10px; color: #dce5ed; font-weight: 680; }
.causal-step p { margin: 0; color: #8498aa; font-size: 9px; line-height: 1.45; }
.causal-arrow { color: #6f8295; text-align: center; font-size: 14px; }
.science-panel { margin-top: 12px; overflow: hidden; background: rgba(11,24,37,.9); }
.science-panel summary { min-height: 51px; display: flex; align-items: center; gap: 10px; padding: 0 16px; cursor: pointer; list-style: none; user-select: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-summary-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: var(--accent); background: rgba(231,179,108,.1); font-size: 14px; }
.science-panel summary > span:nth-child(2) { font-size: 12px; font-weight: 650; }
.summary-subtitle { margin-left: auto; color: var(--muted-2); font-size: 8px; letter-spacing: .12em; }
.summary-chevron { color: var(--muted); font-size: 17px; transition: transform .22s ease; }
.science-panel[open] .summary-chevron { transform: rotate(180deg); }
.science-content { padding: 0 16px 17px; border-top: 1px solid var(--line-soft); }
.equation-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; padding-top: 14px; }
.equation-card { padding: 12px; border: 1px solid rgba(119,151,179,.13); border-radius: 10px; background: rgba(16,35,52,.62); }
.equation-label { color: var(--muted-2); font-size: 8px; }
.equation { margin: 7px 0 6px; color: #f0c78f; font-family: Georgia, "Times New Roman", serif; font-size: 17px; white-space: nowrap; }
.equation-card p, .simplifications p { margin: 0; color: #92a5b6; font-size: 10px; line-height: 1.55; }
.audit-card { margin-top: 10px; padding: 12px; border: 1px solid rgba(111,183,158,.24); border-radius: 11px; background: rgba(17,45,47,.25); }
.audit-heading { display: flex; align-items: center; gap: 9px; }
.audit-check { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #9bd2b8; background: rgba(99,183,147,.13); font-size: 12px; }
.audit-heading strong { display: block; color: #d8e9e2; font-size: 10px; }
.audit-heading div > span { display: block; margin-top: 2px; color: #7f9d94; font-size: 7px; letter-spacing: .11em; }
.audit-values { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 12px; }
.audit-values div { padding: 7px 8px; border-radius: 7px; background: rgba(5,18,27,.45); }
.audit-values span { display: block; color: #829a9a; font-size: 8px; }
.audit-values strong { display: block; margin-top: 3px; color: #e4eee9; font-size: 13px; font-variant-numeric: tabular-nums; }
.audit-note { margin: 9px 0 0; color: #849a99; font-size: 9px; line-height: 1.5; }
.simplifications { margin-top: 13px; }
.simplifications h3 { margin: 0 0 5px; color: #dfe8ee; font-size: 11px; }
.disclaimer { margin: 12px 0 0; color: #6f8497; font-size: 9px; font-style: italic; }
.control-card { padding: 18px 17px 15px; position: relative; }
.control-heading-row { display: flex; align-items: center; justify-content: space-between; }
.control-heading-row h2 { font-size: 17px; }
.control-glyph { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 10px; color: var(--accent); background: rgba(231,179,108,.1); font-size: 22px; }
.control-intro { margin: 8px 0 15px; color: #8ea2b5; font-size: 10px; line-height: 1.5; }
.group-label { color: var(--muted-2); font-size: 8px; }
.preset-block { margin-top: 1px; }
.preset-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.preset-button { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 9px 8px; border: 1px solid #263b4f; border-radius: 9px; text-align: left; background: rgba(6,17,28,.55); cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.preset-button:hover { border-color: rgba(231,179,108,.55); transform: translateY(-1px); }
.preset-button.active { border-color: rgba(231,179,108,.65); background: rgba(231,179,108,.08); }
.preset-swatch { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 6px; border: 1px solid rgba(231,179,108,.45); }
.band-swatch { background: repeating-linear-gradient(90deg, transparent 0 4px, rgba(231,179,108,.85) 4px 6px), #142738; }
.quiet-swatch { border-color: rgba(100,161,180,.35); background: linear-gradient(135deg, rgba(99,198,215,.25), transparent); }
.preset-button strong { display: block; color: #dce6ed; font-size: 9px; font-weight: 680; white-space: nowrap; }
.preset-button small { display: block; margin-top: 2px; color: #7f93a5; font-size: 7px; white-space: nowrap; }
.control-divider { height: 1px; margin: 15px 0 13px; background: var(--line-soft); }
.controls-label { margin-bottom: 14px; }
.slider-control { margin-bottom: 13px; }
.slider-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.slider-label-row label { color: #cbd7e1; font-size: 10px; font-weight: 570; }
.slider-label-row label em { color: #9db0c0; font-family: Georgia,serif; font-style: italic; }
.slider-label-row output { color: var(--accent-bright); font-size: 9px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
input[type="range"] { display: block; width: 100%; height: 15px; margin: 0; appearance: none; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(231,179,108,.75), rgba(91,122,145,.45)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(231,179,108,.75), rgba(91,122,145,.45)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; margin-top: -5px; border-radius: 50%; border: 2px solid #f5d4a7; background: #bd874d; box-shadow: 0 0 0 3px rgba(231,179,108,.12); }
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #f5d4a7; background: #bd874d; box-shadow: 0 0 0 3px rgba(231,179,108,.12); }
.range-ends { display: flex; justify-content: space-between; color: #61778c; font-size: 8px; margin-top: 1px; }
.control-bottom-row { display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.quality-switch { display: flex; gap: 3px; margin-top: 6px; padding: 3px; border-radius: 8px; background: rgba(4,15,25,.72); border: 1px solid var(--line-soft); }
.quality-button { padding: 4px 10px; border: 0; border-radius: 6px; color: #8297aa; background: transparent; font-size: 9px; cursor: pointer; }
.quality-button.active { color: #f1d0a2; background: rgba(231,179,108,.14); }
.quality-note { color: #637a8f; font-size: 8px; padding-bottom: 5px; }
.playback-controls { display: grid; grid-template-columns: 1fr 74px 42px; gap: 7px; margin-top: 16px; }
.play-button, .icon-button, .screenshot-button { min-height: 38px; border-radius: 9px; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.play-button { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #d3a56a; color: #241a10; background: linear-gradient(135deg, #f0c78f, #dba365); font-size: 10px; font-weight: 750; }
.play-button:hover { background: #ffd69e; transform: translateY(-1px); }
.play-icon { font-size: 12px; line-height: 1; }
.icon-button { border: 1px solid #2a4054; color: #b7c5d1; background: rgba(7,19,30,.7); font-size: 10px; }
.icon-button:hover { border-color: rgba(231,179,108,.5); color: #f1d0a2; }
.reset-button { font-size: 18px; line-height: 1; }
.screenshot-button { width: 100%; margin-top: 8px; min-height: 34px; border: 1px solid #2a4054; color: #b4c3d0; background: rgba(7,19,30,.6); font-size: 9px; font-weight: 650; }
.screenshot-button span { color: var(--accent); margin-right: 6px; font-size: 12px; }
.screenshot-button:hover { border-color: rgba(231,179,108,.55); color: #f0d2a9; }
.model-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; color: #72889c; font-size: 8px; line-height: 1.5; }
.note-mark { width: 14px; height: 14px; flex: 0 0 14px; display: grid; place-items: center; border: 1px solid #43586b; border-radius: 50%; color: #94a9ba; font-family: Georgia,serif; font-style: italic; font-size: 9px; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 23px; padding: 13px 2px 0; border-top: 1px solid var(--line-soft); color: #50677c; font-size: 7px; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode #app { height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
@media (max-width: 1100px) {
  .app-shell { padding-left: 24px; padding-right: 24px; }
  .workspace { grid-template-columns: minmax(0,1fr) 318px; gap: 13px; }
  .readout-card { padding-left: 10px; padding-right: 8px; }
  .readout-value { font-size: 20px; }
  .causal-step { padding: 10px 8px; }
}
@media (max-width: 850px) {
  .workspace { grid-template-columns: minmax(0,1fr); }
  .control-card { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 18px; }
  .control-heading-row, .control-intro, .preset-block, .control-card > .control-divider, .controls-label, .control-bottom-row, .playback-controls, .screenshot-button, .model-note { grid-column: 1 / -1; }
  .slider-control { margin-bottom: 9px; }
  .control-card > .control-divider:last-of-type { margin-top: 5px; }
  .page-footer { margin-top: 17px; }
}
@media (max-width: 560px) {
  .app-shell { padding: 0 13px 20px; }
  .site-header { min-height: 62px; }
  .header-meta { font-size: 7px; gap: 6px; }
  .header-meta span:last-child, .meta-divider { display: none; }
  .brand-name { font-size: 11px; }
  .page-content { padding-top: 22px; }
  .intro-row { padding-bottom: 18px; gap: 8px; }
  h1 { font-size: clamp(29px, 8vw, 36px); }
  .intro-copy p { max-width: 320px; font-size: 11px; margin-top: 9px; }
  .phenomenon-stamp { width: 72px; height: 72px; flex-basis: 72px; }
  .orbit-one { width: 58px; height: 58px; }
  .orbit-two { width: 40px; height: 40px; }
  .stamp-core { width: 16px; height: 16px; }
  .stamp-caption { font-size: 6px; bottom: -6px; }
  .stage-toolbar { min-height: 56px; padding: 11px 12px 9px; }
  .stage-toolbar h2 { font-size: 14px; }
  .stage-status { font-size: 7px; gap: 6px; }
  .stage-viewport { height: 315px; min-height: 290px; }
  .stage-caption { min-height: 65px; padding: 11px 12px; }
  .stage-caption p { font-size: 10px; }
  .readout-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 8px; }
  .readout-card { min-height: 77px; padding: 10px 11px 8px; }
  .readout-value { font-size: 22px; }
  .causal-strip { grid-template-columns: 1fr; gap: 5px; }
  .causal-step { min-height: auto; padding: 9px 11px; }
  .causal-arrow { display: none; }
  .causal-step p { font-size: 9px; }
  .science-panel summary { padding: 0 12px; }
  .summary-subtitle { display: none; }
  .science-content { padding-left: 11px; padding-right: 11px; }
  .equation-grid { grid-template-columns: 1fr; }
  .equation { font-size: 16px; }
  .audit-values { gap: 5px; }
  .audit-values div { padding: 7px 6px; }
  .audit-values span { font-size: 7px; }
  .audit-values strong { font-size: 11px; }
  .control-card { display: block; padding: 16px 13px 14px; }
  .control-intro { margin-bottom: 13px; }
  .preset-buttons { gap: 6px; }
  .preset-button { padding: 8px 7px; }
  .preset-button strong { font-size: 8px; }
  .preset-button small { font-size: 7px; }
  .slider-control { margin-bottom: 14px; }
  .page-footer { flex-wrap: wrap; justify-content: center; font-size: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
