:root {
  color-scheme: dark;
  --bg: #07151d;
  --panel: #0b1c25;
  --panel-2: #102630;
  --line: rgba(162, 205, 219, .13);
  --line-strong: rgba(162, 205, 219, .22);
  --text: #e6f2f4;
  --muted: #8ba4ad;
  --faint: #57727d;
  --cyan: #78d6e5;
  --cyan-2: #b7f0f5;
  --ice: #d5f5f7;
  --amber: #f3c98c;
  --space: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--text); background: radial-gradient(ellipse at 47% -22%, #183a45 0, #0a1b24 42%, var(--bg) 76%); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(1720px, 100%); margin: 0 auto; padding: 0 28px 32px; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 220px; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(120,214,229,.35); border-radius: 9px; color: var(--cyan); font-size: 18px; background: rgba(120,214,229,.08); }
.brand-copy { display: grid; gap: 2px; letter-spacing: .11em; }
.brand-copy strong { font-size: 10px; font-weight: 750; }
.brand-copy small { color: var(--muted); font-size: 8px; letter-spacing: .15em; }
.topbar-center { display: flex; align-items: center; gap: 9px; font-size: 9px; letter-spacing: .14em; color: #a9c1c8; }
.live-dot, .mode-dot { width: 6px; height: 6px; border-radius: 50%; background: #70d6c5; box-shadow: 0 0 10px rgba(112,214,197,.75); }
.topbar-divider { color: var(--faint); }
.topbar-right { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.webgl-status { display: flex; align-items: center; gap: 7px; }
.webgl-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.webgl-status.ready i { background: #70d6c5; box-shadow: 0 0 8px rgba(112,214,197,.6); }
.webgl-status.error i { background: #ef8b83; }
.seed-label { color: #6f8d97; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; padding-top: 24px; align-items: start; }
.exhibit-column { min-width: 0; }
.exhibit-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 0 0 18px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--cyan); font-size: 9px; font-weight: 700; letter-spacing: .17em; }
.eyebrow-line { width: 23px; height: 1px; background: rgba(120,214,229,.45); }
h1 { margin: 10px 0 7px; font-size: clamp(25px, 2.5vw, 36px); line-height: 1.1; letter-spacing: -.045em; font-weight: 620; }
h1 span { color: #76939d; font-weight: 350; }
.subtitle { max-width: 780px; margin: 0; color: #9bb2b9; font-size: 12px; line-height: 1.6; }
.phenomenon-tag { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: #9ab5bd; font-size: 8px; line-height: 1.5; letter-spacing: .12em; flex: 0 0 auto; }
.tag-icon { color: var(--cyan); font-size: 17px; }
.scene-frame { overflow: hidden; border: 1px solid rgba(137,191,204,.2); border-radius: 12px; background: #0a202b; box-shadow: 0 20px 65px rgba(0,0,0,.24); }
.scene-topline { height: 36px; display: flex; justify-content: space-between; align-items: center; padding: 0 13px; border-bottom: 1px solid rgba(137,191,204,.12); background: rgba(8,25,34,.88); color: #a4c2ca; font-size: 8px; letter-spacing: .13em; }
.scene-mode { display: flex; align-items: center; gap: 8px; }
.scene-scale { color: #688a95; }
.scene-coordinates { color: #7396a0; }
.scene-coordinates span { color: #b1cbd0; }
.scene-container { position: relative; height: clamp(360px, 45vw, 550px); min-height: 360px; overflow: hidden; background: radial-gradient(ellipse at 48% 35%, #1c5667, #0b2a39 62%, #071a25 100%); isolation: isolate; }
.scene-container canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-loading { position: absolute; z-index: 6; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #0b2633; color: #9bc4ce; font-size: 9px; letter-spacing: .17em; transition: opacity .4s ease; pointer-events: none; }
.scene-loading.hidden { opacity: 0; }
.loading-ring { width: 25px; height: 25px; border: 2px solid rgba(120,214,229,.16); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scene-vignette { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(3,16,23,.12), transparent 24%, transparent 78%, rgba(3,14,20,.3)), linear-gradient(90deg, rgba(4,15,21,.12), transparent 20%, transparent 80%, rgba(4,15,21,.12)); }
.scene-annotations { position: absolute; z-index: 2; inset: 0; pointer-events: none; font-size: 8px; letter-spacing: .14em; color: rgba(215,245,248,.8); }
.annotation { position: absolute; display: flex; align-items: center; gap: 7px; text-shadow: 0 1px 5px #06202b; }
.annotation-line { display: block; width: 25px; height: 1px; background: rgba(166,233,239,.7); box-shadow: 0 0 6px rgba(120,214,229,.6); }
.annotation-flow { top: 17%; left: 7%; }
.annotation-frazil { top: 46%; right: 7%; flex-direction: row-reverse; }
.annotation-anchor { bottom: 19%; left: 9%; }
.scene-compass { position: absolute; z-index: 2; top: 14px; right: 16px; width: 35px; height: 43px; display: flex; flex-direction: column; align-items: center; color: #8eb4bd; font-size: 8px; letter-spacing: .13em; pointer-events: none; }
.scene-compass i { width: 1px; height: 15px; margin: 3px 0; background: linear-gradient(var(--cyan), transparent); }
.scene-compass small { font-size: 6px; color: #678c97; }
.scene-footer-left, .scene-footer-right { position: absolute; z-index: 2; bottom: 12px; color: #9abac2; font-size: 7px; letter-spacing: .12em; pointer-events: none; }
.scene-footer-left { left: 14px; display: flex; align-items: center; gap: 6px; }
.scene-footer-right { right: 14px; color: #6f939e; }
.scene-footer-right span, .legend-sep { color: #416c79; padding: 0 3px; }
.scene-legend-dot { width: 6px; height: 6px; border-radius: 50%; background: #d6f8ff; box-shadow: 0 0 6px #baf6ff; }
.scene-legend-rock { width: 7px; height: 7px; border-radius: 2px; background: #8d8171; }
.scene-caption { display: flex; justify-content: space-between; align-items: center; min-height: 31px; padding: 0 13px; border-top: 1px solid rgba(137,191,204,.12); background: #0a1c25; color: #78959e; font-size: 8px; letter-spacing: .04em; }
.scene-caption > span:first-child, .caption-right { color: #577782; font-size: 7px; letter-spacing: .13em; }
.telemetry-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(10,28,37,.78); overflow: hidden; }
.telemetry-card { min-width: 0; padding: 12px 13px 11px; border-right: 1px solid var(--line); }
.telemetry-card:last-child { border-right: 0; }
.telemetry-label { display: flex; align-items: center; gap: 6px; color: #86a2ab; font-size: 7px; font-weight: 700; letter-spacing: .13em; white-space: nowrap; }
.telemetry-label b { color: #68b6c4; font-size: 6px; letter-spacing: .08em; }
.telemetry-value { margin-top: 7px; color: #e3f3f5; font-size: clamp(18px, 2vw, 24px); line-height: 1; font-weight: 570; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.telemetry-value small { color: #90adb5; font-size: 10px; font-weight: 450; letter-spacing: 0; }
.telemetry-note { margin-top: 7px; color: #64818b; font-size: 8px; white-space: nowrap; }
.telemetry-card-accent .telemetry-value { color: var(--cyan-2); }
.simulation-dock { display: flex; align-items: center; gap: 18px; min-height: 58px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(11,29,38,.92); }
.transport-controls, .dock-actions { display: flex; align-items: center; gap: 6px; }
.control-button { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(17,42,53,.72); color: #a9c0c7; font-size: 8px; font-weight: 700; letter-spacing: .1em; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.control-button:hover, .icon-button:hover { border-color: rgba(120,214,229,.48); background: rgba(39,87,101,.4); }
.control-button:active, .icon-button:active, .preset-button:active { transform: translateY(1px); }
.control-button.primary { color: #08202a; border-color: #8adce7; background: #8adce7; }
.control-button.primary:hover { background: #b5f0f4; }
.button-symbol { font-size: 13px; line-height: 1; }
.time-control { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 10px; }
.time-control label { color: #76949e; font-size: 7px; letter-spacing: .12em; white-space: nowrap; }
.time-control input { width: 100%; min-width: 50px; }
.time-control output { min-width: 38px; color: #c6e7eb; text-align: right; font-size: 9px; font-variant-numeric: tabular-nums; }
input[type="range"] { height: 3px; accent-color: var(--cyan); cursor: pointer; }
.dock-actions { padding-left: 10px; border-left: 1px solid var(--line); }
.icon-button { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: #9dbbc3; font-size: 15px; cursor: pointer; transition: .18s ease; }
#quality-button { font-size: 8px; font-weight: 750; letter-spacing: .05em; }
.science-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(9,26,35,.84); overflow: hidden; }
.science-panel summary { min-height: 58px; display: flex; align-items: center; gap: 11px; padding: 10px 14px; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(120,214,229,.2); border-radius: 7px; color: var(--cyan); font-size: 16px; }
.science-panel summary strong { display: block; font-size: 9px; letter-spacing: .13em; }
.science-panel summary small { display: block; margin-top: 4px; color: #78939c; font-size: 7px; letter-spacing: .11em; }
.summary-status { margin-left: auto; color: #678c96; font-size: 7px; letter-spacing: .12em; }
.summary-chevron { color: #85aab4; font-size: 15px; transition: transform .2s ease; }
.science-panel[open] .summary-chevron { transform: rotate(180deg); }
.science-content { padding: 0 14px 16px; border-top: 1px solid var(--line); }
.science-intro { padding: 17px 0 13px; }
.section-kicker { color: var(--cyan); font-size: 7px; font-weight: 750; letter-spacing: .16em; }
.science-intro h2 { margin: 6px 0; font-size: 17px; letter-spacing: -.025em; }
.science-intro p, .equation-card p, .validation-card p { max-width: 880px; color: #8ca7af; font-size: 10px; line-height: 1.6; }
.equation-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.equation-card { position: relative; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: rgba(17,43,54,.45); }
.equation-index { position: absolute; top: 10px; right: 11px; color: #52727d; font-size: 8px; }
.equation-card h3, .validation-card h3, .assumptions-card h3 { margin: 0 0 10px; font-size: 10px; }
.equation { min-height: 34px; display: flex; align-items: center; color: #c8eef0; font-family: Georgia, serif; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.equation sub { font-size: 8px; }
.equation-card p { margin: 9px 0 0; font-size: 9px; }
.science-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.validation-card, .assumptions-card { padding: 13px; border: 1px solid var(--line); border-radius: 7px; }
.validation-card h3, .assumptions-card h3 { margin: 6px 0; }
.validation-card p { margin: 0 0 11px; font-size: 9px; }
.validation-values { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.validation-values > div { display: grid; gap: 6px; }
.validation-values small { color: #698b95; font-size: 6px; letter-spacing: .1em; }
.validation-values strong { color: #d3f2f3; font-size: 12px; font-variant-numeric: tabular-nums; }
.validation-foot { margin-top: 9px; color: #6d8a94; font-size: 8px; }
.assumptions-card ul { margin: 9px 0 0; padding-left: 15px; color: #8ca7af; font-size: 9px; line-height: 1.65; }
.constants-line { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: #73919a; font-size: 7px; letter-spacing: .06em; }
.constants-line span:last-child { color: #e1bd85; }
.exhibit-footnote { margin-top: 13px; color: #5d7a84; font-size: 8px; letter-spacing: .02em; }
.control-panel { position: sticky; top: 16px; padding: 17px 16px 14px; border: 1px solid rgba(139,190,202,.17); border-radius: 11px; background: linear-gradient(160deg, rgba(15,39,49,.97), rgba(8,25,34,.98)); box-shadow: 0 18px 50px rgba(0,0,0,.16); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.panel-heading .eyebrow { font-size: 7px; }
.panel-heading h2 { margin: 6px 0 0; font-size: 20px; letter-spacing: -.04em; font-weight: 600; }
.panel-index { color: #4e737e; font-size: 10px; letter-spacing: .1em; }
.panel-description { margin: 9px 0 17px; color: #8da7ae; font-size: 10px; line-height: 1.55; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; color: #a8c3ca; font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.section-note { color: #5f7f89; font-size: 6px; font-weight: 500; }
.preset-block { padding: 12px 0 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.preset-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.preset-button { min-width: 0; min-height: 75px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: rgba(6,22,30,.5); text-align: left; cursor: pointer; transition: .18s ease; }
.preset-button:hover { border-color: rgba(120,214,229,.38); }
.preset-button.active { border-color: rgba(120,214,229,.55); background: rgba(49,107,120,.2); box-shadow: inset 0 0 0 1px rgba(120,214,229,.07); }
.preset-glyph { color: var(--cyan); font-size: 14px; line-height: 1; }
.preset-button strong { overflow: hidden; max-width: 100%; color: #c7dce0; font-size: 8px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.preset-button small { color: #718d96; font-size: 6px; white-space: nowrap; }
.parameter-block { padding-top: 15px; }
.control-list { display: grid; gap: 13px; }
.parameter { display: grid; gap: 6px; }
.parameter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.parameter-label { color: #b4cbd0; font-size: 9px; font-weight: 620; }
.parameter-value { color: var(--cyan-2); font-size: 9px; font-variant-numeric: tabular-nums; }
.parameter-description { color: #66838d; font-size: 7px; line-height: 1.35; }
.parameter input { width: 100%; margin: 2px 0 0; }
.parameter-scale { display: flex; justify-content: space-between; color: #57737d; font-size: 6px; letter-spacing: .05em; }
.panel-readout { margin-top: 18px; padding: 12px; border: 1px solid rgba(120,214,229,.19); border-radius: 7px; background: linear-gradient(130deg, rgba(40,91,103,.18), rgba(8,25,34,.45)); }
.panel-readout-heading { display: flex; justify-content: space-between; align-items: center; color: #8baab3; font-size: 7px; font-weight: 750; letter-spacing: .12em; }
.readout-live { display: flex; align-items: center; gap: 5px; color: #70c9ba; font-size: 6px; }
.readout-live i { width: 5px; height: 5px; border-radius: 50%; background: #70c9ba; }
.accretion-value { margin: 9px 0 10px; color: #d8f7f7; font-size: 25px; font-weight: 580; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.accretion-value small { color: #8baab3; font-size: 9px; letter-spacing: 0; }
.accretion-track { height: 4px; border-radius: 4px; background: rgba(151,190,199,.12); overflow: hidden; }
.accretion-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5eb6c5, #b7f0f5); transition: width .25s ease; }
.accretion-scale { display: flex; justify-content: space-between; margin-top: 6px; color: #56737d; font-size: 6px; letter-spacing: .08em; }
.panel-footer { display: flex; justify-content: space-between; gap: 6px; margin-top: 15px; padding-top: 10px; border-top: 1px solid var(--line); color: #5d7a84; font-size: 6px; letter-spacing: .1em; }
.panel-footer b { color: #91adb5; font-weight: 600; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 20px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 9px 13px; border: 1px solid rgba(120,214,229,.25); border-radius: 7px; background: #102d39; color: #d5f3f5; font-size: 9px; letter-spacing: .04em; box-shadow: 0 8px 30px rgba(0,0,0,.3); transition: .2s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.embed-mode .topbar, .embed-mode .exhibit-heading, .embed-mode .science-panel, .embed-mode .exhibit-footnote { display: none; }
.embed-mode .app-shell { padding: 0; }
.embed-mode .workspace { padding: 0; grid-template-columns: minmax(0,1fr) 300px; gap: 10px; }
.embed-mode .scene-frame { border-radius: 0; }
.embed-mode .scene-container { height: 100vh; max-height: 850px; }
@media (max-width: 1120px) {
  .app-shell { padding-left: 18px; padding-right: 18px; }
  .workspace { grid-template-columns: minmax(0,1fr) 300px; gap: 15px; }
  .control-panel { padding: 14px 12px; }
  .topbar-center { display: none; }
  .telemetry-card { padding: 10px 9px; }
  .telemetry-label { font-size: 6px; }
}
@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .control-panel { position: static; }
  .scene-container { height: clamp(340px, 56vw, 490px); }
  .control-list { grid-template-columns: repeat(2,1fr); column-gap: 18px; }
  .panel-description { max-width: 550px; }
  .embed-mode .workspace { grid-template-columns: 1fr; }
  .embed-mode .scene-container { height: 64vh; }
}
@media (max-width: 560px) {
  .app-shell { padding: 0 12px 20px; }
  .topbar { height: 53px; }
  .brand { min-width: 0; }
  .topbar-right { gap: 0; }
  .seed-label { display: none; }
  .webgl-status { font-size: 7px; }
  .workspace { padding-top: 16px; gap: 13px; }
  .exhibit-heading { margin-bottom: 12px; }
  h1 { max-width: 320px; font-size: 25px; }
  .subtitle { max-width: 340px; font-size: 10px; }
  .phenomenon-tag { padding: 6px; font-size: 6px; }
  .scene-topline { height: 31px; padding: 0 9px; font-size: 6px; }
  .scene-scale { display: none; }
  .scene-container { height: 53svh; min-height: 300px; max-height: 470px; }
  .annotation { font-size: 6px; }
  .annotation-line { width: 14px; }
  .annotation-flow { left: 4%; }
  .annotation-frazil { right: 3%; }
  .annotation-anchor { left: 5%; }
  .scene-footer-left, .scene-footer-right { font-size: 6px; bottom: 8px; }
  .scene-footer-right { max-width: 130px; text-align: right; }
  .scene-caption { min-height: 28px; padding: 0 8px; font-size: 7px; }
  .caption-right { display: none; }
  .telemetry-strip { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 9px; }
  .telemetry-card { padding: 10px; border-bottom: 1px solid var(--line); }
  .telemetry-card:nth-child(2) { border-right: 0; }
  .telemetry-card:nth-child(3), .telemetry-card:nth-child(4) { border-bottom: 0; }
  .telemetry-label { font-size: 6px; }
  .telemetry-value { font-size: 21px; }
  .telemetry-note { font-size: 7px; }
  .simulation-dock { flex-wrap: wrap; gap: 8px; padding: 8px; }
  .transport-controls { gap: 4px; }
  .control-button { height: 32px; padding: 0 8px; font-size: 7px; }
  .time-control { order: 3; flex-basis: 100%; padding: 4px 3px 1px; }
  .dock-actions { margin-left: auto; padding-left: 7px; }
  .icon-button { width: 29px; height: 29px; }
  .science-panel summary { padding: 9px; gap: 8px; }
  .summary-status { display: none; }
  .science-content { padding: 0 9px 12px; }
  .equation-grid, .science-bottom-grid { grid-template-columns: 1fr; }
  .equation-card { padding: 10px; }
  .equation-card p { font-size: 9px; }
  .validation-values { gap: 3px; }
  .validation-values strong { font-size: 10px; }
  .control-panel { padding: 14px 12px; }
  .control-list { grid-template-columns: 1fr; gap: 14px; }
  .preset-button { min-height: 72px; padding: 7px 6px; }
  .preset-button strong { font-size: 7px; }
  .preset-button small { font-size: 5.5px; }
  .panel-footer { font-size: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.variable-key { margin-top: 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; background: rgba(14,37,47,.42); }
.variable-key p { margin: 7px 0 10px; color: #8ca7af; font-size: 9px; line-height: 1.7; }
.variable-key p b { color: #d0edf0; font-weight: 650; }
.cause-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; color: #6e9099; font-size: 7px; letter-spacing: .11em; }
.cause-chain span { display: inline-flex; align-items: center; gap: 6px; }
.cause-chain b { color: #b8dce1; font-size: 8px; letter-spacing: .02em; font-weight: 600; }
.cause-chain i { color: var(--cyan); font-style: normal; }
