/* =========================================================================
   veg.css — NEON Vegetation Structure Explorer additions on top of styles.css
   (the "Old-Growth Canopy" forest theme). Only the veg-specific bits live here:
   the hero stat band, splash site cards, the Overview insight list, and the
   Forest Size Lab selected-tree strip.
   ========================================================================= */

/* evergreen brand mark */
.brand-mark { font-size: 26px; }

/* ---- site data-quality scan: clickable flag buttons (playbook hyphen form) -- */
.qc-flag-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
button.qc-flag { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); cursor: pointer; font-size: 14px; transition: transform .1s ease, box-shadow .1s ease; }
button.qc-flag:hover { transform: translateX(2px); box-shadow: 0 3px 12px var(--shadow); }
.qc-flag .qc-flag-txt { flex: 1 1 auto; }
.qc-flag .qc-flag-go { color: var(--muted); opacity: .7; }
.qc-flag-high  { border-left: 4px solid var(--rust); }  .qc-flag-high  > .bi { color: var(--rust); }
.qc-flag-warn  { border-left: 4px solid var(--gold); }  .qc-flag-warn  > .bi { color: var(--gold); }
.qc-flag-info  { border-left: 4px solid var(--sky); }   .qc-flag-info  > .bi { color: var(--sky); }
.qc-flag-clean { border-left: 4px solid var(--green); display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); }
.qc-flag-clean > .bi { color: var(--green); }
.qc-why { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-bottom: 10px; }
.qc-modal-tbl { max-height: 52vh; overflow: auto; }

/* ---- hero stat band ---------------------------------------------------- */
/* flex:0 0 auto is defensive: never let the hero band be the page-fill flex
   child that shrinks. It can't crush today (overflow:visible floors its min-size
   at content) but would if the cascade's overflow:hidden command-band style is
   ever ported here. See NEON-Driver-Cascade/www/cascade.css for the full story. */
.hero-band { flex: 0 0 auto; margin: 4px 0 14px; }
.hero-title { font-weight: 700; color: var(--pine); font-size: 17px; display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.hero-stat { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px; box-shadow: 0 4px 14px var(--shadow); border-top: 3px solid var(--pine); }
/* forest quartet: canopy / spruce-teal / amber / bark — one accent per stat */
.hero-stat.hero-pine  { border-top-color: var(--green); }
.hero-stat.hero-sky   { border-top-color: var(--sky); }
.hero-stat.hero-gold  { border-top-color: var(--gold); }
.hero-stat.hero-bark  { border-top-color: var(--terra); }
.hero-stat.hero-terra { border-top-color: var(--rust); }
.hs-icon { font-size: 24px; color: var(--pine); opacity: .9; }
.hero-pine .hs-icon { color: var(--green); }
.hero-sky  .hs-icon { color: var(--sky); }
.hero-gold .hs-icon { color: var(--gold-ink); }
.hero-bark .hs-icon { color: var(--terra); }
.hero-terra .hs-icon { color: var(--rust); }
.hs-v { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1; }
.hs-l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-top: 3px; }

/* ---- splash national picker map (the flagship front door) -------------- */
.splash-map-hint { display: flex; gap: 8px; align-items: center; justify-content: center;
  font-size: 13.5px; color: var(--muted); margin: 4px 0 10px; }
.splash-map-hint > .bi { color: var(--green); }
.map-picker-wrap { width: 100%; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 16px var(--shadow); }
.map-picker-wrap .leaflet-container { background: var(--paper); }
/* ---- collapsible "Browse all 42 sites" list (canonical, closed by default) -- */
.site-browse { margin: 16px auto 0; max-width: 920px; text-align: left; }
/* kill the native disclosure triangle so our chevron is the only marker */
.site-browse > summary { list-style: none; cursor: pointer; }
.site-browse > summary::-webkit-details-marker { display: none; }
.site-browse > summary:focus-visible { outline: none; }
/* the summary, styled as a centered canopy-green pill/button */
.sb-summary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: max-content; min-height: 40px; margin: 0 auto;
  padding: 8px 18px; user-select: none;
  font-weight: 700; font-size: 13.5px; color: var(--pine);
  background: linear-gradient(180deg, var(--bg) 0%, var(--paper) 100%);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 4px 14px -10px var(--shadow);
  transition: color .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.site-browse > summary:hover .sb-summary {
  color: var(--pine2); border-color: var(--green);
  box-shadow: 0 6px 18px -10px var(--shadow); }
.site-browse > summary:focus-visible .sb-summary {
  border-color: var(--green); box-shadow: 0 0 0 3px var(--shadow); }
.sb-label { display: inline-flex; align-items: center; gap: 7px; }
.sb-chevron { display: inline-flex; transition: transform .2s ease; color: var(--green); opacity: .85; }
.site-browse[open] .sb-chevron { transform: rotate(180deg); }
/* the expanded body: scrolls rather than pushing the page */
.site-browse-body {
  margin-top: 12px; padding: 10px 12px;
  max-height: 360px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); }

/* ---- splash site cards ------------------------------------------------- */
.site-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 6px 0 18px; }
.site-card { display: flex; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; text-decoration: none; color: inherit; box-shadow: 0 4px 14px var(--shadow);
  border-left: 4px solid var(--green); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.site-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px var(--shadow); border-color: var(--pine); }
/* shrubland (desert/grassland) sites get an ochre spine so the two biomes read apart at a glance */
.site-card-shrub { border-left-color: var(--terra); }
.site-card-shrub:hover { border-color: var(--terra); }
.sc-emoji { font-size: 30px; }
.sc-name { font-weight: 600; color: var(--ink); }
.sc-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---- overview insight list -------------------------------------------- */
.insight-list { display: flex; flex-direction: column; gap: 6px; }
.il-item { display: flex; gap: 8px; align-items: baseline; color: var(--ink); font-size: 14px; line-height: 1.5; }
.il-item .ci-hero { color: var(--green); font-weight: 800; }
.il-item > .bi { color: var(--pine); flex: none; }

/* ---- Forest Size Lab selected-tree strip ------------------------------ */
.lab-sel { display: flex; gap: 14px; align-items: center; background: var(--bg); border: 1px solid var(--line);
  border-left: 4px solid var(--green); border-radius: 10px; padding: 10px 14px; margin-top: 12px; }
.ls-emoji { font-size: 26px; }
.ls-id { font-weight: 600; color: var(--ink); }
.ls-dom { font-size: 12.5px; color: var(--muted); }
.lab-sel .btn { margin-left: auto; }

/* clickable hero stats (species / biggest DBH -> ranked modal) */
.hero-stat.hero-click { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.hero-stat.hero-click:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px var(--shadow); }
.hero-stat .stat-q { font-size: 10px; margin-left: 4px; opacity: .5; color: var(--gold-ink); }
.hero-stat.hero-click:hover .stat-q { opacity: 1; }

/* ---- sidebar quick-pick chips (Biggest / Tallest / Fastest) ----------- */
.pick-chips { display: flex; gap: 6px; margin: 8px 0 8px; }
.pick-chip { flex: 1 1 0; min-width: 0; font-size: 12px !important; padding: 5px 4px !important; }

/* ---- Overview tools strip (compare / data / report) ------------------- */
.tools-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 2px 16px; }
.tools-strip .btn { font-weight: 600; }

/* ---- Champion Trees leaderboard category pills (BS5-compatible) ------- */
.leader-cats { margin: 2px 2px 10px; }
.leader-cats .shiny-options-group { display: flex; gap: 6px; flex-wrap: wrap; }
.leader-cats .form-check.form-check-inline,
.leader-cats .radio-inline { margin: 0 !important; padding: 0; min-height: 0; position: relative; }
.leader-cats .form-check-input { position: absolute; opacity: 0; pointer-events: none; }
.leader-cats .form-check-label, .leader-cats .radio-inline > span {
  display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 20px;
  padding: 5px 14px; cursor: pointer; font-size: 13px; background: var(--paper); color: var(--ink);
  transition: .15s; }
.leader-cats .form-check-label:hover { background: #eef2ec; color: var(--pine); }
.leader-cats .form-check-input:checked + .form-check-label,
.leader-cats .radio-inline:has(input:checked) > span {
  background: var(--pine); border-color: var(--pine); color: #fff; font-weight: 700; }
[data-bs-theme="dark"] .leader-cats .form-check-input:checked + .form-check-label,
[data-bs-theme="dark"] .leader-cats .radio-inline:has(input:checked) > span { color: #0e1d15; }
[data-bs-theme="dark"] .leader-cats .form-check-label:hover { background: #1f302d; }

/* hero count-up uses the shared .count-up engine from app.js. The .hero-stat
   info-boxes are styled dark in BOTH modes by the premium block in styles.css
   (the "light page, dark hero" look), so only the site-card needs the dark fill. */
[data-bs-theme="dark"] .site-card { background: var(--paper); }
