/* ==========================================================================
   HinduKushBioDiversity — styles.css
   Replicates the original Tailwind v4 design system (emerald/stone palette)
   ========================================================================== */

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Playfair Display", "Lora", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --font-lora: "Lora", Georgia, serif;

  --emerald-50:  #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --emerald-900: #064e3b;
  --emerald-950: #022c22;

  --stone-50:  #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --stone-950: #0c0a09;

  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --yellow-500: #eab308;
  --blue-500: #3b82f6;
  --amber-400: #fbbf24;
  --sky-500: #0ea5e9;
  --teal-500: #14b8a6;

  --bg: #f4f7f2;
  --surface: #ffffff;
  --surface-2: #fafaf9;
  --text: #1c1917;
  --text-muted: #57534e;
  --text-soft: #78716c;
  --border: #e7e5e4;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 2rem;

  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,.25);
}

html.dark {
  --bg: #060f0a;
  --surface: #1c1917;
  --surface-2: #0c0a09;
  --text: #f5f5f4;
  --text-muted: #d6d3d1;
  --text-soft: #a8a29e;
  --border: #292524;
}

* {
  box-sizing: border-box;
  border: 0 solid;
  margin: 0;
  padding: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s, color .3s;
  overflow-x: hidden;
}

img, svg, video {
  vertical-align: middle;
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
  border: none;
}

input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
}

a { color: inherit; text-decoration: inherit; }
ul, ol { list-style: none; }
em { font-style: italic; }
strong { font-weight: 700; }

h1, h2, h3, h4, h5, h6 { font-weight: inherit; }

::selection { background: rgba(16,185,129,.25); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--stone-100); }
::-webkit-scrollbar-thumb { background: rgba(4,120,87,.3); border-radius: 9999px; }
html.dark ::-webkit-scrollbar-track { background: var(--stone-900); }

.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============ Reading progress bar ============ */
.reading-bar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 5px;
  background: rgba(231,229,228,.4);
  z-index: 100;
}
.reading-bar__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--emerald-500), var(--emerald-600), var(--teal-500));
  border-radius: 0 9999px 9999px 0;
  box-shadow: 0 0 8px rgba(16,185,129,.5);
  transition: width .1s ease-out;
}

/* ============ Ornaments ============ */
.ornaments { position: absolute; inset: 0; pointer-events: none; user-select: none; z-index: 0; }
.ornament--watermark {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: .04;
  z-index: 0;
  pointer-events: none;
}
.ornament--watermark img {
  width: 85vw; max-width: 700px; aspect-ratio: 1;
  object-fit: contain;
  filter: grayscale(100%);
}
html.dark .ornament--watermark { opacity: .015; }
html.dark .ornament--watermark img { filter: grayscale(100%) invert(1); }

/* ============ Top bar ============ */
.topbar {
  background: var(--emerald-950);
  color: var(--emerald-100);
  padding: .75rem 0;
  border-bottom: 1px solid rgba(6,78,59,.4);
  font-size: .75rem;
  position: relative;
  z-index: 10;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.topbar__left { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.topbar__text { font-weight: 600; letter-spacing: .025em; font-size: .75rem; }
.topbar__text em { font-family: var(--font-serif); font-style: italic; color: var(--emerald-300); font-weight: 500; }
.topbar__right {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(6,78,59,.4);
  padding: .375rem .875rem;
  border-radius: 9999px;
  border: 1px solid rgba(6,95,70,.2);
  white-space: nowrap;
  font-size: .65rem;
}
.topbar__link { font-weight: 700; color: var(--emerald-300); text-decoration: underline; }
.topbar__link:hover { color: #fff; }
.topbar__pi em { font-family: var(--font-serif); font-style: italic; font-weight: 600; color: var(--emerald-300); }
.topbar .sep { opacity: .4; padding: 0 .25rem; }
.dot { width: .625rem; height: .625rem; border-radius: 9999px; background: var(--emerald-400); flex-shrink: 0; }
.dot--pulse { animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  transition: background .2s;
}
html.dark .header { background: rgba(28,25,23,.95); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.brand__logo {
  width: 9rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #fff;
  border: 1px solid rgba(6,95,70,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .375rem .225rem;
  transition: transform .2s;
}
.brand__logo:hover { transform: scale(1.03); }
.brand__logo img { width: 100%; height: auto; object-fit: contain; }
.brand__title {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-serif);
  letter-spacing: -.025em;
  color: var(--stone-950);
  display: flex;
  align-items: center;
  gap: .375rem;
  line-height: 1;
}
html.dark .brand__title { color: #fff; }
.brand__domain {
  font-size: .7rem;
  color: var(--emerald-700);
  font-family: var(--font-sans);
  letter-spacing: 0;
  background: rgba(236,253,245,.8);
  border: 1px solid rgba(209,250,229,.3);
  padding: .125rem .375rem;
  border-radius: .375rem;
}
.brand__sub {
  display: block;
  margin-top: .375rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--emerald-700);
  font-weight: 700;
}

.nav { display: flex; align-items: center; gap: .25rem; }
.nav__link {
  padding: .5rem .75rem;
  border-radius: .75rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--stone-600);
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: .375rem;
}
.nav__link:hover { background: var(--stone-100); color: var(--stone-900); }
.nav__link.is-active {
  background: var(--emerald-500);
  color: var(--emerald-800);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
html.dark .nav__link { color: var(--stone-300); }
html.dark .nav__link:hover { background: var(--stone-800); color: #fff; }
html.dark .nav__link.is-active { background: rgba(6,78,59,.4); color: var(--emerald-400); }

.header__tools { display: flex; align-items: center; gap: .5rem; }
.lang-switch {
  display: flex;
  background: var(--stone-100);
  border-radius: .75rem;
  padding: .125rem;
  border: 1px solid rgba(231,229,228,.6);
}
html.dark .lang-switch { background: var(--stone-950); border-color: var(--stone-800); }
.lang-switch button {
  padding: .25rem .625rem;
  border-radius: .5rem;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--stone-500);
  transition: all .2s;
}
.lang-switch button.is-active {
  background: #fff;
  color: var(--stone-950);
  box-shadow: var(--shadow-sm);
}
html.dark .lang-switch button.is-active { background: var(--stone-900); color: #fff; }

.icon-btn {
  width: 2.25rem; height: 2.25rem;
  background: var(--stone-100);
  border: 1px solid var(--border);
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--stone-700);
  font-size: .85rem;
  transition: all .2s;
}
.icon-btn:hover { background: var(--stone-200); }
html.dark .icon-btn { background: var(--stone-950); border-color: var(--stone-800); color: var(--stone-300); }
.icon-btn .icon-sun { display: none; }
html.dark .icon-btn .icon-sun { display: inline; color: var(--amber-400); }
html.dark .icon-btn .icon-moon { display: none; }

/* ============ Mobile nav ============ */
.mobile-nav {
  display: none;
  position: sticky;
  top: 138px;
  z-index: 40;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid rgba(231,229,228,.8);
  padding: .5rem 1.5rem;
}
.mobile-nav__label {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--stone-400);
  text-align: center;
  margin-bottom: .25rem;
}
.mobile-nav__scroller {
  display: flex;
  gap: .625rem;
  overflow-x: auto;
  padding-bottom: .375rem;
}
.mobile-nav__scroller button {
  flex-shrink: 0;
  padding: .375rem .75rem;
  border-radius: .5rem;
  font-size: .65rem;
  font-weight: 700;
  background: var(--stone-100);
  color: var(--stone-700);
  border: 1px solid rgba(231,229,228,.6);
  white-space: nowrap;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 3rem 0 4rem;
  overflow: hidden;
  z-index: 10;
}
.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  align-items: center;
}
.hero__content { grid-column: span 7; }
.hero__media { grid-column: span 5; position: relative; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  background: var(--emerald-100);
  color: var(--emerald-800);
  letter-spacing: .05em;
  font-size: .65rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: .25rem .875rem;
  border-radius: 9999px;
  border: 1px solid rgba(209,250,229,.3);
}
html.dark .badge { background: rgba(2,44,34,.5); color: var(--emerald-400); }
.badge__icon { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__title {
  font-size: clamp(1.875rem, 5vw, 3.75rem);
  font-weight: 800;
  font-family: var(--font-serif);
  letter-spacing: -.025em;
  color: var(--stone-950);
  line-height: 1.1;
  margin-top: 1.5rem;
}
html.dark .hero__title { color: #fff; }
.hero__title em { font-style: italic; font-weight: 300; color: var(--emerald-700); }
html.dark .hero__title em { color: var(--emerald-400); }

.hero__tagline {
  color: var(--stone-600);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 42rem;
  font-family: var(--font-lora);
  font-style: italic;
  letter-spacing: .025em;
  margin-top: 1rem;
}
html.dark .hero__tagline { color: var(--stone-300); }

.hero__actions { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: 1.5rem; }

.btn {
  padding: .75rem 1.5rem;
  border-radius: .75rem;
  font-size: .75rem;
  font-weight: 700;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.btn--primary {
  background: var(--emerald-600);
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(2,44,34,.2);
}
.btn--primary:hover { background: var(--emerald-700); box-shadow: var(--shadow-xl); }
.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--stone-800);
}
.btn--ghost:hover { background: var(--stone-100); }
.btn--block { width: 100%; justify-content: center; }
.btn__chev { animation: bounce 1s infinite; }
@keyframes bounce { 50% { transform: translateY(-25%); } }

.hero__frame {
  aspect-ratio: 16/10;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 2px solid rgba(231,229,228,.6);
  box-shadow: var(--shadow-2xl);
  background: var(--stone-100);
  position: relative;
}
.hero__frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s;
}
.hero__frame:hover img { transform: scale(1.03); }
.hero__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(12,10,9,.9), transparent);
  padding: 1.25rem;
  text-align: left;
}
.hero__caption-label {
  display: block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--emerald-400);
  font-weight: 700;
}
.hero__caption-title { font-size: .75rem; font-weight: 700; font-family: var(--font-serif); color: #fff; letter-spacing: -.025em; }

/* ============ Stats ============ */
.stats { position: relative; z-index: 10; padding: 1rem 0; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
.stat {
  padding: 1rem;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(231,229,228,.8);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform .2s;
}
.stat:hover { transform: translateY(-2px); }
html.dark .stat { background: rgba(28,25,23,.8); border-color: var(--stone-800); }
.stat__label { display: block; font-size: .58rem; text-transform: uppercase; font-weight: 700; color: var(--stone-400); margin-bottom: .25rem; }
html.dark .stat__label { color: var(--stone-500); }
.stat__value {
  font-size: 1.15rem; font-weight: 800; color: var(--emerald-700);
  font-family: var(--font-mono); line-height: 1; letter-spacing: -.025em;
}
html.dark .stat__value { color: var(--emerald-400); }
.stat__sub { font-size: .65rem; color: var(--stone-500); margin-top: .25rem; font-weight: 500; }

/* ============ Sections & cards ============ */
.section { position: relative; z-index: 10; padding: 2.5rem 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}
.card__head { margin-bottom: 1.5rem; }
.card__head--between { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.kicker {
  display: block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--emerald-600);
  font-weight: 700;
  margin-bottom: .25rem;
}
html.dark .kicker { color: var(--emerald-400); }
.card__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--stone-950);
  letter-spacing: -.025em;
  line-height: 1.2;
}
html.dark .card__title { color: #fff; }
.card__desc {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .5rem;
  max-width: 48rem;
  line-height: 1.6;
}
.chip {
  background: var(--emerald-50);
  color: var(--emerald-700);
  padding: .5rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(209,250,229,.4);
  font-size: .75rem;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}
html.dark .chip { background: rgba(2,44,34,.2); color: var(--emerald-400); border-color: rgba(6,78,59,.4); }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: .75rem 0;
  opacity: .4;
  position: relative;
  z-index: 10;
}
.divider::before, .divider::after {
  content: ""; height: 1px; width: 6rem;
  background: rgba(4,120,87,.2);
}
.divider span { color: var(--emerald-600); }

/* ============ Interactive Map ============ */
.card--map { padding: 1.5rem; }
.map__layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  align-items: stretch;
}
.map__canvas {
  grid-column: span 7;
  background: var(--stone-50);
  border: 1px solid rgba(231,229,228,.6);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  min-height: 380px;
  overflow: hidden;
}
html.dark .map__canvas { background: var(--stone-950); }
.map__chip {
  position: absolute; top: 1rem; left: 1rem; z-index: 10;
  display: flex; align-items: center; gap: .375rem;
  background: rgba(255,255,255,.9);
  padding: .25rem .625rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: .65rem; font-family: var(--font-mono); font-weight: 500; color: var(--stone-600);
}
html.dark .map__chip { background: rgba(28,25,23,.9); color: var(--stone-300); }
.map__svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.12));
  user-select: none;
  transition: transform .3s;
}
.map__svg:hover { transform: scale(1.02); }
.map__marker { cursor: pointer; }
.map__marker text { font-family: var(--font-sans); letter-spacing: -.025em; }
.map__legend {
  position: absolute; bottom: 1rem; right: 1rem; z-index: 10;
  display: flex; flex-direction: column; gap: .25rem;
  font-size: .65rem;
  background: rgba(255,255,255,.8);
  padding: .5rem;
  border-radius: .5rem;
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
  color: var(--stone-600);
}
html.dark .map__legend { background: rgba(28,25,23,.8); color: var(--stone-400); }
.map__legend-title { font-weight: 700; margin-bottom: .25rem; color: var(--stone-800); }
html.dark .map__legend-title { color: var(--stone-200); }
.swatch { display: inline-block; width: .625rem; height: .625rem; border-radius: 9999px; margin-right: .375rem; }
.swatch--green { background: var(--emerald-500); }
.swatch--yellow { background: var(--yellow-500); }
.swatch--rose { background: var(--rose-500); }

.map__detail {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(250,250,249,.5);
  border: 1px solid rgba(231,229,228,.4);
  border-radius: 1rem;
  padding: 1.5rem;
}
html.dark .map__detail { background: rgba(28,25,23,.4); border-color: rgba(41,37,36,.2); }
.map__detail-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.map__detail-name { font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em; color: var(--stone-950); }
html.dark .map__detail-name { color: #fff; }
.map__detail-sub { font-size: .72rem; color: var(--stone-500); font-weight: 500; }
.map__detail-alt { text-align: right; }
.map__detail-alt-label { display: block; font-size: .62rem; text-transform: uppercase; font-weight: 700; letter-spacing: .1em; color: var(--stone-400); margin-bottom: .25rem; }
.map__detail-alt-val {
  font-size: .75rem; font-family: var(--font-mono); font-weight: 600;
  background: var(--emerald-50); color: var(--emerald-800);
  padding: .25rem .625rem; border-radius: .5rem;
  border: 1px solid var(--emerald-100);
}
html.dark .map__detail-alt-val { background: rgba(2,44,34,.2); color: var(--emerald-400); border-color: rgba(6,78,59,.3); }

.map__meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.map__meta {
  padding: .75rem;
  background: var(--surface);
  border-radius: .75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.map__meta-label {
  display: flex; align-items: center; gap: .375rem;
  font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--stone-500); margin-bottom: .25rem;
}
.map__meta-value { font-size: .85rem; font-weight: 600; color: var(--stone-900); }
html.dark .map__meta-value { color: #fff; }
.threat-badge {
  font-size: .72rem; font-weight: 700; padding: .125rem .5rem; border-radius: .375rem;
}
.threat-low { background: var(--emerald-500); color: var(--emerald-950); }
.threat-mid { background: var(--yellow-500); color: #422006; }
.threat-high { background: var(--rose-500); color: #fff; }

.map__status {
  margin-bottom: 1.25rem;
  padding: .875rem;
  background: var(--stone-100);
  border-radius: .75rem;
  border: 1px solid rgba(231,229,228,.5);
  display: flex; gap: .625rem; align-items: flex-start;
  font-size: .78rem; line-height: 1.6;
}
html.dark .map__status { background: rgba(12,10,9,.6); }
.map__status-label { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--stone-500); letter-spacing: .05em; margin-bottom: .125rem; }

.map__species-label { display: block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--stone-400); margin-bottom: .5rem; }
.map__species { display: flex; flex-wrap: wrap; gap: .5rem; }
.map__species span {
  font-size: .75rem; padding: .25rem .625rem;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--stone-800); border-radius: .5rem;
  display: flex; align-items: center; gap: .375rem; box-shadow: var(--shadow-sm);
}
html.dark .map__species span { background: var(--stone-900); color: var(--stone-300); }
.map__species i { width: .375rem; height: .375rem; border-radius: 9999px; background: var(--emerald-500); }

.map__protected-label { display: block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--stone-400); margin-bottom: .5rem; }
.map__protected { display: flex; flex-direction: column; gap: .5rem; }
.map__protected-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem .75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: .75rem; box-shadow: var(--shadow-sm); font-size: .75rem;
}
.map__protected-name { font-weight: 600; color: var(--stone-800); display: flex; align-items: center; gap: .5rem; }
html.dark .map__protected-name { color: var(--stone-200); }
.map__protected-type {
  font-size: .62rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em;
  color: var(--emerald-700); background: var(--emerald-50);
  padding: .125rem .5rem; border-radius: .375rem;
  border: 1px solid rgba(209,250,229,.3);
}

.map__tabs { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .75rem; border-top: 1px solid rgba(231,229,228,.5); }
.map__tabs button {
  padding: .375rem .75rem;
  border-radius: .75rem;
  font-size: .75rem; font-weight: 600;
  transition: all .2s;
  background: var(--surface);
  color: var(--stone-700);
  border: 1px solid var(--border);
}
.map__tabs button:hover { background: var(--stone-100); }
.map__tabs button.is-active { background: var(--emerald-600); color: #fff; box-shadow: var(--shadow-md); }
html.dark .map__tabs button { background: var(--stone-900); color: var(--stone-300); }
html.dark .map__tabs button.is-active { background: var(--emerald-600); color: #fff; }

.map__footnote {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: .68rem;
  color: var(--stone-400);
  text-align: center;
}

/* ============ Directory ============ */
.card--directory { padding: 1.5rem; }
.directory__controls {
  display: flex; flex-direction: column; gap: 1rem;
  align-items: center; justify-content: space-between;
  margin-bottom: 1rem; padding-bottom: 1rem;
  border-bottom: 1px solid rgba(231,229,228,.5);
}
.tabs {
  display: flex;
  background: var(--stone-100);
  padding: .25rem;
  border-radius: .75rem;
}
html.dark .tabs { background: var(--stone-950); }
.tab {
  padding: .5rem 1.25rem;
  border-radius: .5rem;
  font-size: .75rem; font-weight: 600;
  display: flex; align-items: center; gap: .5rem;
  color: var(--stone-700);
  transition: all .2s;
}
.tab:hover { color: var(--stone-900); }
.tab.is-active { background: var(--emerald-600); color: #fff; box-shadow: var(--shadow-md); }
html.dark .tab { color: var(--stone-300); }
html.dark .tab.is-active { background: var(--emerald-600); color: #fff; }

.directory__filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.directory__filters select {
  background: var(--stone-50);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: .5rem .75rem;
  font-size: .75rem; font-weight: 600;
  color: var(--stone-700);
  cursor: pointer;
  appearance: none;
  min-width: 130px;
}
html.dark .directory__filters select { background: var(--stone-950); color: var(--stone-300); }

.directory__search input {
  width: 100%;
  background: var(--stone-50);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: .75rem 1rem;
  font-size: .75rem;
  color: var(--stone-950);
  margin-bottom: 1.5rem;
}
html.dark .directory__search input { background: var(--stone-950); color: var(--stone-50); }
.directory__search input:focus { outline: none; border-color: var(--emerald-500); box-shadow: 0 0 0 1px var(--emerald-500); }

.species-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.species-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: all .32s;
}
.species-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); border-color: rgba(16,185,129,.25); }
.species-card__media {
  height: 12rem; width: 100%;
  overflow: hidden; background: var(--stone-100); position: relative;
}
.species-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s;
}
.species-card:hover .species-card__media img { transform: scale(1.05); }
.species-card__badges {
  position: absolute; top: 1rem; left: 1rem; z-index: 10;
  display: flex; flex-wrap: wrap; gap: .375rem; align-items: center;
}
.status-pill {
  font-size: .62rem; font-weight: 800; text-transform: uppercase;
  padding: .25rem .875rem; border-radius: 9999px; font-family: var(--font-mono); box-shadow: var(--shadow-md);
}
.subcat-pill {
  font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: .25rem .75rem; background: rgba(28,25,23,.8); color: #fff;
  backdrop-filter: blur(4px); border-radius: 9999px; box-shadow: var(--shadow-md);
}
.species-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.species-card__head { display: flex; justify-content: space-between; gap: .625rem; margin-bottom: .5rem; align-items: flex-start; }
.species-card__name { font-size: 1.25rem; font-weight: 800; color: var(--stone-950); line-height: 1.2; letter-spacing: -.025em; }
html.dark .species-card__name { color: #fff; }
.species-card__sci { font-size: .75rem; font-family: var(--font-mono); color: var(--emerald-600); font-weight: 500; font-style: italic; margin-top: .125rem; }
html.dark .species-card__sci { color: var(--emerald-400); }
.species-card__local { text-align: right; }
.species-card__local-label { display: block; font-size: .62rem; text-transform: uppercase; font-weight: 700; letter-spacing: .1em; color: var(--stone-400); margin-bottom: .125rem; }
.species-card__local-val { font-size: .75rem; font-weight: 700; color: var(--stone-800); }
html.dark .species-card__local-val { color: var(--stone-300); }
.species-card__family {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .25rem .625rem; background: var(--stone-50);
  color: var(--stone-600); border-radius: .5rem; border: 1px solid var(--border);
  font-size: .65rem; font-weight: 600; margin-bottom: 1rem;
}
html.dark .species-card__family { background: var(--stone-950); color: var(--stone-400); }
.species-card__desc {
  color: var(--stone-700); font-size: .75rem; line-height: 1.6; font-weight: 500; margin-bottom: 1.25rem;
}
html.dark .species-card__desc { color: var(--stone-300); }
.species-card__facts { border-top: 1px solid var(--border); padding-top: 1rem; font-size: .75rem; display: flex; flex-direction: column; gap: .875rem; }
.fact { display: flex; gap: .5rem; align-items: flex-start; }
.fact__icon { color: var(--emerald-600); margin-top: .125rem; flex-shrink: 0; }
.fact__label { display: block; font-size: .62rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; color: var(--stone-400); margin-bottom: .125rem; }
.fact__text { color: var(--stone-700); font-weight: 500; line-height: 1.6; }
html.dark .fact__text { color: var(--stone-300); }
.fact--highlight {
  background: rgba(236,253,245,.5);
  padding: .75rem; border-radius: .75rem; border: 1px solid rgba(209,250,229,.4);
}
html.dark .fact--highlight { background: rgba(2,44,34,.1); border-color: rgba(6,78,59,.3); }
.fact--neutral { background: var(--stone-50); padding: .75rem; border-radius: .75rem; border: 1px solid rgba(231,229,228,.5); }
html.dark .fact--neutral { background: rgba(12,10,9,.6); }
.species-card__districts {
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
}
.species-card__districts-label { font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--stone-400); }
.species-card__district { font-size: .65rem; font-weight: 700; background: var(--stone-100); color: var(--stone-600); padding: .125rem .5rem; border-radius: .375rem; }
html.dark .species-card__district { background: var(--stone-950); color: var(--stone-400); }

.species-empty {
  grid-column: 1 / -1;
  padding: 3rem; text-align: center;
  background: var(--stone-50); border: 1px dashed var(--border);
  border-radius: 1.5rem;
}
.species-empty strong { color: var(--stone-800); }
html.dark .species-empty strong { color: var(--stone-300); }
.species-empty p { font-size: .75rem; color: var(--stone-500); margin-top: .25rem; }

/* status colors */
.st-CR { background: #b91c1c; color: #fff; }
.st-EN { background: var(--rose-500); color: #fff; }
.st-VU { background: var(--yellow-500); color: #000; font-weight: 600; }
.st-NT { background: var(--blue-500); color: #fff; }
.st-LC { background: var(--emerald-600); color: #fff; }
.st-default { background: var(--stone-500); color: #fff; }

/* ============ Ethnobotany ============ */
.card--ethno { padding: 1.5rem; }
.ethno__tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.ethno__tabs .tab { border: 1px solid var(--border); }
.ethno__tabs .tab.is-active { background: var(--emerald-600); color: #fff; }
.ethno__layout { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; align-items: start; }
.ethno__main { grid-column: span 8; display: flex; flex-direction: column; gap: 1.5rem; }
.ethno__sidebar { grid-column: span 4; background: var(--stone-50); border: 1px solid var(--border); border-radius: 1rem; padding: 1.25rem; }
html.dark .ethno__sidebar { background: var(--stone-950); }
.ethno__block { display: flex; flex-direction: column; gap: 1rem; }
.ethno__subtitle { font-size: 1.1rem; font-weight: 700; color: var(--stone-900); display: flex; align-items: center; gap: .5rem; }
html.dark .ethno__subtitle { color: #fff; }
.remedy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.remedy-card {
  padding: 1.25rem; background: var(--stone-50);
  border: 1px solid var(--border); border-radius: 1rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
html.dark .remedy-card { background: var(--stone-950); }
.remedy-card__head { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; align-items: flex-start; }
.remedy-card__name { font-weight: 700; color: var(--stone-900); font-size: .85rem; }
html.dark .remedy-card__name { color: #fff; }
.remedy-card__sci { font-size: .65rem; font-family: var(--font-mono); font-style: italic; color: var(--emerald-600); }
.remedy-card__text { font-size: .75rem; color: var(--stone-700); line-height: 1.6; margin-bottom: 1rem; }
html.dark .remedy-card__text { color: var(--stone-300); }
.remedy-card__foot { padding-top: .5rem; border-top: 1px solid rgba(231,229,228,.5); font-size: .65rem; color: var(--stone-500); display: flex; align-items: center; gap: .25rem; }

.harvest-panel { padding: 1.25rem; background: rgba(250,250,249,.4); border: 1px solid rgba(231,229,228,.8); border-radius: 1rem; font-size: .75rem; }
html.dark .harvest-panel { background: rgba(12,10,9,.4); }
.harvest-panel p { line-height: 1.6; color: var(--stone-700); }
html.dark .harvest-panel p { color: var(--stone-300); }
.harvest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.harvest-card { padding: .875rem; background: var(--surface); border-radius: .75rem; border: 1px solid var(--border); }
.harvest-card strong { display: block; font-weight: 700; color: var(--emerald-800); margin-bottom: .25rem; }
html.dark .harvest-card strong { color: var(--emerald-400); }
.harvest-card span { color: var(--stone-600); line-height: 1.6; }
html.dark .harvest-card span { color: var(--stone-400); }

.elder-grid { display: flex; flex-direction: column; gap: 1rem; }
.elder-card {
  padding: 1.25rem; background: var(--stone-50);
  border: 1px solid var(--border); border-radius: 1rem; display: flex; gap: 1rem;
}
html.dark .elder-card { background: var(--stone-950); }
.elder-card__icon {
  padding: .625rem; background: var(--emerald-50); color: var(--emerald-600);
  border-radius: .75rem; box-shadow: var(--shadow-sm); flex-shrink: 0;
  height: fit-content; font-size: 1.1rem;
}
.elder-card__elder { font-size: .65rem; font-weight: 700; color: var(--emerald-700); background: var(--emerald-50); padding: .125rem .5rem; border-radius: .375rem; }
html.dark .elder-card__elder { background: rgba(2,44,34,.2); color: var(--emerald-400); }
.elder-card__role { display: block; font-size: .65rem; color: var(--stone-400); margin-top: .25rem; }
.elder-card__title { font-weight: 700; color: var(--stone-900); font-size: .85rem; margin-top: .25rem; }
html.dark .elder-card__title { color: #fff; }
.elder-card__story { font-size: .75rem; color: var(--stone-700); font-style: italic; line-height: 1.6; font-family: var(--font-lora); }
html.dark .elder-card__story { color: var(--stone-300); }

.ethno__sidebar-icon { font-size: 1.25rem; color: var(--emerald-600); margin-bottom: .25rem; }
.ethno__sidebar h4 { font-weight: 700; color: var(--stone-900); font-size: .85rem; letter-spacing: -.025em; }
html.dark .ethno__sidebar h4 { color: #fff; }
.ethno__sidebar p { font-size: .68rem; color: var(--stone-500); line-height: 1.6; margin-top: .5rem; }
.pubs { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .75rem; font-size: .68rem; }
.pub { padding: .75rem; background: var(--surface); border-radius: .75rem; border: 1px solid var(--border); }
.pub strong { display: block; font-weight: 700; color: var(--stone-800); }
html.dark .pub strong { color: var(--stone-200); }
.pub span { display: block; font-size: .58rem; color: var(--emerald-600); text-transform: uppercase; font-weight: 700; letter-spacing: .05em; margin-top: .25rem; }

/* ============ Quiz ============ */
.card--quiz { padding: 1.5rem; }
.quiz__head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.quiz__counter {
  background: var(--emerald-50); color: var(--emerald-700);
  padding: .375rem .75rem; border-radius: .75rem;
  border: 1px solid var(--emerald-100); font-size: .75rem; font-family: var(--font-mono); font-weight: 700; flex-shrink: 0;
}
html.dark .quiz__counter { background: rgba(2,44,34,.3); color: var(--emerald-400); border-color: rgba(6,78,59,.3); }
.quiz__question {
  padding: 1.25rem; background: var(--stone-50);
  border-radius: 1rem; border: 1px solid var(--border);
  font-size: .9rem; font-weight: 700; color: var(--stone-800); line-height: 1.6; text-align: left;
}
html.dark .quiz__question { background: rgba(12,10,9,.6); color: var(--stone-200); }
.quiz__options { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.quiz__option {
  width: 100%; text-align: left;
  padding: 1rem; border-radius: .75rem;
  border: 2px solid var(--border); font-size: .75rem; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
  transition: all .15s;
}
.quiz__option:hover { background: var(--stone-50); }
.quiz__option.is-selected { border-color: var(--emerald-500); background: rgba(236,253,245,.1); color: var(--emerald-900); }
html.dark .quiz__option.is-selected { background: rgba(6,78,59,.1); border-color: var(--emerald-500); color: var(--emerald-400); }
.quiz__option.is-correct { border-color: var(--emerald-500); background: var(--emerald-50); color: var(--emerald-900); font-weight: 600; }
html.dark .quiz__option.is-correct { background: rgba(2,44,34,.2); color: var(--emerald-400); }
.quiz__option.is-wrong { border-color: var(--rose-500); background: var(--rose-50); color: #881337; }
html.dark .quiz__option.is-wrong { background: rgba(76,5,25,.2); color: var(--rose-400); }
.quiz__option.is-dim { opacity: .5; }
.quiz__option .opt-mark { flex-shrink: 0; margin-left: .5rem; }
.quiz__feedback {
  padding: 1rem; border-radius: .75rem; display: flex; gap: .75rem; align-items: flex-start;
  background: rgba(236,253,245,.4); border: 1px solid rgba(209,250,229,.2);
  font-size: .75rem; margin-top: 1rem; animation: fadeIn .4s cubic-bezier(.16,1,.3,1) forwards;
}
html.dark .quiz__feedback { background: rgba(12,10,9,.8); }
@keyframes fadeIn { 0% { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.quiz__feedback strong { display: block; color: var(--emerald-800); margin-bottom: .25rem; }
html.dark .quiz__feedback strong { color: var(--emerald-400); }
.quiz__feedback p { color: var(--stone-700); line-height: 1.6; }
html.dark .quiz__feedback p { color: var(--stone-300); }
.quiz__actions { display: flex; justify-content: flex-end; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 1rem; }
.quiz__result { text-align: center; padding: 2rem 0; }
.quiz__result-icon { width: 4rem; height: 4rem; background: var(--emerald-100); border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 1rem; color: var(--emerald-600); }
html.dark .quiz__result-icon { background: rgba(2,44,34,.4); color: var(--emerald-400); }
.quiz__result h4 { font-size: 1.5rem; font-weight: 700; color: var(--stone-900); }
html.dark .quiz__result h4 { color: #fff; }
.quiz__result-score { font-size: 2.25rem; font-weight: 800; font-family: var(--font-mono); color: var(--emerald-600); margin-top: .5rem; }
html.dark .quiz__result-score { color: var(--emerald-400); }
.quiz__result p { font-size: .75rem; color: var(--stone-500); margin-top: .5rem; max-width: 28rem; margin-left: auto; margin-right: auto; }

/* ============ Research / Protected ============ */
.card--protected { padding: 1.5rem; margin-bottom: 2rem; }
.park-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.5rem; }
.park-card {
  background: rgba(250,250,249,.3);
  border: 1px solid rgba(231,229,228,.5);
  border-radius: 1.5rem; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: all .3s;
}
html.dark .park-card { background: rgba(12,10,9,.45); }
.park-card:hover { box-shadow: var(--shadow-xl); }
.park-card__media { aspect-ratio: 16/9; overflow: hidden; position: relative; border-bottom: 1px solid rgba(231,229,228,.5); }
.park-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.park-card:hover .park-card__media img { transform: scale(1.04); }
.park-card__tag {
  position: absolute; top: 1rem; right: 1rem; z-index: 10;
  font-size: .62rem; background: rgba(255,255,255,.95);
  color: var(--emerald-800); font-weight: 800;
  padding: .25rem .75rem; border-radius: 9999px;
  border: 1px solid rgba(209,250,229,.3); box-shadow: var(--shadow-md); backdrop-filter: blur(4px);
}
html.dark .park-card__tag { background: rgba(28,25,23,.95); color: var(--emerald-400); }
.park-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.park-card__name { font-weight: 800; color: var(--stone-900); font-size: 1rem; }
html.dark .park-card__name { color: #fff; }
.park-card__info { font-size: .78rem; color: var(--stone-600); line-height: 1.6; font-family: var(--font-lora); font-style: italic; margin-bottom: 1rem; }
html.dark .park-card__info { color: var(--stone-300); }
.park-card__meta {
  padding-top: .75rem; border-top: 1px solid rgba(231,229,228,.5);
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem;
  font-size: .62rem; color: var(--stone-500); font-weight: 600; text-transform: uppercase; font-family: var(--font-mono);
}
.park-card__meta span { display: block; font-size: .5rem; color: var(--stone-400); letter-spacing: .05em; margin-bottom: .125rem; }
.park-card__meta div { color: var(--stone-800); }
html.dark .park-card__meta div { color: var(--stone-300); }
.park-card__meta .em { color: var(--emerald-700); font-family: var(--font-sans); text-transform: none; font-weight: 600; }
html.dark .park-card__meta .em { color: var(--emerald-400); }

.research__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; align-items: start; }
.card--downloads { grid-column: span 6; padding: 1.5rem; }
.card--partners { grid-column: span 6; padding: 1.5rem; display: flex; flex-direction: column; justify-content: space-between; }
.card__icon { font-size: 1.25rem; color: var(--emerald-600); margin-bottom: .375rem; display: inline-block; }
.downloads { margin-top: 1rem; display: flex; flex-direction: column; gap: .625rem; }
.download {
  padding: .875rem; background: rgba(250,250,249,.5);
  border: 1px solid var(--border); border-radius: 1rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .75rem; font-weight: 600; transition: all .2s; cursor: pointer;
}
.download:hover { background: var(--emerald-500); color: #fff; border-color: var(--emerald-500); }
.download__icon { padding: .5rem; background: var(--emerald-50); color: var(--emerald-600); border-radius: .5rem; }
.download:hover .download__icon { background: #fff; }
.download__meta { font-size: .58rem; color: var(--stone-400); margin-top: .125rem; font-family: var(--font-mono); text-transform: uppercase; }
.download:hover .download__meta { color: rgba(255,255,255,.85); }

.partners__head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.partner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; max-height: 250px; overflow-y: auto; padding-right: .25rem; margin-top: 1.25rem; }
.partner-link {
  padding: .5rem; background: var(--stone-50);
  border: 1px solid var(--border); border-radius: .75rem;
  font-size: .68rem; font-weight: 600; color: var(--stone-700);
  transition: all .2s; display: flex; align-items: center; justify-content: space-between;
}
html.dark .partner-link { background: var(--stone-950); color: var(--stone-300); }
.partner-link:hover { background: var(--emerald-500); color: #fff; }
.partner-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: .5rem; }
.note {
  margin-top: 1.25rem; padding: .875rem; background: rgba(16,185,129,.05);
  border-radius: .75rem; border: 1px solid rgba(16,185,129,.1);
  font-size: .68rem; color: var(--stone-600); line-height: 1.6; display: flex; gap: .5rem; align-items: flex-start;
  animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite;
}
html.dark .note { color: var(--stone-400); }
.note--center { justify-content: center; text-align: center; }

/* ============ Citizen Science ============ */
.citizen__layout { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; align-items: start; }
.card--form { grid-column: span 5; padding: 1.5rem; }
.card--feed { grid-column: span 7; padding: 1.5rem; }
.card--form form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.card--form label {
  display: block; font-size: .62rem; text-transform: uppercase; font-weight: 700;
  letter-spacing: .05em; color: var(--stone-400); margin-bottom: .375rem;
}
.card--form input, .card--form textarea {
  width: 100%; background: var(--stone-50);
  border: 1px solid var(--border); border-radius: .75rem;
  padding: .5rem .75rem; font-size: .75rem; color: var(--stone-900);
}
html.dark .card--form input, html.dark .card--form textarea { background: var(--stone-950); color: var(--stone-100); }
.card--form input:focus, .card--form textarea:focus { outline: none; border-color: var(--emerald-500); box-shadow: 0 0 0 1px var(--emerald-500); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-success {
  margin-bottom: 1rem; padding: .75rem; border-radius: .75rem;
  background: var(--emerald-50); border: 1px solid var(--emerald-100);
  color: var(--emerald-800); font-size: .75rem; animation: fadeIn .4s forwards;
}
html.dark .form-success { background: rgba(2,44,34,.2); border-color: rgba(6,78,59,.4); color: var(--emerald-400); }

.feed__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.feed__head h4 { font-size: 1.1rem; font-weight: 700; color: var(--stone-900); letter-spacing: -.025em; }
html.dark .feed__head h4 { color: #fff; }
.feed__sync {
  font-size: .62rem; background: var(--emerald-50); color: var(--emerald-700);
  font-weight: 700; padding: .25rem .5rem; border-radius: .5rem;
  border: 1px solid var(--emerald-100); text-transform: uppercase; letter-spacing: .1em;
  animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite;
}
html.dark .feed__sync { background: rgba(2,44,34,.3); color: var(--emerald-400); }
.feed__list { display: flex; flex-direction: column; gap: 1rem; max-height: 460px; overflow-y: auto; padding-right: .25rem; }
.sighting {
  background: rgba(250,250,249,.5);
  border: 1px solid var(--border); border-radius: 1rem;
  display: flex; gap: 1rem; overflow: hidden; transition: all .2s;
}
html.dark .sighting { background: var(--stone-900); }
.sighting:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(16,185,129,.35); }
.sighting__thumb { width: 8rem; height: 7rem; flex-shrink: 0; overflow: hidden; background: var(--stone-100); position: relative; }
.sighting__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.sighting:hover .sighting__thumb img { transform: scale(1.1); }
.sighting__body { padding: .75rem .75rem .75rem 0; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.sighting__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.sighting__species {
  font-size: .75rem; font-weight: 700; color: var(--stone-900);
  background: var(--surface); padding: .25rem .625rem; border-radius: .5rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
html.dark .sighting__species { color: #fff; background: var(--stone-950); }
.sighting__verified {
  font-size: .58rem; font-family: var(--font-mono); font-weight: 600; text-transform: uppercase;
  color: var(--emerald-700); background: var(--emerald-50);
  padding: .125rem .5rem; border-radius: .375rem; border: 1px solid rgba(209,250,229,.3);
}
html.dark .sighting__verified { background: rgba(2,44,34,.3); color: var(--emerald-400); }
.sighting__desc { font-size: .78rem; color: var(--stone-600); line-height: 1.6; font-family: var(--font-lora); font-style: italic; margin-bottom: .75rem; }
html.dark .sighting__desc { color: var(--stone-300); }
.sighting__meta {
  padding-top: .75rem; border-top: 1px solid rgba(231,229,228,.5);
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem;
  font-size: .62rem; color: var(--stone-500);
}
.sighting__meta span { display: flex; align-items: center; gap: .375rem; }
.sighting__meta .val { color: var(--stone-700); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.dark .sighting__meta .val { color: var(--stone-300); }

/* ============ AI Companion ============ */
.card--ai { padding: 1.5rem; background: var(--stone-50); border-color: var(--border); }
html.dark .card--ai { background: rgba(28,25,23,.5); }
.ai__head { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(231,229,228,.6); }
.ai__title { display: flex; align-items: center; gap: .75rem; }
.ai__badge { padding: .625rem; background: var(--emerald-600); color: #fff; border-radius: .75rem; box-shadow: var(--shadow-md); animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
.ai__title h3 { font-size: 1.25rem; font-weight: 700; color: var(--stone-900); letter-spacing: -.025em; }
html.dark .ai__title h3 { color: #fff; }
.ai__prompts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .625rem; margin-bottom: 1.25rem; }
.ai__prompts button {
  text-align: left; padding: .625rem .75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: .75rem;
  font-size: .72rem; font-weight: 600; color: var(--stone-700); transition: all .2s;
  display: flex; gap: .5rem; align-items: flex-start;
}
html.dark .ai__prompts button { background: var(--stone-950); color: var(--stone-300); }
.ai__prompts button:hover { background: var(--emerald-500); color: #fff; }
.ai__chat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 1rem;
  padding: 1rem; min-height: 220px; max-height: 340px; overflow-y: auto;
  margin-bottom: 1rem; display: flex; flex-direction: column; gap: 1rem;
}
.ai__msg { display: flex; flex-direction: column; align-items: flex-start; }
.ai__msg--user { align-items: flex-end; }
.ai__bubble {
  max-width: 85%; border-radius: 1rem; padding: .625rem 1rem;
  font-size: .78rem; line-height: 1.6; box-shadow: var(--shadow-sm);
}
.ai__msg--bot .ai__bubble {
  background: var(--stone-100); color: var(--stone-900);
  border: 1px solid rgba(231,229,228,.3); border-top-left-radius: 0;
  font-family: var(--font-lora); font-style: italic; font-size: .8rem;
}
html.dark .ai__msg--bot .ai__bubble { background: var(--stone-900); color: var(--stone-200); }
.ai__msg--user .ai__bubble { background: var(--emerald-600); color: #fff; border-top-right-radius: 0; }
.ai__who { font-size: .58rem; color: var(--stone-400); margin-top: .25rem; padding: 0 .25rem; }
.ai__input { display: flex; gap: .625rem; }
.ai__input input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: .75rem; padding: .625rem 1rem; font-size: .75rem; color: var(--stone-900);
  box-shadow: inset 0 2px 4px 0 rgba(0,0,0,.05);
}
html.dark .ai__input input { background: var(--stone-950); color: var(--stone-100); }
.ai__input input:focus { outline: none; border-color: var(--emerald-500); }

/* ============ Footer ============ */
.footer {
  background: var(--stone-100);
  border-top: 1px solid var(--border);
  padding: 3rem 0 0;
  position: relative; z-index: 10;
  transition: background .3s;
}
html.dark .footer { background: var(--stone-950); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; text-align: left; }
.footer__logo { display: flex; align-items: center; gap: .75rem; }
.footer__logo img { width: 9rem; background: #fff; border-radius: .75rem; padding: .125rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.footer__logo span { font-family: var(--font-serif); font-weight: 700; color: var(--stone-900); font-size: 1.1rem; }
html.dark .footer__logo span { color: #fff; }
.footer__brand > p { font-size: .75rem; color: var(--stone-600); line-height: 1.6; max-width: 24rem; margin-top: 1rem; }
html.dark .footer__brand > p { color: var(--stone-400); }
.footer__cite { font-size: .68rem; color: var(--stone-500); line-height: 1.6; max-width: 24rem; border-top: 1px solid var(--border); padding-top: .5rem; font-family: var(--font-lora); font-style: italic; }
html.dark .footer__cite { color: var(--stone-500); }
.footer__partners { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.partner-badge {
  background: #fff; padding: .5rem; border-radius: .75rem;
  height: 3rem; min-width: 120px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .25s;
}
html.dark .partner-badge { background: var(--stone-50); border-color: var(--stone-100); }
.partner-badge:hover { transform: scale(1.04); }
.partner-badge__img { height: 100%; max-width: 120px; max-height: 2rem; object-fit: contain; }
.partner-badge--uom { background: #fff; }
.partner-badge--uom .uom-fallback { font-size: .6rem; font-weight: 700; color: var(--stone-800); }
.footer__legal { font-size: .62rem; color: var(--stone-500); font-family: var(--font-mono); letter-spacing: .025em; margin-top: 1rem; }
.footer__social { display: flex; gap: .5rem; margin-top: .625rem; }
.footer__social a {
  padding: .625rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: .75rem; color: var(--stone-500); font-weight: 700; font-size: .8rem;
  transition: all .2s; width: 2.25rem; text-align: center;
}
.footer__social a:hover { color: var(--emerald-600); border-color: var(--emerald-600); }
html.dark .footer__social a { background: var(--stone-900); border-color: var(--stone-800); color: var(--stone-400); }

.footer__col h5 { font-size: .75rem; font-weight: 700; color: var(--stone-900); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
html.dark .footer__col h5 { color: var(--stone-100); }
.footer__col ul { display: flex; flex-direction: column; gap: .5rem; }
.footer__col li button { font-size: .75rem; color: var(--stone-600); font-weight: 600; }
html.dark .footer__col li button { color: var(--stone-400); }
.footer__col li button:hover { color: var(--emerald-600); }
.footer__col p { font-size: .75rem; color: var(--stone-500); line-height: 1.6; }
.footer__bottom {
  margin-top: 2.5rem; padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-size: .75rem; color: var(--stone-400);
}
.footer__bottom a, .footer__bottom button { color: var(--stone-400); }
.footer__bottom a:hover, .footer__bottom button:hover { color: var(--stone-600); }
html.dark .footer__bottom a:hover, html.dark .footer__bottom button:hover { color: var(--stone-100); }
.footer__links { display: flex; gap: 1rem; }

/* ============ Contact section (footer) ============ */
#contact { scroll-margin-top: 150px; }
.contact {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-lg);
}
.contact__head { margin-bottom: 1.25rem; }
.contact__title { font-size: 1.5rem; font-weight: 700; color: var(--stone-950); letter-spacing: -.025em; }
html.dark .contact__title { color: #fff; }
.contact__desc { font-size: .85rem; color: var(--text-muted); margin-top: .5rem; max-width: 40rem; line-height: 1.6; }
.contact__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact__card {
  display: flex; align-items: center; gap: .875rem;
  padding: 1.125rem 1.25rem;
  background: var(--stone-50);
  border: 1px solid var(--border);
  border-radius: 1rem;
  transition: all .2s;
}
html.dark .contact__card { background: var(--stone-900); }
.contact__card:hover { border-color: var(--emerald-500); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.contact__icon {
  flex-shrink: 0;
  width: 2.75rem; height: 2.75rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--emerald-50); border-radius: .75rem; font-size: 1.25rem;
}
html.dark .contact__icon { background: rgba(2,44,34,.3); }
.contact__label { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--stone-400); margin-bottom: .125rem; }
.contact__value { font-size: .95rem; font-weight: 700; color: var(--stone-900); }
html.dark .contact__value { color: #fff; }
.contact__value:hover { color: var(--emerald-600); }

/* ============ Scroll top ============ */
.scroll-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 80;
  padding: .875rem; background: var(--emerald-600); color: #fff;
  border-radius: 9999px; box-shadow: var(--shadow-lg);
  transition: transform .2s; font-weight: 700; width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
}
.scroll-top:hover { transform: scale(1.05); background: var(--emerald-700); }
.scroll-top.is-visible { opacity: 1; pointer-events: auto; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .nav { display: none; }
  .mobile-nav { display: block; }
  .hero__content { grid-column: span 12; }
  .hero__media { grid-column: span 12; }
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .map__canvas { grid-column: span 12; }
  .map__detail { grid-column: span 12; }
  .ethno__main { grid-column: span 12; }
  .ethno__sidebar { grid-column: span 12; }
  .species-grid { grid-template-columns: 1fr; }
  .card--downloads, .card--partners { grid-column: span 12; }
  .card--form { grid-column: span 12; }
  .card--feed { grid-column: span 12; }
  .park-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .remedy-grid { grid-template-columns: 1fr; }
  .harvest-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .ai__prompts { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .quiz__head { flex-direction: column; }
  .header__inner { flex-direction: column; align-items: flex-start; }
}
