/* TRPL PlantFinder. Brand palette from the TRPL Brand Identity System & Guidelines.
   Brand fonts (Dharma Gothic E, ITC Clearface, Frutiger Next) load first where licensed;
   Oswald, Source Serif 4 and Source Sans 3 are the open fallbacks. */
:root {
  --forest: #1B4532;      /* Dark Forest: backgrounds */
  --night: #092A4D;       /* Night Sky: backgrounds */
  --sand: #D1CCBD;        /* Sand: backgrounds */
  --gray: #25282A;        /* Dark Gray: text */
  --orange: #E7805D;      /* Deep Orange */
  --bright: #8FC895;      /* Bright Forest */
  --yellow: #F9D635;      /* Sunset Yellow: accent */
  --spring: #87BB41;      /* Spring Green: accent */
  --pink: #F36079;        /* Sunset Pink: accent */
  --sky: #99ADC5;         /* Gray Sky: accent */
  --sunset: #FC924E;      /* Sunset Orange: accent */
  --paper: #FAF8F3;
  --sand-soft: #ECE8DE;
  --line: #D9D3C4;
  --muted: #5D615F;
  --display: "Dharma Gothic E", "Oswald", "Arial Narrow", sans-serif;
  --serif: "ITC Clearface", "Source Serif 4", Georgia, serif;
  --sans: "Frutiger Next", "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(37,40,42,.08), 0 6px 18px rgba(37,40,42,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--gray); font-family: var(--serif); font-size: 17px; line-height: 1.55; }
a { color: var(--forest); }
a:hover { color: var(--night); }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sunset); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 0; }

/* ---------- header ---------- */
.masthead { background: var(--forest); color: #fff; }
.masthead .bar { max-width: 1200px; margin: 0 auto; padding: .9rem 1.25rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: #fff; line-height: 1; }
.brand .kicker { font-family: var(--sans); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.brand .title { font-family: var(--display); font-size: 2rem; letter-spacing: .04em; text-transform: uppercase; margin-top: .2rem; }
.brand .title span { color: var(--bright); }
nav.tabs { margin-left: auto; display: flex; gap: .25rem; flex-wrap: wrap; }
nav.tabs a { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; color: #fff; text-decoration: none; padding: .35rem .7rem; border-radius: 999px; }
nav.tabs a[aria-current="page"], nav.tabs a:hover { background: rgba(255,255,255,.14); color: #fff; }
.embed-mode .masthead, .embed-mode .site-foot { display: none; }

main { max-width: 1200px; margin: 0 auto; padding: 1.25rem; min-height: 60vh; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; line-height: 1.05; font-weight: 600; color: var(--forest); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: .4rem 0 .5rem; }
h2 { font-size: 1.7rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.25rem; margin: 0 0 .4rem; }
.lede { font-size: 1.15rem; max-width: 46rem; }
.small, .credit { font-family: var(--sans); font-size: .82rem; color: var(--muted); }
.sci { font-style: italic; }

/* ---------- intro band ---------- */
.intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; padding: 1rem 0 1.5rem; }
.intro .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.stat { background: var(--sand-soft); border-radius: var(--radius); padding: .9rem; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 2.2rem; color: var(--forest); line-height: 1; }
.stat span { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 760px) { .intro { grid-template-columns: 1fr; } nav.tabs { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } nav.tabs a { white-space: nowrap; } }

/* ---------- filters ---------- */
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: grid; gap: .8rem; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 5; }
.filters .row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filters label.lbl { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); min-width: 4.5rem; }
.search { flex: 1 1 260px; display: flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; padding: .1rem .9rem; background: var(--paper); }
.search input { border: 0; background: transparent; padding: .45rem .3rem; width: 100%; font-family: var(--sans); font-size: 1rem; outline: none; }
.chip { font-family: var(--sans); font-size: .88rem; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: .28rem .75rem; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.chip .dot { width: .8rem; height: .8rem; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
select.sel { font-family: var(--sans); font-size: .9rem; border: 1.5px solid var(--line); border-radius: 999px; padding: .3rem .7rem; background: #fff; }
.count { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin: 1rem 0 .5rem; }
.collapse-toggle { display: none; }
@media (max-width: 760px) {
  .filters { position: static; }
  .collapse-toggle { display: inline-flex; }
  .filters.collapsed .more { display: none; }
}

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; border: 1px solid var(--line); }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(27,69,50,.14); }
.card .pic { aspect-ratio: 4 / 3; background: var(--sand-soft); position: relative; overflow: hidden; }
.card .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .pic img.ill { object-fit: contain; padding: .5rem; mix-blend-mode: multiply; background: #fff; }
.card .pic .noimg { position: absolute; inset: 0; display: grid; place-items: center; }
.card .body { padding: .7rem .8rem .8rem; display: grid; gap: .25rem; flex: 1; }
.card .name { font-family: var(--display); text-transform: uppercase; font-size: 1.2rem; letter-spacing: .03em; color: var(--forest); line-height: 1.05; }
.card .sci { font-size: .88rem; color: var(--muted); }
.card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .35rem; gap: .5rem; }
.tag { font-family: var(--sans); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; background: var(--sand-soft); border-radius: 999px; padding: .12rem .5rem; white-space: nowrap; }
.tag.park { background: var(--forest); color: #fff; }

/* ---------- plant page ---------- */
.back { font-family: var(--sans); font-size: .9rem; text-decoration: none; }
.plant-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2rem; align-items: start; margin-top: .5rem; }
@media (max-width: 860px) { .plant-hero { grid-template-columns: 1fr; } }
.hero-figure { margin: 0; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.hero-figure .frame { aspect-ratio: 1 / 1; display: grid; place-items: center; background: #fff; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-figure img.ill { object-fit: contain; padding: 1rem; }
.hero-figure figcaption { padding: .5rem .8rem; font-family: var(--sans); font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); }
.thumbs { display: flex; gap: .4rem; padding: .5rem; overflow-x: auto; border-top: 1px solid var(--line); }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 6px; overflow: hidden; width: 64px; height: 64px; flex: none; cursor: pointer; background: #fff; }
.thumbs button[aria-current="true"] { border-color: var(--orange); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.names .common { margin: 0; }
.names .sci { font-size: 1.25rem; margin: 0; }
.names .family { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin-top: .2rem; }
.badges { display: flex; gap: .4rem; flex-wrap: wrap; margin: .8rem 0; }
.badge { font-family: var(--sans); font-size: .8rem; border-radius: 999px; padding: .25rem .7rem; background: var(--sand-soft); display: inline-flex; gap: .35rem; align-items: center; }
.badge.forest { background: var(--forest); color: #fff; }
.badge.night { background: var(--night); color: #fff; }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin: 1rem 0; }
.g { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; display: grid; gap: .3rem; align-content: start; }
.g .k { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.g .v { font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; color: var(--forest); line-height: 1.05; }
.g .d { font-family: var(--sans); font-size: .82rem; }
.g svg { display: block; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.area-list { display: grid; gap: .6rem; }
.area-chip { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem .9rem; border-radius: var(--radius); background: var(--sand-soft); text-decoration: none; color: inherit; }
.area-chip:hover { background: var(--sand); }
.area-chip b { font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; font-weight: 500; font-size: 1.15rem; color: var(--forest); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.gallery figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.gallery img.ill { object-fit: contain; padding: .5rem; }
.gallery figcaption { padding: .4rem .55rem; font-family: var(--sans); font-size: .72rem; color: var(--muted); }
.map { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #e8eef2; }
.map img { position: absolute; width: 50%; height: 50%; }
.map .pin { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--orange); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; font-family: var(--sans); font-size: .92rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.note { border-left: 4px solid var(--yellow); background: #fffbea; padding: .6rem .9rem; font-family: var(--sans); font-size: .9rem; border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------- zone check ---------- */
.zip { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.zip input { font-family: var(--sans); font-size: 1.1rem; width: 8rem; padding: .45rem .7rem; border: 2px solid var(--line); border-radius: 8px; letter-spacing: .1em; }
.btn { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; background: var(--orange); color: #fff; border: 0; border-radius: 999px; padding: .5rem 1.1rem; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: #d4683f; color: #fff; }
.btn.ghost { background: transparent; color: var(--forest); border: 2px solid var(--forest); }
.verdict { margin-top: .8rem; font-family: var(--sans); padding: .7rem .9rem; border-radius: var(--radius); }
.verdict.ok { background: #e7f3e8; }
.verdict.warn { background: #fff1e8; }

/* ---------- bloom clock ---------- */
.bloom-layout { display: grid; grid-template-columns: minmax(0, 560px) 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .bloom-layout { grid-template-columns: 1fr; } }
.wheel text { font-family: var(--display); text-transform: uppercase; }
.wheel .wedge { cursor: pointer; }
.wheel .wedge:hover path.bg, .wheel .wedge.sel path.bg { fill: var(--sand); }
.wheel circle.sp { cursor: pointer; stroke: #fff; stroke-width: 1; }
.wheel circle.sp:hover { stroke: var(--gray); stroke-width: 2; }
.month-tabs { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* ---------- places ---------- */
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.place { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: inherit; display: grid; gap: .5rem; box-shadow: var(--shadow); }
.place:hover { border-color: var(--forest); }
.place .kind { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--orange); }
.swatches { display: flex; gap: 3px; flex-wrap: wrap; }
.swatches span { width: 14px; height: 14px; border-radius: 3px; }

/* ---------- identify ---------- */
.id-steps { display: grid; gap: 1rem; }
.id-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.id-step h3 { margin-bottom: .6rem; }
.camera { display: grid; place-items: center; gap: .6rem; border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.2rem; background: var(--paper); text-align: center; }
.camera img { max-height: 260px; border-radius: 8px; }

/* ---------- embed docs ---------- */
pre.code { background: var(--gray); color: #f3efe6; padding: .9rem 1rem; border-radius: var(--radius); overflow-x: auto; font-size: .85rem; line-height: 1.45; }
.embed-demo { border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem; background: #fff; }

.site-foot { background: var(--night); color: #dfe6ee; margin-top: 3rem; }
.site-foot .bar { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem; font-family: var(--sans); font-size: .85rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }
.site-foot a { color: #fff; }
.empty { padding: 2rem; text-align: center; font-family: var(--sans); color: var(--muted); }
