:root {
  color-scheme: dark;
  --bg: #07101c;
  --panel: #0b1724;
  --panel-soft: #0e1d2b;
  --line: rgba(148, 183, 204, .14);
  --muted: #8298a9;
  --muted-2: #5c7385;
  --text: #e8f1f5;
  --ice: #8bdcf6;
  --ice-bright: #b5f0ff;
  --cyan: #4cbfe7;
  --amber: #d9a56f;
  --green: #8ee0bc;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { overflow: hidden; font-size: 13px; letter-spacing: .01em; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: 100%; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(ellipse at 35% 0%, rgba(28, 63, 84, .16), transparent 48%), var(--bg); }
.topbar { height: 68px; flex: 0 0 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px 0 24px; border-bottom: 1px solid var(--line); background: rgba(7, 16, 28, .94); z-index: 10; }
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 29px; height: 29px; position: relative; display: flex; align-items: center; justify-content: center; gap: 2px; border: 1px solid rgba(139, 220, 246, .28); border-radius: 9px; transform: rotate(45deg); }
.brand-mark span { width: 3px; border-radius: 4px; background: #9ce8fb; transform: rotate(-45deg); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 16px; }
.brand-mark span:nth-child(3) { height: 11px; opacity: .75; }
.eyebrow, .scene-kicker, .section-label, .mini-label, .unit-note, .live-caption, .model-tag, .textbook-tag, .readout-card > span, .front-readout > span, .validation-values small, .disclaimer, .scene-legend, .orbit-hint, .subtle-button, .play-button, .segmented button { font-size: 9px; letter-spacing: .14em; font-weight: 700; }
.eyebrow { color: #7f9aab; margin-bottom: 4px; }
.brand-title { font-size: 12px; font-weight: 760; letter-spacing: .12em; color: #eaf5f8; }
.brand-title span { color: #5e8ea3; padding: 0 3px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.live-pill { display: flex; align-items: center; gap: 7px; font-size: 9px; letter-spacing: .13em; font-weight: 700; color: #a3c7d5; padding: 8px 10px; border: 1px solid rgba(110, 204, 174, .2); border-radius: 30px; background: rgba(39, 106, 91, .12); }
.live-pill i, .live-caption i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #7de0b4; box-shadow: 0 0 9px rgba(125, 224, 180, .65); }
.icon-button, .transport-icon, .subtle-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: rgba(17, 34, 49, .7); cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.icon-button { width: 34px; height: 34px; border-radius: 10px; }
.icon-button svg, .transport-icon svg, .subtle-button svg, .play-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover, .transport-icon:hover, .subtle-button:hover { background: rgba(68, 138, 165, .18); border-color: rgba(139, 220, 246, .38); }
.workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 398px; }
.scene-panel { min-width: 0; min-height: 0; position: relative; overflow: hidden; background: radial-gradient(ellipse at 48% 48%, #102535 0%, #091725 55%, #07101c 100%); border-right: 1px solid var(--line); }
#sceneCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5, 13, 23, .56), transparent 37%, transparent 75%, rgba(5, 13, 23, .1)), linear-gradient(0deg, rgba(5, 13, 23, .44), transparent 28%, transparent 80%, rgba(5, 13, 23, .25)); }
.scene-heading { position: absolute; left: 30px; top: 30px; width: min(360px, 42%); pointer-events: none; }
.scene-kicker { color: #7ea8bb; }
.scene-kicker span { color: #426477; padding: 0 5px; }
.scene-heading h1 { margin: 16px 0 9px; font-size: clamp(29px, 3.2vw, 44px); line-height: .98; letter-spacing: -.055em; font-weight: 620; color: #eaf6fa; text-shadow: 0 4px 28px rgba(0,0,0,.28); }
.scene-heading h1 em { color: #9bdff2; font-style: normal; font-weight: 420; }
.scene-heading p { max-width: 310px; margin: 0; color: #9bb1bf; font-size: 12px; line-height: 1.55; }
.scene-legend { position: absolute; left: 30px; bottom: 31px; display: flex; flex-wrap: wrap; gap: 16px; color: #8ea8b8; pointer-events: none; }
.scene-legend div { display: flex; align-items: center; gap: 7px; }
.scene-legend i { display: inline-block; width: 16px; height: 5px; border-radius: 5px; }
.legend-ice { background: linear-gradient(90deg, #67c8eb, #c0f4ff); box-shadow: 0 0 9px rgba(107, 215, 247, .4); }
.legend-water { background: #35b8e9; }
.legend-front { background: #91d8ee; opacity: .65; }
.scene-toolbar { position: absolute; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 15px; }
.orbit-hint { color: #7e98a9; letter-spacing: .09em; font-size: 8px; }
.orbit-hint b { color: #4c7184; padding: 0 4px; }
.mouse-glyph { color: #a9d8e8; font-size: 15px; padding-right: 5px; }
.subtle-button { gap: 7px; padding: 8px 10px; border-radius: 7px; color: #b4cbd7; font-size: 8px; letter-spacing: .1em; }
.subtle-button svg { width: 13px; height: 13px; }
.scene-scale { position: absolute; right: 26px; top: 26px; display: flex; align-items: center; gap: 8px; color: #6f8b9d; font-size: 9px; letter-spacing: .05em; }
.scene-scale i { display: block; width: 55px; height: 1px; background: linear-gradient(90deg, #4f8ca4, #b5d8e3); position: relative; }
.scene-scale i::before, .scene-scale i::after { content: ""; position: absolute; top: -3px; width: 1px; height: 7px; background: #8eb8c8; }
.scene-scale i::before { left: 0; } .scene-scale i::after { right: 0; }
.context-label { position: absolute; display: flex; align-items: center; gap: 7px; color: rgba(189, 221, 234, .8); font-size: 8px; font-weight: 750; letter-spacing: .13em; pointer-events: none; text-shadow: 0 1px 8px #06111b; }
.label-front { right: 16%; top: 47%; }
.label-lens { right: 20%; top: 66%; }
.label-water { left: 39%; bottom: 27%; }
.label-dot { width: 6px; height: 6px; border-radius: 50%; background: #a2e8ff; box-shadow: 0 0 9px #62c7e8; }
.ice-dot { background: #b7f2ff; box-shadow: 0 0 10px #9cecff; }
.water-dot { background: #40c9f2; box-shadow: 0 0 9px #40c9f2; }
.webgl-message { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 330px; padding: 14px 18px; background: rgba(5, 13, 22, .94); border: 1px solid rgba(139, 220, 246, .35); border-radius: 10px; color: #c8e3ed; line-height: 1.5; text-align: center; z-index: 4; }
.control-panel { min-height: 0; background: linear-gradient(180deg, rgba(13, 27, 41, .98), rgba(9, 20, 32, .99)); overflow: hidden; }
.panel-scroll { height: 100%; overflow-y: auto; padding: 21px 21px 24px; scrollbar-width: thin; scrollbar-color: #29475a transparent; }
.panel-scroll::-webkit-scrollbar { width: 5px; }
.panel-scroll::-webkit-scrollbar-thumb { background: #29475a; border-radius: 8px; }
.panel-section { margin-bottom: 16px; }
.section-label { display: flex; align-items: center; gap: 8px; color: #90aaba; }
.section-label > span:first-child { color: #4ca9cb; font-variant-numeric: tabular-nums; }
.experiment-title-row { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.experiment-title-row h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; font-weight: 570; }
.model-tag, .textbook-tag { color: #80c6de; font-size: 8px; border: 1px solid rgba(89, 177, 210, .25); padding: 5px 7px; border-radius: 5px; letter-spacing: .1em; }
.section-copy { margin: 7px 0 0; color: #8299a9; font-size: 11px; line-height: 1.5; }
.preset-section { margin: 0 -21px; padding: 13px 21px 15px; background: rgba(3, 12, 22, .26); border-top: 1px solid rgba(148, 183, 204, .08); border-bottom: 1px solid rgba(148, 183, 204, .08); }
.mini-label { color: #6f8797; font-size: 8px; letter-spacing: .13em; }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.preset-button { min-width: 0; min-height: 52px; display: flex; align-items: center; gap: 7px; padding: 7px 7px; text-align: left; border: 1px solid rgba(141, 174, 191, .12); border-radius: 7px; background: rgba(19, 38, 54, .5); cursor: pointer; transition: .18s ease; }
.preset-button:hover { border-color: rgba(139, 220, 246, .32); background: rgba(32, 66, 85, .55); }
.preset-button.active { border-color: rgba(111, 202, 231, .5); background: rgba(48, 111, 138, .19); box-shadow: inset 0 0 0 1px rgba(111, 202, 231, .07); }
.preset-glyph { flex: 0 0 22px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: #a9e6f7; background: rgba(100, 188, 220, .12); font-size: 16px; }
.preset-button b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9px; font-weight: 650; color: #d9e9ef; }
.preset-button small { display: block; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 7px; color: #7891a1; }
.controls-section { padding-top: 17px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.unit-note { color: #637d8e; font-size: 8px; }
.control-row { padding: 0 0 13px; margin-bottom: 12px; border-bottom: 1px solid rgba(148, 183, 204, .075); }
.control-top, .speed-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.control-top label, .speed-row label { color: #c5d6df; font-size: 11px; font-weight: 540; }
.control-top output, .speed-row output { color: #9edff0; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 4px; margin: 12px 0 6px; border-radius: 10px; appearance: none; background: linear-gradient(90deg, #2d7898, #3eb2d8); cursor: pointer; outline: none; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border: 2px solid #d7f7ff; border-radius: 50%; background: #53b9dc; box-shadow: 0 0 0 3px rgba(83, 185, 220, .14), 0 0 10px rgba(83, 185, 220, .35); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #d7f7ff; border-radius: 50%; background: #53b9dc; box-shadow: 0 0 0 3px rgba(83, 185, 220, .14); }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid #e8fbff; outline-offset: 3px; }
.range-ends { display: flex; justify-content: space-between; color: #60798a; font-size: 8px; }
.control-hint { margin-top: 7px; color: #607c8e; font-size: 9px; line-height: 1.4; }
.transport-section { padding: 15px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.transport-row { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 13px; }
.transport-buttons { display: flex; gap: 6px; }
.play-button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid rgba(89, 191, 222, .42); border-radius: 7px; color: #bdf1ff; background: rgba(48, 133, 164, .19); cursor: pointer; font-size: 9px; letter-spacing: .1em; }
.play-button:hover { background: rgba(48, 133, 164, .3); }
.play-button svg { width: 13px; height: 13px; }
.transport-icon { width: 34px; height: 32px; border-radius: 7px; color: #a8c1ce; }
.clock-block { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.clock-block strong { color: #d7e8ee; font-size: 16px; font-weight: 570; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.speed-row { margin-top: 5px; }
.quality-row { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; color: #8fa5b2; font-size: 10px; }
.segmented { display: flex; padding: 2px; border-radius: 6px; background: rgba(3, 11, 19, .55); border: 1px solid rgba(148, 183, 204, .12); }
.segmented button { border: 0; border-radius: 4px; padding: 5px 9px; color: #71899a; background: transparent; cursor: pointer; font-size: 8px; }
.segmented button.selected { color: #b8ebf7; background: rgba(63, 145, 175, .25); }
.readouts-section { padding: 17px 0 16px; border-bottom: 1px solid var(--line); }
.live-caption { color: #6d8c9c; font-size: 8px; display: flex; align-items: center; gap: 6px; }
.live-caption i { width: 5px; height: 5px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.readout-card { min-height: 78px; padding: 10px 10px 9px; border: 1px solid rgba(139, 179, 199, .12); border-radius: 7px; background: linear-gradient(145deg, rgba(23, 46, 63, .68), rgba(12, 27, 41, .55)); }
.readout-card > span { display: block; color: #7892a2; font-size: 7px; letter-spacing: .12em; }
.readout-card strong { display: block; margin-top: 7px; color: #e2f3f8; font-size: 20px; line-height: 1; font-weight: 560; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.readout-card strong small { color: #83b4c7; font-size: 10px; font-weight: 550; letter-spacing: 0; }
.readout-foot { margin-top: 6px; color: #607c8e; font-size: 8px; }
.accent-card { border-color: rgba(104, 197, 220, .22); background: linear-gradient(145deg, rgba(31, 83, 103, .28), rgba(12, 27, 41, .55)); }
.accent-card strong { color: #9de4f4; }
.front-readout { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px 0; }
.front-readout > span { color: #718b9b; font-size: 8px; }
.front-readout strong { color: #d8e9ef; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.validation-section { padding: 16px 0 15px; border-bottom: 1px solid var(--line); }
.textbook-tag { color: #a9d4e1; border-color: rgba(131, 193, 212, .18); }
.validation-card { padding: 11px 12px 10px; border: 1px solid rgba(135, 183, 204, .13); border-radius: 7px; background: rgba(15, 34, 49, .58); }
.validation-title { color: #c5dbe4; font-size: 10px; font-weight: 600; }
.validation-values { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 11px 0 8px; }
.validation-values div { display: flex; flex-direction: column; gap: 4px; }
.validation-values small { color: #6f8b9b; font-size: 7px; }
.validation-values b { color: #dcebf0; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.validation-bar { height: 3px; overflow: hidden; background: rgba(125, 169, 188, .12); border-radius: 5px; }
.validation-bar span { display: block; width: 99%; height: 100%; background: linear-gradient(90deg, #4d9fbd, #9be6f6); }
.validation-result { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; color: #7792a1; font-size: 9px; }
.validation-result strong { color: #9ee1c4; font-size: 10px; font-weight: 650; }
.validation-card p { margin: 7px 0 0; color: #627d8d; font-size: 8px; line-height: 1.45; }
.science-section { padding: 16px 0 15px; border-bottom: 1px solid var(--line); }
.science-section summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.science-section summary::-webkit-details-marker { display: none; }
.chevron { color: #80a7b8; font-size: 17px; transform: rotate(0deg); transition: transform .18s ease; }
.science-section:not([open]) .chevron { transform: rotate(-90deg); }
.science-content { padding-top: 13px; }
.science-content h3 { margin: 12px 0 7px; color: #a9d4e3; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.science-content h3:first-child { margin-top: 0; }
.equation { padding: 9px 10px; border-left: 2px solid #4a9fbd; background: rgba(35, 75, 95, .18); color: #d9f2f9; font-family: Georgia, "Times New Roman", serif; font-size: 15px; letter-spacing: .015em; }
.equation sub, .equation sup { font-size: 9px; }
.science-content p { margin: 7px 0 0; color: #839aa8; font-size: 9px; line-height: 1.55; }
.assumption-note { margin-top: 13px; padding: 10px; border: 1px solid rgba(202, 164, 111, .16); border-radius: 6px; background: rgba(118, 83, 43, .1); color: #9c9b8f; font-size: 8px; line-height: 1.55; }
.assumption-note b { color: #d4b58c; font-size: 8px; letter-spacing: .1em; }
.source-note { margin-top: 9px; color: #647f8f; font-size: 8px; line-height: 1.6; }
.disclaimer { padding: 15px 0 3px; color: #5f7888; font-size: 7px; line-height: 1.5; letter-spacing: .06em; font-weight: 500; }
.embed-mode .topbar { display: none; }
.embed-mode .workspace { grid-template-columns: minmax(0, 1fr) 370px; }
.embed-mode .scene-heading { top: 20px; left: 22px; }
.reduced-motion * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
button:focus-visible, summary:focus-visible { outline: 2px solid #8bdcf6; outline-offset: 3px; }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 360px; }
  .panel-scroll { padding-left: 17px; padding-right: 17px; }
  .preset-section { margin-left: -17px; margin-right: -17px; padding-left: 17px; padding-right: 17px; }
  .scene-heading { left: 22px; top: 24px; }
  .scene-legend { left: 22px; }
  .context-label { display: none; }
}
@media (max-width: 780px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100vh; overflow: visible; }
  .topbar { height: 58px; flex-basis: 58px; padding: 0 14px; }
  .brand-mark { width: 25px; height: 25px; }
  .brand-title { font-size: 10px; }
  .eyebrow { font-size: 8px; }
  .live-pill { font-size: 8px; padding: 7px 8px; }
  .workspace { display: flex; flex-direction: column; min-height: calc(100vh - 58px); }
  .scene-panel { height: min(54vh, 480px); min-height: 390px; flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .scene-heading { left: 17px; top: 18px; width: 58%; }
  .scene-kicker { font-size: 8px; }
  .scene-heading h1 { margin: 11px 0 7px; font-size: clamp(27px, 8vw, 35px); }
  .scene-heading p { max-width: 240px; font-size: 10px; }
  .scene-scale { right: 15px; top: 17px; font-size: 8px; }
  .scene-legend { left: 16px; bottom: 17px; gap: 10px; font-size: 7px; }
  .scene-legend i { width: 12px; }
  .scene-toolbar { right: 13px; bottom: 12px; gap: 0; }
  .orbit-hint { display: none; }
  .subtle-button { padding: 7px 8px; font-size: 7px; }
  .control-panel { overflow: visible; }
  .panel-scroll { height: auto; overflow: visible; padding: 18px 16px 26px; }
  .preset-section { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .preset-button { min-height: 56px; }
  .preset-button b { font-size: 9px; }
  .readout-card { min-height: 82px; }
  .disclaimer { padding-bottom: 10px; }
  .embed-mode .workspace { display: flex; }
  .embed-mode .scene-panel { height: 50vh; min-height: 350px; }
}
@media (max-width: 390px) {
  .topbar-right { gap: 8px; }
  .brand-lockup { gap: 9px; }
  .brand-title { letter-spacing: .08em; }
  .preset-grid { gap: 5px; }
  .preset-button { padding: 6px 5px; gap: 5px; }
  .preset-glyph { flex-basis: 19px; width: 19px; height: 19px; }
  .preset-button b { font-size: 8px; }
  .preset-button small { font-size: 6px; }
  .scene-heading { width: 64%; }
}
