/* Ausgeology · How many can we take?: styles for this lesson's try-first boxes, number answers, tables and models. */
:root {
  --sh-water: #7fb6d8; --sh-water-2: #4f93c0; --sh-grass: #cfe0b4; --sh-bank: #b89f72; --sh-fish: #1f4f6e; --sh-tag: #f2b632;
  --sh-try: #b8501a; --sh-meth: #1d6f8f;
  --sm-band: rgba(42, 120, 214, 0.55); --sm-zone: rgba(106, 79, 163, 0.32); --sm-spawn: rgba(235, 104, 52, 0.38);
  --qm-land: #f3efe4; --qm-other: #e3e1da;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sh-water: #2f6a8f; --sh-water-2: #23577a; --sh-grass: #34422b; --sh-bank: #6b5a3d; --sh-fish: #cfe6f5; --sh-tag: #f2c14e;
    --sh-try: #ec8a52; --sh-meth: #6fb6d2;
    --sm-band: rgba(127, 185, 228, 0.6); --sm-zone: rgba(185, 162, 236, 0.34); --sm-spawn: rgba(240, 140, 90, 0.42);
    --qm-land: #2a3236; --qm-other: #1f2629;
  }
}
:root[data-theme="dark"] {
  --sh-water: #2f6a8f; --sh-water-2: #23577a; --sh-grass: #34422b; --sh-bank: #6b5a3d; --sh-fish: #cfe6f5; --sh-tag: #f2c14e;
  --sh-try: #ec8a52; --sh-meth: #6fb6d2;
  --sm-band: rgba(127, 185, 228, 0.6); --sm-zone: rgba(185, 162, 236, 0.34); --sm-spawn: rgba(240, 140, 90, 0.42);
  --qm-land: #2a3236; --qm-other: #1f2629;
}

/* screen 1 */
blockquote.qcaa { margin: 0; padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--surface); max-width: 68ch; }
blockquote.qcaa p { margin: 0; }

/* try first, then the method */
.try-box, .meth-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; padding: 16px 18px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); max-width: 820px; min-width: 0; }
.try-box { border-left: 6px solid var(--sh-try); }
.meth-box { border-left: 6px solid var(--sh-meth); }
.try-box > *, .meth-box > * { margin: 0; }
.try-box > .label { color: var(--sh-try); }
.meth-box > .label { color: var(--sh-meth); }
.try-box ol, .try-box ul { padding-left: 1.4em; display: grid; gap: 6px; }
.try-box .note textarea { min-height: 5.5em; }
.gate-done { color: var(--ink-2); font-size: 0.95rem; }
.js [data-after]:not(.is-open), .js .sh-after:not(.is-open) { display: none; }
.after { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.after > * { min-width: 0; }
.compare { max-width: 820px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); display: grid; gap: 8px; }
.compare > * { margin: 0; }
.compare ul { padding-left: 1.3em; display: grid; gap: 4px; }
.formula { margin: 0; max-width: 820px; padding: 12px 16px; border-radius: 10px; background: var(--surface-2); font-family: var(--font-mono); font-size: 1rem; font-weight: 700; line-height: 1.5; }
.sh-h4 { margin: 4px 0 0; font-size: 1.02rem; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; cursor: pointer; min-height: 40px; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); }

/* number answers */
.num { display: grid; gap: 8px; }
.num label { font-weight: 700; line-height: 1.4; }
.num-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.num-row input { width: 9.5em; max-width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 1.04rem; color: var(--ink); background: var(--surface); font-variant-numeric: tabular-nums; }
.num-row input:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
.num.is-right .num-row input { border-color: var(--good); }
.num.is-wrong .num-row input { border-color: var(--bad); }
.num-unit { color: var(--ink-2); }
.num .fb { margin: 0; }
.nums { display: grid; gap: 18px; max-width: 820px; }

/* tables */
.tbl-box { display: grid; gap: 8px; align-content: start; max-width: 820px; min-width: 0; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tbl-box > p { margin: 0; padding: 12px 14px 0; }
.tbl-box > p.small { padding: 0 14px 12px; }
.tbl-box td, .tbl-box th { padding: 8px 12px; }
.tbl-box thead th, .tbl-scroll thead th { text-transform: none; letter-spacing: 0; }
details.tbl-more { max-width: 820px; }
.tbl-scroll { max-height: 340px; overflow: auto; }
.tbl-scroll table { font-size: 0.95rem; }
.tbl-src { margin: 0; color: var(--ink-2); }

/* the models */
.lab.viz { margin: 4px 0 6px; }
.viz-lead { margin: 0; color: var(--ink-2); max-width: 72ch; }
.viz-read { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); min-height: 3.2em; line-height: 1.5; max-width: 820px; }
.viz-side { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 680px) { .viz-side { grid-template-columns: minmax(0, 1fr); } .qm-stage { max-width: 340px; } }
.viz-ctl { display: grid; gap: 12px; align-content: start; min-width: 0; }
.sd-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.viz-out { min-height: 6em; }
.v-lab { font-family: var(--font-body); font-size: 13px; font-weight: 600; fill: var(--ink); }
.v-small { font-size: 11.5px; }
.v-halo { paint-order: stroke; stroke: var(--sc-halo); stroke-width: 4px; stroke-linejoin: round; }
.sh-axt { font-weight: 700; }
.sh-limit { stroke: var(--bad); stroke-width: 1.6; stroke-dasharray: 6 4; fill: none; }
.sh-limitlab { fill: var(--bad); font-weight: 700; }
.sh-target { stroke: var(--good); stroke-width: 1.6; stroke-dasharray: 6 4; fill: none; }
.sh-targetlab { fill: var(--good); font-weight: 700; }
.sh-thresh { stroke: var(--ink-2); stroke-width: 1.4; stroke-dasharray: 2 3; fill: none; }
.sh-threshlab { fill: var(--ink-2); font-weight: 700; }
.sh-true { stroke: var(--good); stroke-width: 2.4; }
.sh-true-lab { fill: var(--good); }
.lk-old { opacity: 0.32; stroke-width: 1.8; }
.lk-endlab { font-weight: 700; fill: var(--ink); }

/* screen 1: the map */
.qm-stage { background: var(--sc-sky); }
.sm-sea { fill: var(--sc-sky); }
.qm-other { fill: var(--qm-other); stroke: var(--viz-axis); stroke-width: 3; }
.qm-qld { fill: var(--qm-land); stroke: var(--ink-2); stroke-width: 5; }
.qm-qldlab { font-size: 15px; font-weight: 800; fill: var(--ink-2); }
.qm-sealab { fill: var(--ink-2); font-style: italic; font-weight: 600; }
.qm-town { fill: var(--ink-2); stroke: var(--surface); stroke-width: 1.5; }
.sm-band { fill: none; stroke: var(--sm-band); stroke-width: 110; stroke-linejoin: round; stroke-linecap: round; opacity: 0.45; }
.sm-band.is-on { opacity: 1; }
.sm-zone { fill: var(--sm-zone); opacity: 0.5; }
.sm-zone.is-on { opacity: 1; stroke: #6a4fa3; stroke-width: 6; }
.sm-spawn { fill: var(--sm-spawn); opacity: 0.55; }
.sm-spawn.is-on { opacity: 1; stroke: var(--viz-2); stroke-width: 7; }
.sm-line { stroke: var(--ink); stroke-width: 7; stroke-dasharray: 26 16; }
.sm-on { font-weight: 800; }
.sm-town-on { fill: var(--viz-2); }

/* screen 2: the dam */
.pd-stage { background: var(--sh-grass); max-width: 760px; }
.pd-grass { fill: var(--sh-grass); }
.pd-bank { fill: var(--sh-bank); transform: translate(0, 3px); }
.pd-water { fill: var(--sh-water); stroke: var(--sh-water-2); stroke-width: 3; }
.pd-fish { fill: var(--sh-fish); opacity: 0.5; }
.pd-net { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; opacity: 0; }
.pd-row { display: flex; flex-wrap: wrap; gap: 6px 5px; max-width: 820px; min-height: 0; }
.pd-row:empty { display: none; }
.fish { position: relative; width: 22px; height: 11px; border-radius: 50%; background: var(--sh-fish); margin-right: 6px; opacity: 0.85; }
.fish::after { content: ""; position: absolute; right: -7px; top: 1px; border-style: solid; border-width: 4.5px 0 4.5px 8px; border-color: transparent transparent transparent var(--sh-fish); }
.fish.is-tag::before { content: ""; position: absolute; left: 6px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--sh-tag); border: 1.5px solid var(--ink); }
.pd-log { max-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pd-after { display: grid; gap: 12px; padding-top: 6px; border-top: 2px solid var(--line); }
.pd-after.is-open { display: grid; }
.pd-after > * { margin: 0; }
.pd-dot { fill: var(--viz-1); stroke: var(--viz-surface); stroke-width: 1.2; }
.pd-dot.is-off { fill: var(--viz-2); }

/* screens 3 and 9: the tank */
.fl-stage, .ru-stage { background: var(--surface-2); }
.fl-sliders, .fl-sl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 820px; }
.fl-sliders .slider-row, .fl-sl .slider-row { grid-template-columns: minmax(8em, 15em) minmax(0, 1fr) 5.5em; }
.fl-sliders .slider-row .label, .fl-sl .slider-row .label { white-space: normal; line-height: 1.3; }
@media (max-width: 560px) { .fl-sliders .slider-row, .fl-sl .slider-row { grid-template-columns: minmax(0, 1fr) auto; } }
.fl-mode.is-open { display: inline-flex; }
.tk-wall { fill: none; stroke: var(--ink-2); stroke-width: 3; stroke-linejoin: round; }
.tk-water { fill: var(--viz-1); opacity: 0.32; }
.tk-pipe { fill: none; stroke-linecap: butt; }
.tk-in { stroke: var(--viz-3); fill: var(--viz-3); }
.tk-out { stroke: var(--viz-2); fill: var(--viz-2); }
.tk-head { stroke: none; }
.tk-pipe.tk-in, .tk-pipe.tk-out { fill: none; }
.tk-pipe.is-dim, .tk-head.is-dim { opacity: 0.2; }
.tk-lab.is-dim { opacity: 0.45; }
.tk-pipe.is-hi { filter: drop-shadow(0 0 3px var(--focus)); }
.tk-sub { fill: var(--ink-2); font-weight: 500; }
.tk-count { font-size: 14px; font-weight: 800; }
.tk-dot { fill: var(--surface); }
.tk-cap { stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 5 4; fill: none; }
.tk-caplab { font-weight: 700; }

/* screens 4 and 5 */
.lk-catch { stroke-dasharray: 6 4; }
.lk-catchlab { fill: var(--viz-2); font-weight: 700; }
.lk-unstable { fill: var(--surface); stroke: var(--viz-2); stroke-width: 2.4; }
.ed-band { fill: var(--viz-2); opacity: 0.12; }
.ed-bandlab { fill: var(--viz-2); font-weight: 700; }
.ed-neg { fill: var(--bad); opacity: 0.12; }
.ed-zero { stroke: var(--ink-2); stroke-width: 1.4; }
.ed-neglab { fill: var(--bad); font-weight: 700; }

/* screen 6 */
.mk-range { stroke: var(--viz-1); stroke-width: 8; stroke-linecap: round; opacity: 0.35; }
.mk-cap { stroke: var(--viz-1); stroke-width: 2; }
.mk-lab { font-weight: 700; fill: var(--ink); }
.qt-legend .sw.qt-sw-est { background: var(--viz-1); }
.qt-legend .sw.qt-sw-real { background: var(--ink); }
.qt-legend .sw.qt-sw-rule { background: var(--viz-3); }
.qt-legend li.sh-after.is-open { display: inline-flex; }
.qt-est { fill: var(--viz-1); stroke: var(--viz-surface); stroke-width: 1.5; }
.qt-range { stroke: var(--viz-1); stroke-width: 2; opacity: 0.55; }
.qt-real { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.qt-rule { fill: none; stroke: var(--viz-3); stroke-width: 2.4; stroke-linejoin: round; }
.qt-bar { fill: var(--viz-2); }
.qt-bar2 { fill: var(--viz-3); }
.qt-log { max-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-height: 240px; }
td.sh-after.is-open, th.sh-after.is-open { display: table-cell; }
.btn.sh-after.is-open { display: inline-flex; }

/* screen 7 */
.fl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; max-width: 820px; }
.fl-tile { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.fl-tile .label { font-size: 0.7rem; }
.fl-tile b { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.fl-tile.is-neg b { color: var(--bad); }
.fl-more.is-open { display: grid; gap: 12px; }
.fl-mark { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 3 3; }
.fl-marklab { font-weight: 700; fill: var(--ink); }
.fl-now { stroke: var(--accent); stroke-width: 2.4; }
.fl-inc { fill: var(--viz-1); }
.fl-cst { fill: var(--viz-2); }

/* screen 8 */
.os-stage { background: var(--surface-2); }
.os-month { fill: var(--viz-grid); }
.os-month.is-alt { fill: var(--viz-axis); opacity: 0.55; }
.os-stem { stroke: var(--ink-2); stroke-width: 1.2; }
.os-stem.is-on { stroke: var(--accent); stroke-width: 2; }
.os-dot { fill: var(--viz-1); stroke: var(--viz-surface); stroke-width: 1.5; }
.os-dot.is-world { fill: var(--viz-3); }
.os-dot.is-on { fill: var(--accent); stroke: var(--ink); }
.os-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.os-btns .rpick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.os-bar { fill: var(--viz-1); opacity: 0.75; }
.os-bar.is-world { fill: var(--viz-3); }
.os-bar.is-on { opacity: 1; fill: var(--accent); }
.os-sel { font-weight: 700; fill: var(--ink); }

/* screen 9 */
.sort-count { margin: 0; font-weight: 700; color: var(--ink-2); }
.icards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; max-width: 980px; }

/* screen 10 */
.pl-run { fill: none; stroke: var(--viz-1); stroke-width: 1.4; opacity: 0.45; }
.pl-run.is-low { stroke: var(--viz-2); opacity: 0.6; }
.plan-grid { display: grid; gap: 14px; max-width: 820px; }
.plan-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; max-width: 980px; }
.plan-data .tbl-box { max-width: none; }
