/* Soil Scientist: soil conservation field office. Scenes drawn by art.js (colours from the --sl-* properties below). */
html {
  --sl-sky1: #d9ecf4; --sl-sky2: #f3ead8; --sl-bench1: #f4efe6; --sl-bench2: #e3d8c6; --sl-benchline: #b9a888;
  --sl-glass: #9fc3cf; --sl-water1: #7cc3dd; --sl-water2: #2f7f9f; --sl-lid: #6c6258;
  --sl-grass1: #79ad68; --sl-grass2: #4f8a48; --sl-leaf: #5e9e55; --sl-leaf2: #3b7239; --sl-trunk: #6b4a2b;
  --sl-o1: #7a5a34; --sl-o2: #5c4126; --sl-leafbits: #b07a3a; --sl-a1: #4a3524; --sl-a2: #3a2a1c; --sl-crumb: #2a1d12;
  --sl-b1: #b0643a; --sl-b2: #94512e; --sl-ped: #6f3a1f; --sl-c1: #c4ad86; --sl-c2: #a99270;
  --sl-rock1: #c6c0b4; --sl-rock2: #7d776d; --sl-rock-line: #514c45; --sl-root: #d9c39a; --sl-worm: #d08a7a;
  --sl-sand: #e6c46a; --sl-sand-l: #b08a33; --sl-silt: #c9a27a; --sl-silt-l: #8f6c48; --sl-clay: #b86a4e; --sl-clay-l: #7d3f2b;
  --sl-field1: #9c7448; --sl-field2: #6c4e30; --sl-cover: #4f9a45; --sl-residue: #d8c27a; --sl-corn: #4f8a48; --sl-corn-pale: #b4a54c; --sl-bean: #5fae5a;
  --sl-cloud: #8a98a6; --sl-rain: #4f8db0;
  --sl-region0: #fff7e6; --sl-region1: #f6ead2; --sl-region2: #efe0c4; --sl-region3: #faf0dc; --sl-region-line: #8a6a44;
  --sl-grid: rgba(90, 70, 40, .18); --sl-tri: #3d2b19; --sl-point: #1d5f7a; --sl-halo: rgba(29, 95, 122, .22);
  --sl-tag: #ffffff; --sl-tag-line: #3d2b19; --sl-ink: #1f1a14; --sl-muted: #6b5f52; --sl-warn: #a33a1a;
  --sl-ok: #13704a; --sl-bad: #b3261e; --sl-chosen: #1d5f7a; --sl-sign: #fffaf0; --sl-sign-line: #8a6a44;
  --sl-notes: #fffaf0; --sl-notes-line: #d9c8a8;
}
html[data-theme="dark"] {
  --sl-sky1: #1d2f3a; --sl-sky2: #2a2a24; --sl-bench1: #2a241d; --sl-bench2: #1f1a15; --sl-benchline: #6a5a44;
  --sl-glass: #4f7480; --sl-water1: #3e8fb0; --sl-water2: #1b5068; --sl-lid: #9a8f84;
  --sl-grass1: #4c7f44; --sl-grass2: #345c31; --sl-leaf: #4d8a46; --sl-leaf2: #2e5a2d; --sl-trunk: #9a7552;
  --sl-region0: #3a3024; --sl-region1: #33291e; --sl-region2: #2d2419; --sl-region3: #3f3428; --sl-region-line: #c9a77a;
  --sl-grid: rgba(240, 220, 190, .16); --sl-tri: #f0dcc0; --sl-point: #7fd0ec; --sl-halo: rgba(127, 208, 236, .25);
  --sl-tag: #1f1a15; --sl-tag-line: #f0dcc0; --sl-ink: #f3ebe0; --sl-muted: #b9ab98; --sl-warn: #ff9a7a;
  --sl-ok: #4fd08c; --sl-bad: #ff8a80; --sl-chosen: #7fd0ec; --sl-sign: #2a241d; --sl-sign-line: #c9a77a;
  --sl-cloud: #5d6a76; --sl-rain: #7ab8d8; --sl-c1: #8f7c5e; --sl-c2: #75654c; --sl-field1: #7a5a38; --sl-field2: #4f3923;
  --sl-notes: #2a241d; --sl-notes-line: #5a4a36;
}

/* ── layout (Codex core grid, kept) ── */
.core{height:100%;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(310px,1fr);gap:18px;padding:18px;overflow:auto;color:var(--tlg-ink,#172c3a);font-size:16px;box-sizing:border-box}
.core *{box-sizing:border-box}
.core-bench,.core-panel{min-width:0;padding:18px;background:var(--tlg-surface,#fff);border:1px solid var(--tlg-border,#afc0c9);border-radius:16px;overflow:auto}
.sl-bench{background:linear-gradient(180deg,var(--sl-bench1),var(--tlg-surface,#fff) 40%)}
.core-kicker{text-transform:uppercase;letter-spacing:.1em;font-weight:700;margin:0;color:var(--sl-muted)}
.core h2{font-size:26px;margin:6px 0 12px}
.core h3{font-size:20px;margin:0 0 14px}
.core-scene{overflow:auto;border-radius:12px;background:var(--sl-bench1);border:1px solid var(--sl-notes-line);box-shadow:inset 0 1px 6px rgba(0,0,0,.08)}
.core-scene svg{display:block;width:100%;min-width:460px;color:var(--sl-ink)}
.core-scene svg text{font-size:24px;fill:var(--sl-ink);font-family:inherit}
.core-observation{min-height:3em;line-height:1.5;font-weight:600;margin:12px 0}
.sl-notes{background:var(--sl-notes);border:1px solid var(--sl-notes-line);border-left:6px solid var(--sl-b1);border-radius:10px;padding:4px 16px;margin:0 0 12px}
.sl-notes-title{font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--sl-muted)}
.core-evidence p,.core-about p{line-height:1.5}
.sl-group{border:1px solid var(--tlg-border,#afc0c9);border-radius:12px;padding:8px 14px 2px;margin:0 0 14px}
.sl-group legend{font-weight:800;padding:0 6px}
.core-field{display:grid;gap:6px;margin:0 0 14px;font-weight:600}
.core-field input,.core-field select,.core button{font:inherit;font-size:16px;min-height:44px;border-radius:8px;border:1px solid var(--tlg-border,#afc0c9);padding:10px;background:var(--tlg-bg,#f6f2ea);color:inherit;max-width:100%;width:100%}
.core-field input:disabled,.core-field select:disabled{background:transparent;border-style:dashed}
.sl-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.core button{font-weight:700;margin:4px 0;cursor:pointer}
.core-run{background:#7a4a24!important;border-color:#7a4a24!important;color:#fff!important}
html[data-theme="dark"] .core-run{background:#c98a52!important;border-color:#c98a52!important;color:#1f1a14!important}
.core button:disabled{opacity:.55;cursor:default}
.core :focus-visible{outline:3px solid #dd9823;outline-offset:3px}
.core-about summary{cursor:pointer;min-height:44px;font-weight:700;display:flex;align-items:center}
.core-status{line-height:1.4}
body .ps-kicker,body .ps-hint-note,body .ps-badge{font-size:16px}

/* ── scene parts ── */
.sl-region{stroke:var(--sl-region-line);stroke-width:2}
.sl-r0{fill:var(--sl-region0)}.sl-r1{fill:var(--sl-region1)}.sl-r2{fill:var(--sl-region2)}.sl-r3{fill:var(--sl-region3)}
.sl-grid{stroke:var(--sl-grid);stroke-width:1;fill:none}
.sl-tri{fill:none;stroke:var(--sl-tri);stroke-width:3;stroke-linejoin:round}
.sl-tri-hit{fill:transparent;stroke:none}
.sl-truth{fill:var(--sl-halo);stroke:var(--sl-point);stroke-width:4;stroke-linejoin:round;pointer-events:none;animation:sl-pulse 1s ease-in-out 2}
@keyframes sl-pulse{50%{stroke-width:7}}
.is-draggable .sl-tri-hit{cursor:crosshair;touch-action:none}
.sl-tick{font-size:22px!important;fill:var(--sl-muted)!important}
.core-scene svg .sl-cname{font-size:21px;font-weight:700;fill:var(--sl-region-line);pointer-events:none}
.sl-axis{font-weight:700}
.core-scene svg .sl-small{font-size:22px}
.core-scene svg .sl-muted{fill:var(--sl-muted)}
.core-scene svg .sl-warn{fill:var(--sl-warn);font-weight:700}
.core-scene svg .sl-label{font-weight:700}
.sl-read{fill:none;stroke:var(--sl-point);stroke-width:2.5;stroke-dasharray:6 5;pointer-events:none}
.sl-pt{fill:var(--sl-point);stroke:#fff;stroke-width:2.5;pointer-events:none}
.sl-pt-halo{fill:var(--sl-halo);pointer-events:none}
.sl-glass{stroke:var(--sl-glass);stroke-width:3}
.sl-lid{fill:var(--sl-lid)}
.sl-leader{stroke:var(--sl-muted);stroke-width:1.5;fill:none}
.sl-roots{fill:none;stroke:var(--sl-root);stroke-width:2;stroke-linecap:round}
.sl-worm{fill:none;stroke:var(--sl-worm);stroke-width:5;stroke-linecap:round}
.sl-peds{fill:none;stroke:var(--sl-ped);stroke-width:2}
.sl-rock{stroke:var(--sl-rock-line);stroke-width:1}
.sl-pitedge{fill:none;stroke:var(--sl-tri);stroke-width:2.5}
.sl-tag{fill:var(--sl-tag);stroke:var(--sl-tag-line);stroke-width:2.5}
.sl-tag.is-empty{stroke-dasharray:5 4}
.core-scene svg .sl-tagtext{font-weight:800}
.core-scene svg .sl-mark{font-weight:800;font-size:22px}
.core-scene svg .sl-mark.is-ok{fill:var(--sl-ok)}.core-scene svg .sl-mark.is-bad{fill:var(--sl-bad)}
.sl-illuv{fill:var(--sl-clay);stroke:#fff;stroke-width:1}
.sl-arrow{fill:none;stroke:#fff;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}
.sl-funnel,.sl-beaker{fill:none;stroke:var(--sl-glass);stroke-width:3.5;stroke-linejoin:round}
.sl-wet{fill:var(--sl-water2);opacity:.35}
.sl-drip{stroke:var(--sl-water1);stroke-width:4;stroke-linecap:round;stroke-dasharray:4 9}
.sl-chosen{fill:none;stroke:var(--sl-chosen);stroke-width:3}
.core-scene svg .sl-chosen-text{fill:var(--sl-chosen);font-weight:800}
.sl-cloud ellipse{fill:var(--sl-cloud)}
.sl-rain{stroke:var(--sl-rain);stroke-width:2.5;stroke-linecap:round}
.sl-surface{fill:none;stroke:var(--sl-grass2);stroke-width:5;stroke-linejoin:round}
.sl-rill{fill:none;stroke:var(--sl-field2);stroke-width:5;stroke-linecap:round}
.sl-cover{fill:none;stroke:var(--sl-cover);stroke-width:3;stroke-linecap:round}
.sl-residue{stroke:var(--sl-residue);stroke-width:3;stroke-linecap:round}
.sl-stubble{stroke:var(--sl-residue);stroke-width:2.5}
.sl-contour{fill:none;stroke:var(--sl-cover);stroke-width:5;stroke-linecap:round}
.sl-furrow{stroke:var(--sl-field2);stroke-width:3;stroke-linecap:round}
.sl-terrace-wall{stroke:var(--sl-rock2);stroke-width:5}
.sl-corn path{fill:none;stroke:var(--sl-corn);stroke-width:3;stroke-linecap:round}
.sl-corn.is-pale path{stroke:var(--sl-corn-pale)}
.sl-bean path{stroke:var(--sl-bean);stroke-width:3}.sl-bean circle{fill:var(--sl-bean)}
.sl-runoff{fill:none;stroke:var(--sl-water1);stroke-width:3;stroke-dasharray:10 14;stroke-linecap:round}
.sl-trap{fill:none;stroke:var(--sl-tri);stroke-width:3}
.sl-baseline{stroke:var(--sl-bad);stroke-width:2.5;stroke-dasharray:7 5}
.sl-sign{fill:var(--sl-sign);stroke:var(--sl-sign-line);stroke-width:2}
.core-scene svg .sl-model{font-weight:800}

/* ── reveal motion (practice only). Each animation ends on the drawn state; reduced motion shows the end state. ── */
.sl-pond,.sl-beaker-fill,.sl-silt-fill{transform-box:fill-box;transform-origin:50% 100%}
.sl-pond.is-fast{animation:sl-pond-fast 1.1s ease-out backwards}
.sl-pond.is-slow{animation:sl-pond-slow 2.6s ease-out backwards}
.sl-beaker-fill.is-fast{animation:sl-grow 1.2s .2s ease-out backwards}
.sl-beaker-fill.is-slow{animation:sl-grow 2.6s .4s ease-out backwards}
.sl-drip{animation:sl-drip .5s linear 6}
.sl-drip.is-slow{animation-duration:1.2s;animation-iteration-count:3}
.sl-silt-fill{animation:sl-grow 1.8s .6s ease-out backwards}
.sl-runoff{animation:sl-flow 1.2s linear 3}
.sl-illuv{animation:sl-fall 1.6s ease-in backwards}
@keyframes sl-pond-fast{from{transform:scaleY(7.5)}}
@keyframes sl-pond-slow{from{transform:scaleY(1.7)}}
@keyframes sl-grow{from{transform:scaleY(0)}}
@keyframes sl-drip{to{stroke-dashoffset:-26}}
@keyframes sl-flow{to{stroke-dashoffset:-48}}
@keyframes sl-fall{from{transform:translateY(-62px);opacity:.2}}
.is-still *{animation:none!important}

@media(max-width:900px){.core{height:auto;grid-template-columns:1fr;padding:12px}.core-bench,.core-panel{overflow:visible;padding:16px}.core-scene svg{min-width:460px}.core-panel{padding-bottom:30px}}
@media(prefers-reduced-motion:reduce){.core *{animation:none!important;transition:none!important}}
.sl-classkey{margin:.4rem 0 0;font-size:1rem;color:var(--sl-ink)}
