:root {
  color-scheme: dark;
  --bg: #080d14;
  --panel: #101923;
  --panel-2: #0d151e;
  --line: rgba(169, 194, 210, .13);
  --line-strong: rgba(169, 194, 210, .23);
  --text: #e7f0f4;
  --muted: #91a4b0;
  --quiet: #607582;
  --accent: #63e2d0;
  --accent-dim: rgba(99, 226, 208, .14);
  --accent-glow: rgba(99, 226, 208, .24);
  --amber: #e7bd7b;
  --radius: 14px;
  --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; width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
body { height: 100vh; height: 100dvh; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell {
  width: min(100%, 1660px);
  height: 100%;
  margin: 0 auto;
  padding: 14px 16px 12px;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr) auto;
  gap: 12px;
}
.topbar { display: flex; align-items: center; justify-content: space-between; min-width: 0; gap: 16px; }
.identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border: 1px solid rgba(99,226,208,.45); border-radius: 50%; position: relative; display: grid; place-items: center; flex: 0 0 auto; }
.brand-mark::before { content: ""; position: absolute; width: 28px; height: 10px; border: 1px solid var(--accent); border-radius: 50%; transform: rotate(-26deg); opacity: .8; }
.brand-mark span { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); position: absolute; }
.brand-mark span:nth-child(1) { transform: translate(-7px, 0); opacity: .5; }
.brand-mark span:nth-child(2) { transform: translate(0, 0); }
.brand-mark span:nth-child(3) { transform: translate(7px, 0); opacity: .5; }
.title-group { min-width: 0; }
.eyebrow { color: var(--accent); font-size: 9px; font-weight: 750; letter-spacing: .17em; line-height: 1.4; text-transform: uppercase; }
.eyebrow span { color: #526a76; padding: 0 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: 17px; line-height: 1.12; letter-spacing: -.025em; font-weight: 680; }
.title-group p { color: var(--muted); font-size: 10px; margin-top: 2px; }
.transport, .panel-actions, .preset-row { display: flex; align-items: center; gap: 6px; }
.button { border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); border-radius: 8px; padding: 7px 10px; min-height: 30px; font-size: 10px; color: #bdcbd1; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; white-space: nowrap; }
.button:hover { border-color: rgba(99,226,208,.55); color: var(--text); background: rgba(99,226,208,.07); }
.button:active { transform: translateY(1px); }
.button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.button-primary { background: var(--accent); border-color: var(--accent); color: #06201f; font-weight: 750; }
.button-primary:hover { background: #8af0e3; color: #06201f; }
.button-primary span { margin-left: 4px; }
.button-quiet { background: transparent; border-color: var(--line); padding: 6px 8px; font-size: 9px; }
.button-quiet[aria-pressed="true"] { border-color: rgba(99,226,208,.42); color: var(--accent); background: var(--accent-dim); }
.toggle-indicator { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-left: 5px; background: #526a76; vertical-align: 1px; }
[aria-pressed="true"] .toggle-indicator { background: var(--accent); box-shadow: 0 0 9px var(--accent-glow); }
.workspace { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr); gap: 12px; }
.panel { min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(18,29,40,.97), rgba(12,20,29,.98)); overflow: hidden; box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.scene-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.panel-heading { min-height: 52px; padding: 10px 12px 9px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: 13px; font-weight: 650; letter-spacing: -.015em; margin-top: 3px; }
.panel-actions { flex-wrap: wrap; justify-content: flex-end; }
.scene-stage { min-height: 0; position: relative; overflow: hidden; background: radial-gradient(ellipse at 48% 48%, rgba(25,48,57,.42), transparent 58%), #0a121b; }
canvas { display: block; width: 100%; height: 100%; }
.scene-overlay { position: absolute; top: 10px; z-index: 2; padding: 5px 7px; border: 1px solid rgba(170,198,211,.14); border-radius: 6px; background: rgba(7,14,21,.72); color: #93a9b3; font-size: 8px; letter-spacing: .12em; pointer-events: none; }
.scene-overlay-left { left: 10px; }
.scene-overlay-right { right: 10px; }
.scene-overlay strong { color: var(--accent); font-weight: 750; margin-left: 4px; }
.live-dot { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); vertical-align: 1px; }
.caption-row { min-height: 42px; padding: 8px 12px; display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); background: rgba(4,10,16,.24); }
.caption-mark { color: var(--accent); font-size: 14px; }
.caption-row p { color: #a9bac2; font-size: 10px; line-height: 1.4; flex: 1; }
.clock-readout { font-size: 10px; font-variant-numeric: tabular-nums; color: var(--accent); white-space: nowrap; }
.telemetry-panel { display: grid; grid-template-rows: auto minmax(130px, 1fr) auto auto; }
.telemetry-heading { min-height: 52px; }
.unit-tag { border: 1px solid var(--line); border-radius: 5px; padding: 5px 6px; font-size: 8px; color: #8197a2; letter-spacing: .1em; white-space: nowrap; }
.chart-stage { min-height: 0; padding: 8px 10px 2px 8px; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--line); }
.metric { min-width: 0; padding: 8px 12px 7px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric:nth-child(2n) { border-right: 0; }
.metric:nth-last-child(-n+2) { border-bottom: 0; }
.metric-label { font-size: 9px; color: var(--muted); }
.metric strong { color: #e7f5f3; font-size: 18px; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; font-weight: 650; }
.metric strong small { color: #91a9b2; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.metric-kind { font-size: 7px; color: #607d86; letter-spacing: .12em; }
.audit-row { min-height: 43px; padding: 7px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: rgba(4,10,16,.26); border-top: 1px solid var(--line); }
.audit-label { display: block; font-size: 8px; color: var(--accent); letter-spacing: .13em; font-weight: 750; }
.audit-label i { color: #728b95; font-style: normal; margin-left: 4px; }
.audit-detail { display: block; margin-top: 3px; color: #758c96; font-size: 8px; }
.audit-row strong { color: #d5e5e7; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.control-dock { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(16,25,35,.98), rgba(11,18,26,.98)); padding: 9px 12px 8px; overflow: auto; scrollbar-width: thin; scrollbar-color: #344b56 transparent; }
.controls-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.control-title { font-size: 11px; font-weight: 680; color: #dce9ed; }
.control-title span { color: #758a95; font-size: 8px; font-weight: 450; margin-left: 7px; }
.button-preset { min-height: 25px; padding: 4px 8px; font-size: 8px; }
.button-preset.active { color: var(--accent); border-color: rgba(99,226,208,.38); background: var(--accent-dim); }
.control-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; }
.control-card { min-width: 0; position: relative; display: flex; flex-direction: column; gap: 5px; padding: 7px 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); }
.control-label { color: #b7c7cd; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.control-label em { color: #6c8990; font-style: normal; font-size: 6px; letter-spacing: .1em; margin-left: 3px; }
.control-card output { position: absolute; top: 6px; right: 8px; color: var(--accent); font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 12px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.control-card small { color: #657b86; font-size: 7px; line-height: 1.2; }
.display-control { justify-content: flex-start; }
.button-display { min-height: 22px; padding: 3px 7px; font-size: 9px; text-align: left; }
.button-display[aria-pressed="true"] { border-color: rgba(99,226,208,.42); color: var(--accent); background: var(--accent-dim); }
.science-panel { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.science-panel summary { cursor: pointer; list-style: none; color: #c0d0d5; font-size: 9px; font-weight: 650; outline-offset: 3px; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary::before { content: "+"; color: var(--accent); margin-right: 8px; font-size: 12px; }
.science-panel[open] summary::before { content: "−"; }
.science-panel summary span { color: #728894; font-weight: 400; margin-left: 7px; }
.science-content { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 10px 2px 4px; color: #91a5ae; font-size: 9px; line-height: 1.5; }
.science-column h3 { margin: 6px 0 4px; color: #d4e4e7; font-size: 10px; }
.science-column p { margin: 0 0 7px; }
.science-column ul { margin: 0 0 8px; padding-left: 16px; }
.science-column li { margin: 2px 0; }
.science-column b { color: #c7d9de; }
.disclaimer { color: var(--accent); font-weight: 600; }
.sources { color: #71858e; font-size: 8px; }
@media (min-width: 1500px) {
  .app-shell { padding-left: 22px; padding-right: 22px; }
  .panel-heading { padding-left: 18px; padding-right: 16px; }
  .metric { padding: 10px 16px 9px; }
}
@media (max-width: 1050px) {
  .app-shell { padding: 10px; gap: 9px; grid-template-rows: 54px minmax(0,1fr) auto; }
  .workspace { grid-template-columns: minmax(0,1.08fr) minmax(320px,.92fr); gap: 9px; }
  .control-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .control-dock { max-height: 230px; }
  .control-title span { display: block; margin: 2px 0 0; }
}
@media (max-width: 700px) {
  .app-shell { padding: 8px; gap: 8px; grid-template-rows: 48px minmax(0,1fr) auto; }
  .topbar { gap: 8px; }
  .brand-mark { width: 29px; height: 29px; }
  .brand-mark::before { width: 24px; height: 8px; }
  .identity { gap: 8px; }
  h1 { font-size: 14px; }
  .title-group p { font-size: 9px; }
  .eyebrow { font-size: 7px; }
  .transport { gap: 4px; }
  .transport .button { min-height: 28px; padding: 5px 7px; font-size: 9px; }
  .transport .button-primary { padding-left: 8px; padding-right: 8px; }
  .workspace { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(210px, 1.05fr) minmax(210px, .95fr); gap: 8px; }
  .panel-heading { min-height: 40px; padding: 7px 8px; }
  .panel-heading h2 { font-size: 11px; }
  .panel-heading .eyebrow { font-size: 7px; }
  .panel-actions { gap: 4px; }
  .panel-actions .button { min-height: 25px; padding: 4px 6px; font-size: 8px; }
  .scene-overlay { top: 7px; padding: 4px 5px; font-size: 6px; }
  .caption-row { min-height: 34px; padding: 5px 8px; gap: 6px; }
  .caption-row p { font-size: 8px; }
  .clock-readout { font-size: 8px; }
  .telemetry-panel { grid-template-rows: auto minmax(86px,1fr) auto auto; }
  .telemetry-heading { min-height: 36px; }
  .unit-tag { padding: 3px 5px; font-size: 6px; }
  .chart-stage { padding: 3px 6px 1px 4px; }
  .metrics-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .metric { padding: 5px 6px 4px; border-bottom: 0; border-right: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: 1px solid var(--line); }
  .metric:last-child { border-right: 0; }
  .metric-label { font-size: 7px; min-height: 16px; }
  .metric strong { font-size: 13px; }
  .metric strong small { font-size: 8px; }
  .metric-kind { font-size: 5px; letter-spacing: .08em; }
  .audit-row { min-height: 32px; padding: 4px 8px; }
  .audit-label { font-size: 6px; }
  .audit-detail { font-size: 6px; margin-top: 1px; }
  .audit-row strong { font-size: 9px; }
  .control-dock { max-height: 205px; padding: 7px 8px 6px; }
  .controls-heading { margin-bottom: 6px; align-items: flex-start; }
  .control-title { font-size: 9px; }
  .control-title span { font-size: 6px; }
  .preset-row { gap: 4px; }
  .button-preset { font-size: 7px; padding: 3px 5px; min-height: 22px; }
  .control-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
  .control-card { padding: 5px 6px 4px; gap: 3px; }
  .control-label { font-size: 7px; }
  .control-label em { font-size: 5px; }
  .control-card output { top: 5px; right: 6px; font-size: 8px; }
  .control-card small { font-size: 6px; }
  .science-panel { margin-top: 6px; padding-top: 5px; }
  .science-panel summary { font-size: 8px; }
  .science-panel summary span { font-size: 6px; }
  .science-content { grid-template-columns: 1fr; gap: 4px; font-size: 8px; }
}
@media (max-width: 380px) {
  .panel-actions .button { font-size: 7px; padding: 4px 5px; }
  .transport .button { padding: 4px 5px; }
  .transport .button-primary span { display: none; }
  .preset-row .button { font-size: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
