:root {
  color-scheme: dark;
  --bg: #080d16;
  --surface: #0c1421;
  --surface-2: #101b2b;
  --surface-3: #132033;
  --line: rgba(164, 190, 213, .13);
  --line-strong: rgba(164, 190, 213, .22);
  --text: #e9f0f7;
  --muted: #8192a6;
  --faint: #526277;
  --accent: #72e1d0;
  --accent-dim: rgba(114, 225, 208, .14);
  --accent-line: rgba(114, 225, 208, .36);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.topbar { height: 68px; min-height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(9, 15, 25, .96); position: relative; z-index: 2; }
.brand-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { width: 30px; height: 30px; border: 1px solid var(--accent-line); border-radius: 50%; position: relative; flex: 0 0 auto; box-shadow: 0 0 22px rgba(114,225,208,.09), inset 0 0 12px rgba(114,225,208,.06); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border: 1px solid rgba(114,225,208,.55); border-radius: 50%; inset: 5px -3px; transform: rotate(32deg); }
.brand-mark::after { inset: -3px 5px; transform: rotate(-32deg); }
.brand-mark span { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); left: 12px; top: 12px; box-shadow: 0 0 9px var(--accent); }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { display: none; }
.brand-copy { min-width: 0; }
.eyebrow, .section-kicker, .stage-kicker { color: var(--muted); font-size: 9px; letter-spacing: .17em; font-weight: 700; }
.eyebrow { margin-bottom: 3px; }
.eyebrow-dot, .footer-dot { display: inline-block; width: 3px; height: 3px; background: var(--accent); border-radius: 50%; margin: 0 7px 2px; }
h1 { font-size: 16px; line-height: 1.2; letter-spacing: -.025em; margin: 0; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-divider { color: var(--faint); margin: 0 5px; font-weight: 400; }
.title-sub { color: #9aabba; font-weight: 450; }
.topbar-right { display: flex; align-items: center; gap: 20px; flex: 0 0 auto; }
.model-badge { border: 1px solid var(--accent-line); background: rgba(114,225,208,.055); color: #bcece4; padding: 7px 10px; border-radius: 999px; font-size: 9px; font-weight: 750; letter-spacing: .1em; white-space: nowrap; }
.live-dot, .phase-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px rgba(114,225,208,.65); margin-right: 6px; vertical-align: 1px; }
.topbar-meta { font-size: 9px; letter-spacing: .14em; color: var(--faint); font-weight: 700; }
.workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 0; overflow: hidden; }
.stage-panel { min-width: 0; min-height: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(ellipse at 38% 44%, rgba(29,55,75,.20), transparent 48%), #080e18; border-right: 1px solid var(--line); }
.stage-panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22; background-image: linear-gradient(rgba(122,151,176,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(122,151,176,.045) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(130deg, black, transparent 78%); }
.stage-topline, .stage-bottomline { position: absolute; z-index: 1; left: 24px; right: 24px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.stage-topline { top: 20px; }
.stage-kicker { display: flex; align-items: center; gap: 8px; }
.kicker-line { width: 19px; height: 1px; background: var(--accent); opacity: .8; }
.stage-readout { color: #8fa1b5; font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
#scene { display: block; width: 100%; height: 100%; min-height: 0; flex: 1; position: relative; z-index: 0; }
.stage-bottomline { bottom: 24px; align-items: flex-start; flex-direction: column; gap: 8px; max-width: 540px; }
.phase-indicator { font-size: 9px; color: #b9d5d2; letter-spacing: .14em; font-weight: 800; }
.stage-bottomline p { margin: 0; color: #9aaabd; font-size: 12px; line-height: 1.55; max-width: 480px; }
.stage-controls-hint { position: absolute; right: 24px; bottom: 27px; font-size: 9px; color: #66788c; letter-spacing: .035em; }
.keycap { border: 1px solid rgba(160,181,201,.2); background: rgba(16,27,42,.7); padding: 3px 5px; border-radius: 4px; color: #9aabba; font: 700 8px ui-monospace, monospace; }
.hint-sep { padding: 0 5px; color: #415266; }
.instrument-panel { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #26364a transparent; background: linear-gradient(180deg, #0d1624, #0b1320); display: flex; flex-direction: column; }
.instrument-section { padding: 20px 20px 17px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.section-kicker { font-size: 8px; letter-spacing: .16em; margin-bottom: 5px; }
h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; font-weight: 620; }
.phase-pill { font-size: 8px; font-weight: 800; letter-spacing: .1em; color: #a8e8df; border: 1px solid var(--accent-line); background: rgba(114,225,208,.07); padding: 6px 8px; border-radius: 5px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metric-card { background: rgba(17,29,45,.82); border: 1px solid rgba(156,181,206,.1); border-radius: 9px; padding: 11px 11px 10px; min-width: 0; min-height: 81px; }
.metric-label { color: #8194a9; font-size: 8px; font-weight: 750; letter-spacing: .095em; white-space: nowrap; }
.metric-label span { color: #5d7186; font-size: 7px; margin-left: 3px; letter-spacing: .04em; }
.metric-value { margin-top: 8px; color: #e7f4f2; font: 600 19px/1.05 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.06em; white-space: nowrap; }
.metric-value small { font: 500 9px/1 system-ui, sans-serif; letter-spacing: 0; color: #8fa4b7; margin-left: 2px; }
.metric-foot { margin-top: 5px; color: #65788e; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-strip { margin-top: 9px; border: 1px solid rgba(114,225,208,.15); background: rgba(114,225,208,.045); border-radius: 8px; display: flex; align-items: center; gap: 9px; padding: 9px 10px; }
.check-icon { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: rgba(114,225,208,.14); color: var(--accent); font-size: 10px; font-weight: 800; flex: 0 0 auto; }
.check-copy { min-width: 0; flex: 1; }
.check-title { color: #9bcac4; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.check-detail { color: #71869b; font-size: 8px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-error { color: #c4eee8; font: 600 10px ui-monospace, monospace; white-space: nowrap; }
.controls-section { padding-top: 18px; }
.controls-heading { margin-bottom: 12px; }
.text-button { background: transparent; border: 1px solid rgba(150,174,197,.17); color: #91a5b9; border-radius: 5px; padding: 6px 8px; font-size: 8px; letter-spacing: .09em; font-weight: 800; cursor: pointer; }
.text-button:hover, .step-button:hover, .screenshot-button:hover { border-color: var(--accent-line); color: #c8f4ed; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.preset-button { border: 1px solid rgba(150,174,197,.16); background: rgba(17,29,45,.65); color: #8397ac; border-radius: 6px; padding: 8px 6px; font-size: 9px; font-weight: 650; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.preset-button.active { color: #c8f3ed; border-color: rgba(114,225,208,.35); background: rgba(114,225,208,.085); }
.control-list { display: flex; flex-direction: column; gap: 12px; }
.control-row { min-width: 0; }
.control-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.control-top label { color: #c0ccd8; font-size: 10px; font-weight: 550; }
.unit { color: #71869a; font-size: 8px; font-weight: 450; margin-left: 3px; }
.control-top output { color: #b5e8e1; font: 600 10px ui-monospace, monospace; }
input[type="range"] { width: 100%; height: 14px; margin: 0; appearance: none; background: transparent; cursor: pointer; display: block; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 99px; background: linear-gradient(90deg, rgba(114,225,208,.8), rgba(114,225,208,.24)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 99px; background: linear-gradient(90deg, rgba(114,225,208,.8), rgba(114,225,208,.24)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border: 2px solid #c9f7ef; background: #163b3a; border-radius: 50%; box-shadow: 0 0 0 3px rgba(114,225,208,.1), 0 0 12px rgba(114,225,208,.18); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #c9f7ef; background: #163b3a; border-radius: 50%; box-shadow: 0 0 0 3px rgba(114,225,208,.1); }
.range-ends { display: flex; justify-content: space-between; color: #53677d; font: 8px ui-monospace, monospace; margin-top: 1px; }
.playback-row { display: flex; align-items: center; gap: 7px; margin-top: 17px; }
.play-button, .step-button { height: 34px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 9px; letter-spacing: .08em; font-weight: 800; }
.play-button { flex: 1; border: 1px solid rgba(114,225,208,.32); background: rgba(114,225,208,.13); color: #c9f5ee; }
.play-icon { font-size: 13px; line-height: 1; }
.step-button { flex: 1.2; border: 1px solid rgba(150,174,197,.17); background: rgba(17,29,45,.75); color: #a8bacb; }
.step-button span { color: var(--accent); font-size: 15px; line-height: 10px; }
.quality-toggle { display: flex; border: 1px solid rgba(150,174,197,.16); border-radius: 6px; padding: 2px; background: rgba(8,14,23,.7); gap: 2px; }
.quality-button { width: 24px; height: 25px; border: 0; border-radius: 4px; background: transparent; color: #6c8094; font: 800 9px ui-monospace, monospace; cursor: pointer; }
.quality-button.active { background: rgba(114,225,208,.14); color: #c3f0e9; }
.utility-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.switch-label { display: flex; align-items: center; gap: 7px; color: #8da0b4; font-size: 9px; cursor: pointer; }
.switch { width: 27px; height: 15px; position: relative; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: absolute; inset: 0; background: #253448; border-radius: 99px; transition: background .18s ease; }
.switch-track::after { content: ""; position: absolute; width: 9px; height: 9px; left: 3px; top: 3px; background: #a1b0be; border-radius: 50%; transition: transform .18s ease, background .18s ease; }
.switch input:checked + .switch-track { background: rgba(114,225,208,.4); }
.switch input:checked + .switch-track::after { transform: translateX(12px); background: #d3fff7; }
.screenshot-button { border: 1px solid rgba(150,174,197,.17); background: rgba(17,29,45,.55); color: #8fa4b7; border-radius: 5px; padding: 6px 8px; font-size: 8px; letter-spacing: .08em; font-weight: 800; cursor: pointer; }
.screenshot-button span { font-size: 12px; margin-right: 4px; }
.science-panel { margin: 0 20px 14px; border: 1px solid rgba(150,174,197,.15); border-radius: 8px; background: rgba(16,27,42,.58); }
.science-panel summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 12px 12px; color: #c4d0db; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 15px; font-weight: 400; }
.science-panel[open] summary::after { content: "−"; }
.science-symbol { width: 19px; height: 19px; display: grid; place-items: center; color: var(--accent); background: var(--accent-dim); border-radius: 5px; font-size: 13px; }
.summary-meta { color: #62778c; font-size: 7px; margin-left: auto; letter-spacing: .12em; }
.science-panel summary::after { margin-left: 0; }
.science-content { border-top: 1px solid var(--line); padding: 13px 13px 14px; color: #91a3b6; font-size: 10px; line-height: 1.55; }
.science-content h3 { margin: 11px 0 5px; color: #d4e0e9; font-size: 11px; font-weight: 650; }
.science-content h3:first-child { margin-top: 0; }
.science-content p { margin: 5px 0 9px; }
.equation-block { background: rgba(5,11,19,.55); border: 1px solid rgba(150,174,197,.1); border-radius: 6px; padding: 8px 9px; margin: 7px 0; }
.equation-label { color: #6f899d; font-size: 7px; font-weight: 800; letter-spacing: .12em; margin-bottom: 5px; }
.equation-block code { display: block; color: #b8e9e2; font: 10px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: normal; }
.equation-note { font-size: 9px; color: #73889d; margin: 4px 0 0 !important; }
.science-content ul { padding-left: 16px; margin: 5px 0 10px; }
.science-content li { margin: 4px 0; }
.science-content b { color: #c4d3df; }
.disclaimer { border-top: 1px solid var(--line); padding-top: 9px; color: #71869a; font-size: 9px; }
.panel-footer { margin-top: auto; padding: 12px 20px 14px; color: #586c80; font-size: 7px; font-weight: 800; letter-spacing: .13em; border-top: 1px solid var(--line); }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:active { transform: translateY(1px); }
@media (max-width: 900px) and (min-width: 621px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 350px; }
  .instrument-section { padding-left: 16px; padding-right: 16px; }
  .science-panel { margin-left: 16px; margin-right: 16px; }
  .panel-footer { padding-left: 16px; }
  .metric-value { font-size: 17px; }
  .stage-bottomline { max-width: 410px; }
  .stage-controls-hint { display: none; }
}
@media (max-width: 620px) {
  html, body { overflow: hidden; }
  .topbar { height: 58px; min-height: 58px; padding: 0 14px; }
  .brand-lockup { gap: 10px; }
  .brand-mark { width: 25px; height: 25px; }
  .brand-mark span { left: 10px; top: 10px; }
  .eyebrow { font-size: 7px; letter-spacing: .12em; }
  h1 { font-size: 13px; }
  .title-sub { display: none; }
  .title-divider { display: none; }
  .topbar-right { gap: 0; }
  .model-badge { font-size: 7px; padding: 6px 7px; }
  .topbar-meta { display: none; }
  .workspace { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(250px, 42%) minmax(0, 1fr); overflow: hidden; }
  .stage-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .stage-topline { top: 12px; left: 14px; right: 14px; }
  .stage-kicker { font-size: 7px; }
  .stage-readout { font-size: 8px; }
  .stage-bottomline { left: 14px; right: 14px; bottom: 10px; gap: 4px; max-width: 100%; }
  .phase-indicator { font-size: 7px; }
  .stage-bottomline p { font-size: 9px; line-height: 1.35; max-width: 100%; }
  .stage-controls-hint { display: none; }
  .instrument-panel { overflow-y: auto; min-height: 0; }
  .instrument-section { padding: 13px 14px 12px; }
  .section-heading { margin-bottom: 10px; }
  .section-kicker { font-size: 7px; margin-bottom: 3px; }
  h2 { font-size: 14px; }
  .phase-pill { padding: 5px 7px; font-size: 7px; }
  .metric-grid { gap: 6px; }
  .metric-card { min-height: 66px; padding: 8px 9px 7px; }
  .metric-label { font-size: 7px; }
  .metric-label span { font-size: 6px; }
  .metric-value { font-size: 16px; margin-top: 6px; }
  .metric-value small { font-size: 8px; }
  .metric-foot { font-size: 7px; margin-top: 4px; }
  .check-strip { margin-top: 7px; padding: 7px 8px; }
  .check-title { font-size: 7px; }
  .check-detail { font-size: 7px; }
  .check-error { font-size: 9px; }
  .controls-section { padding-top: 12px; }
  .controls-heading { margin-bottom: 9px; }
  .preset-row { margin-bottom: 10px; }
  .preset-button { padding: 7px 4px; font-size: 8px; }
  .control-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 9px; }
  .control-top { margin-bottom: 3px; }
  .control-top label { font-size: 8px; }
  .unit { font-size: 7px; }
  .control-top output { font-size: 9px; }
  .range-ends { font-size: 7px; }
  .speed-control { grid-column: 1 / -1; }
  .playback-row { margin-top: 11px; gap: 6px; }
  .play-button, .step-button { height: 31px; font-size: 8px; }
  .quality-button { width: 21px; height: 22px; }
  .utility-row { margin-top: 9px; }
  .science-panel { margin: 0 14px 10px; }
  .science-panel summary { padding: 10px; font-size: 8px; }
  .panel-footer { padding: 9px 14px 10px; font-size: 6px; }
}
@media (max-width: 360px) {
  .metric-value { font-size: 14px; }
  .metric-label { font-size: 6px; }
  .control-list { column-gap: 8px; }
  .control-top label { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
