/* ============================================================
   VANYA — Biodiversity Intelligence Platform
   Shared stylesheet · Module 1: Landing Page
   ============================================================ */

:root {
  /* Core palette — deep wetland teal, warm amber, paper cream */
  --ink:         #0D1F18;
  --teal-dark:   #071812;
  --teal-deep:   #0A2B20;
  --teal:        #1A6B52;
  --teal-mid:    #2E8B6A;
  --teal-light:  #4CAF87;
  --teal-glow:   #6DD4A8;
  --sand:        #D8C9A3;
  --sand-light:  #EDE3C8;
  --amber:       #E0A458;
  --amber-deep:  #B87A32;
  --paper:       #FBF8F1;
  --paper-dim:   #F1ECDE;
  --muted:       #6C776E;
  --red:         #C0392B;
  --orange:      #E67E22;
  --line:        rgba(18,35,30,0.10);
  --line-dark:   rgba(216,201,163,0.14);

  --font-display: 'Fraunces', serif;
  --font-body:    'Work Sans', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
section { position: relative; }

::selection { background: var(--teal-glow); color: var(--teal-dark); }

/* focus visibility */
a:focus-visible, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--amber);
}
.eyebrow.on-dark { color: var(--teal-glow); }
.eyebrow.on-dark::before { background: var(--teal-glow); opacity: 0.6; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(251,248,241,0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.site-nav.scrolled { box-shadow: 0 6px 24px rgba(13,31,24,0.06); }
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.nav-brand-text { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: 0.02em; color: var(--teal-deep); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link {
  font-size: 13.5px; font-weight: 500; color: var(--ink); opacity: 0.72;
  position: relative; padding: 4px 0; transition: opacity 0.2s;
}
.nav-link:hover { opacity: 1; }
.nav-link.nav-active { opacity: 1; color: var(--teal); font-weight: 600; }
.nav-link.disabled { cursor: default; opacity: 0.32; }
.nav-link.disabled:hover { opacity: 0.32; }
.nav-link .soon-tag {
  font-family: var(--font-mono); font-size: 8px; vertical-align: super;
  color: var(--amber-deep); margin-left: 3px;
}
.nav-cta {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  background: var(--teal-deep); color: var(--paper);
  padding: 10px 20px; border-radius: 30px;
  border: none; cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--teal); transform: translateY(-1px); }
.nav-burger { display: none; width: 34px; height: 34px; cursor: pointer; }

@media (max-width: 900px) {
  .nav-links { position: fixed; top: 60px; left: 0; right: 0; background: var(--paper);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 32px 20px;
    border-bottom: 1px solid var(--line); transform: translateY(-130%); transition: transform 0.3s ease; }
  .nav-links.open { transform: translateY(0); }
  .nav-link { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-cta { display: none; }
  .nav-burger { display: flex; align-items: center; justify-content: center; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 140px 0 80px;
  position: relative; overflow: hidden;
  color: #EEF6F0;
}
.hero-video-wrap {
  position: absolute; inset: 0; z-index: 0;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}
.hero-video-active {
  opacity: 1;
}
.hero-video-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(76,175,135,0.22) 0%, transparent 60%),
    linear-gradient(180deg, rgba(8,25,18,0.55) 0%, rgba(8,25,18,0.75) 55%, rgba(10,36,23,0.9) 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
  position: relative; z-index: 2;
}
.hero-tagline {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--sand); opacity: 0.75; margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(38px, 5vw, 62px); line-height: 1.06;
  color: #EEF6F0; margin-bottom: 22px;
}
.hero-title em { font-style: italic; color: var(--teal-glow); }
.hero-desc {
  font-size: 16px; color: var(--sand-light); opacity: 0.82; line-height: 1.75;
  max-width: 480px; margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }
.btn-primary {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  background: linear-gradient(135deg, var(--teal-light), var(--teal-mid));
  color: #06150F; padding: 14px 26px; border-radius: 30px;
  border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(76,175,135,0.28); }
.btn-secondary {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  color: var(--sand); padding: 14px 22px; border-radius: 30px;
  border: 1px solid rgba(216,201,163,0.3); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; background: transparent;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--teal-glow); color: #EEF6F0; }
.hero-stat-row { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stat-num { font-family: var(--font-display); font-size: 30px; color: var(--teal-glow); font-weight: 500; line-height: 1; }
.hero-stat-lbl { font-family: var(--font-mono); font-size: 10px; color: var(--sand); opacity: 0.65; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }

/* Hero visual — layered wetland scene w/ heron */
.hero-visual { position: relative; height: 460px; }
.hv-panel {
  position: absolute; inset: 0;
  border-radius: 26px; overflow: hidden;
  background: linear-gradient(160deg, #0F3B2A 0%, #164F38 55%, #1F6B4A 100%);
  box-shadow: 0 40px 90px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.hv-water {
  position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
  background: linear-gradient(180deg, rgba(30,90,120,0.0), rgba(20,70,95,0.55));
}
.hv-ripple { position: absolute; left: -10%; right: -10%; height: 2px; background: rgba(160,220,230,0.14); border-radius: 50%; }
.hv-birds { position: absolute; top: 12%; left: 8%; opacity: 0.5; }
.hv-heron { position: absolute; right: 8%; bottom: 8%; width: 150px; }
.hv-reeds { position: absolute; left: 4%; bottom: 0; width: 90px; }
.hv-card {
  position: absolute; left: 24px; top: 24px;
  background: rgba(8,25,18,0.55); backdrop-filter: blur(10px);
  border: 1px solid rgba(109,212,168,0.25); border-radius: 14px;
  padding: 12px 16px; font-family: var(--font-mono);
}
.hv-card-lbl { font-size: 9px; color: var(--sand); opacity: 0.7; text-transform: uppercase; letter-spacing: 0.08em; }
.hv-card-val { font-size: 20px; color: var(--teal-glow); margin-top: 3px; display: flex; align-items: baseline; gap: 6px; }
.hv-card-val small { font-size: 10px; color: var(--sand); opacity: 0.6; }
.hv-scan {
  position: absolute; right: 24px; bottom: 24px;
  background: rgba(8,25,18,0.65); backdrop-filter: blur(10px);
  border: 1px solid rgba(224,164,88,0.35); border-radius: 12px;
  padding: 10px 14px; display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--sand-light);
}
.hv-scan-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: pulse-dot 1.6s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1; transform:scale(1);} 50%{opacity:0.4; transform:scale(0.7);} }

.hero-scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 9.5px; color: var(--sand); opacity: 0.5;
  z-index: 3;
}
.scroll-line { width: 1px; height: 26px; background: linear-gradient(180deg, var(--sand), transparent); animation: scrollpulse 2s ease-in-out infinite; }
@keyframes scrollpulse { 0%,100%{opacity:0.3;} 50%{opacity:1;} }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 340px; order: -1; }
}

/* ============================================================
   MARQUEE STRIP
   ============================================================ */
.marquee-strip {
  background: var(--teal-deep);
  border-top: 1px solid rgba(109,212,168,0.15);
  border-bottom: 1px solid rgba(109,212,168,0.15);
  overflow: hidden; padding: 16px 0; white-space: nowrap;
}
.marquee-track { display: inline-flex; gap: 40px; animation: scrollLeft 32s linear infinite; }
.marquee-item { font-family: var(--font-mono); font-size: 12px; color: var(--sand); opacity: 0.55; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 40px; }
.marquee-item span.dot { color: var(--teal-glow); opacity: 1; }
@keyframes scrollLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   SECTION: PROBLEM / GAP
   ============================================================ */
.section { padding: 110px 0; }
.section-dark { background: var(--teal-dark); color: var(--paper); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 3.4vw, 42px); line-height: 1.14; color: var(--ink);
}
.section-dark .section-title { color: #EEF6F0; }
.section-title em { font-style: italic; color: var(--teal); }
.section-dark .section-title em { color: var(--teal-glow); }
.section-desc { font-size: 15px; color: var(--muted); margin-top: 16px; line-height: 1.75; max-width: 560px; }
.section-dark .section-desc { color: var(--sand); opacity: 0.8; }

.gap-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.gap-table th {
  font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--sand); opacity: 0.7; text-align: left; padding: 12px 16px; font-weight: 500;
  border-bottom: 1px solid rgba(216,201,163,0.2);
}
.gap-table td { padding: 16px; border-bottom: 1px solid rgba(216,201,163,0.1); vertical-align: middle; }
.gap-table tr.gap-vanya { background: rgba(76,175,135,0.08); }
.gap-table tr.gap-vanya td:first-child { border-radius: 10px 0 0 10px; }
.gap-table tr.gap-vanya td:last-child { border-radius: 0 10px 10px 0; }
.gap-plat { font-weight: 600; color: #EEF6F0; }
.gap-plat.gap-star { color: var(--teal-glow); }
.gap-yes { color: var(--teal-glow); font-weight: 500; }
.gap-partial { color: var(--amber); }
.gap-no { color: rgba(216,201,163,0.3); }
.gap-table-wrap { overflow-x: auto; border-radius: 16px; background: rgba(255,255,255,0.02); border: 1px solid rgba(216,201,163,0.12); padding: 8px; }

/* ============================================================
   MODULES
   ============================================================ */
.modules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.module-card {
  background: var(--paper-dim); border-radius: 20px; padding: 28px 24px;
  border: 1px solid transparent; transition: all 0.28s ease; cursor: pointer;
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
}
.module-card:hover { background: #fff; border-color: rgba(26,107,82,0.25); transform: translateY(-6px); box-shadow: 0 20px 40px rgba(13,31,24,0.08); }
.module-num { font-family: var(--font-mono); font-size: 11px; color: var(--amber-deep); margin-bottom: 18px; }
.module-icon {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--teal), var(--teal-mid));
  display: flex; align-items: center; justify-content: center;
}
.module-icon svg { width: 22px; height: 22px; stroke: #EEF6F0; fill: none; stroke-width: 1.7; }
.module-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.module-desc { font-size: 13px; color: var(--muted); line-height: 1.65; flex: 1; }
.module-link { font-family: var(--font-mono); font-size: 11px; color: var(--teal); margin-top: 18px; display: flex; align-items: center; gap: 6px; }
.module-link svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform 0.2s; }
.module-card:hover .module-link svg { transform: translateX(3px); }

@media (max-width: 980px) { .modules-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .modules-grid { grid-template-columns: 1fr; } }

/* ============================================================
   WORKFLOW — signature "Observation to Action" flow
   ============================================================ */
.flow-wrap { position: relative; padding-top: 20px; }
.flow-line {
  position: absolute; top: 46px; left: 5%; right: 5%; height: 1px;
  background: repeating-linear-gradient(90deg, rgba(109,212,168,0.35) 0 8px, transparent 8px 16px);
}
.flow-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; position: relative; z-index: 2; }
.flow-step { text-align: center; }
.flow-node {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--teal-deep); border: 1.5px solid rgba(109,212,168,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 18px; color: var(--teal-glow);
  position: relative;
}
.flow-node::after {
  content: attr(data-n); position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--amber);
  color: #26170A; font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.flow-node svg { width: 24px; height: 24px; stroke: var(--teal-glow); fill: none; stroke-width: 1.6; }
.flow-title { font-size: 12.5px; font-weight: 600; color: #EEF6F0; margin-bottom: 6px; }
.flow-desc { font-size: 11px; color: var(--sand); opacity: 0.65; line-height: 1.5; }
@media (max-width: 980px) {
  .flow-row { grid-template-columns: repeat(3, 1fr); row-gap: 34px; }
  .flow-line { display: none; }
}
@media (max-width: 560px) { .flow-row { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   WHY KUMARAKOM
   ============================================================ */
.kum-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: center; }
.kum-visual {
  height: 380px; border-radius: 22px; overflow: hidden; position: relative;
  background: linear-gradient(160deg, #C8E6C9, #8FC79A 60%, #6FAE84);
}
.kum-water { position: absolute; left: -10%; right: -10%; height: 46%; bottom: 0; background: rgba(60,140,175,0.4); border-radius: 50%; }
.kum-pin { position: absolute; }
.kum-fact-list { display: flex; flex-direction: column; gap: 22px; }
.kum-fact { display: flex; gap: 18px; }
.kum-fact-num { font-family: var(--font-display); font-size: 26px; color: var(--teal); font-weight: 500; flex-shrink: 0; width: 50px; }
.kum-fact-title { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.kum-fact-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }
@media (max-width: 900px) { .kum-grid { grid-template-columns: 1fr; } .kum-visual { height: 260px; } }

/* ============================================================
   IMPACT STRIP
   ============================================================ */
.impact-strip {
  background: linear-gradient(120deg, var(--teal-deep), var(--teal) 140%);
  border-radius: 26px; padding: 54px 50px;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 30px;
}
.impact-item { text-align: left; }
.impact-num { font-family: var(--font-display); font-size: 40px; color: #EEF6F0; font-weight: 500; line-height: 1; }
.impact-lbl { font-family: var(--font-mono); font-size: 11px; color: var(--teal-glow); margin-top: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 900px) { .impact-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .impact-strip { grid-template-columns: 1fr; } }

/* ============================================================
   CTA / FOOTER
   ============================================================ */
.cta-section {
  text-align: center; padding: 120px 0 100px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-dim) 100%);
}
.cta-title { font-family: var(--font-display); font-size: clamp(30px,4vw,48px); font-weight: 500; max-width: 680px; margin: 0 auto 20px; line-height: 1.15; }
.cta-title em { font-style: italic; color: var(--teal); }
.cta-desc { font-size: 15px; color: var(--muted); max-width: 480px; margin: 0 auto 36px; line-height: 1.7; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary.dark-ctx { color: #06150F; }
.btn-outline {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  color: var(--ink); padding: 14px 26px; border-radius: 30px;
  border: 1px solid var(--line); cursor: pointer; background: transparent;
  transition: border-color 0.2s;
}
.btn-outline:hover { border-color: var(--teal); }

/* ============================================================
   PROPOSAL SECTION
   ============================================================ */
.proposal-section { background: var(--paper-dim); }
.proposal-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: start; }
.proposal-preview {
  background: #fff; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); position: relative;
}
.proposal-placeholder {
  min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #F4F8F5 0%, #EAF2EC 100%);
}
.proposal-highlights { display: flex; flex-direction: column; gap: 0; }
.proposal-highlight {
  display: flex; gap: 16px; padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.proposal-highlight:last-child { border-bottom: none; }
.proposal-hl-num {
  font-family: var(--font-display); font-size: 20px; color: var(--teal-glow);
  flex-shrink: 0; width: 36px;
}
.proposal-hl-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.proposal-hl-desc { font-size: 13px; color: var(--muted); line-height: 1.65; }
@media (max-width: 820px) { .proposal-layout { grid-template-columns: 1fr; } .proposal-pdf { height: 360px; } }

footer { background: var(--teal-dark); color: var(--sand); padding: 70px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.footer-brand-text { font-family: var(--font-display); font-size: 17px; color: #EEF6F0; }
.footer-tagline { font-size: 12.5px; opacity: 0.6; max-width: 240px; line-height: 1.6; }
.footer-col-title { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-glow); margin-bottom: 16px; }
.footer-link { display: block; font-size: 13px; opacity: 0.65; padding: 6px 0; transition: opacity 0.2s; }
.footer-link:hover { opacity: 1; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 26px; border-top: 1px solid rgba(216,201,163,0.12);
  font-family: var(--font-mono); font-size: 11px; opacity: 0.45; flex-wrap: wrap; gap: 10px;
}
.footer-socials { display: flex; gap: 14px; }
.footer-socials svg { width: 16px; height: 16px; stroke: var(--sand); fill: none; stroke-width: 1.6; opacity: 0.6; transition: opacity 0.2s; }
.footer-socials a:hover svg { opacity: 1; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   SUB-PAGE HERO (used on inner pages: AI Identify, Dashboard, etc.)
   ============================================================ */
.page-hero {
  padding: 150px 0 70px;
  background: linear-gradient(180deg, var(--teal-dark) 0%, #0A2417 100%);
}
.page-hero-inner { max-width: 720px; }
.page-hero-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px,4vw,46px); color: #EEF6F0; line-height: 1.14; margin-bottom: 16px; }
.page-hero-title em { font-style: italic; color: var(--teal-glow); }
.page-hero-desc { font-size: 15px; color: var(--sand); opacity: 0.8; line-height: 1.7; max-width: 540px; }
.breadcrumb { font-family: var(--font-mono); font-size: 11px; color: var(--sand); opacity: 0.55; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.breadcrumb a { color: var(--teal-glow); opacity: 1; }
.breadcrumb .sep { opacity: 0.4; }

/* ============================================================
   AI IDENTIFICATION MODULE
   ============================================================ */
.ai-split { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }

/* -- Scan panel -- */
.scan-panel {
  background: var(--teal-dark); border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(109,212,168,0.18);
  box-shadow: 0 30px 70px rgba(0,0,0,0.35);
}
.scan-stage {
  height: 360px; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 50% 65%, #123A28 0%, #081E17 65%);
  display: flex; align-items: center; justify-content: center;
}
.scan-video, .scan-captured {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 0; z-index: 1;
}
.scan-captured { z-index: 2; }
.scan-idle-msg { font-family: var(--font-mono); font-size: 12px; color: var(--sand); opacity: 0.55; text-align: center; padding: 0 30px; z-index: 0; position: relative; }
.scan-subject { position: absolute; bottom: 18%; }
.scan-subject svg { width: 130px; }
.scan-frame {
  position: absolute; top: 12%; left: 10%; right: 10%; bottom: 24%;
  border-radius: 18px; opacity: 0;
  transition: opacity 0.3s;
}
.scan-frame.active { opacity: 1; }
.scan-corner-x { position: absolute; width: 22px; height: 22px; border: 2.5px solid var(--amber); }
.scx-tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.scx-tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.scx-bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.scx-br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.scan-sweep {
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  animation: sweepMove 1.8s ease-in-out infinite;
}
@keyframes sweepMove { 0% { top: 4%; opacity: 0.9; } 50% { top: 92%; opacity: 0.5; } 100% { top: 4%; opacity: 0.9; } }
.scan-status-pill {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(8,25,18,0.75); backdrop-filter: blur(8px);
  border: 1px solid rgba(224,164,88,0.3); border-radius: 20px;
  padding: 7px 18px; font-family: var(--font-mono); font-size: 11px; color: var(--sand-light);
  display: flex; align-items: center; gap: 8px; opacity: 0; transition: opacity 0.3s;
}
.scan-status-pill.active { opacity: 1; }
.scan-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: pulse-dot 1.4s ease-in-out infinite; }
.scan-controls {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  padding: 20px 0 24px; background: rgba(8,25,18,0.9);
}
.scan-shutter {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--amber);
  cursor: pointer; transition: transform 0.15s;
}
.scan-shutter:hover { transform: scale(0.95); }
.scan-upload-btn {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--sand);
  border: 1px solid rgba(216,201,163,0.3); border-radius: 20px;
  padding: 9px 16px; cursor: pointer; background: transparent; transition: border-color 0.2s;
}
.scan-upload-btn:hover { border-color: var(--teal-glow); color: #EEF6F0; }
.scan-reset-note { text-align: center; font-family: var(--font-mono); font-size: 10px; color: var(--sand); opacity: 0.4; padding-bottom: 16px; }

/* -- Result card -- */
.result-card {
  background: var(--paper-dim); border-radius: 22px; padding: 30px;
  min-height: 360px; display: flex; flex-direction: column;
}
.result-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 14px; color: var(--muted);
}
.result-empty svg { width: 40px; height: 40px; stroke: var(--muted); opacity: 0.5; }
.result-empty-text { font-size: 13px; max-width: 220px; line-height: 1.6; }
.result-content { display: none; }
.result-content.active { display: block; }
.result-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.result-common { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--ink); }
.result-sci { font-style: italic; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.result-confidence { font-family: var(--font-mono); font-size: 10.5px; color: var(--teal); background: #DFF0E5; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.result-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.result-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.rig-item { background: var(--paper); border-radius: 12px; padding: 12px 14px; }
.rig-label { font-family: var(--font-mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.rig-val { font-size: 13px; font-weight: 500; color: var(--ink); }
.result-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 18px; }
.result-actions { display: flex; gap: 10px; }
.btn-mini {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  padding: 10px 16px; border-radius: 20px; cursor: pointer; border: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-mini.primary { background: var(--teal); color: var(--paper); }
.btn-mini.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-mini svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

/* -- category grid -- */
.cat-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 12px; }
.cat-tile {
  background: var(--paper-dim); border-radius: 16px; padding: 20px 10px;
  text-align: center; transition: all 0.2s; cursor: default;
}
.cat-tile:hover { background: #fff; transform: translateY(-4px); box-shadow: 0 14px 26px rgba(13,31,24,0.07); }
.cat-tile svg { width: 26px; height: 26px; stroke: var(--teal); fill: none; stroke-width: 1.6; margin: 0 auto 10px; }
.cat-name { font-size: 11.5px; font-weight: 500; color: var(--ink); }
@media (max-width: 980px) { .cat-grid { grid-template-columns: repeat(4,1fr); } .ai-split { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: repeat(2,1fr); } .result-info-grid { grid-template-columns: 1fr; } }

/* -- AI group detail cards -- */
.ai-group-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.ai-group-card {
  background: var(--paper-dim); border-radius: 16px; padding: 22px 20px;
  border: 1px solid transparent; transition: all 0.25s; cursor: default;
}
.ai-group-card:hover { background: #fff; border-color: rgba(26,107,82,0.2); transform: translateY(-4px); box-shadow: 0 16px 32px rgba(13,31,24,0.07); }
.ai-group-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.ai-group-name { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.ai-group-count { font-family: var(--font-mono); font-size: 11px; color: var(--teal); margin-bottom: 10px; }
.ai-group-desc { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin-bottom: 12px; }
.ai-group-examples { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-group-examples span {
  font-family: var(--font-mono); font-size: 10px; color: var(--teal);
  background: #DFF0E5; padding: 3px 8px; border-radius: 12px;
}
@media (max-width: 980px) { .ai-group-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .ai-group-grid { grid-template-columns: 1fr; } }

/* -- How it works steps -- */
.ai-steps-grid { display: flex; align-items: flex-start; gap: 0; }
.ai-step { flex: 1; padding: 24px 20px; }
.ai-step-num {
  font-family: var(--font-display); font-size: 28px; font-weight: 600;
  color: var(--teal-glow); margin-bottom: 12px; opacity: 0.6;
}
.ai-step-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.ai-step-desc { font-size: 13px; color: var(--muted); line-height: 1.65; }
.ai-step-arrow {
  flex-shrink: 0; display: flex; align-items: center; padding-top: 60px; opacity: 0.4;
}
@media (max-width: 820px) { .ai-steps-grid { flex-direction: column; gap: 0; } .ai-step-arrow { transform: rotate(90deg); padding: 10px 0; } }

/* -- AI stats cards -- */
.ai-stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.ai-stat-card {
  background: rgba(255,255,255,0.06); border-radius: 16px; padding: 28px 22px;
  border: 1px solid rgba(109,212,168,0.12); text-align: center;
}
.ai-stat-num {
  font-family: var(--font-display); font-size: 36px; font-weight: 600;
  color: var(--teal-glow); line-height: 1; margin-bottom: 6px;
}
.ai-stat-label { font-size: 14px; font-weight: 600; color: #EEF6F0; margin-bottom: 8px; }
.ai-stat-desc { font-size: 12px; color: var(--sand); opacity: 0.6; line-height: 1.5; }
@media (max-width: 820px) { .ai-stats-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .ai-stats-grid { grid-template-columns: 1fr; } }

/* -- guideline steps -- */
.guide-list { display: flex; flex-direction: column; gap: 0; }
.guide-item { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid rgba(216,201,163,0.12); }
.guide-num { font-family: var(--font-display); font-size: 22px; color: var(--teal-glow); flex-shrink: 0; width: 40px; }
.guide-title { font-size: 14.5px; font-weight: 600; color: #EEF6F0; margin-bottom: 5px; }
.guide-desc { font-size: 13px; color: var(--sand); opacity: 0.7; line-height: 1.65; max-width: 460px; }

/* ============================================================
   CONSERVATION DASHBOARD MODULE
   ============================================================ */
.dash-top-grid { display: grid; grid-template-columns: 1.1fr 2fr; gap: 22px; margin-bottom: 22px; }

/* -- Health score gauge card -- */
.gauge-card {
  background: linear-gradient(150deg, var(--teal-deep), var(--teal) 150%);
  border-radius: 22px; padding: 28px; color: #EEF6F0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.gauge-wrap { position: relative; width: 168px; height: 168px; margin: 6px 0 16px; }
.gauge-wrap svg { transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: rgba(255,255,255,0.14); stroke-width: 10; }
.gauge-fill { fill: none; stroke: var(--teal-glow); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.2,.8,.2,1); }
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-num { font-family: var(--font-display); font-size: 40px; font-weight: 600; line-height: 1; }
.gauge-sub { font-family: var(--font-mono); font-size: 9px; opacity: 0.7; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.gauge-label { font-family: var(--font-mono); font-size: 11px; opacity: 0.75; }
.gauge-delta { font-size: 12.5px; margin-top: 8px; color: var(--teal-glow); font-weight: 500; }

/* -- KPI mini cards -- */
.kpi-mini-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.kpi-mini { background: var(--paper-dim); border-radius: 16px; padding: 18px 20px; }
.kpi-mini-label { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 8px; }
.kpi-mini-val { font-family: var(--font-display); font-size: 28px; font-weight: 500; color: var(--ink); line-height: 1; }
.kpi-mini-trend { font-family: var(--font-mono); font-size: 10.5px; margin-top: 8px; }
.trend-up { color: var(--teal); } .trend-down { color: var(--red); }
.kpi-mini-note { grid-column: span 3; background: var(--paper-dim); border-radius: 16px; padding: 16px 20px; font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
.kpi-mini-note svg { width: 16px; height: 16px; stroke: var(--amber-deep); flex-shrink: 0; margin-top: 2px; }
@media (max-width: 700px) { .kpi-mini-grid { grid-template-columns: 1fr 1fr; } .kpi-mini-note { grid-column: span 2; } .dash-top-grid { grid-template-columns: 1fr; } }

/* -- Map card -- */
.dash-map-card {
  border-radius: 22px; overflow: hidden; position: relative; height: 300px;
  background: linear-gradient(150deg, #BFE0C2, #8FC79A 55%, #6FAE84);
  margin-bottom: 22px;
}
.dash-map-water { position: absolute; left: -10%; right: -10%; height: 42%; bottom: 0; background: rgba(55,130,165,0.42); border-radius: 50%; }
.dash-map-legend {
  position: absolute; top: 16px; left: 16px; background: rgba(255,255,255,0.85); backdrop-filter: blur(6px);
  border-radius: 12px; padding: 10px 14px; display: flex; gap: 14px; font-family: var(--font-mono); font-size: 10px; color: var(--ink);
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.dash-map-pin { position: absolute; cursor: pointer; }
.dash-map-pin svg { width: 22px; height: 22px; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25)); }
.dash-map-tag {
  position: absolute; bottom: 16px; right: 16px; background: rgba(8,25,18,0.75); color: #EEF6F0;
  font-family: var(--font-mono); font-size: 10.5px; padding: 8px 14px; border-radius: 20px; backdrop-filter: blur(6px);
}

/* -- Water quality params + trend -- */
.wq-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; margin-bottom: 20px; }
.wq-card { background: var(--paper-dim); border-radius: 14px; padding: 14px 16px; }
.wq-label { font-family: var(--font-mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; }
.wq-val { font-family: var(--font-display); font-size: 22px; font-weight: 500; color: var(--ink); line-height: 1; }
.wq-unit { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.wq-status-bar { height: 4px; border-radius: 2px; margin-top: 10px; }
.wq-ok { background: var(--teal-light); } .wq-warn { background: var(--amber); } .wq-alert { background: var(--red); }
@media (max-width: 900px) { .wq-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 560px) { .wq-grid { grid-template-columns: repeat(2,1fr); } }

.trend-card-lg { background: var(--paper-dim); border-radius: 18px; padding: 24px; margin-bottom: 22px; }
.trend-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.trend-card-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--ink); }
.trend-tabs { display: flex; gap: 6px; }
.trend-tab {
  font-family: var(--font-mono); font-size: 10.5px; padding: 6px 12px; border-radius: 16px;
  color: var(--muted); cursor: pointer; border: 1px solid var(--line); background: transparent; transition: all 0.2s;
}
.trend-tab.active { background: var(--teal); color: var(--paper); border-color: var(--teal); }
.chart-bars-lg { display: flex; align-items: flex-end; gap: 8px; height: 130px; }
.c-bar-lg { flex: 1; border-radius: 5px 5px 0 0; background: var(--teal-light); min-height: 6px; transition: height 0.5s cubic-bezier(.2,.8,.2,1), background 0.3s; position: relative; }
.c-bar-lg.warn { background: var(--amber); }
.c-bar-lg.alert { background: var(--red); }
.chart-labels-lg { display: flex; gap: 8px; margin-top: 8px; }
.c-lbl-lg { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); }

/* -- Reports + tasks two column -- */
.dash-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.panel-card { background: var(--paper-dim); border-radius: 18px; padding: 22px; }
.panel-card-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.panel-card-title small { font-family: var(--font-mono); font-size: 10px; color: var(--muted); font-weight: 400; }
.report-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.report-row:last-child { border-bottom: none; }
.sev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.report-name { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.report-meta { font-size: 10px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; }
.report-badge { margin-left: auto; font-family: var(--font-mono); font-size: 9px; padding: 3px 9px; border-radius: 12px; white-space: nowrap; }
.rb-open { background: #FADED9; color: var(--red); }
.rb-progress { background: #FBEBD6; color: var(--amber-deep); }
.rb-done { background: #DFF0E5; color: var(--teal); }

.task-row { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.task-row:last-child { margin-bottom: 0; }
.task-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.task-icon svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 1.8; }
.task-label { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.task-meta { font-size: 10px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; }
@media (max-width: 900px) { .dash-bottom-grid { grid-template-columns: 1fr; } }

/* ============================================================
   CITIZEN SCIENCE / ECOCONNECT MODULE
   ============================================================ */
.cs-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
.cs-tabs { display: flex; gap: 4px; background: var(--paper-dim); border-radius: 30px; padding: 5px; margin-bottom: 22px; width: fit-content; }
.cs-tab { font-family: var(--font-mono); font-size: 12px; padding: 9px 20px; border-radius: 24px; cursor: pointer; color: var(--muted); transition: all 0.2s; border: none; background: transparent; }
.cs-tab.active { background: var(--teal); color: var(--paper); }

.cs-composer {
  background: var(--paper-dim); border-radius: 18px; padding: 16px 18px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 22px;
}
.cs-composer-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-family: var(--font-display); flex-shrink: 0; }
.cs-composer-text { font-size: 13px; color: var(--muted); flex: 1; }
.cs-composer-btn { font-family: var(--font-mono); font-size: 11px; background: var(--teal); color: #fff; border: none; padding: 9px 16px; border-radius: 18px; cursor: pointer; flex-shrink: 0; }

.cs-post { background: var(--paper-dim); border-radius: 20px; padding: 20px; margin-bottom: 18px; }
.cs-post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cs-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; color: #fff; flex-shrink: 0; overflow: hidden; }
.cs-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cs-name-row { display: flex; align-items: center; gap: 6px; }
.cs-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.cs-verified { width: 14px; height: 14px; }
.cs-role { font-size: 10px; font-family: var(--font-mono); color: var(--muted); }
.cs-time { margin-left: auto; font-size: 10.5px; font-family: var(--font-mono); color: var(--muted); }
.cs-official-tag { font-size: 9px; background: #D8EAF8; color: #1E5080; font-family: var(--font-mono); padding: 3px 9px; border-radius: 10px; margin-left: auto; }
.cs-photo { width: 100%; border-radius: 14px; margin-bottom: 14px; overflow: hidden; height: 260px; position: relative; background-size: cover; background-position: center; }
.cs-photo-badge { position: absolute; top: 12px; left: 12px; background: rgba(8,25,18,0.7); backdrop-filter: blur(6px); color: #EEF6F0; font-family: var(--font-mono); font-size: 9.5px; padding: 5px 12px; border-radius: 14px; }
.cs-text { font-size: 13.5px; color: var(--ink); line-height: 1.65; margin-bottom: 12px; }
.cs-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cs-tag { font-size: 10.5px; color: var(--teal); font-family: var(--font-mono); }
.cs-actions { display: flex; gap: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.cs-action { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.cs-action svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.cs-action.liked { color: #E53935; }
.cs-action.liked svg { stroke: #E53935; fill: #E53935; }

/* Sidebar */
.cs-side-card { background: var(--paper-dim); border-radius: 18px; padding: 20px; margin-bottom: 18px; }
.cs-side-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 600; margin-bottom: 14px; }
.cs-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.cs-stat-row:last-child { border-bottom: none; }
.cs-stat-row span:first-child { color: var(--muted); }
.cs-stat-row span:last-child { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.cs-leader-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.cs-leader-rank { font-family: var(--font-mono); font-size: 11px; color: var(--amber-deep); width: 18px; }
.cs-leader-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--teal-mid); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.cs-leader-name { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.cs-leader-pts { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
@media (max-width: 980px) { .cs-layout { grid-template-columns: 1fr; } }

/* ============================================================
   GLOBAL POLISH — glass surfaces, image-with-fallback, depth
   ============================================================ */
.glass-card {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 20px 50px rgba(13,31,24,0.10);
}
.glass-card.on-dark {
  background: rgba(20,50,38,0.4);
  border-color: rgba(109,212,168,0.18);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
/* photo-with-fallback: real <img> sits over a themed gradient;
   if the file is missing, main.js adds .img-missing and the gradient shows through */
.photo-frame { position: relative; overflow: hidden; background: linear-gradient(135deg, #123A28, #1F6B4A 60%, #2E8B6A); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 2; transition: opacity 0.3s; }
.photo-frame img.img-missing { opacity: 0; position: absolute; }
.photo-frame .photo-fallback-icon {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  z-index: 1; opacity: 0.35;
}
.photo-frame.show-fallback .photo-fallback-icon { display: flex; }
.photo-frame .photo-fallback-icon svg { width: 34%; max-width: 64px; stroke: #EEF6F0; fill: none; stroke-width: 1.3; }

/* richer elevation for key cards across pages */
.module-card, .info-card, .result-card, .panel-card, .gauge-card, .trend-card-lg { box-shadow: 0 1px 2px rgba(13,31,24,0.04); }
.module-card:hover { box-shadow: 0 24px 48px rgba(13,31,24,0.10); }

/* warm secondary accent for badges / tags used sparingly for hierarchy */
.accent-chip { font-family: var(--font-mono); font-size: 9.5px; padding: 4px 10px; border-radius: 20px; background: rgba(224,164,88,0.14); color: var(--amber-deep); display: inline-block; }

/* ============================================================
   CITIZEN SCIENCE / ECOCONNECT MODULE (continued)
   ============================================================ */
.composer-card { background: var(--paper-dim); border-radius: 20px; padding: 22px; margin-bottom: 24px; }
.composer-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.composer-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-family: var(--font-display); flex-shrink: 0; }
.composer-input {
  flex: 1; background: var(--paper); border-radius: 20px; padding: 11px 18px;
  font-size: 13px; color: var(--muted); font-family: var(--font-body);
}
.composer-actions { display: flex; justify-content: space-between; align-items: center; }
.composer-tools { display: flex; gap: 16px; }
.composer-tool { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.composer-tool svg { width: 16px; height: 16px; stroke: var(--teal); fill: none; stroke-width: 1.7; }

.feed-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.feed-tab { font-family: var(--font-mono); font-size: 12px; padding: 10px 18px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.feed-tab.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 500; }

.feed-card { background: var(--paper-dim); border-radius: 20px; padding: 20px; margin-bottom: 18px; }
.feed-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fc-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #fff; flex-shrink: 0; }
.fc-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.fc-meta { font-size: 10.5px; color: var(--muted); font-family: var(--font-mono); }
.fc-verified { margin-left: auto; font-family: var(--font-mono); font-size: 9px; background: #DFF0E5; color: var(--teal); padding: 3px 9px; border-radius: 12px; white-space: nowrap; }
.fc-official { background: #D8EAF8; color: #1E5080; }
.fc-photo { height: 240px; border-radius: 14px; margin-bottom: 12px; }
.fc-text { font-size: 13.5px; color: var(--ink); line-height: 1.65; margin-bottom: 10px; }
.fc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fc-tag { font-size: 11px; color: var(--teal); font-family: var(--font-mono); }
.fc-actions { display: flex; gap: 20px; padding-top: 10px; border-top: 1px solid var(--line); }
.fc-action { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.fc-action svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.fc-action.liked svg { stroke: #E53935; fill: #E53935; }

/* right rail */
.rail-card { background: var(--paper-dim); border-radius: 18px; padding: 20px; margin-bottom: 18px; }
.rail-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 600; margin-bottom: 14px; }
.rail-stat-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.rail-stat-row:last-child { border-bottom: none; }
.rail-stat-num { font-family: var(--font-display); color: var(--teal); font-weight: 600; }
.leader-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.leader-rank { font-family: var(--font-mono); font-size: 11px; color: var(--muted); width: 16px; }
.leader-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--teal-mid); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.leader-name { font-size: 12.5px; color: var(--ink); flex: 1; }
.leader-pts { font-family: var(--font-mono); font-size: 11px; color: var(--teal); }
.group-chip-list { display: flex; flex-direction: column; gap: 10px; }
.group-chip { display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.group-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.group-icon svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 1.8; }
.group-name { font-size: 12px; font-weight: 500; color: var(--ink); }
.group-count { font-size: 10px; color: var(--muted); font-family: var(--font-mono); }

@media (max-width: 980px) { .cs-layout { grid-template-columns: 1fr; } }

/* ============================================================
   MOBILE APP PREVIEW (phone-frame showcase, homepage)
   ============================================================ */
.app-preview-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 50px; align-items: center; }
.app-preview-tabs { display: flex; flex-direction: column; gap: 10px; }
.app-tab {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px;
  cursor: pointer; border: 1px solid var(--line); background: var(--paper-dim); transition: all 0.25s;
}
.app-tab.active { background: var(--teal-deep); border-color: var(--teal-deep); }
.app-tab-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.app-tab-icon svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 1.8; }
.app-tab-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.app-tab.active .app-tab-title { color: #EEF6F0; }
.app-tab-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.app-tab.active .app-tab-desc { color: var(--sand); opacity: 0.7; }

.phone-stage { display: flex; justify-content: center; }
.phone-frame {
  width: 290px; height: 590px; border-radius: 42px; background: #0A0F0C;
  padding: 14px; box-shadow: 0 40px 90px rgba(13,31,24,0.35), 0 0 0 2px rgba(255,255,255,0.04) inset;
  position: relative;
}
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; background: #0A0F0C; border-radius: 0 0 14px 14px; z-index: 5; }
.phone-screen {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden; position: relative;
  background: var(--paper); display: flex; flex-direction: column;
}
.app-status-bar { display: flex; justify-content: space-between; padding: 16px 20px 8px; font-family: var(--font-mono); font-size: 10px; color: var(--ink); }
.app-screen { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.app-screen.active { display: flex; }
.app-bottom-nav { display: flex; justify-content: space-around; padding: 14px 10px; border-top: 1px solid var(--line); background: var(--paper); }
.abn-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.abn-item svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.7; }
.abn-item.on svg { stroke: var(--teal); }
.abn-item span { font-family: var(--font-mono); font-size: 8px; color: var(--muted); }
.abn-item.on span { color: var(--teal); }

/* home screen */
.aps-home-hero { background: linear-gradient(160deg, var(--teal-deep), var(--teal)); padding: 18px 20px 22px; color: #EEF6F0; }
.aps-home-hero .h-eyebrow { font-family: var(--font-mono); font-size: 9px; opacity: 0.7; margin-bottom: 6px; }
.aps-home-hero .h-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.aps-home-stats { display: flex; gap: 10px; margin-top: 14px; }
.aps-home-stats div { background: rgba(255,255,255,0.1); border-radius: 10px; padding: 8px 10px; flex: 1; }
.aps-home-stats .n { font-family: var(--font-display); font-size: 15px; }
.aps-home-stats .l { font-family: var(--font-mono); font-size: 7px; opacity: 0.7; margin-top: 2px; }
.aps-home-grid { padding: 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aps-home-tile { background: var(--paper-dim); border-radius: 12px; padding: 12px; }
.aps-home-tile svg { width: 18px; height: 18px; stroke: var(--teal); fill: none; stroke-width: 1.7; margin-bottom: 8px; }
.aps-home-tile div { font-size: 10.5px; font-weight: 600; color: var(--ink); }

/* identify screen */
.aps-identify-cam { flex: 1; background: linear-gradient(180deg,#123A28,#081E17); position: relative; display: flex; align-items: center; justify-content: center; }
.aps-identify-cam svg.subject { width: 90px; }
.aps-scan-box { position: absolute; top: 14%; left: 12%; right: 12%; bottom: 30%; border: 2px solid var(--amber); border-radius: 14px; }
.aps-identify-result { background: var(--paper-dim); padding: 16px 18px; }
.aps-identify-result .r-name { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.aps-identify-result .r-conf { font-family: var(--font-mono); font-size: 9px; color: var(--teal); margin-top: 3px; }

/* feed screen */
.aps-feed { flex: 1; overflow: hidden; padding: 14px 16px; }
.aps-feed-post { background: var(--paper-dim); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.aps-feed-avatar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.aps-feed-avatar .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--teal); }
.aps-feed-avatar span { font-size: 10.5px; font-weight: 600; }
.aps-feed-photo { height: 70px; border-radius: 8px; background: linear-gradient(135deg,#123A28,#2E8B6A); }
.aps-feed-txt { font-size: 9.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* dashboard screen */
.aps-dash { flex: 1; padding: 16px 18px; overflow: hidden; }
.aps-dash-gauge { background: linear-gradient(150deg,var(--teal-deep),var(--teal)); border-radius: 14px; padding: 16px; text-align: center; color: #EEF6F0; margin-bottom: 12px; }
.aps-dash-gauge .g-num { font-family: var(--font-display); font-size: 28px; }
.aps-dash-gauge .g-lbl { font-family: var(--font-mono); font-size: 8px; opacity: 0.7; }
.aps-dash-row { display: flex; gap: 8px; margin-bottom: 8px; }
.aps-dash-row .cell { flex: 1; background: var(--paper-dim); border-radius: 10px; padding: 8px 10px; }
.aps-dash-row .cell .n { font-family: var(--font-display); font-size: 15px; color: var(--ink); }
.aps-dash-row .cell .l { font-family: var(--font-mono); font-size: 6.5px; color: var(--muted); }

@media (max-width: 980px) { .app-preview-layout { grid-template-columns: 1fr; } .phone-frame { width: 260px; height: 530px; } }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
