:root {
  color-scheme: dark;
  --bg: #080e14;
  --panel: #0d171f;
  --panel-raised: #111e28;
  --panel-soft: #0a131b;
  --line: #243540;
  --line-soft: rgba(135, 166, 183, .14);
  --text: #e6f0f5;
  --muted: #91a5b1;
  --muted-2: #667d8a;
  --accent: #59d8e8;
  --accent-soft: rgba(89, 216, 232, .12);
  --accent-glow: rgba(89, 216, 232, .24);
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--bg); }
body { overflow-x: hidden; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: 100%; min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 49% 42%, rgba(30, 68, 80, .12), transparent 52%), var(--bg); }
body.embed-mode .app-shell { height: 100vh; height: 100dvh; min-height: 0; }
.topbar { min-height: 68px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(8, 14, 20, .92); z-index: 2; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(89, 216, 232, .3); border-radius: 11px; color: var(--accent); background: linear-gradient(145deg, rgba(89,216,232,.13), rgba(89,216,232,.025)); box-shadow: inset 0 0 18px rgba(89,216,232,.05); }
.brand-mark svg { width: 27px; height: 27px; }
.eyebrow, .small-label, .section-index, .caption-kicker, .label-kicker, .wall-label, .tick-readout, .readout-label, .science-kicker { font-size: 9px; font-weight: 750; letter-spacing: .13em; color: var(--muted-2); }
.eyebrow { margin-bottom: 3px; }
.brand-title { font-size: 15px; line-height: 1.2; font-weight: 680; letter-spacing: -.02em; color: var(--text); }
.topbar-meta { display: flex; align-items: center; gap: 16px; }
.model-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: #b6c8d1; font-size: 10px; font-weight: 650; letter-spacing: .04em; background: rgba(255,255,255,.018); white-space: nowrap; }
.live-dot, .tick-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); flex: 0 0 auto; }
.meta-divider { width: 1px; height: 19px; background: var(--line); }
.topbar-note { color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: .13em; white-space: nowrap; }
.icon-button { border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); color: #bdcbd2; display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; font-size: 11px; font-weight: 650; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.icon-button:hover, .transport-button:hover, .preset-button:hover { border-color: rgba(89,216,232,.55); color: var(--text); background-color: rgba(89,216,232,.07); }
.icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 264px minmax(360px, 1fr) 280px; gap: 0; overflow: hidden; }
.control-panel, .insight-panel { min-width: 0; background: rgba(13,23,31,.82); padding: 19px 16px 22px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a3c48 transparent; }
.control-panel { border-right: 1px solid var(--line); }
.insight-panel { border-left: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 19px; }
.section-index { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid rgba(89,216,232,.25); border-radius: 7px; color: var(--accent); background: rgba(89,216,232,.06); font-size: 9px; }
.section-title { font-size: 13px; font-weight: 690; letter-spacing: -.01em; }
.section-subtitle { margin-top: 3px; font-size: 10px; color: var(--muted-2); }
.preset-block { padding: 13px 0 16px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.small-label { margin-bottom: 9px; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.preset-button { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 55px; text-align: left; padding: 8px 7px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); cursor: pointer; transition: .18s ease; }
.preset-icon { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; background: rgba(89,216,232,.08); color: var(--accent); font-size: 17px; font-weight: 650; }
.preset-button strong { display: block; font-size: 9px; font-weight: 680; white-space: nowrap; }
.preset-button small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8px; white-space: nowrap; }
.control-list { padding-top: 3px; }
.control-item { padding: 13px 0 12px; border-bottom: 1px solid var(--line-soft); }
.control-topline { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.control-topline label { font-size: 11px; font-weight: 620; color: #c9d7dd; }
.math-symbol { color: var(--accent); font-style: italic; font-family: Georgia, serif; font-size: 14px; }
.control-topline output { color: var(--accent); font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: 4px; border-radius: 99px; background: linear-gradient(90deg, rgba(89,216,232,.85), rgba(89,216,232,.24)); outline: none; display: block; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d9f8fb; background: #42c8dc; box-shadow: 0 0 0 4px rgba(89,216,232,.12), 0 0 12px rgba(89,216,232,.25); }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #d9f8fb; background: #42c8dc; box-shadow: 0 0 0 4px rgba(89,216,232,.12); }
input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 7px; }
.range-foot { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted-2); font-size: 8px; font-variant-numeric: tabular-nums; }
.control-hint { margin-top: 6px; color: #748a96; font-size: 9px; line-height: 1.45; }
.quality-block { padding-top: 15px; }
.quality-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #09121a; }
.quality-option { border: 0; border-radius: 6px; padding: 7px 10px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 650; cursor: pointer; }
.quality-option.active { color: var(--accent); background: rgba(89,216,232,.11); box-shadow: inset 0 0 0 1px rgba(89,216,232,.18); }
.quality-note { margin-top: 7px; color: var(--muted-2); font-size: 9px; line-height: 1.45; }
.center-panel { min-width: 0; min-height: 0; padding: 17px 18px 14px; display: flex; flex-direction: column; gap: 12px; background: radial-gradient(ellipse at 52% 47%, rgba(21,66,77,.1), transparent 60%); }
.stage-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; }
.stage-title-wrap { display: flex; align-items: center; gap: 10px; }
.stage-title { font-size: 13px; font-weight: 690; }
.stage-subtitle { margin-top: 3px; font-size: 9px; color: var(--muted-2); }
.stage-live { display: flex; align-items: center; gap: 7px; color: var(--accent); font-size: 8px; letter-spacing: .12em; font-weight: 750; white-space: nowrap; }
.stage-time { padding-left: 8px; border-left: 1px solid var(--line); color: var(--muted-2); font-size: 9px; letter-spacing: 0; font-weight: 550; font-variant-numeric: tabular-nums; }
.stage-wrap { position: relative; flex: 1; min-height: 260px; overflow: hidden; border: 1px solid #1d333e; border-radius: 13px; background: radial-gradient(ellipse at center, #0c202a, #08131b 75%); box-shadow: inset 0 0 45px rgba(0,0,0,.22), 0 10px 34px rgba(0,0,0,.15); }
.stage-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(135deg, rgba(89,216,232,.035), transparent 35%, transparent 70%, rgba(89,216,232,.02)); }
#flowCanvas { display: block; width: 100%; height: 100%; }
.canvas-label { position: absolute; z-index: 1; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.canvas-label-left { left: 17px; top: 16px; }
.label-kicker { font-size: 8px; color: #6d8b98; }
.canvas-label-left strong { font-size: 11px; color: #c4d8df; font-weight: 650; }
.canvas-label-right { right: 17px; top: 17px; flex-direction: row; align-items: center; gap: 7px; color: #91b1bc; font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.force-arrow { color: var(--accent); font-size: 17px; line-height: 1; }
.wall-label { position: absolute; left: 50%; transform: translateX(-50%); z-index: 1; font-size: 7px; color: rgba(151,177,188,.56); letter-spacing: .15em; pointer-events: none; }
.wall-label-top { top: 27%; }
.wall-label-bottom { bottom: 25%; }
.canvas-scale { position: absolute; left: 17px; bottom: 15px; display: flex; align-items: center; gap: 8px; color: #708a96; font-size: 8px; pointer-events: none; }
.scale-line { width: 28px; height: 1px; background: var(--accent); box-shadow: 0 0 7px var(--accent-glow); }
.caption-row { display: flex; gap: 11px; align-items: flex-start; min-height: 52px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(14,27,36,.7); }
.caption-glyph { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(89,216,232,.19); border-radius: 7px; color: var(--accent); background: rgba(89,216,232,.06); }
.caption-glyph svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.caption-kicker { font-size: 8px; margin: 1px 0 4px; color: #73909c; }
.caption-row p { margin: 0; color: #afc1c9; font-size: 10px; line-height: 1.5; }
.transport-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 37px; }
.transport-controls { display: flex; gap: 6px; }
.transport-button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); color: #b7c7ce; font-size: 10px; font-weight: 650; cursor: pointer; transition: .18s ease; }
.transport-button.primary { color: #06151a; border-color: rgba(89,216,232,.8); background: var(--accent); }
.transport-button.primary:hover { color: #06151a; background: #8ceaf3; }
.transport-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tick-readout { display: flex; align-items: center; gap: 7px; font-size: 8px; letter-spacing: .08em; white-space: nowrap; }
.tick-readout strong { color: #9bb0ba; font-size: 8px; letter-spacing: 0; font-weight: 600; }
.insight-heading { margin-bottom: 15px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.readout-card { min-width: 0; padding: 10px 10px 9px; border: 1px solid var(--line-soft); border-radius: 9px; background: linear-gradient(145deg, rgba(18,33,43,.85), rgba(10,19,27,.9)); }
.readout-label { display: flex; justify-content: space-between; color: #8197a2; font-size: 8px; letter-spacing: .09em; }
.readout-label span { color: var(--accent); font-family: Georgia, serif; font-size: 11px; font-style: italic; letter-spacing: 0; }
.readout-value { margin-top: 7px; color: #e1f3f6; font-size: 17px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-unit { margin-top: 3px; color: #6d8490; font-size: 8px; white-space: nowrap; }
.chart-card { margin-top: 12px; padding: 11px 10px 9px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(11,20,28,.82); }
.chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.chart-title { font-size: 11px; font-weight: 680; }
.chart-subtitle { margin-top: 3px; color: var(--muted-2); font-size: 8px; }
.chart-live-tag { padding: 3px 5px; border: 1px solid rgba(89,216,232,.2); border-radius: 4px; color: var(--accent); background: rgba(89,216,232,.07); font-size: 7px; font-weight: 750; letter-spacing: .12em; }
#profileCanvas { display: block; width: 100%; height: 154px; margin-top: 4px; }
.chart-legend { display: flex; align-items: center; gap: 14px; color: #8297a1; font-size: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-line { width: 17px; height: 2px; display: inline-block; }
.legend-line.actual { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.legend-line.theory { height: 0; border-top: 1px dashed #9caeb5; }
.check-card { margin-top: 10px; padding: 11px 11px 9px; border: 1px solid rgba(89,216,232,.19); border-radius: 10px; background: linear-gradient(145deg, rgba(20,49,57,.36), rgba(10,20,28,.88)); }
.check-heading { display: flex; align-items: center; gap: 8px; }
.check-icon { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid rgba(89,216,232,.35); border-radius: 6px; color: var(--accent); background: rgba(89,216,232,.09); font-size: 12px; }
.check-title { font-size: 10px; font-weight: 700; }
.check-subtitle { margin-top: 2px; color: #758e99; font-size: 8px; }
.check-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.check-values div { display: flex; flex-direction: column; gap: 4px; }
.check-values span, .check-difference span { color: #8196a0; font-size: 8px; }
.check-values strong { color: #d4e4e9; font-size: 12px; font-variant-numeric: tabular-nums; }
.check-difference { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(130,170,183,.12); }
.check-difference strong { color: var(--accent); font-size: 12px; font-variant-numeric: tabular-nums; }
.check-foot { margin-top: 7px; color: #8297a0; font-size: 8px; line-height: 1.45; }
.mass-line { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(130,170,183,.1); color: #8196a0; font-size: 8px; }
.mass-line strong { color: #a9c2ca; font-size: 9px; font-variant-numeric: tabular-nums; }
.science-panel { margin-top: 11px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(10,19,27,.78); }
.science-panel summary { display: flex; align-items: center; gap: 8px; padding: 11px; list-style: none; cursor: pointer; color: #c9d8de; font-size: 10px; font-weight: 670; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary > svg { width: 13px; height: 13px; margin-left: auto; fill: none; stroke: #8ca1aa; stroke-width: 1.5; transition: transform .2s ease; }
.science-panel[open] summary > svg { transform: rotate(180deg); }
.science-summary-icon { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: rgba(89,216,232,.08); color: var(--accent); font-family: Georgia, serif; font-size: 13px; }
.science-content { padding: 0 11px 12px; color: #9eb1ba; font-size: 9px; line-height: 1.55; }
.science-content p { margin: 7px 0; }
.science-kicker { margin-top: 6px; color: #6f8995; font-size: 8px; }
.equation { overflow-wrap: anywhere; margin: 6px 0; padding: 8px; border: 1px solid rgba(120,160,175,.13); border-radius: 6px; background: rgba(255,255,255,.025); color: #d0e8ed; font-family: Georgia, "Times New Roman", serif; font-size: 11px; line-height: 1.55; }
.science-gap { margin-top: 13px; }
.science-content ul { padding-left: 15px; margin: 7px 0; }
.science-content li { margin: 4px 0; }
.disclaimer { margin-top: 11px !important; padding-top: 8px; border-top: 1px solid var(--line-soft); color: #7d949e; font-style: italic; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (min-width: 1500px) {
  .workspace { grid-template-columns: 286px minmax(500px, 1fr) 300px; }
  .center-panel { padding-left: 24px; padding-right: 24px; }
  .control-panel, .insight-panel { padding-left: 19px; padding-right: 19px; }
}
@media (max-width: 1120px) and (min-width: 761px) {
  .workspace { grid-template-columns: 238px minmax(320px,1fr) 252px; }
  .control-panel, .insight-panel { padding-left: 12px; padding-right: 12px; }
  .center-panel { padding-left: 12px; padding-right: 12px; }
  .topbar-note { display: none; }
}
@media (max-width: 760px) {
  .topbar { min-height: 60px; height: 60px; padding: 0 13px; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .eyebrow { font-size: 7px; }
  .brand-title { font-size: 13px; }
  .topbar-meta { gap: 7px; }
  .model-pill { padding: 6px 8px; font-size: 8px; }
  .meta-divider, .topbar-note { display: none; }
  .screenshot-button { width: 32px; height: 32px; justify-content: center; padding: 0; }
  .screenshot-button span { display: none; }
  .workspace { display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
  body.embed-mode .workspace { min-height: 0; }
  .center-panel { order: 0; flex: 0 0 auto; height: 386px; min-height: 386px; padding: 13px 12px 12px; gap: 9px; }
  .stage-heading { min-height: 30px; }
  .stage-title { font-size: 12px; }
  .stage-subtitle { font-size: 8px; }
  .stage-wrap { min-height: 218px; }
  .wall-label-top { top: 27%; }
  .wall-label-bottom { bottom: 25%; }
  .canvas-label-left { left: 11px; top: 11px; }
  .canvas-label-right { right: 11px; top: 12px; }
  .canvas-scale { left: 11px; bottom: 10px; }
  .caption-row { min-height: 46px; padding: 7px 9px; gap: 8px; }
  .caption-glyph { width: 23px; height: 23px; }
  .caption-row p { font-size: 9px; }
  .transport-row { min-height: 32px; }
  .transport-button { padding: 6px 8px; font-size: 9px; }
  .tick-readout { font-size: 7px; gap: 5px; }
  .tick-readout strong { font-size: 7px; }
  .control-panel { order: 1; border-right: 0; border-top: 1px solid var(--line); padding: 17px 14px 19px; overflow: visible; }
  .insight-panel { order: 2; border-left: 0; border-top: 1px solid var(--line); padding: 17px 14px 22px; overflow: visible; }
  .section-heading { margin-bottom: 13px; }
  .control-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 15px; }
  .control-item { padding: 12px 0 11px; }
  .control-item:nth-child(odd) { padding-right: 4px; }
  .control-topline { align-items: flex-start; flex-direction: column; gap: 4px; margin-bottom: 9px; }
  .control-topline label { font-size: 10px; }
  .control-topline output { font-size: 10px; }
  .range-foot { font-size: 7px; }
  .control-hint { font-size: 8px; }
  .quality-block { padding-top: 13px; }
  .preset-button { min-height: 51px; }
  .insight-panel .readout-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; }
  .readout-card { padding: 8px 6px; }
  .readout-label { font-size: 7px; letter-spacing: .04em; }
  .readout-label span { font-size: 9px; }
  .readout-value { font-size: 13px; }
  .readout-unit { font-size: 7px; white-space: normal; line-height: 1.3; }
  #profileCanvas { height: 174px; }
  .chart-card { margin-top: 10px; }
  .check-card { margin-top: 10px; }
  .science-panel { margin-top: 10px; }
  body.embed-mode .workspace { height: calc(100dvh - 60px); }
}
@media (max-width: 390px) {
  .center-panel { height: 374px; min-height: 374px; padding-left: 10px; padding-right: 10px; }
  .stage-live { gap: 5px; font-size: 7px; }
  .stage-time { padding-left: 5px; font-size: 8px; }
  .transport-button { gap: 5px; padding: 6px 7px; }
  .tick-readout { max-width: 112px; flex-wrap: wrap; justify-content: flex-end; line-height: 1.3; }
  .insight-panel .readout-grid { grid-template-columns: 1fr 1fr; }
  .readout-value { font-size: 16px; }
  .readout-unit { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
