:root {
  color-scheme: dark;
  --bg: #06141d;
  --panel: #0a1b25;
  --panel-2: #0d222d;
  --line: rgba(163, 205, 219, .14);
  --text: #e7f3f5;
  --muted: #8caab4;
  --faint: #5d7c88;
  --cyan: #7de1e8;
  --ice: #a9e8f4;
  --amber: #e9b97c;
  --font: 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); font-family: var(--font); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: 100%; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 366px; background: #06141d; }
.stage { min-width: 0; min-height: 0; position: relative; overflow: hidden; background: radial-gradient(ellipse at 47% 38%, #123342 0%, #081d29 44%, #04121a 100%); }
.scene-root { position: absolute; inset: 0; z-index: 0; }
.scene-root canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(180deg, rgba(2,12,18,.52) 0%, transparent 21%, transparent 75%, rgba(2,10,15,.64) 100%), radial-gradient(ellipse at 50% 48%, transparent 35%, rgba(1,9,14,.22) 100%); }
.topbar { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 28px 0; pointer-events: none; }
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark { width: 26px; height: 31px; display: flex; align-items: center; justify-content: center; gap: 3px; transform: skewY(-16deg); }
.brand-mark span { display: block; width: 5px; border-radius: 4px; background: linear-gradient(180deg, #c9f8fb, #57b9cd); box-shadow: 0 0 12px rgba(125,225,232,.3); }
.brand-mark span:nth-child(1) { height: 14px; opacity: .65; }
.brand-mark span:nth-child(2) { height: 27px; }
.brand-mark span:nth-child(3) { height: 19px; opacity: .8; }
.eyebrow { color: #83a9b6; font-size: 9px; line-height: 1.4; letter-spacing: .19em; font-weight: 750; }
.eyebrow span { color: #426a79; padding: 0 3px; }
h1 { margin: 4px 0 0; font-size: clamp(17px, 1.7vw, 23px); font-weight: 600; letter-spacing: -.045em; line-height: 1.2; color: #e9f6f7; }
h1 span { color: #74c7d4; font-weight: 350; }
.topbar-right { display: flex; align-items: center; gap: 13px; pointer-events: auto; }
.live-indicator { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid rgba(128,205,212,.18); border-radius: 20px; background: rgba(5,21,29,.5); color: #a4c6ce; font-size: 9px; font-weight: 750; letter-spacing: .13em; backdrop-filter: blur(10px); }
.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: #70e1c3; box-shadow: 0 0 10px #70e1c3; animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.icon-button { width: 31px; height: 31px; border: 1px solid rgba(159,205,218,.22); border-radius: 50%; background: rgba(5,21,29,.56); display: grid; place-items: center; cursor: pointer; }
.info-glyph { font-family: Georgia, serif; font-style: italic; font-size: 17px; color: #a6d8df; }
.scene-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.scene-label { position: absolute; display: flex; align-items: center; gap: 8px; color: rgba(196,232,238,.86); font-size: 8px; letter-spacing: .14em; font-weight: 800; white-space: nowrap; text-shadow: 0 2px 8px rgba(0,0,0,.8); transition: opacity .3s; }
.scene-label b { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; border: 1px solid rgba(131,218,229,.65); color: #a8f0f3; font-size: 8px; background: rgba(5,25,34,.75); }
.scene-label i { width: 32px; height: 1px; background: linear-gradient(90deg, rgba(121,221,230,.7), transparent); }
.label-source { top: 27%; left: 14%; }
.label-flow { top: 53%; right: 9%; flex-direction: row-reverse; }
.label-front { bottom: 21%; left: 20%; }
.depth-ruler { position: absolute; z-index: 2; right: 19px; top: 27%; bottom: 22%; width: 37px; color: rgba(160,203,213,.72); pointer-events: none; font-size: 8px; letter-spacing: .1em; }
.ruler-line { position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, rgba(129,215,225,.7), rgba(129,215,225,.08)); }
.ruler-line::before, .ruler-line::after { content: ""; position: absolute; left: -3px; width: 7px; height: 1px; background: #8adbe3; }
.ruler-line::before { top: 0; } .ruler-line::after { bottom: 0; }
.ruler-top, .ruler-bottom { position: absolute; left: 12px; }
.ruler-top { top: -4px; } .ruler-bottom { bottom: -4px; }
.ruler-caption { position: absolute; top: 50%; left: -9px; transform: translate(-100%,-50%) rotate(-90deg); transform-origin: right center; white-space: nowrap; font-size: 7px; letter-spacing: .22em; opacity: .6; }
.readout-rail { position: absolute; z-index: 3; top: 96px; right: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; width: 252px; }
.readout-card { min-width: 0; padding: 10px 11px 9px; border: 1px solid rgba(139,192,207,.16); border-radius: 7px; background: linear-gradient(135deg, rgba(7,25,34,.82), rgba(6,20,28,.58)); backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(0,0,0,.14); }
.readout-label { display: flex; align-items: center; justify-content: space-between; gap: 4px; color: #8db1bd; font-size: 7px; letter-spacing: .13em; font-weight: 800; white-space: nowrap; }
.readout-label em { font-style: normal; font-size: 6px; color: #5c8491; letter-spacing: .08em; }
.readout-card strong { display: block; margin-top: 5px; font-size: 21px; line-height: 1.1; font-weight: 550; letter-spacing: -.04em; color: #e3f5f6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-card strong small { font-size: 9px; font-weight: 500; letter-spacing: 0; color: #90b8c2; }
.readout-track { height: 2px; background: rgba(112,166,180,.18); margin-top: 8px; border-radius: 2px; overflow: hidden; }
.readout-track i { display: block; width: 4%; height: 100%; background: #77d8e0; box-shadow: 0 0 7px #77d8e0; transition: width .2s; }
.readout-sub { margin-top: 7px; color: #698d99; font-size: 8px; letter-spacing: .02em; }
.bottom-overlay { position: absolute; z-index: 3; left: 27px; right: 25px; bottom: 74px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: #a0bbc3; font-size: 8px; letter-spacing: .04em; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.legend-ice { background: #b5f0f5; box-shadow: 0 0 8px #8ddfe9; }
.legend-brine { background: #36b7bb; box-shadow: 0 0 8px #36b7bb; }
.legend-particles { background: #d7c69c; }
.camera-hint { color: #6f929e; font-size: 8px; letter-spacing: .12em; font-weight: 750; }
.camera-hint span { margin: 0 5px; color: #426a79; }
.mouse-icon { font-size: 15px; vertical-align: -2px; }
.context-banner { position: absolute; z-index: 3; left: 27px; bottom: 20px; display: flex; align-items: center; gap: 12px; max-width: min(600px, 74%); padding: 10px 13px; border-left: 2px solid rgba(120,215,225,.65); background: linear-gradient(90deg, rgba(7,25,34,.76), rgba(7,25,34,.12)); color: #a7c4cc; font-size: 10px; line-height: 1.45; backdrop-filter: blur(6px); }
.context-index { flex: 0 0 auto; color: #7dd8e0; font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.context-loss { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(2,10,15,.75); backdrop-filter: blur(8px); }
.loss-card { max-width: 300px; text-align: center; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: #0a1c26; }
.loss-symbol { color: var(--cyan); font-size: 30px; }
.loss-card h2 { font-size: 18px; margin: 8px 0; }
.loss-card p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.primary-button { border: 0; border-radius: 5px; background: #77d5de; color: #05202a; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 10px 14px; cursor: pointer; }
.control-deck { position: relative; z-index: 5; min-width: 0; overflow: auto; background: linear-gradient(180deg, #0a1c26 0%, #081923 100%); border-left: 1px solid rgba(138,185,198,.15); padding: 23px 20px 14px; scrollbar-width: thin; scrollbar-color: #244553 transparent; }
.deck-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 17px; }
.deck-head h2 { margin: 4px 0 0; font-size: 18px; font-weight: 580; letter-spacing: -.035em; }
.elapsed-block { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.elapsed-block span { color: #7195a1; font-size: 7px; letter-spacing: .15em; font-weight: 800; }
.elapsed-block strong { color: #b9dfe3; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.preset-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-bottom: 21px; }
.preset-button { border: 1px solid rgba(130,183,198,.16); border-radius: 5px; padding: 9px 5px 8px; text-align: left; background: rgba(13,36,47,.65); color: #a8c2c9; font-size: 10px; font-weight: 700; line-height: 1.35; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.preset-button small { display: inline-block; margin-top: 3px; color: #688a96; font-size: 7px; font-weight: 500; }
.preset-button:hover { border-color: rgba(121,217,225,.42); }
.preset-button.active { border-color: rgba(116,213,223,.62); background: linear-gradient(135deg, rgba(39,104,119,.42), rgba(16,51,64,.7)); color: #e0f5f6; box-shadow: inset 0 0 0 1px rgba(116,213,223,.07); }
.preset-button.active small { color: #8ec7d0; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 14px; }
.control-item { display: block; min-width: 0; }
.control-title { display: flex; justify-content: space-between; gap: 4px; align-items: baseline; color: #a7c1c8; font-size: 9px; line-height: 1.4; }
.control-title b { color: #d5edf0; font-size: 10px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
input[type="range"] { display: block; width: 100%; height: 15px; margin: 8px 0 3px; appearance: none; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, #397d8b, #274a59); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, #397d8b, #274a59); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; margin-top: -3.5px; border: 2px solid #c6f2f4; border-radius: 50%; background: #4eabb9; box-shadow: 0 0 0 3px rgba(87,183,194,.12); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #c6f2f4; border-radius: 50%; background: #4eabb9; box-shadow: 0 0 0 3px rgba(87,183,194,.12); }
input[type="range"]:focus-visible { outline: 1px solid #8fe5e9; outline-offset: 3px; border-radius: 5px; }
.control-range { display: flex; justify-content: space-between; color: #5f808b; font-size: 7px; letter-spacing: .02em; }
.deck-divider { height: 1px; background: var(--line); margin: 21px 0 14px; }
.transport-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.transport-main { display: flex; align-items: center; gap: 6px; }
.play-button { display: flex; align-items: center; gap: 8px; height: 35px; border: 0; border-radius: 5px; padding: 0 13px; background: linear-gradient(135deg,#8be4e9,#5db9c7); color: #05212a; font-size: 9px; letter-spacing: .12em; font-weight: 850; cursor: pointer; box-shadow: 0 4px 15px rgba(64,171,185,.14); }
.play-icon { font-size: 13px; line-height: 1; }
.transport-button { height: 34px; padding: 0 9px; border: 1px solid rgba(129,183,197,.2); border-radius: 5px; background: rgba(12,35,45,.8); color: #a8c4cb; font-size: 8px; letter-spacing: .08em; font-weight: 800; cursor: pointer; }
.transport-button span { color: #80d5de; margin-left: 4px; font-size: 13px; vertical-align: -1px; }
.quality-control { display: flex; gap: 2px; padding: 3px; border: 1px solid rgba(129,183,197,.17); border-radius: 5px; background: rgba(4,17,24,.55); }
.quality-button { border: 0; border-radius: 3px; padding: 6px 7px; background: transparent; color: #648590; font-size: 7px; letter-spacing: .1em; font-weight: 800; cursor: pointer; }
.quality-button.active { color: #d3eef0; background: #214653; }
.utility-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 13px; }
.utility-button { display: flex; align-items: center; gap: 5px; padding: 6px 4px; border: 0; background: transparent; color: #83a5af; font-size: 8px; cursor: pointer; white-space: nowrap; }
.utility-button span { color: #78cbd4; font-size: 13px; }
.utility-button:hover { color: #d7f2f3; }
.science-button .chevron { color: #648b97; font-size: 13px; margin-left: 0; transition: transform .2s; }
.science-button.open .chevron { transform: rotate(180deg); }
.science-panel { margin-top: 13px; padding: 14px 13px; border: 1px solid rgba(126,191,204,.18); border-radius: 7px; background: rgba(4,17,24,.5); animation: panelIn .22s ease-out; }
@keyframes panelIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.science-heading { display: flex; justify-content: space-between; align-items: center; }
.science-heading button { border: 0; background: transparent; color: #86b8c2; font-size: 20px; cursor: pointer; }
.science-panel h3 { margin: 8px 0 12px; font-size: 14px; font-weight: 600; letter-spacing: -.02em; }
.mechanism-steps { display: grid; gap: 10px; }
.mechanism-steps > div { border-left: 1px solid rgba(116,209,219,.38); padding-left: 9px; }
.mechanism-steps b { color: #83d4dc; font-size: 7px; letter-spacing: .12em; }
.mechanism-steps p { margin: 4px 0 0; color: #91abb3; font-size: 9px; line-height: 1.55; }
.equation-card { margin-top: 14px; padding: 10px; border-radius: 5px; background: rgba(16,45,57,.58); display: grid; gap: 6px; }
.equation-label { color: #6e9aa7; font-size: 6px; letter-spacing: .12em; font-weight: 800; }
.equation-card code { color: #d2eef0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; white-space: normal; line-height: 1.45; }
.validation-card { margin-top: 12px; padding: 10px; border: 1px solid rgba(128,196,208,.17); border-radius: 5px; }
.validation-title { display: flex; justify-content: space-between; align-items: center; color: #80b6c0; font-size: 7px; letter-spacing: .1em; font-weight: 800; }
.validation-title b { color: #a9dfe3; font-size: 8px; }
.validation-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-top: 10px; }
.validation-grid div { min-width: 0; }
.validation-grid small { display: block; color: #62828d; font-size: 6px; line-height: 1.4; letter-spacing: .04em; }
.validation-grid strong { display: block; margin-top: 4px; color: #d9eff0; font-size: 10px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.validation-card p, .assumption-note p { color: #7f9ca5; font-size: 8px; line-height: 1.55; margin: 9px 0 0; }
.assumption-note { margin-top: 13px; }
.assumption-note b { color: #83b4bf; font-size: 7px; letter-spacing: .12em; }
.assumption-note p { margin-top: 5px; }
.assumption-note .institution-note { color: #9ab9c1; font-style: italic; }
.deck-foot { display: flex; justify-content: space-between; gap: 5px; padding-top: 14px; margin-top: 14px; border-top: 1px solid rgba(140,187,200,.1); color: #52727e; font-size: 6px; font-weight: 800; letter-spacing: .14em; }
.deck-foot i { color: #79cbd4; font-style: normal; padding: 0 3px; }
button:focus-visible { outline: 2px solid #a4edf0; outline-offset: 2px; }
[hidden] { display: none !important; }
body.embed .topbar { padding-top: 14px; }
body.embed .context-banner { bottom: 12px; }
body.embed .bottom-overlay { bottom: 58px; }
body.embed .control-deck { padding-top: 16px; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: minmax(0,1fr) 340px; }
  .control-deck { padding-left: 16px; padding-right: 16px; }
  .readout-rail { right: 16px; width: 230px; }
  .scene-label { font-size: 7px; }
}
@media (max-width: 760px) {
  html, body { overflow: auto; min-height: 100%; }
  .app-shell { height: auto; min-height: 100%; display: flex; flex-direction: column; }
  .stage { height: min(61svh, 560px); min-height: 420px; flex: 0 0 auto; }
  .topbar { padding: 15px 15px 0; }
  .brand-lockup { gap: 9px; }
  .brand-mark { transform: scale(.85) skewY(-16deg); transform-origin: center; }
  .eyebrow { font-size: 7px; }
  h1 { max-width: 245px; font-size: 16px; }
  .live-indicator { padding: 6px 8px; font-size: 7px; }
  .topbar-right { gap: 7px; }
  .icon-button { width: 28px; height: 28px; }
  .readout-rail { top: 72px; right: 12px; width: 184px; gap: 5px; }
  .readout-card { padding: 7px 8px 6px; }
  .readout-label { font-size: 6px; }
  .readout-label em { font-size: 5px; }
  .readout-card strong { font-size: 17px; margin-top: 4px; }
  .readout-card strong small { font-size: 7px; }
  .readout-sub { font-size: 6px; margin-top: 5px; }
  .readout-track { margin-top: 6px; }
  .scene-label { font-size: 6px; gap: 5px; }
  .scene-label b { width: 16px; height: 16px; font-size: 7px; }
  .scene-label i { width: 16px; }
  .label-source { left: 8%; top: 34%; }
  .label-flow { right: 7%; top: 58%; }
  .label-front { left: 10%; bottom: 25%; }
  .depth-ruler { right: 8px; top: 34%; bottom: 27%; transform: scale(.85); transform-origin: right center; }
  .bottom-overlay { left: 13px; right: 13px; bottom: 62px; align-items: flex-end; }
  .legend { gap: 8px; font-size: 7px; }
  .camera-hint { display: none; }
  .context-banner { left: 13px; bottom: 11px; max-width: calc(100% - 26px); padding: 8px 9px; gap: 8px; font-size: 8px; }
  .context-index { font-size: 6px; }
  .control-deck { overflow: visible; border-left: 0; border-top: 1px solid rgba(138,185,198,.15); padding: 17px 16px 20px; }
  .deck-head { margin-bottom: 13px; }
  .deck-head h2 { font-size: 17px; }
  .preset-row { margin-bottom: 16px; }
  .control-grid { gap: 15px 13px; }
  .deck-divider { margin: 17px 0 12px; }
  .utility-row { margin-top: 10px; }
  .science-panel { margin-bottom: 6px; }
  .deck-foot { margin-top: 12px; }
}
@media (max-width: 420px) {
  .stage { height: 56svh; min-height: 400px; }
  .readout-rail { width: 165px; top: 73px; }
  .readout-card strong { font-size: 15px; }
  .readout-label { letter-spacing: .08em; }
  .readout-label em { display: none; }
  .scene-labels .label-flow { right: 3%; }
  .label-front { left: 5%; }
  .utility-button { font-size: 7px; }
  .transport-button { padding: 0 7px; }
  .quality-button { padding: 6px 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.research-links { display: grid; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(126,191,204,.12); }
.research-links b { color: #83b4bf; font-size: 7px; letter-spacing: .12em; }
.research-links a { color: #91c7d0; font-size: 8px; line-height: 1.4; text-decoration: none; }
.research-links a:hover { color: #d8f3f4; text-decoration: underline; }
