:root {
  color-scheme: dark;
  --bg: #071118;
  --panel: #0e1b24;
  --panel-2: #12232d;
  --line: rgba(161, 193, 204, .14);
  --muted: #7f99a4;
  --muted-2: #9eb1b8;
  --text: #e7eef0;
  --cyan: #72c9df;
  --gold: #d4ad70;
  --rust: #b77a5c;
  --radius: 13px;
  --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 { background: radial-gradient(ellipse at 46% -20%, #1a3541 0%, #0a1820 42%, #071118 78%); }
button, select, input { font: inherit; }
button { color: inherit; }
.app-shell { max-width: 1760px; margin: 0 auto; padding: 18px 24px 14px; }
.topbar { min-height: 76px; display: grid; grid-template-columns: 190px minmax(0, 1fr) 150px; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 31px; height: 31px; display: flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid rgba(114,201,223,.45); border-radius: 9px; transform: rotate(-8deg); }
.brand-mark span { width: 3px; border-radius: 3px; background: var(--cyan); display: block; }
.brand-mark span:nth-child(1) { height: 10px; opacity: .55; }.brand-mark span:nth-child(2) { height: 17px; }.brand-mark span:nth-child(3) { height: 13px; opacity: .72; }
.brand-name { font-size: 13px; letter-spacing: .14em; font-weight: 800; color: #dce8eb; }.brand-name span { color: var(--cyan); }
.brand-sub { margin-top: 4px; font-size: 8px; letter-spacing: .16em; color: var(--muted); }
.header-center { min-width: 0; }
.eyebrow { color: #8ca8b3; font-size: 9px; font-weight: 750; letter-spacing: .16em; line-height: 1.3; }
.header-center .eyebrow { margin-bottom: 5px; }
.eyebrow-dot, .live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #77d1b0; box-shadow: 0 0 9px rgba(119,209,176,.7); margin-right: 7px; vertical-align: 1px; }
h1 { margin: 0; font-size: clamp(17px, 1.8vw, 23px); letter-spacing: -.045em; line-height: 1.2; font-weight: 690; color: #edf3f4; }
h1 span { color: #9fb4bb; font-weight: 450; }
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.field-pill { border: 1px solid rgba(114,201,223,.26); background: rgba(114,201,223,.08); color: var(--cyan); padding: 5px 9px; border-radius: 5px; font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.seed-label { font-size: 9px; color: #708994; letter-spacing: .12em; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.78fr) minmax(330px, .82fr); gap: 16px; padding-top: 16px; align-items: start; }
.visual-column { min-width: 0; }
.scene-card { border: 1px solid rgba(151,190,204,.18); border-radius: var(--radius); overflow: hidden; background: #0b171f; box-shadow: 0 18px 48px rgba(0,0,0,.25); }
.scene-topline { height: 36px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; background: #0e1c25; border-bottom: 1px solid rgba(151,190,204,.12); }
.scene-status, .scene-top-right { display: flex; align-items: center; gap: 9px; font-size: 8px; font-weight: 750; letter-spacing: .13em; color: #9db1b8; }
.scene-status .live-dot { width: 5px; height: 5px; margin-right: -3px; }
.status-divider { height: 11px; width: 1px; background: rgba(155,184,194,.2); }
.view-chip { border: 1px solid rgba(114,201,223,.24); color: #8fcbd9; border-radius: 4px; padding: 4px 6px; }
.drag-hint { color: #6d8791; font-weight: 550; }
.scene-canvas { height: min(59vh, 600px); min-height: 420px; position: relative; overflow: hidden; background: radial-gradient(ellipse at 48% 42%, #18303a, #0b1921 68%, #071118); }
.scene-canvas canvas { width: 100%; height: 100%; display: block; outline: none; }
.scene-vignette { pointer-events: none; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,12,17,.22), transparent 20%, transparent 72%, rgba(4,12,17,.7)); }
.scene-bottomline { position: absolute; z-index: 3; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: end; padding: 14px 16px 12px; pointer-events: none; }
.scene-bottomline > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.tiny-label { font-size: 8px; letter-spacing: .15em; color: #8aa5ae; font-weight: 700; }
.scene-bottomline strong { font-size: 11px; letter-spacing: .09em; color: #e0ebed; }
.scene-bottom-right { display: flex; gap: 12px; color: #9ab3bc; font-size: 9px; font-weight: 750; letter-spacing: .1em; }
.scene-legend { display: flex; align-items: center; gap: 20px; min-height: 33px; padding: 0 14px; background: #0b171f; border-top: 1px solid rgba(151,190,204,.1); color: #8da4ad; font-size: 9px; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }.legend-dot.blue { background: #72c9df; box-shadow: 0 0 8px #3d8da6; }.legend-dot.amber { background: #d4ad70; }.legend-line { display: inline-block; width: 13px; height: 2px; background: #9c6548; margin-right: 6px; vertical-align: 3px; }
.context-banner { position: absolute; z-index: 10; top: 12px; left: 12px; right: 12px; padding: 10px 12px; border: 1px solid rgba(235,177,104,.45); border-radius: 7px; background: rgba(65,39,20,.9); color: #f0c58f; font-size: 12px; }
.transport-bar { display: flex; align-items: center; gap: 7px; margin-top: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13,27,36,.92); }
.transport-bar button { min-height: 36px; border-radius: 7px; border: 1px solid rgba(145,179,191,.17); background: #132630; cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.transport-bar button:hover { background: #1a3440; border-color: rgba(114,201,223,.45); }
.transport-bar button:active { transform: translateY(1px); }
.transport-primary { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; min-width: 94px; background: #1a4a56 !important; border-color: rgba(114,201,223,.42) !important; color: #d9f3f7; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
#play-icon { font-size: 13px; }
.transport-button { padding: 0 10px; font-size: 9px; font-weight: 800; letter-spacing: .08em; color: #c5d5da; }
.button-sub { display: block; margin-top: 2px; color: #78949e; font-size: 7px; letter-spacing: .08em; }
.speed-control { display: flex; align-items: center; gap: 6px; padding: 0 6px 0 9px; margin-left: auto; border-left: 1px solid var(--line); }
.speed-control label { color: #829ba5; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.speed-control select { height: 31px; padding: 0 7px; border-radius: 6px; border: 1px solid rgba(145,179,191,.18); background: #0c1a22; color: #dce8eb; font-size: 10px; }
.icon-button { width: 36px; font-size: 16px; color: #9db7c0; }
.quality-button { padding: 0 9px; font-size: 8px; font-weight: 800; letter-spacing: .08em; color: #a9c1c8; white-space: nowrap; }
.screenshot-button { font-size: 17px; }
.motion-note { margin: 6px 2px 0; color: #c8a779; font-size: 10px; }
.readout-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.readout-card { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(145deg, rgba(18,36,46,.92), rgba(10,22,30,.92)); padding: 10px 11px 9px; }
.readout-top { display: flex; align-items: center; justify-content: space-between; color: #849da6; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.readout-icon { font-style: normal; font-size: 15px; }.readout-icon.cyan { color: var(--cyan); }.readout-icon.gold { color: var(--gold); }.readout-icon.rust { color: var(--rust); }.readout-icon.blue { color: #93b6d4; }
.readout-card strong { display: block; margin-top: 5px; color: #edf3f3; font-size: clamp(15px, 1.55vw, 21px); letter-spacing: -.04em; font-weight: 650; white-space: nowrap; }
.readout-card small { display: block; margin-top: 5px; color: #718b95; font-size: 8px; line-height: 1.4; }
.readout-card small b { color: #9ab4bc; font-size: 7px; letter-spacing: .08em; margin-left: 2px; }
.control-column { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-height: calc(100vh - 112px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a4854 transparent; padding-right: 2px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, rgba(16,32,42,.96), rgba(10,23,31,.96)); padding: 13px; box-shadow: 0 10px 24px rgba(0,0,0,.13); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 12px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 15px; letter-spacing: -.03em; font-weight: 650; color: #e7eff1; }
.panel-index { font-size: 8px; color: #5f7d88; font-weight: 800; letter-spacing: .1em; padding-top: 3px; }
.preset-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; margin-bottom: 14px; }
.preset { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 44px; padding: 6px 7px; border-radius: 7px; border: 1px solid rgba(145,179,191,.14); background: rgba(7,18,25,.54); cursor: pointer; text-align: left; transition: .18s; }
.preset:hover { border-color: rgba(114,201,223,.4); }.preset.active { background: rgba(55,103,112,.2); border-color: rgba(114,201,223,.48); box-shadow: inset 0 0 0 1px rgba(114,201,223,.08); }
.preset-icon { color: var(--cyan); font-size: 16px; }.preset b { display: block; color: #dce8eb; font-size: 8px; letter-spacing: .08em; white-space: nowrap; }.preset small { display: block; color: #78929c; font-size: 7px; margin-top: 2px; white-space: nowrap; }
.control-group { padding: 9px 0 8px; border-top: 1px solid rgba(145,179,191,.1); }
.control-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.control-label label { color: #b9cbd0; font-size: 10px; font-weight: 600; }
.control-label output { color: #8fc8d6; font-size: 9px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; height: 14px; margin: 0; background: transparent; accent-color: var(--cyan); cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, #397e8c, #6ab6c7 65%, #334e58); }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; border: 2px solid #d7f0f4; background: #4f9eaf; box-shadow: 0 0 0 3px rgba(94,182,201,.14); }
input[type=range]::-moz-range-track { height: 3px; border-radius: 5px; background: #3c7380; }
input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #d7f0f4; background: #4f9eaf; }
.range-ends { display: flex; justify-content: space-between; color: #627d87; font-size: 8px; margin-top: 3px; }
.two-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-controls > div { min-width: 0; }
.profile-panel { padding-bottom: 10px; }
.panel-heading.compact { margin-bottom: 8px; }
.chart-legend { display: flex; align-items: center; gap: 12px; color: #7f99a3; font-size: 8px; }
.chart-line { display: inline-block; width: 12px; height: 2px; margin-right: 4px; vertical-align: 3px; }.chart-line.cyan { background: var(--cyan); }.chart-line.gold { background: var(--gold); }.chart-front { color: #bb9471; }
.profile-chart { display: block; width: 100%; height: auto; margin-top: 5px; overflow: visible; }
.chart-grid line { stroke: rgba(145,179,191,.12); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-labels { fill: #6d8790; font-size: 8px; }
.profile-b, .profile-p { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }.profile-b { stroke: #71c5dc; }.profile-p { stroke: #d1a66a; }
.profile-front { stroke: #c68b5f; stroke-width: 1.1; stroke-dasharray: 3 3; }
.profile-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid rgba(145,179,191,.1); padding-top: 8px; }
.profile-metrics span { display: block; color: #6f8993; font-size: 7px; font-weight: 800; letter-spacing: .1em; }.profile-metrics strong { display: block; margin-top: 3px; color: #dce8eb; font-size: 12px; font-weight: 650; }
.science-panel { padding: 0; overflow: hidden; }
.science-panel summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 13px; cursor: pointer; }.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary b { display: block; margin-top: 3px; font-size: 14px; font-weight: 650; }.summary-plus { color: var(--cyan); font-size: 18px; font-weight: 300; }
.science-panel[open] .summary-plus { transform: rotate(0deg); }.science-content { padding: 0 13px 13px; }
.science-intro { color: #9ab0b8; font-size: 9px; line-height: 1.55; margin: 0 0 9px; }
.equation { display: flex; flex-direction: column; gap: 4px; padding: 7px 9px; margin: 6px 0; border: 1px solid rgba(145,179,191,.11); border-radius: 6px; background: rgba(4,15,21,.34); }.equation-tag { color: #7da7b3; font-size: 7px; font-weight: 800; letter-spacing: .13em; }.equation code { color: #e2c18f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; white-space: normal; }
.science-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 9px 0 11px; }.science-facts > div { min-width: 0; }.science-facts b { display: block; color: #c9d8dc; font-family: ui-monospace, monospace; font-size: 10px; }.science-facts span { display: block; margin-top: 2px; color: #748e98; font-size: 8px; line-height: 1.4; }
.validation-block { border: 1px solid rgba(114,201,223,.19); border-radius: 7px; padding: 9px; background: rgba(38,83,96,.1); }.validation-title { display: flex; justify-content: space-between; align-items: center; color: #9fc1ca; font-size: 7px; font-weight: 800; letter-spacing: .11em; }.textbook-tag { color: #8bd0bd; border: 1px solid rgba(139,208,189,.28); padding: 3px 5px; border-radius: 4px; }.validation-block p { margin: 6px 0 8px; color: #829ba4; font-size: 8px; line-height: 1.45; }.validation-values { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }.validation-values span { display: block; color: #6e8993; font-size: 7px; letter-spacing: .1em; }.validation-values b { display: block; margin-top: 3px; color: #e2edef; font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; }.validation-block > small { display: block; margin-top: 7px; color: #66828d; font-size: 7px; }
.limitations { margin-top: 10px; }.limitations b { color: #b8c9ce; font-size: 8px; }.limitations p { margin: 4px 0 0; color: #748b94; font-size: 8px; line-height: 1.5; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 13px 2px 0; color: #58717b; font-size: 7px; font-weight: 700; letter-spacing: .1em; }.footer span:last-child { text-align: right; font-weight: 500; letter-spacing: .02em; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #85d2e0; outline-offset: 3px; }
.embed-mode .app-shell { padding: 8px; }.embed-mode .topbar, .embed-mode .footer { display: none; }.embed-mode .workspace { padding-top: 0; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr); }
@media (max-width: 1080px) { .app-shell { padding: 14px; }.workspace { grid-template-columns: minmax(0, 1.45fr) minmax(310px, .9fr); gap: 10px; }.readout-grid { grid-template-columns: repeat(2,1fr); }.scene-canvas { min-height: 390px; }.drag-hint { display: none; } }
@media (max-width: 760px) {
  .app-shell { padding: 10px 10px 12px; }.topbar { grid-template-columns: 1fr auto; gap: 8px; min-height: 0; padding-bottom: 10px; }.brand-lockup { grid-column: 1; }.header-center { grid-column: 1 / -1; grid-row: 2; }.header-right { grid-column: 2; grid-row: 1; }.header-center .eyebrow { font-size: 8px; } h1 { font-size: 19px; }.header-right { flex-direction: row; align-items: center; }.seed-label { display: none; }
  .workspace { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }.visual-column, .control-column { width: 100%; }.control-column { max-height: none; overflow: visible; }.scene-topline { padding: 0 9px; }.scene-top-right { gap: 5px; }.scene-canvas { height: min(52vh, 430px); min-height: 300px; }.scene-legend { gap: 10px; font-size: 8px; flex-wrap: wrap; padding: 7px 10px; }.scene-bottomline { padding: 10px; }.scene-bottom-right { gap: 7px; font-size: 8px; }.transport-bar { flex-wrap: wrap; gap: 6px; padding: 7px; }.transport-primary { min-width: 78px; padding: 0 9px; }.transport-button { padding: 0 8px; }.speed-control { margin-left: auto; }.quality-button { flex: 1 1 auto; }.readout-grid { grid-template-columns: repeat(2,1fr); }.readout-card { padding: 9px; }.readout-card strong { font-size: 18px; }.panel { padding: 12px; }.science-panel { padding: 0; }.footer { flex-direction: column; gap: 5px; line-height: 1.4; }.footer span:last-child { text-align: left; }
  .embed-mode .workspace { display: flex; }.embed-mode .scene-canvas { height: 45vh; }
}
@media (max-width: 390px) { .app-shell { padding-left: 8px; padding-right: 8px; }.scene-status { font-size: 7px; gap: 6px; }.view-chip { font-size: 7px; }.scene-canvas { min-height: 275px; }.readout-card strong { font-size: 16px; }.preset { padding: 5px; gap: 4px; }.preset-icon { font-size: 14px; }.preset b { font-size: 7px; }.preset small { font-size: 6px; }.two-controls { gap: 8px; }.control-label label { font-size: 9px; }.control-label output { font-size: 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
.causal-strip { display: grid; grid-template-columns: 1fr 14px 1.35fr 14px 1fr; gap: 6px; align-items: center; padding: 9px 12px; margin-top: 8px; border: 1px solid rgba(145,179,191,.12); border-radius: 8px; background: rgba(13,28,37,.72); }
.causal-strip > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.causal-strip span { color: #6f909b; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.causal-strip b { color: #c8d7db; font-size: 9px; font-weight: 600; white-space: nowrap; }
.causal-strip i { color: #6fb8c8; font-style: normal; font-size: 13px; text-align: center; }
@media (max-width: 760px) { .causal-strip { grid-template-columns: 1fr 10px 1.3fr 10px 1fr; gap: 3px; padding: 8px; }.causal-strip b { font-size: 8px; white-space: normal; line-height: 1.25; }.causal-strip span { font-size: 6px; } }
@media (min-width: 1081px) {
  .scene-canvas { height: min(46vh, 520px); min-height: 300px; }
  .scene-topline { height: 32px; }
  .scene-legend { min-height: 27px; }
  .causal-strip { padding-top: 6px; padding-bottom: 6px; }
  .transport-bar { margin-top: 7px; padding: 6px; }
  .transport-bar button { min-height: 32px; }
  .readout-grid { margin-top: 8px; }
  .readout-card { padding: 8px 10px 7px; }
  .readout-card strong { margin-top: 3px; }
  .readout-card small { margin-top: 3px; }
}
.affiliation-note { display: block; margin-top: 7px; color: #718b95; font-size: 7px; line-height: 1.35; }
@media (min-width: 1081px) {
  .app-shell { padding-top: 12px; padding-bottom: 2px; }
  .footer { display: none; }
}
