:root {
  color-scheme: dark;
  --bg: #07111d;
  --panel: #0d1a27;
  --panel-2: #101f2d;
  --line: rgba(150, 185, 207, .14);
  --line-strong: rgba(150, 185, 207, .23);
  --text: #eaf4fa;
  --muted: #8da5b6;
  --dim: #607a8d;
  --cyan: #65c8ed;
  --cyan-bright: #9be4ff;
  --blue: #2d90c0;
  --amber: #e4b47a;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 28% 0%, rgba(29, 75, 105, .22), transparent 38%), var(--bg); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { max-width: 1600px; margin: 0 auto; padding: 0 28px 24px; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 30px; height: 30px; border: 1px solid rgba(115, 203, 239, .5); border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(45deg); background: rgba(38, 123, 163, .08); }
.brand-mark span { display: block; width: 3px; border-radius: 3px; background: #83d8f7; transform: rotate(-45deg); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .6; }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-mark span:nth-child(3) { height: 10px; opacity: .75; }
.eyebrow, .kicker, .section-label, .readout-label, .validation-title, .elapsed-time, .speed-row label, .quality-row > span, .keyboard-hint, .scene-tag, .scene-bottom-left, .scene-bottom-right { letter-spacing: .12em; font-size: 9px; font-weight: 750; }
.eyebrow { color: #c5d8e5; font-size: 10px; }
.eyebrow-dot { color: var(--cyan); padding: 0 4px; }
.brand-subtitle { color: var(--dim); font-size: 8px; letter-spacing: .16em; margin-top: 4px; }
.topbar-right { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 9px; letter-spacing: .11em; }
.live-indicator { display: flex; align-items: center; gap: 7px; }
.live-indicator i, .control-status i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #64d5a2; box-shadow: 0 0 10px rgba(100, 213, 162, .7); }
.seed-label { color: var(--dim); }
.seed-label b { color: #c5d7e2; font-weight: 700; margin-left: 5px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 22px; padding-top: 25px; align-items: start; }
.exhibit-column { min-width: 0; }
.exhibit-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 2px 17px; }
.kicker { color: var(--cyan); font-size: 9px; margin-bottom: 8px; }
h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.02; letter-spacing: -.045em; margin: 0; font-weight: 670; }
.subtitle { color: #91a9b9; font-size: 13px; margin: 7px 0 0; }
.depth-chip { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 30px; padding: 8px 11px; color: #9db4c3; font-size: 8px; letter-spacing: .12em; white-space: nowrap; margin-bottom: 3px; }
.depth-icon { font-size: 15px; color: var(--cyan); }
.viewport-frame { position: relative; overflow: hidden; height: clamp(380px, 45vw, 520px); min-height: 360px; border: 1px solid rgba(110, 160, 188, .2); border-radius: 15px; background: radial-gradient(ellipse at 50% 45%, #102637 0%, #081521 70%); box-shadow: 0 18px 55px rgba(0, 0, 0, .22), inset 0 0 40px rgba(61, 139, 179, .035); }
.scene-host { position: absolute; inset: 0; }
.scene-host canvas { display: block; width: 100%; height: 100%; outline: none; }
.viewport-topline { position: absolute; z-index: 5; top: 13px; left: 15px; right: 15px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.scene-tag { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(140, 186, 212, .16); background: rgba(5, 16, 26, .68); backdrop-filter: blur(10px); padding: 7px 9px; border-radius: 6px; color: #a8c1d0; font-size: 8px; }
.scene-tag-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.scene-tools { display: flex; gap: 6px; pointer-events: auto; }
.icon-button { width: 31px; height: 31px; border: 1px solid rgba(140, 186, 212, .19); background: rgba(5, 16, 26, .68); border-radius: 7px; color: #b7d0df; cursor: pointer; font-size: 17px; transition: .18s ease; }
.icon-button:hover, .icon-button:focus-visible { border-color: var(--cyan); color: white; outline: none; background: rgba(30, 93, 126, .55); }
.camera-glyph { font-size: 19px; line-height: 1; }
.export-glyph { font-size: 19px; line-height: 1; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 80px rgba(0, 0, 0, .22); }
.scene-annotation { position: absolute; z-index: 4; display: flex; align-items: center; gap: 6px; color: rgba(190, 225, 240, .78); font-size: 8px; font-weight: 750; letter-spacing: .1em; pointer-events: none; text-shadow: 0 1px 6px #07111d; }
.annotation-front { left: 6%; top: 47%; }
.annotation-lens { right: 7%; top: 66%; flex-direction: row-reverse; }
.annotation-water { right: 7%; top: 37%; flex-direction: row-reverse; color: rgba(104, 212, 245, .86); }
.annotation-line { width: 27px; height: 1px; background: currentColor; opacity: .7; }
.scene-bottom-left, .scene-bottom-right { position: absolute; z-index: 4; bottom: 13px; color: rgba(158, 186, 202, .68); font-size: 7px; pointer-events: none; }
.scene-bottom-left { left: 16px; display: flex; align-items: center; gap: 7px; }
.scale-mark { width: 20px; height: 5px; border-left: 1px solid #a8c3d2; border-right: 1px solid #a8c3d2; border-bottom: 1px solid #a8c3d2; }
.scene-separator, .scene-bottom-right span { color: var(--cyan); padding: 0 2px; }
.scene-bottom-right { right: 16px; }
.context-loss { position: absolute; z-index: 10; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; background: rgba(5, 14, 22, .92); text-align: center; padding: 24px; }
.context-loss[hidden] { display: none; }
.context-loss strong { font-size: 17px; }
.context-loss span { color: var(--muted); max-width: 310px; font-size: 12px; line-height: 1.5; }
.readout-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 11px; }
.readout-card { min-width: 0; background: linear-gradient(145deg, rgba(16, 32, 46, .94), rgba(11, 24, 36, .92)); border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px 11px; }
.readout-label { color: #9bb1bf; font-size: 8px; letter-spacing: .09em; white-space: nowrap; }
.readout-type { color: #607e90; font-size: 7px; margin-left: 4px; font-weight: 600; }
.readout-value { font-size: clamp(20px, 2vw, 27px); font-weight: 630; letter-spacing: -.045em; margin-top: 9px; color: #e6f5fc; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value small { font-size: 11px; color: #8da9b9; font-weight: 500; letter-spacing: 0; }
.readout-foot { color: #698396; font-size: 9px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.validation-strip { display: flex; align-items: center; gap: 11px; padding: 12px 14px; margin-top: 10px; border: 1px solid rgba(91, 179, 147, .18); border-radius: 10px; background: linear-gradient(90deg, rgba(24, 66, 67, .25), rgba(12, 31, 42, .5)); }
.validation-icon { flex: 0 0 23px; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #79d6b0; background: rgba(75, 173, 137, .13); font-size: 13px; }
.validation-copy { min-width: 0; flex: 1; }
.validation-title { color: #b7d6cf; font-size: 8px; }
.validation-title span { color: #739c97; font-weight: 550; }
.validation-detail { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 5px; color: #7e9c9e; font-size: 9px; }
.validation-detail b { color: #c2e1d7; font-weight: 650; font-variant-numeric: tabular-nums; }
.validation-status { color: #76cba8; font-size: 8px; letter-spacing: .1em; font-weight: 750; white-space: nowrap; }
.science-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(12, 25, 37, .75); overflow: hidden; }
.science-panel summary { display: flex; align-items: center; gap: 11px; padding: 13px 15px; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-summary-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--cyan); background: rgba(68, 165, 207, .12); font-size: 16px; }
.science-panel summary b { display: block; font-size: 11px; font-weight: 650; }
.science-panel summary small { display: block; color: var(--dim); font-size: 9px; margin-top: 3px; }
.chevron { margin-left: auto; color: var(--muted); transition: transform .2s ease; }
.science-panel[open] .chevron { transform: rotate(180deg); }
.science-content { padding: 0 15px 16px; border-top: 1px solid var(--line); }
.science-intro { color: #9fb5c3; font-size: 11px; line-height: 1.65; padding: 13px 0; }
.equation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.equation-card { border: 1px solid rgba(133, 173, 197, .12); background: rgba(18, 38, 53, .62); border-radius: 8px; padding: 10px; }
.equation-name { display: block; color: var(--cyan); font-size: 7px; letter-spacing: .12em; font-weight: 750; }
.equation-card code { display: block; color: #e3f3fb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; margin: 9px 0 6px; white-space: normal; }
.equation-card p { margin: 0; color: #7f9aab; font-size: 9px; line-height: 1.5; }
.science-legend { margin-top: 11px; color: #819aaa; font-size: 9px; line-height: 1.6; }
.science-legend b { color: #c3d4df; }
.limitations { margin-top: 10px; border-left: 2px solid rgba(223, 174, 111, .55); padding: 3px 0 3px 10px; }
.limitations b { color: #d7b68f; font-size: 8px; letter-spacing: .12em; }
.limitations p { color: #8298a7; font-size: 9px; line-height: 1.6; margin: 5px 0 0; }
.exhibit-footer { color: #536e80; font-size: 8px; margin: 13px 2px 0; letter-spacing: .03em; }
.control-column { position: sticky; top: 14px; min-width: 0; }
.control-panel { border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(160deg, rgba(15, 30, 44, .98), rgba(9, 21, 32, .98)); padding: 17px 17px 14px; box-shadow: 0 15px 40px rgba(0,0,0,.16); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.panel-heading .kicker { margin-bottom: 5px; font-size: 8px; }
.panel-heading h2 { font-size: 16px; font-weight: 620; letter-spacing: -.02em; margin: 0; }
.control-status { display: flex; align-items: center; gap: 6px; color: #79c7a7; font-size: 7px; letter-spacing: .12em; font-weight: 750; }
.control-status i { width: 5px; height: 5px; }
.section-label { color: #93aaba; font-size: 8px; letter-spacing: .12em; }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.preset-button { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; border: 1px solid rgba(139, 174, 194, .13); background: rgba(17, 37, 52, .7); border-radius: 8px; padding: 9px 8px 8px; cursor: pointer; text-align: left; transition: border-color .18s, background .18s, transform .18s; }
.preset-button:hover { border-color: rgba(104, 197, 231, .55); transform: translateY(-1px); }
.preset-button.selected { border-color: rgba(91, 190, 229, .6); background: rgba(35, 104, 137, .2); box-shadow: inset 0 0 0 1px rgba(80, 178, 216, .08); }
.preset-icon { color: var(--cyan); font-size: 14px; line-height: 1; }
.preset-button b { font-size: 9px; font-weight: 650; white-space: nowrap; }
.preset-button small { color: #718b9c; font-size: 7px; white-space: nowrap; }
.control-divider { height: 1px; background: var(--line); margin: 15px 0 14px; }
.control-section-label { display: flex; justify-content: space-between; margin-bottom: 14px; }
.control-section-label span { color: #607d90; font-size: 7px; }
.slider-control { margin-bottom: 14px; }
.slider-control-last { margin-bottom: 0; }
.slider-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.slider-heading label { color: #c3d3dd; font-size: 10px; font-weight: 550; }
.slider-heading output { color: #91d7f2; font-size: 9px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: 4px; display: block; border-radius: 10px; outline: none; background: linear-gradient(90deg, #3b9bc5, #315a72 100%); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #c2edfc; border: 3px solid #2b86ad; box-shadow: 0 0 0 3px rgba(80, 183, 222, .12); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #c2edfc; border: 3px solid #2b86ad; box-shadow: 0 0 0 3px rgba(80, 183, 222, .12); }
input[type="range"]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; }
.slider-scale { display: flex; justify-content: space-between; color: #587386; font-size: 7px; margin-top: 7px; }
.slider-scale span:nth-child(2) { color: #6d899b; }
.transport-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.elapsed-time { color: #658195; font-size: 7px; }
.elapsed-time b { color: #c5e4f0; margin-left: 5px; font-size: 9px; font-variant-numeric: tabular-nums; }
.transport-buttons { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 6px; }
.primary-button, .secondary-button { height: 34px; border-radius: 7px; cursor: pointer; font-size: 9px; font-weight: 650; transition: .18s ease; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(89, 193, 230, .55); background: linear-gradient(120deg, #1d779f, #1c5b7c); color: #effaff; box-shadow: 0 5px 15px rgba(20, 109, 151, .16); }
.primary-button:hover { filter: brightness(1.14); }
.primary-button.paused { background: linear-gradient(120deg, #22566f, #1c4257); }
.play-symbol { font-size: 11px; }
.secondary-button { border: 1px solid var(--line-strong); background: rgba(22, 41, 55, .72); color: #b8cad5; }
.secondary-button:hover { border-color: rgba(112, 191, 221, .45); background: rgba(37, 76, 97, .6); }
.secondary-button span { color: var(--cyan); font-size: 13px; margin-right: 3px; }
.speed-row { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; margin-bottom: 9px; }
.speed-row label { color: #8ea7b7; font-size: 7px; }
.speed-row output { color: #9cdef6; font-size: 9px; font-weight: 700; }
.speed-slider { background: linear-gradient(90deg, #2b89b4, #294c62) !important; }
.speed-marks { display: flex; justify-content: space-between; color: #5d7a8d; font-size: 7px; margin-top: 6px; }
.quality-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.quality-row > span { color: #8199a9; font-size: 7px; }
.segmented { display: flex; gap: 3px; border: 1px solid var(--line); background: rgba(4, 14, 23, .55); padding: 3px; border-radius: 7px; }
.segmented button { border: 0; background: transparent; color: #718b9d; padding: 4px 10px; border-radius: 5px; cursor: pointer; font-size: 8px; }
.segmented button.active { color: #d9f3fd; background: rgba(57, 138, 174, .34); }
.keyboard-hint { color: #5b7587; font-size: 7px; letter-spacing: .04em; display: flex; align-items: center; gap: 5px; margin-top: 13px; flex-wrap: wrap; }
.keyboard-hint span { border: 1px solid rgba(134, 167, 187, .18); border-radius: 3px; padding: 2px 4px; color: #9ab3c2; font-size: 6px; margin-left: 5px; }
.toast { position: fixed; z-index: 50; bottom: 22px; left: 50%; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; border: 1px solid rgba(112, 195, 225, .25); border-radius: 8px; background: rgba(9, 27, 40, .94); color: #d8f2fc; padding: 10px 15px; font-size: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: .2s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.embed-mode .topbar, .embed-mode .control-column, .embed-mode .exhibit-heading, .embed-mode .readout-grid, .embed-mode .validation-strip, .embed-mode .science-panel, .embed-mode .exhibit-footer { display: none; }
.embed-mode .app-shell { padding: 0; }
.embed-mode .workspace { display: block; padding: 0; }
.embed-mode .viewport-frame { height: 100vh; min-height: 320px; border: 0; border-radius: 0; }
@media (max-width: 1120px) {
  .app-shell { padding-left: 20px; padding-right: 20px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 322px; gap: 15px; }
  .control-panel { padding: 15px 13px 13px; }
  .readout-card { padding: 10px; }
  .readout-label { font-size: 7px; }
  .readout-type { display: none; }
}
@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
  .control-column { position: static; }
  .control-panel { padding: 17px; }
  .viewport-frame { height: min(62vw, 500px); min-height: 350px; }
  .control-column { margin-top: 2px; }
  .preset-grid { max-width: 430px; }
  .slider-control { max-width: 680px; }
}
@media (max-width: 560px) {
  .app-shell { padding: 0 12px 18px; }
  .topbar { height: 58px; }
  .brand-mark { width: 27px; height: 27px; }
  .eyebrow { font-size: 8px; }
  .brand-subtitle { font-size: 7px; }
  .topbar-right { gap: 9px; font-size: 7px; }
  .live-indicator { gap: 5px; }
  .seed-label { display: none; }
  .workspace { padding-top: 18px; gap: 13px; }
  .exhibit-heading { margin-bottom: 12px; align-items: flex-start; }
  h1 { font-size: 29px; }
  .subtitle { font-size: 11px; }
  .depth-chip { padding: 7px 8px; font-size: 6px; margin-top: 15px; }
  .viewport-frame { height: 390px; min-height: 340px; border-radius: 11px; }
  .scene-annotation { font-size: 6px; gap: 4px; }
  .annotation-line { width: 16px; }
  .scene-bottom-left, .scene-bottom-right { font-size: 6px; bottom: 10px; }
  .scene-bottom-right { max-width: 120px; text-align: right; line-height: 1.5; }
  .readout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }
  .readout-card { padding: 10px 11px; }
  .readout-label { font-size: 7px; }
  .readout-type { display: inline; font-size: 6px; }
  .readout-value { font-size: 23px; margin-top: 6px; }
  .readout-foot { font-size: 8px; }
  .validation-strip { align-items: flex-start; padding: 10px; gap: 8px; }
  .validation-icon { width: 20px; height: 20px; flex-basis: 20px; }
  .validation-detail { gap: 4px 9px; font-size: 8px; }
  .validation-status { display: none; }
  .equation-grid { grid-template-columns: 1fr; }
  .control-panel { padding: 15px 13px 13px; }
  .preset-button { padding: 8px 7px; }
  .preset-button b { font-size: 8px; }
  .preset-button small { font-size: 6px; }
  .slider-control { margin-bottom: 15px; }
  .slider-heading label { font-size: 10px; }
  .slider-heading output { font-size: 9px; }
  .keyboard-hint { line-height: 1.7; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.mechanism-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 2px 0; padding: 9px 12px; border: 1px solid rgba(105, 160, 190, .12); border-radius: 8px; background: rgba(12, 28, 41, .58); }
.mechanism-strip span { display: flex; align-items: center; gap: 6px; color: #84a2b4; font-size: 7px; font-weight: 750; letter-spacing: .1em; white-space: nowrap; }
.mechanism-strip span b { color: var(--cyan); font-size: 8px; }
.mechanism-strip span i { color: #b1c4d0; font-size: 8px; font-style: normal; font-weight: 500; letter-spacing: 0; }
.mechanism-strip .mechanism-arrow { color: #4d7b94; font-size: 12px; }
@media (max-width: 560px) {
  .mechanism-strip { align-items: flex-start; flex-direction: column; gap: 6px; padding: 9px 10px; }
  .mechanism-strip .mechanism-arrow { display: none; }
  .mechanism-strip span { white-space: normal; }
}
.embed-mode .mechanism-strip { display: none; }
