:root {
  color-scheme: dark;
  --bg: #0b1018;
  --panel: #111a25;
  --panel-2: #0e1721;
  --line: #263442;
  --line-soft: rgba(128, 157, 177, .14);
  --text: #edf5f8;
  --muted: #91a4b2;
  --faint: #607482;
  --accent: #54e0d0;
  --accent-dim: rgba(84, 224, 208, .16);
  --accent-glow: rgba(84, 224, 208, .28);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(ellipse at 18% -10%, rgba(38, 88, 98, .16), transparent 44%), var(--bg); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(1600px, 100%); margin: 0 auto; padding: 0 28px 18px; }
.topbar { min-height: 82px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line-soft); }
.brand-mark { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid rgba(84,224,208,.32); border-radius: 10px; background: rgba(84,224,208,.06); transform: rotate(-12deg); }
.brand-mark span { width: 3px; border-radius: 4px; background: var(--accent); display: block; }
.brand-mark span:nth-child(1) { height: 10px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 18px; }
.brand-mark span:nth-child(3) { height: 13px; opacity: .72; }
.brand-copy { min-width: 0; }
.brand-kicker, .eyebrow, .section-label { color: #8ea4b1; font-size: 9px; line-height: 1.4; letter-spacing: .16em; font-weight: 750; }
.brand-kicker span { color: var(--accent); padding: 0 4px; }
.brand-copy h1 { margin: 2px 0 0; font-size: 21px; letter-spacing: -.035em; line-height: 1.1; font-weight: 720; }
.top-meta { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.model-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(84,224,208,.23); border-radius: 99px; padding: 7px 10px; color: #b8e8e3; font-size: 9px; font-weight: 750; letter-spacing: .1em; background: rgba(84,224,208,.055); }
.model-pill i, .run-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.edition { color: var(--faint); font-size: 9px; letter-spacing: .12em; font-weight: 700; }
.edition b { color: #a5bac4; margin-left: 5px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(330px, .92fr); gap: 18px; padding-top: 18px; align-items: start; }
.visual-column { display: grid; gap: 18px; min-width: 0; }
.panel { background: linear-gradient(145deg, rgba(19, 30, 42, .98), rgba(14, 22, 32, .98)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0,0,0,.13), inset 0 1px 0 rgba(255,255,255,.025); min-width: 0; }
.stage-panel { padding: 18px 20px 14px; }
.panel-heading, .graph-heading, .control-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); display: inline-block; }
.panel-heading h2, .graph-heading h2, .control-heading h2 { margin: 6px 0 0; font-size: 18px; letter-spacing: -.035em; line-height: 1.2; font-weight: 680; }
.panel-subtitle { color: var(--muted); font-size: 11px; margin: 5px 0 0; line-height: 1.45; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.screenshot-button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #344653; background: rgba(9,17,25,.6); color: #b8cbd2; border-radius: 99px; padding: 6px 9px; font-size: 8px; font-weight: 700; cursor: pointer; transition: border-color .18s ease, color .18s ease, transform .18s ease; }
.screenshot-button span { color: var(--accent); font-size: 13px; line-height: 1; }
.screenshot-button:hover { border-color: rgba(84,224,208,.55); color: #e6f5f3; transform: translateY(-1px); }
.run-state { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; margin-top: 3px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 99px; color: #9eb1bc; font-size: 8px; letter-spacing: .13em; font-weight: 800; }
.run-state.paused .run-dot { background: #6c8190; box-shadow: none; }
.stage-frame { height: 350px; width: 100%; margin-top: 12px; position: relative; overflow: hidden; border: 1px solid rgba(120,153,174,.12); border-radius: 12px; background: radial-gradient(ellipse at 30% 45%, rgba(29,78,85,.12), transparent 50%), #0b131d; }
canvas { display: block; width: 100%; height: 100%; }
.stage-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 10px 2px 8px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: #9aadb9; font-size: 9px; }
.legend-swatch { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.orbit-swatch { background: rgba(84,224,208,.65); }
.current-swatch { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.legend-note { margin-left: auto; color: #657c89; font-size: 8px; letter-spacing: .11em; font-weight: 700; }
.caption-strip { display: flex; gap: 10px; align-items: flex-start; border-top: 1px solid var(--line-soft); padding: 10px 2px 1px; }
.caption-icon { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: 0 0 auto; color: var(--accent); background: rgba(84,224,208,.09); font-size: 13px; }
.caption-strip p { color: #b1c1c9; margin: 1px 0 0; font-size: 10px; line-height: 1.55; }
.graph-panel { padding: 17px 20px 12px; }
.graph-heading { align-items: center; }
.graph-heading h2 { font-size: 16px; }
.graph-key { color: #8ea3af; font-size: 9px; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.graph-key-line { display: inline-block; width: 16px; height: 2px; background: var(--accent); border-radius: 2px; box-shadow: 0 0 8px var(--accent-glow); }
.graph-frame { height: 188px; margin-top: 8px; }
.graph-foot { display: flex; justify-content: space-between; gap: 10px; color: #718693; font-size: 9px; letter-spacing: .05em; }
.graph-foot small { color: #536b79; font-size: 8px; }
.graph-foot span:last-child { text-align: right; letter-spacing: 0; }
.control-column { min-width: 0; }
.control-panel { padding: 18px 18px 14px; }
.control-heading { align-items: center; }
.control-heading h2 { font-size: 18px; }
.parameter-tag { color: #b3d8d3; background: rgba(84,224,208,.08); border: 1px solid rgba(84,224,208,.2); padding: 5px 8px; border-radius: 5px; font-size: 8px; letter-spacing: .11em; font-weight: 800; }
.preset-block { margin-top: 18px; }
.section-label { display: flex; align-items: center; justify-content: space-between; font-size: 8px; color: #8096a4; letter-spacing: .14em; }
.preset-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.preset-button { display: flex; gap: 9px; align-items: center; text-align: left; min-width: 0; border: 1px solid #2a3b49; border-radius: 10px; padding: 9px 10px; background: rgba(8,15,23,.4); cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.preset-button:hover { border-color: rgba(84,224,208,.55); transform: translateY(-1px); }
.preset-button.active { border-color: rgba(84,224,208,.6); background: rgba(84,224,208,.08); }
.preset-symbol { flex: 0 0 auto; width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; color: var(--accent); background: rgba(84,224,208,.1); font-size: 16px; font-weight: 650; }
.drift-symbol { font-size: 18px; }
.preset-button b { display: block; color: #dce8ec; font-size: 10px; font-weight: 700; }
.preset-button small { display: block; color: #7f939f; font-size: 8px; margin-top: 3px; white-space: nowrap; }
.sliders-block { margin-top: 18px; }
.control-row { margin-top: 12px; }
.control-label-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.control-label-line label { color: #c4d1d7; font-size: 10px; font-weight: 600; }
.control-label-line label em { color: var(--accent); font-style: italic; margin-left: 3px; }
.control-label-line output { color: #e3f7f4; font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 700; }
.control-label-line output small { color: #8299a4; font-size: 8px; font-weight: 500; }
input[type="range"] { width: 100%; height: 14px; margin: 7px 0 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; accent-color: var(--accent); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) 0%, rgba(84,224,208,.32) 100%); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: rgba(84,224,208,.3); }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5px; border-radius: 50%; background: #d9fffa; border: 3px solid var(--accent); box-shadow: 0 0 0 4px rgba(84,224,208,.12); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #d9fffa; border: 3px solid var(--accent); box-shadow: 0 0 0 4px rgba(84,224,208,.12); }
input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 6px; }
.range-ends { display: flex; justify-content: space-between; color: #657c89; font-size: 8px; font-variant-numeric: tabular-nums; margin-top: -1px; }
.transport-block { border-top: 1px solid var(--line-soft); margin-top: 16px; padding-top: 13px; }
.transport-buttons { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 7px; }
.transport-buttons button { border-radius: 8px; min-height: 34px; font-size: 10px; font-weight: 700; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.transport-buttons button:hover { transform: translateY(-1px); }
.transport-primary { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--accent); background: var(--accent); color: #06211f; }
.play-icon { font-size: 13px; line-height: 1; }
.transport-secondary { border: 1px solid #344653; background: rgba(9,17,25,.6); color: #c4d2d8; }
.transport-secondary span { color: var(--accent); font-size: 14px; vertical-align: -1px; margin-right: 3px; }
.quality-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.segmented { display: flex; padding: 2px; border: 1px solid #2b3b48; background: #0a121b; border-radius: 7px; gap: 2px; }
.segmented button { border: 0; background: transparent; color: #7e929e; font-size: 8px; padding: 5px 10px; border-radius: 5px; cursor: pointer; }
.segmented button.selected { background: #263d46; color: #dff9f5; }
.readout-block { border-top: 1px solid var(--line-soft); margin-top: 15px; padding-top: 13px; }
.computed-note { color: #587b7b; font-size: 7px; letter-spacing: .08em; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.readout-card { min-height: 66px; border: 1px solid rgba(112,145,165,.16); border-radius: 9px; padding: 8px 9px 7px; background: rgba(7,14,22,.38); }
.primary-readout { border-color: rgba(84,224,208,.27); background: linear-gradient(135deg, rgba(84,224,208,.085), rgba(7,14,22,.36)); }
.readout-name { display: block; color: #90a4af; font-size: 8px; }
.readout-name i { color: var(--accent); font-style: italic; }
.readout-card strong { display: inline-block; margin-top: 4px; color: #edf8f7; font-size: 17px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.readout-card small { display: block; color: #627985; font-size: 7px; margin-top: 3px; }
.measurement-foot { color: #708692; font-size: 8px; margin-top: 7px; line-height: 1.4; }
.check-block { margin-top: 12px; border: 1px solid rgba(84,224,208,.18); border-radius: 9px; padding: 9px 10px 8px; background: rgba(84,224,208,.045); }
.check-topline { display: flex; align-items: center; gap: 6px; color: #a9dcd6; font-size: 7px; letter-spacing: .11em; font-weight: 800; }
.check-mark { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; color: #08211e; background: var(--accent); font-size: 9px; }
.check-badge { margin-left: auto; color: #668d8a; font-size: 6px; }
.check-copy { color: #91a7b0; font-size: 8px; line-height: 1.5; margin-top: 7px; }
.check-copy b { color: #d8e9e8; font-weight: 650; }
.check-values { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(84,224,208,.11); color: #718c94; font-size: 7px; }
.check-values b { color: #d9f4ef; font-variant-numeric: tabular-nums; font-size: 8px; margin-left: 3px; }
.science-panel { border-top: 1px solid var(--line-soft); margin-top: 13px; padding-top: 10px; }
.science-panel summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: #c5d4da; font-size: 10px; font-weight: 700; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--accent); background: rgba(84,224,208,.09); font-size: 12px; }
.summary-hint { margin-left: auto; color: #647b88; font-size: 7px; letter-spacing: .1em; font-weight: 700; }
.science-content { padding: 10px 1px 0; color: #91a5b0; font-size: 9px; line-height: 1.6; }
.science-content p { margin: 7px 0; }
.science-content b { color: #d2e0e4; }
.equation-label { color: #78929e; font-size: 7px; letter-spacing: .12em; font-weight: 800; }
.equation { color: #e1f5f2; text-align: center; font-family: Georgia, "Times New Roman", serif; font-size: 15px; padding: 8px 4px; border-radius: 7px; background: rgba(5,12,19,.4); white-space: nowrap; }
.fraction { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.05; font-size: .78em; }
.fraction span:first-child { border-bottom: 1px solid #9ab5b8; padding: 0 3px 2px; }
.fraction span:last-child { padding-top: 2px; }
.small-equation { font-size: 12px; }
.model-disclaimer { color: #6f8791; font-style: italic; font-size: 8px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.page-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #5f7582; font-size: 7px; letter-spacing: .11em; padding: 13px 3px 0; }
.page-footer i { color: var(--accent); font-style: normal; padding: 0 4px; }
.keyboard-hints { display: flex; align-items: center; gap: 6px; letter-spacing: 0; text-transform: none; white-space: nowrap; }
kbd { border: 1px solid #344653; background: #111c27; border-radius: 4px; padding: 2px 5px; color: #a6b8c0; font-size: 7px; font-family: inherit; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode .app-shell { height: 100%; min-height: 0; overflow: auto; overscroll-behavior: contain; }
@media (min-width: 761px) {
  body.embed-mode .topbar { min-height: 62px; }
  body.embed-mode .layout { padding-top: 9px; gap: 10px; }
  body.embed-mode .visual-column { gap: 10px; }
  body.embed-mode .stage-panel { padding: 12px 14px 9px; }
  body.embed-mode .stage-frame { height: 258px; margin-top: 8px; }
  body.embed-mode .stage-legend { padding: 7px 2px 5px; gap: 12px; }
  body.embed-mode .caption-strip { padding-top: 7px; }
  body.embed-mode .graph-panel { padding: 11px 14px 8px; }
  body.embed-mode .graph-frame { height: 132px; margin-top: 5px; }
  body.embed-mode .page-footer { display: none; }
  body.embed-mode .control-panel { max-height: calc(100dvh - 78px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #344b57 transparent; }
}
@media (max-width: 980px) {
  .app-shell { padding-left: 18px; padding-right: 18px; }
  .layout { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr); gap: 12px; }
  .stage-panel, .graph-panel { padding-left: 15px; padding-right: 15px; }
  .control-panel { padding-left: 14px; padding-right: 14px; }
  .stage-frame { height: 320px; }
}
@media (max-width: 760px) {
  .app-shell { padding: 0 12px 16px; }
  .topbar { min-height: 68px; gap: 10px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-kicker { font-size: 7px; letter-spacing: .12em; }
  .brand-copy h1 { font-size: 18px; }
  .top-meta { gap: 0; }
  .edition { display: none; }
  .model-pill { font-size: 7px; padding: 6px 8px; }
  .layout { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
  .visual-column, .control-column { width: 100%; }
  .visual-column { gap: 12px; }
  .stage-panel { padding: 14px 12px 11px; }
  .panel-heading h2 { font-size: 16px; }
  .panel-subtitle { font-size: 9px; }
  .run-state { font-size: 7px; padding: 5px 7px; }
  .screenshot-button { font-size: 7px; padding: 5px 7px; }
  .stage-frame { height: 292px; margin-top: 10px; }
  .stage-legend { gap: 10px; padding: 8px 1px 7px; }
  .legend-item { font-size: 8px; }
  .legend-note { width: 100%; margin-left: 0; font-size: 7px; }
  .caption-strip p { font-size: 9px; }
  .graph-panel { padding: 13px 12px 10px; }
  .graph-heading h2 { font-size: 15px; }
  .graph-frame { height: 174px; }
  .graph-foot { font-size: 8px; }
  .control-panel { padding: 15px 13px 13px; }
  .control-heading h2 { font-size: 17px; }
  .preset-button { padding: 9px 8px; }
  .page-footer { flex-direction: column; align-items: flex-start; font-size: 6px; padding: 12px 2px 0; }
  .keyboard-hints { font-size: 8px; }
  body.embed-mode .app-shell { overflow-y: auto; }
}
@media (max-width: 390px) {
  .stage-frame { height: 270px; }
  .panel-heading h2 { font-size: 15px; }
  .run-state { margin-top: 0; }
  .preset-button { gap: 6px; }
  .preset-symbol { width: 25px; height: 27px; }
  .preset-button b { font-size: 9px; }
  .preset-button small { font-size: 7px; }
  .readout-card strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
