:root {
  color-scheme: dark;
  --bg: #07110f;
  --panel: #0d1916;
  --panel-2: #101f1b;
  --panel-3: #13231f;
  --line: rgba(184, 218, 199, .12);
  --line-strong: rgba(184, 218, 199, .2);
  --text: #e8f1eb;
  --muted: #92a79a;
  --dim: #60766a;
  --green: #a9f36c;
  --green-2: #63d99a;
  --amber: #ffbd69;
  --blue: #83c9ff;
  --violet: #bba4ff;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0,0,0,.22);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(ellipse at 16% 0%, rgba(51,105,72,.15), transparent 34%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
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, a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.app-shell { min-height: 100vh; width: 100%; overflow-x: hidden; }
body.embed-mode .app-shell { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.topbar {
  height: 64px; max-width: 1480px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(184,218,199,.07);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-mark { width: 30px; height: 30px; display: block; position: relative; border: 1px solid rgba(169,243,108,.55); border-radius: 50%; box-shadow: 0 0 22px rgba(169,243,108,.13); }
.brand-mark:before, .brand-mark:after { content:""; position:absolute; border:1px solid rgba(169,243,108,.45); border-radius:50%; inset:5px; }
.brand-mark:after { inset:10px; background:var(--green); border:0; box-shadow:0 0 10px rgba(169,243,108,.7); }
.brand-mark i { position:absolute; width:5px; height:5px; background:var(--green-2); border-radius:50%; top:1px; right:4px; }
.brand-mark b { position:absolute; width:4px; height:4px; background:var(--amber); border-radius:50%; bottom:4px; left:2px; }
.brand-copy { display:flex; flex-direction:column; line-height:1.12; gap:4px; }
.brand-copy strong { font-size:10px; letter-spacing:.16em; font-weight:800; }
.brand-copy small { color:var(--muted); font-size:8px; letter-spacing:.22em; }
.topbar-right { display:flex; align-items:center; gap:16px; }
.top-chip { display:flex; align-items:center; gap:8px; color:#a6baad; font-size:9px; letter-spacing:.15em; font-weight:700; }
.chip-dot { width:6px; height:6px; background:var(--green); border-radius:50%; box-shadow:0 0 12px rgba(169,243,108,.7); }
.button { min-height:34px; border:1px solid var(--line-strong); border-radius:9px; padding:0 13px; display:inline-flex; align-items:center; justify-content:center; gap:8px; cursor:pointer; font-size:11px; font-weight:750; letter-spacing:.02em; transition:background .2s ease, border-color .2s ease, transform .2s ease; }
.button:hover { transform:translateY(-1px); }
.button:active { transform:translateY(0); }
.button svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.button-quiet { background:rgba(255,255,255,.025); color:#c7d6cb; }
.button-quiet:hover { background:rgba(255,255,255,.07); border-color:rgba(169,243,108,.35); }
main { max-width: 1480px; margin:0 auto; padding: 0 28px 22px; }
.hero { display:flex; justify-content:space-between; align-items:flex-end; gap:30px; padding:12px 0 10px; }
.eyebrow { color:#8ba293; font-size:9px; letter-spacing:.16em; font-weight:800; text-transform:uppercase; }
.eyebrow-line { display:inline-block; vertical-align:middle; width:18px; height:1px; background:var(--green); margin:0 8px 3px 0; }
.eyebrow-sep { color:#536a5d; padding:0 5px; }
h1 { margin:6px 0 3px; font-size:clamp(30px,3vw,40px); letter-spacing:-.055em; line-height:1.05; font-weight:760; }
h1 em { color:var(--green); font-style:normal; }
.hero-subtitle { margin:0; color:#a2b5a8; font-size:13px; max-width:650px; }
.hero-aside { max-width:265px; padding:0 0 2px 16px; border-left:1px solid rgba(169,243,108,.27); }
.aside-label { font-size:8px; color:var(--green); font-weight:800; letter-spacing:.16em; }
.hero-aside p { margin:5px 0 0; color:#91a69a; font-size:11px; line-height:1.45; }
.workspace { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(360px,.88fr); align-items:start; gap:16px; }
.visual-column, .control-column { min-width:0; }
.panel { background:linear-gradient(145deg,rgba(17,32,27,.98),rgba(11,23,20,.98)); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.visual-panel { padding:17px 17px 12px; }
.panel-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.panel-heading h2 { margin:4px 0 0; font-size:16px; letter-spacing:-.025em; font-weight:700; }
.generation-chip { min-width:84px; text-align:right; display:flex; flex-direction:column; align-items:flex-end; line-height:1.05; }
.generation-chip span { font-size:8px; color:var(--muted); letter-spacing:.14em; font-weight:800; }
.generation-chip strong { color:var(--green); font-size:24px; line-height:1.1; font-variant-numeric:tabular-nums; }
.generation-chip small { color:#6e8778; font-size:7px; letter-spacing:.1em; }
.canvas-wrap { height:clamp(210px,30vh,280px); min-height:210px; margin-top:14px; position:relative; overflow:hidden; border:1px solid rgba(169,243,108,.14); border-radius:12px; background:#081411; isolation:isolate; }
#fieldCanvas { display:block; width:100%; height:100%; }
.canvas-topline, .canvas-bottomline { position:absolute; left:13px; right:13px; display:flex; justify-content:space-between; align-items:center; pointer-events:none; z-index:1; }
.canvas-topline { top:12px; }
.canvas-bottomline { bottom:11px; color:#7d9788; font-size:8px; font-weight:750; letter-spacing:.11em; }
.canvas-label { color:#d5e4d8; font-size:8px; font-weight:800; letter-spacing:.14em; display:flex; align-items:center; gap:7px; }
.canvas-label i { width:6px; height:6px; background:var(--green); border-radius:50%; box-shadow:0 0 9px var(--green); }
.canvas-note { color:#6e8979; font-size:7px; letter-spacing:.12em; font-weight:700; }
#runState { color:var(--green); }
.legend { display:flex; flex-wrap:wrap; gap:10px 18px; padding:12px 2px 0; }
.legend-item { display:grid; grid-template-columns:13px auto; grid-template-rows:auto auto; column-gap:6px; align-items:center; min-width:calc(50% - 12px); }
.legend-symbol { width:9px; height:9px; border-radius:50%; grid-row:span 2; justify-self:center; }
.legend-cooperator { border:2px solid #a9f36c; background:#5fd68e; box-shadow:0 0 8px rgba(169,243,108,.6); }
.legend-cheater { border:2px solid #ffbd69; background:#9c6234; box-shadow:0 0 8px rgba(255,189,105,.4); }
.legend-helper { border:2px solid #bba4ff; background:#6c61a5; }
.legend-neutral { background:#52675e; }
.legend-item b { font-size:9px; color:#c8d7cc; font-weight:700; line-height:1.2; }
.legend-item small { font-size:8px; color:#70877a; line-height:1.2; }
.readout-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:10px; }
.readout-card { position:relative; overflow:hidden; padding:10px 10px 8px; border-radius:12px; background:rgba(15,29,24,.92); border:1px solid var(--line); min-height:94px; }
.readout-label { display:flex; justify-content:space-between; align-items:center; gap:5px; color:#9fb2a5; font-size:7px; letter-spacing:.1em; font-weight:800; }
.readout-label span { color:#637c6d; font-family:ui-monospace,monospace; font-size:10px; letter-spacing:0; }
.readout-value { margin-top:6px; color:var(--text); font-size:22px; line-height:1; font-weight:760; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.readout-value span { font-size:13px; margin-left:2px; color:#b4c7b9; }
.readout-foot { margin-top:5px; color:#698174; font-size:6px; font-weight:800; letter-spacing:.1em; }
.micro-track { height:2px; background:rgba(255,255,255,.06); margin-top:9px; overflow:hidden; border-radius:4px; }
.micro-track i { display:block; height:100%; width:0; background:var(--green); border-radius:4px; transition:width .3s ease; }
.readout-amber .micro-track i { background:var(--amber); }
.readout-blue .micro-track i { background:var(--blue); }
.readout-neutral .micro-track i { background:#b8c6bd; }
.caption-panel { display:flex; gap:11px; align-items:flex-start; margin-top:10px; padding:9px 12px; border-radius:12px; background:linear-gradient(90deg,rgba(169,243,108,.075),rgba(169,243,108,.018)); border:1px solid rgba(169,243,108,.14); }
.caption-icon { width:25px; height:25px; flex:0 0 25px; display:grid; place-items:center; border-radius:8px; color:var(--green); background:rgba(169,243,108,.1); font-size:15px; }
.caption-panel .eyebrow { font-size:8px; color:#a6c08f; }
.caption-panel p { margin:3px 0 0; color:#b3c5b8; font-size:10px; line-height:1.45; }
.controls-panel { padding:12px 12px 8px; }
.parameter-count { border:1px solid rgba(169,243,108,.18); border-radius:20px; padding:5px 8px; color:#a5c18e; font-size:7px; font-weight:800; letter-spacing:.1em; white-space:nowrap; }
.control-list { margin-top:9px; display:flex; flex-direction:column; gap:5px; }
.control-group { min-width:0; }
.control-label-row { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.control-label-row label { color:#d5e1d8; font-size:10px; font-weight:700; }
.parameter-symbol { color:#7f9a89; font-family:Georgia,serif; font-size:12px; font-style:italic; padding-left:3px; }
.control-label-row output { color:var(--green); font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:11px; font-weight:750; white-space:nowrap; font-variant-numeric:tabular-nums; }
.control-label-row output small { color:#678071; font-family:inherit; font-size:6px; letter-spacing:.1em; margin-left:3px; }
.range { display:block; width:100%; height:12px; margin:1px 0 0; appearance:none; -webkit-appearance:none; background:transparent; cursor:pointer; touch-action:pan-y; }
.range::-webkit-slider-runnable-track { height:4px; border-radius:10px; background:linear-gradient(90deg,rgba(169,243,108,.55),rgba(169,243,108,.12)); border:1px solid rgba(255,255,255,.035); }
.range::-moz-range-track { height:4px; border-radius:10px; background:rgba(169,243,108,.2); border:1px solid rgba(255,255,255,.035); }
.range::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:12px; height:12px; margin-top:-5px; border-radius:50%; background:var(--green); border:2px solid #17311f; box-shadow:0 0 0 3px rgba(169,243,108,.12),0 0 10px rgba(169,243,108,.35); }
.range::-moz-range-thumb { width:9px; height:9px; border-radius:50%; background:var(--green); border:2px solid #17311f; box-shadow:0 0 0 3px rgba(169,243,108,.12); }
.range-amber::-webkit-slider-runnable-track { background:linear-gradient(90deg,rgba(255,189,105,.55),rgba(255,189,105,.12)); }
.range-amber::-moz-range-track { background:rgba(255,189,105,.2); }
.range-amber::-webkit-slider-thumb, .range-amber::-moz-range-thumb { background:var(--amber); box-shadow:0 0 0 3px rgba(255,189,105,.12); }
.range-blue::-webkit-slider-runnable-track { background:linear-gradient(90deg,rgba(131,201,255,.55),rgba(131,201,255,.12)); }
.range-blue::-moz-range-track { background:rgba(131,201,255,.2); }
.range-blue::-webkit-slider-thumb, .range-blue::-moz-range-thumb { background:var(--blue); box-shadow:0 0 0 3px rgba(131,201,255,.12); }
.range-violet::-webkit-slider-runnable-track { background:linear-gradient(90deg,rgba(187,164,255,.55),rgba(187,164,255,.12)); }
.range-violet::-moz-range-track { background:rgba(187,164,255,.2); }
.range-violet::-webkit-slider-thumb, .range-violet::-moz-range-thumb { background:var(--violet); box-shadow:0 0 0 3px rgba(187,164,255,.12); }
.range-hint { display:flex; justify-content:space-between; gap:5px; color:#657d6e; font-size:5px; font-weight:800; letter-spacing:.09em; }
.range-hint span:nth-child(2) { text-align:center; color:#536b5d; }
.queued-note { margin-top:4px; color:var(--amber); font-size:8px; }
.threshold-card { margin-top:8px; padding:7px 9px 6px; background:rgba(5,16,13,.48); border:1px solid rgba(131,201,255,.16); border-radius:11px; }
.threshold-top { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.threshold-top .eyebrow { color:#82b5d9; font-size:7px; }
.threshold-top strong { display:block; margin-top:3px; color:#c7e3d0; font-size:11px; }
.threshold-value { color:var(--blue); font:700 13px ui-monospace,monospace; text-align:right; white-space:nowrap; }
.threshold-value small { display:block; color:#64829a; font-size:6px; letter-spacing:.1em; }
.threshold-track { height:5px; position:relative; margin:6px 2px 4px; border-radius:8px; background:linear-gradient(90deg,rgba(169,243,108,.48),rgba(255,189,105,.5)); }
.threshold-track i { position:absolute; top:0; left:0; height:100%; width:0; background:rgba(131,201,255,.9); border-radius:8px; opacity:.65; }
.threshold-track b { position:absolute; top:50%; left:5%; width:2px; height:13px; transform:translate(-50%,-50%); background:#f2f7f2; box-shadow:0 0 0 2px rgba(255,255,255,.1); border-radius:3px; }
.threshold-card p { margin:0; color:#91a99a; font-size:6.5px; line-height:1.28; }
.threshold-card.threshold-above { border-color:rgba(255,189,105,.28); }
.threshold-card.threshold-above .threshold-top strong { color:var(--amber); }
.threshold-foot { margin-top:3px; color:#627d6c; font-size:6px; font-weight:800; letter-spacing:.1em; }
.preset-block { margin-top:8px; }
.preset-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:7px; }
.preset-heading > span:last-child { color:#60796a; font-size:7px; font-weight:800; letter-spacing:.13em; }
.preset-buttons { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.preset-button { min-width:0; min-height:38px; padding:7px 8px; border:1px solid var(--line); border-radius:9px; background:rgba(255,255,255,.018); display:flex; align-items:center; gap:8px; text-align:left; cursor:pointer; transition:border-color .2s ease,background .2s ease; }
.preset-button:hover { border-color:rgba(169,243,108,.3); }
.preset-button.active { border-color:rgba(169,243,108,.38); background:rgba(169,243,108,.055); }
.preset-glyph { width:24px; height:24px; flex:0 0 24px; display:grid; place-items:center; border-radius:7px; background:rgba(169,243,108,.1); color:var(--green); font-size:16px; }
.glyph-surge { background:rgba(255,189,105,.1); color:var(--amber); }
.preset-button b { display:block; color:#d3e0d7; font-size:8px; line-height:1.25; }
.preset-button small { display:block; color:#72897b; font-size:7px; margin-top:2px; }
.transport-row { display:grid; grid-template-columns:1.1fr .9fr .9fr; gap:7px; margin-top:8px; }
.button-primary { background:var(--green); color:#102016; border-color:var(--green); font-weight:850; }
.button-primary:hover { background:#bcff83; }
.button-secondary { background:rgba(255,255,255,.025); color:#c5d5ca; }
.button-secondary:hover { border-color:rgba(169,243,108,.32); background:rgba(255,255,255,.055); }
.play-icon { font-size:12px; width:10px; }
.quality-row { display:flex; align-items:center; gap:9px; margin-top:7px; padding-top:6px; border-top:1px solid rgba(184,218,199,.07); }
.quality-row > span:first-child { color:#71887a; font-size:7px; letter-spacing:.13em; font-weight:800; }
.quality-toggle { border:1px solid rgba(169,243,108,.25); background:rgba(169,243,108,.07); color:var(--green); padding:4px 7px; border-radius:6px; font-size:7px; letter-spacing:.12em; font-weight:850; cursor:pointer; display:flex; align-items:center; gap:6px; }
.quality-toggle i { width:5px; height:5px; background:var(--green); border-radius:50%; }
.quality-toggle[aria-pressed="false"] { color:var(--amber); border-color:rgba(255,189,105,.25); background:rgba(255,189,105,.06); }
.quality-toggle[aria-pressed="false"] i { background:var(--amber); }
.quality-note { margin-left:auto; color:#596f62; font-size:6px; letter-spacing:.08em; }
.science-panel { margin-top:15px; border:1px solid var(--line); border-radius:var(--radius); background:rgba(12,24,20,.88); overflow:hidden; }
.science-panel summary { list-style:none; display:flex; align-items:center; gap:11px; min-height:59px; padding:11px 16px; cursor:pointer; }
.science-panel summary::-webkit-details-marker { display:none; }
.science-summary-icon { width:29px; height:29px; display:grid; place-items:center; border-radius:8px; color:var(--green); background:rgba(169,243,108,.09); font:18px Georgia,serif; }
.science-panel summary b { display:block; color:#dce8df; font-size:11px; }
.science-panel summary small { display:block; color:#71877a; font-size:8px; margin-top:2px; }
.summary-action { margin-left:auto; color:#819789; font-size:7px; letter-spacing:.13em; font-weight:800; display:flex; align-items:center; gap:8px; }
.summary-action i { font-style:normal; color:var(--green); font-size:14px; }
.science-panel[open] .summary-action i { transform:rotate(45deg); }
.science-content { border-top:1px solid var(--line); padding:16px; }
.science-intro { max-width:850px; }
.science-intro p { color:#a8b9ad; font-size:10px; margin:5px 0 14px; }
.equation-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.equation-card { padding:11px; border:1px solid var(--line); background:rgba(255,255,255,.018); border-radius:9px; }
.equation-card > span, .audit-results span { display:block; color:#7c9384; font-size:7px; letter-spacing:.12em; font-weight:800; }
.equation-card code, .audit-equation code { display:block; color:#c9efad; font:12px ui-monospace,SFMono-Regular,Consolas,monospace; margin:8px 0 6px; white-space:normal; }
.equation-card p { margin:0; color:#879c8d; font-size:8px; line-height:1.45; }
.audit-card { display:grid; grid-template-columns:1.2fr .8fr 1.3fr; gap:16px; align-items:center; margin-top:10px; padding:12px; border:1px solid rgba(131,201,255,.16); border-radius:10px; background:rgba(131,201,255,.035); }
.audit-card h3 { margin:4px 0 3px; color:#d5e5dc; font-size:12px; }
.audit-card p { margin:0; color:#81998a; font-size:8px; }
.audit-equation { border-left:1px solid var(--line); border-right:1px solid var(--line); padding:0 13px; }
.audit-equation code { color:var(--blue); font-size:14px; }
.audit-equation small, .audit-results small { color:#637f8e; font-size:6px; letter-spacing:.1em; }
.audit-results { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.audit-results b { display:block; color:#d5e5dc; font:700 12px ui-monospace,monospace; margin:4px 0 1px; }
.simplifications { margin-top:13px; padding-top:11px; border-top:1px solid var(--line); }
.simplifications p { max-width:1100px; margin:5px 0 0; color:#82998b; font-size:8px; line-height:1.55; }
.disclaimer { margin:12px 0 0; color:#718879; font-size:8px; }
.footer { display:flex; justify-content:space-between; gap:10px; padding:14px 2px 3px; color:#587063; font-size:7px; font-weight:800; letter-spacing:.13em; }
.footer i { color:var(--green); font-style:normal; padding:0 3px; }
@media (min-width: 1500px) { main { padding-left:34px; padding-right:34px; } .topbar { padding-left:34px; padding-right:34px; } }
@media (max-width: 1050px) {
  .workspace { grid-template-columns:minmax(0,1.25fr) minmax(330px,.9fr); }
  .readout-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  main { padding-left:18px; padding-right:18px; }
  .topbar { padding-left:18px; padding-right:18px; }
  .hero-aside { max-width:220px; }
  .controls-panel, .visual-panel { padding-left:13px; padding-right:13px; }
  .equation-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 780px) {
  .topbar { height:56px; padding:0 14px; }
  main { padding:0 14px 18px; }
  .top-chip { display:none; }
  .hero { display:block; padding:17px 0 14px; }
  h1 { font-size:34px; }
  .hero-subtitle { font-size:11px; max-width:560px; }
  .hero-aside { display:none; }
  .workspace { display:flex; flex-direction:column; gap:12px; }
  .visual-column, .control-column { width:100%; }
  .canvas-wrap { height:clamp(230px,34vh,310px); min-height:230px; }
  .visual-panel { padding:13px 12px 11px; }
  .panel-heading h2 { font-size:14px; }
  .legend { gap:9px 8px; }
  .legend-item { min-width:calc(50% - 5px); }
  .readout-card { min-height:96px; padding:10px 11px 8px; }
  .readout-value { font-size:23px; }
  .controls-panel { padding:14px 13px 12px; }
  .control-list { gap:14px; }
  .control-label-row label { font-size:11px; }
  .range { height:20px; }
  .range::-webkit-slider-thumb { width:15px; height:15px; margin-top:-6px; }
  .range::-moz-range-thumb { width:12px; height:12px; }
  .science-panel { margin-top:12px; }
  .science-content { padding:12px; }
  .audit-card { grid-template-columns:1fr; gap:10px; }
  .audit-equation { border:0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:9px 0; }
  .footer { font-size:6px; }
}
@media (max-width: 390px) {
  .screenshot-button { min-height:34px; padding:0 9px; font-size:10px; }
  .hero { padding-top:17px; }
  h1 { font-size:30px; }
  .eyebrow { font-size:8px; }
  .canvas-wrap { height:250px; }
  .canvas-note { font-size:6px; }
  .readout-label { font-size:7px; }
  .readout-value { font-size:21px; }
  .range-hint { font-size:5px; }
  .preset-button { gap:6px; padding:7px 6px; }
  .preset-button b { font-size:7px; }
  .quality-note { display:none; }
  .equation-grid { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; }
}
