/* Layout: a field datasheet in six pages. A basalt bar carries the step list; the site page is a full-bleed map with a floating panel; later pages are single-column sheets with a Back/Next pager. */
:root {
  --basalt: #2b2f2c; --paper: #f6f6f2; --sheet: #ffffff; --ink: #1f2420; --muted: #5f685f;
  --rule: #d9ddd3; --leaf: #4f6b4a; --leaf-ink: #ffffff; --leaf-soft: #e3eadf; --ochre: #a8661c; --ochre-soft: #f5e8d6;
  --leaf-2: #93a88e; --rule-2: #c3c8bd;  /* chart tints: a second green, and "no data" */
  --catA: #2f6b3a; --catAbg: #dcebd9; --catB: #2b5c7a; --catBbg: #d8e7f0; --catC: #5d5d5a; --catCbg: #e8e8e5; --catD: #8a4f12; --catDbg: #f3e2cc;
  /* Meaning tokens (UI update): one colour per meaning, used by ui.js components. Pairs are text-on-background, WCAG AA. */
  --good: #2f6b3a; --good-bg: #dcebd9;        /* on a reference list, long-time local, suits, verified */
  --info: #2b5c7a; --info-bg: #d8e7f0;        /* local sightings only, published source */
  --neutral: #55554f; --neutral-bg: #e8e8e5;  /* cultivar, not loaded, no data, added in this browser */
  --caution: #8a4f12; --caution-bg: #f3e2cc;  /* native but not local, marginal, check source, needs attention */
  --bad: #9b2c22; --bad-bg: #f6dcd7;          /* not native, weed, unsuited, endangered */
  --rare: #5b3f8c; --rare-bg: #e7e0f3;        /* threatened or rare species */
  --f-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --basalt: #151816; --paper: #1b1f1c; --sheet: #232823; --ink: #e7ebe4; --muted: #a3ad9f;
    --rule: #3a413a; --leaf: #9cbf93; --leaf-ink: #142012; --leaf-soft: #2c3a2a; --ochre: #e0a35a; --ochre-soft: #3d2f1e;
    --leaf-2: #62805b; --rule-2: #4f574e;
    --catA: #9fd3a3; --catAbg: #25402a; --catB: #9cc8e3; --catBbg: #203747; --catC: #c2c2bd; --catCbg: #363834; --catD: #efbd84; --catDbg: #45321c;
    --good: #9fd3a3; --good-bg: #25402a;
    --info: #9cc8e3; --info-bg: #203747;
    --neutral: #c2c2bd; --neutral-bg: #363834;
    --caution: #efbd84; --caution-bg: #45321c;
    --bad: #f2a596; --bad-bg: #4a241e;
    --rare: #c9b6ef; --rare-bg: #362a4d;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; }
a { color: var(--leaf); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: max(8px, env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); z-index: 3000; transform: translateY(-150%); padding: 8px 12px; background: var(--paper); color: var(--ink); border: 2px solid var(--ochre); border-radius: 4px; }
.skip-link:focus-visible { transform: translateY(0); }
#main-content:focus { outline: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Header bar with step list */
.band { background: var(--basalt); color: #eef1ea; position: sticky; top: 0; z-index: 1100; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: #eef1ea; text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-mark { width: 14px; height: 14px; border-radius: 50% 50% 50% 0; background: #9cbf93; transform: rotate(-45deg); }
.steps { flex: 1 1 520px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.steps ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.steps a { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: baseline; padding: 6px 10px; border-radius: 4px; color: #c9d0c4; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
@media (hover: hover) and (pointer: fine) { .steps a:hover { background: rgba(255,255,255,.06); color: #eef1ea; } }
.steps a[aria-current="step"] { color: #ffffff; background: rgba(255,255,255,.08); border-bottom-color: #9cbf93; }
.steps .no { font-family: var(--f-mono); font-size: .72rem; color: #9cbf93; }
.steps .lbl { font-weight: 600; font-size: .9rem; }
.steps .st { grid-column: 2; font-family: var(--f-mono); font-size: .68rem; color: #9fa89b; min-height: 1em; }
.steps a.warn .st { color: #e0a35a; }

/* Pages */
main { display: block; }
.page.step { max-width: 1120px; margin: 20px auto 0; padding: 22px max(18px, env(safe-area-inset-right, 0px)) 22px max(18px, env(safe-area-inset-left, 0px)); background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
@media (max-width: 1150px) { .page.step { margin-inline: 12px; } }
.step h2, .site-panel h2 { font-family: var(--f-display); font-size: 1.35rem; margin: 0; display: flex; gap: 10px; align-items: baseline; }
.step h2 .no, .site-panel h2 .no { font-family: var(--f-mono); font-size: .8rem; color: var(--leaf); font-weight: 500; }
/* Back / Next and the step's status stay at the foot of the screen on every step, so there's no scrolling to move on. */
.pager { position: sticky; bottom: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 10px max(18px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); background: var(--paper); border-top: 1px solid var(--rule); box-shadow: 0 -6px 16px rgba(20, 26, 20, .06); }
.pager-pos { font-size: .84rem; color: var(--muted); text-align: center; min-width: 0; }
.pager-pos b { font-family: var(--f-mono); font-weight: 400; font-size: .76rem; }
footer.wrap { padding-block: 8px 40px; }

/* Site page: full-bleed map with a floating panel */
body.on-site { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.on-site main { flex: 1; min-height: 0; display: flex; }
.site-page { position: relative; flex: 1; min-height: 0; }
.site-page .map { position: absolute; inset: 0; }
.site-panel { position: absolute; z-index: 500; top: 16px; left: max(16px, env(safe-area-inset-left, 0px)); width: min(380px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 2px 10px rgba(20, 26, 20, .08); padding: 16px; display: grid; gap: 12px; }
.grid2 { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
input[type=range] { padding: 0; accent-color: var(--leaf); }
label output { font-family: var(--f-mono); text-transform: none; color: var(--ink); }
.sheet-handle, .step-toggle, .nav-about { display: none; }
/* Phones: the map fills the screen and the site panel is a bottom sheet, so the search,
   radius and Find controls stay on screen with the map. Details fold away. */
@media (max-width: 760px) {
  .site-panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 64%; border-radius: 14px 14px 0 0; border-inline: 0; border-bottom: 0;
    box-shadow: 0 -6px 24px rgba(20, 26, 20, .2); padding: 4px max(14px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); gap: 10px; overscroll-behavior: contain; }
  .site-panel > * { order: 3; }
  .site-panel .sheet-handle { order: 0; }
  .site-panel .welcome { order: 1; }
  .site-panel #geoForm, .site-panel .geo-results, .site-panel .radius-ctl, .site-panel .find-row, .site-panel #evcMsg { order: 2; }
  .site-panel h2 { display: none; }
  .sheet-handle { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-height: 0; padding: 6px 0 2px; background: none; border: 0; color: var(--muted); font-size: .76rem; font-weight: 500; }
  .sheet-handle .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--rule); }
  .site-panel.collapsed .more { display: none; }
  .site-panel #geoForm { flex-wrap: nowrap; }
  .site-panel #geoForm label { font-size: 0; gap: 0; }
  .site-panel #geoForm input { font-size: 1rem; }
  .site-panel .radius-ctl { grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
  .site-panel .radius-ctl input { grid-column: 1 / -1; }
  .site-panel .find-row button { flex: 1; }
  .site-page > .map-note { bottom: auto; top: 10px; right: 60px; left: 10px; text-align: center; }
  .site-page .leaflet-control-attribution { font-size: 9px; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
  .site-page .leaflet-control-attribution:hover, .site-page .leaflet-control-attribution:focus-within { max-height: none; }
  .site-page .leaflet-bottom { bottom: var(--sheet-h, 0px); }


  /* Back / Next stay at the bottom of the screen on long pages */
  .pager { padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .pager .button { font-size: .84rem; padding: 6px 12px; min-height: 40px; max-width: 48%; }
  .pager-pos { display: none; }
}
.map-note { position: absolute; z-index: 500; right: 12px; bottom: 26px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 4px 8px; font-size: .78rem; color: var(--muted); }
.hint { color: var(--muted); font-size: .88rem; margin: 0; max-width: 78ch; }
.msg { color: var(--muted); font-size: .88rem; margin: 0; }
.msg.err { color: var(--ochre); }

label { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
input, select, textarea { font: inherit; font-size: .95rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 8px 10px; text-transform: none; letter-spacing: 0; width: 100%; }
textarea { font-family: var(--f-mono); font-size: .85rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.row .grow { flex: 1 1 240px; }
.grid3 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
button { font: inherit; font-size: .9rem; font-weight: 600; border-radius: 4px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--leaf); background: var(--leaf); color: var(--leaf-ink); min-height: 38px; }
button.ghost, .button.ghost { background: transparent; color: var(--leaf); }
.button { display: inline-flex; align-items: center; font-size: .9rem; font-weight: 600; border-radius: 4px; padding: 8px 14px; border: 1px solid var(--leaf); background: var(--leaf); color: var(--leaf-ink); min-height: 38px; text-decoration: none; }
.button[aria-disabled="true"] { visibility: hidden; }
button:disabled { opacity: .5; cursor: progress; }

.geo-results { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 4px; }
.geo-results li + li { border-top: 1px solid var(--rule); }
.geo-results button { width: 100%; text-align: left; background: transparent; color: var(--ink); border: 0; font-weight: 400; border-radius: 0; }
@media (hover: hover) and (pointer: fine) { .geo-results button:hover { background: var(--leaf-soft); } }

.tablebox { position: relative; overflow-x: auto; border: 1px solid var(--rule); border-radius: 4px; } /* relative: keeps screen-reader labels inside the scroll box */
table { border-collapse: collapse; width: 100%; font-size: .86rem; }
.evc-table { min-width: 720px; }
.results { min-width: 860px; }
.sp-table { min-width: 900px; }
.sp-table tr.grp th { background: var(--leaf-soft); color: var(--leaf); font-family: var(--f-display); font-size: .9rem; text-transform: none; letter-spacing: 0; font-weight: 600; padding: 8px 10px; }
.sp-table tr.off td { color: var(--muted); }
.sp-table tr.off td.taxon { text-decoration: line-through; text-decoration-color: var(--rule); }
.sp-table tr.local td.taxon { color: var(--catB); }
.common { display: block; font-style: normal; font-size: .78rem; color: var(--muted); }
.sp-tools { display: grid; gap: 10px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 900px) { .sp-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sp-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp-find { display: flex; gap: 8px; align-items: flex-end; }
.sp-find .grow { flex: 1; }
#fToggle { display: none; white-space: nowrap; }
.filters { display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chip-btn { min-height: 30px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 500; background: var(--leaf-soft); color: var(--ink); border: 1px solid var(--rule); }
.chip-btn span { color: var(--muted); margin-left: 2px; }
.cond-details { margin-top: 10px; border-top: 1px solid var(--rule); }
.cond-details > summary { cursor: pointer; padding: 10px 0 4px; font-family: var(--f-display); font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.cond-details > summary .cond-sum { font-family: var(--f-body); font-weight: 400; font-size: .86rem; color: var(--ink); }
.cond-details > summary .cond-sum.unset { color: var(--ochre); }
.cond-details[open] > summary { margin-bottom: 8px; }
.sp-actions { align-items: center; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-body { position: absolute; z-index: 950; bottom: calc(100% + 6px); left: 0; min-width: 230px; display: grid; gap: 6px; padding: 10px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 8px 24px rgba(20, 26, 20, .18); }
.menu-body button, .menu-body .filebtn { width: 100%; justify-content: flex-start; text-align: left; }
.menu-body .filebtn { min-height: 38px; font-size: .9rem; padding: 8px 14px; }
.menu-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2px 0; width: 100%; }
@media (max-width: 760px) {
  #fToggle { display: inline-flex; }
  .filters:not(.open) { display: none; }
  .zone-panel legend .hint { display: none; }
  /* Species as cards instead of a wide table */
  .tablebox:has(.sp-table) { border: 0; overflow: visible; }
  .tablebox .sp-table, .tablebox .sp-table tbody { display: block; min-width: 0; width: 100%; }
  .sp-table thead { display: none; }
  .sp-table tbody, .sp-table tr.grp, .sp-table tr.grp th { display: block; }
  .sp-table tr.grp th { border-radius: 4px; margin-top: 10px; }
  .sp-table tr:not(.grp) { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 3px; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
  .sp-table td { border: 0; padding: 0; }
  .sp-table td:first-child { grid-row: 1 / span 2; padding-top: 2px; }
  .sp-table td:first-child input { width: 20px; height: 20px; }
  .sp-table td.taxon { grid-column: 2; }
  .sp-table td.c-fit { grid-column: 3; grid-row: 1; text-align: right; }
  .sp-table td.c-fit .fitwhy { display: none; }
  .sp-table td.c-fit .hint { display: none; }
  .sp-table td[data-label] { grid-column: 2 / -1; font-size: .82rem; }
  .sp-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
  .sp-table td[data-label]:empty, .sp-table td.c-lf { display: none; }
  .sp-table td.c-refs br, .sp-table td.c-refs .hint { display: none; }
  .sp-table td.empty { grid-column: 1 / -1; }
  .sp-table tr:has(td.empty) { display: block; }
  .menu-body { right: 0; left: auto; }
}
.sp-opts { gap: 6px 20px; }
label.check { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--ink); cursor: pointer; }
label.check input { width: 16px; height: 16px; margin: 0; flex: none; }
label.check:has(input:disabled) { color: var(--muted); cursor: default; }
button.small { min-height: 32px; padding: 4px 10px; font-size: .84rem; }
#benchMsg a { color: inherit; font-weight: 600; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { font-family: var(--f-mono); font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--paper); }
td.empty { color: var(--muted); padding: 14px 10px; }
td.code, .mono { font-family: var(--f-mono); font-size: .82rem; font-variant-numeric: tabular-nums; }
td.taxon { font-style: italic; min-width: 180px; }
tr.nonveg td { color: var(--muted); }
.variants { display: grid; gap: 4px; min-width: 220px; }
.variant { display: flex; gap: 6px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--ink); }
.variant input { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.borrow { display: block; margin-top: 6px; text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--ink-2, var(--ink)); }
.borrow select { margin-top: 4px; max-width: 100%; font-size: .85rem; }
td input[type=checkbox] { width: 18px; height: 18px; }

.chip { font-family: var(--f-mono); font-size: .72rem; padding: 2px 7px; border-radius: 3px; white-space: nowrap; display: inline-block; }
.chip.ext { background: var(--ochre-soft); color: var(--ochre); }
.chip.none { background: var(--catCbg); color: var(--catC); }
.chip.user { background: var(--leaf-soft); color: var(--leaf); }
.chip.weed { background: var(--catDbg); color: var(--catD); }
.band-site { background: var(--leaf-soft); color: var(--leaf); }

.bench-list { display: grid; gap: 8px; }
.bench { border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); }
.bench summary { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 9px 12px; cursor: pointer; }
.bench .code { font-family: var(--f-mono); font-size: .82rem; color: var(--muted); min-width: 4.5em; }
.bench .nm { font-weight: 600; flex: 1 1 200px; min-width: 0; }
.bench .body { padding: 4px 12px 12px; display: grid; gap: 8px; }
.bench ul { margin: 0; padding-left: 18px; columns: 2 240px; font-size: .88rem; }
.bench li { break-inside: avoid; }
.lf { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.loader { border: 1px dashed var(--rule); border-radius: 4px; }
.loader summary { padding: 9px 12px; cursor: pointer; font-weight: 600; color: var(--leaf); }
.loader-body { padding: 4px 12px 12px; display: grid; gap: 10px; }

.tallies { display: flex; flex-wrap: wrap; gap: 8px; }
.tally { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.tally b { font-family: var(--f-display); font-size: 1.4rem; }
.tally span { font-size: .82rem; }
.badge { font-family: var(--f-mono); font-weight: 500; font-size: .8rem; padding: 2px 8px; border-radius: 3px; display: inline-block; }
.cat-A { background: var(--catAbg); color: var(--catA); } .cat-B { background: var(--catBbg); color: var(--catB); }
.cat-C { background: var(--catCbg); color: var(--catC); } .cat-D { background: var(--catDbg); color: var(--catD); }
.defs { display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); font-size: .84rem; margin: 0; }
.defs div { display: flex; gap: 8px; align-items: flex-start; }
.defs dd { margin: 0; }

footer { color: var(--muted); font-size: .8rem; display: grid; gap: 4px; }
footer p { margin: 0; max-width: 100ch; }
.leaflet-container { font-family: var(--f-body); }
/* Reduced motion: see the Interaction section at the end (fades kept, movement dropped). */

/* Site conditions and traits (MTL) */
.site-cond { border: 1px solid var(--rule); border-radius: 4px; padding: 10px 12px 12px; margin: 0; min-width: 0; }
.site-cond legend { font-family: var(--f-display); font-weight: 600; padding: 0 6px; }
.site-cond legend .hint { font-family: var(--f-body); font-weight: 400; display: block; }
.cond-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.sp-table { min-width: 1180px; }
.sp-table .cond { font-size: .82rem; line-height: 1.35; }
.sp-table .cond span { white-space: nowrap; }
.sp-table .size { font-family: var(--f-mono); font-size: .8rem; white-space: nowrap; }

.fit { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 3px; padding: 1px 6px; }
.fit.good { background: var(--catAbg); color: var(--catA); }
.fit.marginal { background: var(--ochre-soft); color: var(--ochre); }
.fit.poor { background: var(--catCbg); color: var(--catC); text-decoration: line-through; }
.fit.unknown { background: var(--catCbg); color: var(--catC); }
.fitwhy { display: block; font-size: .75rem; color: var(--muted); }
.taxon .vf { font-size: .72rem; margin-left: 6px; }
/* EVC popup on the site map */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); }
.leaflet-popup-content { margin: 12px 14px; font-size: .88rem; line-height: 1.4; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.evc-popup .pop-evc { display: grid; gap: 3px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--rule); }
.evc-popup .pop-head b { font-family: var(--f-display); font-size: 1rem; }
.evc-popup .pop-evc button { justify-self: start; margin-top: 6px; min-height: 32px; padding: 5px 12px; font-size: .85rem; }
.evc-popup .pop-actions button { min-height: 32px; padding: 5px 12px; font-size: .85rem; }
.evc-popup .hint { font-size: .8rem; }
.about-link { color: #c9d0c4; text-decoration: none; font-weight: 600; font-size: .9rem; padding: 6px 10px; border-radius: 4px; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .about-link:hover { background: rgba(255,255,255,.06); color: #eef1ea; } }
.welcome { border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.welcome p { margin: 0; color: var(--muted); font-size: .9rem; }
.welcome .welcome-title { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); line-height: 1.25; margin-bottom: 4px; }
.intro { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; color: var(--leaf); max-width: 78ch; }
.welcome .country { margin-top: 8px; font-size: .85rem; color: var(--ink); display: flex; flex-wrap: wrap; gap: 2px 6px; }
.welcome .country span { font-weight: 600; }
.site-ack { font-size: .76rem; color: var(--muted); margin: 0; border-top: 1px solid var(--rule); padding-top: 10px; }
.ack { font-style: italic; }
.term { font-family: var(--f-body); font-weight: 500; font-size: .8em; color: var(--muted); }

/* Planting zones, palette builder and schedule */
.zonebar { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 -1px; }
.zonetab { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-bottom-color: transparent; border-radius: 4px 4px 0 0; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 12px; min-height: 0; font-weight: 600; }
.zonetab .lf { font-weight: 400; }
.zonetab[aria-selected="true"] { border-color: var(--leaf); border-bottom: 3px solid var(--leaf); background: var(--leaf-soft); }
.zonetab.add { color: var(--leaf); border-style: dashed; border-bottom-style: dashed; border-bottom-color: var(--rule); justify-content: center; }
.zone-panel { border-top-left-radius: 0; }
.zone-head { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 10px; }
.zone-head .grow { flex: 1 1 220px; }
.zone-head input[type=number] { width: 130px; }
.zone-evcs { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-bottom: 10px; font-size: .86rem; }
.zone-evcs .check { text-transform: none; letter-spacing: 0; font-size: .86rem; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.builder { border: 1px solid var(--rule); border-radius: 4px; background: var(--sheet); margin: 12px 0; }
.builder > summary { cursor: pointer; padding: 10px 12px; font-family: var(--f-display); font-weight: 600; }
.builder > summary .hint { font-family: var(--f-body); font-weight: 400; margin-left: 8px; }
.builder-body { padding: 0 12px 12px; }
.builder .inline { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--ink); }
input.narrow { width: 70px; }
.sel-settings #selArea { width: 128px; }
.vba-pagination { justify-content: space-between; align-items: center; padding-top: 10px; }
.vba-controls { align-items: end; }
.vba-controls > label:last-child { min-width: 115px; }
.vba-controls select { min-width: 100px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; margin-top: 10px; }
.stat { border: 1px solid var(--rule); border-radius: 4px; padding: 10px 12px; min-width: 0; }
.stat h4 { margin: 0 0 8px; font-family: var(--f-display); font-size: .95rem; }
.stat h4 .hint { font-family: var(--f-body); font-weight: 400; font-size: .76rem; display: block; }
.lbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 2px 10px; align-items: center; font-size: .82rem; margin-bottom: 6px; }
.lbar .lname { grid-row: span 2; }
.lbar .track { position: relative; height: 10px; background: var(--paper); border-radius: 2px; overflow: hidden; }
.lbar .want { position: absolute; inset: 0 auto 0 0; border: 1.5px solid var(--muted); border-radius: 2px; }
.lbar .have { position: absolute; inset: 2px auto 2px 0; background: var(--leaf); border-radius: 1px; }
.lbar .lnum { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.lbar.gap .lname, .lbar.low .lname { color: var(--ochre); font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.mcell { display: grid; place-items: center; padding: 4px 0; border-radius: 3px; font-size: .72rem; background: color-mix(in srgb, var(--leaf) calc(var(--v) * 85%), var(--paper)); color: var(--ink); }
.mcell b { font-weight: 600; }
.mcell i { font-style: normal; font-family: var(--f-mono); font-size: .68rem; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { font-size: .78rem; padding: 3px 8px; border-radius: 3px; background: var(--leaf-soft); color: var(--ink); }
.fchip b { font-family: var(--f-mono); margin-left: 4px; }
.fchip.zero { background: var(--ochre-soft); color: var(--ochre); }
.warnbox { border-color: var(--ochre); background: var(--ochre-soft); }
.warnbox ul { margin: 0; padding-left: 18px; font-size: .86rem; }
.density { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.dens span { display: flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; color: var(--ink); font-size: .85rem; }
.dens input { width: 80px; }
.dens .hint { font-size: .72rem; }
.sch-table { min-width: 760px; }
.sch-table .size { font-family: var(--f-mono); font-size: .8rem; white-space: nowrap; }
.project { border-top: 1px solid var(--rule); padding-top: 10px; margin-top: 6px; }
.filebtn { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; font-size: .84rem; font-weight: 600; border: 1px solid var(--leaf); color: var(--leaf); border-radius: 4px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.filebtn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filebtn:focus-within { outline: 2px solid var(--leaf); outline-offset: 2px; }
/* Region-specific wording: Victoria (EVCs) by default, NSW (PCTs) when body.nsw */
body:not(.nsw) .nsw-only, body.nsw .vic-only { display: none !important; }
.freq { color: var(--leaf); }
#spFreqWrap { align-items: center; gap: 6px 14px; }
#spFreqWrap label { flex: 0 1 auto; }
#spFreqWrap .hint { flex: 1 1 260px; }

/* Map at state scale: bioregion note and tooltips */
.zoom-note { position: static; max-width: 260px; margin: 0 10px 6px 0; line-height: 1.35; }
.bio-tip { font-family: var(--f-body); font-size: .8rem; }
.leaflet-tile-pane .basemap-grey { filter: grayscale(1) brightness(1.05) contrast(.85); }
.welcome .welcome-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; min-height: 0; padding: 0; background: none; border: 0; text-align: left; cursor: pointer; }
.welcome .welcome-title .chev { font-size: .75rem; color: var(--muted); transition: transform .15s; }
.welcome-min .welcome .welcome-title .chev { transform: rotate(-90deg); }
.welcome-min .welcome .welcome-body { display: none; }
.welcome-min .welcome .welcome-title { font-size: 1rem; margin-bottom: 0; }
.welcome-min .welcome .country { margin-top: 4px; }
.sp-guide { display: grid; gap: 6px; max-width: 78ch; }
.sp-guide .fn { text-decoration: none; color: var(--leaf); font-weight: 600; }
.sp-guide .fn-note { font-size: .78rem; }

/* ---------- Shared components (public/ui.js, docs/ui.md) ---------- */
.ic { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.15em; }
.tag, .ev, .str { display: inline-flex; align-items: center; gap: 5px; font-family: var(--f-body); font-size: .78rem; font-weight: 500; line-height: 1.25; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.t-good { --tone: var(--good); --tone-bg: var(--good-bg); }
.t-info { --tone: var(--info); --tone-bg: var(--info-bg); }
.t-neutral { --tone: var(--neutral); --tone-bg: var(--neutral-bg); }
.t-caution { --tone: var(--caution); --tone-bg: var(--caution-bg); }
.t-bad { --tone: var(--bad); --tone-bg: var(--bad-bg); }
.t-rare { --tone: var(--rare); --tone-bg: var(--rare-bg); }
.tag { color: var(--tone); background: var(--tone-bg); }
/* Evidence marks: found (solid), none found (dashed outline), not loaded (dotted, muted). */
.ev-yes { color: var(--good); background: var(--good-bg); }
.ev-none { color: var(--muted); background: transparent; border: 1px dashed var(--muted); padding: 1px 7px; }
.ev-unloaded { color: var(--muted); background: transparent; border: 1px dotted var(--rule); padding: 1px 7px; font-weight: 400; font-style: italic; }
/* Strength: three bars. */
.str { padding-left: 0; color: var(--ink); font-weight: 400; }
.str .bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.str .bars i { width: 4px; border-radius: 1px; background: var(--rule); }
.str .bars i:nth-child(1) { height: 5px; } .str .bars i:nth-child(2) { height: 8px; } .str .bars i:nth-child(3) { height: 12px; }
.str .bars i.on { background: var(--leaf); }
/* Summary strip. */
.summary { display: grid; gap: 8px; margin: 4px 0 12px; }
.sum-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
button.sum { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-height: 0; padding: 8px 12px; text-align: left; border-radius: 6px; border: 1px solid transparent; background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); cursor: pointer; font-weight: 400; }
@media (hover: hover) and (pointer: fine) { button.sum:hover { box-shadow: inset 0 0 0 1px var(--muted); background: var(--sheet); } }
button.sum[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--leaf); }
button.sum[class*=" t-"] .sum-v { color: var(--tone); }
.sum-v { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.sum-l { font-size: .8rem; color: var(--muted); }
.sum-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; }
.sum-bar i { background: var(--tone); min-width: 4px; }
/* Detail drawer under a table row. */
tr[data-drawer] { cursor: pointer; }
tr[data-drawer]:focus-visible { outline: 2px solid var(--leaf); outline-offset: -2px; }
tr.drawer > td { background: var(--paper); padding: 0; }
.drawer-body { padding: 12px 16px; display: grid; gap: 6px; font-size: .88rem; }
/* About this step: method and caveats, folded away. */
details.about-step { margin: 2px 0 6px; max-width: 78ch; }
details.about-step > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-size: .85rem; list-style: none; padding: 2px 0; }
details.about-step > summary::-webkit-details-marker { display: none; }
@media (hover: hover) and (pointer: fine) { details.about-step > summary:hover { color: var(--ink); } }
details.about-step > summary .chev-ic { transition: transform .15s ease; }
details.about-step[open] > summary .chev-ic { transform: rotate(180deg); }
details.about-step > .hint, details.about-step > p { margin: 6px 0 0; padding-left: 12px; border-left: 2px solid var(--rule); }
@media print { .ev-none, .ev-unloaded { border-color: #666; } .tag { border: 1px solid currentColor; } }
/* Header step status: a dot before each step's short status. Done (filled), needs attention (amber ring), not started (hollow). */
.steps .st { display: inline-flex; align-items: center; gap: 5px; }
.steps a[data-state] .st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px #7d877a; }
.steps a[data-state="done"] .st::before { background: #9cbf93; box-shadow: none; }
.steps a[data-state="warn"] .st::before { background: #e0a35a; box-shadow: 0 0 0 2px rgba(224,163,90,.3); }

/* ---------- Step 05: species list beside the palette builder (UI update phase 2) ---------- */
#page-species.page.step { max-width: 1360px; }
.zoneline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; border-bottom: 1px solid var(--rule); }
.zoneline .zonebar { margin: 0 0 -1px; }
button.linkchip { all: unset; cursor: pointer; display: inline-flex; }
button.linkchip:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; border-radius: 4px; }
@media (hover: hover) and (pointer: fine) { button.linkchip:hover .tag { box-shadow: inset 0 0 0 1px currentColor; } }
.zone-panel { border-radius: 4px; }
.sp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.sp-main { display: grid; gap: 10px; min-width: 0; }
.sel-panel { position: sticky; top: calc(var(--band-h, 76px) + var(--zrow-h, 0px) + 8px); display: grid; gap: 10px; padding: 14px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); max-height: calc(100vh - var(--band-h, 76px) - var(--zrow-h, 0px) - 24px); overflow-y: auto; }
.sel-panel h3 { margin: 0; font-family: var(--f-display); font-size: 1.05rem; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sel-count b { font-family: var(--f-display); font-size: 1.9rem; line-height: 1; margin-right: 4px; }
.sel-count { font-size: .9rem; color: var(--muted); }
.sel-plants { font-size: .9rem; margin-top: 2px; }
.sel-cons { margin: 0; padding: 10px 0 0; border: 0; border-top: 1px solid var(--rule); display: grid; gap: 8px; min-width: 0; }
.sel-cons legend { padding: 0; font-family: var(--f-display); font-size: .9rem; }
.sel-cons legend .hint { font-family: var(--f-body); font-weight: 400; font-size: .74rem; display: block; }
.cons-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cons-grid select { width: 100%; }
.sel-cons .check { font-size: .86rem; }
.sel-suggest { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.gen-check { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.gen-check li { display: inline-flex; align-items: center; gap: 5px; }
.gen-check .done { color: var(--good); }
.gen-check .todo .ic { color: var(--caution); }
.sel-suggest label.inline { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: .86rem; color: var(--muted); }
.sel-sec h4 { margin: 0 0 6px; font-family: var(--f-display); font-size: .9rem; }
.sel-sec h4 .hint { font-family: var(--f-body); font-weight: 400; font-size: .74rem; display: block; }
.sel-panel .lbar { grid-template-columns: 1fr 70px 22px; gap: 6px; margin-bottom: 4px; font-size: .78rem; }
.sel-panel .lbar .lname { grid-row: auto; }
.sel-panel .cal { gap: 2px; }
.sel-panel .mcell { padding: 2px 0; }
.sel-warn { display: flex; flex-wrap: wrap; gap: 6px; }
.sel-more > summary { cursor: pointer; font-family: var(--f-display); font-weight: 600; font-size: .9rem; }
.sel-more > summary .hint { font-family: var(--f-body); font-weight: 400; font-size: .76rem; display: block; }
.sel-more .stats { grid-template-columns: 1fr; }
.sp-find .menu > summary { min-height: 38px; padding: 6px 12px; font-size: 1.1rem; line-height: 1; }
.sp-find .menu-body { top: calc(100% + 6px); bottom: auto; right: 0; left: auto; }
.sp-table { min-width: 0; }
.sp-table td { vertical-align: middle; }
.sp-table tr.on td.taxon { font-weight: 600; }
.sp-table .lfline { display: block; font-size: .74rem; color: var(--muted); font-style: normal; font-weight: 400; }
.sp-table td.taxon { font-style: italic; }
.sp-table td.taxon .common, .sp-table td.taxon .lfline { font-style: normal; }
.sp-table td.c-sel { width: 34px; }
.sp-table td.c-sel input { width: 18px; height: 18px; }
.sp-table td.c-flags { white-space: normal; }
.sp-table td.c-flags .tag { margin: 1px 0; }
@media (hover: hover) and (pointer: fine) { .sp-table tr[data-drawer]:hover td { background: color-mix(in srgb, var(--leaf-soft) 45%, transparent); } }
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 8px 18px; margin: 0; }
.dl div { min-width: 0; }
.dl dt { font-family: var(--f-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dl dd { margin: 2px 0 0; font-size: .86rem; }
.sp-footer { position: sticky; bottom: 61px; z-index: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; margin: 0 -18px -22px; background: var(--sheet); border-top: 1px solid var(--rule); border-radius: 0 0 6px 6px; box-shadow: 0 -6px 16px rgba(20, 26, 20, .06); }
.sp-tot { font-weight: 600; font-size: .92rem; }
.sp-foot-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.sp-foot-actions .menu-body { right: 0; left: auto; }
.sp-footer .msg:empty { display: none; }
@media (max-width: 1000px) {
  .sp-layout { grid-template-columns: minmax(0, 1fr); }
  .sel-panel { position: static; max-height: none; order: -1; }
}
@media (max-width: 760px) {
  .sp-footer { margin: 0 -12px -22px; bottom: 57px; padding: 8px 12px; }
  .sp-tot { font-size: .84rem; }
  .sp-table tr[data-drawer] { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
  .sp-table tr[data-drawer] td { display: block; border: 0; padding: 0; }
  .sp-table tr[data-drawer] td.c-sel { flex: 0 0 26px; align-self: flex-start; }
  .sp-table tr[data-drawer] td.taxon { flex: 1 1 calc(100% - 150px); min-width: 0; }
  .sp-table tr[data-drawer] td.c-fit { flex: 0 0 auto; align-self: flex-start; }
  .sp-table tr[data-drawer] td.size { margin-left: 34px; font-size: .8rem; }
  .sp-table tr[data-drawer] td.size::before, .sp-table tr[data-drawer] td.c-qty::before { content: none; }
  .sp-table tr[data-drawer] td.c-qty:not(:empty)::after { content: " plants"; color: var(--muted); }
  .sp-table tr[data-drawer] td:empty { display: none; }
  .sp-table tr.drawer { display: block; }
  .sp-table tr.drawer[hidden] { display: none !important; }
  .sp-table tr.drawer > td { display: block; }
}
/* Filters fold behind "Filter and sort" at every width; the palette builder's detail folds on narrow screens. */
#fToggle { display: inline-flex; }
.filters:not(.open) { display: none; }
.sel-toggle { display: none; justify-self: start; }
@media (max-width: 1000px) {
  .sel-toggle { display: inline-flex; }
  .sel-panel:not(.open) #selBody, .sel-panel:not(.open) #builder { display: none; }
}
@media (max-width: 760px) {
  .sp-footer { flex-wrap: nowrap; gap: 8px; }
  .sp-tot { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sp-footer .msg { display: none; }
}

/* ---------- Step 06: Check a palette (UI update phase 2) ---------- */
.importer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; align-items: stretch; }
@media (max-width: 760px) { .importer { grid-template-columns: minmax(0, 1fr); } }
.dropzone { display: flex; gap: 12px; align-items: center; padding: 18px; border: 2px dashed var(--rule); border-radius: 8px; background: var(--paper); font-size: .92rem; }
.dropzone.over { border-color: var(--leaf); background: var(--leaf-soft); }
.dropzone .dz-ic { width: 32px; height: 32px; color: var(--leaf); }
.filebtn-inline { display: inline; text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--leaf); text-decoration: underline; cursor: pointer; }
.filebtn-inline input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filebtn-inline:focus-within { outline: 2px solid var(--ochre); outline-offset: 2px; }
.paste { display: grid; gap: 4px; }
.paste textarea { min-height: 120px; }
.import-cols { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .88rem; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); }
.import-cols label.inline { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--muted); }
.import-cols select { width: auto; padding: 4px 8px; }
.chk-split { margin: 4px 0; font-size: .95rem; }
.chk-split .t-bad { color: var(--bad); }
.chk-table tr.unrec .tag { margin-right: 6px; font-style: normal; }
.chk-table tr.unrec { cursor: pointer; }
.chk-table .unrec-why { color: var(--leaf); font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; }
.chk-table tr.unrec:hover .unrec-why { text-decoration-thickness: 2px; }
.chk-table .unrec-why .ic { vertical-align: -2px; }
.chk-table tr.unrec[aria-expanded="true"] .unrec-why .ic { transform: rotate(180deg); }
.unrec-pick { border: 0; margin: 0 0 8px; padding: 0; }
.unrec-pick legend { padding: 0; margin-bottom: 4px; font-size: .9rem; }
.unrec-pick ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.unrec-pick input { width: auto; flex: none; margin: 0; }
.unrec-pick i { white-space: nowrap; }
.unrec-pick label { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; align-items: baseline; font-size: .9rem; text-transform: none; letter-spacing: 0; color: var(--ink); cursor: pointer; padding: 3px 0; }
.chk-table .ways, .chk-table .blowin-ok { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .88rem; }
.chk-table .blowin-ok { border: 1px solid var(--caution-bg); border-radius: 6px; padding: 8px 10px; background: var(--paper); }
.chk-table .typed { display: block; color: var(--muted); }
.pending { color: var(--ink); }
button.linklike { all: unset; cursor: pointer; color: var(--leaf); text-decoration: underline; font-size: .86rem; }
button.linklike:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.chk-table { min-width: 0; }
.chk-table td { vertical-align: middle; }
.chk-table td.taxon { font-style: italic; }
.chk-table .matched { display: flex; align-items: center; gap: 4px; font-size: .84rem; color: var(--ink); }
.chk-table .matched .hint { font-style: normal; font-size: .74rem; }
.chk-table .common { font-style: normal; }
.alt-hint { display: block; font-size: .74rem; color: var(--leaf); margin-top: 3px; }
.alts { margin-top: 10px; border-top: 1px solid var(--rule); padding-top: 8px; }
.alts h4 { margin: 0 0 6px; font-family: var(--f-display); font-size: .92rem; }
.alts h4 .hint { font-family: var(--f-body); font-weight: 400; font-size: .76rem; margin-left: 6px; }
.alts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.alts li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.alts .why { font-size: .78rem; color: var(--muted); }
.verdict-key h3 { font-family: var(--f-display); font-size: 1rem; margin: 8px 0; }
.verdict-key dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 8px 18px; margin: 0; }
.verdict-key dl div { display: grid; gap: 3px; }
.verdict-key dd { margin: 0; font-size: .84rem; color: var(--muted); }
@media (max-width: 760px) {
  .tablebox:has(.chk-table) { border: 0; overflow: visible; }
  .chk-table, .chk-table tbody { display: block; }
  .chk-table thead { display: none; }
  .chk-table tr[data-drawer] { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
  .chk-table tr[data-drawer] td { display: block; border: 0; padding: 0; }
  .chk-table tr[data-drawer] td.taxon { flex: 1 1 100%; }
  .chk-table tr[data-drawer] td:empty { display: none; }
  .chk-table tr.drawer { display: block; }
  .chk-table tr.drawer[hidden] { display: none !important; }
  .chk-table tr.drawer > td { display: block; }
}

/* ---------- Steps 01–04 (UI update phase 3) ---------- */
.geo-form { display: flex; gap: 6px; }
.geo-form input { font-size: 1.02rem; padding: 11px 12px; border-width: 1.5px; border-color: var(--leaf); background: var(--sheet); }
.geo-form button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; }
.geo-form button .ic { width: 18px; height: 18px; }
.site-card { display: grid; gap: 6px; padding: 10px 12px; border-radius: 6px; background: var(--leaf-soft); }
.sc-head { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--leaf); font-weight: 600; }
.sc-evc { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: .92rem; }
.sc-evc b { font-family: var(--f-display); }
.radius-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rp-lbl { font-size: .82rem; color: var(--muted); flex-basis: 100%; }
button.rp { min-height: 32px; padding: 4px 12px; font-size: .84rem; background: transparent; color: var(--leaf); border-color: var(--rule); font-weight: 600; }
button.rp[aria-pressed="true"] { background: var(--leaf); color: var(--leaf-ink); border-color: var(--leaf); }
.more-opts > summary { cursor: pointer; font-size: .85rem; color: var(--muted); }
.more-opts .more-body { display: grid; gap: 10px; margin-top: 10px; }
.site-panel .find-row:has(#toEvcs[hidden]) { display: none; }
.site-panel .find-row .button { flex: 1; justify-content: center; }
@media (max-width: 760px) {
  .site-panel .geo-form, .site-panel .site-card, .site-panel .radius-presets { order: 2; }
  .geo-form .btn-lbl { display: none; }
}
.pop-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.pop-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.evc-table { min-width: 0; }
.evc-table tr.grp th { background: var(--leaf-soft); color: var(--leaf); font-family: var(--f-display); font-size: .9rem; text-transform: none; letter-spacing: 0; font-weight: 600; padding: 8px 10px; }
.evc-table td { vertical-align: middle; }
.evc-table td.c-sel { width: 34px; }
.evc-table td.c-sel input { width: 18px; height: 18px; }
.evc-table td.c-name b { font-family: var(--f-display); font-weight: 600; }
.evc-table td.c-name .mono { color: var(--muted); font-size: .76rem; margin-left: 4px; }
.evc-table td.c-status .tag { margin: 1px 0; }
.evc-table .variants { margin-top: 6px; }
.struct { display: inline-flex; width: 120px; height: 8px; border-radius: 4px; overflow: hidden; gap: 1px; vertical-align: middle; }
.struct i { background: color-mix(in srgb, var(--leaf) calc(var(--s) * 100%), var(--rule)); min-width: 3px; }
.bench > summary { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.bench > summary .nm { font-family: var(--f-display); font-weight: 600; }
.bench li .str { padding: 0 0 0 4px; font-size: .74rem; }
.vba-results { display: grid; gap: 10px; }
.vba-table { min-width: 0; }
.vba-table td { vertical-align: middle; }
.vba-table td.taxon { font-style: italic; }
.vba-table .common { font-style: normal; }
@media (max-width: 760px) {
  .evc-table thead, .vba-table thead { display: none; }
  .tablebox:has(.evc-table), .tablebox:has(.vba-table) { border: 0; overflow: visible; }
  .evc-table, .evc-table tbody, .vba-table, .vba-table tbody { display: block; }
  .evc-table tr:not(.grp), .vba-table tr { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
  .evc-table tr:not(.grp) td, .vba-table td { display: block; border: 0; padding: 0; }
  .evc-table td.c-name { flex: 1 1 calc(100% - 40px); }
  .evc-table td.c-status, .evc-table td:last-child { margin-left: 34px; }
  .evc-table tr.grp, .evc-table tr.grp th { display: block; }
  .vba-table td.taxon { flex: 1 1 100%; }
}
div.sum.static { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 6px; background: var(--paper); }
div.sum.static[class*=" t-"] .sum-v { color: var(--tone); }
.geo-form .btn-lbl { display: none; }
.geo-form button { padding: 8px 12px; }
@media (max-width: 760px) {
  .sum-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  button.sum, div.sum.static { padding: 6px 10px; }
  .sum-v { font-size: 1.1rem; }
  .sum-l { font-size: .74rem; }
  .chk-table tr[data-drawer] td { order: 2; }
  .chk-table tr[data-drawer] td.taxon { order: 0; }
  .chk-table tr[data-drawer] td:nth-child(4) { order: 1; flex: 1 1 100%; }
  .chk-table tr[data-drawer] td:nth-child(6):has(.hint), .chk-table tr[data-drawer] td.size:empty { display: none; }
}
/* Projects */
.projects-dlg { width: min(640px, calc(100vw - 24px)); max-height: min(80vh, 720px); padding: 18px 20px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); color: var(--ink); box-shadow: 0 16px 48px rgba(20, 26, 20, .3); }
.projects-dlg::backdrop { background: rgba(20, 26, 20, .45); }
.projects-dlg > * + * { margin-top: 10px; }
.pj-head { display: flex; align-items: center; justify-content: space-between; }
.pj-head h2 { font-family: var(--f-display); font-size: 1.3rem; margin: 0; }
.pj-list { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.pj-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 2px; border-bottom: 1px solid var(--rule); }
.pj-list li.current { background: var(--leaf-soft); padding-inline: 8px; }
.pj-info { display: grid; gap: 2px; min-width: 0; }
.pj-info b { font-family: var(--f-display); font-weight: 600; overflow-wrap: anywhere; }
.pj-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pj-confirm { font-size: .84rem; color: var(--ochre); font-weight: 600; }
button.danger { background: var(--ochre); border-color: var(--ochre); color: #fff; }
.projects-dlg .filebtn { min-height: 38px; font-size: .9rem; padding: 8px 14px; }

/* ---------- Projects up front (UI update review, 21 October) ---------- */
.sheet-bar, .sheet-restore { display: none; }
@media (max-width: 760px) {
  .site-panel .sheet-bar { order: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .site-panel .sheet-bar .sheet-handle { grid-column: 2; }
  .site-panel .sheet-min { grid-column: 3; justify-self: end; display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 2px 8px; font-size: .78rem; }
  .site-panel.min { max-height: none; padding-top: 0; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); gap: 0; overflow: hidden; }
  .site-panel.min > *:not(.sheet-restore) { display: none !important; }
  .site-panel.min .sheet-restore { order: 0; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 4px; background: none; border: 0; color: var(--ink); font-weight: 400; font-size: .9rem; text-align: left; }
  .sheet-restore .ic { transform: rotate(180deg); color: var(--leaf); width: 20px; height: 20px; }
  .mini-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
}

/* ---------- Step 07: Selection ---------- */
.sp-tools { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
#page-select.page.step { max-width: 1360px; }
.sel-settings { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-end; }
.sel-settings label.inline { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--muted); }
.sel-settings select { width: auto; }
.seg-group { display: grid; gap: 4px; }
.seg-lbl { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: var(--sheet); color: var(--ink); font-weight: 500; font-size: .85rem; min-height: 34px; padding: 6px 12px; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--leaf); color: var(--leaf-ink); }
.sel-view { width: fit-content; margin: 4px 0 14px; }
/* Review selections: the planting scorecard. */
.sel-review { display: grid; gap: 16px; }
.score-table { min-width: 0; }
.score-table th[scope="row"] { font-family: var(--f-body); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--ink); white-space: nowrap; }
.score-table td { vertical-align: top; }
.score-table .sv { display: inline-block; font-weight: 600; color: var(--tone, var(--ink)); }
.score-table .sv.t-neutral { color: var(--ink); }
.score-table td .hint { display: block; margin: 2px 0 0; font-size: .78rem; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.review-grid .sel-sec { border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px; background: var(--sheet); }
.review-grid h4 { margin: 0 0 8px; }
.rv-target { display: grid; grid-template-columns: minmax(0, 1fr) 13ch; gap: 8px 12px; align-items: end; margin: 8px 0; }
.review-grid .sel-warn { display: flex; flex-wrap: wrap; gap: 6px; }
.review-grid ul.plain { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; font-size: .88rem; }
.review-grid .lbar { grid-template-columns: minmax(110px, 34%) 1fr; }
.sel-warnings { display: flex; flex-wrap: wrap; gap: 6px; }
.sel-warnings:empty { display: none; }
.sel-table { min-width: 0; }
.sel-table td { vertical-align: middle; }
.sel-table tr.grp th { background: var(--leaf-soft); color: var(--leaf); text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: .86rem; font-weight: 400; padding: 8px 10px; }
.sel-table tr.grp .lh { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.sel-table tr.grp b { font-family: var(--f-display); font-size: .95rem; }
.sel-table tr.grp label { display: inline-flex; align-items: center; gap: 5px; text-transform: none; letter-spacing: 0; color: var(--ink); font-size: .82rem; }
.sel-table input, .sel-table select { padding: 4px 6px; font-size: .86rem; }
.sel-table input.code { width: 10.5ch; font-family: var(--f-mono); text-transform: uppercase; }
.sel-table input.code.bad { border-color: var(--bad); }
.sel-table input.num { width: 7ch; text-align: right; }
.sel-table input.qty { width: 8ch; text-align: right; }
.sel-table input.qty.edited { border-color: var(--caution); background: var(--caution-bg); }
.sel-table select.size { width: auto; }
.sel-table td.taxon { font-style: italic; }
.sel-table td.taxon .common { font-style: normal; }
.sel-table .hc { display: flex; gap: 4px; margin-top: 4px; }
.sel-table .hc input { width: 7ch; }
.sel-table .reset { all: unset; cursor: pointer; color: var(--leaf); font-size: .74rem; text-decoration: underline; margin-left: 4px; }
@media (max-width: 760px) {
  .tablebox:has(.sel-table) { border: 0; overflow: visible; }
  .sel-table, .sel-table tbody { display: block; }
  .sel-table thead { display: none; }
  .sel-table tr.grp, .sel-table tr.grp th { display: block; }
  .sel-table tr:not(.grp) { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
  .sel-table tr:not(.grp) td { display: block; border: 0; padding: 0; }
  .sel-table td.taxon { flex: 1 1 calc(100% - 100px); order: -1; }
  .sel-table td:first-child { order: -2; }
}
.import-cols details.sections > summary { cursor: pointer; color: var(--leaf); font-size: .84rem; }
.import-cols details.sections ul { margin: 6px 0 0; padding-left: 18px; font-size: .84rem; columns: 2 260px; }
.import-dlg .im-options { display: grid; gap: 12px; margin-top: 10px; }
.import-dlg .im-opt { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--rule); border-radius: 6px; }
.import-dlg .im-opt button { justify-self: start; }
.sel-part { margin: 0 0 18px; border: 1px solid var(--rule); border-radius: 8px; padding: 0 14px; background: var(--sheet); }
.sel-part > summary, .zone-mix > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 0; list-style: none; }
.sel-part > summary::-webkit-details-marker, .zone-mix > summary::-webkit-details-marker { display: none; }
.sel-part > summary::before, .zone-mix > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--leaf); border-bottom: 2px solid var(--leaf); transform: rotate(-45deg); transition: transform 160ms ease-out; align-self: center; margin-right: 2px; }
.sel-part[open] > summary::before, .zone-mix[open] > summary::before { transform: rotate(45deg); }
.sel-part > summary h3 { font-family: var(--f-display); font-size: 1.15rem; margin: 0; }
.sel-sum { color: var(--muted); font-size: .86rem; }
.zones-head { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 22px 0 10px; }
.zones-head h3 { font-family: var(--f-display); font-size: 1.15rem; margin: 0 auto 0 0; }
.zone-mix { border: 1px solid var(--rule); border-radius: 8px; padding: 0 14px; margin: 0 0 10px; background: var(--sheet); }
.zone-mix > summary .zname { font-family: var(--f-display); font-size: 1.05rem; font-weight: 600; }
.zone-body { padding: 0 0 14px; }
.zone-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; padding: 4px 0 10px; border-top: 1px solid var(--rule); padding-top: 12px; }
.zone-tools label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); }
.zone-tools .tgt { display: flex; gap: 6px; }
.sel-table input.big, .zone-tools input.big { -moz-appearance: textfield; appearance: textfield; }
.sel-table input.big::-webkit-inner-spin-button, .sel-table input.big::-webkit-outer-spin-button,
.zone-tools input.big::-webkit-inner-spin-button, .zone-tools input.big::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.zone-tools .seg-group { display: flex; flex-direction: column; gap: 4px; }
.zone-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.zone-note { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--leaf); background: var(--leaf-soft); font-size: .88rem; border-radius: 0 6px 6px 0; }
.zone-note p { margin: 0 0 4px; }
.zone-check { margin: 4px 0 10px; font-size: .9rem; line-height: 1.9; }
.sel-table input.big { width: 9ch; font-size: 1rem; padding: 7px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.zone-tools input.big { width: 11ch; }
.sel-table .fld { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sel-table input.edited { border-color: var(--caution); background: var(--caution-bg); }
.st-table td.taxon .st-form, .zone-table td.taxon .st-form { display: block; font-style: normal; font-size: .78rem; }
.st-table td.st-zones { font-size: .82rem; color: var(--muted); }
.sel-table button.move { font-size: .78rem; white-space: nowrap; }
.sel-table .dcell { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; }
#btnCheckList { margin-top: 4px; }
@keyframes flash-in { from { background: var(--leaf-soft); } to { background: transparent; } }
.flash { animation: flash-in 600ms ease-out; border-radius: 4px; }
#chkSummary, #runMsg { scroll-margin-top: 80px; }

/* Zone chips under a plant's name in the palette list */
.zchips { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; font-style: normal; max-width: 100%; } /* inline-flex keeps the off-row strike-through off the chips */
.taxon .zchip { font: 500 .72rem/1.3 var(--f-body); font-style: normal; text-transform: none; letter-spacing: 0; min-height: 0; height: auto; padding: 1px 8px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; list-style: none; box-shadow: none; white-space: nowrap; }
.taxon .zchip::-webkit-details-marker { display: none; }
@media (hover: hover) and (pointer: fine) { .taxon .zchip:hover { border-color: var(--ink); } }
.taxon .zchip.add { color: var(--muted); border-style: dashed; }
.zadd { position: relative; display: inline-block; }
.zadd .menu-body { top: calc(100% + 4px); bottom: auto; min-width: 220px; gap: 4px; padding: 6px; }
.zadd .menu-body button { font: 400 .84rem/1.3 var(--f-body); font-style: normal; min-height: 0; padding: 6px 8px; white-space: nowrap; }

/* ---------- Header: the project chip and the step bar ----------
   Desktop and tablet: two slim rows (name, project, About; then the seven steps across the
   full width). Phones: one row with the leaf mark, the project chip and the step chip. */
.projects-btn { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 360px; min-height: 34px; padding: 5px 10px 5px 9px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); border-radius: 6px; color: #eef1ea; font-size: .88rem; font-weight: 600; }
.projects-btn .ic { width: 16px; height: 16px; color: #9cbf93; flex: none; }
.projects-btn .pj-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.projects-btn .pj-state { flex: none; font-size: .72rem; font-weight: 500; color: #9fa89b; padding-left: 7px; border-left: 1px solid rgba(255,255,255,.18); }
.projects-btn .pj-state.warn { color: #e0a35a; }
.projects-btn .chev { flex: none; font-size: .7rem; color: #c9d0c4; }
@media (min-width: 1101px) {
  .bar { display: grid; grid-template-columns: auto minmax(0, auto) 1fr auto; column-gap: 16px; row-gap: 2px; padding-block: 8px 0; }
  .brand { grid-column: 1; grid-row: 1; }
  .projects-btn { grid-column: 2; grid-row: 1; justify-self: start; }
  .about-link { grid-column: 4; grid-row: 1; }
  .steps { grid-column: 1 / -1; grid-row: 2; margin-inline: -6px; padding-bottom: 6px; }
}
@media (max-width: 760px) {
  .bar { gap: 8px; }
  .brand .brand-text { display: none; }
  .about-link { display: none; }
  .brand { padding: 6px 2px; }
  .projects-btn { flex: 1 1 auto; max-width: none; min-height: 36px; }
  .projects-btn .pj-state { display: none; }
  .step-toggle { margin-left: 0; flex: 0 1 auto; max-width: 46%; }
  .projects-dlg { padding: 14px; }
}

/* The project line: compact at the top of the Site panel; on Check a palette and by the Selection export. */
.proj-head { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.proj-head > .ic { width: 18px; height: 18px; color: var(--leaf); flex: none; }
input.ph-name { flex: 1 1 140px; min-width: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; padding: 3px 6px; margin-left: -4px; border: 1px solid transparent; background: transparent; }
@media (hover: hover) and (pointer: fine) { input.ph-name:hover { border-color: var(--rule); } }
input.ph-name:focus { border-color: var(--leaf); background: var(--paper); }
.proj-head .ph-edit { width: 15px; height: 15px; color: var(--muted); margin-left: -30px; pointer-events: none; }
input.ph-name:focus + .ph-edit { visibility: hidden; }
.proj-head .linklike { font-size: .88rem; }
.ph-nudge { margin: -4px 0 0; color: var(--leaf); font-size: .84rem; }
.proj-line { margin: -6px 0 -4px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; font-size: .88rem; color: var(--muted); }
.proj-line b { font-family: var(--f-display); color: var(--ink); }
.proj-line.export-line { margin: 4px 0 -4px; }
.paste-note { margin: 0; padding: 8px 12px; border-radius: 4px; background: var(--leaf-soft); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.linklike.muted { color: var(--muted); }

/* Phones: the project line, then search and radius sit with the map; results and the welcome follow. */
@media (max-width: 760px) {
  .site-panel .proj-head, .site-panel .ph-nudge { order: 1; }
  .site-panel .proj-head { padding-bottom: 8px; }
  .site-panel #geoForm, .site-panel .geo-results, .site-panel .radius-ctl, .site-panel #evcMsg, .site-panel .find-row { order: 2; }
  .site-panel .site-card { order: 3; }
  .site-panel .welcome { order: 4; }
  .site-panel > .more-opts, .site-panel > .about-step, .site-panel > .site-ack { order: 5; }
  input.ph-name { font-size: 1rem; }
}

/* Tablets and phones: the steps open from the step chip. */
@media (max-width: 1100px) {
  .bar { flex-wrap: nowrap; gap: 10px; padding-block: 8px; }
  .brand { font-size: 1rem; gap: 7px; }
  .step-toggle { display: flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; min-height: 36px; padding: 6px 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff; font-size: .86rem; }
  .step-toggle .no { font-family: var(--f-mono); font-size: .72rem; color: #9cbf93; font-weight: 500; }
  .step-toggle .st-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .step-toggle .chev { font-size: .7rem; color: #c9d0c4; transition: transform .15s; }
  .band.nav-open .step-toggle .chev { transform: rotate(180deg); }
  .steps { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--basalt); padding: 4px 10px 12px; box-shadow: 0 10px 24px rgba(0,0,0,.3); overflow: visible; }
  .band.nav-open .steps { display: block; }
  .steps ol { flex-direction: column; gap: 2px; }
  .steps a { grid-template-columns: 28px 1fr auto; padding: 10px; border-bottom: 0; border-left: 2px solid transparent; }
  .steps a[aria-current="step"] { border-left-color: #9cbf93; }
  .steps .st { grid-column: 3; grid-row: 1; justify-self: end; }
  .nav-about { display: block; border-top: 1px solid rgba(255,255,255,.12); margin-top: 4px; padding-top: 4px; }
  .step-toggle { margin-left: auto; }
  .projects-btn { max-width: 40%; }
}
@media (min-width: 761px) and (max-width: 1100px) { .nav-about { display: none; } }
@media (max-width: 760px) { .projects-btn { max-width: none; } .step-toggle { margin-left: 0; } }
/* The project name field fits its text, so the pencil sits right after the name. */
.proj-head input.ph-name { flex: 0 1 auto; width: auto; min-width: 0; }
.proj-head .ph-edit { margin-left: -4px; }
.proj-head [data-open-projects] { margin-left: auto; }

/* ---------- Calmer labels, lighter bands (review, October 2026) ----------
   Labels and table headers in sentence case at a readable size; the monospace face is kept
   for codes and figures. Group rows in tables are a bold label on the page tone, not a band. */
label, .seg-lbl { text-transform: none; letter-spacing: 0; font-size: .82rem; }
th { font-family: var(--f-body); text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 500; }
.dl dt { font-family: var(--f-body); text-transform: none; letter-spacing: 0; font-size: .78rem; }
.steps .st { font-family: var(--f-body); font-size: .72rem; }
.evc-table tr.grp th, .sp-table tr.grp th { background: var(--paper); color: var(--ink); }
.sel-table tr.grp th { background: var(--paper); }
.sel-table tr.grp b { color: var(--ink); }
@media (max-width: 760px) {
  .sp-table td[data-label]::before { text-transform: none; letter-spacing: 0; font-size: .76rem; }
  .site-panel { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  /* Headings wrap as a sentence; the state's term follows on the same line or the next. */
  .step h2 { display: block; }
  .step h2 .no { margin-right: 8px; }
  /* Three summary figures sit in one row; an odd last tile takes the full width. */
  .sum-cells:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sum-cells:has(> :nth-child(5):last-child) > :last-child { grid-column: 1 / -1; }
  /* Segmented controls wrap instead of running off the screen. */
  .seg { display: flex; flex-wrap: wrap; }
  .seg button { flex: 1 1 auto; }
}

/* ---------- Interaction (review, October 2026) ----------
   Presses answer at once; menus and windows open quickly from where they belong; nothing on the
   page performs an entrance. Reduced motion keeps the fades and drops the movement. */
:root { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); }
button, .button, .filebtn, .menu > summary { transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
button:not(:disabled):active, .button:active, .filebtn:active, .menu > summary:active { transform: scale(0.97); }
button.linklike:active, .seg button:active, .sheet-handle:active { transform: none; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.97); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes fade-in { from { opacity: 0; } }
.menu[open] > .menu-body { animation: pop-in 160ms var(--ease-out); transform-origin: bottom left; }
.sp-find .menu[open] > .menu-body, .sp-find .menu-body { transform-origin: top right; }
.sp-foot-actions .menu-body { transform-origin: bottom right; }
.zadd .menu-body { transform-origin: top left; }
.band.nav-open .steps { animation: drop-in 160ms var(--ease-out); }
dialog[open] { animation: pop-in 200ms var(--ease-out); }
dialog[open]::backdrop { animation: fade-in 200ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  button:not(:disabled):active, .button:active, .filebtn:active, .menu > summary:active { transform: none; }
  .menu[open] > .menu-body, dialog[open], .band.nav-open .steps { animation: fade-in 120ms ease-out; }
  .welcome .welcome-title .chev, details.about-step > summary .chev-ic, .step-toggle .chev { transition: none; }
}

/* ---------- Two ways in: start window and list-first route ---------- */
.start-dlg { width: min(560px, calc(100vw - 24px)); }
.start-dlg label { display: grid; gap: 4px; }
.start-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.start-opt { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: start; text-align: left; padding: 14px; min-height: 0; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; font-weight: 400; }
.start-opt .ic { grid-row: 1 / span 2; width: 22px; height: 22px; color: var(--leaf); margin-top: 2px; }
.start-opt b { font-family: var(--f-display); font-size: 1.05rem; font-weight: 600; }
.start-opt .hint { font-size: .84rem; color: var(--muted); line-height: 1.4; }
@media (hover: hover) and (pointer: fine) { .start-opt:hover { border-color: var(--leaf); background: var(--leaf-soft); } }
.start-opt:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
#stOpen { font-size: .88rem; color: var(--muted); }
@media (max-width: 520px) { .start-opts { grid-template-columns: 1fr; } }

/* The four stages in the step bar. Palette builder holds Explore, BYO List and the planting palette. */
.steps .nav-hidden { display: none; }
.nav-stage { display: flex; align-items: stretch; margin-inline: 4px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.14); border-right: 1px solid rgba(255,255,255,.14); }
.nav-stage .stage-head { display: inline-flex; align-items: center; gap: 6px; padding-right: 4px; white-space: nowrap; color: #9fa89b; }
.nav-stage .stage-head .lbl { font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.nav-subs { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav-subs .no { display: none; }
@media (max-width: 1100px) {
  .nav-stage { display: block; margin: 0; padding: 0; border: 0; }
  .nav-stage .stage-head { display: grid; grid-template-columns: 28px 1fr; padding: 10px 10px 4px; }
  .nav-stage .stage-head .lbl { font-size: .9rem; color: #c9d0c4; letter-spacing: 0; }
  .nav-subs { flex-direction: column; }
  .nav-subs a { padding-left: 38px; }
}

/* Explore's tabs: the overview and its three pages */
.ex-tabs { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: -4px 0 18px; border-bottom: 1px solid var(--rule); }
.ex-tabs a { padding: 8px 10px; margin-bottom: -1px; color: var(--muted); text-decoration: none; font-size: .88rem; border-bottom: 2px solid transparent; }
@media (hover: hover) and (pointer: fine) { .ex-tabs a:hover { color: var(--ink); } }
.ex-tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--leaf); }
.start-opt > span { display: grid; gap: 3px; }
.start-opt .ic { grid-row: auto; }
#checkSite:not([hidden]) { display: block; }


/* ---------- Layout refinements (Taste review, adopted October 2026) ----------
   Larger step headings, calmer panels with more breathing room, sentence-case labels,
   lighter table framing and one summary strip. They come last so they refine the rules above. */

/* Keep the familiar navigation; remove competing secondary labels only
   at desktop width, leaving status dots and accessible text in place. */
@media (min-width: 761px) {
  .bar { gap: 6px 12px; }
  .brand { font-size: 1.05rem; }
  .steps a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 8px 10px; border-radius: 0;
  }
  .steps .lbl { font-weight: 500; font-size: .86rem; }
  .steps .no { font-size: .66rem; }
  .steps .st {
    grid-column: auto; font-size: 0; line-height: 0;
    min-height: 0; margin-left: 1px;
  }
  .steps a[aria-current="step"] {
    background: transparent; border-bottom-color: #b3c9a8; color: #fff;
  }
  .steps a[aria-current="step"] .lbl { font-weight: 700; }
}

/* A working field sheet, not a dashboard of nested panels. */
.page.step {
  border-color: transparent; border-radius: 2px;
  padding: 24px max(20px, env(safe-area-inset-right, 0px)) 26px
           max(20px, env(safe-area-inset-left, 0px));
}
.step h2 {
  font-size: clamp(1.5rem, 1.25rem + .6vw, 1.82rem);
  line-height: 1.2; letter-spacing: -.025em;
}
.step h2 .no,
.proj-line .pl-lbl { color: var(--muted); }
.proj-line {
  border-bottom: 1px solid var(--rule); padding-bottom: 10px;
  margin-bottom: 2px;
}
.proj-line .pl-lbl {
  font-family: var(--f-body); font-size: .76rem;
  text-transform: none; letter-spacing: 0;
}
.intro {
  font-family: var(--f-body); font-size: .96rem;
  font-weight: 400; line-height: 1.55;
  color: var(--muted); max-width: 76ch;
}

/* Readable inputs with unforced, sentence-case labels. */
.page.step label:not(.check):not(.inline):not(.filebtn) {
  text-transform: none; letter-spacing: 0;
  font-weight: 600; font-size: .79rem;
}
.seg-lbl {
  text-transform: none; letter-spacing: 0;
  font-weight: 600; font-size: .79rem;
}
button.ghost,
.button.ghost {
  color: var(--ink); border-color: var(--rule);
}
button.ghost:hover,
.button.ghost:hover {
  color: var(--leaf); border-color: var(--leaf);
}

/* Tabular data remains tabular: no thumbnails or per-row cards. */
.tablebox {
  border: 0; border-top: 1px solid var(--rule); border-radius: 0;
}
th {
  background: transparent; font-family: var(--f-body);
  text-transform: none; letter-spacing: 0; font-weight: 600;
  font-size: .78rem; color: var(--muted);
}
td.code,
td.size,
.sel-table input.qty {
  font-variant-numeric: tabular-nums;
}
.sp-table tr.on td.taxon,
.sel-table td.taxon {
  font-weight: 600;
}
.sel-table tr.grp th,
.sp-table tr.grp th,
.evc-table tr.grp th {
  background: var(--paper); color: var(--ink);
  border-left: 3px solid var(--leaf);
}

/* Figures should read as one summary, not a row of unrelated cards.
   Preserve pressed states because summary figures are interactive filters. */
.sum-cells {
  gap: 0; border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
button.sum,
div.sum.static {
  background: transparent; border: 0; border-radius: 0;
  box-shadow: none; border-right: 1px solid var(--rule);
  padding: 10px 13px;
}
button.sum:last-child,
div.sum.static:last-child { border-right: 0; }
button.sum:hover {
  background: var(--paper); box-shadow: none;
}
button.sum[aria-pressed="true"] {
  background: var(--leaf-soft);
  box-shadow: inset 0 -3px var(--leaf);
}
.sum-v {
  font-size: 1.4rem; font-weight: 700; letter-spacing: -.025em;
}
.sum-l { font-size: .78rem; line-height: 1.35; }

/* Existing responsive layouts and mobile cards stay functional. */
@media (max-width: 760px) {
  .page.step {
    padding: 18px max(12px, env(safe-area-inset-right, 0px)) 22px
             max(12px, env(safe-area-inset-left, 0px));
  }
  .step h2 { font-size: 1.42rem; }
  .sum-cells { border: 0; gap: 6px; }
  button.sum,
  div.sum.static {
    border: 1px solid var(--rule); padding: 8px 10px;
  }
  .tablebox:has(.sp-table),
  .tablebox:has(.sel-table),
  .tablebox:has(.evc-table),
  .tablebox:has(.vba-table) { border: 0; }
}
.mosaic-parts { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 6px; }
.mosaic-parts .hint { flex-basis: 100%; }

/* ---------- Selection Scorecard (step 08) ---------- */
.sc-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 14px; }
.sc-exports { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.sc-sheet { background: var(--paper); }
.sc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; align-items: baseline; margin: 0 0 12px; }
.sc-head h3 { font-family: var(--f-display); font-size: 1.35rem; margin: 0; }
.sc-head p { margin: 2px 0 0; }
.sc-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; margin: 0 0 14px; }
.sc-hero > div { background: var(--sheet); padding: 12px 14px; display: grid; gap: 2px; }
.sc-hero b { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.1; color: var(--tone, var(--ink)); }
.sc-hero .t-neutral b { color: var(--ink); }
.sc-hero span { font-size: .8rem; color: var(--muted); }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); grid-auto-flow: dense; gap: 12px; align-items: stretch; }
.sc-card { min-width: 0; max-width: 100%; overflow: hidden; background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--tone, var(--rule)); border-radius: 10px; }
.sc-card.t-neutral { border-top-color: var(--rule); }
.sc-card[open] { grid-column: 1 / -1; }
.sc-card > summary { list-style: none; cursor: pointer; display: grid; gap: 4px; padding: 14px 16px; position: relative; }
.sc-card > summary::-webkit-details-marker { display: none; }
.sc-card > summary:hover .sc-more { text-decoration-thickness: 2px; }
.sc-card > summary:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; border-radius: 10px; }
.sc-label { font-size: .8rem; color: var(--muted); padding-right: 52px; }
.sc-value { font-family: var(--f-display); font-size: 1.55rem; font-weight: 600; line-height: 1.15; color: var(--tone, var(--ink)); }
.sc-value small { font-size: .78rem; font-weight: 400; color: var(--muted); }
.sc-card.t-neutral .sc-value { color: var(--ink); }
.sc-face { display: block; margin: 4px 0 2px; }
.sc-face .scc { max-height: 160px; }
.sc-card[data-card="flowering"] .sc-face .scc { max-width: 150px; margin: 0 auto; }
.sc-card[data-card="structure"] .sc-face .scc { max-width: 240px; margin: 0 auto; }
.sc-card[open] .sc-face { display: none; }
.sc-verdict { font-size: .8rem; color: var(--muted); }
.sc-more { position: absolute; top: 14px; right: 16px; font-size: .74rem; color: var(--leaf); text-decoration: underline; }
.sc-card[open] .sc-more { visibility: hidden; }
.sc-body { padding: 4px 16px 16px; border-top: 1px solid var(--rule); }
.sc-body h5 { margin: 12px 0 6px; font-size: .86rem; font-weight: 600; }
.sc-body > .hint:first-child { margin-top: 10px; }
.sc-split { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 10px; }
.sc-split.ring { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
.sc-split > div > .scc { max-width: 360px; }
.sc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 0 24px; }
.sc-group { margin: 12px 0 0; }
.sc-group h5 { margin: 0 0 4px; font-size: .86rem; font-weight: 600; }
.sc-group.over h5 { color: var(--caution); }
.sc-plants { list-style: none; margin: 0; padding: 0; }
.sc-plants li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dotted var(--rule); font-size: .85rem; }
.sc-plants .nm .hint { display: block; font-size: .74rem; margin: 0; }
.sc-plants .q { font-family: var(--f-mono); font-size: .8rem; white-space: nowrap; }
.sc-target { margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); }
.sc-target h4 { margin: 0 0 4px; font-family: var(--f-display); }
/* Charts (scorecharts.js): theme colours by class, so they follow light and dark mode. */
.scc { display: block; overflow: visible; }
.f-leaf { fill: var(--leaf); } .f-leaf2 { fill: var(--leaf-2); } .f-soft { fill: var(--leaf-soft); }
.f-rule { fill: var(--rule); } .f-rule2 { fill: var(--rule-2); } .f-paper { fill: var(--paper); }
.f-caution { fill: var(--caution); } .f-ochre { fill: var(--ochre); } .f-good { fill: var(--good); } .f-info { fill: var(--info); } .f-neutral { fill: var(--neutral); } .f-neutral2 { fill: color-mix(in srgb, var(--neutral) 50%, var(--paper)); } .f-bad { fill: var(--bad); }
.s-ink { stroke: var(--ink); } .s-rule { stroke: var(--rule); } .s-muted { stroke: var(--muted); } .s-caution { stroke: var(--caution); }
.t-muted { fill: var(--muted); } .t-ink { fill: var(--ink); } .t-onleaf { fill: var(--sheet); }
.f-crown { fill: #4f6b4a; } .f-crown2 { fill: #6f8f5f; } .f-shrub { fill: #8aa86f; } .s-trunk { stroke: #6b5a43; } .s-grass { stroke: #a7b56b; } .s-shrub { stroke: #7a9a5d; }
.scc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--muted); margin: 6px 0 0; }
.scc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.origin-key { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.origin-bar { display: grid; grid-template-columns: 6.5em 1fr; white-space: nowrap; gap: 8px; align-items: center; font-size: .78rem; }
.scc-legend i.f-leaf { background: var(--leaf); } .scc-legend i.f-leaf2 { background: var(--leaf-2); }
.scc-legend i.f-caution { background: var(--caution); } .scc-legend i.f-rule2 { background: var(--rule-2); }
.scc-legend i.f-good { background: var(--good); } .scc-legend i.f-info { background: var(--info); } .scc-legend i.f-neutral { background: var(--neutral); } .scc-legend i.f-neutral2 { background: color-mix(in srgb, var(--neutral) 50%, var(--paper)); } .scc-legend i.f-bad { background: var(--bad); }
.scc-legend b { color: var(--ink); font-weight: 600; }
.scc-rows { display: grid; gap: 6px; }
.scc-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .8rem; }
.scc-row .num { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); white-space: nowrap; }
.sc-face .scc-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
.scc-wl { display: grid; grid-template-columns: 22px 78px minmax(0, 1fr) 40px; gap: 8px; align-items: center; font-size: .8rem; margin: 4px 0; }
.scc-wl b { font-family: var(--f-mono); font-size: .78rem; text-align: right; }
.scc-ic { color: var(--leaf); }
.scc-pheno { overflow-x: auto; position: relative; max-width: 100%; }
.scc-pheno table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .78rem; }
.scc-pheno thead th { font-weight: 600; text-align: center; color: var(--muted); padding: 0 0 4px; font-size: .74rem; }
.scc-pheno thead th span { display: block; font-family: var(--f-mono); font-weight: 400; font-size: .68rem; }
.scc-pheno tbody th { text-align: left; font-weight: 400; white-space: nowrap; padding: 1px 10px 1px 0; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.scc-pheno tbody th span { font-family: var(--f-mono); font-size: .7rem; color: var(--muted); }
.scc-pheno td { width: 6.2%; padding: 1.5px 0; }
.scc-pheno td b { display: block; box-sizing: border-box; height: 11px; margin: 0 1px; }
.scc-pheno td b.s { border-radius: 6px 0 0 6px; margin-left: 2px; } .scc-pheno td b.e { border-radius: 0 6px 6px 0; margin-right: 2px; } .scc-pheno td b.s.e { border-radius: 6px; }
@media (max-width: 760px) {
  .sc-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-split, .sc-split.ring { grid-template-columns: minmax(0, 1fr); }
  .sc-body .scc-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .sc-body .scc-row .scc { grid-column: 1 / -1; grid-row: 2; }
}
/* The download copy: light colours and a fixed width, whatever the screen. */
.sc-export { position: fixed; left: -10000px; top: 0; width: 1120px; padding: 28px; background: #ffffff;
  --basalt: #2b2f2c; --paper: #ffffff; --sheet: #ffffff; --ink: #1f2420; --muted: #5f685f; --rule: #d9ddd3; --leaf: #4f6b4a; --leaf-ink: #ffffff; --leaf-soft: #e3eadf; --ochre: #a8661c; --leaf-2: #93a88e; --rule-2: #c3c8bd;
  --good: #2f6b3a; --good-bg: #dcebd9; --info: #2b5c7a; --info-bg: #d8e7f0; --neutral: #55554f; --neutral-bg: #e8e8e5; --caution: #8a4f12; --caution-bg: #f3e2cc; --bad: #9b2c22; --bad-bg: #f6dcd7;
  color: var(--ink); color-scheme: light; }
.sc-export .sc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sc-export .sc-summary { display: grid; gap: 4px; padding: 14px 16px; }
.sc-export .sc-card.is-open { grid-column: 1 / -1; }
.sc-export .sc-card.is-open .sc-face { display: none; }
.sc-export .scc-pheno table { min-width: 0; }
@media print {
  #top, #pager, #footer, .sc-bar, .about-step, .sc-target { display: none !important; }
  .sc-card { break-inside: avoid; }
}

/* Sample 10 × 10 m plot in a zone (Selection) */
.zone-plot { margin: 0 0 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); }
.zone-plot > summary { cursor: pointer; padding: 8px 12px; font-size: .88rem; font-weight: 600; color: var(--leaf); }
.zp-body { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 18px; padding: 4px 12px 12px; align-items: start; }
.zp-side p { margin: 0 0 8px; font-size: .86rem; }
.zp-side .ghost { margin: 10px 0 8px; }
@media (max-width: 760px) { .zp-body { grid-template-columns: minmax(0, 1fr); } }

/* Review (step 02) */
.rv-attn { border: 1px solid var(--caution); background: var(--caution-bg); border-radius: 8px; padding: 10px 14px; }
.rv-attn h3 { margin: 0 0 6px; font-family: var(--f-display); font-size: 1rem; }
.rv-attn li { margin: 4px 0; }
.rv-cards { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 760px) { .rv-cards { grid-template-columns: minmax(0, 1fr); } }
.rv-card { border: 1px solid var(--rule); border-radius: 10px; padding: 12px 16px 14px; background: var(--sheet); }
.rv-card:first-child { grid-column: 1 / -1; }
.rv-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rv-card h3 { margin: 0 0 4px; font-family: var(--f-display); font-size: 1.1rem; }
.rv-card header a { font-size: .84rem; }
.rv-card h4 { margin: 12px 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-chip { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; gap: 8px; align-items: flex-start; max-width: 100%; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font-size: .88rem; line-height: 1.3; transition: background-color 120ms ease-out, border-color 120ms ease-out; }
.rv-chip:hover { border-color: var(--leaf); }
.rv-chip:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.rv-chip[aria-pressed="true"] { background: var(--leaf-soft); border-color: var(--leaf); }
.rv-chip[aria-pressed="false"] b { font-weight: 500; color: var(--muted); }
.rv-chip .tick { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; background: var(--rule); color: var(--ink); }
.rv-chip[aria-pressed="true"] .tick { background: var(--leaf); color: var(--leaf-ink); }
.rv-chip .hint { display: block; font-size: .76rem; }
.rv-lists li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 56px; gap: 12px; align-items: center; padding: 5px 0; border-bottom: 1px dotted var(--rule); font-size: .86rem; }
.rv-lists .struct { width: 100%; min-width: 0; }
.rv-lists .lf { text-align: right; }

/* Planting palette: a large select button per row, folding layers, and a Selected / Not selected / All switch */
.sp-view { width: fit-content; }
.sp-pick { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--rule); color: var(--leaf); font-size: 1.05rem; font-weight: 600; background: var(--sheet); transition: background-color 120ms ease-out, border-color 120ms ease-out, transform 100ms ease-out; }
.sp-pick:hover { border-color: var(--leaf); }
.sp-pick:active { transform: scale(.94); }
.sp-pick:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.sp-pick[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: var(--leaf-ink); }
.sp-grp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.sp-fold { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.sp-fold:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.sp-fold .chev-ic { transition: transform 160ms ease-out; }
tr.grp.folded .sp-fold .chev-ic { transform: rotate(-90deg); }
.sp-grp-acts { margin-left: auto; display: inline-flex; gap: 12px; }
.sp-grp-acts .linklike { font-size: .8rem; }

/* The palette's totals and Export in the step bar */
.pager-slot { display: none; flex: 1; min-width: 0; }
.pager.has-slot .pager-slot { display: block; }
.pager.has-slot .pager-pos { display: none; }
.pager .sp-footer { position: static; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
.pager .sp-footer #toSchedule { display: none; }
.pager.wide { max-width: 1360px; }
@media (max-width: 760px) { .pager .sp-footer .sp-tot { display: none; } }

/* A secondary action that still reads as a button: Suggest conditions. */
button.soft { display: inline-flex; align-items: center; gap: 6px; background: var(--leaf-soft); color: var(--leaf); border-color: var(--leaf); }
@media (hover: hover) and (pointer: fine) { button.soft:hover { background: var(--leaf); color: var(--leaf-ink); } }
button.soft .ic { width: 16px; height: 16px; }
.cond-suggest { margin: 0 0 12px; align-items: center; gap: 10px; }

/* Remove a plant from a zone's selection, beside Move */
.row-acts { white-space: nowrap; }
.row-acts .rm { min-height: 28px; width: 28px; padding: 0; margin-left: 6px; background: transparent; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; font-size: 1rem; line-height: 1; }
@media (hover: hover) and (pointer: fine) { .row-acts .rm:hover { color: var(--bad); border-color: var(--bad); } }

/* Modelled on, at the top of the selection builder, with the community's layers */
.gen-model { display: grid; gap: 6px; padding: 10px 0 12px; border-bottom: 1px solid var(--rule); margin-bottom: 10px; }
.gen-model label { display: grid; gap: 4px; font-weight: 600; }
.gen-layers { display: grid; gap: 4px; }
.gen-layers .struct { width: 100%; height: 10px; }
.zone-src { margin: 0 0 10px; font-size: .88rem; color: var(--muted); }

/* BYO List: a plant already in the planting palette */
.in-pal { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; padding: 1px 6px; border-radius: 3px; font-size: .72rem; font-weight: 600; color: var(--good); background: var(--good-bg); vertical-align: middle; }
.in-pal .ic { width: 12px; height: 12px; }

/* A zone whose communities want different conditions: choose one per condition, or split the zone. */
.zone-clash { display: grid; gap: 10px; padding: 10px 12px; border: 1px solid var(--caution); border-left-width: 4px; border-radius: 4px; background: var(--caution-bg); color: var(--ink); }
.zone-clash h4 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .95rem; color: var(--caution); }
/* An action inside a sentence: looks like a link (underlined), works as a button. */
button.linkbtn { all: unset; cursor: pointer; color: inherit; font-weight: inherit; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { button.linkbtn:hover { text-decoration-thickness: 2.5px; } }
button.linkbtn:focus-visible { outline: 2px solid var(--caution); outline-offset: 2px; border-radius: 2px; }
.zone-clash .cl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.zone-clash .cl-key { flex: 0 0 7.5em; font-size: .85rem; font-weight: 600; }
.zone-clash .cl-opts { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.zone-clash .cl-opt { display: grid; gap: 1px; text-align: left; padding: 6px 10px; border: 1px solid var(--caution); border-radius: 4px; background: var(--paper); color: var(--ink); font-weight: 400; cursor: pointer; max-width: 100%; }
.zone-clash .cl-opt b { font-size: .88rem; font-weight: 600; }
.zone-clash .cl-opt span { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-clash .cl-opt:hover { background: var(--sheet); }
.zone-clash .cl-opt[aria-pressed="true"] { border-width: 2px; padding: 5px 9px; }

/* The zone's row: click anywhere to fold its details, like a palette layer row. */
.zone-row { position: sticky; top: var(--band-h, 0px); z-index: 850; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px 12px; padding: 10px 4px; border-bottom: 1px solid var(--rule); background: var(--sheet); cursor: pointer; font-size: .9rem; }
#zLine { display: contents; }
/* One line at any width: the conditions shorten with an ellipsis; the name and the chip stay whole. */
.zone-row .zl-cond { color: var(--muted); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-row .zone-fold, .zone-row .lf, .zone-row .linkchip { flex: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .zone-row:hover { background: color-mix(in srgb, var(--ink) 4%, var(--sheet)); } }
.zone-fold { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.zone-fold b { font-family: var(--f-display); font-size: 1rem; }
.zone-fold:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; border-radius: 2px; }
.zone-fold .chev-ic { transition: transform 160ms ease-out; transform: rotate(-90deg); }
.zone-row.open .zone-fold .chev-ic { transform: none; }
.zone-row + .zone-panel { margin-top: 8px; }
/* Palette layer rows fold from anywhere on the row. */
tr.grp:has(.sp-fold) > th { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { tr.grp:has(.sp-fold):hover > th { background: color-mix(in srgb, var(--ink) 4%, var(--paper)); } }
/* Conditions: what they're based on and Suggest on one line. */
.cond-suggest { align-items: center; gap: 8px 14px; }
.cond-suggest .zone-evcs { flex: 1 1 auto; min-width: 0; }
#zSuggestMsg:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .zone-fold .chev-ic { transition: none; } }
#zClash { margin-bottom: 10px; }
/* What the Modelled on choice does: full-strength text, set apart from the muted layer shares above it. */
.hint.gen-note { color: var(--ink); margin-top: 6px; }
/* Scrolled to from the sticky zone row: land just below it. */
#zonePanel, #zClash { scroll-margin-top: calc(var(--band-h, 0px) + var(--zrow-h, 0px) + 8px); }
