/* ── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Light Theme (default) ──────────────────────── */
:root {
  --bg: #f8faf8;
  --surface: #ffffff;
  --surface2: #f3f5f3;
  --border: #e2e5e2;
  --text: #1a1a1a;
  --muted: #6b7280;
  --header-bg: rgba(255,255,255,0.95);
  --header-border: #e2e5e2;
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-500: #16a34a;
  --green-600: #15803d;
  --green-700: #166534;
  --green-800: #14532d;
  --green-900: #0f3d1c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --panel-width: 520px;
  --badge-bg: rgba(34,197,94,0.1);
  --badge-text: #15803d;
  --warning-bg: #fffbeb;
  --warning-border: #f59e0b;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
}

/* ── Dark Theme ────────────────────────────────── */
[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface2: #1a1a1a;
  --border: #262626;
  --text: #fafafa;
  --muted: #a1a1aa;
  --header-bg: rgba(20,20,20,0.95);
  --header-border: #262626;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.2);
  --badge-bg: rgba(34,197,94,0.15);
  --badge-text: #22c55e;
  --warning-bg: rgba(245,158,11,0.1);
  --warning-border: #f59e0b;
  --error-bg: rgba(239,68,68,0.1);
  --error-text: #ef4444;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  /* Safe area insets for notched phones */
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
  padding-top: max(0px, env(safe-area-inset-top));
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}

/* ── Header ──────────────────────────────────── */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.logo { color: var(--text); }
.logo span { color: var(--green-500); }

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Buttons ─────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--green-600);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 44px;
  min-width: 44px;
}
.btn-primary:hover { background: var(--green-700); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
}
.btn-secondary:hover { background: var(--surface); border-color: var(--green-500); }

.btn-text {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
  box-sizing: border-box;
  margin: 0;
  vertical-align: middle;
}

.btn-text:hover { color: var(--text); }

.btn-icon {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  min-height: 44px;
  min-width: 44px;
}
.btn-icon:hover { color: var(--gray-700); }

.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 44px; }
.btn-full { width: 100%; justify-content: center; padding: 14px 20px; font-size: 15px; min-height: 44px; }

/* ── Map ─────────────────────────────────────── */
#map {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
}

.mapboxgl-ctrl-top-right { top: 8px; }

/* ── Hero Overlay ────────────────────────────── */
/* ── Landing Page ─────────────────────────────── */
#hero-overlay {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 50;
  overflow-y: auto;
  transition: opacity 0.4s;
}
#hero-overlay.hidden { opacity: 0; pointer-events: none; }

.landing-page { min-height: 100%; }
.landing-container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.landing-section { padding: 64px 0; }

/* Hero */
.landing-hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--badge-bg) 0%, var(--bg) 100%);
}
.landing-badge {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 20px;
  background: var(--badge-bg); color: var(--green-500);
  margin-bottom: 20px;
}
.landing-hero h1 {
  font-size: 44px; font-weight: 800; line-height: 1.12;
  letter-spacing: -0.03em; margin-bottom: 16px; color: var(--text);
}
.landing-sub {
  font-size: 17px; color: var(--muted); line-height: 1.6;
  max-width: 580px; margin: 0 auto 32px;
}
.hero-stats {
  display: flex; justify-content: center; gap: 48px; margin-bottom: 32px;
}
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; align-items: center; }
.btn-lg { font-size: 15px !important; padding: 12px 28px !important; }
.btn-ghost {
  color: var(--muted); font-size: 14px; font-weight: 500;
  text-decoration: none; padding: 12px 16px;
}
.btn-ghost:hover { color: var(--text); }
.hero-note { font-size: 13px; color: var(--muted); margin-top: 16px; }

/* Trust bar */
.landing-trust {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.trust-items {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
}
.trust-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.trust-item strong { font-size: 13px; font-weight: 700; color: var(--text); }
.trust-item span { font-size: 11px; color: var(--muted); }

/* Section titles */
.section-title {
  font-size: 28px; font-weight: 800; text-align: center;
  margin-bottom: 8px; letter-spacing: -0.02em;
}
.section-sub {
  font-size: 15px; color: var(--muted); text-align: center;
  max-width: 540px; margin: 0 auto 40px;
}

/* Two column */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

/* Check lists */
.check-list { list-style: none; padding: 0; }
.check-list li {
  padding: 8px 0 8px 28px; position: relative; font-size: 14px; color: var(--text);
}
.check-list.negative li::before { content: '✗'; position: absolute; left: 0; color: #dc2626; font-weight: 700; }
.check-list.positive li::before { content: '✓'; position: absolute; left: 0; color: #16a34a; font-weight: 700; }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 24px;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--badge-bg); color: var(--green-500);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 12px;
}
.step-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.step-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Data layers grid */
.layers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.layer-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 18px;
}
.layer-dot {
  width: 10px; height: 10px; border-radius: 50%; margin-bottom: 10px;
}
.layer-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.layer-card p { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Track cards */
.track-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px;
}
.track-card.eco { border-color: var(--green-500); }
.track-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.track-hook { font-size: 14px; color: var(--green-500); font-style: italic; margin-bottom: 14px; }
.track-card ul { padding-left: 18px; margin-bottom: 16px; }
.track-card li { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.btn-track {
  display: inline-block; padding: 10px 20px; border-radius: 6px;
  background: var(--green-500); color: white; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}

/* Pricing grid */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.price-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 22px; position: relative;
}
.price-card.featured { border: 2px solid var(--green-500); background: var(--badge-bg); }
.price-badge {
  position: absolute; top: -10px; right: 12px;
  background: var(--green-500); color: white;
  font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 10px;
}
.price-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.price-card.featured .price-name { color: var(--green-500); }
.price-amount { font-size: 28px; font-weight: 800; margin-bottom: 2px; }
.price-amount span { font-size: 14px; font-weight: 400; color: var(--muted); }
.price-note { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.price-card.featured .price-note { color: var(--green-500); }
.price-card ul { padding-left: 16px; margin-bottom: 16px; }
.price-card li { font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.btn-price {
  width: 100%; padding: 8px; border-radius: 6px;
  background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn-price.featured { background: var(--green-500); color: white; border: none; }

/* SSM Banner */
.ssm-banner {
  display: flex; align-items: center; gap: 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 32px;
}
.ssm-banner-text { flex: 1; }
.ssm-banner h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.ssm-banner p { font-size: 15px; color: var(--text); line-height: 1.6; margin-bottom: 8px; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.faq-item summary {
  padding: 14px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 18px; color: var(--muted); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 18px 14px; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* Final CTA */
.landing-final-cta {
  background: var(--green-500) !important; padding: 60px 0;
}
.landing-final-cta h2 { color: white; font-size: 28px; font-weight: 800; margin-bottom: 8px; }

/* Footer */
.landing-footer {
  background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 24px;
}
.footer-logo { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.footer-grid h4 { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.footer-grid a {
  display: block; font-size: 13px; color: var(--muted); text-decoration: none;
  margin-bottom: 6px;
}
.footer-grid a:hover { color: var(--green-500); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 16px;
  text-align: center; font-size: 12px; color: var(--muted);
}

/* ── Landing Mobile ──────────────────────────── */
@media (max-width: 768px) {
  .landing-hero { padding: 48px 0 40px; }
  .landing-hero h1 { font-size: 28px; }
  .landing-sub { font-size: 15px; }
  .hero-stats { gap: 24px; }
  .stat-value { font-size: 24px; }
  .hero-ctas { flex-direction: column; }
  .trust-items { gap: 20px; }
  .two-col { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .layers-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .ssm-banner { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 22px; }
  .landing-section { padding: 40px 0; }
}
@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
  .layers-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .landing-hero h1 { font-size: 24px; }
}

/* ── Map Controls ────────────────────────────── */
#map-controls {
  position: fixed;
  top: 72px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
}

.control-group {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.map-btn:hover { background: var(--surface2); color: var(--text); }
.map-btn.active { background: rgba(34,197,94,0.15); color: var(--green-500); }
.map-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.map-btn + .map-btn { border-top: 1px solid var(--border); }

/* ── Area Indicator ──────────────────────────── */
#area-indicator {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 40;
  transition: all 0.3s;
}
#area-indicator.hidden { opacity: 0; transform: translateX(-50%) translateY(20px); pointer-events: none; }

#area-value { font-size: 20px; font-weight: 700; color: var(--green-500); }
#area-unit { font-size: 13px; color: var(--muted); margin-right: 8px; }

/* ── Results Panel ───────────────────────────── */
.panel {
  position: fixed;
  top: 56px;
  right: 0;
  bottom: 0;
  width: var(--panel-width);
  min-width: 360px;
  max-width: 80vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 60;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.panel.hidden { transform: translateX(100%); }
.panel.resizing { transition: none; user-select: none; }

/* Drag handle for resizing */
.panel-resize-handle {
  position: absolute;
  top: 0;
  left: -4px;
  bottom: 0;
  width: 8px;
  cursor: col-resize;
  z-index: 61;
}
.panel-resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  width: 4px;
  height: 40px;
  border-radius: 2px;
  background: var(--border);
  opacity: 0;
  transition: opacity 0.2s;
}
.panel-resize-handle:hover::after,
.panel-resize-handle:active::after {
  opacity: 1;
  background: var(--green-500);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-header h2 { font-size: 16px; font-weight: 600; color: var(--text); }

.panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  word-wrap: break-word;
}
.panel-body * { max-width: 100%; box-sizing: border-box; }

/* ── Editable Baseline ───────────────────────── */
.eb-toggle-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.eb-toggle-btn:hover { background: var(--green-500); color: white; border-color: var(--green-500); }
.eb-toggle-btn.active { background: var(--green-500); color: white; border-color: var(--green-500); }

.eb-header { margin-bottom: 16px; }
.eb-header h3 { font-size: 16px; margin-bottom: 4px; }
.eb-subtitle { font-size: 13px; color: var(--muted); }

.eb-table-wrap { overflow-x: auto; margin: 0 -4px; }
.eb-table { table-layout: auto !important; }
.eb-table th { font-size: 12px; white-space: nowrap; }

.eb-select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.eb-select:focus { outline: 2px solid var(--green-500); outline-offset: -1px; }

.eb-input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.eb-input:focus { outline: 2px solid var(--green-500); outline-offset: -1px; }

.eb-remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}
.eb-remove-btn:hover { background: rgba(239,68,68,0.15); color: #ef4444; }

.eb-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.eb-add-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px dashed var(--border);
  background: none;
  color: var(--green-500);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.eb-add-btn:hover { border-color: var(--green-500); background: rgba(34,197,94,0.08); }

.eb-edited-badge {
  font-size: 12px;
  color: var(--green-500);
  font-weight: 500;
}

.eb-edited { background: rgba(34,197,94,0.04); }

/* ── CTA Button Rows ─────────────────────────── */
.cta-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-top: 8px;
}
.cta-row:first-child { margin-top: 0; }
.cta-row .fi-btn {
  width: 36px;
  height: auto;
  min-height: 36px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* ── Feature Info Modals ──────────────────────── */
.fi-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55); z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  animation: fi-fade 0.2s ease;
}
@keyframes fi-fade { from { opacity: 0; } to { opacity: 1; } }
.fi-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; max-width: 480px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden;
  animation: fi-slide 0.25s ease;
}
@keyframes fi-slide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.fi-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
}
.fi-icon { font-size: 24px; }
.fi-title { font-size: 18px; font-weight: 700; flex: 1; color: var(--text); }
.fi-header-actions { display: flex; gap: 6px; }
.fi-mute, .fi-close {
  background: none; border: none; font-size: 16px;
  cursor: pointer; color: var(--muted); padding: 4px 6px;
  border-radius: 4px; transition: background 0.15s;
}
.fi-mute:hover, .fi-close:hover { background: var(--surface2); }
.fi-body {
  padding: 20px 24px; font-size: 14px; color: var(--text);
  line-height: 1.7;
}
.fi-body strong { color: var(--text); }
.fi-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
}
.fi-got-it {
  padding: 8px 20px; border-radius: 6px; border: none;
  background: var(--green-500); color: white;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: opacity 0.15s;
}
.fi-got-it:hover { opacity: 0.9; }
.fi-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface2);
  cursor: pointer; font-size: 11px; padding: 0;
  transition: all 0.15s; flex-shrink: 0;
}
.fi-btn:hover { border-color: var(--green-500); background: rgba(34,197,94,0.1); }

/* ── Sections ────────────────────────────────── */
.section { margin-bottom: 24px; }
.section h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ── Layer List ──────────────────────────────── */
.layer-list { display: flex; flex-direction: column; gap: 2px; }

.layer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.layer-item:hover { background: var(--surface2); }

.layer-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.layer-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.1);
}
.layer-status.loading {
  background: var(--gray-300);
  animation: pulse 1.5s ease-in-out infinite;
}
.layer-status.loaded { background: var(--green-500); }
.layer-status.error { background: #ef4444; }
.layer-status.empty { background: var(--gray-300); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.layer-info { flex: 1; display: flex; flex-direction: column; }
.layer-name { font-size: 13px; font-weight: 500; }
.layer-source { font-size: 11px; color: var(--gray-400); }

/* Toggle switch */
.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background: var(--green-500); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); }
.toggle input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

/* ── Habitat Table ───────────────────────────── */
#habitat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
#habitat-table th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#habitat-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.total-row td {
  font-weight: 600;
  border-top: 2px solid var(--gray-200);
  border-bottom: none !important;
}

/* ── BNG Cards ───────────────────────────────── */
.bng-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.bng-card {
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.bng-card.accent {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.3);
}
.bng-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.bng-value { font-size: 20px; font-weight: 700; color: var(--text); }
.bng-card.accent .bng-value { color: var(--green-500); }

/* ── Recommendations ─────────────────────────── */
#recommendations-list { display: flex; flex-direction: column; gap: 8px; }

.recommendation {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
}
.recommendation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.recommendation-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(34,197,94,0.15);
  color: var(--green-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.recommendation-title { font-size: 13px; font-weight: 600; }
.recommendation-body { font-size: 12px; color: var(--muted); line-height: 1.5; margin-left: 36px; }
.recommendation-units {
  display: inline-block;
  margin-left: 36px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green-500);
  background: rgba(34,197,94,0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ── Site Summary Grid ────────────────────────── */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.summary-stat {
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.summary-stat-label { font-size: 11px; color: var(--muted); }
.summary-stat-value { font-size: 15px; font-weight: 600; margin-top: 2px; }
.summary-stat-detail { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ── Designations & Species ──────────────────── */
.designation-item, .species-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.designation-item:last-child, .species-item:last-child { border-bottom: none; }
.designation-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.designation-name { font-weight: 500; }
.designation-detail { font-size: 11px; color: var(--gray-400); }
.species-count { 
  font-size: 11px; 
  background: var(--surface2); 
  border: 1px solid var(--border);
  padding: 2px 8px; 
  border-radius: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Gated content (blurred) ─────────────────── */
.gated {
  position: relative;
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

/* ── Paywall Box ─────────────────────────────── */
.paywall-box {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, rgba(34,197,94,0.1) 0%, var(--surface) 100%);
  border: 2px solid rgba(34,197,94,0.3);
  border-radius: var(--radius);
}
.paywall-lock { font-size: 32px; margin-bottom: 8px; }
.paywall-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); text-transform: none; letter-spacing: 0; }
.paywall-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 16px; }
.paywall-note { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* ── CTA ─────────────────────────────────────── */
.cta-note {
  font-size: 12px;
  color: var(--gray-400);
  text-align: center;
  margin-top: 8px;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  /* Prevent horizontal scroll on mobile */
  body, html { overflow-x: hidden; width: 100%; }

  /* Header adjustments */
  #header {
    padding: 0 12px;
    height: 48px;
    gap: 8px;
  }

  .logo {
    font-size: 16px;
  }

  .header-right {
    gap: 4px;
  }

  .header-right .btn-text {
    display: none;
    padding: 6px 8px;
    font-size: 12px;
  }

  #btn-login,
  #btn-dashboard {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 44px;
  }

  /* Map positioning */
  #map {
    top: 48px;
  }

  /* Hero overlay scrollable on mobile */
  #hero-overlay {
    top: 48px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .hero-content {
    max-width: 100%;
    padding: 20px 16px;
    margin-top: 20px;
  }

  .hero-content h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .hero-sub {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .stat-value {
    font-size: 20px;
  }

  #btn-start {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 44px;
  }

  /* Map controls repositioned for thumb reach */
  #map-controls {
    top: 58px;
    right: 12px;
    left: auto;
    flex-direction: row;
    gap: 4px;
  }

  .control-group {
    flex-direction: row;
  }

  .map-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .map-btn + .map-btn {
    border-top: none;
    border-left: 1px solid var(--gray-200);
  }

  /* Area indicator repositioned */
  #area-indicator {
    bottom: 12px;
    padding: 10px 16px;
    font-size: 14px;
    gap: 8px;
  }

  #area-value {
    font-size: 18px;
  }

  #btn-analyse,
  #btn-share {
    padding: 8px 12px;
    font-size: 11px;
    min-height: 44px;
  }

  /* Legend above area indicator on mobile */
  #map-legend {
    bottom: 80px;
    left: 8px;
    max-width: 220px;
    min-width: 160px;
    font-size: 11px;
    z-index: 45;
  }
  #map-legend.collapsed {
    bottom: 80px;
  }

  /* Results panel full-width */
  .panel {
    width: 100%;
    right: 0;
  }

  .panel-header h2 {
    font-size: 14px;
  }

  .panel-body {
    padding: 16px;
  }

  /* Section adjustments */
  .section {
    margin-bottom: 16px;
  }

  .section h3 {
    font-size: 12px;
  }

  /* Tables horizontal scroll */
  #habitat-table,
  .results-table {
    font-size: 12px;
  }

  #habitat-table th,
  #habitat-table td,
  .results-table th,
  .results-table td {
    padding: 6px 8px;
  }

  /* BNG cards stack */
  .bng-cards {
    grid-template-columns: 1fr;
  }

  /* Layer items touch-friendly */
  .layer-item {
    padding: 12px 10px;
    min-height: 44px;
  }

  /* Toggle switches larger */
  .toggle {
    width: 40px;
    height: 24px;
  }

  .toggle-slider::before {
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
  }

  .toggle input:checked + .toggle-slider::before {
    transform: translateX(16px);
  }

  /* Recommendation items */
  .recommendation {
    min-height: 44px;
  }

  /* Button full width */
  .btn-full {
    padding: 12px 16px;
    font-size: 14px;
    min-height: 44px;
  }

  /* Summary grid */
  .summary-grid {
    grid-template-columns: 1fr;
  }

  /* Designations and species */
  .designation-item,
  .species-item {
    padding: 10px 0;
  }
}

/* ── Mobile ultra-small screens (< 480px) ─── */
@media (max-width: 480px) {
  #header {
    height: 48px;
    padding: 0 10px;
  }

  .logo {
    font-size: 14px;
  }

  .header-right {
    gap: 2px;
  }

  #btn-login {
    padding: 8px 10px;
    font-size: 11px;
  }

  .hero-content {
    padding: 16px 12px;
  }

  .hero-content h1 {
    font-size: 20px;
  }

  .hero-sub {
    font-size: 13px;
  }

  /* Stat value smaller on very small screens */
  .stat-value {
    font-size: 18px;
  }

  /* Map controls single column */
  #map-controls {
    flex-direction: column;
  }

  .control-group {
    flex-direction: column;
  }

  .map-btn + .map-btn {
    border-left: none;
    border-top: 1px solid var(--gray-200);
  }

  /* Legend tighter on small phones */
  #map-legend {
    bottom: 72px;
    max-width: 180px;
    min-width: 140px;
  }
}

/* ── Map Legend ───────────────────────────────── */
#map-legend {
  position: fixed;
  bottom: 24px;
  left: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 40;
  font-size: 12px;
  min-width: 200px;
  max-width: 280px;
  transition: all 0.2s;
}
#map-legend.collapsed {
  min-width: auto;
  max-width: none;
}
.legend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
#map-legend.collapsed .legend-header { border-bottom: none; }
.legend-toggle { font-size: 14px; opacity: 0.5; transition: transform 0.2s; }
#map-legend.collapsed .legend-toggle { transform: rotate(180deg); }
.legend-body {
  padding: 8px 0;
  max-height: 300px;
  overflow-y: auto;
}
#map-legend.collapsed .legend-body { display: none; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  color: var(--text);
  font-size: 12px;
}
.legend-item:hover { background: var(--surface2); }
.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.1);
}
.legend-swatch.point {
  border-radius: 50%;
  width: 10px;
  height: 10px;
}
.legend-label { flex: 1; line-height: 1.3; }
.legend-info {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  transition: all 0.15s;
}
.legend-info:hover {
  background: var(--green-500);
  color: white;
  border-color: var(--green-500);
}
.legend-tooltip {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 280px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  z-index: 9999;
  pointer-events: none;
}
.legend-tooltip strong { color: var(--text); display: block; margin-bottom: 4px; font-size: 13px; }

/* ── Utility ─────────────────────────────────── */
.hidden { display: none !important; }
.panel.hidden { display: flex !important; transform: translateX(100%); pointer-events: none; }

/* ── Draw mode indicator ─────────────────────── */
#draw-hint {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-600);
  color: white;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 40;
  box-shadow: 0 4px 20px rgba(34,197,94,0.4);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  animation: hint-pulse 2s ease-in-out infinite;
}
#draw-hint.hidden { opacity: 0; transform: translateX(-50%) translateY(-10px); animation: none; }

@media (max-width: 768px) {
  #draw-hint {
    top: 62px;
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 16px;
    max-width: calc(100% - 32px);
  }
}

@keyframes hint-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(34,197,94,0.4); }
  50% { box-shadow: 0 4px 30px rgba(34,197,94,0.7); }
}

/* Drawing mode — crosshair cursor on map */
.drawing-mode #map { cursor: crosshair !important; }
.drawing-mode .mapboxgl-canvas { cursor: crosshair !important; }

/* Pulsing border on map during draw mode */
.drawing-mode #map::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--green-500);
  pointer-events: none;
  z-index: 1;
  animation: border-pulse 2s ease-in-out infinite;
}

@keyframes border-pulse {
  0%, 100% { border-color: rgba(34,197,94,0.6); }
  50% { border-color: rgba(34,197,94,0.2); }
}

/* ── Geocoder override ───────────────────────── */
.mapboxgl-ctrl-geocoder {
  min-width: 280px !important;
  font-family: 'Inter', sans-serif !important;
  box-shadow: var(--shadow) !important;
  border-radius: var(--radius) !important;
}

@media (max-width: 768px) {
  .mapboxgl-ctrl-geocoder {
    min-width: 100px !important;
    max-width: 100% !important;
  }
}

/* ══ Shareable Results View ═══════════════════════ */
#share-results-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
  overflow-y: auto; padding: 20px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.share-container {
  max-width: 740px; margin: 0 auto;
  background: #fff; border-radius: 16px;
  overflow: hidden; position: relative;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.share-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: rgba(255,255,255,0.9); border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #6b7280; transition: all 0.2s;
}
.share-close:hover { background: #f3f4f6; color: #111 }

.share-header {
  background: linear-gradient(135deg, #14532d 0%, #15803d 50%, #22c55e 100%);
  padding: 36px 28px 28px; color: white; text-align: center;
}
.share-logo { font-size: 32px; font-weight: 800; letter-spacing: -1px }
.share-subtitle { font-size: 14px; opacity: 0.85; margin-top: 4px }
.share-date { font-size: 11px; opacity: 0.6; margin-top: 10px }

.share-map { border-bottom: 3px solid #22c55e }
.share-map img { display: block; width: 100%; max-height: 260px; object-fit: cover }

.share-hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: #e5e7eb;
}
.share-stat-card { background: #fff; padding: 22px 12px; text-align: center }
.share-stat-card.accent { background: #f0fdf4 }
.share-stat-card.highlight { background: #dcfce7 }
.share-stat-value {
  font-size: 28px; font-weight: 800; color: #111827;
  font-variant-numeric: tabular-nums;
}
.share-stat-card.highlight .share-stat-value { color: #16a34a }
.share-stat-label { font-size: 9px; color: #6b7280; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px }

.share-section { padding: 24px 28px }
.share-section h3 {
  font-size: 12px; font-weight: 700; color: #374151;
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid #f3f4f6;
}

/* Progress bar */
.share-progress-container { margin-top: 4px }
.share-progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: #6b7280; margin-bottom: 6px }
.share-progress-track { height: 14px; background: #f3f4f6; border-radius: 7px; overflow: hidden; position: relative }
.share-progress-fill { height: 100%; border-radius: 7px; background: linear-gradient(90deg, #22c55e, #16a34a); width: 0; animation: fillBar 1.5s ease forwards; animation-delay: var(--delay, 0s) }
.share-progress-marker { position: absolute; top: -4px; width: 3px; height: 22px; background: #111827; border-radius: 2px; transform: translateX(-50%) }
.share-progress-note { margin-top: 10px; font-size: 13px; color: #374151; line-height: 1.5; padding: 10px 14px; background: #fefce8; border-radius: 8px; border-left: 3px solid #eab308 }
@keyframes fillBar { to { width: var(--target-w, 0%) } }

/* BNG Chart */
.share-bng-chart { display: flex; flex-direction: column; gap: 8px }
.share-bng-row { display: flex; align-items: center; gap: 10px }
.share-bng-label { font-size: 11px; color: #374151; min-width: 130px; text-align: right }
.share-bng-bar-wrap { flex: 1; height: 14px; background: #f3f4f6; border-radius: 7px; overflow: hidden }
.share-bng-bar { height: 100%; border-radius: 7px; width: 0; animation: fillBar 1s ease forwards; animation-delay: var(--delay, 0s); --pct: var(--target-w, 0%) }
.share-bng-val { font-size: 12px; font-weight: 700; color: #111827; min-width: 40px; text-align: right }
.share-bng-total { display: flex; justify-content: space-between; padding: 10px 0 0; border-top: 2px solid #e5e7eb; margin-top: 4px; font-size: 13px; color: #374151 }

/* Data grid */
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px }
.share-data-card {
  background: #fafafa; border-radius: 12px; padding: 18px 14px; text-align: center;
  border: 1px solid #f3f4f6; transition: transform 0.2s, box-shadow 0.2s;
}
.share-data-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.06) }
.share-data-value { font-size: 26px; font-weight: 800; color: #111827 }
.share-data-label { font-size: 11px; font-weight: 600; color: #6b7280; margin-top: 4px }
.share-data-sub { font-size: 10px; color: #9ca3af; margin-top: 2px }
.share-data-bar { height: 4px; background: #f3f4f6; border-radius: 2px; margin-top: 12px; overflow: hidden }
.share-data-fill { height: 100%; background: var(--accent, #22c55e); border-radius: 2px; width: 0; animation: fillBar 1.2s ease forwards; animation-delay: 0.5s }

/* Habitat bars */
.share-habitat-bars { display: flex; flex-direction: column; gap: 8px }
.share-hbar { display: flex; align-items: center; gap: 10px }
.share-hbar-label { font-size: 11px; color: #374151; min-width: 130px; text-align: right }
.share-hbar-track { flex: 1; height: 12px; background: #f3f4f6; border-radius: 6px; overflow: hidden }
.share-hbar-fill { height: 100%; border-radius: 6px; width: 0; animation: fillBar 1s ease forwards; animation-delay: var(--delay, 0s); --pct: var(--target-w, 0%) }
.share-hbar-count { font-size: 12px; font-weight: 700; color: #111827; min-width: 24px; text-align: right }

/* Table */
.share-table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid #e5e7eb }
.share-table { width: 100%; border-collapse: collapse; font-size: 12px }
.share-table th { background: #f9fafb; padding: 10px 12px; text-align: left; font-weight: 600; color: #374151; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 2px solid #e5e7eb }
.share-table td { padding: 8px 12px; border-bottom: 1px solid #f3f4f6; color: #374151 }
.share-table .num { text-align: right; font-variant-numeric: tabular-nums }
.share-table tfoot td { background: #f9fafb; border-top: 2px solid #e5e7eb; font-weight: 600 }
.share-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600 }
.share-badge.good { background: #dcfce7; color: #15803d }
.share-badge.mod { background: #fef3c7; color: #92400e }
.share-badge.poor { background: #fee2e2; color: #dc2626 }

/* Species */
.share-species-groups { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px }
.share-chip { background: #fef3c7; color: #92400e; font-size: 12px; padding: 5px 14px; border-radius: 20px }
.share-chip strong { font-weight: 700; margin-left: 4px }
.share-species-list { display: flex; flex-direction: column; gap: 0 }
.share-species-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #f9fafb; font-size: 12px }
.share-species-name { color: #374151 }
.share-species-count { color: #9ca3af; font-size: 11px }

/* Soil */
.share-soil-card { background: #faf7f2; border: 1px solid #e7ddd0; border-radius: 10px; padding: 16px }
.share-soil-type { font-size: 14px; font-weight: 600; color: #78350f }
.share-soil-source { font-size: 11px; color: #a3a3a3; margin-top: 4px }

/* Terrain */
.share-terrain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px }
.share-terrain-card { text-align: center; padding: 14px; background: #faf5ff; border-radius: 10px; border: 1px solid #ede9fe }
.share-terrain-card.featured { background: #7c3aed; color: white; border-color: #7c3aed }
.share-terrain-big { font-size: 22px; font-weight: 800 }
.share-terrain-card.featured .share-terrain-big { color: white }
.share-terrain-lbl { font-size: 10px; color: #9ca3af; margin-top: 4px }
.share-terrain-card.featured .share-terrain-lbl { color: rgba(255,255,255,0.7) }
.share-terrain-visual-wrap { text-align: center }
.share-terrain-gradient { height: 8px; background: linear-gradient(90deg, #ddd6fe 0%, #7c3aed 50%, #4c1d95 100%); border-radius: 4px; margin-bottom: 8px }
.share-terrain-tag { font-size: 12px; color: #6b7280 }

/* Recommendations */
.share-recs { display: flex; flex-direction: column; gap: 12px }
.share-rec { background: #f9fafb; border-radius: 10px; padding: 16px; border-left: 3px solid #22c55e }
.share-rec-title { font-weight: 700; font-size: 13px; color: #111827; margin-bottom: 4px }
.share-rec-body { font-size: 12px; color: #6b7280; line-height: 1.5 }
.share-rec-units { font-size: 11px; font-weight: 700; color: #16a34a; margin-top: 6px }

/* Sources */
.share-sources { background: #f9fafb }
.share-source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px }
.share-source { font-size: 11px; color: #9ca3af; padding: 3px 0 }

/* Footer */
.share-footer {
  padding: 18px 28px; background: #111827; color: #9ca3af;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
}
.share-footer-brand { font-size: 13px }
.share-footer-brand strong { color: #22c55e }
.share-footer-method { font-size: 10px; color: #6b7280; margin-top: 2px }
.share-footer-right { text-align: right; max-width: 50% }
.share-footer-note { font-size: 9px; color: #6b7280; line-height: 1.4 }

@media (max-width: 640px) {
  .share-hero-stats { grid-template-columns: repeat(2, 1fr) }
  .share-grid { grid-template-columns: repeat(2, 1fr) }
  .share-terrain-grid { grid-template-columns: repeat(3, 1fr) }
  .share-stat-value { font-size: 22px }
  .share-bng-label { min-width: 90px; font-size: 10px }
  .share-hbar-label { min-width: 90px; font-size: 10px }
  .share-source-grid { grid-template-columns: 1fr }
  .share-footer { flex-direction: column }
  .share-footer-right { text-align: left; max-width: 100% }
}
