/* Biodiversity Dashboard (BTX-484). The theme layer: tokens, type, page chrome and the shared
   component styles every section renderer draws with. Spec: docs/biodiversity_dashboard/HANDOFF.md
   §1.1 (design system), §1.2 (structure), §1.4.2 ([hidden] rules), BUILD_NOTES.md (the five traps).

   Everything is scoped under .bd, the page's root element, because Propshaft serves this file on
   every page of the app. No Tailwind classes are relied on.

   Rules that hold here:
   - Colour tokens live in FOUR blocks: .bd, the prefers-color-scheme dark block, .bd[data-theme="dark"]
     and .bd[data-theme="light"]. A new token goes in all four, with a light and a dark value.
   - The rem scale is 0.62 0.68 0.76 0.82 0.88 1.00 1.15, plus 1.22 1.35 1.5 1.7 1.9 2 for display
     figures and .5/.52 below the smallest step. A size not on the scale is a bug, not a choice.
   - Chart type is set in px (charts draw 1:1 at measured width): axis 11px, bar labels 12.5px.
   - A grid holding an SVG uses repeat(N, minmax(0,1fr)); plain 1fr refuses to shrink.
   - [hidden] is only display:none in the browser's own sheet, so it is restated below.
   - Three weights only: 400, 600, 700 (Space Grotesk labels ship 500 and 600).
   - The Home page (home.css) is the standard for type and colour where the two pages show the same
     thing (BTX-535): the page title, the control bar's labels and the site chips match it.

   Fonts: latin subsets, SIL Open Font License 1.1, self-hosted from the design handoff
   (design/fonts/). Inter and Space Grotesk are variable fonts covering the weights declared. */

@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;
  src:url("/assets/biodiversity/inter-latin-496a588b.woff2") format("woff2");}
@font-face{font-family:'Questrial';font-style:normal;font-weight:400;font-display:swap;
  src:url("/assets/biodiversity/questrial-latin-c8ea350b.woff2") format("woff2");}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:500 600;font-display:swap;
  src:url("/assets/biodiversity/spacegrotesk-latin-dfda626c.woff2") format("woff2");}
@font-face{font-family:'Nunito';font-style:normal;font-weight:700 800;font-display:swap;
  src:url("/assets/biodiversity/nunito-latin-a6de09cc.woff2") format("woff2");}

/* ================================ TOKENS (four blocks) ================================ */
.bd{
  color-scheme: light;
  --paper:#f6f8f7; --surface:#ffffff; --surface-2:#f1f5f3;
  --ink:#0f2e33; --ink-2:#3f5a5e; --ink-3:#627d81;
  --rule:#e4ebe8; --rule-strong:#c9d6d2;
  --plotbg:#fafcfb; --gridline-strong:#dfe7e4;
  --teal:#0f2e33; --teal-2:#06424b; --on-teal:#ffffff; --amber:#ffba2a; --amber-ink:#a86f12;
  --leaf:#3c652f; --sage:#e7eeeb; --seg:#eaf0ee;
  --edge:#d3e4bf; --chip-edge:#b7d29a; /* the Home page's card and site-chip edges (home.css, BTX-535) */
  --gain:#3c652f; --loss:#b8553b;
  --shadow:0 1px 2px rgba(15,46,51,.06),0 8px 24px rgba(15,46,51,.06); --shadow-sm:0 1px 3px rgba(15,46,51,.12);
  --bp-paper:#ffffff; --bp-rule:#e4ebe8; --bp-track:#edf2f0; --bp-rowrule:#e8eeec;
  --bp-bar:#b09468; --bp-eyebrow:#3c652f; --bp-ink:#0f2e33; --bp-muted:#627d81;
  --tt-native:#8FC46A; --tt-intro:#AAB6BE; --tt-invasive:#F08A6B;
  --tt-flag-red:#E05A45; --tt-flag-amber:#FFBA2A; --tt-flag-orange:#F0924A;
  --sans:'Inter',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --serif:var(--sans);
  --display:'Questrial',var(--sans);
  --label:'Space Grotesk',var(--sans);
  --wordmark:'Nunito',var(--sans);
  --ht-darkest:#1a2e22; --ht-dark:#334e47; --ht-teal:#5d8c80; --ht-sage:#9ab8a5;
  --ht-pale:#c3d9a8;    --ht-green:#7aaa3e; --ht-amber:#f8b42a; --ht-amber-l:#e8b14b;
  --ht-amber-d:#d4a017; --ht-tan:#c3a76e;   --ht-brick:#b04a32;
  --status-native:#3c652f; --status-intro:#86919a; --status-invasive:#b8553b;
  --on-dark:#ffffff; --on-light:#14170f;
  --flora:#5d8c80; --flora-soft:rgba(93,140,128,.12);
  --poll:#d4a017;  --poll-soft:rgba(212,160,23,.14);
  --bee:#f8b42a;   --bee-soft:rgba(248,180,42,.12);
  --native:#334e47;
  --invasive:#b04a32; --invasive-soft:rgba(176,74,50,.10);
  --sown:#c3a76e;
  --other-inv:#9ab8a5;
  --hoverfly:#5d8c80; --butterfly:#7aaa3e; --moth:#1a2e22; --beetle:#c3a76e;
  --bee-fly:#8a5a2b; /* F3 (2026-10-19): at least 15 OKLab dE x100 from every other group colour */
  --t-decline:#b04a32; --t-increase:#7aaa3e; --t-patch:#d4a017;
  --t-invasion:#334e47; --t-agri:#c3a76e; --t-stable:#5d8c80; --t-boom:#f8b42a;
  --iucn-dd:#9ab8a5; --iucn-lc:#7aaa3e; --iucn-nt:#f8b42a; --iucn-vu:#e07b2a;
  --iucn-en:#b04a32; --iucn-cr:#6e2416;
  /* Site slots: sites[].colour is var(--site-N) by display slot. Identity only, no meaning.
     Ten §1.1 hues (ht-dark, ht-amber-d, ht-brick, ht-teal, ht-green, ht-tan, teal-2, iucn-vu,
     status-intro, iucn-cr) re-stepped in OKLCH per theme, so every pair is at least 15.6 OKLab
     dE x100 apart in light and 14.2 in dark (was 6.5 and 2.4: dark slots 1 and 4). ASSUMPTIONS F7. */
  --site-1:#0d3028; --site-2:#c7a91c; --site-3:#b53338; --site-4:#71bbaf; --site-5:#4d9b42;
  --site-6:#74620e; --site-7:#185c6b; --site-8:#f86f2f; --site-9:#748292; --site-10:#6e2416;
}
@media (prefers-color-scheme: dark){
  .bd:not([data-theme="light"]){
    --sans:'Inter',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
    --serif:var(--sans);
    --display:'Questrial',var(--sans);
    --label:'Space Grotesk',var(--sans);
    --wordmark:'Nunito',var(--sans);
    color-scheme: dark;
    --paper:#0c1214; --surface:#142023; --surface-2:#1a282b;
    --ink:#eef4f2; --ink-2:#b9cac7; --ink-3:#8ea4a3;
    --rule:#24363a; --rule-strong:#34494d;
    --plotbg:#172427; --gridline-strong:#2f4447;
    --teal:#1f5a60; --teal-2:#2a6b70; --on-teal:#ffffff; --amber:#ffba2a; --amber-ink:#ffc94d;
    --leaf:#8fc46a; --sage:#20312f; --seg:#1d2c2f;
    --edge:#39513a; --chip-edge:#527246; /* --leaf mixed 30% and 50% into --surface */
    --gain:#8fc46a; --loss:#e07a5f;
    --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.25); --shadow-sm:0 1px 3px rgba(0,0,0,.35);
    --bp-paper:#142023; --bp-rule:#24363a; --bp-track:#1f2e31; --bp-rowrule:#24363a;
    --bp-bar:#c9ad7f; --bp-eyebrow:#8fc46a; --bp-ink:#eef4f2; --bp-muted:#8ea4a3;
    --tt-native:#8FC46A; --tt-intro:#AAB6BE; --tt-invasive:#F08A6B;
    --tt-flag-red:#E05A45; --tt-flag-amber:#FFBA2A; --tt-flag-orange:#F0924A;
    --ht-darkest:#1a2e22; --ht-dark:#334e47; --ht-teal:#5d8c80; --ht-sage:#9ab8a5;
    --ht-pale:#c3d9a8;    --ht-green:#7aaa3e; --ht-amber:#f8b42a; --ht-amber-l:#e8b14b;
    --ht-amber-d:#d4a017; --ht-tan:#c3a76e;   --ht-brick:#b04a32;
    --status-native:#8fc46a; --status-intro:#9aa5b3; --status-invasive:#e07a5f;
    --on-dark:#0f1210; --on-light:#f1f3ef;
    --flora:#7fb3a5; --flora-soft:rgba(127,179,165,.16);
    --poll:#f8b42a;  --poll-soft:rgba(248,180,42,.16);
    --bee:#f8b42a;   --bee-soft:rgba(248,180,42,.14);
    --native:#7fb3a5;
    --invasive:#d9705a; --invasive-soft:rgba(217,112,90,.16);
    --sown:#d4bb8a;
    --other-inv:#b3cbbc;
    --hoverfly:#7fb3a5; --butterfly:#96c45c; --moth:#93b3a0; --beetle:#d4bb8a;
    --bee-fly:#c08a52; /* F3 (2026-10-19): at least 12.7 OKLab dE x100 from every other group colour */
    --t-decline:#d9705a; --t-increase:#96c45c; --t-patch:#e8c04a;
    --t-invasion:#7fb3a5; --t-agri:#d4bb8a; --t-stable:#8fc4b6; --t-boom:#f8b42a;
    --iucn-dd:#b3cbbc; --iucn-lc:#96c45c; --iucn-nt:#f8b42a; --iucn-vu:#f0924a;
    --iucn-en:#d9705a; --iucn-cr:#a9553d;
    /* Site slots: sites[].colour is var(--site-N) by display slot. Identity only, no meaning. */
    --site-1:#b4dad3; --site-2:#d6a21b; --site-3:#f68581; --site-4:#489173; --site-5:#56b848;
    --site-6:#795f26; --site-7:#11687b; --site-8:#ca6705; --site-9:#9da5b0; --site-10:#b12926;
  }
}
.bd[data-theme="dark"]{
  --sans:'Inter',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --serif:var(--sans);
  --display:'Questrial',var(--sans);
  --label:'Space Grotesk',var(--sans);
  --wordmark:'Nunito',var(--sans);
  color-scheme: dark;
  --paper:#0c1214; --surface:#142023; --surface-2:#1a282b;
  --ink:#eef4f2; --ink-2:#b9cac7; --ink-3:#8ea4a3;
  --rule:#24363a; --rule-strong:#34494d;
  --plotbg:#172427; --gridline-strong:#2f4447;
  --teal:#1f5a60; --teal-2:#2a6b70; --on-teal:#ffffff; --amber:#ffba2a; --amber-ink:#ffc94d;
  --leaf:#8fc46a; --sage:#20312f; --seg:#1d2c2f;
  --edge:#39513a; --chip-edge:#527246; /* --leaf mixed 30% and 50% into --surface */
  --gain:#8fc46a; --loss:#e07a5f;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.25); --shadow-sm:0 1px 3px rgba(0,0,0,.35);
  --bp-paper:#142023; --bp-rule:#24363a; --bp-track:#1f2e31; --bp-rowrule:#24363a;
  --bp-bar:#c9ad7f; --bp-eyebrow:#8fc46a; --bp-ink:#eef4f2; --bp-muted:#8ea4a3;
  --tt-native:#8FC46A; --tt-intro:#AAB6BE; --tt-invasive:#F08A6B;
  --tt-flag-red:#E05A45; --tt-flag-amber:#FFBA2A; --tt-flag-orange:#F0924A;
  --ht-darkest:#1a2e22; --ht-dark:#334e47; --ht-teal:#5d8c80; --ht-sage:#9ab8a5;
  --ht-pale:#c3d9a8;    --ht-green:#7aaa3e; --ht-amber:#f8b42a; --ht-amber-l:#e8b14b;
  --ht-amber-d:#d4a017; --ht-tan:#c3a76e;   --ht-brick:#b04a32;
  --status-native:#8fc46a; --status-intro:#9aa5b3; --status-invasive:#e07a5f;
  --on-dark:#0f1210; --on-light:#f1f3ef;
  --flora:#7fb3a5; --flora-soft:rgba(127,179,165,.16);
  --poll:#f8b42a;  --poll-soft:rgba(248,180,42,.16);
  --bee:#f8b42a;   --bee-soft:rgba(248,180,42,.14);
  --native:#7fb3a5;
  --invasive:#d9705a; --invasive-soft:rgba(217,112,90,.16);
  --sown:#d4bb8a;
  --other-inv:#b3cbbc;
  --hoverfly:#7fb3a5; --butterfly:#96c45c; --moth:#93b3a0; --beetle:#d4bb8a;
  --bee-fly:#c08a52; /* F3 (2026-10-19): at least 12.7 OKLab dE x100 from every other group colour */
  --t-decline:#d9705a; --t-increase:#96c45c; --t-patch:#e8c04a;
  --t-invasion:#7fb3a5; --t-agri:#d4bb8a; --t-stable:#8fc4b6; --t-boom:#f8b42a;
  --iucn-dd:#b3cbbc; --iucn-lc:#96c45c; --iucn-nt:#f8b42a; --iucn-vu:#f0924a;
  --iucn-en:#d9705a; --iucn-cr:#a9553d;
  /* Site slots: sites[].colour is var(--site-N) by display slot. Identity only, no meaning. */
  --site-1:#b4dad3; --site-2:#d6a21b; --site-3:#f68581; --site-4:#489173; --site-5:#56b848;
  --site-6:#795f26; --site-7:#11687b; --site-8:#ca6705; --site-9:#9da5b0; --site-10:#b12926;
}
.bd[data-theme="light"]{
  color-scheme: light;
  --paper:#f6f8f7; --surface:#ffffff; --surface-2:#f1f5f3;
  --ink:#0f2e33; --ink-2:#3f5a5e; --ink-3:#627d81;
  --rule:#e4ebe8; --rule-strong:#c9d6d2;
  --plotbg:#fafcfb; --gridline-strong:#dfe7e4;
  --teal:#0f2e33; --teal-2:#06424b; --on-teal:#ffffff; --amber:#ffba2a; --amber-ink:#a86f12;
  --leaf:#3c652f; --sage:#e7eeeb; --seg:#eaf0ee;
  --edge:#d3e4bf; --chip-edge:#b7d29a; /* the Home page's card and site-chip edges (home.css, BTX-535) */
  --gain:#3c652f; --loss:#b8553b;
  --shadow:0 1px 2px rgba(15,46,51,.06),0 8px 24px rgba(15,46,51,.06); --shadow-sm:0 1px 3px rgba(15,46,51,.12);
  --bp-paper:#ffffff; --bp-rule:#e4ebe8; --bp-track:#edf2f0; --bp-rowrule:#e8eeec;
  --bp-bar:#b09468; --bp-eyebrow:#3c652f; --bp-ink:#0f2e33; --bp-muted:#627d81;
  --tt-native:#8FC46A; --tt-intro:#AAB6BE; --tt-invasive:#F08A6B;
  --tt-flag-red:#E05A45; --tt-flag-amber:#FFBA2A; --tt-flag-orange:#F0924A;
  --sans:'Inter',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --serif:var(--sans);
  --display:'Questrial',var(--sans);
  --label:'Space Grotesk',var(--sans);
  --wordmark:'Nunito',var(--sans);
  --ht-darkest:#1a2e22; --ht-dark:#334e47; --ht-teal:#5d8c80; --ht-sage:#9ab8a5;
  --ht-pale:#c3d9a8;    --ht-green:#7aaa3e; --ht-amber:#f8b42a; --ht-amber-l:#e8b14b;
  --ht-amber-d:#d4a017; --ht-tan:#c3a76e;   --ht-brick:#b04a32;
  --status-native:#3c652f; --status-intro:#86919a; --status-invasive:#b8553b;
  --on-dark:#ffffff; --on-light:#14170f;
  --flora:#5d8c80; --flora-soft:rgba(93,140,128,.12);
  --poll:#d4a017;  --poll-soft:rgba(212,160,23,.14);
  --bee:#f8b42a;   --bee-soft:rgba(248,180,42,.12);
  --native:#334e47;
  --invasive:#b04a32; --invasive-soft:rgba(176,74,50,.10);
  --sown:#c3a76e;
  --other-inv:#9ab8a5;
  --hoverfly:#5d8c80; --butterfly:#7aaa3e; --moth:#1a2e22; --beetle:#c3a76e;
  --bee-fly:#8a5a2b; /* F3 (2026-10-19): at least 15 OKLab dE x100 from every other group colour */
  --t-decline:#b04a32; --t-increase:#7aaa3e; --t-patch:#d4a017;
  --t-invasion:#334e47; --t-agri:#c3a76e; --t-stable:#5d8c80; --t-boom:#f8b42a;
  --iucn-dd:#9ab8a5; --iucn-lc:#7aaa3e; --iucn-nt:#f8b42a; --iucn-vu:#e07b2a;
  --iucn-en:#b04a32; --iucn-cr:#6e2416;
  /* Site slots: sites[].colour is var(--site-N) by display slot. Identity only, no meaning. */
  --site-1:#0d3028; --site-2:#c7a91c; --site-3:#b53338; --site-4:#71bbaf; --site-5:#4d9b42;
  --site-6:#74620e; --site-7:#185c6b; --site-8:#f86f2f; --site-9:#748292; --site-10:#6e2416;
}

/* ================================ PAGE ================================ */
/* The app layout wraps every page in a white body and a centred container. The dashboard's page
   ground has to reach the edges, so the body takes the paper colour while this page is on screen.
   Literal values: the tokens are scoped to .bd and the body sits outside it. */
body:has(.bd){background:#f6f8f7;}
@media (prefers-color-scheme: dark){ body:has(.bd:not([data-theme="light"])){background:#0c1214;} }
body:has(.bd[data-theme="dark"]){background:#0c1214;}
body:has(.bd[data-theme="light"]){background:#f6f8f7;}

.bd{flex:1 1 auto;min-width:0;width:100%;background:var(--paper);color:var(--ink);
  font-family:var(--sans);font-size:14.5px;line-height:1.5;-webkit-font-smoothing:antialiased;
  padding:0 0 5rem;}
.bd.bd-gutter{padding-left:16px;padding-right:16px;}
.bd *,.bd *::before,.bd *::after{box-sizing:border-box;}
/* The host app's Tailwind base sets `* { font-family: var(--font-sans) }` (Geist, never loaded),
   which beat inheritance, so any element without its own rule fell back to the system font.
   Inherit instead; every element that wants a different face sets it explicitly below. */
.bd *{font-family:inherit;}
.bd h1,.bd h2,.bd h3,.bd h4,.bd p,.bd figure,.bd dl,.bd dd{margin:0;}
.bd button{font:inherit;color:inherit;}
.bd select{padding:0;}
.bd a{color:inherit;}
.bd section.gridsec{scroll-margin-top:1.5rem;}
/* Until the first payload has drawn, an empty section body holds roughly a drawn section's height,
   so a link to a section lower down lands near where that section will end up rather than at the
   foot of a short page of empty headings (BTX-537 follow-up). A reload keeps the drawn bodies. */
.bd:is(:not([data-bd-state]),[data-bd-state="loading"]) section.gridsec > [data-bd-body]:empty{min-height:20rem;}
/* The section a link lands on (:target until the script starts, then landOnHash's attribute) also
   keeps a screen's height until it has drawn, the species list's second request included, so it
   can sit at the top of the window from the first paint instead of halfway down a page that is
   still too short to scroll that far. */
.bd:not([data-bd-state]) section.gridsec:target,
.bd:not([data-bd-state="ready"]) section.gridsec[data-bd-landing],
.bd section.gridsec[data-bd-landing]:has([data-bd-loaded="false"]){min-height:calc(100vh - 1.5rem);}

/* [hidden] restated (HANDOFF §1.4.2). The four named selectors are the spec's; the general rule
   covers anything else a renderer hides that the sheet also gives a display. */
.bd .gridsec[hidden], .bd .yearrow[hidden], .bd .sitegrid[hidden], .bd .subhead[hidden]{display:none;}
.bd [hidden]{display:none !important;}

/* Top strip: the theme toggle. The app's own nav bar sits above it. */
.bd .bd-topbar{display:flex;justify-content:flex-end;padding:.9rem 0 0;}
.bd .themepick{display:inline-flex;align-items:center;gap:2px;background:var(--seg);border-radius:999px;padding:3px;}
.bd .thbtn{display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;
  color:var(--ink-2);border-radius:999px;cursor:pointer;padding:0;width:1.65rem;height:1.55rem;
  font-family:var(--label);font-weight:500;font-size:0.68rem;letter-spacing:.02em;line-height:1;}
.bd .thbtn.thauto{width:auto;padding:0 .55rem;}
.bd .thbtn svg{width:.92rem;height:.92rem;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.bd .thbtn:hover{color:var(--ink);}
.bd .thbtn.on{background:var(--teal);color:var(--on-teal);box-shadow:0 2px 6px rgba(15,46,51,.25);}
.bd .thbtn:focus-visible{outline:2px solid var(--teal-2);outline-offset:2px;}

/* ================================ RAIL + LAYOUT ================================ */
.bd .pagelayout{display:grid;grid-template-columns:13.5rem minmax(0,1fr);gap:2.4rem;align-items:start;}
.bd .pagelayout.navcollapsed{grid-template-columns:2.6rem minmax(0,1fr);gap:1.4rem;}
.bd .maincol{min-width:0;counter-reset:sec;}
.bd .sidenav{position:sticky;top:1.25rem;padding:2.2rem 0 0;}
.bd .navtoggle{display:flex;align-items:center;gap:.4rem;width:100%;background:none;border:none;cursor:pointer;
  padding:0 .7rem .7rem;font-family:var(--label);font-size:0.68rem;font-weight:600;letter-spacing:.12em;
  text-transform:uppercase;color:var(--ink-3);}
.bd .navtoggle .chev{display:inline-block;transition:transform .15s;font-size:1rem;line-height:1;}
.bd .navtoggle:hover{color:var(--ink-2);}
.bd .navlist{counter-reset:navsec;}
.bd .navlist a{counter-increment:navsec;display:block;font-size:0.82rem;color:var(--ink-2);text-decoration:none;
  padding:.46rem .75rem;margin:1px 0;border-radius:10px;line-height:1.35;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bd .navlist a:hover{background:var(--sage);color:var(--ink);}
.bd .navlist a.on{background:var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 13.5C2.5 7 6.5 2.5 13.5 2.5 13.5 9.5 9 13.5 2.5 13.5Z' fill='%23ffba2a'/%3E%3Cpath d='M3.5 12.5 11 5' stroke='%230f2e33' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat .7rem center/.8rem;
  color:var(--on-teal);font-weight:600;padding-left:1.95rem;box-shadow:0 3px 10px rgba(15,46,51,.2);white-space:normal;}
.bd .navlist a:focus-visible{outline:2px solid var(--teal-2);outline-offset:2px;}
/* Collapsed: the section number only, counted in rail order (= DOM order of the visible sections,
   so it matches the badge on the heading). The name stays in title and aria-label. */
.bd .navcollapsed .navtoggle{justify-content:center;padding-left:0;padding-right:0;}
.bd .navcollapsed .navtoggle .lbl{display:none;}
.bd .navcollapsed .navtoggle .chev{transform:rotate(180deg);}
.bd .navcollapsed .navlist a{font-size:0;padding:0;height:auto;background:none;box-shadow:none;
  display:flex;align-items:center;justify-content:center;margin:4px 0;white-space:nowrap;}
.bd .navcollapsed .navlist a::before{content:counter(navsec, decimal-leading-zero);display:flex;align-items:center;
  justify-content:center;width:100%;height:1.7rem;border-radius:8px;font-family:var(--label);font-weight:600;
  font-size:0.68rem;letter-spacing:.02em;background:var(--surface-2);color:var(--ink-3);}
.bd .navcollapsed .navlist a:hover{background:none;}
.bd .navcollapsed .navlist a:hover::before{background:var(--sage);color:var(--ink-2);}
.bd .navcollapsed .navlist a.on::before{background:var(--teal);color:var(--amber);box-shadow:0 3px 10px rgba(15,46,51,.2);}
@media (max-width:900px){
  .bd .pagelayout,.bd .pagelayout.navcollapsed{grid-template-columns:minmax(0,1fr);gap:0;}
  .bd .sidenav{position:static;padding:1.2rem 0 0;}
  .bd .navtoggle{display:none;}
  .bd .navlist{display:flex;flex-wrap:wrap;gap:.3rem;}
  .bd .navlist a{background:var(--surface);box-shadow:var(--shadow-sm);padding:.3rem .7rem;margin:0;max-width:100%;}
}

/* ================================ MASTHEAD ================================ */
.bd header.page{padding:2.2rem 0 .4rem;}
.bd .masthead{display:flex;gap:1.2rem 2rem;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;margin:0 0 1.3rem;}
.bd .mtitle{flex:1 1 24rem;min-width:0;}
.bd h1.bd-title{font-family:var(--display);font-weight:400;letter-spacing:-.01em;font-size:1.9rem;
  line-height:1.15;color:var(--ink);margin:0 0 .4rem;}
@media (max-width:759px){ .bd h1.bd-title{font-size:1.5rem;} } /* Home's .hm-title sizes */
.bd .standfirst{font-size:1rem;color:var(--ink-2);max-width:38rem;margin:0;}
/* Scope of the current selection: one quiet inline chip, figures inline with their labels. */
.bd .mctx{display:inline-flex;align-items:center;flex-wrap:wrap;gap:.2rem 0;padding:.42rem .35rem .42rem .95rem;max-width:100%;
  background:color-mix(in srgb, var(--teal) 5%, transparent);
  border:1px solid color-mix(in srgb, var(--teal) 11%, transparent);border-radius:999px;}
.bd .mctx div{display:inline-flex;align-items:baseline;gap:.35rem;padding:0 .85rem;
  border-left:1px solid color-mix(in srgb, var(--teal) 14%, transparent);}
.bd .mctx div:first-of-type{border-left:none;padding-left:0;}
.bd .mctx b{font-family:var(--display);font-weight:400;font-size:1rem;line-height:1.1;color:var(--ink);font-variant-numeric:tabular-nums;}
.bd .mctx span{font-family:var(--label);font-size:.62rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);}
@media (max-width:640px){ .bd .mctx{border-radius:14px;} }

/* ================================ CONTROL BAR ================================ */
.bd .ctlbar{display:flex;flex-wrap:wrap;align-items:center;gap:.8rem 1.6rem;background:var(--surface);
  border:1px solid var(--edge);border-radius:16px;box-shadow:var(--shadow);padding:.8rem 1.05rem;margin:0 0 1rem;}
.bd .tg-group{display:flex;flex-direction:row;align-items:center;gap:.6rem;flex-wrap:wrap;min-width:0;}
.bd .tg-label{font-family:var(--label);font-size:.68rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  color:var(--ink-2);display:flex;align-items:center;gap:.35rem;}
.bd .tg-label b{color:var(--ink-2);font-weight:600;}
.bd .tg-help{width:17px;height:17px;border-radius:50%;border:none;background:var(--sage);color:var(--ink-2);
  font-family:var(--label);font-size:0.62rem;font-weight:600;line-height:17px;text-align:center;cursor:pointer;padding:0;}
.bd .tg-help:hover{background:var(--teal);color:var(--on-teal);}
.bd .yearrange{display:flex;align-items:center;gap:.4rem;}
.bd .yearrange .yrsep{font-size:0.76rem;color:var(--ink-3);}
.bd .ypick{position:relative;display:inline-block;}
.bd .ypick select{appearance:none;-webkit-appearance:none;font-family:var(--label);font-weight:500;font-size:0.82rem;
  color:var(--ink);background:var(--seg);border:none;border-radius:999px;padding:.32rem 1.8rem .32rem .8rem;
  cursor:pointer;line-height:1.15;font-variant-numeric:tabular-nums;}
.bd .ypick::after{content:"";position:absolute;right:.75rem;top:50%;width:.36rem;height:.36rem;pointer-events:none;
  border-right:1.5px solid var(--ink-2);border-bottom:1.5px solid var(--ink-2);transform:translateY(-70%) rotate(45deg);}
.bd .ypick select:hover{background:var(--sage);}
.bd .yrreset{font-family:var(--label);font-weight:500;font-size:.76rem;border:none;background:var(--seg);color:var(--ink-2);
  border-radius:999px;padding:.32rem .75rem;cursor:pointer;}
.bd .yrreset:hover{background:var(--teal);color:var(--on-teal);}
.bd .msites{display:flex;align-items:flex-start;gap:.7rem;flex-wrap:wrap;flex:1 1 100%;min-width:0;
  border-top:1px solid var(--rule);padding-top:.75rem;}
.bd .msites .tg-label{flex:none;padding-top:.6rem;}
/* Select all / Unselect all is Home's button (.hm-bar__reset, home.css), drawn as Home draws it: plain ink
   text at Home's .88rem, not the label's small caps (BTX-533). */
.bd .msites .hm-bar__reset{margin-left:.35rem;min-height:0;font:400 .88rem/1.2 var(--sans);letter-spacing:normal;
  text-transform:none;color:var(--ink);min-width:5.9em;justify-content:flex-start;}
.bd .msites .hm-bar__reset:focus-visible{outline:2px solid var(--teal-2);outline-offset:2px;}
.bd .msites .hm-bar__reset:disabled{cursor:default;color:var(--ink-3);}
/* Site chips as on Home (.hm-chip): grey and regular weight when off, white with a green edge and
   semibold when on. The dot (the site's colour) is the dashboard's own and stays. */
.bd .pillrow{display:flex;flex-wrap:wrap;gap:.5rem;flex:1 1 20rem;min-width:0;}
.bd .pill{border:1px solid transparent;background:var(--surface-2);font-family:var(--sans);font-weight:400;
  font-size:0.88rem;line-height:1.3;min-height:2.25rem;padding:.3rem .875rem;border-radius:999px;color:var(--ink-3);cursor:pointer;
  display:inline-flex;align-items:center;gap:.4rem;max-width:100%;}
.bd .pill .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
/* A pill is as wide on as off: a hidden semibold copy of the name holds the width, so a click's
   at-once toggle does not move the next pill under the pointer (a double-click's second click). */
.bd .pill .nm::after{content:attr(data-name);display:block;height:0;overflow:hidden;visibility:hidden;font-weight:600;}
.bd .pill .dot{width:8px;height:8px;border-radius:50%;background:var(--rule-strong);flex:none;}
.bd .pill.on{background:var(--surface);border-color:var(--chip-edge);color:var(--ink);font-weight:600;}
.bd .pill.on:hover{border-color:var(--leaf);}
@media (max-width:759px){ .bd .pill{min-height:2.75rem;} }
.bd .pill.pill-hidden{display:none;}
/* Selected first, as of the last refold (foldPills), not the instant a pill is clicked. */
.bd .pillrow.pills-folded .pill.ranked{order:-1;}
.bd .pilltools{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;flex:1 1 100%;min-width:0;padding-left:0;}
.bd .pilltools input{font-family:var(--sans);font-size:.88rem;height:2.5rem;padding:0 .75rem;border-radius:10px;
  border:1px solid var(--rule-strong);background:var(--surface);color:var(--ink);min-width:0;width:14rem;max-width:100%;}
.bd .pilltools input:focus{outline:2px solid var(--chip-edge);outline-offset:1px;border-color:var(--leaf);}
.bd .pilltools .bd-more{font-family:var(--sans);font-weight:600;font-size:.82rem;min-height:2.25rem;}
@media (max-width:759px){
  .bd .pilltools{flex-wrap:wrap;}
  .bd .pilltools input{flex:1 1 100%;width:auto;height:2.75rem;}
  .bd .pilltools .bd-more{min-height:2.75rem;margin-left:auto;}
}
.bd .pillmore{font-family:var(--label);font-size:.72rem;color:var(--ink-3);white-space:nowrap;}
.bd .bd-more{font-family:var(--label);font-weight:500;font-size:.76rem;border:none;background:var(--seg);color:var(--ink-2);
  border-radius:999px;padding:.4rem .9rem;cursor:pointer;}
.bd .bd-more:hover{background:var(--teal);color:var(--on-teal);}
.bd .bd-more:focus-visible{outline:2px solid var(--teal);outline-offset:2px;}
.bd section.gridsec > [data-bd-body] > .bd-more,.bd section.gridsec .bd-more[data-bd-more-cards]{display:block;margin:1rem auto 0;}
.bd.bd-printing .bd-more,.bd.bd-printing .pilltools{display:none;}
.bd .pill.on .dot{background:var(--tc-pill,var(--ink-2));}
.bd .ypick select:focus-visible,.bd .yrreset:focus-visible,.bd .pill:focus-visible,.bd .yeartoggle button:focus-visible,
.bd .infobtn:focus-visible,.bd .tg-help:focus-visible{outline:2px solid var(--teal-2);outline-offset:2px;}

/* ================================ HEADLINE TILES ================================ */
.bd .statstrip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;}
.bd .statstrip .st{display:flex;flex-direction:column;gap:.15rem;background:var(--surface);border-top:3px solid var(--teal);
  border-radius:16px;box-shadow:var(--shadow);padding:.9rem 1.1rem .85rem;min-width:0;}
.bd .statstrip .st .k{font-family:var(--label);font-size:.68rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);}
.bd .statstrip .st .v{font-family:var(--display);font-weight:400;font-size:2rem;line-height:1.1;color:var(--ink);font-variant-numeric:tabular-nums;}
.bd .statstrip .st .dl{font-family:var(--label);font-size:0.76rem;font-weight:500;color:var(--ink-3);}
.bd .statstrip .st .dl .ar{color:var(--amber-ink);}
.bd .statnote{font-size:0.68rem;color:var(--ink-3);margin:.7rem 0 0;max-width:52rem;}
@media (max-width:640px){ .bd .statstrip{grid-template-columns:minmax(0,1fr);} }

/* ================================ SECTIONS ================================ */
.bd section.gridsec{margin-top:3rem;counter-increment:sec;min-width:0;}
.bd h2.sec{font-family:var(--display);font-weight:400;font-size:1.5rem;letter-spacing:0;line-height:1.25;color:var(--ink);
  margin:0 0 .35rem;display:flex;align-items:center;flex-wrap:wrap;gap:.2rem .6rem;}
.bd h2.sec::before{content:counter(sec, decimal-leading-zero);font-family:var(--label);font-size:0.68rem;font-weight:600;
  background:var(--teal);color:var(--amber);border-radius:6px;padding:.18rem .42rem;letter-spacing:.02em;line-height:1.5;}
.bd .sowhat{font-weight:400;font-size:0.88rem;color:var(--ink-2);max-width:56rem;margin:0 0 1.1rem;}
.bd .secnote{font-size:0.76rem;color:var(--ink-3);max-width:56rem;margin:0 0 1.1rem;}
.bd .axisnote,.bd .sourcenote{font-size:0.68rem;color:var(--ink-3);margin:.7rem 0 0;max-width:58rem;line-height:1.55;}
.bd h3.subhead{font-family:var(--label);font-weight:600;font-size:0.88rem;margin:2rem 0 .7rem;color:var(--ink);}
.bd .bd-empty{font-size:0.82rem;color:var(--ink-3);padding:.6rem 0;}
.bd .bd-stub{font-size:0.82rem;color:var(--ink-3);background:var(--surface);border-radius:14px;box-shadow:var(--shadow);
  padding:1rem 1.15rem;border:1px dashed var(--rule-strong);}
.bd .bd-error{font-size:0.82rem;color:var(--loss);background:var(--surface);border-radius:14px;padding:1rem 1.15rem;
  box-shadow:inset 0 0 0 1px var(--loss);}
.bd .bd-loading{font-size:0.82rem;color:var(--ink-3);}
/* An unclassified insect family counted provisionally (payload.errors). */
.bd .bd-notice{font-size:0.76rem;color:var(--ink-2);background:var(--surface);border-radius:12px;box-shadow:var(--shadow-sm);
  border-left:3px solid var(--amber);padding:.55rem .8rem;margin:.8rem 0 0;max-width:52rem;}
/* Page-level states: a failed payload request or an empty selection shows the status line and
   nothing stale. Set by the controller as data-bd-state on .bd. */
.bd[data-bd-state="error"] .gridsec, .bd[data-bd-state="error"] .statstrip, .bd[data-bd-state="error"] .statnote,
.bd[data-bd-state="error"] .bd-notice, .bd[data-bd-state="empty"] .bd-notice,
.bd[data-bd-state="error"] .mctx, .bd[data-bd-state="error"] .navlist,
.bd[data-bd-state="empty"] .gridsec, .bd[data-bd-state="empty"] .statstrip, .bd[data-bd-state="empty"] .statnote,
.bd[data-bd-state="empty"] .mctx, .bd[data-bd-state="empty"] .navlist{display:none;}
.bd header.page .bd-error,.bd header.page .bd-loading{margin:0 0 1rem;}

/* Help: a circular "?" appended INTO the h2 (so headings are retitled with setHeadingText, never
   textContent), opening a popover with three fields. */
.bd .infowrap{position:relative;display:inline-block;line-height:1;}
.bd .infobtn{width:19px;height:19px;border-radius:50%;border:none;background:var(--sage);color:var(--ink-2);
  font-family:var(--label);font-size:0.68rem;font-weight:600;line-height:1;cursor:pointer;padding:0;vertical-align:middle;}
.bd .infobtn:hover,.bd .infobtn[aria-expanded="true"]{background:var(--teal);color:var(--on-teal);}
.bd .infopop{position:absolute;z-index:40;top:calc(100% + .5rem);left:0;width:min(30rem,86vw);background:var(--surface);
  border-radius:14px;box-shadow:0 12px 34px rgba(15,46,51,.18);padding:.9rem 1rem;text-align:left;
  font-family:var(--sans);font-size:0.76rem;line-height:1.6;color:var(--ink-2);font-weight:400;letter-spacing:0;}
.bd .infopop.flipright{left:auto;right:0;}
.bd .infopop dt{font-family:var(--label);font-weight:500;font-size:0.62rem;letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink-3);margin-top:.6rem;}
.bd .infopop dt:first-child{margin-top:0;}
.bd .infopop dd{margin:.15rem 0 0;}
.bd .infopop .closeinfo{position:absolute;top:.4rem;right:.5rem;border:none;background:none;color:var(--ink-3);
  cursor:pointer;font-size:0.82rem;line-height:1;padding:.2rem;}
.bd .infofig{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin:.2rem 0 .9rem;}
.bd .infofig svg{display:block;width:100%;height:auto;background:var(--surface-2);border-radius:5px;box-shadow:inset 0 0 0 1px var(--rule);}
.bd .infofig figcaption{font-size:0.68rem;line-height:1.45;color:var(--ink-3);margin-top:.3rem;}
.bd .infofig figcaption b{color:var(--ink-2);}
@media (max-width:520px){ .bd .infofig{grid-template-columns:minmax(0,1fr);} }

/* Legends */
.bd .legendkey{display:flex;gap:.4rem 1.5rem;flex-wrap:wrap;font-size:0.82rem;color:var(--ink-2);}
.bd .seclegend{margin:-.3rem 0 1rem;font-size:0.76rem;}
.bd .legendkey .lk{display:inline-flex;align-items:center;gap:.4rem;}
.bd .legendkey .ln{width:14px;height:2px;border-radius:2px;display:inline-block;}
.bd .legendkey .sw{width:9px;height:9px;border-radius:50%;display:inline-block;}
.bd .hoverkey{gap:.4rem 1rem;align-items:center;font-size:.76rem;color:var(--ink-3);}
.bd .wchip{display:inline-block;font-family:var(--label);font-size:0.62rem;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;color:#fff;border-radius:999px;padding:.2rem .55rem;white-space:nowrap;}
.bd .hoverkey .wchip{margin-right:.4rem;color:#0f2e33;}

/* Section year pickers and segmented buttons. Range-only controls: hidden on one year (§1.3). */
.bd .secyearbar{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;margin:0 0 .9rem;}
.bd .secyearlab,.bd .scalelab{font-family:var(--label);font-weight:500;font-size:.68rem;letter-spacing:.1em;
  text-transform:uppercase;color:var(--ink-3);line-height:1;}
.bd .secyearhint,.bd .yearhint{font-size:0.68rem;color:var(--ink-3);max-width:32rem;line-height:1.45;}
.bd .yeartoggle{display:flex;flex-wrap:wrap;gap:2px;background:var(--seg);border-radius:999px;padding:3px;width:fit-content;max-width:100%;}
.bd .yeartoggle button{display:inline-flex;align-items:center;justify-content:center;line-height:1.15;border:none;
  background:transparent;color:var(--ink-2);font-family:var(--label);font-weight:500;font-size:0.82rem;
  padding:.35rem .7rem;border-radius:999px;cursor:pointer;}
.bd .yeartoggle.small button{font-size:0.68rem;padding:.2rem .5rem;}
.bd .yeartoggle button:hover{color:var(--ink);}
.bd .yeartoggle button.active{background:var(--teal);color:var(--on-teal);box-shadow:0 2px 6px rgba(15,46,51,.25);}
.bd .yearrow{display:flex;align-items:center;gap:.9rem;flex-wrap:wrap;margin:0 0 .9rem;}
.bd .scalepick{display:flex;align-items:center;gap:.5rem;}
.one-year .bd .secyearbar,
.one-year .bd .secyearhint,
.one-year .bd .mixyr{display:none;}

/* ================================ CARDS AND GRIDS ================================ */
.bd .sitegrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem;}
.bd .donutgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.1rem;}
@media (max-width:1100px){ .bd .donutgrid{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:760px){ .bd .sitegrid,.bd .donutgrid{grid-template-columns:minmax(0,1fr);} }
/* One site: one card, full width. */
.one-site .bd .sitegrid,.one-site .bd .donutgrid{grid-template-columns:minmax(0,1fr);}
.bd .card,.bd .abundcard,.bd .bpanel,.bd .lcard,.bd .callout,.bd .tablecard{background:var(--surface);border-radius:18px;
  box-shadow:var(--shadow);min-width:0;}
.bd .card{padding:1.15rem 1.3rem 1.25rem;display:flex;flex-direction:column;}
.bd .card .chead{display:flex;flex-direction:column;align-items:flex-start;gap:.12rem;margin-bottom:.35rem;min-width:0;}
.bd .card h3,.bd .abundhead h3{font-family:var(--label);font-weight:600;font-size:1rem;letter-spacing:0;margin:0;color:var(--ink);}
.bd .card h3::before{content:"";display:inline-block;width:.6rem;height:.6rem;border-radius:50%;background:var(--tc,transparent);
  margin-right:.45rem;vertical-align:.08em;}
.bd .card .region{font-size:0.76rem;color:var(--ink-3);}
.bd .minihead{font-family:var(--label);font-weight:500;letter-spacing:.1em;font-size:0.68rem;text-transform:uppercase;
  color:var(--ink-3);margin-bottom:.35rem;}
.bd .miniwrap{margin-top:.9rem;padding-top:.85rem;border-top:1px dashed var(--rule);}
.bd .abundcard{padding:1.15rem 1.25rem 1.3rem;margin-bottom:1.4rem;}
.bd .abundhead{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:.7rem;}
.bd .tablecard{padding:.6rem .8rem;overflow-x:auto;}

/* ================================ CHARTS (SVG, drawn 1:1) ================================ */
.bd .chartbox{position:relative;margin-top:.4rem;min-width:0;}
.bd .chartbox svg,.bd svg.bdsvg{display:block;max-width:100%;height:auto;overflow:visible;}
.bd .axislabel{fill:var(--ink-3);font-family:var(--sans);font-size:11px;paint-order:stroke fill;stroke:var(--surface);
  stroke-width:2.6px;stroke-linejoin:round;}
.bd .axistitle{fill:var(--ink-3);font-family:var(--label);font-weight:500;letter-spacing:.04em;font-size:11px;}
.bd .barlabel{fill:var(--ink-2);font-family:var(--sans);font-size:12.5px;}
.bd .barvalue{fill:var(--ink);font-family:var(--label);font-weight:600;font-size:12.5px;}
.bd .gridline{stroke:var(--rule);stroke-width:1;shape-rendering:crispEdges;}
.bd .axisline{stroke:var(--rule-strong);stroke-width:1;shape-rendering:crispEdges;}
.bd .endlabel{font-weight:700;font-family:var(--sans);fill:var(--ink-2);paint-order:stroke fill;stroke:var(--surface);
  stroke-width:3.4px;stroke-linejoin:round;}
.bd .plotbg{fill:var(--plotbg);}
.bd .tooltip{position:absolute;pointer-events:none;background:var(--teal);color:#fff;border-radius:10px;padding:.5rem .65rem;
  font-size:0.68rem;line-height:1.5;box-shadow:0 8px 22px rgba(15,46,51,.25);opacity:0;transition:opacity .08s;z-index:5;min-width:120px;}
.bd .tooltip.show{opacity:1;}

/* Ranked bars (Growth Habit), share bars, donuts */
.bd .rbars{display:flex;flex-direction:column;gap:7px;margin:.45rem 0 0;}
.bd .rbrow{display:flex;align-items:center;gap:.55rem;min-width:0;height:14px;}
.bd .rblab{font-size:0.68rem;color:var(--ink-2);flex:0 0 4.4rem;min-width:0;line-height:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.bd .rbtrack{position:relative;flex:1 1 auto;min-width:0;height:14px;background:var(--seg);border-radius:99px;}
.bd .rbfill{position:absolute;left:0;top:2px;height:10px;border-radius:99px;min-width:3px;}
.bd .rbval{flex:0 0 4.2rem;display:flex;justify-content:flex-end;align-items:baseline;gap:.4rem;font-family:var(--label);
  font-size:0.68rem;font-weight:600;line-height:1;font-variant-numeric:tabular-nums;color:var(--ink);}
.bd .rbpct{font-family:var(--label);font-weight:500;font-size:0.68rem;color:var(--ink-3);min-width:2.1rem;text-align:right;}
.bd .dnut{display:block;margin:0 auto;max-width:420px;width:100%;height:auto;overflow:visible;}
.bd .dnut .slice{stroke:var(--surface);stroke-width:2;}
.bd .dnut .pct{font-family:var(--sans);font-size:11px;font-weight:400;}
.bd .dnut .ctrnum{font-family:var(--display);font-size:30px;font-weight:400;fill:var(--ink);}
.bd .dnut .ctrunit{font-family:var(--sans);font-size:11px;fill:var(--ink-3);}
.bd .dnutlegend{display:flex;flex-wrap:wrap;gap:.45rem .9rem;justify-content:center;font-size:0.68rem;color:var(--ink-2);margin:.85rem 0 0;}
.bd .dnutlegend .lk{display:inline-flex;align-items:center;gap:.35rem;}
.bd .dnutlegend .sw{width:10px;height:10px;border-radius:2px;display:inline-block;flex:none;}
.bd .dnutcap{font-family:var(--label);font-weight:500;letter-spacing:.06em;font-size:0.68rem;color:var(--ink-3);margin:.7rem 0 0;line-height:1.5;}

/* Panels inside cards (Plant characterization) */
.bd .plantgrid{grid-template-columns:repeat(2,minmax(0,1fr));}
@media (max-width:860px){ .bd .plantgrid{grid-template-columns:minmax(0,1fr);} }
.bd .pcgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;margin-top:.7rem;}
@media (max-width:520px){ .bd .pcgrid{grid-template-columns:minmax(0,1fr);} }
.bd .pcgrid .pcpanel.wide{grid-column:1 / -1;}
.bd .pcpanel{background:var(--surface-2);border-radius:12px;padding:.7rem .6rem .75rem;display:flex;flex-direction:column;min-width:0;}
.bd .pcpanel h4{margin:0 0 .5rem;font-family:var(--label);font-weight:500;font-size:0.68rem;letter-spacing:.1em;
  text-transform:uppercase;color:var(--ink-2);}
.bd .pcfoot{font-size:0.62rem;color:var(--ink-3);margin-top:.4rem;line-height:1.4;}
.bd .mixyr{margin-top:auto;border-top:1px solid var(--rule);padding-top:.45rem;}
.bd .mixyr > summary{list-style:none;cursor:pointer;font-family:var(--label);font-size:0.62rem;font-weight:500;
  letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);display:flex;align-items:center;gap:.35rem;padding:.15rem 0;}
.bd .mixyr > summary::-webkit-details-marker{display:none;}
.bd .bloomcal{margin:.7rem 0 0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:7px .5rem;align-items:center;}
.bd .bloomcal .brow,.bd .bloomcal .ml{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:4px;min-width:0;}
.bd .bloomcal .mc{height:15px;border-radius:3px;border:1px solid var(--rule);min-width:0;}
.bd .bloomcal .byr,.bd .bloomcal .bpk,.bd .bloomcal .ml{font-size:0.62rem;color:var(--ink-3);font-weight:600;
  font-variant-numeric:tabular-nums;text-align:center;}

/* Native against invasive */
.bd .natstats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin:.7rem 0 .2rem;}
.bd .natstat .k{font-family:var(--label);font-weight:500;font-size:0.62rem;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);}
.bd .natstat .v{font-family:var(--display);font-weight:400;font-size:1.7rem;line-height:1.15;}
.bd .natstat .s{font-size:0.68rem;color:var(--ink-3);}

/* Bare ground panels: labelled rows on a true 0 to 100% track, figure at the row end. */
.bd .bpanel{padding:1.2rem 1.35rem 1.15rem;}
.bd .bpanel .bp-eb{font-family:var(--label);font-size:.68rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;
  color:var(--ink-2);margin:0 0 .3rem;}
.bd .bpanel .bp-ds{font-size:0.82rem;color:var(--bp-muted);margin:0 0 .8rem;line-height:1.45;}
.bd .bp-row{display:grid;grid-template-columns:12.5rem minmax(0,1fr) 4.4rem;column-gap:.9rem;align-items:center;
  border-bottom:1px solid var(--bp-rowrule);min-height:2.9rem;}
.bd .bp-lab{font-size:0.88rem;color:var(--bp-ink);line-height:1.2;min-width:0;}
.bd .bp-lab small{display:block;font-size:.68rem;color:var(--bp-muted);margin-top:.1rem;}
.bd .bp-trk{background:var(--bp-track);height:.8rem;border-radius:99px;overflow:hidden;min-width:0;}
.bd .bp-trk:has(.bp-gap){background:none;height:auto;overflow:visible;}
.bd .bp-fill{height:100%;background:var(--bp-bar);border-radius:99px;min-width:3px;}
.bd .bp-gap{font-size:0.82rem;color:var(--bp-muted);}
.bd .bp-val{text-align:right;font-family:var(--label);font-weight:600;font-size:0.88rem;color:var(--ink);}
.bd .bp-val small{display:block;font-weight:400;font-size:0.68rem;color:var(--bp-muted);}
.bd .bp-foot{font-size:0.82rem;color:var(--bp-muted);margin:.85rem 0 0;line-height:1.5;}
@media (max-width:560px){ .bd .bpanel{padding:1.1rem .9rem;} .bd .bp-row{grid-template-columns:8rem minmax(0,1fr) 3.8rem;} }

/* IUCN */
.bd .iucnclear{font-size:0.88rem;line-height:1.55;color:var(--ink-2);background:var(--surface-2);border:1px solid var(--rule);
  border-left:3px solid var(--leaf);border-radius:10px;padding:1rem 1.15rem;max-width:62ch;}
.bd .ledger{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:.8rem;margin:.9rem 0 0;}
.bd .lcard{border-radius:16px;padding:.75rem .85rem .8rem;display:flex;flex-direction:column;}

/* Tables (Diversity indices, Full observation list) */
.bd .divtable,.bd .listtable{width:100%;font-size:0.82rem;}
.bd .divtable{border-collapse:separate;border-spacing:0 3px;}
.bd .divtable th,.bd .listtable th{font-family:var(--label);font-weight:500;font-size:0.62rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--ink-3);padding:.5rem .7rem;white-space:nowrap;text-align:left;}
.bd .divtable td{padding:.42rem .7rem;background:var(--surface-2);}
.bd .listwrap{margin-top:.7rem;max-height:34rem;overflow:auto;border-radius:12px;}
.bd .listtable{border-collapse:separate;border-spacing:0;}
.bd .listtable th{position:sticky;top:0;z-index:1;background:var(--surface);border-bottom:1px solid var(--rule-strong);}
.bd .listtable td{padding:.42rem .7rem;border-bottom:1px solid var(--rule);color:var(--ink-2);vertical-align:top;}
.bd .listtable .num{text-align:right;font-variant-numeric:tabular-nums;font-family:var(--label);font-weight:600;color:var(--ink);}

/* Site banner (Blooming calendar, Full observation list) */
.bd .pickbanner{display:flex;flex-wrap:wrap;gap:.4rem;margin:0 0 1rem;}
.bd .pickpill{border:none;background:var(--surface);box-shadow:var(--shadow-sm);color:var(--ink-2);font-size:0.76rem;font-weight:500;
  padding:.34rem .8rem;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;gap:.4rem;max-width:100%;}
.bd .pickpill .dot{width:8px;height:8px;border-radius:50%;background:var(--tc-pill,var(--rule-strong));}
.bd .pickpill.on{background:var(--teal);color:var(--on-teal);box-shadow:0 3px 10px rgba(15,46,51,.2);}

/* ================================ LANE L5 SECTIONS ================================ */
/* Added by L5 (05, 06, 08, 10, 12, 13). Additive only: every rule is new or names an element the
   shell did not style. Sizes on the rem scale; colours from the tokens. */

/* The app's global .card (tailwind build) draws a grey border and a hover border; dashboard cards
   are shadowed, never outlined (§1.1). */
.bd .card,.bd .card:hover{border:none;}
/* A pooled "All sites" card has no site colour, so no dot. */
.bd .card.pooled h3::before{display:none;}

/* 05 Bare ground: several sites x several years only (the line plus per-site panels). */
.bd .bpgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem;margin-top:1.1rem;}
@media (max-width:760px){ .bd .bpgrid{grid-template-columns:minmax(0,1fr);} }
@media (max-width:560px){ .bd .bp-row{grid-template-columns:7rem minmax(0,1fr) 4.6rem;column-gap:.7rem;} }
.bd .bplegend{margin:.6rem 0 0;font-size:0.76rem;}

/* 06 Plant characterization: cards stay two-up even with one site (the reference render). */
.bd .plantgrid{display:grid;gap:1.1rem;}
.bd .pcpanel h4 .scope{font-size:0.62rem;font-weight:600;letter-spacing:.04em;text-transform:none;color:var(--ink-3);
  background:var(--surface);border:1px solid var(--rule);border-radius:99px;padding:.1rem .42rem;margin-left:.4rem;vertical-align:middle;}
.bd .pcpanel .dnutlegend{margin-top:.5rem;}
.bd .pcempty{font-size:0.76rem;color:var(--ink-3);padding:1.6rem .4rem;text-align:center;border:1px dashed var(--rule-strong);
  border-radius:10px;margin-top:.5rem;line-height:1.5;}
.bd .bloomscale{display:flex;align-items:center;flex-wrap:wrap;gap:.35rem;font-size:0.62rem;color:var(--ink-3);margin-top:.45rem;}
.bd .bloomscale .sw{width:13px;height:9px;border-radius:2px;display:inline-block;border:1px solid var(--rule);}
.bd .bloomcal .ml span{display:block;}
.bd .bloomcal .bpk{min-width:1.4rem;}
.bd .mixbody{padding-top:.4rem;}

/* 08 Pollinator community */
.bd .donutcard .donutlegend{margin-top:auto;padding-top:.75rem;}
.bd .donutcard .dnutyear{text-align:center;margin-top:.35rem;}
.bd .pcwarn{font-size:0.76rem;color:var(--ink-2);background:var(--poll-soft);border-left:3px solid var(--ht-amber-d);
  border-radius:0 6px 6px 0;padding:.55rem .75rem;margin:.9rem 0 0;line-height:1.5;}

/* 10 IUCN: coverage sentence, two-scale bar, ledger cards, watchlist */
.bd .iucnsummary{font-size:0.82rem;color:var(--ink-2);line-height:1.6;background:var(--surface);border-radius:14px;
  box-shadow:var(--shadow);padding:.8rem 1rem;margin-bottom:1.1rem;}
.bd .iucnsummary b{color:var(--ink);}
.bd .iucn2{background:var(--surface);border-radius:16px;box-shadow:var(--shadow);padding:1rem 1.1rem .9rem;}
.bd .iucnbar{position:relative;display:flex;width:100%;height:34px;border-radius:6px;background:var(--surface-2);}
.bd .iucnbar .iseg{height:100%;min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden;
  white-space:nowrap;font-family:var(--label);font-weight:600;font-size:0.68rem;color:#14170f;box-shadow:inset -1.5px 0 0 var(--surface);}
.bd .iucnbar .iseg:first-child{border-radius:6px 0 0 6px;}
.bd .iucnbar .iseg:last-child{border-radius:0 6px 6px 0;box-shadow:none;}
.bd .iucnbar.lower{height:30px;}
.bd .iucnbar.lower .iseg{color:#ffffff;font-size:0.82rem;}
.bd .iucnspan{position:absolute;top:-4px;bottom:-4px;right:-2px;min-width:8px;border:2px solid var(--ink);border-radius:5px;pointer-events:none;}
.bd .iucnwedge{height:30px;background:color-mix(in srgb, var(--ink) 9%, transparent);margin:4px 0 0;}
.bd .iucnnames{display:flex;width:100%;margin-top:.3rem;}
.bd .iucnnames .iname{min-width:0;text-align:center;font-size:0.68rem;color:var(--ink-2);line-height:1.3;padding:0 2px;white-space:nowrap;}
/* When a category name is wider than its segment (a phone), the names become a legend instead. */
.bd .iucnnames.aslegend{justify-content:flex-start;margin-top:.5rem;}
.bd .iucncap,.bd .iucnnote{font-size:0.68rem;color:var(--ink-3);margin-top:.6rem;line-height:1.5;}
.bd .lcard{border-top:3px solid var(--tc,var(--rule-strong));}
.bd .lcard.tint-warn{background:color-mix(in srgb, var(--iucn-vu) 9%, var(--surface));
  box-shadow:var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--iucn-vu) 24%, transparent);}
.bd .lcard.tint-alarm{background:color-mix(in srgb, var(--iucn-en) 10%, var(--surface));
  box-shadow:var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--iucn-en) 26%, transparent);}
.bd .lcard .lh{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem;min-width:0;}
.bd .lcard .lh b{font-size:0.88rem;font-weight:600;min-width:0;}
.bd .lcard .lnum{font-family:var(--display);font-weight:400;font-size:1.5rem;line-height:1;font-variant-numeric:tabular-nums;}
.bd .lcard .lreg{font-size:0.68rem;color:var(--ink-3);margin-top:.1rem;}
.bd .lcard .lworst{margin:.5rem 0 .1rem;}
.bd .lcard .lsp{display:flex;gap:.42rem;align-items:flex-start;font-size:0.76rem;color:var(--ink-2);margin-top:.45rem;min-width:0;}
.bd .lcard .lsp em{font-style:normal;color:var(--ink-3);font-size:0.68rem;}
.bd .lcard .ldot{width:8px;height:8px;border-radius:50%;flex:none;margin-top:.28rem;}
.bd .lcard .lnone{font-size:0.76rem;color:var(--ink-3);margin-top:.5rem;}
.bd .lcard .mixyr{margin-top:auto;padding-top:.45rem;}
.bd .iucnmix{display:flex;flex-direction:column;gap:4px;}
.bd .imrow{display:flex;align-items:center;gap:.45rem;font-size:0.68rem;color:var(--ink-3);}
.bd .imy{width:2.1rem;flex:none;font-weight:600;font-variant-numeric:tabular-nums;}
.bd .imbar{flex:1 1 auto;min-width:0;height:9px;border-radius:2px;background:var(--surface-2);overflow:hidden;}
.bd .imfill{display:block;height:9px;border-radius:2px;}
.bd .imn{flex:0 0 4.1rem;text-align:right;font-variant-numeric:tabular-nums;}
.bd .imn b{color:var(--ink);}
.bd .impct{flex:0 0 3rem;text-align:right;font-variant-numeric:tabular-nums;color:var(--ink-2);font-weight:600;}
.bd .iucnallmix{margin:1.3rem 0 0;max-width:34rem;}
.bd .watchlist{display:flex;flex-direction:column;gap:.5rem;}
.bd .wrow{display:grid;grid-template-columns:minmax(7.5rem,auto) minmax(0,1.3fr) minmax(0,1.6fr) auto;gap:.75rem;align-items:center;
  background:var(--surface);border-radius:14px;box-shadow:var(--shadow);padding:.65rem .85rem;}
.bd .wname{font-size:0.88rem;color:var(--ink);min-width:0;}
.bd .wname i{font-weight:600;}
.bd .wcommon{display:block;font-size:0.68rem;color:var(--ink-3);}
.bd .wwhere{display:flex;flex-wrap:wrap;gap:.3rem .8rem;font-size:0.68rem;color:var(--ink-2);min-width:0;}
.bd .wwhere .wsite b{color:var(--ink);font-weight:600;}
.bd .wstatus{font-size:0.68rem;font-family:var(--label);}
.bd .wpresent{color:var(--loss);font-weight:600;}
.bd .wabsent{color:var(--ink-3);}
.bd .iucnfoot{margin-top:.9rem;}
@media (max-width:820px){ .bd .wrow{grid-template-columns:minmax(0,1fr);gap:.35rem;} }

/* 12 Blooming calendar: DOM rows on a 12-column track (percent widths, nothing scales). */
.bd .bloomsub{font-size:0.82rem;color:var(--ink-2);margin:.35rem 0 .9rem;}
.bd .bloomlegend{justify-content:flex-start;margin:0 0 .9rem;}
.bd .bcal-row{display:grid;grid-template-columns:minmax(0,15rem) minmax(0,1fr) 5.4rem;gap:.9rem;align-items:center;
  padding:.36rem 0;border-bottom:1px solid var(--rule);}
.bd .bcal-row:last-child{border-bottom:none;}
.bd .bcal-head{border-bottom:1px solid var(--rule-strong);padding-bottom:.4rem;}
.bd .bcal-head .bcal-sp,.bd .bcal-head .bcal-val,.bd .bcal-head .bcal-months{font-family:var(--label);font-weight:500;
  font-size:0.62rem;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);}
.bd .bcal-months{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));text-align:center;min-width:0;}
.bd .bcal-sp{min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:.3rem;}
.bd .bnm{font-size:0.88rem;color:var(--ink);overflow-wrap:anywhere;}
.bd .bsc{font-size:0.68rem;color:var(--ink-3);font-style:italic;overflow-wrap:anywhere;}
.bd .bsites{font-size:0.62rem;color:var(--ink-3);font-family:var(--label);}
.bd .bcal-track{position:relative;height:1rem;border-radius:4px;min-width:0;
  background:repeating-linear-gradient(to right,var(--surface-2) 0 calc(100%/12 - 3px),transparent calc(100%/12 - 3px) calc(100%/12));}
.bd .bbar{position:absolute;top:50%;transform:translateY(-50%);height:.6rem;border-radius:999px;}
.bd .bcal-val{text-align:right;min-width:0;}
.bd .bval{font-family:var(--label);font-weight:600;font-size:.82rem;color:var(--ink);font-variant-numeric:tabular-nums;line-height:1.1;display:block;}
.bd .bval.dim{font-weight:500;color:var(--ink-3);font-size:0.68rem;}
.bd .bunit{display:block;font-family:var(--label);font-weight:500;font-size:.52rem;letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-3);margin-top:1px;}
.bd .bcal-total{border-bottom:1px solid var(--rule-strong);padding-bottom:.5rem;}
.bd .bcal-tot{align-items:end;}
.bd .bcal-tot > span{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:2px;min-width:0;}
.bd .btotbar{display:block;width:58%;max-width:1.4rem;border-radius:3px 3px 0 0;background:var(--ht-sage);}
.bd .btotn{font-family:var(--label);font-size:0.62rem;color:var(--ink-3);font-variant-numeric:tabular-nums;line-height:1;}
@media (max-width:760px){
  .bd .bcal-row{grid-template-columns:minmax(0,1fr) 4.4rem;gap:.35rem .5rem;}
  .bd .bcal-track{grid-column:1 / -1;}
  .bd .bcal-head .bcal-months{display:none;}
  .bd .bcal-val{grid-column:2;grid-row:1;}
  .bd .bcal-total .bcal-tot{grid-column:1 / -1;grid-row:2;}
  .bd .bcal-tot .btotn{font-size:.5rem;}
}

/* 13 Full observation list */
.bd .listcard .region b{color:var(--ink);}
.bd .listtable tr:last-child td{border-bottom:none;}
.bd .listtable .sci i{font-style:italic;color:var(--ink);}
.bd .listtable .sc-com{display:none;}
.bd .listtable .lsites{text-align:right;font-variant-numeric:tabular-nums;}
.bd .listtable th.num,.bd .listtable th.lsites{text-align:right;}
.bd .listdash{color:var(--ink-3);font-size:0.76rem;}
@media (max-width:640px){
  /* A phone folds the common name under the scientific name and lets the status wrap, so the table
     fits its card instead of scrolling sideways. */
  .bd .listtable th.com,.bd .listtable td.com,.bd .listtable th.grp,.bd .listtable td.grp{display:none;}
  .bd .listtable .sc-com{display:block;font-size:0.68rem;color:var(--ink-3);}
  .bd .listtable th,.bd .listtable td{padding:.42rem .35rem;}
  .bd .listtable th{white-space:normal;}
  .bd .listtable td.sci{overflow-wrap:break-word;}
  .bd .listtable{table-layout:fixed;}
  .bd .listtable th.num,.bd .listtable td.num{width:2.6rem;}
  .bd .listtable th.iucn,.bd .listtable td.iucn{width:5.6rem;}
  .bd .listtable th.lsites,.bd .listtable td.lsites{width:2.9rem;}
  .bd .listtable .wchip{white-space:normal;font-size:.52rem;padding:.15rem .4rem;letter-spacing:.02em;}
}

/* ================================ PHASE 2: TURNOVER AND MOVERS ================================ */
/* 04 Species turnover: the overview card (lines) reuses .abundcard; the two-year bars reuse the
   bare-ground .bpanel rows. Footnote under either form. */
.bd .turnovercard{margin-bottom:0;}
.bd [data-bd-turnover-foot]{max-width:56rem;}

/* 01 Site trajectories, several years: the key under the nativity mini (bars grouped by year). */
.bd .minikey{margin-top:.45rem;font-size:0.76rem;gap:.3rem 1rem;}

/* 11 Biggest movers */
.bd .moversbar{margin:0 0 .6rem;}
.bd .mvkey{gap:.4rem .5rem;margin:0 0 1.1rem;}
.bd .mvkey .lk{background:var(--surface);box-shadow:var(--shadow-sm, 0 1px 3px rgba(15,46,51,.08));border-radius:999px;
  padding:.24rem .65rem;font-size:0.76rem;color:var(--ink-2);gap:.4rem;}
.bd .movercols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.1rem 1.6rem;margin-top:.6rem;}
@media (max-width:520px){ .bd .movercols{grid-template-columns:minmax(0,1fr);} }
.bd .movercols h4{display:flex;align-items:center;gap:.4rem;font-family:var(--label);font-weight:500;font-size:0.62rem;
  letter-spacing:.1em;text-transform:uppercase;color:var(--ink-2);margin:0 0 .55rem;}
.bd .mvar{font-size:0.62rem;}
.bd .mvar.gain{color:var(--gain);} .bd .mvar.loss{color:var(--loss);}
.bd .mv{padding:.38rem 0 .5rem;border-bottom:1px solid var(--rule);min-width:0;}
.bd .mv:last-child{border-bottom:none;}
.bd .mvtop{display:flex;align-items:center;gap:.45rem;min-width:0;}
.bd .mvdot{width:.55rem;height:.55rem;border-radius:50%;flex:none;display:inline-block;}
/* No status for the selection (species_status absent): neutral, a hollow ring. */
.bd .mvdot.st-none{background:transparent;box-shadow:inset 0 0 0 1.5px var(--ink-3);}
.bd .mvname{font-size:0.82rem;color:var(--ink);line-height:1.3;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.bd .mvname::first-letter{text-transform:uppercase;}
/* Names coloured by status. Introduced keeps ink: its grey is too light for text on the card, and
   its grey dot already says it. */
.bd .mvname.st-native{color:var(--status-native);}
.bd .mvname.st-invasive{color:var(--status-invasive);}
.bd .mvname.st-introduced,.bd .mvname.st-none{color:var(--ink);}
.bd .mvchip{flex:none;font-size:0.56rem;padding:.12rem .42rem;}
.bd .mvd{margin-left:auto;flex:none;font-family:var(--label);font-weight:600;font-size:.76rem;font-variant-numeric:tabular-nums;
  border-radius:999px;padding:.08rem .5rem;}
.bd .mvd.gain{color:var(--gain);background:color-mix(in srgb, var(--gain) 12%, var(--surface));}
.bd .mvd.loss{color:var(--loss);background:color-mix(in srgb, var(--loss) 12%, var(--surface));}
.bd .mvbar{height:5px;border-radius:99px;background:var(--seg);margin:.35rem 0 0 1rem;overflow:hidden;}
.bd .mvbar span{display:block;height:100%;border-radius:99px;}
.bd .mvbar .gain{background:color-mix(in srgb, var(--gain) 75%, var(--surface));}
.bd .mvbar .loss{background:color-mix(in srgb, var(--loss) 75%, var(--surface));}
.bd .movnone{font-size:0.82rem;color:var(--ink-3);padding:.3rem 0;}

/* ================================ SPECIES INVENTORIES ================================ */
/* BTX-513 (SPEC.md §4). Every species is in the DOM; the list scrolls inside a box exactly fifteen
   WHOLE rows tall, so the card is the same height at 15 species and at 560. --invrow is the
   measured height of one .invrow at this type size on a 10px bar: change either and re-measure it,
   or the fifteenth row is cut at the fold (test/system/biodiversity_dashboard_inventory_test.rb
   checks it). */
.bd .invgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;--invrow:17.3px;}
@media (max-width:900px){ .bd .invgrid{grid-template-columns:minmax(0,1fr);} }
.bd .invrows{display:flex;flex-direction:column;gap:.3rem;margin:.1rem 0 .9rem;
  max-height:calc(15 * var(--invrow) + 14 * 0.3rem);
  overflow-y:auto;overscroll-behavior:contain;padding-right:.4rem;
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb, var(--ink-3) 35%, transparent) transparent;}
.bd .invrows::-webkit-scrollbar{width:8px;}
.bd .invrows::-webkit-scrollbar-track{background:transparent;}
.bd .invrows::-webkit-scrollbar-thumb{border-radius:4px;background:color-mix(in srgb, var(--ink-3) 35%, transparent);}
.bd .invrows::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb, var(--ink-3) 55%, transparent);}
.bd .invrow{display:flex;align-items:center;gap:.5rem;font-size:0.72rem;color:var(--ink-2);flex:none;}
/* Right-aligned like the spec's text-align:right, but as a flex row whose parts each clip with their
   own ellipsis, so no part reports a box past the card. The italic name gives way first (as in the
   reference render). The common name never shrinks (a sub-pixel shrink would still ellipsize it); it
   is capped instead, so the italic name keeps about three letters and the brackets never close on
   nothing. */
.bd .invname{flex:0 0 46%;display:flex;justify-content:flex-end;min-width:0;overflow:hidden;white-space:nowrap;}
.bd .invname > *{min-width:0;overflow:hidden;text-overflow:ellipsis;}
.bd .invname > .cn{flex:0 0 auto;max-width:calc(100% - 4em);}
.bd .invname > .p{flex:none;white-space:pre;}
.bd .invname i{font-style:italic;color:var(--ink-3);}
.bd .invbar{flex:1 1 auto;background:color-mix(in srgb, var(--surface) 70%, transparent);border-radius:2px;overflow:hidden;}
.bd .invfill{display:block;height:10px;border-radius:2px;}
.bd .invn{flex:0 0 2.2rem;text-align:right;font-variant-numeric:tabular-nums;font-weight:600;color:var(--ink);}
.bd .invfoot{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;margin-top:.2rem;}
.bd .invfoot .st{display:flex;flex-direction:column;gap:.1rem;background:var(--surface);border:none;
  border-top:3px solid var(--teal);border-radius:12px;padding:.65rem .8rem .6rem;min-width:0;}
.bd .invfoot .st .k{font-family:var(--label);font-size:.62rem;font-weight:500;letter-spacing:.09em;
  text-transform:uppercase;color:var(--ink-3);}
.bd .invfoot .st .v{font-family:var(--display);font-weight:400;font-size:1.5rem;line-height:1.15;color:var(--ink);}
.bd .invmore{font-size:.68rem;color:var(--ink-3);margin:.2rem 0 0;}
.bd .invmore .pr{display:none;}

/* ================================ FOOTER ================================ */
.bd footer.page{margin-top:2.6rem;padding-top:1.4rem;border-top:1px solid var(--rule);color:var(--ink-3);font-size:0.76rem;}

@media (prefers-reduced-motion:reduce){ .bd *{transition:none !important;} html:has(.bd){scroll-behavior:auto;} }
/* Smooth only once the page has drawn. While it loads, the browser's and Turbo's jump to a
   #section (Home's "All records in Data") must be instant: a smooth scroll crawls toward a
   section that is still moving down as the sections above it fill (BTX-537 follow-up). */
html:has(.bd[data-bd-state="ready"]){scroll-behavior:smooth;}
