:root {
  color-scheme: dark;
  --bg: #0b0f12;
  --panel: #11171b;
  --panel-2: #151d21;
  --line: #263137;
  --line-soft: #1d272c;
  --text: #edf3f1;
  --muted: #84939a;
  --dim: #58666d;
  --accent: #8af2d0;
  --accent-dark: #285c4e;
  --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%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { overflow: hidden; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: 100%; height: 100vh; height: 100dvh; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--bg); }
.topbar { height: 64px; flex: 0 0 64px; display: flex; align-items: center; gap: 14px; padding: 0 24px; border-bottom: 1px solid var(--line); background: #0d1215; }
.brand-mark { width: 27px; height: 27px; position: relative; flex: 0 0 27px; border: 1px solid rgba(138,242,208,.58); border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-28deg); }
.brand-mark span { width: 3px; border-radius: 4px; background: var(--accent); display: block; }
.brand-mark span:nth-child(1) { height: 8px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 14px; }
.brand-mark span:nth-child(3) { height: 8px; opacity: .55; }
.brand-copy { min-width: 0; }
.eyebrow { color: var(--muted); font-size: 9px; line-height: 1.25; font-weight: 750; letter-spacing: .16em; }
.eyebrow i { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin: 0 5px 2px; }
.brand-copy h1 { font-size: 17px; line-height: 1.25; letter-spacing: -.035em; margin: 2px 0 0; font-weight: 650; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.live-indicator b, .live-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(138,242,208,.10); }
.model-chip { border: 1px solid var(--line); border-radius: 3px; padding: 6px 8px; color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 356px; flex: 1 1 auto; min-height: 0; min-width: 0; }
.visual-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #0b1013; }
.stage { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; background: radial-gradient(ellipse at 28% 28%, rgba(138,242,208,.045), transparent 48%), #0b1013; }
#scene { width: 100%; height: 100%; display: block; outline: none; touch-action: pan-y; }
#scene:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); }
.canvas-corner-label { position: absolute; top: 17px; left: 22px; display: flex; align-items: center; gap: 8px; color: #b8c5c4; font-size: 9px; letter-spacing: .15em; font-weight: 750; pointer-events: none; }
.corner-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(138,242,208,.7); }
.caption-bar { min-height: 43px; flex: 0 0 43px; border-top: 1px solid var(--line); background: #0e1417; display: flex; align-items: center; gap: 10px; padding: 0 20px; }
.caption-icon { color: var(--accent); font-size: 16px; }
.caption-bar p { color: #b8c5c3; font-size: 10px; line-height: 1.4; margin: 0; min-width: 0; }
.caption-state { margin-left: auto; flex: 0 0 auto; color: var(--accent); font-size: 8px; letter-spacing: .13em; font-weight: 800; }
.control-panel { min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 20px 20px 12px; background: var(--panel); scrollbar-width: thin; scrollbar-color: #334047 transparent; }
.control-panel::-webkit-scrollbar { width: 5px; }
.control-panel::-webkit-scrollbar-thumb { background: #334047; border-radius: 5px; }
.panel-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 19px; font-weight: 620; letter-spacing: -.045em; }
.experiment-index { color: #b8c4c6; font-size: 10px; font-weight: 750; letter-spacing: .08em; padding-bottom: 3px; }
.experiment-index i { color: var(--dim); font-style: normal; margin: 0 3px; }
.section-label { display: flex; align-items: center; justify-content: space-between; color: #9ba9ad; font-size: 8px; letter-spacing: .14em; font-weight: 800; margin-bottom: 10px; }
.section-note { color: #5f7076; font-size: 7px; letter-spacing: .1em; }
.live-pulse { width: 5px; height: 5px; }
.readout-section { margin-bottom: 20px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.readout-card { min-width: 0; padding: 10px 9px 9px; border: 1px solid var(--line); border-radius: 5px; background: #0e1417; }
.primary-readout { border-color: rgba(138,242,208,.34); background: linear-gradient(145deg, rgba(138,242,208,.075), #0e1417 72%); }
.readout-name { display: flex; align-items: center; gap: 4px; color: #829198; font-size: 7px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.readout-name span { color: #c0ceca; font-family: Georgia, serif; font-size: 10px; letter-spacing: 0; }
.readout-value { margin-top: 8px; color: #eff7f4; font-size: 20px; line-height: 1; font-weight: 630; letter-spacing: -.055em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.primary-readout .readout-value { color: var(--accent); }
.ratio-value { font-size: 17px; letter-spacing: -.03em; }
.readout-unit { color: #66767d; font-size: 7px; margin-top: 6px; line-height: 1.25; white-space: nowrap; }
.check-strip { margin-top: 7px; padding: 7px 8px; border-left: 2px solid rgba(138,242,208,.55); background: rgba(138,242,208,.035); color: #91a39d; font-size: 7px; line-height: 1.4; letter-spacing: .035em; font-variant-numeric: tabular-nums; }
.check-strip b { color: var(--accent); font-weight: 800; }
.audit-note { color: #a8b9b2; border-left: 2px solid var(--accent); padding-left: 8px; }
.controls-section { margin-bottom: 18px; }
.slider-control { margin: 0 0 13px; }
.slider-control.compact-control { margin-bottom: 10px; }
.slider-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.slider-heading label { color: #d8e1df; font-size: 10px; font-weight: 620; }
.slider-heading em { color: var(--accent); font-family: Georgia, serif; font-size: 12px; font-style: italic; margin-left: 3px; }
.slider-heading output { color: #dbe8e3; font-size: 10px; font-variant-numeric: tabular-nums; }
input[type="range"] { display: block; width: 100%; height: 14px; margin: 0; padding: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; accent-color: var(--accent); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) 0%, #426a60 100%); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) 0%, #426a60 100%); }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid #14231f; box-shadow: 0 0 0 1px var(--accent); margin-top: -4.5px; }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid #14231f; box-shadow: 0 0 0 1px var(--accent); }
input[type="range"]:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; border-radius: 5px; }
.range-ends { display: flex; justify-content: space-between; color: #59686e; font-size: 7px; margin-top: 4px; }
.preset-section { margin-bottom: 16px; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.preset-button { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 8px; border: 1px solid var(--line); border-radius: 5px; background: #0e1417; text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.preset-button:hover { border-color: #50615e; transform: translateY(-1px); }
.preset-button.active { border-color: rgba(138,242,208,.5); background: rgba(138,242,208,.06); }
.preset-button:focus-visible, .transport-button:focus-visible, .icon-button:focus-visible, .text-button:focus-visible, .quality-switch button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.preset-button b { display: block; font-size: 8px; color: #e1e9e6; font-weight: 700; white-space: nowrap; }
.preset-button small { display: block; color: #6d7c82; font-size: 7px; margin-top: 4px; white-space: nowrap; }
.preset-glyph { width: 23px; height: 23px; flex: 0 0 23px; display: flex; align-items: center; justify-content: center; gap: 2px; border: 1px solid #34413f; border-radius: 50%; }
.preset-glyph i { display: block; width: 2px; background: #9eaaa8; border-radius: 2px; }
.quasi-glyph i:nth-child(1) { height: 5px; transform: rotate(-20deg); }
.quasi-glyph i:nth-child(2) { height: 11px; transform: rotate(12deg); }
.quasi-glyph i:nth-child(3) { height: 7px; transform: rotate(-12deg); }
.quasi-glyph i:nth-child(4) { height: 4px; transform: rotate(20deg); }
.lock-glyph i { height: 9px; }
.lock-glyph i:nth-child(2) { height: 14px; background: var(--accent); }
.preset-arrow { margin-left: auto; color: #64747a; font-size: 11px; }
.preset-button.active .preset-arrow { color: var(--accent); }
.transport-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0 10px; }
.transport-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.transport-buttons { display: flex; gap: 5px; }
.transport-button, .icon-button { height: 30px; border: 1px solid #334047; border-radius: 4px; background: #182126; color: #dfe9e5; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.transport-button { min-width: 86px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; font-size: 9px; font-weight: 700; }
.play-button { border-color: rgba(138,242,208,.45); background: rgba(138,242,208,.09); color: var(--accent); }
.play-icon { font-size: 12px; line-height: 1; }
.icon-button { width: 31px; font-size: 16px; }
.transport-button:hover, .icon-button:hover { border-color: var(--accent); }
.quality-switch { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 4px; background: #0c1215; }
.quality-switch button { border: 0; border-radius: 2px; padding: 5px 7px; color: #64737a; background: transparent; font-size: 7px; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.quality-switch button.selected { background: #293932; color: var(--accent); }
.speed-row { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.speed-row label { flex: 0 0 auto; color: #8d9a9f; font-size: 8px; }
.speed-row input { flex: 1 1 auto; }
.speed-row output { flex: 0 0 22px; color: var(--accent); font-size: 9px; text-align: right; }
.utility-row { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 3px 0; border: 0; background: transparent; color: #819096; font-size: 7px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.text-button b { color: var(--accent); font-size: 7px; }
.toggle-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.text-button[aria-pressed="false"] .toggle-dot { background: #526169; }
.text-button[aria-pressed="false"] b { color: #69777d; }
.screenshot-button { color: #aab8b5; }
.screenshot-button span { color: var(--accent); font-size: 12px; }
.science-panel { margin-top: 11px; border: 1px solid var(--line); border-radius: 5px; background: #0e1417; }
.science-panel summary { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; list-style: none; cursor: pointer; color: #d5dfdc; font-size: 9px; font-weight: 700; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-mark { color: var(--accent); font-size: 15px; font-family: Georgia, serif; }
.summary-subtitle { margin-left: auto; color: #607077; font-size: 7px; letter-spacing: .1em; font-weight: 750; }
.chevron { color: #82918f; font-size: 14px; transition: transform .2s ease; }
.science-panel[open] .chevron { transform: rotate(180deg); }
.science-content { border-top: 1px solid var(--line); padding: 10px 11px 11px; color: #8c9a9f; font-size: 8px; line-height: 1.55; }
.science-content p { margin: 0 0 8px; }
.science-content p:last-child { margin-bottom: 0; }
.science-content b { color: #c7d3d0; }
.equation { color: #d7e7e1; font-family: Georgia, "Times New Roman", serif; font-size: 12px; text-align: center; padding: 4px 0; }
.fraction { border-bottom: 1px solid #70837c; padding: 0 2px; }
.disclaimer { color: #77877e; font-style: italic; }
.panel-footer { display: flex; justify-content: space-between; color: #526168; font-size: 7px; letter-spacing: .11em; font-weight: 750; padding-top: 10px; }
.panel-footer b { color: var(--accent); margin-left: 4px; }
@media (max-width: 800px) {
  .topbar { height: 56px; flex-basis: 56px; padding: 0 15px; gap: 10px; }
  .brand-mark { width: 24px; height: 24px; flex-basis: 24px; }
  .brand-copy h1 { font-size: 15px; }
  .topbar-right { gap: 9px; }
  .model-chip { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(245px, 39dvh) minmax(0, 1fr); }
  .visual-column { border-right: 0; border-bottom: 1px solid var(--line); }
  .caption-bar { min-height: 38px; flex-basis: 38px; padding: 0 13px; gap: 7px; }
  .caption-bar p { font-size: 9px; }
  .caption-state { font-size: 7px; }
  .control-panel { padding: 15px 15px 12px; }
  .panel-heading { margin-bottom: 13px; }
  .panel-heading h2 { font-size: 17px; }
  .readout-section { margin-bottom: 16px; }
  .controls-section { margin-bottom: 14px; }
  .slider-control { margin-bottom: 11px; }
  .preset-section { margin-bottom: 12px; }
}
@media (max-width: 430px) {
  .topbar { padding: 0 12px; }
  .brand-copy .eyebrow { font-size: 7px; }
  .brand-copy h1 { font-size: 14px; }
  .live-indicator { font-size: 7px; }
  .workspace { grid-template-rows: minmax(240px, 38dvh) minmax(0, 1fr); }
  .canvas-corner-label { top: 12px; left: 13px; font-size: 7px; }
  .readout-card { padding: 8px 7px 7px; }
  .readout-name { font-size: 6px; letter-spacing: .06em; }
  .readout-value { font-size: 17px; }
  .ratio-value { font-size: 15px; }
  .readout-unit { font-size: 6px; }
  .preset-button { gap: 6px; padding: 8px 6px; }
  .preset-button b { font-size: 7px; }
  .preset-button small { font-size: 6px; }
  .preset-glyph { width: 20px; height: 20px; flex-basis: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
