:root {
  color-scheme: dark;
  --bg: #080d14;
  --panel: #0e1621;
  --panel-2: #111c29;
  --line: rgba(165, 190, 215, .13);
  --line-strong: rgba(165, 190, 215, .22);
  --text: #edf4f7;
  --muted: #91a2b2;
  --subtle: #657687;
  --accent: #72e6c2;
  --accent-2: #b1f3df;
  --accent-dim: rgba(114, 230, 194, .13);
  --warm: #72e6c2;
  --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%; height: 100%; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; background: radial-gradient(ellipse at 18% 0%, rgba(43, 81, 86, .15), transparent 34%), var(--bg); }
.topbar { height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(8, 13, 20, .92); }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 29px; height: 29px; border: 1px solid rgba(114,230,194,.42); border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-8deg); }
.brand-mark span { display: block; width: 3px; border-radius: 3px; background: var(--accent); transform: skewY(-24deg); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-mark span:nth-child(3) { height: 11px; opacity: .75; }
.eyebrow, .panel-kicker { color: #7f93a5; font-size: 9px; letter-spacing: .16em; font-weight: 750; }
.brand-title { font-size: 14px; font-weight: 670; letter-spacing: -.02em; margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.model-chip { color: #9bb0bd; font-size: 9px; letter-spacing: .12em; font-weight: 700; display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 99px; }
.live-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px rgba(114,230,194,.7); }
.icon-button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); background: #101a25; border-radius: 8px; padding: 8px 11px; color: #d5e2e8; font-size: 11px; font-weight: 650; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.icon-button:hover { border-color: rgba(114,230,194,.55); background: #14252d; }
.icon-button:active { transform: translateY(1px); }
.icon-button svg { width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.main-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 354px; gap: 12px; padding: 12px; }
.visual-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 218px; gap: 12px; }
.panel { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(145deg, rgba(17,28,41,.96), rgba(12,20,30,.98)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 34px rgba(0,0,0,.13); }
.panel-heading { min-height: 53px; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px 8px; }
.panel-heading h1, .panel-heading h2 { margin: 3px 0 0; font-size: 16px; font-weight: 620; letter-spacing: -.035em; }
.panel-heading h2 { font-size: 14px; }
.legend, .graph-key { display: flex; align-items: center; gap: 7px; color: #8193a4; font-size: 10px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(114,230,194,.55); }
.phase-canvas-wrap, .graph-canvas-wrap { position: relative; min-height: 0; flex: 1 1 auto; }
canvas { display: block; width: 100%; height: 100%; }
.canvas-overlay { position: absolute; top: 11px; color: #5e7384; font-size: 8px; letter-spacing: .14em; font-weight: 750; pointer-events: none; }
.overlay-left { left: 17px; }
.overlay-left span { color: var(--accent); padding: 0 4px; }
.overlay-right { right: 19px; }
.panel-footnote { height: 30px; flex: 0 0 30px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-top: 1px solid rgba(165,190,215,.07); color: #8093a2; font-size: 10px; }
.footnote-line { height: 1px; width: 16px; background: var(--accent); }
.graph-heading { min-height: 48px; padding-top: 9px; padding-bottom: 5px; }
.graph-heading h2 { font-size: 13px; }
.graph-key { gap: 6px; font-size: 9px; }
.graph-line-key { width: 17px; height: 2px; background: var(--accent); border-radius: 2px; }
.graph-live-key { width: 7px; height: 7px; border: 1px solid var(--warm); border-radius: 50%; margin-left: 6px; }
.graph-foot { flex: 0 0 23px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: #687d8e; font-size: 8px; letter-spacing: .035em; }
.unit-tag { color: #8599a8; font-size: 7px; text-transform: uppercase; letter-spacing: .08em; margin-left: 3px; }
.control-panel { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #2a3c4a transparent; background: linear-gradient(160deg, rgba(16,26,38,.98), rgba(12,19,29,.98)); border: 1px solid var(--line); border-radius: var(--radius); }
.control-panel::-webkit-scrollbar { width: 5px; }
.control-panel::-webkit-scrollbar-thumb { background: #2a3c4a; border-radius: 10px; }
.control-section { padding: 14px 15px; border-bottom: 1px solid var(--line); }
.intro-section { padding-top: 14px; }
.section-topline, .section-heading { display: flex; align-items: center; justify-content: space-between; }
.status-pill { font-size: 8px; font-weight: 750; letter-spacing: .1em; color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(114,230,194,.2); border-radius: 99px; padding: 4px 7px; }
.status-pill.paused { color: var(--warm); background: rgba(232,197,141,.1); border-color: rgba(232,197,141,.2); }
.intro-section h2 { font-size: 20px; letter-spacing: -.055em; margin: 10px 0 5px; font-weight: 650; }
.intro-section p { font-size: 10.5px; line-height: 1.5; color: #92a4b3; margin: 0 0 12px; max-width: 300px; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.preset-button { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 8px; text-align: left; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.preset-button:hover { border-color: rgba(114,230,194,.38); }
.preset-button.active { border-color: rgba(114,230,194,.5); background: rgba(114,230,194,.075); }
.preset-icon { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border-radius: 7px; font-size: 17px; color: var(--accent); background: rgba(114,230,194,.1); }
.lock-icon { font-size: 19px; }
.preset-button b { display: block; font-size: 9px; font-weight: 680; color: #dbe7eb; white-space: nowrap; }
.preset-button small { display: block; color: #75899a; font-size: 8px; margin-top: 3px; white-space: nowrap; }
.parameter-section { padding-top: 12px; padding-bottom: 11px; }
.section-heading { margin-bottom: 11px; }
.micro-note { color: #657b8d; font-size: 8px; }
.slider-control { margin-bottom: 12px; }
.slider-control:last-of-type { margin-bottom: 9px; }
.slider-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.slider-label label { color: #c7d5dd; font-size: 10px; font-weight: 590; }
.math-symbol { color: var(--accent); font-family: Georgia, serif; font-size: 12px; margin-left: 3px; }
.slider-label output { color: var(--accent-2); font-variant-numeric: tabular-nums; font-size: 10px; font-weight: 680; }
.slider-label output small { color: #657d8d; font-size: 7px; font-weight: 600; margin-left: 3px; text-transform: uppercase; letter-spacing: .06em; }
input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: 14px; background: transparent; display: block; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, rgba(114,230,194,.85), rgba(114,230,194,.22)); border-radius: 8px; }
input[type="range"]::-moz-range-track { height: 3px; background: linear-gradient(90deg, rgba(114,230,194,.85), rgba(114,230,194,.22)); border-radius: 8px; }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; border: 2px solid #0e1721; background: var(--accent); box-shadow: 0 0 0 1px rgba(114,230,194,.65), 0 0 10px rgba(114,230,194,.24); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #0e1721; background: var(--accent); box-shadow: 0 0 0 1px rgba(114,230,194,.65); }
input[type="range"]:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.range-ends { display: flex; justify-content: space-between; color: #536879; font-size: 7px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.range-ends i { font-style: normal; font-size: 6px; text-transform: uppercase; letter-spacing: .07em; color: #496071; margin-left: 2px; }
.compact-slider { margin-bottom: 5px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding-top: 7px; border-top: 1px solid rgba(165,190,215,.07); }
.switch-label { display: inline-flex; align-items: center; gap: 8px; position: relative; cursor: pointer; color: #91a3b1; font-size: 9px; }
.switch-label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 27px; height: 15px; background: #2a3947; border: 1px solid #405262; border-radius: 99px; position: relative; transition: background .2s ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 9px; height: 9px; border-radius: 50%; background: #a3b3be; transition: transform .2s ease, background .2s ease; }
.switch-label input:checked + .switch { background: rgba(114,230,194,.22); border-color: rgba(114,230,194,.45); }
.switch-label input:checked + .switch::after { transform: translateX(12px); background: var(--accent); }
.switch-label input:focus-visible + .switch { outline: 1px solid var(--accent); outline-offset: 3px; }
.quality-control { display: flex; align-items: center; gap: 7px; color: #687d8d; font-size: 8px; }
.quality-control button { border: 1px solid rgba(114,230,194,.32); border-radius: 5px; background: rgba(114,230,194,.08); color: var(--accent); padding: 4px 7px; font-size: 8px; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.measurements-section { padding-top: 12px; padding-bottom: 12px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.readout-card { min-width: 0; border: 1px solid rgba(165,190,215,.1); background: rgba(255,255,255,.018); border-radius: 8px; padding: 8px 9px 7px; }
.primary-readout { background: linear-gradient(135deg, rgba(114,230,194,.11), rgba(114,230,194,.025)); border-color: rgba(114,230,194,.22); }
.readout-label { display: flex; align-items: center; justify-content: space-between; color: #8fa2b0; font-size: 8px; }
.readout-label span { color: var(--accent); font-family: Georgia, serif; font-size: 10px; }
.readout-value { color: #e7f1f3; font-size: 17px; font-weight: 620; letter-spacing: -.045em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.primary-readout .readout-value { color: var(--accent-2); font-size: 20px; }
.readout-value.lock-value { font-size: 16px; }
.readout-unit { color: #607789; font-size: 7px; margin-top: 2px; }
.readout-unit em { color: #526b7a; font-style: normal; text-transform: uppercase; letter-spacing: .06em; font-size: 6px; margin-left: 2px; }
.caption-card { display: flex; gap: 9px; align-items: flex-start; margin-top: 8px; padding: 9px 10px; border: 1px solid rgba(114,230,194,.14); background: rgba(114,230,194,.045); border-radius: 8px; color: #9cb0ba; font-size: 9px; line-height: 1.45; }
.caption-card b { color: #cce9df; font-weight: 700; }
.caption-icon { color: var(--accent); font-size: 16px; line-height: 1; }
.transport-section { padding-top: 11px; padding-bottom: 11px; }
.transport-buttons { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 6px; }
.transport-buttons button { border-radius: 7px; padding: 8px 7px; font-size: 9px; font-weight: 700; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.transport-buttons button:active { transform: translateY(1px); }
.transport-primary { background: var(--accent); color: #09201d; border: 1px solid var(--accent); display: flex; align-items: center; justify-content: center; gap: 7px; }
.transport-primary:hover { background: #91efd2; }
.play-icon { font-size: 11px; }
.transport-secondary { background: rgba(255,255,255,.025); border: 1px solid var(--line-strong); color: #b9c9d1; }
.transport-secondary:hover { border-color: rgba(114,230,194,.4); background: rgba(114,230,194,.06); }
.transport-secondary span { color: var(--accent); margin-left: 3px; }
.check-card { margin-top: 10px; border: 1px solid rgba(165,190,215,.12); border-radius: 8px; padding: 8px 9px; background: rgba(5,10,16,.24); }
.check-heading { display: flex; align-items: center; gap: 6px; color: #c4d2d8; font-size: 8px; font-weight: 700; }
.check-icon { width: 14px; height: 14px; display: grid; place-items: center; color: var(--accent); border: 1px solid rgba(114,230,194,.35); border-radius: 50%; font-size: 9px; }
.check-tag { margin-left: auto; color: #6c8d85; font-size: 6px; letter-spacing: .1em; }
.check-equation { color: #8094a3; font-size: 8px; margin: 6px 0 7px 20px; }
.check-equation b { color: var(--accent-2); }
.check-values { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-left: 20px; }
.check-values small { display: block; color: #667b8b; font-size: 7px; margin-bottom: 3px; }
.check-values small i { color: #536d7c; font-size: 6px; text-transform: uppercase; font-style: normal; }
.check-values b { display: block; color: #d8e7e8; font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 650; }
.science-panel { border-bottom: 1px solid var(--line); }
.science-panel summary { min-height: 42px; padding: 0 15px; display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: #d2dfe4; font-size: 10px; font-weight: 650; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary::after { content: "＋"; margin-left: auto; color: var(--accent); font-size: 15px; font-weight: 400; }
.science-panel[open] summary::after { content: "−"; }
.science-icon { color: var(--accent); font-family: Georgia, serif; font-size: 17px; }
.summary-hint { color: #617687; font-size: 8px; font-weight: 450; margin-left: 4px; }
.science-content { padding: 0 15px 14px; color: #93a6b3; font-size: 9px; line-height: 1.55; }
.science-content p { margin: 8px 0; }
.science-intro { color: #a9bbc4; }
.equation-block { border: 1px solid rgba(165,190,215,.1); background: rgba(0,0,0,.16); border-radius: 7px; padding: 8px 9px; margin: 8px 0; }
.equation-label { display: block; color: #668579; font-size: 7px; font-weight: 800; letter-spacing: .12em; margin-bottom: 5px; }
.equation-block code { display: block; color: #d2eee4; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; white-space: normal; }
.equation-block small { display: block; color: #6f8493; font-size: 8px; margin-top: 4px; }
.disclaimer { color: #6e8391; font-style: italic; font-size: 8px; }
.panel-endnote { padding: 10px 15px 12px; color: #526879; font-size: 7px; letter-spacing: .13em; text-align: center; }
.panel-endnote span { color: var(--accent); padding: 0 4px; }
button:focus-visible, summary:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
@media (max-width: 900px) and (min-width: 621px) {
  .main-grid { grid-template-columns: minmax(0, 1fr) 320px; padding: 9px; gap: 9px; }
  .visual-column { grid-template-rows: minmax(0, 1fr) 190px; gap: 9px; }
  .topbar { padding: 0 14px; }
  .control-section { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 620px) {
  body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
  .app-shell { height: 100vh; height: 100dvh; }
  .topbar { height: 52px; flex-basis: 52px; padding: 0 12px; }
  .brand-mark { width: 25px; height: 25px; border-radius: 7px; }
  .eyebrow { font-size: 7px; }
  .brand-title { font-size: 12px; }
  .topbar-right { gap: 8px; }
  .model-chip { font-size: 7px; padding: 6px 7px; }
  .icon-button { padding: 7px 8px; font-size: 9px; }
  .icon-button svg { width: 12px; height: 12px; }
  .main-grid { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
  .visual-column { flex: 0 0 51%; min-height: 0; grid-template-rows: minmax(0, 1fr) minmax(105px, .56fr); gap: 8px; }
  .control-panel { flex: 1 1 auto; min-height: 0; border-radius: 12px; }
  .panel { border-radius: 11px; }
  .panel-heading { min-height: 40px; padding: 7px 10px 5px; }
  .panel-heading h1 { font-size: 13px; }
  .panel-heading h2 { font-size: 11px; }
  .panel-kicker { font-size: 7px; }
  .legend { font-size: 8px; }
  .canvas-overlay { top: 8px; font-size: 6px; }
  .overlay-left { left: 10px; }
  .overlay-right { right: 10px; }
  .panel-footnote { height: 22px; flex-basis: 22px; padding: 0 10px; font-size: 8px; }
  .graph-heading { min-height: 34px; }
  .graph-key { font-size: 7px; gap: 4px; }
  .graph-foot { flex-basis: 16px; padding: 0 9px; font-size: 6px; }
  .graph-foot .unit-tag { font-size: 5px; }
  .control-section { padding: 10px 11px; }
  .intro-section h2 { font-size: 17px; margin: 7px 0 4px; }
  .intro-section p { font-size: 9px; margin-bottom: 9px; }
  .preset-button { padding: 6px; gap: 6px; }
  .preset-icon { width: 22px; height: 22px; flex-basis: 22px; }
  .preset-button b { font-size: 8px; }
  .preset-button small { font-size: 7px; }
  .slider-control { margin-bottom: 9px; }
  .slider-label { margin-bottom: 4px; }
  .slider-label label { font-size: 9px; }
  .slider-label output { font-size: 9px; }
  .range-ends { font-size: 6px; }
  .parameter-section { padding-top: 9px; padding-bottom: 8px; }
  .section-heading { margin-bottom: 8px; }
  .readout-card { padding: 6px 7px; }
  .readout-value { font-size: 15px; }
  .primary-readout .readout-value { font-size: 17px; }
  .caption-card { padding: 7px 8px; font-size: 8px; margin-top: 6px; }
  .transport-section { padding-top: 9px; padding-bottom: 9px; }
  .transport-buttons button { padding: 7px 5px; font-size: 8px; }
  .check-card { margin-top: 8px; padding: 7px 8px; }
  .check-heading { font-size: 7px; }
  .check-equation { font-size: 7px; }
  .check-values b { font-size: 9px; }
  .science-panel summary { min-height: 36px; padding: 0 11px; }
  .science-content { padding: 0 11px 11px; }
  .panel-endnote { padding: 8px 10px; }
}
@media (max-width: 370px) {
  .model-chip { display: none; }
  .visual-column { flex-basis: 49%; }
  .graph-key { display: none; }
  .preset-button b { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
