:root {
  color-scheme: dark;
  --bg: #091116;
  --panel: #101b20;
  --panel-2: #132127;
  --line: rgba(176, 205, 199, .12);
  --line-strong: rgba(176, 205, 199, .2);
  --text: #e7f0ed;
  --muted: #8da39f;
  --muted-2: #657a76;
  --accent: #70d7c2;
  --accent-2: #3da995;
  --warm: #d9b879;
  --danger: #d58f7c;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-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; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; min-width: 0; background: radial-gradient(ellipse at 18% 0%, rgba(42, 84, 78, .18), transparent 40%), var(--bg); }
.topbar { height: 68px; flex: 0 0 68px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(8, 16, 20, .94); }
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark { width: 31px; height: 31px; border: 1px solid rgba(112, 215, 194, .4); border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-12deg); background: rgba(112, 215, 194, .06); }
.brand-mark span { display: block; width: 3px; border-radius: 5px; background: var(--accent); transform: rotate(12deg); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 16px; }
.brand-mark span:nth-child(3) { height: 11px; opacity: .7; }
.eyebrow, .section-kicker, .unit-note, .classification, .corner-label, .readout-label, .audit-values span, .footer-note, .quality-row > span:first-child { letter-spacing: .13em; font-size: 9px; font-weight: 750; color: var(--muted); }
.brand-copy h1 { font-size: 18px; letter-spacing: -.04em; margin: 2px 0 0; font-weight: 650; }
.brand-copy h1 em { color: var(--accent); font-style: normal; }
.eyebrow { font-size: 8px; }
.top-meta { display: flex; align-items: center; gap: 9px; color: #a6b9b4; font-size: 9px; letter-spacing: .11em; font-weight: 700; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(112, 215, 194, .7); }
.meta-divider { height: 13px; width: 1px; background: var(--line-strong); margin: 0 4px; }
.classification { color: var(--accent); font-size: 8px; }
.workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 366px; gap: 0; }
.stage-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 18px 22px 16px; border-right: 1px solid var(--line); }
.stage-heading { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 2px 12px; }
.stage-heading h2, .section-title-row h2 { margin: 3px 0 0; font-size: 16px; font-weight: 620; letter-spacing: -.025em; }
.stage-key { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.key-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.key-dot.open { background: var(--accent); box-shadow: 0 0 8px rgba(112,215,194,.5); }
.key-dot.closed { background: #738681; }
.canvas-frame { position: relative; flex: 1 1 auto; min-height: 170px; border: 1px solid rgba(147, 183, 174, .14); border-radius: 16px; overflow: hidden; background: radial-gradient(ellipse at 50% 44%, #12252a 0%, #0c171c 62%, #0a1419 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 14px 44px rgba(0,0,0,.18); }
#leafCanvas { display: block; width: 100%; height: 100%; }
.canvas-corner { position: absolute; top: 15px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.canvas-corner-left { left: 16px; }
.canvas-corner-right { right: 16px; text-align: right; }
.corner-label { color: #b3c7c0; font-size: 8px; }
.corner-sub { color: #718782; font-size: 9px; letter-spacing: .04em; }
.canvas-scale { position: absolute; bottom: 14px; left: 16px; display: flex; align-items: center; gap: 8px; color: #819790; font-size: 9px; pointer-events: none; }
.canvas-scale span:first-child { width: 20px; height: 8px; border: 1px solid rgba(112,215,194,.75); border-radius: 8px; position: relative; }
.canvas-scale span:first-child::after { content: ""; position: absolute; width: 3px; height: 3px; background: var(--accent); border-radius: 50%; left: 8px; top: 1.5px; }
.caption-row { min-height: 52px; display: flex; align-items: center; gap: 11px; padding: 8px 3px 8px; }
.caption-icon { width: 25px; height: 25px; border: 1px solid rgba(112,215,194,.25); color: var(--accent); background: rgba(112,215,194,.07); display: grid; place-items: center; border-radius: 8px; flex: 0 0 auto; font-size: 14px; }
.caption-row p { margin: 0; max-width: 850px; color: #a6b9b4; font-size: 11px; line-height: 1.48; }
.readout-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.readout-card { min-width: 0; padding: 11px 12px 10px; background: linear-gradient(145deg, rgba(20, 35, 40, .94), rgba(13, 25, 30, .94)); border: 1px solid var(--line); border-radius: 11px; }
.readout-card-accent { border-color: rgba(112,215,194,.22); }
.readout-label { font-size: 8px; letter-spacing: .1em; color: #9eb1ab; white-space: nowrap; }
.readout-label span { color: #607b74; font-size: 7px; margin-left: 3px; }
.readout-value { margin-top: 7px; font-size: 22px; line-height: 1; font-weight: 620; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value small { color: #829891; font-size: 9px; font-weight: 550; letter-spacing: 0; margin-left: 4px; }
.readout-card-accent .readout-value { color: var(--accent); }
.readout-track { height: 2px; border-radius: 3px; margin-top: 9px; background: rgba(153, 181, 174, .12); overflow: hidden; }
.readout-track i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .25s ease; }
.control-column { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 19px 18px 14px; background: linear-gradient(180deg, rgba(17, 29, 34, .96), rgba(12, 22, 27, .98)); scrollbar-width: thin; scrollbar-color: #334a47 transparent; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.section-title-row h2 { font-size: 16px; }
.unit-note { font-size: 7px; color: #708680; white-space: nowrap; padding-bottom: 3px; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.preset-button { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 55px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(9, 18, 22, .5); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.preset-button:hover { border-color: rgba(112,215,194,.4); transform: translateY(-1px); }
.preset-button.active { border-color: rgba(112,215,194,.48); background: rgba(112,215,194,.08); box-shadow: inset 0 0 0 1px rgba(112,215,194,.06); }
.preset-icon { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; background: rgba(112,215,194,.09); color: var(--accent); font-size: 16px; }
.preset-button:nth-child(2) .preset-icon { color: var(--warm); background: rgba(217,184,121,.1); }
.preset-button b { display: block; font-size: 9px; font-weight: 700; white-space: nowrap; }
.preset-button small { display: block; margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.25; }
.slider-list { margin-top: 14px; }
.slider-control { padding: 9px 0 10px; border-bottom: 1px solid rgba(176,205,199,.075); }
.slider-control-last { border-bottom: 0; padding-bottom: 4px; }
.slider-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.slider-heading label { font-size: 10px; color: #c8d5d1; font-weight: 560; }
.slider-heading output { color: var(--accent); font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slider-heading abbr { text-decoration: none; border-bottom: 1px dotted var(--muted); }
.symbol { color: #8aa49b; font-size: 10px; }
input[type="range"] { width: 100%; height: 14px; margin: 7px 0 0; display: block; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 6px; background: linear-gradient(90deg, var(--accent-2), rgba(129,158,151,.22)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 6px; background: linear-gradient(90deg, var(--accent-2), rgba(129,158,151,.22)); }
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 #d7f6ed; background: var(--accent-2); box-shadow: 0 0 0 3px rgba(112,215,194,.12); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #d7f6ed; background: var(--accent-2); box-shadow: 0 0 0 3px rgba(112,215,194,.12); }
.range-ends { display: flex; justify-content: space-between; gap: 5px; color: #627771; font-size: 7px; line-height: 1.3; }
.range-ends .unit-inline { color: #60756f; white-space: nowrap; }
.playback-section { margin-top: 13px; padding: 11px 0 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.playback-main { display: flex; align-items: center; gap: 7px; }
.primary-button, .icon-button { height: 34px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(7, 16, 20, .7); cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.primary-button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px; background: var(--accent); border-color: var(--accent); color: #07201d; font-size: 10px; font-weight: 750; }
.primary-button:hover { background: #8ce6d3; transform: translateY(-1px); }
.primary-button span:first-child { font-size: 13px; }
.icon-button { width: 35px; flex: 0 0 35px; color: #b6c7c1; font-size: 17px; }
.icon-button:hover { border-color: rgba(112,215,194,.45); color: var(--accent); background: rgba(112,215,194,.07); }
.quality-row { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.quality-row > span:first-child { font-size: 7px; color: #70857f; }
.quality-switch { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: rgba(4, 12, 15, .45); }
.quality-switch button { padding: 3px 8px; border: 0; border-radius: 5px; background: transparent; color: #7f938c; font-size: 8px; cursor: pointer; }
.quality-switch button[aria-pressed="true"] { color: #d9f5ec; background: rgba(112,215,194,.16); }
.fps-note { margin-left: auto; color: #60766f; font-size: 7px; letter-spacing: .08em; }
.audit-card { margin-top: 12px; padding: 11px 11px 9px; border: 1px solid rgba(112,215,194,.17); border-radius: 11px; background: linear-gradient(140deg, rgba(24, 46, 46, .5), rgba(11, 22, 26, .5)); }
.audit-head { display: flex; align-items: center; gap: 8px; }
.audit-icon { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 7px; color: var(--accent); background: rgba(112,215,194,.12); font-size: 11px; }
.audit-head b { display: block; font-size: 9px; font-weight: 700; }
.audit-head small { display: block; color: #81958e; font-size: 7px; margin-top: 2px; }
.audit-tag { margin-left: auto; color: var(--accent); font-size: 7px; letter-spacing: .1em; }
.audit-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 11px; }
.audit-values div { min-width: 0; }
.audit-values span { display: block; font-size: 7px; color: #718780; }
.audit-values b { display: block; margin-top: 4px; font-size: 10px; font-variant-numeric: tabular-nums; color: #d4e2dc; }
.audit-values div:last-child b { color: var(--accent); }
.audit-card p { margin: 8px 0 0; color: #748981; font-size: 7px; line-height: 1.4; }
.science-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(8, 17, 21, .4); }
.science-panel summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; cursor: pointer; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.science-panel summary .section-kicker { font-size: 7px; }
.science-panel summary b { font-size: 10px; }
.summary-plus { color: var(--accent); font-size: 17px; transition: transform .2s; }
.science-panel[open] .summary-plus { transform: rotate(45deg); }
.science-content { padding: 0 12px 12px; color: #9cafaa; font-size: 9px; line-height: 1.5; }
.science-content h3 { margin: 8px 0 4px; color: #d4e1dc; font-size: 9px; }
.science-content p { margin: 5px 0 8px; }
.equation { margin: 6px 0; padding: 7px 8px; border-radius: 6px; border: 1px solid rgba(176,205,199,.09); background: rgba(3, 11, 14, .45); color: #c5e4d9; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; overflow-wrap: anywhere; }
.science-content ul { margin: 5px 0 8px; padding-left: 15px; }
.science-content li { margin: 3px 0; }
.constants-note { margin-top: 8px; padding: 8px; border-left: 2px solid rgba(112,215,194,.45); background: rgba(112,215,194,.045); font-size: 8px; }
.disclaimer { color: #70847e; font-size: 8px; margin: 9px 0 0 !important; }
.footer-note { margin-top: 11px; font-size: 6px; color: #526760; text-align: center; letter-spacing: .11em; }
.footer-note span { color: var(--accent-2); padding: 0 3px; }
@media (min-width: 1500px) { .workspace { grid-template-columns: minmax(0, 1fr) 390px; } .stage-column { padding: 22px 28px 20px; } .control-column { padding: 22px 21px 16px; } }
@media (max-width: 900px) and (min-width: 621px) { .workspace { grid-template-columns: minmax(0, 1fr) 330px; } .stage-column { padding: 14px; } .readout-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .readout-card { padding: 9px 10px; } .readout-value { font-size: 19px; } }
@media (max-width: 620px) {
  body { overflow: hidden; }
  .topbar { height: 57px; flex-basis: 57px; padding: 0 13px; }
  .brand-mark { width: 27px; height: 27px; border-radius: 8px; }
  .brand-copy h1 { font-size: 15px; }
  .eyebrow { font-size: 7px; }
  .top-meta { gap: 6px; font-size: 7px; }
  .classification { font-size: 6px; }
  .meta-divider { margin: 0 1px; }
  .workspace { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(280px, 43dvh) minmax(0,1fr); min-height: 0; }
  .stage-column { padding: 10px 10px 8px; border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; }
  .stage-heading { min-height: 39px; padding: 0 2px 7px; }
  .stage-heading h2 { font-size: 13px; }
  .section-kicker { font-size: 7px; }
  .stage-key { font-size: 8px; gap: 4px; }
  .key-dot { margin-left: 4px; width: 6px; height: 6px; }
  .canvas-frame { min-height: 130px; border-radius: 12px; }
  .canvas-corner { top: 9px; }
  .canvas-corner-left { left: 10px; }
  .canvas-corner-right { right: 10px; }
  .corner-label { font-size: 7px; }
  .corner-sub { font-size: 7px; }
  .canvas-scale { bottom: 8px; left: 10px; font-size: 7px; }
  .caption-row { min-height: 40px; padding: 5px 1px 4px; gap: 7px; }
  .caption-icon { width: 20px; height: 20px; border-radius: 6px; font-size: 11px; }
  .caption-row p { font-size: 8px; line-height: 1.35; }
  .readout-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; }
  .readout-card { padding: 6px 5px 5px; border-radius: 7px; }
  .readout-label { font-size: 5px; letter-spacing: .055em; white-space: normal; line-height: 1.2; min-height: 12px; }
  .readout-label span { display: none; }
  .readout-value { font-size: 15px; margin-top: 4px; }
  .readout-value small { font-size: 6px; margin-left: 2px; }
  .readout-track { margin-top: 5px; }
  .control-column { padding: 12px 13px 16px; }
  .section-title-row { margin-bottom: 9px; }
  .section-title-row h2 { font-size: 14px; }
  .unit-note { font-size: 6px; }
  .preset-button { min-height: 46px; padding: 6px; gap: 6px; }
  .preset-icon { width: 22px; height: 22px; font-size: 14px; }
  .preset-button b { font-size: 8px; }
  .preset-button small { font-size: 6px; }
  .slider-list { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
  .slider-control { padding: 7px 0 7px; }
  .slider-heading label { font-size: 8px; }
  .slider-heading output { font-size: 8px; }
  input[type="range"] { margin-top: 5px; height: 12px; }
  .range-ends { font-size: 6px; }
  .range-ends .unit-inline { display: none; }
  .playback-section { margin-top: 8px; padding: 8px 0 7px; }
  .primary-button, .icon-button { height: 30px; }
  .icon-button { width: 32px; flex-basis: 32px; }
  .quality-row { margin-top: 7px; }
  .audit-card { margin-top: 8px; padding: 8px; }
  .audit-head b { font-size: 8px; }
  .audit-head small { font-size: 6px; }
  .audit-card p { font-size: 6px; margin-top: 5px; }
  .audit-values { margin-top: 7px; }
  .audit-values b { font-size: 9px; }
  .science-panel { margin-top: 8px; }
  .footer-note { margin-top: 8px; }
}
@media (max-width: 370px) {
  .top-meta .classification, .top-meta .meta-divider { display: none; }
  .stage-heading h2 { font-size: 12px; }
  .stage-key { font-size: 7px; }
  .slider-list { column-gap: 9px; }
  .slider-heading label { font-size: 7px; }
  .readout-value { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
