:root {
  color-scheme: dark;
  --bg: #07111d;
  --panel: #0d1a29;
  --panel-2: #102133;
  --panel-3: #14283a;
  --line: rgba(156, 190, 210, .13);
  --line-strong: rgba(156, 190, 210, .22);
  --text: #e9f2f6;
  --muted: #8ba3b4;
  --subtle: #5e788b;
  --cyan: #5bd0dc;
  --cyan-soft: rgba(91, 208, 220, .13);
  --amber: #e5b66e;
  --red: #e27b69;
  --green: #7ac8a8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-width: 320px; background: radial-gradient(ellipse at 45% -25%, #142a3b 0, #07111d 54%); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { min-height: 100vh; max-width: 1920px; margin: 0 auto; padding: 0 22px 10px; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 16px; }
.brand-lockup, .topbar-actions, .brand-mark, .scene-topline, .scene-top-right, .panel-head, .card-heading, .subhead, .transport-buttons, .speed-quality-row, .validation-note, .app-footer { display: flex; align-items: center; }
.brand-lockup { gap: 12px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border: 1px solid rgba(91,208,220,.35); border-radius: 10px; justify-content: center; gap: 3px; background: rgba(91,208,220,.07); transform: rotate(-7deg); }
.brand-mark span { display: block; width: 3px; border-radius: 5px; background: var(--cyan); transform: skew(-22deg); }
.brand-mark span:nth-child(1) { height: 11px; opacity: .55; }.brand-mark span:nth-child(2) { height: 18px; }.brand-mark span:nth-child(3) { height: 13px; opacity: .75; }
.brand-copy { min-width: 0; }
.eyebrow, .scene-kicker, .section-eyebrow, .subhead, .hud-label, .scene-footer, .app-footer, .chart-unit, .textbook-tag, .validation-values small, .readout small, .select-label, .quality-control > span, .range-ends, .tiny-muted { letter-spacing: .105em; text-transform: uppercase; }
.eyebrow { color: var(--cyan); font-size: 9px; font-weight: 750; line-height: 1.4; }
.eyebrow span { color: var(--subtle); }
.brand-title { font-size: 14px; font-weight: 650; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { gap: 9px; }
.live-chip { height: 30px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border-radius: 20px; background: rgba(122,200,168,.08); border: 1px solid rgba(122,200,168,.16); color: #9bd8bf; font-size: 9px; letter-spacing: .09em; font-weight: 700; }
.live-chip i { width: 6px; height: 6px; background: #7ac8a8; border-radius: 50%; box-shadow: 0 0 10px rgba(122,200,168,.6); }
.live-chip.running i { animation: pulse 1.2s infinite; }
.icon-button, .mini-button, .transport-button { border: 1px solid var(--line-strong); background: rgba(18,37,53,.7); color: #a8bfce; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover, .mini-button:hover, .transport-button:hover { color: var(--cyan); border-color: rgba(91,208,220,.45); background: rgba(91,208,220,.08); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 16px; padding-top: 16px; align-items: start; }
.visual-column { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.scene-card, .data-card, .control-panel { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, rgba(15,31,46,.98), rgba(9,22,35,.98)); box-shadow: 0 14px 36px rgba(0,0,0,.18); }
.scene-card { overflow: hidden; }
.scene-topline { justify-content: space-between; gap: 14px; padding: 15px 18px 12px; }
.scene-kicker, .section-eyebrow { color: var(--cyan); font-size: 8px; font-weight: 750; }
.scene-topline h1 { margin: 5px 0 0; font-size: clamp(16px, 1.5vw, 21px); font-weight: 620; letter-spacing: -.035em; }
.scene-top-right { gap: 10px; flex-shrink: 0; }
.scale-pill { border: 1px solid rgba(229,182,110,.24); background: rgba(229,182,110,.07); color: #d4b27e; border-radius: 20px; padding: 5px 8px; font-size: 8px; letter-spacing: .1em; font-weight: 700; }
.mini-button { padding: 6px 9px; border-radius: 7px; font-size: 10px; }
.scene-viewport { position: relative; height: clamp(320px, 43vh, 440px); min-height: 320px; overflow: hidden; background: radial-gradient(ellipse at 48% 43%, #1c3547 0, #0c1b2a 58%, #081421 100%); isolation: isolate; }
#sceneMount { position: absolute; inset: 0; z-index: 1; }
#sceneMount canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-vignette { pointer-events: none; position: absolute; z-index: 2; inset: 0; background: linear-gradient(90deg, rgba(6,16,27,.42), transparent 22%, transparent 78%, rgba(6,16,27,.2)), linear-gradient(0deg, rgba(6,16,27,.38), transparent 25%, transparent 75%, rgba(6,16,27,.14)); }
.scene-hud { position: absolute; z-index: 3; top: 16px; min-width: 118px; padding: 9px 11px; border: 1px solid rgba(155,190,210,.15); border-radius: 9px; background: rgba(7,17,29,.7); backdrop-filter: blur(8px); }
.scene-hud-left { left: 16px; }.scene-hud-right { right: 16px; width: 154px; }
.hud-label { color: #8ea6b7; font-size: 8px; font-weight: 700; }
.hud-value { margin-top: 4px; color: #e9f2f6; font-size: 23px; font-weight: 650; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.hud-value small { color: var(--cyan); font-size: 11px; font-weight: 600; }
.hud-sub { margin-top: 1px; color: #91a8b8; font-size: 9px; }
.pressure-track { height: 4px; margin: 7px 0 4px; background: rgba(130,160,180,.18); border-radius: 8px; overflow: hidden; }
.pressure-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #57c7d8, #e6b76e, #e47768); transition: width .15s linear; }
.scene-legend { position: absolute; z-index: 3; left: 16px; bottom: 15px; display: flex; flex-wrap: wrap; gap: 12px; color: #a8bfce; font-size: 9px; text-shadow: 0 1px 5px #06111b; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; vertical-align: 1px; }.legend-dot.sand { background: #c9a16d; }.legend-dot.water { background: #5bc7dc; }.legend-dot.pressure { background: #e17c69; }
.scene-footer { position: absolute; z-index: 3; right: 16px; bottom: 15px; display: flex; gap: 13px; color: rgba(160,184,200,.63); font-size: 7px; font-weight: 700; }
.scene-annotations { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.annotation { position: absolute; display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 5px; border-radius: 6px; border: 1px solid rgba(112,178,194,.22); background: rgba(7,17,29,.74); color: #d8e6eb; font-size: 9px; white-space: nowrap; opacity: .88; }
.annotation b { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 4px; background: rgba(91,208,220,.15); color: var(--cyan); font-size: 8px; }
.ann-one { left: 35%; top: 13%; }.ann-two { right: 31%; top: 52%; }.ann-three { right: 11%; bottom: 24%; }
.context-overlay { position: absolute; z-index: 8; inset: 0; display: grid; place-items: center; background: rgba(4,12,20,.88); backdrop-filter: blur(8px); }.context-overlay[hidden] { display: none; }
.context-card { display: grid; gap: 8px; max-width: 300px; padding: 20px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); text-align: center; }.context-card span { color: var(--muted); font-size: 12px; line-height: 1.5; }.context-card button { border: 0; border-radius: 7px; padding: 9px; background: var(--cyan); color: #06121c; font-weight: 750; cursor: pointer; }
.mechanism-strip { min-height: 62px; display: flex; align-items: center; padding: 9px 18px 11px; gap: 13px; border-top: 1px solid var(--line); background: rgba(6,17,28,.34); }
.mechanism-step { display: flex; align-items: center; gap: 9px; min-width: 0; opacity: .56; transition: opacity .2s ease; }.mechanism-step.active { opacity: 1; }
.mechanism-step > span { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; border-radius: 7px; border: 1px solid rgba(91,208,220,.22); color: var(--cyan); font-size: 9px; font-weight: 750; }
.mechanism-step b { display: block; font-size: 10px; font-weight: 700; }.mechanism-step small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.mechanism-connector { height: 1px; min-width: 14px; flex: 1; background: linear-gradient(90deg, rgba(91,208,220,.3), rgba(91,208,220,.05)); }
.lower-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 12px; }
.data-card { padding: 13px 15px 11px; min-width: 0; }
.card-heading { justify-content: space-between; gap: 8px; }.card-heading h2 { margin: 4px 0 0; font-size: 13px; font-weight: 650; letter-spacing: -.02em; }
.chart-unit { color: var(--muted); font-size: 8px; white-space: nowrap; }
.pressure-chart { display: block; width: 100%; height: 91px; margin-top: 2px; overflow: visible; }.chart-grid path { stroke: rgba(150,180,200,.12); stroke-width: 1; stroke-dasharray: 2 4; }.chart-labels { fill: #718b9d; font-size: 8px; font-family: inherit; }
.textbook-tag { color: #d9b67e; border: 1px solid rgba(229,182,110,.24); background: rgba(229,182,110,.08); padding: 4px 6px; border-radius: 5px; font-size: 7px; font-weight: 800; }
.equation { margin: 9px 0 10px; color: #d9edf1; font-family: Georgia, serif; font-size: 22px; letter-spacing: .01em; }.equation sub { font-size: 11px; }
.validation-values { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }.validation-values > div { min-width: 0; padding: 6px 7px; border-radius: 7px; background: rgba(132,166,187,.06); }.validation-values small { display: block; color: var(--muted); font-size: 7px; }.validation-values b { display: block; margin-top: 4px; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }.validation-values em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 500; }
.validation-note { gap: 6px; margin-top: 8px; color: #8cbfae; font-size: 8px; }.validation-note i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.control-panel { padding: 16px 15px 12px; max-height: calc(100vh - 98px); overflow: auto; scrollbar-width: thin; scrollbar-color: #294357 transparent; }
.panel-head { justify-content: space-between; margin-bottom: 15px; }.panel-head h2 { margin: 4px 0 0; font-size: 17px; font-weight: 650; letter-spacing: -.035em; }.panel-index { color: var(--subtle); font-size: 9px; letter-spacing: .08em; }
.subhead { justify-content: space-between; margin-bottom: 9px; color: #a8bfce; font-size: 8px; font-weight: 750; }.tiny-muted { color: #627e91; font-size: 7px; font-weight: 650; }
.preset-section { padding-bottom: 13px; border-bottom: 1px solid var(--line); }.preset-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.preset-button { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 8px 7px 7px; border: 1px solid var(--line); border-radius: 8px; background: rgba(18,38,54,.6); cursor: pointer; text-align: left; transition: border-color .18s ease, background .18s ease; }.preset-button:hover { border-color: rgba(91,208,220,.36); }.preset-button.selected { border-color: rgba(91,208,220,.5); background: rgba(91,208,220,.09); box-shadow: inset 0 0 0 1px rgba(91,208,220,.06); }
.preset-icon { display: grid; place-items: center; width: 19px; height: 19px; margin-bottom: 6px; border-radius: 5px; font-size: 13px; }.stable-icon { color: #83c6a9; background: rgba(131,198,169,.1); }.marginal-icon { color: #e1ba7b; background: rgba(225,186,123,.1); }.severe-icon { color: #e17d6c; background: rgba(225,125,108,.1); }
.preset-button b { font-size: 9px; font-weight: 700; white-space: nowrap; }.preset-button small { margin-top: 3px; color: var(--muted); font-size: 7px; white-space: nowrap; }
.sliders-section { padding: 13px 0 12px; border-bottom: 1px solid var(--line); }.control-row { margin-top: 11px; }.control-row label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: #c6d5dd; font-size: 10px; }.control-row label b { color: #e8f2f5; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }.control-row label small { color: var(--cyan); font-size: 8px; font-weight: 550; }
input[type="range"] { display: block; width: 100%; height: 14px; margin: 5px 0 0; accent-color: var(--cyan); cursor: pointer; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, rgba(91,208,220,.55), rgba(91,208,220,.18)); }input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4px; border: 2px solid #07131f; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 2px rgba(91,208,220,.25); }input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: rgba(91,208,220,.25); }input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #07131f; border-radius: 50%; background: var(--cyan); }
.range-ends { display: flex; justify-content: space-between; color: #637e91; font-size: 7px; letter-spacing: .04em; }
.readout-section { padding: 13px 0 12px; border-bottom: 1px solid var(--line); }.readout-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; }.readout { padding: 8px 9px 7px; border-radius: 8px; border: 1px solid rgba(145,177,197,.1); background: rgba(18,38,54,.55); }.readout small { display: block; color: var(--muted); font-size: 7px; font-weight: 650; }.readout b { display: inline-block; margin-top: 4px; font-size: 18px; line-height: 1; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }.readout > span { display: block; margin-top: 4px; color: #718b9d; font-size: 8px; }.readout > span i { display: inline-block; margin-left: 3px; color: var(--amber); font-style: normal; }
.transport-section { padding: 13px 0 12px; border-bottom: 1px solid var(--line); }.transport-buttons { gap: 6px; }.play-button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 34px; border: 0; border-radius: 8px; background: linear-gradient(110deg, #67d5dc, #65c2d2); color: #06141e; font-size: 10px; font-weight: 800; cursor: pointer; transition: filter .18s ease, transform .18s ease; }.play-button:hover { filter: brightness(1.08); transform: translateY(-1px); }.play-glyph { font-size: 9px; }.transport-button { width: 35px; height: 34px; border-radius: 8px; font-size: 14px; }.speed-quality-row { justify-content: space-between; gap: 10px; margin-top: 11px; }.select-label, .quality-control > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 7px; font-weight: 750; }.select-label select { min-width: 70px; padding: 5px 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: #122638; color: var(--text); font-size: 9px; }.quality-control { display: flex; align-items: center; gap: 7px; }.segmented { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: rgba(3,12,21,.4); }.segmented button { padding: 4px 6px; border: 0; border-radius: 4px; background: transparent; color: #718b9d; font-size: 7px; font-weight: 750; cursor: pointer; }.segmented button.active { background: rgba(91,208,220,.15); color: var(--cyan); }
.science-panel { margin-top: 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(13,30,45,.7); }.science-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 10px 11px; color: #d7e5ea; font-size: 10px; font-weight: 700; cursor: pointer; list-style: none; }.science-panel summary::-webkit-details-marker { display: none; }.science-panel summary > span:first-child { display: flex; align-items: center; gap: 8px; }.science-icon { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 5px; background: rgba(91,208,220,.12); color: var(--cyan); font-size: 13px; }.summary-plus { color: var(--muted); transition: transform .18s ease; }.science-panel[open] .summary-plus { transform: rotate(45deg); }.science-content { padding: 0 11px 12px; color: #9eb4c1; font-size: 9px; line-height: 1.55; }.science-content p { margin: 7px 0; }.science-lead { color: #c3d5dd; }.science-content h3 { margin: 13px 0 5px; color: #dce9ed; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }.science-equation { margin: 7px 0; padding: 8px; border-left: 2px solid rgba(91,208,220,.6); border-radius: 0 5px 5px 0; background: rgba(91,208,220,.06); color: #e0edf0; font-family: Georgia,serif; font-size: 14px; }.science-equation sub { font-size: 8px; }.science-content ul { padding-left: 16px; margin: 5px 0; }.science-content li { margin: 4px 0; }.science-content li b { color: #dce9ed; }.source-note { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); color: #718b9d; font-size: 8px; }
.disclaimer { margin-top: 10px; color: #607a8d; font-size: 8px; line-height: 1.4; }.app-footer { justify-content: space-between; padding: 12px 3px 0; color: #567083; font-size: 7px; font-weight: 700; }.app-footer i { color: var(--cyan); font-style: normal; margin: 0 4px; }
@keyframes pulse { 0%,100% { opacity: .55; box-shadow: 0 0 0 0 rgba(122,200,168,.4); } 50% { opacity: 1; box-shadow: 0 0 0 5px rgba(122,200,168,0); } }
@media (min-width: 1500px) { .workspace { grid-template-columns: minmax(0, 1fr) 370px; }.scene-viewport { height: min(52vh, 590px); } }
@media (max-width: 1050px) { .app-shell { padding: 0 14px 10px; }.workspace { grid-template-columns: minmax(0,1fr) 320px; gap: 12px; }.control-panel { padding: 13px 12px; }.scene-viewport { height: 390px; }.lower-grid { grid-template-columns: 1fr; }.validation-card { display: none; } }
@media (max-width: 760px) { .app-shell { padding: 0 10px 12px; }.topbar { height: 60px; }.brand-title { font-size: 12px; }.brand-mark { width: 30px; height: 30px; }.live-chip { padding: 0 8px; font-size: 7px; }.topbar-actions { gap: 5px; }.icon-button { width: 31px; height: 31px; }.workspace { display: flex; flex-direction: column; gap: 12px; padding-top: 10px; }.visual-column, .control-panel { width: 100%; }.scene-topline { padding: 12px 12px 10px; }.scene-topline h1 { font-size: 16px; }.scale-pill { display: none; }.scene-viewport { height: min(52vh, 420px); min-height: 300px; }.scene-hud { top: 10px; padding: 7px 8px; }.scene-hud-left { left: 10px; }.scene-hud-right { right: 10px; width: 132px; }.hud-value { font-size: 19px; }.scene-legend { left: 10px; bottom: 10px; gap: 8px; font-size: 8px; }.scene-footer { display: none; }.ann-one { left: 28%; top: 17%; }.ann-two { right: 19%; top: 54%; }.ann-three { right: 5%; bottom: 25%; }.annotation { font-size: 8px; }.mechanism-strip { padding: 8px 10px; gap: 7px; min-height: 58px; }.mechanism-step { gap: 5px; }.mechanism-step > span { width: 22px; height: 22px; }.mechanism-step b { font-size: 9px; }.mechanism-step small { font-size: 7px; }.mechanism-connector { min-width: 5px; }.lower-grid { grid-template-columns: 1fr; }.chart-card { padding: 11px 12px; }.control-panel { max-height: none; overflow: visible; }.panel-head { margin-bottom: 12px; }.preset-button { padding: 8px 6px; }.preset-button b { font-size: 8px; }.preset-button small { font-size: 6px; }.sliders-section { padding-top: 12px; }.control-row { margin-top: 12px; }.readout-grid { grid-template-columns: repeat(2,1fr); }.validation-card { display: block; }.app-footer { gap: 10px; font-size: 6px; } }
@media (max-width: 390px) { .brand-title { max-width: 190px; }.eyebrow { font-size: 8px; }.scene-topline h1 { font-size: 14px; }.scene-viewport { min-height: 285px; }.scene-hud-right { width: 116px; }.hud-label { font-size: 7px; }.ann-one { left: 24%; }.ann-two { right: 12%; }.ann-three { right: 3%; }.annotation { padding: 4px; font-size: 7px; }.mechanism-step small { white-space: normal; max-width: 75px; }.preset-button b { font-size: 7px; }.preset-button small { 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; } }
.embed-mode .topbar, .embed-mode .app-footer { display: none; }.embed-mode .workspace { padding-top: 0; }.embed-mode .app-shell { padding: 0; }.embed-mode .scene-card, .embed-mode .control-panel { border-radius: 0; }
