:root {
  color-scheme: dark;
  --bg: #050b14;
  --panel: #0a1420;
  --panel-2: #0d1a28;
  --line: rgba(133, 177, 199, .14);
  --line-strong: rgba(133, 177, 199, .24);
  --text: #e6f1f5;
  --muted: #7d95a4;
  --muted-2: #536a79;
  --cyan: #62d5e7;
  --cyan-bright: #9bf4ff;
  --blue: #73aee5;
  --amber: #e6bd7c;
  --green: #7de0bf;
  --danger: #f18b8b;
  --radius: 12px;
  --space: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-width: 320px; background: radial-gradient(ellipse at 54% 24%, #0c1c2c 0%, #060d17 48%, #040911 100%); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(100%, 1920px); margin: 0 auto; padding: 0 20px 16px; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 32px; height: 32px; border: 1px solid rgba(98,213,231,.4); border-radius: 50%; position: relative; display: grid; place-items: center; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border: 1px solid rgba(98,213,231,.5); border-radius: 50%; transform: rotate(-28deg); }
.brand-mark::before { width: 21px; height: 9px; }
.brand-mark::after { width: 9px; height: 21px; }
.brand-mark span { position: absolute; width: 4px; height: 4px; background: var(--cyan-bright); border-radius: 50%; box-shadow: 0 0 10px var(--cyan); }
.eyebrow, .kicker, .section-index, .subheading, .stage-title, .bottom-key, .metric-top, .chart-unit, .validation-heading, .assumption-list > span { font-size: 9px; letter-spacing: .16em; font-weight: 750; color: var(--muted); }
.eyebrow { margin-bottom: 4px; }
h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.035em; }
.topbar-right { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.live-indicator { display: flex; align-items: center; gap: 8px; }
.live-dot, .stage-live, .telemetry-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(125,224,191,.7); display: inline-block; }
.topbar-divider { height: 20px; width: 1px; background: var(--line-strong); }
.seed-label strong { color: #c4d6df; font-weight: 650; margin-left: 6px; }
.intro-strip { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 2px 16px; }
.intro-copy { max-width: 620px; }
.kicker { color: var(--cyan); }
.intro-copy p { margin: 7px 0 0; color: #a7bac5; font-size: 12px; line-height: 1.55; max-width: 620px; }
.cause-chain { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.cause-chain > div { display: grid; grid-template-columns: 24px auto; grid-template-rows: auto auto; column-gap: 7px; }
.chain-index { grid-row: 1 / 3; align-self: center; font-size: 9px; color: var(--cyan); border: 1px solid rgba(98,213,231,.3); width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; }
.cause-chain strong { font-size: 10px; font-weight: 650; }
.cause-chain small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.cause-chain > i { width: 24px; height: 1px; background: linear-gradient(90deg, rgba(98,213,231,.5), rgba(98,213,231,.08)); }
.workspace { display: grid; grid-template-columns: minmax(260px, 292px) minmax(420px, 1fr) minmax(280px, 310px); gap: 12px; min-height: 650px; align-items: stretch; }
.panel { background: linear-gradient(160deg, rgba(13,26,40,.97), rgba(8,17,28,.98)); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; overflow: hidden; }
.control-panel, .telemetry-panel { padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 16px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.panel-heading h2 { font-size: 15px; letter-spacing: -.02em; margin: 5px 0 0; font-weight: 650; }
.panel-icon { color: var(--cyan); font-size: 25px; opacity: .65; }
.telemetry-live { color: var(--green); font-size: 9px; font-weight: 750; letter-spacing: .13em; display: flex; align-items: center; gap: 7px; }
.telemetry-live i { width: 5px; height: 5px; }
.preset-block { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0 13px; }
.subheading { display: flex; justify-content: space-between; font-size: 8px; }
.muted { color: var(--muted-2); }
.preset-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.preset-button { border: 1px solid var(--line); background: rgba(255,255,255,.018); color: #91a7b3; border-radius: 7px; min-height: 32px; font-size: 10px; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.preset-button:hover { border-color: rgba(98,213,231,.4); color: var(--text); }
.preset-button.active { border-color: rgba(98,213,231,.46); background: rgba(49,151,174,.13); color: #d8f8fc; }
.preset-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.quiet-dot { background: #7b9ea8; }.active-dot { background: var(--cyan); }.severe-dot { background: var(--amber); }
.preset-description { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; min-height: 27px; }
.control-list { display: flex; flex-direction: column; gap: 15px; }
.control-row { min-width: 0; }
.control-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.control-label label { color: #c1d0d8; font-size: 10px; font-weight: 560; }
.control-label output { color: var(--cyan-bright); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { appearance: none; width: 100%; height: 3px; border-radius: 3px; display: block; margin: 0; outline: none; background: linear-gradient(90deg, #4bc4d9 0%, #4bc4d9 var(--range-progress, 50%), rgba(117,148,166,.22) var(--range-progress, 50%), rgba(117,148,166,.22) 100%); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #b9f5fb; border: 2px solid #2e8da1; box-shadow: 0 0 0 3px rgba(69,190,207,.12); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #b9f5fb; border: 2px solid #2e8da1; box-shadow: 0 0 0 3px rgba(69,190,207,.12); }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(98,213,231,.2); }
.range-ends { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 8px; margin-top: 7px; }
.control-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.speed-control { margin-bottom: 14px; }
.transport-row { display: grid; grid-template-columns: 1fr 54px 42px; gap: 7px; }
.primary-button, .icon-button, .text-button, .screenshot-button { border: 1px solid var(--line-strong); background: rgba(255,255,255,.035); border-radius: 7px; min-height: 34px; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.primary-button:hover, .icon-button:hover, .text-button:hover, .screenshot-button:hover { border-color: rgba(98,213,231,.42); background: rgba(72,169,188,.1); }
.primary-button:active, .icon-button:active, .text-button:active, .screenshot-button:active { transform: translateY(1px); }
.primary-button { background: #164050; border-color: #286a7c; color: #e5fbff; font-size: 11px; font-weight: 650; display: flex; align-items: center; justify-content: center; gap: 9px; }
.play-glyph { font-size: 11px; color: var(--cyan-bright); }
.icon-button { font-size: 10px; color: #b8cad3; }
.secondary-transport { grid-template-columns: 1fr 1fr; margin-top: 7px; }
.text-button { min-height: 29px; font-size: 9px; color: var(--muted); }
.text-button strong { color: #cdeaf0; font-size: 9px; }
.stage-column { min-width: 0; display: flex; flex-direction: column; background: #060d17; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stage-toolbar { height: 40px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(11,23,35,.94); }
.stage-title { display: flex; align-items: center; gap: 8px; font-size: 8px; }
.stage-live { width: 5px; height: 5px; background: var(--cyan); box-shadow: 0 0 8px rgba(98,213,231,.8); }
.stage-divider { color: #344c5c; }
.stage-tools { display: flex; gap: 12px; }
.axis-key { color: var(--muted-2); font-size: 8px; letter-spacing: .08em; display: flex; align-items: center; gap: 4px; }
.axis-key i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }.axis-east { background: #e6bd7c; }.axis-north { background: #78d9b8; }.axis-alt { background: #76aef1; }
.scene-host { position: relative; flex: 1; min-height: 470px; overflow: hidden; background: radial-gradient(ellipse at 50% 48%, #102437 0%, #081522 47%, #040912 100%); }
.scene-host canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-annotations { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.scene-label { position: absolute; top: 0; left: 0; padding: 5px 7px; border: 1px solid rgba(98,213,231,.24); border-radius: 4px; background: rgba(3,13,22,.72); color: #b5eaf1; font-size: 8px; letter-spacing: .1em; font-weight: 750; white-space: nowrap; text-shadow: 0 1px 6px #000; will-change: transform, opacity; }
.scene-label::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); margin-right: 6px; vertical-align: 1px; }
.scene-label-blue { border-color: rgba(115,174,229,.26); color: #c4dcf7; }.scene-label-blue::before { background: var(--blue); }
.scene-label-amber { border-color: rgba(230,189,124,.3); color: #f2d7aa; }.scene-label-amber::before { background: var(--amber); }
.scene-corner { position: absolute; z-index: 2; pointer-events: none; display: flex; flex-direction: column; gap: 4px; }
.scene-corner span { color: rgba(152,185,201,.62); font-size: 7px; letter-spacing: .15em; font-weight: 700; }
.scene-corner strong { color: rgba(202,226,235,.76); font-size: 8px; letter-spacing: .09em; font-weight: 650; }
.scene-corner-tl { top: 14px; left: 14px; }.scene-corner-tr { top: 14px; right: 14px; text-align: right; }.scene-corner-bl { bottom: 14px; left: 14px; }.scene-corner-br { bottom: 14px; right: 14px; text-align: right; }
.webgl-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; background: rgba(3,9,16,.94); z-index: 10; }
.webgl-error[hidden] { display: none; }.error-symbol { border: 1px solid rgba(241,139,139,.45); color: var(--danger); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px; font-size: 20px; }.webgl-error strong { font-size: 14px; }.webgl-error p { max-width: 300px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.stage-bottomline { height: 45px; display: flex; align-items: center; gap: 18px; padding: 0 12px; border-top: 1px solid var(--line); background: #091522; }
.stage-bottomline > div { display: flex; align-items: center; gap: 7px; white-space: nowrap; }.bottom-key { color: var(--muted-2); font-size: 8px; }.stage-bottomline strong { color: #b9cbd4; font-size: 9px; font-weight: 650; letter-spacing: .05em; font-variant-numeric: tabular-nums; }.bottom-muted { color: var(--muted-2); font-size: 7px; letter-spacing: .08em; }
.screenshot-button { margin-left: auto; padding: 0 10px; min-height: 28px; font-size: 9px; color: #b5d5df; white-space: nowrap; }.screenshot-button span { color: var(--cyan); margin-right: 4px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metric-card { border: 1px solid var(--line); background: rgba(255,255,255,.018); border-radius: 8px; padding: 10px 9px; min-width: 0; }
.metric-primary { grid-column: 1 / -1; background: linear-gradient(120deg, rgba(29,88,104,.25), rgba(15,35,48,.34)); border-color: rgba(98,213,231,.22); }
.metric-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; font-size: 7px; letter-spacing: .12em; }
.metric-symbol { font-size: 10px; color: #82c9d7; letter-spacing: 0; }
.metric-value { display: flex; align-items: baseline; gap: 6px; margin-top: 9px; }
.metric-value strong { font-size: 24px; letter-spacing: -.055em; font-weight: 580; color: #e7f5f8; font-variant-numeric: tabular-nums; }
.metric-value > span:not(.metric-state) { color: #89a4b2; font-size: 9px; }
.metric-state { margin-left: auto; color: var(--green); font-size: 8px; letter-spacing: .12em; font-weight: 750; }
.metric-primary .metric-value strong { font-size: 31px; color: var(--cyan-bright); }
.metric-meter { height: 3px; background: rgba(133,177,199,.15); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.metric-meter span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #57d5e8, #e3bd80); border-radius: inherit; transition: width .25s; }
.metric-card small { display: block; margin-top: 7px; color: var(--muted-2); font-size: 8px; line-height: 1.35; }
.signal-chart-card { border: 1px solid var(--line); border-radius: 8px; padding: 11px 10px 8px; background: rgba(255,255,255,.014); }
.chart-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }.chart-heading > div { display: flex; flex-direction: column; gap: 5px; }.chart-heading strong { font-size: 10px; font-weight: 600; }.chart-unit { font-size: 7px; color: var(--muted-2); }
.signal-chart { width: 100%; height: 82px; display: block; margin-top: 8px; overflow: visible; }.chart-grid { fill: none; stroke: rgba(129,164,183,.12); stroke-width: 1; stroke-dasharray: 3 4; }.chart-fill { fill: url(#chartFill); }.chart-line { fill: none; stroke: #6cdeea; stroke-width: 1.65; stroke-linejoin: round; stroke-linecap: round; }.chart-baseline { stroke: rgba(130,171,190,.27); stroke-width: .8; stroke-dasharray: 2 3; }
.chart-foot { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 7px; letter-spacing: .08em; }
.validation-card { border: 1px solid var(--line); border-radius: 8px; padding: 11px 10px 10px; background: rgba(255,255,255,.014); }
.validation-heading { display: flex; justify-content: space-between; align-items: center; }.validation-badge { color: var(--green); border: 1px solid rgba(125,224,191,.25); border-radius: 4px; padding: 3px 5px; font-size: 7px; letter-spacing: .1em; }
.validation-card > strong { display: block; margin-top: 9px; font-size: 10px; font-weight: 600; }.validation-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }.validation-values > div { display: flex; flex-direction: column; gap: 4px; }.validation-values small { color: var(--muted-2); font-size: 7px; letter-spacing: .1em; }.validation-values b { color: #cce1e9; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.validation-difference { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 9px; padding-top: 8px; color: var(--muted); font-size: 8px; }.validation-difference strong { color: var(--green); font-size: 9px; font-variant-numeric: tabular-nums; }.validation-card p { margin: 7px 0 0; color: var(--muted-2); font-size: 8px; line-height: 1.45; }
.science-panel { border-top: 1px solid var(--line); padding-top: 12px; }.science-panel summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }.science-panel summary::-webkit-details-marker { display: none; }.science-panel summary .section-index { color: var(--cyan); }.summary-label { color: #c2d2da; font-size: 9px; font-weight: 600; }.chevron { margin-left: auto; color: var(--muted); transition: transform .2s; }.science-panel[open] .chevron { transform: rotate(180deg); }
.science-content { padding-top: 11px; }.equation { color: #c8eff4; font-family: Georgia, serif; font-size: 13px; letter-spacing: .01em; padding: 8px 9px; border-left: 2px solid rgba(98,213,231,.55); background: rgba(51,135,153,.08); border-radius: 0 5px 5px 0; }.equation sub { font-size: 9px; }.science-content p { color: var(--muted); font-size: 9px; line-height: 1.5; margin: 7px 0 11px; }.assumption-list { border-top: 1px solid var(--line); padding-top: 10px; }.assumption-list > span { font-size: 7px; }.assumption-list ul { padding-left: 15px; margin: 7px 0 10px; color: var(--muted); font-size: 8px; line-height: 1.55; }.classification-note { padding: 8px; border-radius: 5px; background: rgba(230,189,124,.07); color: #aebdc5; font-size: 8px; line-height: 1.45; }.classification-note span { color: var(--amber); font-weight: 750; font-size: 7px; letter-spacing: .1em; margin-right: 5px; }
.footer-note { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 3px 0; color: var(--muted-2); font-size: 8px; letter-spacing: .03em; }.footer-note span:last-child { letter-spacing: .12em; font-size: 7px; }
button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
body.embed .app-shell { padding: 0; }.embed .topbar, .embed .intro-strip, .embed .footer-note { display: none; }.embed .workspace { min-height: 100vh; height: 100vh; gap: 8px; }.embed .panel { border-radius: 0; }.embed .stage-column { border-radius: 0; }
@media (min-width: 1500px) { .workspace { grid-template-columns: 310px minmax(500px,1fr) 330px; min-height: 760px; }.scene-host { min-height: 580px; }.control-panel,.telemetry-panel { padding: 20px 18px 16px; gap: 18px; }.control-list { gap: 18px; } }
@media (max-width: 1120px) { .app-shell { padding-left: 12px; padding-right: 12px; }.workspace { grid-template-columns: minmax(250px, 285px) minmax(0,1fr); }.telemetry-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }.telemetry-panel .panel-heading { grid-column: 1 / -1; }.metric-grid { grid-column: 1; }.signal-chart-card { grid-column: 2; grid-row: 2; }.validation-card { grid-column: 1; }.science-panel { grid-column: 2; grid-row: 3; }.scene-host { min-height: 510px; } }
@media (max-width: 720px) {
  .app-shell { padding: 0 8px 12px; }
  .topbar { height: 64px; }.brand-mark { width: 28px; height: 28px; }.eyebrow { font-size: 7px; }.brand-lockup { gap: 10px; } h1 { font-size: 16px; }.topbar-right { gap: 8px; font-size: 8px; }.seed-label { display: none; }.topbar-divider { display: none; }
  .intro-strip { min-height: 0; padding: 12px 2px; }.intro-copy p { font-size: 10px; margin-top: 5px; }.cause-chain { display: none; }
  .workspace { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
  .stage-column { order: 0; }.scene-host { min-height: 390px; height: 50vh; max-height: 510px; }.stage-toolbar { height: 36px; padding: 0 9px; }.stage-title { font-size: 7px; gap: 6px; }.stage-tools { gap: 7px; }.axis-key { font-size: 7px; }.stage-bottomline { height: 40px; gap: 9px; padding: 0 8px; }.stage-bottomline > div { gap: 4px; }.stage-bottomline strong { font-size: 7px; }.bottom-key { font-size: 7px; }.bottom-muted { display: none; }.screenshot-button { padding: 0 7px; font-size: 8px; }
  .control-panel { order: 1; padding: 14px 12px 12px; gap: 12px; }.telemetry-panel { order: 2; display: flex; padding: 14px 12px 12px; gap: 12px; }.control-list { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px; }.control-label { align-items: flex-start; flex-direction: column; gap: 3px; margin-bottom: 7px; }.control-label label { font-size: 9px; }.control-label output { font-size: 9px; }.range-ends { font-size: 7px; }.preset-description { font-size: 9px; }.transport-row { grid-template-columns: 1fr 58px 42px; }.secondary-transport { grid-template-columns: 1fr 1fr; }
  .metric-grid { width: 100%; }.signal-chart-card, .validation-card, .science-panel { width: 100%; }.metric-value strong { font-size: 21px; }.metric-primary .metric-value strong { font-size: 29px; }.footer-note { flex-direction: column; align-items: flex-start; gap: 5px; font-size: 7px; padding: 10px 2px 0; }.footer-note span:last-child { font-size: 6px; }
  .scene-corner { transform: scale(.85); transform-origin: top left; }.scene-corner-tr,.scene-corner-br { transform-origin: top right; }.scene-corner-bl { transform-origin: bottom left; }.scene-corner-br { transform-origin: bottom right; }
  .embed .workspace { display: flex; flex-direction: column; height: 100vh; }.embed .scene-host { min-height: 0; height: 100%; max-height: none; }.embed .control-panel,.embed .telemetry-panel { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
@media (min-width: 1121px) {
  .workspace { height: calc(100vh - 208px); min-height: 500px; }
  .workspace > * { min-height: 0; }
  .panel { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(98,213,231,.25) transparent; }
  .scene-host { min-height: 0; }
}
@media (max-width: 720px) {
  .embed .stage-column { flex: 1; min-height: 0; }
  .embed .scene-host { flex: 1; height: auto; min-height: 0; max-height: none; }
}
