:root {
  color-scheme: dark;
  --bg: #07131b;
  --bg-soft: #0a1a23;
  --panel: rgba(12, 29, 38, 0.92);
  --panel-2: rgba(13, 34, 43, 0.92);
  --line: rgba(121, 189, 194, 0.16);
  --line-strong: rgba(121, 189, 194, 0.28);
  --text: #e5f1ee;
  --muted: #8ba6a6;
  --dim: #5d7b7d;
  --cyan: #70d7d6;
  --cyan-2: #3eb4bd;
  --gold: #d6b77c;
  --radius: 13px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 52% -18%, rgba(36, 112, 121, 0.22), transparent 43%),
    linear-gradient(180deg, #07131b 0%, #081820 55%, #06121a 100%);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { max-width: 1720px; margin: 0 auto; padding: 0 34px 32px; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(120, 181, 186, .12); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #eaf5f2; font-size: 12px; font-weight: 850; letter-spacing: .16em; }
.brand-light { color: #84a5a5; font-weight: 500; }
.brand-mark { width: 22px; height: 22px; display: flex; align-items: end; gap: 2px; padding: 3px; border: 1px solid rgba(112,215,214,.48); border-radius: 6px; transform: skewY(-9deg); }
.brand-mark i { display: block; flex: 1; border-radius: 2px 2px 1px 1px; background: var(--cyan); }
.brand-mark i:nth-child(1) { height: 7px; opacity: .58; }
.brand-mark i:nth-child(2) { height: 12px; opacity: .82; }
.brand-mark i:nth-child(3) { height: 16px; }
.topbar-right { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.eyebrow { color: #789a9b; }
.status { display: inline-flex; align-items: center; gap: 7px; color: #a7c4c0; }
.status-dot, .live-pulse, .clock-dot { width: 6px; height: 6px; border-radius: 50%; background: #68d5b7; box-shadow: 0 0 10px rgba(104,213,183,.75); }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 40px; padding: 35px 0 28px; }
.intro-copy { max-width: 750px; }
.kicker { display: flex; align-items: center; gap: 9px; color: #6c9b9c; font-size: 9px; font-weight: 700; letter-spacing: .22em; }
.kicker-line { width: 19px; height: 1px; background: #3c8e91; }
h1 { margin: 10px 0 0; font-size: clamp(34px, 4.2vw, 54px); font-weight: 650; letter-spacing: -.055em; line-height: 1.04; }
h1 em { color: var(--cyan); font-style: normal; font-weight: 400; }
.subtitle { margin: 6px 0 10px; color: #c5d9d5; font-size: 17px; letter-spacing: .015em; }
.lede { max-width: 710px; margin: 0; color: #89a5a4; font-size: 12px; line-height: 1.7; }
.intro-meta { display: grid; grid-template-columns: repeat(3, minmax(105px, 1fr)); gap: 18px; padding-bottom: 3px; }
.intro-meta div { display: grid; gap: 5px; border-left: 1px solid var(--line-strong); padding-left: 11px; }
.meta-label { color: #63898c; font-size: 8px; letter-spacing: .16em; }
.intro-meta strong { color: #c4d7d3; font-size: 10px; font-weight: 550; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 326px; gap: 14px; align-items: stretch; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(15,35,44,.94), rgba(9,24,32,.96)); box-shadow: 0 18px 45px rgba(0,0,0,.14), inset 0 1px 0 rgba(180,230,222,.025); }
.scene-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.scene-topline { height: 47px; padding: 0 14px 0 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(121,189,194,.12); }
.scene-heading { display: flex; align-items: center; gap: 9px; color: #c0d7d2; font-size: 9px; font-weight: 750; letter-spacing: .15em; }
.live-pulse { width: 6px; height: 6px; }
.scene-separator { color: #426c70; }
.muted { color: #6e8b8c; font-weight: 500; }
.scene-actions { display: flex; align-items: center; gap: 5px; }
.icon-button, .quality-toggle { min-width: 30px; height: 27px; padding: 0 8px; border: 1px solid rgba(116,176,181,.17); border-radius: 6px; background: rgba(17,42,51,.7); color: #8db4b2; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
.icon-button:hover, .quality-toggle:hover { border-color: rgba(112,215,214,.5); color: #d5f0e9; }
.icon-button { font-size: 16px; line-height: 1; }
.icon-camera { display: inline-block; transform: translateY(-1px); }
.quality-toggle { font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.quality-toggle.active { background: rgba(53,131,137,.24); border-color: rgba(112,215,214,.4); color: var(--cyan); }
.scene-wrap { position: relative; height: clamp(390px, 43vw, 610px); min-height: 390px; overflow: hidden; background: radial-gradient(ellipse at 50% 44%, #102b35, #07131b 76%); }
#scene { position: absolute; inset: 0; }
#scene canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.scene-overlay { position: absolute; z-index: 3; left: 14px; right: 14px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.scene-overlay-top { top: 13px; }
.scene-overlay-bottom { bottom: 12px; }
.overlay-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid rgba(108,194,191,.2); border-radius: 5px; background: rgba(5,20,27,.65); color: #a5cfca; font-size: 8px; font-weight: 750; letter-spacing: .13em; backdrop-filter: blur(7px); }
.chip-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.overlay-hint { color: rgba(163,197,192,.58); font-size: 8px; letter-spacing: .13em; }
.overlay-hint span { padding: 0 5px; color: var(--cyan); }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 7px 9px; border: 1px solid rgba(108,194,191,.16); border-radius: 5px; background: rgba(5,20,27,.62); backdrop-filter: blur(7px); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: #91b3af; font-size: 7px; letter-spacing: .1em; }
.legend-item i { display: inline-block; width: 12px; height: 3px; border-radius: 3px; }
.legend-cyan { background: #5fbec7; }
.legend-foam { background: #c8e8e3; }
.legend-gold { background: var(--gold); }
.scene-scale { display: flex; align-items: center; gap: 6px; color: #83a7a4; font-size: 8px; }
.scene-scale i { display: block; width: 50px; height: 1px; background: #7faeaa; position: relative; }
.scene-scale i::before, .scene-scale i::after { content: ""; position: absolute; top: -3px; width: 1px; height: 7px; background: #7faeaa; }
.scene-scale i::before { left: 0; } .scene-scale i::after { right: 0; }
.context-label { position: absolute; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid rgba(104,190,188,.18); border-radius: 4px; background: rgba(5,18,24,.55); color: #b6d3cd; font-size: 7px; font-weight: 700; letter-spacing: .11em; pointer-events: none; backdrop-filter: blur(4px); }
.label-icon { color: var(--cyan); font-size: 12px; }
.label-wind { top: 18%; left: 14%; }
.label-down { top: 47%; left: 39%; }
.label-up { top: 62%; left: 61%; }
.webgl-message { position: absolute; z-index: 8; inset: 25% 12%; display: grid; place-items: center; padding: 22px; border: 1px solid rgba(112,215,214,.3); border-radius: 10px; background: rgba(4,15,21,.92); color: #d5ebe5; text-align: center; font-size: 13px; }
.webgl-message[hidden] { display: none; }
.transport-bar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 14px; border-top: 1px solid rgba(121,189,194,.12); background: rgba(5,18,25,.55); }
.transport-controls { display: flex; gap: 6px; }
.transport-button { height: 31px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid rgba(116,176,181,.17); border-radius: 6px; background: rgba(17,42,51,.66); color: #9bbab5; font-size: 8px; font-weight: 750; letter-spacing: .12em; cursor: pointer; }
.transport-button span { color: var(--cyan); font-size: 12px; }
.transport-button.primary { background: rgba(54,139,144,.2); border-color: rgba(112,215,214,.38); color: #b9e6dc; }
.transport-button:hover { border-color: rgba(112,215,214,.5); }
.transport-button.is-paused { color: var(--gold); }
.time-control { display: flex; align-items: center; gap: 9px; min-width: 170px; flex: 0 1 220px; }
.time-control label { color: #719496; font-size: 7px; font-weight: 750; letter-spacing: .13em; white-space: nowrap; }
.time-control output { min-width: 35px; color: #a8cfca; font-size: 9px; text-align: right; }
input[type="range"] { appearance: none; width: 100%; height: 3px; border-radius: 4px; background: linear-gradient(90deg, #4db9b9, #23555d); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border: 2px solid #a2e9dd; border-radius: 50%; background: #0b3038; box-shadow: 0 0 0 3px rgba(92,196,188,.12); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #a2e9dd; border-radius: 50%; background: #0b3038; box-shadow: 0 0 0 3px rgba(92,196,188,.12); }
.sim-clock { display: flex; align-items: center; gap: 7px; min-width: 92px; justify-content: end; color: #c1d8d2; font-size: 11px; font-variant-numeric: tabular-nums; }
.clock-dot { width: 5px; height: 5px; background: #d4b67b; box-shadow: 0 0 8px rgba(212,182,123,.65); }
.clock-unit { color: #688889; font-size: 7px; letter-spacing: .1em; }
.control-column { min-width: 0; }
.control-panel { height: 100%; padding: 15px 15px 12px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-heading > div { display: flex; align-items: center; gap: 9px; }
.section-index { color: #5cb8b8; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
h2 { margin: 0; color: #d7e8e3; font-size: 13px; font-weight: 650; letter-spacing: -.01em; }
.tiny-tag { padding: 4px 6px; border: 1px solid rgba(105,171,174,.16); border-radius: 4px; color: #719697; font-size: 7px; font-weight: 750; letter-spacing: .12em; }
.preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 16px; }
.preset { min-height: 43px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; border: 1px solid rgba(116,176,181,.15); border-radius: 6px; background: rgba(7,23,31,.72); color: #7f9e9d; font-size: 7px; font-weight: 750; letter-spacing: .1em; cursor: pointer; transition: .18s; }
.preset-glyph { color: #6fbfc0; font-size: 15px; line-height: 1.1; }
.preset.active { border-color: rgba(112,215,214,.42); background: rgba(50,126,132,.2); color: #c3e6df; box-shadow: inset 0 0 18px rgba(77,185,185,.06); }
.control-list { display: grid; gap: 13px; }
.control-item { min-width: 0; }
.control-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.control-label label { color: #a7c0bb; font-size: 10px; }
.control-label output { color: #d4e9e3; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.control-label output small { color: #719596; font-size: 8px; font-weight: 500; }
.control-item input { display: block; }
.range-ends { display: flex; justify-content: space-between; margin-top: 3px; color: #56777b; font-size: 6px; letter-spacing: .1em; }
.control-footnote { display: flex; align-items: flex-start; gap: 7px; margin-top: 16px; padding-top: 11px; border-top: 1px solid rgba(121,189,194,.12); color: #759394; font-size: 8px; line-height: 1.5; }
.info-icon { display: inline-grid; place-items: center; flex: 0 0 13px; width: 13px; height: 13px; border: 1px solid rgba(112,215,214,.4); border-radius: 50%; color: var(--cyan); font-size: 8px; font-weight: 700; }
.lower-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 14px; margin-top: 14px; }
.diagnostics-panel, .mechanism-panel { padding: 15px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid rgba(121,189,194,.12); border-radius: 8px; background: rgba(112,174,174,.11); }
.metric { min-height: 82px; padding: 10px 12px; background: rgba(7,22,29,.72); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #75999a; font-size: 7px; font-weight: 750; letter-spacing: .1em; }
.metric-symbol { color: #69bfc0; font-family: Georgia, serif; font-size: 11px; font-style: italic; }
.metric strong { display: block; margin-top: 3px; color: #d7eee7; font-size: 20px; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.metric strong small { color: #7ca09f; font-size: 9px; font-weight: 500; letter-spacing: 0; }
.metric-note { margin-top: 3px; color: #627f81; font-size: 8px; }
.validation-strip { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 11px; border: 1px solid rgba(112,215,214,.16); border-radius: 7px; background: rgba(26,78,81,.13); }
.validation-icon { display: grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; border: 1px solid rgba(112,215,214,.3); border-radius: 50%; color: var(--cyan); font-size: 13px; }
.validation-copy { display: grid; gap: 2px; min-width: 0; }
.validation-copy strong { color: #a8cfca; font-size: 7px; letter-spacing: .1em; }
.validation-copy span { color: #769594; font-size: 8px; }
.validation-result { margin-left: auto; display: grid; gap: 1px; text-align: right; white-space: nowrap; }
.validation-result strong { color: #d9e9df; font-size: 13px; font-variant-numeric: tabular-nums; }
.validation-result span { color: #688b8c; font-size: 6px; letter-spacing: .1em; }
.mechanism-flow { display: grid; grid-template-columns: 1fr 13px 1fr 13px 1fr; align-items: start; gap: 5px; padding-top: 5px; }
.mechanism-step { position: relative; min-width: 0; padding: 10px 9px 9px; border: 1px solid rgba(121,189,194,.12); border-radius: 7px; background: rgba(7,22,29,.56); }
.step-no { position: absolute; top: 8px; right: 8px; color: #52787a; font-size: 7px; font-weight: 800; }
.step-icon { width: 31px; height: 31px; display: grid; place-items: center; margin-bottom: 7px; border-radius: 7px; background: rgba(65,154,157,.13); color: var(--cyan); font-size: 19px; }
.vortex-icon { color: #8cd4c5; }
.streak-icon { color: var(--gold); }
.mechanism-step h3 { margin: 0 0 4px; color: #c7ded7; font-size: 9px; font-weight: 650; }
.mechanism-step p { margin: 0; color: #779393; font-size: 8px; line-height: 1.5; }
.flow-chevron { padding-top: 35px; color: #4b8588; font-size: 20px; text-align: center; }
.science-panel { margin-top: 14px; overflow: hidden; }
.science-panel summary { min-height: 53px; display: flex; align-items: center; gap: 10px; padding: 0 16px; list-style: none; cursor: pointer; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-title { color: #d5e6e0; font-size: 12px; font-weight: 650; }
.science-subtitle { color: #6f8d8e; font-size: 9px; }
.summary-chevron { margin-left: auto; color: var(--cyan); font-size: 17px; transition: transform .2s; }
.science-panel[open] .summary-chevron { transform: rotate(45deg); }
.science-content { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 18px 17px 20px; border-top: 1px solid rgba(121,189,194,.12); }
.science-column h3 { margin: 0 0 9px; color: #b9d5ce; font-size: 10px; font-weight: 700; }
.equation { margin: 7px 0; padding: 7px 9px; border-left: 2px solid rgba(112,215,214,.5); background: rgba(5,20,27,.6); color: #c5e3db; font-family: Georgia, "Times New Roman", serif; font-size: 13px; letter-spacing: .01em; }
.science-column p, .science-column li { color: #809b99; font-size: 9px; line-height: 1.65; }
.science-column p { margin: 7px 0 0; }
.science-column ul { margin: 0; padding-left: 14px; }
.science-column li { margin: 0 0 5px; }
.science-column b { color: #b2d4ca; font-weight: 700; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px 2px 0; color: #547477; font-size: 7px; letter-spacing: .1em; }
.footer > div { display: flex; gap: 12px; align-items: center; }
.footer-mark { color: #8eb0ac; font-weight: 800; letter-spacing: .15em; }
.footer p { margin: 0; color: #6b8787; font-size: 8px; letter-spacing: .02em; }
.footer-version { white-space: nowrap; }
.flash { color: #d9f4ec !important; border-color: rgba(112,215,214,.7) !important; }
.embed .app-shell { padding: 0 12px 12px; }
.embed .topbar, .embed .intro, .embed .footer { display: none; }
.embed .workspace { margin-top: 8px; }
.embed .scene-wrap { height: min(68vh, 610px); min-height: 330px; }
@media (max-width: 1180px) {
  .app-shell { padding-left: 22px; padding-right: 22px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 300px; }
  .scene-wrap { height: clamp(380px, 48vw, 560px); }
  .intro-meta { gap: 10px; }
  .intro-meta strong { font-size: 9px; }
  .lower-grid { grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); }
}
@media (max-width: 900px) {
  .intro { align-items: start; flex-direction: column; gap: 18px; padding-top: 27px; }
  .intro-meta { width: 100%; max-width: 560px; }
  .workspace { grid-template-columns: 1fr; }
  .control-panel { padding: 15px; }
  .control-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
  .lower-grid { grid-template-columns: 1fr; }
  .science-content { grid-template-columns: repeat(2, 1fr); }
  .scene-wrap { height: 56vw; min-height: 390px; max-height: 560px; }
}
@media (max-width: 560px) {
  .app-shell { padding: 0 10px 20px; }
  .topbar { height: 53px; }
  .topbar-right { gap: 9px; }
  .eyebrow { display: none; }
  .status { font-size: 7px; }
  .intro { padding: 23px 3px 18px; gap: 14px; }
  h1 { font-size: 37px; }
  .subtitle { font-size: 14px; }
  .lede { font-size: 11px; }
  .intro-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .intro-meta div { padding-left: 7px; }
  .intro-meta strong { white-space: normal; font-size: 8px; line-height: 1.35; }
  .meta-label { font-size: 6px; }
  .workspace, .lower-grid { gap: 9px; }
  .scene-topline { height: 42px; padding: 0 8px; }
  .scene-heading { gap: 5px; font-size: 7px; letter-spacing: .09em; }
  .scene-actions { gap: 3px; }
  .icon-button { min-width: 26px; height: 25px; padding: 0 5px; }
  .quality-toggle { min-width: 26px; height: 25px; padding: 0 5px; font-size: 7px; }
  .scene-wrap { height: 330px; min-height: 330px; }
  .overlay-hint { display: none; }
  .scene-overlay { left: 8px; right: 8px; }
  .scene-overlay-top { top: 8px; }
  .scene-overlay-bottom { bottom: 8px; align-items: end; }
  .legend { gap: 7px; padding: 6px; }
  .legend-item { font-size: 6px; gap: 4px; }
  .legend-item i { width: 8px; }
  .scene-scale { gap: 4px; font-size: 7px; }
  .scene-scale i { width: 25px; }
  .context-label { font-size: 6px; padding: 4px 5px; }
  .label-wind { top: 18%; left: 7%; }
  .label-down { top: 49%; left: 34%; }
  .label-up { top: 62%; left: 63%; }
  .transport-bar { flex-wrap: wrap; gap: 8px; padding: 8px; }
  .transport-controls { gap: 4px; }
  .transport-button { height: 29px; padding: 0 7px; font-size: 7px; }
  .time-control { order: 3; flex: 1 1 100%; min-width: 0; }
  .sim-clock { margin-left: auto; min-width: auto; }
  .control-panel, .diagnostics-panel, .mechanism-panel { padding: 12px; }
  .control-list { column-gap: 13px; row-gap: 12px; }
  .control-label label { font-size: 9px; }
  .control-label output { font-size: 9px; }
  .range-ends { font-size: 5px; }
  .control-footnote { font-size: 7px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 75px; padding: 8px; }
  .metric strong { font-size: 18px; }
  .metric-top { font-size: 6px; }
  .validation-strip { align-items: flex-start; gap: 7px; padding: 8px; }
  .validation-copy strong { font-size: 6px; }
  .validation-copy span { font-size: 7px; }
  .validation-result strong { font-size: 11px; }
  .validation-result span { font-size: 5px; }
  .mechanism-flow { grid-template-columns: 1fr; gap: 7px; }
  .flow-chevron { display: none; }
  .mechanism-step { display: grid; grid-template-columns: 33px 1fr; column-gap: 9px; padding: 8px; }
  .step-icon { grid-row: span 2; margin: 0; }
  .mechanism-step h3 { align-self: end; }
  .mechanism-step p { grid-column: 2; }
  .science-panel summary { min-height: 49px; padding: 0 11px; gap: 7px; }
  .science-subtitle { display: none; }
  .science-content { grid-template-columns: 1fr; gap: 15px; padding: 14px 12px; }
  .science-column p, .science-column li { font-size: 8px; }
  .footer { align-items: flex-start; flex-direction: column; gap: 7px; padding-top: 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; }
}
