/* MCU BioQuest visual system v2 — warm editorial field-guide aesthetic */
:root {
  --bg: #f4f1e8;
  --bg-2: #ebe7da;
  --surface: #fffdf7;
  --surface-2: #f7f4ea;
  --surface-3: #edf2e9;
  --ink: #173a2f;
  --text: #173a2f;
  --muted: #6c7c72;
  --muted-strong: #53665c;
  --forest: #173f32;
  --forest-2: #0f3026;
  --moss: #6f8d63;
  --accent: #64875c;
  --accent-strong: #315f48;
  --amber: #c39247;
  --animal: #716c9d;
  --danger: #a74f4b;
  --warning: #966f30;
  --line: rgba(23,58,47,.11);
  --line-strong: rgba(23,58,47,.19);
  --radius: 22px;
  --radius-lg: 32px;
  --shadow: 0 22px 64px rgba(28,46,37,.09);
  --shadow-soft: 0 10px 34px rgba(28,46,37,.065);
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(circle at 10% 0%, rgba(111,141,99,.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(100,135,92,.22); color: var(--forest-2); }
:focus-visible { outline: 3px solid rgba(100,135,92,.28); outline-offset: 3px; }
.shell { width: min(1240px, calc(100% - 48px)); }

.skip-link {
  position: fixed; left: 18px; top: 12px; z-index: 3000;
  transform: translateY(-180%); padding: 10px 14px; border-radius: 999px;
  background: var(--forest); color: #fff; text-decoration: none; font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  border-bottom: 1px solid rgba(23,58,47,.08);
  background: rgba(247,244,234,.86);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 1px 0 rgba(255,255,255,.7);
}
.header-inner { min-height: 78px; }
.brand { gap: 13px; }
.brand-mark {
  width: 44px; height: 44px; padding: 0; overflow: hidden;
  border: 1px solid rgba(23,58,47,.13); border-radius: 15px;
  background: var(--forest); color: #eef4e9; box-shadow: 0 7px 18px rgba(23,58,47,.18);
}
.brand-mark svg { width: 25px; height: 25px; }
.brand strong { color: var(--forest); font-size: .96rem; letter-spacing: -.015em; }
.brand small { color: var(--muted); font-size: .68rem; letter-spacing: .025em; }
.site-nav { gap: 3px; }
.site-nav > a, .nav-button {
  min-height: 40px; display: inline-flex; align-items: center;
  padding: 8px 12px; color: #5e7066; border-radius: 999px;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.site-nav > a:hover, .nav-button:hover { color: var(--forest); background: rgba(23,58,47,.055); }
.site-nav .nav-primary {
  padding-inline: 16px; color: #fff; background: var(--forest); box-shadow: 0 7px 18px rgba(23,58,47,.13);
}
.site-nav .nav-primary:hover { color: #fff; background: var(--forest-2); transform: translateY(-1px); }
.mobile-nav summary { border-color: var(--line); background: rgba(255,255,255,.55); color: var(--forest); }
.mobile-nav[open] summary { border-color: var(--line-strong); background: #fff; }
.mobile-nav nav { border-color: var(--line); background: rgba(255,253,247,.97); box-shadow: var(--shadow); }
.mobile-nav nav a, .mobile-nav nav button { color: var(--forest); }
.mobile-nav nav a:hover, .mobile-nav nav button:hover { background: rgba(23,58,47,.055); }

.hero {
  min-height: 650px; padding: 94px 0 82px; border-bottom: 0;
  background:
    radial-gradient(circle at 80% 15%, rgba(184,203,159,.16), transparent 24rem),
    radial-gradient(circle at 18% 95%, rgba(212,190,139,.10), transparent 22rem),
    linear-gradient(145deg, #173f32 0%, #102e25 62%, #0b261e 100%);
  color: #f7f4e9;
}
.hero::after {
  opacity: .7;
  background-image:
    radial-gradient(circle at center, rgba(255,255,255,.10) 1px, transparent 1.5px),
    linear-gradient(115deg, transparent 0 46%, rgba(255,255,255,.035) 46% 47%, transparent 47% 100%);
  background-size: 34px 34px, 160px 160px;
  mask-image: linear-gradient(to bottom, #000, rgba(0,0,0,.8) 70%, transparent);
}
.hero-grid { grid-template-columns: minmax(0,1.08fr) minmax(420px,.92fr); gap: clamp(48px,7vw,92px); }
.hero-copy-block { max-width: 720px; }
.hero .eyebrow { color: #c8d7b7; }
.hero h1 {
  max-width: 760px; margin-bottom: 22px;
  color: #fffdf5; font-size: clamp(3rem,6vw,5.7rem); line-height: .98;
  letter-spacing: -.055em; text-wrap: balance;
}
.hero h1 .hero-highlight { color: #d9d9a8; }
.hero-copy { max-width: 650px; color: rgba(244,247,238,.77); font-size: clamp(1rem,1.5vw,1.14rem); line-height: 1.85; }
.hero .button { border-color: rgba(255,255,255,.18); color: #f7f7ef; background: rgba(255,255,255,.055); }
.hero .button:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.1); }
.hero .button-primary { border-color: #dbe3c8; background: #dbe3c8; color: #15362b; }
.hero .button-primary:hover { background: #eef2df; color: #102e25; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 32px; color: rgba(244,247,238,.66); font-size: .78rem; }
.hero-proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof i { width: 6px; height: 6px; border-radius: 50%; background: #c9d9aa; box-shadow: 0 0 0 5px rgba(201,217,170,.08); }

.hero-ecosystem {
  position: relative; isolation: isolate; min-height: 450px; padding: 26px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 34px;
  background: linear-gradient(155deg, rgba(255,255,255,.11), rgba(255,255,255,.045));
  box-shadow: 0 30px 80px rgba(0,0,0,.22); overflow: hidden;
  backdrop-filter: blur(8px);
}
.hero-ecosystem::before {
  content: ""; position: absolute; width: 330px; height: 330px; right: -100px; bottom: -110px;
  border: 1px solid rgba(217,227,200,.18); border-radius: 46% 54% 61% 39% / 45% 41% 59% 55%;
  box-shadow: 0 0 0 32px rgba(217,227,200,.035), 0 0 0 70px rgba(217,227,200,.025);
  transform: rotate(-18deg); pointer-events: none;
}
.hero-ecosystem-top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.hero-ecosystem-label { color: rgba(244,247,238,.67); font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.hero-live-dot { display: inline-flex; align-items: center; gap: 7px; color: #e5ecd7; font-size: .75rem; }
.hero-live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #cadd9f; box-shadow: 0 0 0 5px rgba(202,221,159,.09); }
.hero-specimen {
  position: relative; z-index: 1; display: grid; place-items: center; height: 235px; margin: 22px 0 18px;
}
.hero-specimen svg { width: min(100%,420px); height: 230px; overflow: visible; }
.hero-specimen .contour { fill: none; stroke: rgba(237,242,224,.13); stroke-width: 1.4; }
.hero-specimen .stem { fill: none; stroke: rgba(218,228,193,.72); stroke-width: 3; stroke-linecap: round; }
.hero-specimen .leaf { fill: rgba(202,217,170,.18); stroke: rgba(222,231,203,.62); stroke-width: 1.4; }
.hero-specimen .marker-ring { fill: rgba(17,47,37,.65); stroke: #e8edd8; stroke-width: 2; }
.hero-specimen .marker-core { fill: #d8b96e; }
.hero-metrics { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; }
.hero-metric { min-width: 0; padding: 14px; border: 1px solid rgba(255,255,255,.11); border-radius: 17px; background: rgba(5,26,19,.28); }
.hero-metric strong { display: block; color: #fffdf5; font-size: 1.38rem; line-height: 1.15; letter-spacing: -.025em; }
.hero-metric:first-child strong { font-size: 2rem; }
.hero-metric span { display: block; margin-top: 5px; color: rgba(244,247,238,.60); font-size: .72rem; line-height: 1.35; }

.eyebrow { color: var(--accent-strong); letter-spacing: .16em; }
h1,h2,h3 { color: var(--forest); }
h2 { font-size: clamp(1.75rem,3.6vw,3.2rem); letter-spacing: -.038em; text-wrap: balance; }
h3 { letter-spacing: -.015em; }
.section { padding: 92px 0; }
.section-alt { border-block-color: rgba(23,58,47,.07); background: #ece9df; }
.section-heading, .page-heading { margin-bottom: 34px; align-items: flex-end; }
.section-heading p, .page-heading p { color: var(--muted); max-width: 720px; }
.page-heading h1 { color: var(--forest); font-size: clamp(2.4rem,5vw,4.4rem); letter-spacing: -.048em; }

.button {
  min-height: 46px; padding: 10px 17px; border-color: var(--line-strong); border-radius: 999px;
  background: rgba(255,253,247,.65); color: var(--forest); font-weight: 780;
  box-shadow: none; transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button:hover { border-color: rgba(23,58,47,.27); background: #fff; transform: translateY(-1px); box-shadow: 0 7px 18px rgba(23,58,47,.07); }
.button-primary { border-color: var(--forest); background: var(--forest); color: #fff; }
.button-primary:hover { border-color: var(--forest-2); background: var(--forest-2); color: #fff; }
.button-ghost { background: transparent; }
.button-danger { border-color: rgba(167,79,75,.2); color: var(--danger); background: rgba(167,79,75,.045); }
.button-danger:hover { background: rgba(167,79,75,.09); }

.hero-panel, .feature-card, .form-card, .auth-card, .table-card, .note-card, .review-panel, .side-note, .empty-card, .photo-card,
.ai-context-card, .ai-panel, .map-side-panel, .feed-card, .community-guide, .announcement-admin-card {
  border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-soft);
}

/* Map workspace */
.map-section-v2 { padding-top: 82px; background: var(--bg); }
.map-filter-bar { padding: 7px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,247,.78); box-shadow: var(--shadow-soft); }
.segmented { border-color: transparent; background: #ebece3; }
.segmented-button { color: var(--muted-strong); }
.segmented-button.active { background: var(--forest); color: #fff; box-shadow: 0 5px 14px rgba(23,58,47,.15); }
.compact-select { color: var(--muted); }
.compact-select select { background: #fffdf7; }
.map-workspace { gap: 18px; }
.map-shell {
  border-color: rgba(23,58,47,.12); border-radius: 30px; background: #dde5d9;
  box-shadow: 0 30px 80px rgba(23,58,47,.12); outline: 7px solid rgba(255,255,255,.35);
}
.map-badge { border-color: rgba(23,58,47,.11); background: rgba(255,253,247,.88); color: var(--muted-strong); box-shadow: 0 5px 18px rgba(23,58,47,.08); }
.map-empty { border-color: var(--line); background: rgba(255,253,247,.96); color: var(--muted); box-shadow: var(--shadow-soft); }
.map-side-panel { border-radius: 30px; padding: 24px; background: linear-gradient(180deg,#fffdf7,#f8f5eb); }
.map-selection-empty { border-color: rgba(23,58,47,.17); background: rgba(237,242,233,.65); color: var(--muted); }
.map-selection-image { border-radius: 19px; background: #e7e7dd; box-shadow: inset 0 0 0 1px rgba(23,58,47,.07); }
.record-group { border-color: var(--line); background: #f4f4e9; }
.group-plant { color: #3c684f; }
.group-animal { color: var(--animal); }
.region-item { border-color: transparent; border-bottom: 1px solid var(--line); border-radius: 12px; background: transparent; }
.region-item:hover { background: rgba(111,141,99,.08); }
.region-item.active { border-color: rgba(100,135,92,.18); background: rgba(100,135,92,.11); }
.region-tooltip { border-color: var(--line)!important; background: rgba(255,253,247,.96)!important; color: var(--forest)!important; box-shadow: var(--shadow-soft)!important; }
.map-marker { border-color: #fffdf7; box-shadow: 0 5px 14px rgba(23,58,47,.25); }
.map-marker-plant { background: #477a58; }
.map-marker-animal { background: #716c9d; }
.leaflet-control-zoom a { color: var(--forest)!important; background: #fffdf7!important; border-bottom-color: var(--line)!important; }
.leaflet-control-attribution { color: #64746a!important; background: rgba(255,253,247,.84)!important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #fffdf7; color: var(--forest); box-shadow: 0 14px 38px rgba(23,58,47,.17); }

/* Community */
.community-preview-section { background: linear-gradient(180deg,#ebe8dd,#e8e5da); }
.feed-preview-grid { gap: 18px; }
.feed-card { border-radius: 24px; background: #fffdf7; transition: transform .2s ease, box-shadow .2s ease; }
.feed-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feed-media { background: #e7e5dc; }
.feed-preview-grid .feed-media { aspect-ratio: 4/3; }
.feed-content, .announcement-card { padding: 20px; }
.feed-card-meta { color: var(--muted); }
.feed-kind { border-color: var(--line); background: #f3f0e7; color: var(--muted-strong); }
.feed-body { color: #52655b; }
.feed-trust.verified { border-color: rgba(49,95,72,.16); background: #ebf2e8; color: #315f48; }
.feed-trust.unverified { border-color: rgba(195,146,71,.16); background: #faf1df; color: #8a632c; }
.announcement-alert { border-color: rgba(167,79,75,.17); }
.announcement-event { border-color: rgba(49,95,72,.17); }
.community-page { background: linear-gradient(180deg,#f5f2e9 0,#f1eee5 26rem,var(--bg) 26rem); }
.community-toolbar { border-color: var(--line); border-radius: 22px; background: rgba(255,253,247,.82); box-shadow: var(--shadow-soft); }
.live-indicator i { background: #5f8a61; box-shadow: 0 0 0 5px rgba(95,138,97,.1); }
.community-guide { border-radius: 26px; background: linear-gradient(180deg,#173f32,#123329); color: #f5f5e9; }
.community-guide h2, .community-guide .eyebrow { color: #f4f4e8; }
.community-guide .eyebrow { opacity: .68; }
.community-guide .trust-item { border-top-color: rgba(255,255,255,.13); }
.community-guide .trust-item p, .community-guide .fine-print { color: rgba(245,245,233,.66); }
.community-guide .trust-item.verified strong { color: #d6e4be; }
.community-guide .trust-item.community strong { color: #ebcf96; }

/* Feature / editorial cards */
.experience-grid { gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.experience-card { position: relative; padding: 30px 26px 34px; border-top: 0; border-right: 1px solid var(--line); background: transparent; }
.experience-card:last-child { border-right: 0; }
.experience-card > span { color: var(--amber); }
.experience-card p { color: var(--muted); }
.feature-card { border-radius: 26px; }

/* Forms and auth */
.auth-page {
  min-height: calc(100vh - 160px); padding: 80px 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(111,141,99,.13), transparent 24rem),
    radial-gradient(circle at 86% 76%, rgba(195,146,71,.10), transparent 23rem),
    linear-gradient(180deg,#f3f0e6,#ebe8dc);
}
.auth-card { width: min(100%, 520px); padding: 38px; border-radius: 30px; background: rgba(255,253,247,.93); box-shadow: 0 30px 80px rgba(23,58,47,.12); }
.auth-card::before { content: ""; display: block; width: 54px; height: 5px; margin-bottom: 24px; border-radius: 999px; background: linear-gradient(90deg,var(--forest),var(--moss)); }
.auth-card h1 { color: var(--forest); font-size: clamp(2rem,4vw,2.75rem); letter-spacing: -.04em; }
.auth-foot { color: var(--muted); }
.auth-foot a, .text-link { color: var(--accent-strong); font-weight: 750; }
.alert-error { border-color: rgba(167,79,75,.18); color: #8b403d; background: #f9e9e7; }
.form-card { padding: 30px; border-radius: 28px; }
.form-stack label { color: var(--forest); }
input, textarea, select {
  border-color: rgba(23,58,47,.16); border-radius: 14px; padding: 12px 13px;
  background: #fbfaf4; color: var(--forest); box-shadow: inset 0 1px 0 rgba(23,58,47,.025);
}
input::placeholder, textarea::placeholder { color: #929d95; }
input:focus, textarea:focus, select:focus { border-color: rgba(49,95,72,.52); box-shadow: 0 0 0 4px rgba(100,135,92,.09); background: #fffdf8; }
.coordinate-panel { border-color: var(--line); border-radius: 20px; background: #f4f3e9; }
.preview-wrap { border-color: var(--line); border-radius: 20px; background: #e9e7de; }
.side-note { border-radius: 25px; background: #173f32; color: rgba(246,247,238,.72); box-shadow: var(--shadow); }
.side-note h3 { color: #f6f7ee; }
.side-note .fine-print, .side-note small { color: rgba(246,247,238,.62); }
.choice-cards label > span { border-color: var(--line-strong); border-radius: 18px; background: #faf9f3; }
.choice-cards input:checked + span { border-color: rgba(49,95,72,.38); background: #edf3e9; box-shadow: 0 0 0 3px rgba(100,135,92,.08); }
.share-panel { border-color: rgba(49,95,72,.15); border-radius: 20px; background: #edf3e9; }

/* AI workflow */
.ai-steps { gap: 7px; }
.ai-steps li { border-color: var(--line); background: rgba(255,253,247,.5); color: var(--muted); }
.ai-steps .done, .ai-steps .active { color: var(--forest); border-color: rgba(49,95,72,.2); background: #eaf1e7; }
.ai-context-card, .ai-panel { border-radius: 28px; }
.ai-disclaimer { border-color: rgba(195,146,71,.20); color: #86612a; background: #faf1df; }
.ai-alert { border-color: rgba(195,146,71,.18); background: #faf1df; }
.candidate-card { border-color: var(--line); border-radius: 22px; background: #faf9f3; }
.candidate-rank { color: var(--accent-strong); }
.question-card, .evidence-row, .compact-candidate { border-color: var(--line); background: #faf9f3; }
.answer-options label, .decision-option { border-color: var(--line); background: #faf9f3; }
.ai-final-callout { border-left-color: var(--accent-strong); background: #edf3e9; }
.status-draft { background: #f0efe7; }
.status-needs_info { color: #655d92; border-color: rgba(101,93,146,.18); background: #efedf7; }

/* Dashboard, detail, admin */
.table-card { border-radius: 24px; background: #fffdf7; box-shadow: var(--shadow-soft); }
table { background: transparent; }
th,td { border-bottom-color: var(--line); }
th { color: #78877e; }
td { color: #334f43; }
tbody tr:hover { background: rgba(111,141,99,.055); }
.status { border-color: var(--line); background: #f2f0e8; }
.status-pending { color: #8e682d; border-color: rgba(195,146,71,.17); background: #faf1df; }
.status-approved { color: #315f48; border-color: rgba(49,95,72,.17); background: #ebf2e8; }
.status-rejected { color: #924542; border-color: rgba(167,79,75,.17); background: #f8e9e7; }
.filter-tabs a { border-color: var(--line); background: rgba(255,253,247,.5); color: var(--muted); }
.filter-tabs a.active { color: var(--forest); border-color: rgba(49,95,72,.19); background: #eaf1e7; }
.review-panel { border-radius: 28px; background: linear-gradient(180deg,#fffdf7,#f6f4eb); }
.photo-card { border-radius: 28px; background: #e9e7de; }
.note-card { border-radius: 24px; }
.empty-card { padding: 40px; border-radius: 28px; }
.announcement-admin-card { border-radius: 22px; }
.verification-card { border-color: rgba(49,95,72,.18); background: #f6f9f3; }

/* Footer */
.site-footer { border-top: 1px solid rgba(255,255,255,.08); background: #102f25; color: rgba(242,245,235,.62); }
.footer-inner { min-height: 118px; gap: 20px; }
.footer-inner strong { color: #f4f5ec; }

@media (hover:hover) and (pointer:fine) {
  .region-item, .feed-card, .experience-card, .button { transition-duration: .2s; }
}

@media (max-width: 1060px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr 390px; gap: 38px; }
  .hero h1 { font-size: clamp(3rem,7vw,4.8rem); }
  .experience-card { border-bottom: 1px solid var(--line); }
  .experience-card:nth-child(2) { border-right: 0; }
  .experience-card:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 900px) {
  .shell { width: min(100% - 34px,1240px); }
  .hero { padding: 72px 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy-block { max-width: 760px; }
  .hero-ecosystem { min-height: 390px; }
  .hero-specimen { height: 190px; }
  .hero-specimen svg { height: 190px; }
  .map-side-panel { grid-template-columns: 1fr 1fr; }
  .review-panel, .side-note, .community-guide { position: static; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px,1240px); }
  .header-inner { min-height: 70px; }
  .brand small { display: none; }
  .section { padding: 68px 0; }
  .hero { padding: 62px 0 54px; }
  .hero h1 { font-size: clamp(2.65rem,12.7vw,4rem); }
  .hero-copy { font-size: 1rem; }
  .hero-proof { gap: 12px; margin-top: 24px; }
  .hero-ecosystem { min-height: 0; padding: 20px; border-radius: 26px; }
  .hero-specimen { height: 170px; margin-block: 16px; }
  .hero-specimen svg { height: 165px; }
  .hero-metrics { grid-template-columns: 1fr 1fr; }
  .hero-metric:first-child { grid-column: 1/-1; }
  .section-heading, .page-heading { align-items: flex-start; flex-direction: column; }
  .map-filter-bar { padding: 8px; border-radius: 18px; }
  .map-shell { border-radius: 23px; outline-width: 4px; }
  .map-side-panel { grid-template-columns: 1fr; border-radius: 24px; }
  .experience-grid { border-bottom: 0; }
  .experience-card { border-right: 0; border-bottom: 1px solid var(--line)!important; }
  .experience-card:last-child { border-bottom: 0!important; }
  .auth-card { padding: 28px 22px; border-radius: 25px; }
  .form-card { padding: 22px; border-radius: 23px; }
  .community-guide { border-radius: 24px; }
  .review-panel, .photo-card, .ai-context-card, .ai-panel { border-radius: 23px; }
}

@media (max-width: 420px) {
  .shell { width: min(100% - 22px,1240px); }
  .brand-mark { width: 40px; height: 40px; border-radius: 13px; }
  .hero { padding-top: 50px; }
  .hero h1 { font-size: 2.75rem; }
  .hero-actions .button { width: 100%; }
  .hero-proof { display: grid; }
  .hero-ecosystem { padding: 16px; }
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-metric:first-child { grid-column: auto; }
  .section { padding: 56px 0; }
  .page-heading h1 { font-size: 2.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto!important; transition-duration: .01ms!important; animation-duration: .01ms!important; animation-iteration-count: 1!important; }
}
