:root {
  color-scheme: dark;
  --bg: #07131e;
  --panel: rgba(12, 28, 39, 0.94);
  --panel-2: #0d202d;
  --line: rgba(151, 196, 215, 0.14);
  --line-strong: rgba(151, 196, 215, 0.25);
  --text: #e8f5fa;
  --muted: #8ea8b7;
  --dim: #5d7787;
  --cyan: #79d9ef;
  --ice: #b6f1ff;
  --accent: #4bbdd8;
  --good: #8be0ca;
  --radius: 13px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow-x: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 28% 35%, rgba(26, 75, 94, .18), transparent 44%), #07131e; }
.topbar { height: 58px; flex: 0 0 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 25px; border-bottom: 1px solid var(--line); background: rgba(5, 16, 25, .82); }
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 30px; height: 30px; border: 1px solid rgba(121,217,239,.55); border-radius: 9px; display: grid; place-items: center; color: #c9f5ff; font-size: 16px; font-weight: 800; letter-spacing: -1px; box-shadow: inset 0 0 14px rgba(75,189,216,.1); }
.brand-mark span { color: var(--cyan); }
.brand-name { font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.brand-name span { color: var(--muted); font-weight: 500; }
.brand-sub { margin-top: 3px; color: var(--dim); font-size: 8px; letter-spacing: .18em; }
.top-meta { display: flex; align-items: center; gap: 17px; color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.seed-tag { padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; color: #b4cbd6; }
.field-tag { display: flex; align-items: center; gap: 6px; color: #9ed9e9; }
.field-tag i, .live-indicator b, .scene-chip b { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--cyan); box-shadow: 0 0 10px rgba(121,217,239,.8); }
.live-indicator { display: flex; align-items: center; gap: 7px; color: #83bcae; }
.live-indicator b { background: #7ad8b5; box-shadow: 0 0 10px rgba(122,216,181,.6); }
.workspace { width: 100%; max-width: 1800px; margin: 0 auto; padding: 17px 22px 10px; display: grid; grid-template-columns: minmax(0, 1fr) 374px; gap: 17px; flex: 1; min-height: 0; }
.visual-column { min-width: 0; display: flex; flex-direction: column; }
.title-strip { min-height: 83px; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0 4px 12px; }
.eyebrow { color: #6e98a9; font-size: 8px; font-weight: 750; letter-spacing: .19em; }
.eyebrow span { color: var(--cyan); padding: 0 3px; }
h1 { margin: 6px 0 3px; font-size: clamp(21px, 2vw, 29px); line-height: 1.1; letter-spacing: -.045em; font-weight: 670; }
h1 span { color: #a5c1ce; font-weight: 430; }
.subtitle { margin: 0; color: #87a1af; font-size: 11px; letter-spacing: .005em; }
.phase-pill { white-space: nowrap; border: 1px solid rgba(93, 191, 216, .28); border-radius: 100px; padding: 8px 11px; color: #a7d9e7; background: rgba(46, 126, 149, .1); font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.stage { flex: 1; min-height: 430px; max-height: calc(100vh - 245px); position: relative; overflow: hidden; border: 1px solid rgba(118, 173, 194, .2); border-radius: 15px; background: radial-gradient(ellipse at 52% 50%, #183747 0%, #0b202d 48%, #08151f 100%); box-shadow: 0 20px 70px rgba(0,0,0,.28), inset 0 0 50px rgba(97,192,222,.035); }
#sim-canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.stage-vignette { pointer-events: none; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,15,24,.34), transparent 22%, transparent 72%, rgba(4,13,21,.7)); }
.stage-topline { position: absolute; z-index: 2; top: 15px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.scene-chip { display: inline-flex; gap: 7px; align-items: center; padding: 7px 9px; border: 1px solid rgba(172,222,237,.18); border-radius: 5px; background: rgba(7,21,31,.55); color: #b5d5e1; font-size: 8px; letter-spacing: .12em; backdrop-filter: blur(8px); }
.scene-chip b { width: 5px; height: 5px; }
.stage-coordinates { color: rgba(169,205,218,.62); font-size: 8px; letter-spacing: .13em; }
.annotation { position: absolute; z-index: 2; display: flex; align-items: center; gap: 7px; color: #b6e6f0; font-size: 8px; font-weight: 700; letter-spacing: .11em; text-shadow: 0 1px 6px #07131e; pointer-events: none; }
.annotation-front { left: 7%; top: 39%; }
.annotation-line { display: block; width: 27px; height: 1px; background: #7fd5e9; box-shadow: 0 0 7px #7fd5e9; }
.annotation-tip { right: 8%; top: 23%; }
.annotation-dot { width: 5px; height: 5px; border-radius: 50%; background: #b8f4ff; box-shadow: 0 0 8px #9cecff; }
.stage-bottomline { position: absolute; z-index: 2; bottom: 14px; left: 16px; right: 16px; display: grid; grid-template-columns: 110px minmax(120px, 1fr) auto; align-items: end; gap: 17px; pointer-events: none; }
.time-readout span, .progress-label { display: block; color: #83a3b2; font-size: 7px; letter-spacing: .14em; }
.time-readout strong { display: block; margin-top: 4px; color: #e1f4fa; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 7px; }
.progress-track { height: 3px; overflow: hidden; border-radius: 10px; background: rgba(159,201,218,.18); }
.progress-track div { width: 1%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3999b6, #a8f0ff); box-shadow: 0 0 8px #4fc2e1; transition: width .3s linear; }
.status-chip { border: 1px solid rgba(107,213,184,.35); border-radius: 5px; padding: 7px 9px; color: #8de0c5; background: rgba(15,72,65,.38); font-size: 8px; letter-spacing: .13em; font-weight: 750; }
.status-chip.is-paused { color: #e9c98c; border-color: rgba(233,201,140,.3); background: rgba(83,61,27,.35); }
.context-warning { position: absolute; inset: 40% 12%; z-index: 5; padding: 18px; text-align: center; color: #ffe0a4; border: 1px solid rgba(255,204,112,.3); border-radius: 9px; background: rgba(40,28,12,.9); font-size: 12px; }
.stage-footnote { min-height: 36px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 11px; color: #7895a4; font-size: 8px; letter-spacing: .035em; }
.stage-footnote b { color: #b7d9e4; font-size: 7px; letter-spacing: .11em; margin-right: 4px; }
.foot-arrow { color: #4e8396; font-size: 13px; }
.control-column { min-width: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: calc(100vh - 112px); padding: 0 2px 3px 0; scrollbar-width: thin; scrollbar-color: #254453 transparent; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(14,33,46,.97), rgba(9,24,35,.97)); box-shadow: 0 8px 26px rgba(0,0,0,.12); }
.control-panel { padding: 15px 15px 12px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 13px; letter-spacing: -.015em; font-weight: 620; }
.panel-index { color: #5f8090; font-size: 9px; letter-spacing: .1em; }
.control-group { margin: 0 0 10px; }
.control-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.control-label label { color: #c5d8e1; font-size: 10px; }
.control-label output { color: #9edfee; font-size: 9px; font-weight: 650; font-variant-numeric: tabular-nums; }
input[type="range"] { appearance: none; width: 100%; height: 4px; display: block; margin: 0; border-radius: 10px; background: linear-gradient(90deg, #318ba6, #295366); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border: 2px solid #c9f5ff; border-radius: 50%; background: #3e9fbb; box-shadow: 0 0 0 3px rgba(75,189,216,.13), 0 0 9px rgba(87,203,231,.5); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #c9f5ff; border-radius: 50%; background: #3e9fbb; box-shadow: 0 0 0 3px rgba(75,189,216,.13); }
.range-ends { display: flex; justify-content: space-between; margin-top: 4px; color: #587383; font-size: 8px; }
.last-control { margin-bottom: 3px; }
.divider { height: 1px; background: var(--line); margin: 12px 0 11px; }
.subheading { display: flex; justify-content: space-between; color: #8daab7; font-size: 8px; font-weight: 700; letter-spacing: .14em; margin-bottom: 8px; }
.micro-note { color: #567585; font-weight: 500; }
.preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.preset-btn { min-height: 47px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; padding: 5px 2px; border: 1px solid rgba(132,184,204,.16); border-radius: 7px; color: #91aab7; background: rgba(6,19,29,.55); font-size: 8px; transition: background .2s, border-color .2s, color .2s; }
.preset-btn:hover { border-color: rgba(121,217,239,.4); color: #d3f2fa; }
.preset-btn.active { border-color: rgba(92,196,222,.55); color: #c8f3fb; background: rgba(49,137,162,.17); box-shadow: inset 0 0 16px rgba(64,174,203,.07); }
.preset-glyph { color: #8edced; font-size: 14px; line-height: 1; }
.transport-row { display: grid; grid-template-columns: 1.15fr 1.15fr 36px; gap: 6px; margin-top: 11px; }
.primary-btn, .secondary-btn, .icon-btn { min-height: 34px; border-radius: 7px; font-size: 9px; font-weight: 650; transition: transform .15s, background .15s, border-color .15s; }
.primary-btn { border: 1px solid rgba(106,211,231,.65); color: #05202a; background: linear-gradient(135deg, #9ce9f6, #5bbdd6); box-shadow: 0 4px 14px rgba(58,167,194,.13); }
.secondary-btn { border: 1px solid rgba(132,184,204,.25); color: #c5e0e9; background: rgba(36,68,83,.45); }
.icon-btn { border: 1px solid rgba(132,184,204,.25); color: #b9d5e0; background: rgba(36,68,83,.3); font-size: 17px; }
.primary-btn:hover, .secondary-btn:hover, .icon-btn:hover { transform: translateY(-1px); }
.utility-row { display: grid; grid-template-columns: 1fr 78px; gap: 13px; align-items: end; margin-top: 11px; }
.utility-row label { display: block; margin-bottom: 5px; color: #688797; font-size: 7px; font-weight: 750; letter-spacing: .14em; }
.speed-line { display: flex; align-items: center; gap: 8px; }
.speed-line output { min-width: 35px; color: #a4ddeb; font-size: 9px; font-variant-numeric: tabular-nums; }
.quality-control select { width: 100%; height: 24px; padding: 0 6px; border: 1px solid rgba(132,184,204,.23); border-radius: 5px; color: #bdd6df; background: #102635; font-size: 9px; }
.utility-buttons { display: flex; justify-content: space-between; margin-top: 9px; }
.text-btn { padding: 4px 0; border: 0; color: #85a8b8; background: transparent; font-size: 8px; }
.text-btn:hover { color: #c9f4fc; }
.telemetry-panel { padding: 13px 14px 11px; }
.telemetry-panel .panel-heading { margin-bottom: 10px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.metric-card { min-height: 62px; padding: 8px 9px; border: 1px solid rgba(142,190,208,.11); border-radius: 7px; background: rgba(4,17,27,.42); }
.metric-card > span { display: flex; justify-content: space-between; gap: 3px; color: #7392a1; font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.metric-card i { color: #58798a; font-size: 6px; font-style: normal; font-weight: 500; }
.metric-card strong { display: block; margin: 5px 0 2px; color: #d8f5fb; font-size: 16px; font-weight: 610; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.metric-card small { color: #5e7a89; font-size: 7px; }
.metric-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 9px; color: #6c8a99; font-size: 7px; letter-spacing: .08em; }
.metric-footer strong { color: #b8dce6; font-size: 8px; letter-spacing: 0; }
.footer-sep { margin: 0 3px; color: #35586a; }
.science-panel { padding: 0; overflow: hidden; }
.science-toggle { width: 100%; display: flex; align-items: center; gap: 6px; padding: 12px 14px; border: 0; color: #d2eaf1; background: transparent; text-align: left; font-size: 11px; font-weight: 650; }
.science-toggle span { margin-left: auto; color: #638394; font-size: 7px; font-weight: 500; letter-spacing: .1em; }
.science-toggle:hover { background: rgba(62,132,154,.08); }
.science-content { padding: 0 14px 14px; }
.science-block { margin: 10px 0; }
.science-block h3 { margin: 0 0 4px; color: #a8dce8; font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.science-block p, .limitations p { margin: 0; color: #8ca7b4; font-size: 8px; line-height: 1.55; }
.equation { margin-top: 5px; padding: 7px 8px; border-left: 2px solid #4ea9c2; border-radius: 0 5px 5px 0; color: #d0f1f8; background: rgba(51,118,140,.12); font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.variable-list { display: grid; gap: 4px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #7996a5; font-size: 8px; line-height: 1.5; }
.variable-list b, .limitations b { color: #9fc3d0; font-size: 7px; letter-spacing: .13em; }
.validation-box { margin-top: 10px; padding: 9px; border: 1px solid rgba(105,192,213,.2); border-radius: 7px; background: rgba(33,91,109,.12); }
.validation-title { display: flex; justify-content: space-between; gap: 5px; color: #91b6c4; font-size: 7px; letter-spacing: .1em; }
.validation-title b { color: #83d8c1; font-size: 7px; }
.validation-box p { margin: 6px 0 8px; color: #819eac; font-size: 8px; }
.validation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.validation-grid div { padding: 6px; border-radius: 5px; background: rgba(2,15,23,.4); }
.validation-grid small { display: block; color: #638392; font-size: 6px; letter-spacing: .12em; }
.validation-grid strong { display: block; margin-top: 4px; color: #d4eff5; font-size: 9px; font-variant-numeric: tabular-nums; }
.limitations { margin-top: 10px; }
.limitations p { margin-top: 5px; }
.disclaimer { padding: 2px 3px 0; color: #587383; font-size: 7px; line-height: 1.5; }
.bottomline { min-height: 27px; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; border-top: 1px solid rgba(151,196,215,.08); color: #4f6b7a; font-size: 7px; letter-spacing: .14em; }
.bottomline b { color: #70b7c9; font-weight: 500; }
.embed-mode .topbar, .embed-mode .bottomline, .embed-mode .title-strip, .embed-mode .stage-footnote { display: none; }
.embed-mode .workspace { padding: 0; display: block; }
.embed-mode .visual-column { height: 100vh; }
.embed-mode .stage { max-height: none; min-height: 100vh; border: 0; border-radius: 0; }
.embed-mode .control-column { position: absolute; z-index: 6; top: 12px; right: 12px; width: min(350px, calc(100vw - 24px)); max-height: calc(100vh - 24px); opacity: .96; }
@media (min-width: 1500px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 410px; gap: 20px; padding-top: 22px; }
  .stage { min-height: 560px; }
  .control-panel { padding: 17px 17px 14px; }
  .control-group { margin-bottom: 12px; }
}
@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 340px; padding-left: 14px; padding-right: 14px; gap: 12px; }
  .topbar { padding: 0 16px; }
  .stage { min-height: 390px; }
  .stage-footnote { gap: 7px; font-size: 7px; }
}
@media (max-width: 780px) {
  .topbar { height: 52px; flex-basis: 52px; padding: 0 13px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-name { font-size: 9px; }
  .brand-sub { font-size: 7px; }
  .top-meta { gap: 8px; font-size: 8px; }
  .live-indicator { display: none; }
  .workspace { display: flex; flex-direction: column; gap: 10px; padding: 12px 10px 10px; }
  .title-strip { min-height: 75px; padding: 0 2px 9px; }
  h1 { font-size: 22px; }
  .subtitle { max-width: 290px; font-size: 10px; line-height: 1.4; }
  .phase-pill { display: none; }
  .stage { height: 44vh; min-height: 300px; max-height: 440px; flex: none; border-radius: 11px; }
  .stage-topline { top: 10px; left: 10px; right: 10px; }
  .stage-coordinates { font-size: 6px; }
  .scene-chip { font-size: 7px; padding: 6px 7px; }
  .annotation { font-size: 6px; }
  .annotation-front { left: 4%; top: 39%; }
  .annotation-tip { right: 4%; top: 25%; }
  .stage-bottomline { left: 10px; right: 10px; bottom: 10px; grid-template-columns: 80px minmax(80px,1fr) auto; gap: 8px; }
  .time-readout span, .progress-label { font-size: 6px; }
  .time-readout strong { font-size: 14px; }
  .status-chip { padding: 6px 7px; font-size: 7px; }
  .stage-footnote { min-height: 32px; justify-content: flex-start; gap: 6px; font-size: 7px; }
  .stage-footnote b { font-size: 6px; }
  .control-column { max-height: none; overflow: visible; gap: 9px; padding: 0; }
  .control-panel { padding: 13px 13px 11px; }
  .control-group { margin-bottom: 11px; }
  .control-label label { font-size: 11px; }
  .control-label output { font-size: 10px; }
  .range-ends { font-size: 8px; }
  .telemetry-panel { padding: 12px; }
  .metric-card { min-height: 67px; }
  .metric-card strong { font-size: 17px; }
  .science-toggle { min-height: 42px; }
  .bottomline { padding: 8px 12px; gap: 8px; flex-wrap: wrap; font-size: 6px; }
  .bottomline span:last-child { display: none; }
}
@media (max-width: 390px) {
  .seed-tag { padding: 5px 6px; }
  .field-tag { font-size: 7px; }
  .workspace { padding-left: 8px; padding-right: 8px; }
  .stage { min-height: 285px; }
  .stage-footnote { font-size: 6px; }
  .stage-footnote span:nth-of-type(2) { display: none; }
  .metric-card > span { font-size: 6px; }
  .metric-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; }
}
