/* Ausgeology · Why did the estuary turn green?: styles for this lesson's design boxes, number answers, tables and models. */
:root {
  --ph-sea: #8cc0da; --ph-est: #bfe0ec; --ph-shore: #6e9fb8; --ph-river: #5fa6cc; --ph-land: #efe8d6; --ph-land-2: #e2d6b8;
  --ph-sand: #e8d6a3; --ph-loam: #b98f62; --ph-mud: #8b6b4c; --ph-sed: #b0916b;
  --ph-grass: #2e7a4d; --ph-weed: #8db92e; --ph-bloom: #1fa595; --ph-trouble: #c2410c; --ph-p: #a8551b; --ph-taken: #4f8a35;
  --ph-need: #1d6f8f; --ph-log: #6a4fa3; --ph-crab: #b8501a;
  --ph-must: #b3261e; --ph-should: #8a5200; --ph-could: #4a565a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ph-sea: #23577a; --ph-est: #1d4a60; --ph-shore: #4d8aa8; --ph-river: #4f97c0; --ph-land: #262d2a; --ph-land-2: #313a34;
    --ph-sand: #5c5236; --ph-loam: #6b5136; --ph-mud: #4d3b2b; --ph-sed: #5e4a33;
    --ph-grass: #5fb37f; --ph-weed: #a9d150; --ph-bloom: #3fc6b4; --ph-trouble: #f08a5d; --ph-p: #e08a4a; --ph-taken: #8fcf6e;
    --ph-need: #6fb6d2; --ph-log: #b9a2ec; --ph-crab: #ec8a52;
    --ph-must: #f38b84; --ph-should: #f0b45a; --ph-could: #a9b5b8;
  }
}
:root[data-theme="dark"] {
  --ph-sea: #23577a; --ph-est: #1d4a60; --ph-shore: #4d8aa8; --ph-river: #4f97c0; --ph-land: #262d2a; --ph-land-2: #313a34;
  --ph-sand: #5c5236; --ph-loam: #6b5136; --ph-mud: #4d3b2b; --ph-sed: #5e4a33;
  --ph-grass: #5fb37f; --ph-weed: #a9d150; --ph-bloom: #3fc6b4; --ph-trouble: #f08a5d; --ph-p: #e08a4a; --ph-taken: #8fcf6e;
  --ph-need: #6fb6d2; --ph-log: #b9a2ec; --ph-crab: #ec8a52;
  --ph-must: #f38b84; --ph-should: #f0b45a; --ph-could: #a9b5b8;
}

/* the syllabus quotes in the teacher notes */
blockquote.scsa { margin: 0; padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--surface); max-width: 72ch; }
blockquote.scsa p { margin: 0 0 6px; }
blockquote.scsa ul { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }

/* design-based learning: the brief, what the design needs to know, and the design log */
.ph-brief, .ph-need, .ph-dlog { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; 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; }
.ph-brief > *, .ph-need > *, .ph-dlog > * { margin: 0; }
.ph-brief { border-left: 6px solid var(--ochre); }
.ph-brief > .label { color: var(--ochre); }
.ph-brief ul { padding-left: 1.3em; display: grid; gap: 4px; }
.ph-need { border-left: 6px solid var(--ph-need); }
.ph-need > .label { color: var(--ph-need); }
.ph-dlog { border-left: 6px solid var(--ph-log); }
.ph-dlog > .label { color: var(--ph-log); }
.ph-dlog .note textarea { min-height: 5.5em; }
.ph-cycle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: dc; }
.ph-cycle > li { counter-increment: dc; position: relative; display: grid; gap: 6px; align-content: start; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ph-cycle > li::before { content: counter(dc); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: #fff; background: var(--ph-need); }
.ph-cycle > li:nth-child(1)::before { background: var(--ochre-band); }
.ph-cycle > li:nth-child(4)::before { background: #6c4fa8; }
.ph-cycle h3 { font-size: 1.04rem; }
.ph-cycle p { margin: 0; font-size: 0.97rem; line-height: 1.5; }
.ph-cycle .small { color: var(--ink-2); font-size: 0.9rem; }
@media (max-width: 860px) { .ph-cycle { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 520px) { .ph-cycle { grid-template-columns: minmax(0, 1fr); } }
.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); }
.sort-count { margin: 0; font-weight: 700; color: var(--ink-2); }
.icards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; max-width: 980px; }

/* 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 td, .tbl-box th { padding: 8px 12px; }
.tbl-box thead th { text-transform: none; letter-spacing: 0; }
.tbl-box .small { color: var(--ink-2); font-size: 0.88rem; }
td.is-yes, span.is-yes { color: var(--good); font-weight: 800; }
td.is-no, span.is-no { color: var(--bad); font-weight: 800; }
span.is-part { color: var(--ph-should); font-weight: 800; }

/* the models: shared pieces */
.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, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 720px) { .viz-side { grid-template-columns: minmax(0, 1fr); } .ph-map-stage { max-width: 380px; } }
.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; display: grid; gap: 4px; align-content: start; }
.viz-out > * { margin: 0; }
.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-thresh { stroke: var(--ink-2); stroke-width: 1.4; stroke-dasharray: 2 3; fill: none; }
.sh-threshlab { fill: var(--ink-2); font-weight: 700; }
.ph-seg { display: grid; gap: 6px; align-content: start; min-width: 0; }
.ph-seg-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-seg-btns .stp-btn { min-height: 40px; padding: 6px 12px; }
.ph-ctl-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: start; }
.ph-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.92rem; color: var(--ink-2); }
.ph-key li { display: inline-flex; align-items: center; gap: 7px; }
.ph-key i { width: 16px; height: 12px; border-radius: 3px; flex: none; }
.ph-key .k-grass { background: var(--ph-grass); }
.ph-key .k-weed { background: var(--ph-weed); }
.ph-key .k-bloom { background: var(--ph-bloom); }
.ph-key .k-trouble { background: var(--ph-trouble); border-radius: 50%; width: 12px; }
.ph-key .k-dot { background: var(--ph-p); border-radius: 50%; width: 10px; height: 10px; }
.ph-key .k-taken { background: var(--ph-taken); border-radius: 50%; width: 10px; height: 10px; }
.ph-key .k-atm { background: var(--sp-atm); } .ph-key .k-bio { background: var(--sp-bio); } .ph-key .k-hyd { background: var(--sp-hyd); } .ph-key .k-geo { background: var(--sp-geo); }
.ph-key .k-p { background: var(--ph-p); opacity: 0.75; }
.ph-key .k-kill { background: var(--bad); clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }
.ph-key .k-crab { background: var(--ph-crab); height: 3px; }
.ph-count { font-weight: 700; color: var(--ink-2); font-size: 0.95rem; }

/* screen 1: the criteria */
.ph-crit { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.ph-crit-card { display: grid; gap: 10px; align-content: space-between; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); }
.ph-crit-card.is-set { border-color: var(--accent); }
.ph-crit-card.is-con { background: var(--surface-2); border-style: dashed; }
.ph-crit-t { display: grid; gap: 4px; }
.ph-crit-t > * { margin: 0; }
.ph-crit-t h4 { font-size: 1.02rem; line-height: 1.3; }
.ph-test { font-size: 0.92rem; color: var(--ink-2); }
.ph-why { font-size: 0.95rem; line-height: 1.45; }
.ph-con { margin: 0; font-size: 0.92rem; font-weight: 700; color: var(--ink-2); }
.ph-crit .ph-seg-btns .stp-btn { flex: 1 1 auto; justify-content: center; font-size: 0.86rem; min-height: 38px; padding: 4px 8px; }
.ph-crit .stp-btn[data-prio="must"][aria-pressed="true"] { border-color: var(--ph-must); background: var(--bad-soft); }
.ph-crit .stp-btn[data-prio="should"][aria-pressed="true"] { border-color: var(--ph-should); background: var(--ochre-soft); }
.ph-crit .stp-btn[data-prio="could"][aria-pressed="true"] { border-color: var(--ph-could); background: var(--surface-2); }

/* screen 1: the map */
.ph-map-stage { background: var(--ph-sea); }
.pm-land { fill: var(--ph-land); }
.pm-sea { fill: var(--ph-sea); }
.pm-shore { fill: none; stroke: var(--ph-shore); stroke-width: 2; }
.pm-river { fill: none; stroke: var(--ph-river); stroke-width: 3.5; stroke-linecap: round; }
.pm-chan-edge { fill: none; stroke: var(--ph-shore); stroke-width: 11; stroke-linecap: round; }
.pm-chan { fill: none; stroke: var(--ph-est); stroke-width: 7; stroke-linecap: round; }
.pm-chan-edge.pm-new { stroke-width: 13; }
.pm-chan.pm-new { stroke-width: 9; }
.pm-edge { fill: none; stroke: var(--ph-shore); stroke-width: 4; }
.pm-water { fill: var(--ph-est); }
.pm-grass ellipse { fill: var(--ph-grass); opacity: 0.85; }
.pm-weed ellipse { fill: var(--ph-weed); }
.pm-bloom { fill: var(--ph-bloom); opacity: 0.62; }
.pm-trouble { fill: var(--ph-trouble); stroke: var(--surface); stroke-width: 2; }
.pm-town { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; }
.pm-sealab { fill: var(--ink-2); font-style: italic; }
.pm-name { font-size: 14px; font-weight: 800; }
.pm-newlab { font-weight: 800; }
.pm-north { fill: var(--ink); }
.pm-scale { stroke: var(--ink); stroke-width: 2.5; }
.ph-map-out h4 { font-size: 1.06rem; }

/* screen 2: the slice through a basin */
.ph-xs-stage { background: var(--ph-est); }
.xs-sky { fill: var(--sc-sky); }
.xs-water { fill: var(--ph-est); }
.xs-mud { fill: var(--ph-sed); }
.xs-surface { fill: none; stroke: var(--ph-shore); stroke-width: 2; }
.xs-part { cursor: pointer; }
.xs-part:focus { outline: none; }
.xs-part.is-on, .xs-part:hover, .xs-part:focus-visible { filter: drop-shadow(0 0 2px var(--focus)) drop-shadow(0 0 4px var(--focus)); }
.xs-sun { fill: #f2b632; }
.xs-ray { stroke: #f2b632; stroke-width: 3; stroke-linecap: round; }
.xs-beam { stroke: #f2c14e; stroke-width: 10; opacity: 0.25; stroke-linecap: round; }
.xs-tag, .xs-mudtag { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.xs-nut { fill: var(--surface); stroke: var(--ph-p); stroke-width: 2; }
.xs-nutlab { font-family: var(--font-mono); font-size: 10px; font-weight: 700; fill: var(--ph-p); }
.xs-bub { fill: var(--surface); stroke: var(--ph-shore); stroke-width: 1.5; }
.xs-phyto { fill: var(--ph-bloom); }
.xs-zoo { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.xs-grass { fill: none; stroke: var(--ph-grass); stroke-width: 3.5; stroke-linecap: round; }
.xs-weed { fill: var(--ph-weed); opacity: 0.9; }
.xs-det { fill: var(--ph-mud); }
.xs-worm { fill: none; stroke: #b8606a; stroke-width: 3.5; stroke-linecap: round; }
.xs-shell { fill: var(--ph-land-2); stroke: var(--ink-2); stroke-width: 1.4; }
.xs-bact { fill: #9a7ac8; }
.xs-crab { fill: #3f74b8; }
.xs-crableg { fill: none; stroke: #3f74b8; stroke-width: 2.6; stroke-linecap: round; }
.xs-fish { fill: #6f7f88; }
.xs-tailor { fill: #4d6a7a; }
.xs-eye { fill: var(--surface); }
.xs-bird { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.xs-dive { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 2 3; }
.ph-xs-btns { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ph-xs-out .label { color: var(--accent); }

/* screen 3: the food web and the pyramid */
.ph-web-stage { background: var(--surface-2); }
.fw-lv { font-weight: 700; }
.fw-arrow { fill: none; stroke-width: 2.4; }
.fw-arrow.is-ok { stroke: var(--viz-1); }
.fw-arrow.is-all { stroke: var(--viz-dim); stroke-dasharray: 5 4; stroke-width: 1.8; }
.fw-arrow.is-cut { opacity: 0.25; stroke-dasharray: 3 4; }
.fw-head-ok { fill: var(--viz-1); }
.fw-head-all { fill: var(--viz-dim); }
.fw-node { cursor: pointer; }
.fw-node:focus { outline: none; }
.fw-box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.fw-node.is-sun .fw-box { fill: #fbe7b0; stroke: #e0a92e; }
.fw-node.is-dead .fw-box { fill: var(--ph-land-2); stroke-dasharray: 4 3; }
.fw-node:hover .fw-box, .fw-node:focus-visible .fw-box { stroke: var(--focus); stroke-width: 3; }
.fw-node.is-pick .fw-box { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 3; }
.fw-node.is-gone { opacity: 0.4; }
.fw-x { stroke: var(--bad); stroke-width: 2.5; stroke-linecap: round; }
.fw-t { pointer-events: none; }
.fw-node.is-sun .fw-t { fill: #1a2124; }
.ph-pyr { display: grid; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.ph-pyr-stage { background: var(--surface-2); max-width: 760px; }
.py-bar { stroke: var(--surface); stroke-width: 2; }
.py-0 { fill: var(--sp-bio-soft); } .py-1 { fill: var(--sp-hyd-soft); } .py-2 { fill: var(--ochre-soft); } .py-3 { fill: var(--accent-soft); }
.py-t { font-weight: 700; }
.py-v { font-variant-numeric: tabular-nums; }

/* screen 4: phosphorus from paddock to sea, and the nitrogen cycle */
.ph-flow-stage { background: var(--sc-sky); }
.pf-sky { fill: var(--sc-sky); }
.pf-land { fill: var(--ph-land-2); }
.pf-topsoil { fill: var(--ph-loam); }
.pf-topsoil.is-sand { fill: var(--ph-sand); }
.pf-fence { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
.pf-cow { fill: var(--ink-2); }
.pf-drain { fill: none; stroke: var(--ph-river); stroke-width: 6; stroke-linecap: round; opacity: 0.8; }
.pf-estuary { fill: var(--ph-est); stroke: var(--ph-shore); stroke-width: 1.5; }
.pf-sed { fill: var(--ph-sed); }
.pf-sea { fill: var(--ph-sea); }
.pf-mouth { stroke: var(--ph-est); stroke-width: 8; }
.pf-alga { fill: var(--ph-weed); opacity: 0.8; }
.pf-dot { fill: var(--ph-p); stroke: var(--surface); stroke-width: 1; }
.pf-arrow { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 5 3; }
.pf-head { fill: var(--ink-2); }
.pf-alab { font-weight: 700; fill: var(--ink-2); }
.pf-rain { stroke: var(--ph-river); stroke-width: 1.6; stroke-linecap: round; opacity: 0.8; }
.pf-dot.is-taken { fill: var(--ph-taken); }
.ph-src { padding-top: 6px; border-top: 1px solid var(--line); }
.ph-n-stage { background: var(--surface); }
.nc-bg-atm { fill: var(--sp-atm-soft); }
.nc-bg-hyd { fill: var(--sp-hyd-soft); }
.nc-bg-land { fill: var(--ph-land); }
.nc-bg-geo { fill: var(--sp-geo-soft); }
.nc-zone { font-weight: 700; }
.nc-link { cursor: pointer; }
.nc-link:focus { outline: none; }
.nc-path { fill: none; stroke: var(--ink-2); stroke-width: 2; opacity: 0.55; }
.nc-link.is-near .nc-path { opacity: 0.9; }
.nc-link.is-on .nc-path { stroke: var(--accent); stroke-width: 3.5; opacity: 1; }
.nc-head { fill: var(--ink-2); }
.nc-head.is-on { fill: var(--accent); }
.nc-num { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.5; }
.nc-link.is-on .nc-num, .nc-link:hover .nc-num, .nc-link:focus-visible .nc-num { fill: var(--accent); stroke: var(--accent); }
.nc-numt { font-family: var(--font-mono); font-size: 11px; font-weight: 700; fill: var(--ink); pointer-events: none; }
.nc-link.is-on .nc-numt, .nc-link:hover .nc-numt, .nc-link:focus-visible .nc-numt { fill: var(--accent-ink); }
.nc-store { cursor: pointer; }
.nc-store:focus { outline: none; }
.nc-box { fill: var(--surface); stroke-width: 2.5; }
.nc-atm .nc-box { stroke: var(--sp-atm); } .nc-bio .nc-box { stroke: var(--sp-bio); } .nc-hyd .nc-box { stroke: var(--sp-hyd); } .nc-geo .nc-box { stroke: var(--sp-geo); }
.nc-store.is-on .nc-box, .nc-store:hover .nc-box, .nc-store:focus-visible .nc-box { stroke-width: 4.5; filter: drop-shadow(0 0 3px var(--focus)); }
.nc-t { pointer-events: none; }
.ph-n-btns .stp-btn i { flex: none; }
.ph-spheres { margin-top: 2px; }

/* screen 5: the timeline and the biomass bars */
.ph-tl-stage, .ph-bm-stage { background: var(--surface); }
.tl-after { fill: var(--sp-hyd-soft); }
.tl-afterlab { font-weight: 700; fill: var(--sp-hyd); }
.tl-ev { cursor: pointer; }
.tl-ev:focus { outline: none; }
.tl-stem { stroke: var(--viz-axis); stroke-width: 1.2; }
.tl-span { fill: var(--viz-2); opacity: 0.65; }
.tl-dot { fill: var(--viz-2); stroke: var(--surface); stroke-width: 2; }
.tl-hit { fill: transparent; }
.tl-ev.is-on .tl-span, .tl-ev.is-on .tl-dot { fill: var(--accent); opacity: 1; }
.tl-ev:hover .tl-dot, .tl-ev:focus-visible .tl-dot, .tl-ev:hover .tl-span, .tl-ev:focus-visible .tl-span { stroke: var(--focus); stroke-width: 3; }
.tl-sel { font-weight: 800; }
.ph-tl-btns { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.bm-weed { fill: var(--ph-weed); }
.bm-grass { fill: var(--ph-grass); }
.bm-lab { font-weight: 700; fill: var(--ink); }
.bm-lab.is-small { font-size: 11.5px; }
.bm-none { font-style: italic; }

/* screen 6: the salinity model and Nodularia's year */
.ph-salt-stage { background: var(--surface); }
.sa-spring { fill: var(--sp-bio-soft); opacity: 0.7; }
.sa-springlab { font-weight: 700; fill: var(--sp-bio); }
.sa-collapse { stroke: var(--ph-bloom); stroke-width: 1.4; stroke-dasharray: 6 4; fill: none; }
.sa-collapselab { fill: var(--ph-bloom); font-weight: 700; }
.sa-sea { stroke: var(--ph-shore); stroke-width: 1; stroke-dasharray: 2 4; fill: none; }
.sa-other { fill: none; stroke: var(--viz-dim); stroke-width: 2; stroke-linejoin: round; }
.sa-now { fill: none; stroke: var(--viz-1); stroke-width: 3; stroke-linejoin: round; }
.sa-cursor { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 3; }
.sa-dot { fill: var(--viz-1); stroke: var(--surface); stroke-width: 2; }
.ph-cyc { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; align-items: center; }
@media (max-width: 640px) { .ph-cyc { grid-template-columns: minmax(0, 1fr); } .ph-cyc-stage { max-width: 320px; } }
.ph-cyc-stage { background: var(--surface-2); }
.lc-arc { fill: none; stroke: var(--ink-2); stroke-width: 2.5; opacity: 0.6; }
.lc-head { fill: var(--ink-2); opacity: 0.8; }
.lc-box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.lc-n { fill: var(--surface-2); }
.lc-nt { font-family: var(--font-mono); font-size: 11px; font-weight: 700; fill: var(--ink); }
.lc-node.is-on .lc-box { fill: var(--ph-bloom); stroke: var(--ph-bloom); }
.lc-node.is-on .lc-t { fill: #0f2a26; }
.lc-node.is-on .lc-n { fill: var(--surface); }
.lc-t { font-weight: 700; }

/* screen 7: the design board */
.ph-goals { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); max-width: 820px; }
.ph-goals > * { margin: 0; }
.ph-goals-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.97rem; }
.ph-goals-none { margin: 0; }
.ph-board { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .ph-board { grid-template-columns: minmax(0, 1fr); } }
.ph-col { display: grid; gap: 10px; align-content: start; min-width: 0; }
.ph-colh { margin: 0; font-size: 1rem; }
.ph-opt { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); }
.ph-opt > * { margin: 0; }
.ph-opt.is-on { border-color: var(--accent); background: var(--accent-soft); }
.ph-opt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ph-opt-head h4 { font-size: 1rem; line-height: 1.3; }
.ph-cost { flex: none; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.ph-opt p { font-size: 0.95rem; line-height: 1.45; }
.ph-side { color: var(--ink-2); }
.ph-pick { justify-self: start; }
.ph-meters { display: grid; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--ink-2); }
.ph-meter { display: grid; gap: 6px; }
.ph-meter > * { margin: 0; }
.ph-meter p { font-size: 0.95rem; line-height: 1.45; }
.ph-bar { position: relative; height: 14px; border-radius: 999px; background: var(--surface-2); overflow: visible; }
.ph-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); transition: width 0.25s ease; }
.ph-bar.is-over i { background: var(--bad); }
.ph-bar-load i { background: var(--ph-p); }
.ph-target { position: absolute; left: 42%; top: -5px; bottom: -5px; width: 3px; border-radius: 2px; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { .ph-bar i { transition: none; } }

/* screen 8: the simulator */
.ph-strip { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.ph-strip > .label b { font-family: var(--font-body); letter-spacing: 0; text-transform: none; color: var(--ink); font-size: 0.9rem; }
.ph-strip > .label b.is-over { color: var(--bad); }
.ph-strip > * { margin: 0; }
.ph-strip-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ph-chip { min-height: 38px; padding: 5px 11px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.ph-chip small { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink-2); margin-left: 2px; }
.ph-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ph-chip:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ph-strip-amend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; border: 1px dashed var(--line); }
.ph-strip-amend > span { font-size: 0.9rem; font-weight: 700; margin-right: 2px; }
.ph-strip-amend .ph-chip { min-height: 34px; padding: 3px 9px; font-size: 0.85rem; }
.ph-sim-stage, .ph-m89-stage { background: var(--surface); }
.sim-target { stroke: var(--ink-2); stroke-width: 1.3; stroke-dasharray: 6 4; fill: none; }
.sim-targetlab { fill: var(--ink-2); font-weight: 700; }
.sim-chan { stroke: var(--sp-hyd); stroke-width: 1.6; stroke-dasharray: 3 3; }
.sim-chanlab { fill: var(--sp-hyd); font-weight: 700; }
.sim-weed { fill: none; stroke: var(--ph-weed); stroke-width: 3; stroke-linejoin: round; }
.sim-grass { fill: none; stroke: var(--ph-grass); stroke-width: 3; stroke-linejoin: round; }
.sim-weedlab { fill: var(--ink); font-weight: 800; }
.sim-grasslab { fill: var(--ph-grass); font-weight: 800; }
.sim-rowlab { font-weight: 700; fill: var(--ink-2); }
.sim-p { fill: var(--ph-p); opacity: 0.75; }
.sim-bloom { fill: var(--ph-bloom); }
.sim-kill { fill: var(--bad); }
.sim-crab { fill: none; stroke: var(--ph-crab); stroke-width: 2.6; stroke-linejoin: round; }
.ph-score, .ph-log { display: grid; gap: 10px; }
.ph-score > p, .ph-log > p { margin: 0; }
.ph-score td { font-size: 0.95rem; }
.rb-weed { fill: var(--ph-weed); stroke: var(--surface); stroke-width: 2; }
.rb-grass { fill: var(--ph-grass); stroke: var(--surface); stroke-width: 2; }

/* screen 9: before and after */
.ph-ex-stage, .ph-rs-stage, .ph-rb-stage { background: var(--surface); }
.ex-before { fill: var(--viz-dim); }
.ex-after { fill: var(--sp-hyd); }
.ex-fade0 { stop-color: var(--sp-hyd); stop-opacity: 1; }
.ex-fade1 { stop-color: var(--sp-hyd); stop-opacity: 0; }
.rs-before { fill: var(--viz-2); stroke: var(--viz-2); }
.rs-after { fill: var(--sp-hyd); stroke: var(--sp-hyd); }
.rs-band { stroke: none; opacity: 0.85; }
.rs-band.is-soft { opacity: 0.6; }
.rs-tick { stroke-width: 3; fill: none; }
.rs-arrow { stroke-width: 5; fill: none; }
.rs-head { stroke: none; }
.rs-lab { font-weight: 700; fill: var(--ink); }

/* screen 10: the report card */
.ph-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.ph-cards li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 2px 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.ph-cards li.is-yes { background: var(--good-soft); }
.ph-cards li.is-no { background: var(--bad-soft); }
.ph-cards .ph-tick { grid-row: span 2; font-weight: 800; font-size: 1.1rem; }
.ph-cards li.is-yes .ph-tick { color: var(--good); }
.ph-cards li.is-no .ph-tick { color: var(--bad); }
.ph-cards span:last-child { font-size: 0.92rem; color: var(--ink-2); }
.ph-logs { margin: 0; display: grid; gap: 4px; max-width: 820px; }
.ph-logs dt { font-weight: 800; margin-top: 8px; }
.ph-logs dd { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); white-space: pre-wrap; line-height: 1.5; }
.ph-logs dd.is-empty { color: var(--ink-2); font-style: italic; background: transparent; padding: 0 12px; }
.report-grid { display: grid; gap: 14px; max-width: 820px; }
.ph-rcard { display: grid; gap: 10px; }
.ph-cmp td:first-child { width: 24%; }
.ph-cmp td:nth-child(2) { width: 22%; }
/* on a phone, the tables of results stack: one row becomes a small card */
@media (max-width: 560px) {
  .ph-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ph-stack table, .ph-stack tbody, .ph-stack tr, .ph-stack td { display: block; width: auto !important; }
  .ph-stack tr { padding: 10px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; }
  .ph-stack td { padding: 0; border: 0; text-align: left; }
  .ph-stack td:first-child { grid-column: 1 / -1; font-weight: 700; }
  .ph-stack td:first-child .small { font-weight: 400; }
  .ph-stack td::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
  .ph-stack td:first-child::before { display: none; }
  .ph-cmp td:last-child { grid-column: 1 / -1; }
}
