:root {
  color-scheme: dark;
  --bg: #07111e;
  --panel: #0c1a2a;
  --panel-2: #102236;
  --line: rgba(155, 190, 219, .14);
  --line-strong: rgba(155, 190, 219, .23);
  --text: #edf5fb;
  --muted: #8fa7bb;
  --dim: #607b92;
  --accent: #73e4d0;
  --accent-soft: rgba(115, 228, 208, .12);
  --warm: #f2c78a;
  --danger: #ff8d86;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow: hidden; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; min-width: 0; background: radial-gradient(ellipse at 22% -12%, rgba(37, 88, 112, .22), transparent 38%), var(--bg); }
.topbar { height: 66px; flex: 0 0 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(7, 17, 30, .88); }
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark { width: 31px; height: 31px; position: relative; display: grid; place-items: center; border: 1px solid rgba(115, 228, 208, .45); border-radius: 50%; box-shadow: 0 0 24px rgba(115, 228, 208, .08); }
.brand-mark span { position: absolute; width: 16px; height: 16px; border: 1px solid var(--accent); border-radius: 50%; opacity: .8; }
.brand-mark span:nth-child(2) { transform: rotate(60deg) scaleX(.52); }
.brand-mark span:nth-child(3) { transform: rotate(-60deg) scaleX(.52); }
.eyebrow, .section-kicker, .projection-note, .panel-micro, .subhead, .readout-label, .readout-kind, .quality-row, .footer, .top-note { letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { font-size: 9px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.eyebrow-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }
h1 { margin: 0; font-size: 17px; line-height: 1.15; font-weight: 650; letter-spacing: -.025em; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.top-note { color: #7891a7; font-size: 9px; font-weight: 650; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(115, 228, 208, .22); border-radius: 20px; background: rgba(115, 228, 208, .06); color: #b4e9df; font-size: 9px; font-weight: 750; letter-spacing: .1em; white-space: nowrap; }
.live-indicator i, .overlay-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(115, 228, 208, .7); }
.workbench { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 365px; gap: 0; }
.visual-column { min-width: 0; min-height: 0; padding: 18px 18px 14px 22px; display: flex; flex-direction: column; gap: 11px; }
.visual-topline { display: flex; justify-content: space-between; align-items: center; min-height: 17px; }
.section-kicker { display: flex; align-items: center; gap: 8px; color: #9bb2c5; font-size: 9px; font-weight: 800; }
.kicker-mark { display: inline-block; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); border-radius: 1px; box-shadow: 0 0 10px rgba(115, 228, 208, .5); }
.projection-note { color: #698399; font-size: 8px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.scale-tag, .micro-tag, .textbook-tag { color: #a7d8cf; background: rgba(115, 228, 208, .08); border: 1px solid rgba(115, 228, 208, .16); border-radius: 4px; padding: 2px 4px; font-size: 7px; letter-spacing: .09em; font-weight: 800; white-space: nowrap; }
.visual-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .86fr); gap: 11px; }
.panel { min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(155deg, rgba(16, 34, 54, .97), rgba(9, 22, 37, .97)); overflow: hidden; box-shadow: 0 16px 50px rgba(0, 0, 0, .16); }
.sky-panel, .mechanism-panel { display: flex; flex-direction: column; }
.panel-heading { height: 43px; flex: 0 0 43px; padding: 0 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(155, 190, 219, .1); }
.panel-heading > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.panel-index { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.panel-title { color: #dbe9f3; font-size: 11px; font-weight: 650; }
.panel-micro { color: #698399; font-size: 8px; font-weight: 750; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.canvas-wrap { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.sky-wrap { background: #0a1a2a; }
.sky-overlay-top { position: absolute; top: 12px; left: 13px; display: flex; align-items: center; gap: 7px; color: #b6d6dc; font-size: 8px; letter-spacing: .13em; font-weight: 800; pointer-events: none; }
.sky-overlay-bottom { position: absolute; bottom: 11px; left: 14px; right: 14px; display: flex; align-items: center; gap: 8px; color: rgba(177, 204, 221, .58); font-size: 7px; font-weight: 800; letter-spacing: .13em; pointer-events: none; }
.overlay-rule { height: 1px; flex: 1; background: linear-gradient(90deg, rgba(115, 228, 208, .42), transparent); }
.ray-wrap { min-height: 120px; }
.ray-legend { height: 32px; flex: 0 0 32px; border-top: 1px solid rgba(155, 190, 219, .08); display: flex; justify-content: center; align-items: center; gap: 11px; color: #7f98ad; font-size: 8px; }
.ray-legend span { display: flex; align-items: center; gap: 4px; }
.legend-line { display: inline-block; width: 12px; height: 2px; border-radius: 2px; }
.sun-line { background: #f5cf8d; }.ice-line { background: #77d8d0; }.exit-line { background: linear-gradient(90deg,#ff8278,#9be5b5,#9ebdff); }
.cause-strip { min-height: 54px; flex: 0 0 54px; display: flex; align-items: center; justify-content: space-around; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(12, 26, 42, .76); }
.cause-item { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cause-item > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cause-item b { color: #7f9bb1; font-size: 8px; letter-spacing: .13em; }
.cause-item span:not(.cause-icon) { color: #d3e0e9; font-size: 10px; white-space: nowrap; }
.cause-icon { width: 26px; height: 26px; border: 1px solid rgba(115, 228, 208, .18); border-radius: 8px; display: grid; place-items: center; color: var(--accent); background: rgba(115, 228, 208, .06); font-size: 16px; }
.prism-icon { color: #a8c6ff; }.arc-icon { color: #f1b9d1; }
.cause-arrow { color: #547188; font-size: 15px; }
.control-panel { min-height: 0; min-width: 0; border-left: 1px solid var(--line); background: linear-gradient(180deg, rgba(12, 26, 42, .98), rgba(8, 19, 32, .98)); display: flex; flex-direction: column; }
.control-header { min-height: 73px; flex: 0 0 73px; padding: 15px 18px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.control-header h2 { margin: 5px 0 0; font-size: 17px; font-weight: 650; letter-spacing: -.025em; }
.model-chip { padding: 6px 8px; color: #a5c4d7; border: 1px solid rgba(135, 178, 204, .18); border-radius: 5px; font-size: 8px; letter-spacing: .1em; font-weight: 800; }
.control-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #29445a transparent; padding: 13px 17px 16px; }
.control-scroll::-webkit-scrollbar { width: 6px; }.control-scroll::-webkit-scrollbar-thumb { background: #29445a; border-radius: 8px; }
.subhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #8ca5b9; font-size: 8px; font-weight: 800; }
.subhead-note { color: #5e7a90; font-size: 7px; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.preset-button { min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 7px 8px; text-align: left; background: rgba(18, 39, 59, .66); border: 1px solid rgba(145, 181, 205, .14); border-radius: 9px; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.preset-button:hover { border-color: rgba(115, 228, 208, .38); transform: translateY(-1px); }
.preset-button.active { border-color: rgba(115, 228, 208, .5); background: rgba(49, 106, 105, .17); }
.preset-symbol { flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: rgba(115, 228, 208, .1); color: var(--accent); font-size: 17px; }
.fail-symbol { color: #ff9a8f; background: rgba(255, 141, 134, .1); }
.preset-button b { display: block; font-size: 9px; font-weight: 700; color: #dce9f2; white-space: nowrap; }
.preset-button small { display: block; margin-top: 3px; color: #7e98ad; font-size: 7px; white-space: nowrap; }
.sliders-section { margin-top: 17px; }
.slider-control { margin-top: 11px; }
.slider-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.slider-top label { color: #d9e6ef; font-size: 10px; font-weight: 600; }
.slider-top output { color: var(--accent); font-size: 11px; font-weight: 750; font-variant-numeric: tabular-nums; }
input[type="range"] { appearance: none; width: 100%; height: 16px; margin: 5px 0 0; background: transparent; cursor: pointer; accent-color: var(--accent); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(115, 228, 208, .58), rgba(115, 228, 208, .15)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(115, 228, 208, .58), rgba(115, 228, 208, .15)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border: 2px solid #d9fff6; border-radius: 50%; background: #55cdbb; box-shadow: 0 0 0 4px rgba(115, 228, 208, .12), 0 0 12px rgba(115, 228, 208, .35); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #d9fff6; border-radius: 50%; background: #55cdbb; box-shadow: 0 0 0 4px rgba(115, 228, 208, .12); }
input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 4px; }
.slider-bottom { display: flex; align-items: center; justify-content: space-between; color: #627e94; font-size: 7px; }
.readout-section { margin-top: 17px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.readout-card { min-width: 0; min-height: 67px; padding: 9px 10px 7px; border: 1px solid rgba(145, 181, 205, .13); border-radius: 8px; background: linear-gradient(135deg, rgba(20, 43, 64, .72), rgba(13, 28, 45, .8)); }
.readout-label { display: block; color: #7893a9; font-size: 7px; font-weight: 800; }
.readout-card strong { display: block; margin-top: 5px; color: #e9f5fa; font-size: 19px; line-height: 1; letter-spacing: -.03em; font-weight: 650; font-variant-numeric: tabular-nums; }
.readout-kind { display: block; margin-top: 5px; color: #5d788e; font-size: 6px; font-weight: 750; }
.state-caption { margin: 9px 1px 0; color: #9bb0c1; font-size: 9px; line-height: 1.5; }
.audit-card { margin-top: 13px; padding: 10px 11px 9px; border: 1px solid rgba(115, 228, 208, .2); border-radius: 9px; background: linear-gradient(135deg, rgba(22, 61, 65, .24), rgba(14, 33, 48, .42)); }
.audit-head { display: flex; align-items: center; gap: 8px; }
.audit-icon { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 6px; background: rgba(115, 228, 208, .12); color: var(--accent); font-size: 12px; }
.audit-head b { display: block; font-size: 9px; color: #dceeea; }
.audit-head small { display: block; margin-top: 2px; font-size: 6px; letter-spacing: .1em; color: #7e9b9a; }
.audit-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.audit-values > div { display: flex; flex-direction: column; gap: 4px; }
.audit-values span { color: #799294; font-size: 7px; }
.audit-values strong { color: #e1f3ee; font-size: 13px; font-variant-numeric: tabular-nums; }
.audit-values .audit-good { color: var(--accent); }
.audit-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; color: #759091; font-size: 7px; }
.transport-section { margin-top: 13px; }
.transport-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.transport-buttons { display: flex; align-items: center; gap: 5px; }
.icon-button { width: 30px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(145, 181, 205, .17); border-radius: 7px; background: rgba(19, 40, 60, .8); color: #b5cad9; cursor: pointer; font-size: 13px; transition: .16s ease; }
.icon-button:hover, .screenshot-button:hover { border-color: rgba(115, 228, 208, .45); color: #eafff9; }
.icon-button.primary-action { border-color: rgba(115, 228, 208, .38); background: rgba(115, 228, 208, .13); color: var(--accent); }
.screenshot-button { height: 29px; padding: 0 10px; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(145, 181, 205, .17); border-radius: 7px; background: rgba(19, 40, 60, .8); color: #c5d6e2; cursor: pointer; font-size: 8px; font-weight: 700; transition: .16s ease; }
.screenshot-button span { color: var(--accent); font-size: 13px; }
.quality-row { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; color: #7690a4; font-size: 7px; font-weight: 800; }
.quality-toggle { display: flex; padding: 2px; gap: 2px; border-radius: 6px; background: rgba(3, 12, 22, .5); border: 1px solid rgba(145, 181, 205, .13); }
.quality-toggle button { border: 0; border-radius: 4px; background: transparent; color: #7892a7; padding: 4px 9px; font-size: 8px; cursor: pointer; }
.quality-toggle button[aria-pressed="true"] { background: rgba(115, 228, 208, .14); color: #c8f7ee; }
.motion-note { margin: 6px 0 0; color: #5e788d; font-size: 7px; }
.science-panel { margin-top: 13px; border: 1px solid rgba(145, 181, 205, .15); border-radius: 9px; background: rgba(15, 33, 51, .6); }
.science-panel summary { min-height: 48px; padding: 8px 10px; display: flex; align-items: center; gap: 9px; list-style: none; cursor: pointer; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-summary-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: #a5d7d0; background: rgba(115, 228, 208, .09); font-size: 15px; }
.science-panel summary b { display: block; font-size: 9px; color: #dbe8f0; }
.science-panel summary small { display: block; margin-top: 2px; color: #6f899e; font-size: 7px; }
.summary-chevron { margin-left: auto; color: #7f9caf; transition: transform .18s ease; }
.science-panel[open] .summary-chevron { transform: rotate(180deg); }
.science-content { padding: 0 11px 12px; border-top: 1px solid rgba(145, 181, 205, .1); color: #9db1c0; font-size: 9px; line-height: 1.55; }
.science-content h3 { margin: 12px 0 5px; color: #d8e6ef; font-size: 9px; }
.science-content p { margin: 5px 0 8px; }
.science-content ul { padding-left: 16px; margin: 5px 0 8px; }
.science-content li { margin: 4px 0; }
.equation { margin: 5px 0; padding: 6px 8px; border: 1px solid rgba(145, 181, 205, .11); border-radius: 5px; background: rgba(5, 16, 28, .45); color: #c5e6e2; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; }
.disclaimer { margin-top: 10px !important; padding-top: 8px; border-top: 1px solid rgba(145, 181, 205, .12); color: #c0d8d3; font-style: italic; }
.footer { height: 22px; flex: 0 0 22px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(145, 181, 205, .08); color: #526d82; font-size: 7px; font-weight: 750; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 980px) and (min-width: 761px) {
  .workbench { grid-template-columns: minmax(0, 1fr) 335px; }
  .visual-column { padding-left: 14px; padding-right: 12px; }
  .visual-grid { grid-template-columns: minmax(0, 1.45fr) minmax(235px, .8fr); }
  .control-scroll { padding-left: 13px; padding-right: 13px; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 760px) {
  body { overflow: hidden; }
  .topbar { height: 55px; flex-basis: 55px; padding: 0 13px; }
  .brand-mark { width: 27px; height: 27px; }
  .eyebrow { font-size: 7px; }
  h1 { font-size: 14px; }
  .top-note { display: none; }
  .live-indicator { padding: 6px 8px; font-size: 7px; }
  .workbench { display: flex; flex-direction: column; gap: 0; }
  .visual-column { flex: 0 0 43%; min-height: 370px; max-height: 390px; padding: 10px 10px 8px; gap: 7px; }
  .visual-topline { min-height: 13px; }
  .section-kicker { font-size: 8px; }
  .projection-note { font-size: 7px; }
  .visual-grid { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 138px; gap: 7px; }
  .panel-heading { height: 30px; flex-basis: 30px; padding: 0 9px; }
  .panel-title { font-size: 9px; }
  .panel-index { font-size: 8px; }
  .panel-micro { font-size: 7px; }
  .ray-wrap { min-height: 0; }
  .ray-legend { height: 20px; flex-basis: 20px; font-size: 7px; }
  .cause-strip { display: none; }
  .control-panel { flex: 1 1 auto; min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .control-header { min-height: 51px; flex-basis: 51px; padding: 8px 14px; }
  .control-header h2 { font-size: 14px; margin-top: 3px; }
  .model-chip { font-size: 7px; padding: 5px 7px; }
  .control-scroll { padding: 10px 13px 14px; }
  .preset-button { min-height: 43px; padding: 6px; gap: 6px; }
  .preset-button b { font-size: 8px; }
  .preset-button small { font-size: 6px; }
  .preset-symbol { width: 23px; height: 23px; flex-basis: 23px; }
  .sliders-section, .readout-section { margin-top: 13px; }
  .slider-control { margin-top: 8px; }
  .slider-top label { font-size: 9px; }
  .slider-top output { font-size: 10px; }
  .slider-bottom { font-size: 6px; }
  .readout-card { min-height: 59px; padding: 7px 8px 6px; }
  .readout-card strong { font-size: 17px; }
  .state-caption { font-size: 8px; }
  .audit-card { margin-top: 10px; }
  .transport-section { margin-top: 10px; }
  .science-panel { margin-top: 10px; }
  .footer { height: 18px; flex-basis: 18px; padding: 0 12px; font-size: 6px; }
}
@media (max-width: 390px) {
  .visual-column { min-height: 370px; flex-basis: 41%; }
  .visual-grid { grid-template-rows: minmax(0, 1fr) 132px; }
  .ray-legend { gap: 7px; }
  .cause-item span:not(.cause-icon) { font-size: 9px; }
  .control-scroll { padding-left: 11px; padding-right: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
