:root {
  color-scheme: dark;
  --bg: #0a111a;
  --panel: #111b27;
  --panel-2: #0e1823;
  --line: #263545;
  --line-soft: #1c2a38;
  --text: #edf3f6;
  --muted: #9aaab6;
  --quiet: #718392;
  --accent: #69dfc0;
  --accent-dim: rgba(105, 223, 192, .13);
  --accent-line: rgba(105, 223, 192, .42);
  --radius: 10px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.45; }
button, input { font: inherit; }
button { color: inherit; }
.site-header { height: 58px; padding: 0 28px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-soft); background: #0b141e; }
.brand-mark { width: 24px; height: 24px; display: flex; align-items: end; gap: 3px; padding: 3px; border: 1px solid var(--accent-line); border-radius: 6px; }
.brand-mark span { display: block; width: 4px; border-radius: 2px; background: var(--accent); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 14px; opacity: .8; }
.brand-mark span:nth-child(3) { height: 10px; }
.brand-copy { display: grid; gap: 1px; line-height: 1.05; }
.brand-copy strong { font-size: 10px; letter-spacing: .16em; }
.brand-copy small { color: var(--quiet); font-size: 8px; letter-spacing: .15em; }
.header-rule { width: 1px; height: 24px; background: var(--line); margin: 0 8px; }
.header-meta { color: var(--muted); font-size: 9px; letter-spacing: .15em; font-weight: 700; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 7px; box-shadow: 0 0 9px rgba(105,223,192,.5); vertical-align: 1px; }
.meta-divider { margin: 0 9px; color: var(--quiet); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; max-width: 1600px; margin: 0 auto; padding: 18px 22px 28px; align-items: start; }
.visual-column { min-width: 0; }
.visual-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 2px 2px 14px; }
.eyebrow { color: var(--accent); font-size: 9px; letter-spacing: .17em; font-weight: 750; }
.eyebrow span { color: var(--quiet); margin: 0 4px; }
h1 { font-size: clamp(20px, 2.2vw, 28px); letter-spacing: -.035em; line-height: 1.12; font-weight: 650; margin: 7px 0 0; }
h2 { font-size: 15px; letter-spacing: -.015em; font-weight: 650; margin: 3px 0 0; }
.quiet-button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); padding: 8px 10px; font-size: 10px; cursor: pointer; }
.quiet-button:hover, .transport-button:hover, .quality-button:hover { border-color: var(--accent-line); color: var(--text); }
.quiet-button span { color: var(--accent); margin-left: 5px; font-size: 14px; }
.stage { position: relative; width: 100%; height: clamp(340px, 49vw, 530px); min-height: 300px; overflow: hidden; border: 1px solid #253544; border-radius: 11px; background: #0d1823; box-shadow: 0 18px 42px rgba(0,0,0,.18); touch-action: none; }
#scene { display: block; width: 100%; height: 100%; outline: none; }
.stage-note { display: flex; align-items: center; gap: 8px; padding: 8px 2px 13px; color: var(--quiet); font-size: 8px; letter-spacing: .14em; font-weight: 700; }
.note-separator { color: var(--accent); }
.stage-expand { margin-left: auto; color: var(--muted); }
.readouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.readout { min-width: 0; background: linear-gradient(180deg, #121e2a, #101a25); border: 1px solid var(--line-soft); border-radius: 8px; padding: 11px 12px 10px; }
.readout-label { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 8px; letter-spacing: .1em; font-weight: 750; }
.source-tag { display: inline-block; color: var(--quiet); border: 1px solid #304252; border-radius: 3px; padding: 1px 4px; font-size: 7px; line-height: 1.2; letter-spacing: .09em; font-style: normal; font-weight: 700; white-space: nowrap; }
.readout-value { display: flex; align-items: baseline; gap: 5px; margin-top: 5px; }
.readout-value strong { font-size: 25px; font-weight: 630; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.readout-value small { color: var(--muted); font-size: 10px; }
.readout-foot { color: var(--quiet); font-size: 9px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.panel, .science-panel { border: 1px solid var(--line-soft); background: var(--panel); border-radius: var(--radius); padding: 14px; min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-index { color: var(--quiet); font-size: 8px; letter-spacing: .14em; font-weight: 700; white-space: nowrap; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.preset { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 62px; padding: 9px 9px 8px 25px; border: 1px solid var(--line); border-radius: 7px; background: #0e1823; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.preset:hover { border-color: #526777; }
.preset.active { border-color: var(--accent-line); background: var(--accent-dim); }
.preset-mark { position: absolute; left: 10px; top: 13px; width: 7px; height: 7px; border: 1px solid #657786; border-radius: 50%; }
.preset.active .preset-mark { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 8px rgba(105,223,192,.5); }
.preset strong { font-size: 10px; font-weight: 650; }
.preset small { color: var(--quiet); font-size: 8px; line-height: 1.25; }
.preset-failure.active { border-color: var(--accent); }
.control-list { display: grid; gap: 13px; }
.control-row label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; color: #dce5ea; font-size: 10px; font-weight: 620; }
.control-row label span { min-width: 0; }
.control-row label em { color: var(--quiet); font-size: 7px; font-style: normal; letter-spacing: .08em; font-weight: 700; margin-left: 4px; white-space: nowrap; }
.control-row output { color: var(--accent); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { display: block; width: 100%; height: 14px; margin: 0; accent-color: var(--accent); cursor: pointer; background: transparent; }
input[type="range"]:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.range-ends { display: flex; justify-content: space-between; color: var(--quiet); font-size: 8px; margin-top: -1px; font-variant-numeric: tabular-nums; }
.transport-controls { border-top: 1px solid var(--line-soft); margin-top: 14px; padding-top: 12px; }
.primary-button, .secondary-button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: #071712; padding: 10px 12px; font-size: 11px; font-weight: 800; cursor: pointer; transition: filter .15s, transform .15s; }
.primary-button:hover, .secondary-button:hover { filter: brightness(1.08); }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.primary-button span { font-size: 9px; }
.transport-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 6px; margin-top: 7px; }
.transport-button, .quality-button { border: 1px solid var(--line); border-radius: 6px; background: #0e1823; color: var(--muted); padding: 8px 6px; font-size: 9px; cursor: pointer; }
.transport-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; color: var(--quiet); font-size: 8px; letter-spacing: .12em; font-weight: 700; }
.quality-button { padding: 5px 7px; font-size: 8px; letter-spacing: .08em; }
.panel-copy { margin: -3px 0 11px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.secondary-button { background: transparent; color: var(--accent); border-color: var(--accent-line); padding: 9px 10px; }
.secondary-button span { font-size: 13px; }
.experiment-result { margin-top: 9px; min-height: 39px; border: 1px solid var(--line-soft); border-radius: 6px; background: #0d1721; padding: 8px 9px; color: var(--muted); font-size: 9px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.result-placeholder { color: var(--quiet); }
.result-good { color: var(--accent); font-weight: 700; }
.checks-panel { padding-bottom: 11px; }
.checks-panel .panel-heading { margin-bottom: 6px; }
.check-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.check-row:last-of-type { border-bottom: 0; }
.check-row div { min-width: 0; display: grid; gap: 2px; }
.check-row strong { font-size: 9px; font-weight: 650; }
.check-row small { color: var(--quiet); font-size: 8px; }
.check-value { color: var(--accent); font-size: 9px; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.checks-foot { color: var(--quiet); font-size: 8px; line-height: 1.4; margin-top: 5px; }
.science-panel { padding: 0; overflow: hidden; }
.science-panel summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; cursor: pointer; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary > span:first-child { display: grid; gap: 3px; }
.science-panel summary strong { font-size: 13px; font-weight: 650; }
.summary-plus { color: var(--accent); font-size: 19px; transition: transform .2s; }
.science-panel[open] .summary-plus { transform: rotate(45deg); }
.science-content { border-top: 1px solid var(--line-soft); padding: 12px 14px 14px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.science-content h3 { color: var(--text); font-size: 10px; margin: 12px 0 5px; }
.science-content h3:first-child { margin-top: 0; }
.science-content p { margin: 5px 0 8px; }
.equation { overflow-x: auto; padding: 8px 9px; margin: 7px 0; border-left: 2px solid var(--accent); background: #0b151f; color: #e5f4ef; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; white-space: nowrap; }
.sidebar-footer { color: var(--quiet); font-size: 8px; text-align: center; padding: 2px 0 4px; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode .site-header { display: none; }
body.embed-mode .layout { height: 100vh; height: 100dvh; max-width: none; margin: 0; padding: 12px; overflow: hidden; grid-template-columns: minmax(0, 1fr) 350px; gap: 12px; align-items: stretch; }
body.embed-mode .visual-column { min-height: 0; display: flex; flex-direction: column; }
body.embed-mode .visual-heading { flex: 0 0 auto; padding: 0 2px 10px; }
body.embed-mode h1 { font-size: clamp(17px, 1.8vw, 23px); }
body.embed-mode .stage { flex: 1 1 auto; min-height: 0; height: auto; }
body.embed-mode .stage-note { flex: 0 0 auto; padding: 7px 2px 10px; }
body.embed-mode .readouts { flex: 0 0 auto; }
body.embed-mode .readout { padding: 8px 9px; }
body.embed-mode .readout-value strong { font-size: 21px; }
body.embed-mode .sidebar { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #334657 transparent; }
body.embed-mode .panel { padding: 12px; }
body.embed-mode .science-panel { flex: 0 0 auto; }
@media (max-width: 1050px) {
  .layout { grid-template-columns: minmax(0, 1fr) 330px; padding: 15px; gap: 12px; }
  .readout { padding: 9px; }
  .readout-value strong { font-size: 22px; }
  .readout-label { font-size: 7px; }
}
@media (max-width: 780px) {
  .site-header { height: 52px; padding: 0 14px; }
  .layout { display: flex; flex-direction: column; padding: 12px 12px 22px; gap: 12px; }
  .visual-column, .sidebar { width: 100%; }
  .visual-heading { padding-bottom: 11px; }
  .visual-heading h1 { max-width: 580px; }
  .quiet-button { padding: 7px 8px; font-size: 9px; }
  .stage { height: clamp(280px, 78vw, 390px); min-height: 270px; }
  .readouts { grid-template-columns: 1fr 1fr; }
  .readout { padding: 10px 11px; }
  .readout-label { font-size: 8px; }
  .readout-value strong { font-size: 24px; }
  .sidebar { display: grid; grid-template-columns: 1fr; }
  body.embed-mode .layout { display: grid; grid-template-columns: 1fr; grid-template-rows: minmax(0, 52dvh) minmax(0, 1fr); gap: 8px; padding: 8px; }
  body.embed-mode .visual-column { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  body.embed-mode .visual-heading { padding: 0 2px 7px; }
  body.embed-mode .visual-heading .eyebrow { font-size: 7px; }
  body.embed-mode h1 { font-size: clamp(14px, 4vw, 18px); margin-top: 3px; }
  body.embed-mode .quiet-button { font-size: 8px; padding: 5px 6px; }
  body.embed-mode .stage { min-height: 0; height: auto; flex: 1 1 auto; }
  body.embed-mode .stage-note { padding: 5px 2px 6px; font-size: 7px; }
  body.embed-mode .readouts { gap: 5px; }
  body.embed-mode .readout { padding: 6px 8px; }
  body.embed-mode .readout-label { font-size: 6px; gap: 3px; }
  body.embed-mode .source-tag { font-size: 6px; }
  body.embed-mode .readout-value { margin-top: 1px; }
  body.embed-mode .readout-value strong { font-size: 17px; }
  body.embed-mode .readout-value small { font-size: 8px; }
  body.embed-mode .readout-foot { display: none; }
  body.embed-mode .sidebar { display: flex; overflow-y: auto; min-height: 0; gap: 7px; }
  body.embed-mode .panel, body.embed-mode .science-panel { padding: 10px; }
  body.embed-mode .preset { min-height: 52px; }
  body.embed-mode .control-list { gap: 9px; }
  body.embed-mode .control-row label { margin-bottom: 2px; }
  body.embed-mode .transport-controls { margin-top: 10px; padding-top: 9px; }
}
@media (max-width: 420px) {
  .header-meta { font-size: 8px; letter-spacing: .1em; }
  .meta-divider { margin: 0 5px; }
  .visual-heading { align-items: center; }
  h1 { font-size: 19px; }
  .eyebrow { font-size: 8px; }
  .quiet-button { max-width: 75px; }
  .readout-label { letter-spacing: .06em; }
  .readout-value strong { font-size: 22px; }
  .readout-foot { font-size: 8px; }
  body.embed-mode .stage-note { letter-spacing: .08em; }
}
.caption-card { display: flex; gap: 12px; align-items: flex-start; margin-top: 9px; padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: 8px; background: #0e1823; }
.caption-card > span { flex: 0 0 auto; color: var(--accent); font-size: 8px; letter-spacing: .13em; font-weight: 800; padding-top: 2px; }
.caption-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
body.embed-mode .caption-card { display: none; }
@media (max-width: 780px) { .caption-card { margin-top: 8px; } }
