/* ============================================================================
   Regional Garden — a field guide to native plants.

   Design language: a modern naturalist's field guide. Warm bone paper, deep
   botanical ink, a fern-green spine colour, and a per-collection accent that
   tints each page. Plant cards are "specimen plates" — soft pressed-botanical
   washes behind a botanical line-glyph. Self-hosted Fraunces (display) + Inter
   (text), so there is no Google Fonts dependency. Light is the default; a
   toggle drops the whole thing into a forest-night palette.
   ============================================================================ */

/* ------------------------------- Fonts ----------------------------------- */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url("/assets/fonts/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900;
  font-display: swap; src: url("/assets/fonts/inter.woff2") format("woff2");
}

/* ------------------------------- Tokens ---------------------------------- */
:root {
  --paper:     #FAF8F1;   /* warm bone background */
  --paper-2:   #F2EEE2;   /* recessed panels */
  --surface:   #FFFDF8;   /* cards */
  --surface-2: #F7F3E9;
  --ink:       #1B2A21;   /* deep botanical ink */
  --ink-soft:  #5A6157;   /* AA on paper */
  --ink-faint: #66695F;   /* AA (4.8:1) on paper, surface-2 AND paper-2 */
  --line:      #E4DECF;
  --line-soft: #EEE9DC;

  --fern:      #3F6B4A;   /* primary spine green */
  --fern-ink:  #305A3C;   /* AA text green on paper */
  --fern-bg:   #E7EFE4;
  --bark:      #7A5A3C;   /* warm secondary (soil/wood) */
  --bloom:     #C68A2E;   /* goldenrod */

  --display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 2px rgba(27,42,33,.05), 0 3px 10px rgba(27,42,33,.05);
  --shadow:    0 6px 18px rgba(27,42,33,.07), 0 22px 48px rgba(27,42,33,.09);
  --shadow-lg: 0 12px 28px rgba(27,42,33,.10), 0 36px 74px rgba(27,42,33,.14);

  --radius:    14px;
  --radius-lg: 26px;
  --wrap:      76rem;
  --measure:   40rem;

  --grain-opacity: .035;
  --grain-blend: multiply;

  /* the page accent — defaults to fern, overridden by .cat-* on <body> */
  --c:    var(--fern);
  --c-ink: var(--fern-ink);
  --c-bg:  var(--fern-bg);
}

/* per-collection accents (set on <body>) ------------------------------------ */
.cat-leaf   { --c:#3F6B4A; --c-ink:#305A3C; --c-bg:#E7EFE4; }  /* fern green   */
.cat-bloom  { --c:#C68A2E; --c-ink:#8A5E16; --c-bg:#F6EBD4; }  /* goldenrod    */
.cat-wing   { --c:#C56A3B; --c-ink:#9A4D24; --c-bg:#F6E4D8; }  /* monarch clay */
.cat-jewel  { --c:#A8497E; --c-ink:#8A3766; --c-bg:#F3E1EC; }  /* coneflower   */
.cat-sky    { --c:#3E7A8C; --c-ink:#2E6071; --c-bg:#DDEDF0; }  /* river blue   */
.cat-earth  { --c:#9A6A3A; --c-ink:#7A5026; --c-bg:#F0E6D6; }  /* soil amber   */
.cat-sun    { --c:#B98A2A; --c-ink:#8A6212; --c-bg:#F5ECD3; }  /* sun gold     */
.cat-shade  { --c:#3A6657; --c-ink:#2C5346; --c-bg:#E2EDE7; }  /* deep teal    */

:root[data-theme="dark"] {
  --paper:     #14140F;
  --paper-2:   #1C1C15;
  --surface:   #1E1F17;
  --surface-2: #25261C;
  --ink:       #ECE7D7;
  --ink-soft:  #B3AE9C;
  --ink-faint: #979280;   /* AA (4.9:1) on dark surfaces */
  --line:      #322F25;
  --line-soft: #2A281F;

  --fern:      #8FBE99;
  --fern-ink:  #A6D2AF;
  --fern-bg:   #1C271F;
  --bark:      #C49A6E;
  --bloom:     #E0B25E;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 3px 12px rgba(0,0,0,.4);
  --shadow:    0 8px 22px rgba(0,0,0,.5), 0 28px 56px rgba(0,0,0,.55);
  --shadow-lg: 0 14px 30px rgba(0,0,0,.55), 0 40px 80px rgba(0,0,0,.65);

  --grain-opacity: .05;
  --grain-blend: overlay;
}
:root[data-theme="dark"] .cat-leaf  { --c:#8FBE99; --c-ink:#A6D2AF; --c-bg:#1C271F; }
:root[data-theme="dark"] .cat-bloom { --c:#E0B25E; --c-ink:#EBC57E; --c-bg:#2B2415; }
:root[data-theme="dark"] .cat-wing  { --c:#DB9168; --c-ink:#E7A782; --c-bg:#2C1F16; }
:root[data-theme="dark"] .cat-jewel { --c:#D087AE; --c-ink:#DD9FC0; --c-bg:#2A1B24; }
:root[data-theme="dark"] .cat-sky   { --c:#73AFBF; --c-ink:#90C4D1; --c-bg:#16242A; }
:root[data-theme="dark"] .cat-earth { --c:#C49A6E; --c-ink:#D2AE85; --c-bg:#271E13; }
:root[data-theme="dark"] .cat-sun   { --c:#D9AC55; --c-ink:#E6C078; --c-bg:#272013; }
:root[data-theme="dark"] .cat-shade { --c:#7BB3A0; --c-ink:#97C6B6; --c-bg:#172420; }

/* specimen-plate tints (per bloom colour, set on .plant-card) ---------------- */
.tint-gold    { --pa:#F4E6C2; --pb:#EAD49A; --pg:#B07F23; }
.tint-orange  { --pa:#F6DEC8; --pb:#EEC4A0; --pg:#B5572A; }
.tint-red     { --pa:#F2D4CC; --pb:#E6AEA2; --pg:#A83C32; }
.tint-pink    { --pa:#F4DCE2; --pb:#EBC2CE; --pg:#B05576; }
.tint-magenta { --pa:#EFD3E1; --pb:#E2B2CC; --pg:#9C3E73; }
.tint-purple  { --pa:#E3DCEC; --pb:#CDBEDF; --pg:#6B4E94; }
.tint-blue    { --pa:#D4E2E8; --pb:#B4CCD9; --pg:#356074; }
.tint-white   { --pa:#EFEDE3; --pb:#DED9C8; --pg:#6E6A56; }
.tint-cream   { --pa:#F2ECD9; --pb:#E4D9BE; --pg:#8A7638; }
.tint-green   { --pa:#DEE7D4; --pb:#C2D2B2; --pg:#4C6B3C; }
.tint-silver  { --pa:#E4E6DD; --pb:#CCD1C4; --pg:#5E6655; }

:root[data-theme="dark"] .plant-card { filter: saturate(.92) brightness(.9); }

/* -------------------------------- Base ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.72;
  font-feature-settings: "kern", "liga", "cv05", "ss03";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}
/* subtle film grain over everything (tactile, premium) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2147483646; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
::selection { background: var(--c-bg); color: var(--ink); }

a { color: var(--c-ink); text-decoration: none; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--display); font-weight: 560; line-height: 1.1;
  letter-spacing: -0.015em; color: var(--ink); margin: 0 0 .5em;
  font-optical-sizing: auto; text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 1.45rem + 3.2vw, 3.6rem); font-weight: 480; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.55rem, 1.15rem + 1.7vw, 2.2rem); margin-top: 1.7em; }
h3 { font-size: 1.35rem; margin-top: 1.4em; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
strong { font-weight: 650; }
em { font-style: italic; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }
.wrap-narrow { max-width: 46rem; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55em; font-family: var(--sans);
  font-weight: 600; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--c-ink); margin: 0 0 1rem;
}
.eyebrow svg { width: 15px; height: 15px; }
.eyebrow.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; }

.skip { position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--fern-ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }

/* ------------------------------- Buttons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: .95rem; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  padding: .9em 1.4em; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink); background: var(--surface);
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--ink-faint); color: var(--ink); }
.btn-primary { background: var(--fern-ink); color: #fff; border-color: var(--fern-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: var(--shadow); }
:root[data-theme="dark"] .btn-primary { color: #11140f; }
:root[data-theme="dark"] .btn-primary:hover { background: var(--fern); color: #11140f; }
.btn-ghost { background: transparent; }
.btn-sm { padding: .6em 1em; font-size: .86rem; }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* -------------------------------- Header --------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 74%, transparent);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s ease, background-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--paper) 88%, transparent); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--display);
  font-weight: 560; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; }
.nav { display: flex; gap: .1rem; margin-left: auto; align-items: center; }
.nav a { position: relative; color: var(--ink-soft); font-weight: 500; font-size: .96rem;
  padding: .5rem .75rem; border-radius: 9px; transition: color .2s ease; }
.nav a::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .3rem; height: 1.5px;
  background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; border-radius: 2px; }
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: .5rem; margin-left: .4rem; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px;
  cursor: pointer; transition: border-color .2s ease, color .2s ease, transform .2s ease; }
.icon-btn:hover { border-color: var(--ink-faint); color: var(--c-ink); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; } .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
.nav-toggle { display: none; }

/* -------------------------------- Hero ----------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 2rem + 6vw, 6rem) clamp(2.5rem, 2rem + 4vw, 4.5rem); }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 80% -10%, var(--fern-bg) 0%, transparent 55%),
    radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, var(--bloom) 14%, transparent) 0%, transparent 50%);
  opacity: .9; }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 1rem + 4vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero h1 .seed { color: var(--fern-ink); font-style: italic; }
.hero-lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 34rem; margin-bottom: 1.6rem; }
.hero-art { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; }
.hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 18px 40px rgba(27,42,33,.16)); }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-stats .stat b { display: block; font-family: var(--display); font-size: 1.7rem; font-weight: 520; color: var(--ink); line-height: 1; }
.hero-stats .stat span { font-size: .82rem; color: var(--ink-faint); letter-spacing: .04em; }

/* ------------------------------ State finder ----------------------------- */
.finder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow); max-width: 34rem; }
.finder-label { display: flex; align-items: center; gap: .5rem; font-family: var(--display);
  font-size: 1.15rem; color: var(--ink); margin-bottom: .9rem; }
.finder-label svg { width: 20px; height: 20px; color: var(--fern-ink); }
.finder-row { display: flex; gap: .6rem; }
.finder-select {
  flex: 1 1 auto; appearance: none; -webkit-appearance: none; font-family: var(--sans);
  font-size: 1rem; font-weight: 500; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: .85em 2.4em .85em 1.2em; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6157' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.1em center;
  transition: border-color .2s ease, box-shadow .2s ease; }
.finder-select:focus-visible { outline: none; border-color: var(--fern); box-shadow: 0 0 0 3px var(--fern-bg); }
.finder .btn-primary { flex: 0 0 auto; }
.finder-hint { margin: .85rem 0 0; font-size: .85rem; color: var(--ink-faint); }

/* ------------------------------- Sections -------------------------------- */
.section { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.section-tight { padding-block: clamp(1.6rem, 1.2rem + 2vw, 2.6rem); }
.section-head { max-width: 42rem; margin-bottom: 2rem; }
.section-head.center { margin-inline: auto; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }
.panel { background: var(--paper-2); }

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; font-size: .85rem;
  color: var(--ink-faint); margin: 0 0 1.2rem; list-style: none; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; gap: .5rem; }
.crumbs li:not(:last-child)::after { content: "›"; color: var(--ink-faint); margin-left: .2rem; }
.crumbs a { color: var(--ink-soft); } .crumbs a:hover { color: var(--c-ink); }

/* ------------------------- Plant cards (specimens) ----------------------- */
.plant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 1.4rem; }
.plant-card { position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s ease, border-color .25s ease; }
.plant-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--pg) 40%, var(--line)); }
.plant-plate { position: relative; display: block; aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, var(--pa), var(--pb)); overflow: hidden; }
.plant-plate .glyph { position: absolute; right: -8%; bottom: -12%; width: 76%; height: auto;
  color: var(--pg); opacity: .42; transform: rotate(-6deg); transition: transform .4s ease; }
.plant-card:hover .plant-plate .glyph { transform: rotate(-2deg) scale(1.04); }
/* per-species drawn illustration — centred "pressed specimen" */
.specimen-art { position: absolute; inset: 0; margin: auto; height: 90%; width: auto; max-width: 66%;
  filter: drop-shadow(0 5px 9px rgba(27,42,33,.11)); transition: transform .4s cubic-bezier(.2,.7,.3,1); }
.plant-card:hover .specimen-art { transform: translateY(-2px) scale(1.035); }
.specimen-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plant-plate .plate-tag { position: absolute; left: .8rem; top: .8rem; font-family: var(--sans);
  font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(4px); padding: .28em .6em; border-radius: 999px; }
.plant-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.plant-name { font-size: 1.18rem; margin: 0 0 .1rem; line-height: 1.15; }
.plant-name a { color: var(--ink); } .plant-card:hover .plant-name a { color: var(--c-ink); }
.plant-sci { font-family: var(--display); font-style: italic; font-size: .95rem; color: var(--ink-soft); margin: 0 0 .6rem; }
.plant-blurb { font-size: .92rem; color: var(--ink-soft); margin: 0 0 .9rem; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0 0 .7rem; }
.chip { display: inline-flex; align-items: center; gap: .35em; font-size: .76rem; font-weight: 500;
  color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line-soft);
  padding: .28em .6em; border-radius: 8px; }
.chip svg { width: 13px; height: 13px; color: var(--ink-faint); }
.wild-row { display: flex; gap: .45rem; list-style: none; padding: 0; margin: auto 0 0; padding-top: .8rem;
  border-top: 1px solid var(--line-soft); }
.wild-row li { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--c-bg); color: var(--c-ink); }
.wild-row li svg { width: 15px; height: 15px; }

/* "more matches" trailing note on capped archives */
.more-note { margin-top: 1.6rem; font-size: .95rem; color: var(--ink-soft); }

/* --------------------------- Collection cards ---------------------------- */
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
/* the homepage "how it works" trio: a true 3-up so body copy gets a real measure */
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.steps-grid .coll-card { align-items: flex-start; }
.steps-grid .coll-card p { font-size: .92rem; color: var(--ink-soft); }
@media (max-width: 720px) { .steps-grid { grid-template-columns: 1fr; } }
.coll-card { display: flex; align-items: flex-start; gap: .9rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow-sm); transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s ease, border-color .22s ease; }
.coll-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--c); }
.coll-ico { flex: 0 0 auto; display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; background: var(--c-bg); color: var(--c-ink); }
.coll-ico svg { width: 22px; height: 22px; }
.coll-card h3 { font-family: var(--sans); font-weight: 650; font-size: 1.02rem; margin: .05rem 0 .15rem; color: var(--ink); }
.coll-card p { font-size: .82rem; color: var(--ink-faint); margin: 0; }
/* let each collection card carry its own accent */
.coll-card.cat-leaf{--c:#3F6B4A;--c-ink:#305A3C;--c-bg:#E7EFE4;} .coll-card.cat-bloom{--c:#C68A2E;--c-ink:#8A5E16;--c-bg:#F6EBD4;}
.coll-card.cat-wing{--c:#C56A3B;--c-ink:#9A4D24;--c-bg:#F6E4D8;} .coll-card.cat-jewel{--c:#A8497E;--c-ink:#8A3766;--c-bg:#F3E1EC;}
.coll-card.cat-sky{--c:#3E7A8C;--c-ink:#2E6071;--c-bg:#DDEDF0;} .coll-card.cat-earth{--c:#9A6A3A;--c-ink:#7A5026;--c-bg:#F0E6D6;}
.coll-card.cat-sun{--c:#B98A2A;--c-ink:#8A6212;--c-bg:#F5ECD3;} .coll-card.cat-shade{--c:#3A6657;--c-ink:#2C5346;--c-bg:#E2EDE7;}
:root[data-theme="dark"] .coll-card.cat-leaf{--c:#8FBE99;--c-ink:#A6D2AF;--c-bg:#1C271F;} :root[data-theme="dark"] .coll-card.cat-bloom{--c:#E0B25E;--c-ink:#EBC57E;--c-bg:#2B2415;}
:root[data-theme="dark"] .coll-card.cat-wing{--c:#DB9168;--c-ink:#E7A782;--c-bg:#2C1F16;} :root[data-theme="dark"] .coll-card.cat-jewel{--c:#D087AE;--c-ink:#DD9FC0;--c-bg:#2A1B24;}
:root[data-theme="dark"] .coll-card.cat-sky{--c:#73AFBF;--c-ink:#90C4D1;--c-bg:#16242A;} :root[data-theme="dark"] .coll-card.cat-earth{--c:#C49A6E;--c-ink:#D2AE85;--c-bg:#271E13;}
:root[data-theme="dark"] .coll-card.cat-sun{--c:#D9AC55;--c-ink:#E6C078;--c-bg:#272013;} :root[data-theme="dark"] .coll-card.cat-shade{--c:#7BB3A0;--c-ink:#97C6B6;--c-bg:#172420;}

/* ------------------------------ State index ------------------------------ */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; }
.state-link { display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: .7rem .9rem; color: var(--ink); font-weight: 500; font-size: .95rem;
  transition: border-color .18s ease, transform .18s ease, color .18s ease; }
.state-link:hover { border-color: var(--fern); color: var(--fern-ink); transform: translateY(-2px); }
.state-link .ab { font-size: .72rem; color: var(--ink-faint); font-weight: 600; letter-spacing: .04em; }

/* ----------------------------- Region map -------------------------------- */
.region-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.region-pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 500;
  color: var(--c-ink); background: var(--c-bg); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  padding: .4em .8em; border-radius: 999px; }

/* ------------------------- Profile (field guide) ------------------------- */
.profile-head { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); gap: clamp(2rem, 1.2rem + 5vw, 5rem); align-items: start; }
.profile-plate { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; position: relative;
  background: linear-gradient(150deg, var(--pa), var(--pb)); box-shadow: var(--shadow); }
.profile-plate .glyph { position: absolute; right: -4%; bottom: -8%; width: 64%; color: var(--pg); opacity: .5; transform: rotate(-5deg); }
.profile-plate .specimen-art { position: absolute; inset: 0; margin: auto; height: 88%; width: auto; max-width: 56%;
  filter: drop-shadow(0 8px 16px rgba(27,42,33,.14)); }
.profile-plate .plate-cap { position: absolute; left: 1.1rem; bottom: 1.1rem; font-family: var(--display);
  font-style: italic; font-size: 1rem; color: var(--ink); background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(4px); padding: .3em .7em; border-radius: 999px; }
.profile-head h1 { margin-top: .3rem; }
.profile-sci { font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--ink-soft); margin: -.2rem 0 1rem; }
.profile-lede { font-size: 1.1rem; color: var(--ink-soft); }

/* spec sheet */
.spec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); }
.spec dl { margin: 0; }
.spec .row { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .7rem 1.1rem;
  border-top: 1px solid var(--line-soft); align-items: baseline; }
.spec .row:first-child { border-top: 0; }
.spec dt { font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint);
  display: inline-flex; align-items: center; gap: .45em; margin: 0; }
.spec dt svg { width: 14px; height: 14px; color: var(--c-ink); }
.spec dd { margin: 0; font-size: .96rem; color: var(--ink); font-weight: 500; }

.prose { max-width: var(--measure); font-size: 1.075rem; }
.prose h2 { font-size: 1.5rem; }
.prose p { color: var(--ink); }
.prose .muted { color: var(--ink-soft); }

/* ----------------------------- Sourcing ---------------------------------- */
.source-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.source-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.2rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .5rem; }
.source-card h3 { font-family: var(--sans); font-weight: 650; font-size: 1.02rem; margin: 0; }
.source-card p { font-size: .9rem; color: var(--ink-soft); margin: 0; flex: 1; }
.source-card .btn { align-self: flex-start; margin-top: .4rem; }
.source-note { font-size: .85rem; color: var(--ink-faint); margin-top: 1rem; }

/* --------------------------- Cross-promo band ---------------------------- */
.promo { position: relative; overflow: hidden; background: var(--fern-ink); color: #F3F1E6;
  border-radius: var(--radius-lg); padding: clamp(1.8rem, 1.4rem + 2vw, 3rem); }
:root[data-theme="dark"] .promo { background: #1E3326; border: 1px solid #2C4A36; }
.promo-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; justify-content: space-between; position: relative; z-index: 1; }
.promo h2 { color: #fff; margin: 0 0 .4rem; }
.promo p { color: #DCE5D8; margin: 0; max-width: 34rem; }
.promo .btn { background: #F3F1E6; color: var(--fern-ink); border-color: #F3F1E6; }
.promo .btn:hover { background: #fff; color: var(--ink); }
.promo .leaf-watermark { position: absolute; right: -3%; top: -30%; width: 320px; color: #fff; opacity: .07; z-index: 0; }

/* ------------------------------- Callouts -------------------------------- */
.note-card { background: var(--c-bg); border: 1px solid color-mix(in srgb, var(--c) 26%, transparent);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; color: var(--ink); font-size: .96rem; }
.note-card strong { color: var(--c-ink); }

/* --------------------------------- Ads ----------------------------------- */
.ad { margin: 2rem auto; text-align: center; }
.ad-label { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .3rem; }
.ad-leader { max-width: 970px; }
.ad-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; padding: .4rem;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); transform: translateY(100%); transition: transform .3s ease; }
.ad-sticky.on { transform: translateY(0); }
@media (min-width: 781px) { .ad-sticky { display: none; } }
body.has-sticky { padding-bottom: 90px; }

/* ------------------------------- Footer ---------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 4.5rem; background: var(--paper-2); }
.footer-inner { padding-block: 3.2rem 2.4rem; display: grid; gap: 2rem; }
.foot-top { display: flex; flex-wrap: wrap; gap: 2.5rem 4rem; align-items: start; justify-content: space-between; }
.foot-mark { max-width: 24rem; }
.foot-mark .brand { font-size: 1.5rem; margin-bottom: .6rem; }
.foot-mark p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 2rem 3.5rem; }
.footer-cols nav { display: grid; gap: .5rem; align-content: start; }
.footer-cols h3 { font-family: var(--sans); margin: 0 0 .3rem; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .15em; color: var(--ink-faint); font-weight: 600; }
.footer-cols a { color: var(--ink-soft); font-size: .93rem; } .footer-cols a:hover { color: var(--ink); }
.foot-divider { height: 1px; background: var(--line); }
.disclosure { color: var(--ink-soft); font-size: .86rem; max-width: 60rem; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: center; font-size: .85rem; color: var(--ink-faint); }
.foot-legal a { color: var(--ink-faint); } .foot-legal a:hover { color: var(--ink); }

/* --------------------------- Keyboard focus ------------------------------ */
:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; border-radius: 4px; }
/* overflow:hidden cards would clip an outline — use an inset-safe ring instead */
.plant-plate:focus-visible, .plant-card:focus-within { outline: none; }
.plant-plate:focus-visible { box-shadow: inset 0 0 0 3px var(--c-ink); }
.btn:focus-visible, .icon-btn:focus-visible { outline-offset: 3px; }

/* ------------------------- Footer: all states ---------------------------- */
.foot-states h3 { font-family: var(--sans); margin: 0 0 .7rem; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .15em; color: var(--ink-faint); font-weight: 600; }
.foot-states-list { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; }
.foot-states-list a { color: var(--ink-soft); font-size: .86rem; } .foot-states-list a:hover { color: var(--c-ink); }

/* ------------------------------ Reveal anim ------------------------------ */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); transition-delay: var(--d, 0ms); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ----------------------------- Responsive -------------------------------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; margin-inline: auto; order: -1; }
  .profile-head { grid-template-columns: 1fr; }
  .profile-plate { max-width: 460px; }
}
@media (max-width: 720px) {
  .nav { position: fixed; inset: 70px 0 auto; flex-direction: column; gap: 0; padding: .5rem 1.5rem 1.5rem;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: .8rem .2rem; border-bottom: 1px solid var(--line-soft); width: 100%; }
  .nav a::after { display: none; }
  .nav-toggle { display: inline-grid; }
  .finder-row { flex-direction: column; }
  .finder .btn-primary { width: 100%; }
  .spec .row { grid-template-columns: 1fr; gap: .15rem; }
}
@media (max-width: 460px) {
  .plant-grid { grid-template-columns: 1fr; }
}
