:root {
  color-scheme: dark;
  --bg: #090d14;
  --panel: #111823;
  --panel-2: #0d141e;
  --panel-3: #151f2c;
  --line: #243142;
  --line-soft: rgba(133, 158, 185, .14);
  --text: #edf3f7;
  --muted: #91a1b2;
  --faint: #647588;
  --accent: #78e7cf;
  --accent-soft: rgba(120, 231, 207, .12);
  --accent-line: rgba(120, 231, 207, .38);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 14px; overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.topbar { height: 64px; padding: 0 clamp(18px, 3.1vw, 48px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(143, 165, 188, .12); background: rgba(9, 13, 20, .96); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 28px; height: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: rotate(-8deg); }
.brand-mark span { display: block; border: 1.5px solid var(--accent); border-radius: 3px; opacity: .9; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { background: var(--accent-soft); }
.eyebrow, .section-kicker, .kicker, .topbar-right, .footer-line { font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.eyebrow { color: var(--faint); margin-bottom: 3px; }
.brand-name { color: #dce7ed; font-size: 13px; font-weight: 650; letter-spacing: .01em; }
.topbar-right { display: flex; align-items: center; gap: 9px; color: #8192a4; font-size: 9px; letter-spacing: .1em; }
.offline-dot, .live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(120,231,207,.55); }
.topbar-divider { width: 1px; height: 13px; background: var(--line); margin: 0 5px; }
.seed-label { color: #6d7d8e; }
.seed-label b { color: var(--accent); font-size: 8px; }
.main-scroll { width: min(1440px, 100%); margin: 0 auto; padding: 30px clamp(16px, 3.1vw, 48px) 22px; }
.intro-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.kicker { color: var(--accent); display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.kicker-line { width: 22px; height: 1px; background: var(--accent); }
h1 { margin: 0; font-size: clamp(29px, 3.3vw, 43px); line-height: 1.04; letter-spacing: -.045em; font-weight: 660; }
.mobile-break { display: none; }
.subtitle { color: #9aaaba; font-size: 13px; line-height: 1.6; max-width: 620px; margin: 12px 0 0; }
.concept-chip { min-width: 194px; padding: 13px 16px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, rgba(120,231,207,.07), rgba(17,24,35,.4)); }
.chip-icon { color: var(--accent); font-size: 29px; line-height: 1; }
.concept-chip span, .concept-chip small { display: block; color: #7e91a4; font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.concept-chip strong { display: block; color: var(--text); font-size: 21px; line-height: 1.2; letter-spacing: -.04em; }
.concept-chip small { font-weight: 500; letter-spacing: .02em; font-size: 9px; }
.concept-chip i { color: var(--accent); font-style: normal; }
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: stretch; }
.visual-card, .control-card, .science-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 16px 48px rgba(0,0,0,.13); }
.visual-card { min-width: 0; overflow: hidden; }
.visual-head { min-height: 70px; padding: 15px 19px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.section-kicker { color: #75899d; font-size: 8px; letter-spacing: .15em; }
.visual-head h2 { margin: 5px 0 0; font-size: 15px; font-weight: 620; letter-spacing: -.015em; }
.visual-head-right { display: flex; align-items: center; gap: 13px; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.live-indicator i { width: 5px; height: 5px; }
.icon-button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #314153; border-radius: 8px; background: #141e2a; color: #aab8c6; font-size: 10px; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.icon-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { border-color: var(--accent-line); color: var(--accent); background: #17252e; }
.canvas-wrap { padding: 10px 12px 0; }
#viz { display: block; width: 100%; height: 510px; border-radius: 10px; outline: none; }
.canvas-footnote { display: flex; justify-content: space-between; gap: 10px; padding: 1px 8px 11px; color: #657789; font-size: 8px; letter-spacing: .015em; }
.caption-band { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px 14px; border-top: 1px solid var(--line-soft); background: rgba(7, 13, 20, .3); }
.caption-symbol { color: var(--accent); font-size: 17px; line-height: 1; }
.caption-band p { margin: 0; color: #a5b4c1; font-size: 11px; line-height: 1.55; }
.control-card { padding: 17px 17px 14px; min-width: 0; }
.control-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.model-tag { padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.preset-block { margin-bottom: 15px; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.preset-grid button { min-width: 0; padding: 8px 8px 7px; border: 1px solid #2b3b4b; border-radius: 8px; background: #0e1722; text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.preset-grid button:hover { border-color: var(--accent-line); background: #14232d; transform: translateY(-1px); }
.preset-grid strong, .preset-grid small { display: block; }
.preset-grid strong { color: #dce7ed; font-size: 9px; font-weight: 650; }
.preset-grid small { margin-top: 4px; color: #73879a; font-size: 8px; }
.preset-grid i { color: var(--accent); font-style: normal; }
.control-block { margin-bottom: 16px; }
.control-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.control-label-row label, .control-title { color: #dce6ec; font-size: 11px; font-weight: 630; }
.control-label-row em, .control-title small { color: var(--accent); font-style: normal; }
.control-label-row output { color: var(--accent); font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 750; }
.unit-note { color: #65788b; font-size: 9px; }
input[type="range"] { display: block; width: 100%; height: 15px; margin: 0; appearance: none; background: transparent; cursor: pointer; accent-color: var(--accent); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 10px; background: #344353; }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 10px; background: #344353; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; border-radius: 50%; margin-top: -5px; background: var(--accent); border: 2px solid #d6fff5; box-shadow: 0 0 0 4px rgba(120,231,207,.13); }
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid #d6fff5; box-shadow: 0 0 0 4px rgba(120,231,207,.13); }
input:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.range-ends { display: flex; justify-content: space-between; margin-top: 4px; color: #687a8d; font-size: 8px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; gap: 3px; border: 1px solid #2a394a; border-radius: 8px; background: #0c131d; }
.segmented button, .quality-toggle button { border: 0; border-radius: 5px; padding: 7px 4px; background: transparent; color: #8091a2; font-size: 10px; cursor: pointer; transition: background .2s, color .2s; }
.segmented button[aria-pressed="true"], .quality-toggle button[aria-pressed="true"] { color: var(--accent); background: #1b2a34; box-shadow: inset 0 0 0 1px rgba(120,231,207,.18); }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 1px 0 15px; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { color: #dce6ec; font-size: 10px; font-weight: 620; }
.toggle-row small { margin-top: 3px; color: #718295; font-size: 9px; }
.switch { display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 33px; height: 18px; padding: 2px; border-radius: 99px; background: #344252; transition: background .2s; }
.switch-track::after { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: #b5c0c9; transition: transform .2s, background .2s; }
.switch input:checked + .switch-track { background: #326b63; }
.switch input:checked + .switch-track::after { transform: translateX(15px); background: var(--accent); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.divider { height: 1px; background: var(--line-soft); margin: 0 0 13px; }
.metrics-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.type-legend { color: #66798b; font-size: 8px; }
.type-legend b { color: var(--accent); margin-left: 4px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.metric { min-width: 0; padding: 9px 9px 8px; border: 1px solid #263445; border-radius: 8px; background: #0e1621; }
.metric span { display: block; color: #8092a4; font-size: 8px; line-height: 1.3; }
.metric strong { display: block; margin: 4px 0 2px; color: #e9f3f5; font-size: 17px; letter-spacing: -.035em; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric strong i { color: var(--accent); font-size: 8px; font-style: normal; vertical-align: top; letter-spacing: .05em; }
.metric small { color: #647689; font-size: 8px; }
.check-card { margin-top: 9px; padding: 9px 10px 8px; border: 1px solid rgba(120,231,207,.2); border-radius: 9px; background: rgba(120,231,207,.045); }
.check-head { display: flex; align-items: center; gap: 7px; color: #c9d9dc; font-size: 9px; }
.check-mark { width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; color: #0b1718; background: var(--accent); font-size: 10px; font-weight: 900; }
.check-values { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: #8194a4; font-size: 8px; }
.check-values b { color: #dce9e9; font-variant-numeric: tabular-nums; font-size: 9px; }
.check-result { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(120,231,207,.12); color: #8396a6; font-size: 8px; }
.check-result strong { color: var(--accent); font-size: 11px; font-variant-numeric: tabular-nums; }
.check-result i { font-size: 8px; font-style: normal; }
.check-card > small { display: block; margin-top: 6px; color: #647a89; font-size: 8px; line-height: 1.4; }
.transport-row { display: grid; grid-template-columns: 1.25fr .75fr .75fr; gap: 6px; margin-top: 13px; }
.primary-button, .transport-button { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 33px; border-radius: 7px; cursor: pointer; font-size: 9px; font-weight: 700; transition: background .2s, border-color .2s, transform .2s; }
.primary-button { border: 1px solid rgba(120,231,207,.5); color: #081412; background: var(--accent); }
.primary-button:hover { background: #a0f5e4; transform: translateY(-1px); }
.primary-button svg { width: 11px; height: 11px; fill: currentColor; }
.primary-button.is-playing svg { width: 10px; height: 10px; }
.transport-button { border: 1px solid #304153; background: #172230; color: #b4c1cc; }
.transport-button:hover { border-color: var(--accent-line); color: var(--accent); }
.transport-button b { color: var(--accent); font-size: 12px; }
.quality-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: #708397; font-size: 9px; }
.quality-toggle { display: flex; gap: 2px; padding: 2px; border: 1px solid #283849; border-radius: 6px; background: #0c131c; }
.quality-toggle button { padding: 4px 8px; font-size: 8px; }
.science-panel { margin-top: 16px; overflow: hidden; }
.science-panel summary { display: flex; align-items: center; gap: 11px; min-height: 61px; padding: 11px 18px; list-style: none; cursor: pointer; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--accent-line); border-radius: 8px; color: var(--accent); font-size: 16px; }
.science-panel summary strong, .science-panel summary small { display: block; }
.science-panel summary strong { color: #dfe8ed; font-size: 11px; }
.science-panel summary small { margin-top: 3px; color: #718396; font-size: 9px; }
.summary-chevron { margin-left: auto; color: #7b8d9f; font-size: 17px; transition: transform .2s; }
.science-panel[open] .summary-chevron { transform: rotate(180deg); }
.science-content { padding: 4px 19px 16px; border-top: 1px solid var(--line-soft); }
.science-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 13px; }
.science-grid h3 { margin: 0 0 7px; color: #dfe9ed; font-size: 11px; }
.science-grid h3 i { color: var(--accent); font-style: normal; font-size: 8px; }
.science-grid p { margin: 0 0 8px; color: #8fa0af; font-size: 10px; line-height: 1.55; }
.equation { margin: 8px 0 10px; padding: 10px 12px; border: 1px solid #2b3b4c; border-radius: 7px; background: #0c141e; color: #ccebe4; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.equation sub, .equation sup { color: var(--accent); font-size: 8px; }
.equation span { color: #9cb0bf; }
.science-grid .simplification { color: #728698; font-size: 9px; }
.disclaimer { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line-soft); color: #6f8294; font-size: 9px; }
.footer-line { display: flex; justify-content: space-between; gap: 12px; padding: 15px 3px 0; color: #526477; font-size: 8px; letter-spacing: .12em; }
.footer-line b { color: var(--accent); }

@media (max-width: 1050px) {
  .workbench { grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; }
  .control-card { padding: 15px 13px 12px; }
  #viz { height: 490px; }
  .main-scroll { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 760px) {
  .topbar { height: 56px; padding: 0 16px; }
  .topbar-right { font-size: 8px; gap: 6px; }
  .topbar-divider, .seed-label { display: none; }
  .main-scroll { padding: 21px 12px 18px; }
  .intro-row { align-items: flex-start; margin-bottom: 17px; }
  h1 { font-size: 31px; }
  .mobile-break { display: block; }
  .subtitle { max-width: 440px; font-size: 11px; margin-top: 8px; }
  .concept-chip { display: none; }
  .workbench { display: flex; flex-direction: column; gap: 12px; }
  .visual-card { order: 0; }
  .control-card { order: 1; padding: 15px; }
  .visual-head { min-height: 61px; padding: 12px 13px; }
  .visual-head h2 { font-size: 13px; }
  .visual-head-right { gap: 8px; }
  .live-indicator { font-size: 7px; }
  .icon-button { padding: 6px 7px; font-size: 9px; }
  .canvas-wrap { padding: 7px 7px 0; }
  #viz { height: 510px; }
  .canvas-footnote { padding: 0 5px 9px; font-size: 7px; }
  .caption-band { padding: 10px 13px 12px; }
  .caption-band p { font-size: 10px; }
  .science-grid { grid-template-columns: 1fr; gap: 12px; }
  .footer-line { font-size: 7px; }
}
@media (max-width: 390px) {
  .brand-name { font-size: 12px; }
  .eyebrow { font-size: 8px; }
  .topbar-right { font-size: 7px; }
  .main-scroll { padding-left: 9px; padding-right: 9px; }
  h1 { font-size: 28px; }
  .kicker { font-size: 8px; }
  #viz { height: 500px; }
  .canvas-footnote span:last-child { text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode .app-shell { height: 100vh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
body.embed-mode .topbar { flex: 0 0 56px; }
body.embed-mode .main-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
@media (max-width: 760px) {
  body.embed-mode .main-scroll { padding-top: 15px; }
  body.embed-mode #viz { height: 500px; }
}
