:root {
  color-scheme: dark;
  --bg: #101918;
  --panel: #172321;
  --panel-2: #1c2a26;
  --line: rgba(196, 211, 194, .12);
  --line-strong: rgba(196, 211, 194, .22);
  --text: #e8eadf;
  --muted: #94a49a;
  --dim: #66766d;
  --lime: #c4d78a;
  --green: #829b58;
  --cyan: #77c5bd;
  --amber: #d2ad70;
  --danger: #d58c72;
  --radius: 12px;
  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%; height: 100%; min-width: 320px; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow: hidden; }
button, input, summary { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.app-shell { height: 100vh; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 64px; flex: 0 0 64px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #121d1b; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 30px; height: 30px; border: 1px solid rgba(196,215,138,.35); border-radius: 9px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 6px; transform: rotate(-8deg); }
.brand-mark span { display: block; width: 3px; border-radius: 4px; background: var(--lime); transform: skew(-18deg); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .65; }.brand-mark span:nth-child(2) { height: 15px; }.brand-mark span:nth-child(3) { height: 11px; opacity: .8; }
.brand-name { font-size: 11px; letter-spacing: .16em; font-weight: 800; color: #dce4d6; }.brand-name span { color: #7f9287; font-weight: 600; }
.brand-subtitle { margin-top: 3px; font-size: 9px; letter-spacing: .18em; color: #718278; }
.topbar-right { display: flex; align-items: center; gap: 22px; }
.field-chip, .seed-label { color: #9cab9e; font-size: 9px; letter-spacing: .13em; font-weight: 700; }
.field-chip i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; margin: 0 8px 2px; background: var(--lime); }
.seed-label b { color: #e4e8dc; margin-left: 6px; font-variant-numeric: tabular-nums; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 368px; gap: 12px; padding: 12px; }
.stage-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #17211f; }
.stage-heading { flex: 0 0 auto; min-height: 70px; padding: 14px 18px 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(34,49,42,.9), rgba(23,34,31,.95)); }
.eyebrow, .section-kicker { font-size: 9px; letter-spacing: .17em; color: #94a69a; font-weight: 800; }
.live-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin: 0 0 1px 6px; background: #a8c86f; box-shadow: 0 0 9px rgba(168,200,111,.6); }
h1 { margin: 6px 0 0; font-size: clamp(19px, 2vw, 25px); line-height: 1.1; letter-spacing: -.035em; font-weight: 700; }
h1 span { color: #9caa9e; font-size: .62em; font-weight: 450; letter-spacing: -.01em; }
.stage-actions { display: flex; gap: 7px; }
.icon-button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); color: #b7c5b9; display: grid; place-items: center; cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.icon-button:hover { background: rgba(196,215,138,.09); border-color: rgba(196,215,138,.42); transform: translateY(-1px); }
.icon-button .icon { font-size: 19px; line-height: 1; }.quality-glyph { font-size: 9px; letter-spacing: .08em; font-weight: 900; }
.scene-wrap { flex: 1; min-height: 250px; position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 52% 35%, #7b8c7c 0%, #43574c 36%, #1c302d 74%, #14211f 100%); }
.scene-canvas { position: absolute; inset: 0; z-index: 0; }
.scene-canvas canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-vignette { pointer-events: none; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(11,18,17,.25), transparent 20%, transparent 72%, rgba(9,16,15,.4)), linear-gradient(90deg, rgba(9,16,15,.12), transparent 24%, transparent 80%, rgba(9,16,15,.1)); }
.scene-tag { z-index: 3; position: absolute; display: flex; align-items: center; gap: 8px; color: rgba(232,238,223,.76); font-size: 8px; font-weight: 800; letter-spacing: .13em; text-shadow: 0 1px 8px rgba(0,0,0,.7); pointer-events: none; }
.tag-top-left { top: 16px; left: 17px; }.tag-top-right { top: 16px; right: 18px; }.tag-bottom-left { bottom: 17px; left: 17px; gap: 7px; }.tag-bottom-right { bottom: 18px; right: 18px; }
.tag-index { color: var(--lime); border: 1px solid rgba(196,215,138,.5); border-radius: 4px; padding: 4px 5px; }.axis-arrow { color: var(--cyan); font-size: 15px; }
.legend-swatch { width: 7px; height: 7px; display: inline-block; border-radius: 2px; margin-left: 7px; }.legend-swatch.green { background: #78924e; }.legend-swatch.sand { background: #c39b66; }.legend-swatch.cyan { background: #73c7c1; }
.annotation { position: absolute; z-index: 3; padding: 5px 7px; border: 1px solid rgba(218,229,205,.24); border-radius: 4px; background: rgba(16,28,25,.42); color: rgba(231,238,222,.82); font-size: 8px; font-weight: 800; letter-spacing: .11em; pointer-events: none; backdrop-filter: blur(5px); }
.annotation-uphill { top: 26%; left: 8%; }.annotation-bands { top: 51%; left: 45%; color: #e2e9d0; }.annotation-runoff { bottom: 28%; right: 10%; color: #a6e0d7; }
.scene-readouts { position: absolute; z-index: 4; top: 54px; right: 16px; width: 142px; display: grid; gap: 6px; pointer-events: none; }
.readout { padding: 7px 9px 6px; border: 1px solid rgba(222,233,212,.17); border-radius: 7px; background: rgba(13,24,22,.56); backdrop-filter: blur(8px); box-shadow: 0 5px 18px rgba(0,0,0,.12); }
.readout span { display: flex; justify-content: space-between; gap: 4px; font-size: 7px; letter-spacing: .1em; color: #bdcbbd; font-weight: 800; }.readout em { font-style: normal; color: #8ea08e; font-size: 6px; }
.readout strong { display: block; margin-top: 3px; font-size: 16px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #f1f0df; }.readout small { display: block; margin-top: 1px; color: #9eac9f; font-size: 7px; }
.loading-overlay, .engine-error { position: absolute; z-index: 7; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(12,22,20,.82); color: #b7c7b6; font-size: 9px; letter-spacing: .16em; font-weight: 800; text-align: center; padding: 24px; }
.loading-overlay[hidden], .engine-error[hidden] { display: none; }
.loader-ring { width: 30px; height: 30px; border: 2px solid rgba(196,215,138,.18); border-top-color: var(--lime); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.engine-error { gap: 8px; letter-spacing: 0; font-size: 12px; }.engine-error strong { font-size: 17px; color: #e6e8d8; }.engine-error span { max-width: 360px; color: #aab7aa; line-height: 1.5; font-weight: 450; }
.stage-footer { flex: 0 0 auto; min-height: 45px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 16px; border-top: 1px solid var(--line); background: #182320; }
.cause-chain { display: flex; align-items: center; gap: 9px; min-width: 0; overflow: hidden; white-space: nowrap; }.chain-step { color: #8e9f91; font-size: 8px; letter-spacing: .09em; font-weight: 750; }.chain-step b { color: #c0d08e; margin-right: 4px; font-size: 8px; }.chain-step.result { color: #d8e2c3; }.chain-arrow { color: #62776b; font-size: 10px; }
.model-clock { display: flex; align-items: center; gap: 7px; white-space: nowrap; color: #8d9f91; font-size: 8px; letter-spacing: .1em; }.model-clock b { margin-left: 4px; color: #d6dfce; font-size: 9px; font-variant-numeric: tabular-nums; }.clock-dot { width: 5px; height: 5px; border-radius: 50%; background: #9ebd69; box-shadow: 0 0 7px rgba(158,189,105,.55); }
.control-panel { min-height: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg,#1a2824,#17221f); scrollbar-width: thin; scrollbar-color: #405349 transparent; }
.panel-section { padding: 15px 16px; border-bottom: 1px solid var(--line); }.intro-section { padding-top: 17px; padding-bottom: 14px; }.intro-section p { margin: 8px 0 10px; color: #aab8ab; font-size: 11px; line-height: 1.5; }
.model-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid rgba(196,215,138,.18); border-radius: 5px; color: #b4c18e; background: rgba(196,215,138,.045); font-size: 7px; letter-spacing: .09em; font-weight: 800; }.pill-dot { width: 5px; height: 5px; border-radius: 50%; background: #a7c96e; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }.section-heading h2 { margin: 0; color: #e0e6d8; font-size: 12px; letter-spacing: -.01em; font-weight: 700; }.section-index { color: #75877c; font-size: 7px; letter-spacing: .12em; font-weight: 800; }
.control-row { margin-top: 11px; }.control-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }.control-label label { color: #c1ccbf; font-size: 10px; font-weight: 600; }.control-label output { color: #e0e7ce; font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; }.symbol { color: #a5bb77; margin-left: 3px; font-size: 11px; font-weight: 500; }
input[type="range"] { width: 100%; height: 14px; margin: 0; appearance: none; background: transparent; cursor: pointer; accent-color: var(--lime); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 8px; background: linear-gradient(90deg,#758d55,#b8ca83); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 8px; background: linear-gradient(90deg,#758d55,#b8ca83); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border: 2px solid #d8e4b5; border-radius: 50%; background: #647e48; box-shadow: 0 0 0 3px rgba(176,201,122,.12); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #d8e4b5; border-radius: 50%; background: #647e48; box-shadow: 0 0 0 3px rgba(176,201,122,.12); }
.range-ends { display: flex; justify-content: space-between; color: #65776b; font-size: 6px; letter-spacing: .12em; font-weight: 750; margin-top: -1px; }
.preset-section { padding-top: 13px; padding-bottom: 13px; }.preset-section .section-heading { margin-bottom: 9px; }.preset-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.preset-button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px; text-align: left; padding: 6px 9px; border: 1px solid rgba(196,211,194,.12); border-radius: 8px; background: rgba(255,255,255,.018); cursor: pointer; transition: background .18s,border-color .18s; }.preset-button:hover { background: rgba(196,215,138,.055); border-color: rgba(196,215,138,.28); }.preset-button.active { background: rgba(196,215,138,.075); border-color: rgba(196,215,138,.38); }
.preset-button b { display: block; color: #d8e1d2; font-size: 9px; font-weight: 700; }.preset-button small { display: block; margin-top: 2px; color: #83958a; font-size: 8px; }.preset-mark { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12); background-color: #8b7957; }.preset-mark.sparse { background: repeating-linear-gradient(135deg,#a88b60 0 5px,#7a8250 5px 7px,#a88b60 7px 13px); }.preset-mark.classic { background: repeating-linear-gradient(90deg,#8c7953 0 4px,#6f8b49 4px 8px,#8c7953 8px 13px); }.preset-mark.wet { background: repeating-linear-gradient(90deg,#7e8c61 0 5px,#567546 5px 10px,#a6a070 10px 14px); }
.playback-section { padding-top: 13px; padding-bottom: 14px; }.playback-section .section-heading { margin-bottom: 10px; }.playback-buttons { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 6px; }.primary-button,.utility-button { min-height: 34px; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-size: 8px; letter-spacing: .09em; font-weight: 850; transition: transform .16s,background .16s,border-color .16s; }.primary-button { background: #9fb773; color: #1b2a1d; border: 1px solid #b8ca8d; }.primary-button:hover { background: #b1c786; transform: translateY(-1px); }.primary-button span:first-child { font-size: 11px; }.utility-button { background: rgba(255,255,255,.035); border: 1px solid var(--line-strong); color: #b4c2b5; }.utility-button:hover { border-color: rgba(196,215,138,.4); background: rgba(196,215,138,.06); }.utility-button b { color: #d5e0c8; font-size: 10px; }.speed-row { margin-top: 12px; }
.validation-section { padding-top: 13px; padding-bottom: 13px; }.validation-section .section-heading { margin-bottom: 7px; }.textbook-chip { padding: 4px 6px; border: 1px solid rgba(119,197,189,.28); border-radius: 4px; color: #88c6bc; font-size: 7px; font-weight: 850; letter-spacing: .12em; }.validation-caption { margin: 0 0 9px; color: #8e9e92; font-size: 8px; line-height: 1.4; }.validation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.validation-grid div { padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.02); }.validation-grid span { display: block; color: #75877b; font-size: 6px; letter-spacing: .1em; font-weight: 850; }.validation-grid b { display: block; margin-top: 4px; color: #dce5d5; font-size: 11px; font-variant-numeric: tabular-nums; }.validation-grid .validation-delta { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }.validation-grid .validation-delta b { margin: 0; color: #9fc9b5; }.validation-foot { margin-top: 7px; color: #75877b; font-size: 7px; }
.science-section { padding: 0; }.science-section details { padding: 0 16px; }.science-section summary { list-style: none; min-height: 52px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }.science-section summary::-webkit-details-marker { display: none; }.science-section summary span:first-child { display: flex; flex-direction: column; gap: 3px; }.science-section summary b { font-size: 12px; color: #dce5d8; }.details-plus { color: #9bb477; font-size: 17px; transition: transform .18s; }.science-section details[open] .details-plus { transform: rotate(45deg); }.science-content { padding: 0 0 15px; color: #9cac9f; font-size: 9px; line-height: 1.55; }.science-content h3 { margin: 12px 0 5px; color: #d2ddce; font-size: 9px; letter-spacing: .02em; }.science-content p { margin: 5px 0 8px; }.science-content ul { margin: 5px 0 10px; padding-left: 16px; }.science-content li { margin: 3px 0; }.equation { margin: 7px 0; padding: 8px 9px; border-left: 2px solid #93aa69; border-radius: 0 5px 5px 0; background: rgba(196,215,138,.045); color: #d9e2cb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; overflow-wrap: anywhere; }.science-note { margin-top: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; color: #9fb09f; font-size: 8px; }
.panel-bottom { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px; color: #687b70; font-size: 6px; letter-spacing: .12em; font-weight: 800; }.panel-bottom b { color: #9fb28b; margin-left: 4px; }.panel-bottom i { display: inline-block; width: 4px; height: 4px; margin-left: 5px; border-radius: 50%; background: #93b77b; }
.embed-mode .topbar { display: none; }.embed-mode .workspace { padding: 0; gap: 0; grid-template-columns: minmax(0,1fr) 350px; }.embed-mode .stage-panel,.embed-mode .control-panel { border-radius: 0; }.embed-mode .workspace { height: 100vh; }.embed-mode .stage-heading { min-height: 58px; }
@media (max-width: 1050px) and (min-width: 761px) { .workspace { grid-template-columns: minmax(0,1fr) 330px; }.topbar { padding: 0 16px; }.scene-readouts { width: 128px; }.readout strong { font-size: 14px; }.cause-chain { gap: 5px; }.chain-step { font-size: 7px; } }
@media (max-width: 760px) {
  body { overflow: auto; min-height: 100dvh; height: auto; }.app-shell { height: auto; min-height: 100dvh; }.topbar { height: 54px; flex-basis: 54px; padding: 0 12px; }.brand-mark { width: 26px; height: 26px; }.brand-name { font-size: 9px; }.brand-subtitle { font-size: 7px; }.topbar-right { gap: 0; }.field-chip { display: none; }.seed-label { font-size: 8px; }
  .workspace { display: flex; flex-direction: column; gap: 8px; padding: 8px; min-height: 0; }.stage-panel { flex: 0 0 auto; height: 48dvh; min-height: 330px; max-height: 470px; }.stage-heading { min-height: 58px; padding: 10px 11px; }.eyebrow { font-size: 7px; }h1 { font-size: 19px; }h1 span { display: block; margin-top: 3px; font-size: 10px; }.stage-actions { gap: 5px; }.icon-button { width: 30px; height: 30px; }.scene-wrap { min-height: 0; }.scene-readouts { top: 48px; right: 8px; width: 108px; gap: 4px; }.readout { padding: 5px 6px; }.readout span { font-size: 6px; }.readout em { font-size: 5px; }.readout strong { font-size: 13px; }.readout small { font-size: 6px; }.scene-tag { font-size: 6px; }.tag-top-left { top: 10px; left: 9px; }.tag-top-right { top: 10px; right: 9px; }.tag-bottom-left { bottom: 9px; left: 8px; flex-wrap: wrap; max-width: 65%; gap: 4px; }.tag-bottom-right { bottom: 10px; right: 8px; }.annotation { display: none; }.stage-footer { min-height: 37px; padding: 0 9px; }.cause-chain { gap: 4px; }.chain-step { font-size: 6px; }.chain-step b { font-size: 6px; margin-right: 2px; }.chain-arrow { font-size: 7px; }.model-clock { font-size: 6px; gap: 4px; }.model-clock b { font-size: 7px; }
  .control-panel { flex: 0 0 auto; overflow: visible; }.panel-section { padding-left: 13px; padding-right: 13px; }.intro-section p { font-size: 10px; }.preset-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.preset-button { min-height: 72px; flex-direction: column; align-items: flex-start; gap: 5px; padding: 7px; }.preset-mark { width: 100%; height: 17px; flex: 0 0 17px; }.preset-button b { font-size: 8px; }.preset-button small { font-size: 7px; line-height: 1.3; }.panel-bottom { min-height: 32px; }.embed-mode .workspace { display: flex; height: auto; min-height: 100dvh; padding: 0; }.embed-mode .stage-panel { height: 48dvh; }.embed-mode .control-panel { border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
