:root {
  --bg: #0f172a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22c55e;
  --border: #1f2937;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

#app { display: flex; flex-direction: column; min-height: 100vh; }

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #0f172a 0%, #0b1220 100%);
}
header h1 { margin: 0; font-size: 20px; }
header p { margin: 4px 0 0; color: var(--muted); }
.header-left { display: flex; flex-direction: row; align-items: center; gap: 12px; }
.digifarm-logo { display: flex; align-items: center; text-decoration: none; }
.digifarm-logo img { height: 26px; width: auto; display: block; opacity: 0.9; transition: opacity 0.15s; }
.digifarm-logo:hover img { opacity: 1; }
.site-title { color: inherit; text-decoration: none; }
.site-title:hover { color: var(--accent); }
.header-api-link { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 2px 7px; text-decoration: none; }
.header-api-link:hover { background: var(--accent); color: #fff; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--border); }
.nav-link.nav-active { color: var(--accent); }
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
}
.nav-icon.nav-active { color: var(--accent); }
.info-page-links {
  display: flex;
  gap: 8px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.year-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.year-control input[type="range"] { width: 200px; }
#year-value { min-width: 48px; text-align: center; font-weight: 600; }

main { display: flex; flex: 1; overflow: hidden; position: relative; }
.page { display: flex; flex: 1; min-width: 0; width: 100%; }
.page[hidden] { display: none; }
#page-map { position: relative; height: calc(100vh - 52px); }
#map { flex: 1; min-width: 0; width: 100%; height: 100%; }

/* Info pages (About / Terms / Privacy) */
.info-page {
  overflow-y: auto;
  background: var(--bg);
  justify-content: center;
}
.info-content {
  max-width: 720px;
  width: 100%;
  padding: 48px 24px 80px;
}
.info-content h2 { font-size: 28px; margin: 0 0 8px; }
.info-content h3 { font-size: 17px; margin: 32px 0 8px; color: var(--text); }
.info-content p, .info-content li { color: var(--muted); line-height: 1.7; font-size: 15px; }
.info-content ul { padding-left: 20px; margin: 8px 0; }
.info-content a { color: var(--accent); text-decoration: none; }
.info-content a:hover { text-decoration: underline; }
.info-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 12px 0;
  padding: 8px 16px;
  background: var(--panel);
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  font-style: italic;
  font-size: 14px;
}
.source-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0;
}
.source-title { font-weight: 600; color: var(--text); font-size: 15px; margin-bottom: 6px; }
.source-body { color: var(--muted); font-size: 14px; line-height: 1.6; }
.source-body a { color: var(--accent); }
.info-date { font-size: 13px; color: var(--muted); margin: 0 0 24px; }
.info-footer { margin-top: 48px; font-size: 13px; border-top: 1px solid var(--border); padding-top: 16px; }

#legend-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 320px;
  max-width: calc(100% - 32px);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  padding: 12px 14px;
  z-index: 2;
}
#legend { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; padding-right: 4px; }
#legend-title { cursor: pointer; margin: 0 0 8px; font-size: 16px; }
#legend-state-header { display: flex; align-items: center; justify-content: space-between; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); border-radius: 6px; padding: 6px 10px; margin-bottom: 4px; }
#legend-state-header[hidden] { display: none; }
#legend-state-name { font-size: 13px; font-weight: 600; color: var(--accent); }
#legend-state-close { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1; }
#legend-state-close:hover { color: var(--text); }
.legend-item { display: flex; flex-direction: column; gap: 4px; }
.legend-bar { flex: 1; height: 12px; background: #1f2937; border: 1px solid #0b0f19; border-radius: 6px; overflow: visible; min-width: 120px; position: relative; }
.legend-bar-fill { height: 100%; position: relative; display: flex; align-items: center; overflow: visible; }
.legend-bar-label { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #fff; white-space: nowrap; pointer-events: none; }
.legend-bar-label.tiny { left: auto; color: var(--text); }
.legend-row { display: flex; align-items: center; gap: 10px; }
.legend-area-text { color: var(--muted); font-size: 12px; white-space: nowrap; }
.legend-row.legend-selected .legend-bar { outline: 1px solid var(--accent); box-shadow: 0 0 0 2px rgba(34,197,94,0.15); }

#field-details p { margin: 0; color: var(--muted); }
#history-chart { display: flex; flex-direction: column; gap: 6px; }
.history-row { display: flex; align-items: center; gap: 8px; }
.history-year { width: 46px; color: var(--muted); font-size: 12px; }
.history-bar { flex: 1; display: flex; height: 14px; border-radius: 6px; overflow: hidden; background: #111827; border: 1px solid #0b0f19; }
.history-segment { height: 100%; }

.maplibregl-popup-content {
  background: #0f172a;
  color: var(--text);
  border: 1px solid var(--border);
  min-width: 384px;
  max-width: 432px;
}
.maplibregl-popup-close-button {
  font-size: 20px;
  color: var(--text);
}
.popup-header { display: flex; align-items: center; gap: 6px; }
.popup-dominant { font-size: 14px; color: var(--muted); margin-top: 4px; }
.popup-history { margin-top: 8px; }
.popup-history-title-row { display: flex; align-items: center; margin-bottom: 6px; }
.popup-history-title { font-size: 14px; color: var(--muted); flex: 1; }
.popup-conf-header { font-size: 10px; color: var(--muted); min-width: 22px; text-align: right; }
.popup-empty { font-size: 11px; color: var(--muted); }
.popup-history-row { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); line-height: 1.3; }
.popup-history-year { font-weight: 600; color: var(--text); font-size: 13px; }
.popup-history-bar { height: 12px; flex: 1; display: flex; }
.popup-confidence { font-size: 10px; min-width: 22px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.segment-label { font-size: 11px; color: #fff; margin-left: 4px; white-space: nowrap; display: flex; align-items: center; height: 100%; }
.loading-bar { width: 100%; height: 8px; background: #1f2937; border-radius: 6px; overflow: hidden; border: 1px solid #0b0f19; }
.loading-fill { width: 100%; height: 100%; background: linear-gradient(90deg, #22c55e 0%, #10b981 50%, #22c55e 100%); animation: loading 1s linear infinite; }

@keyframes loading {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* ── Progress bar ────────────────────────────────────── */
.map-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 200% 100%;
  animation: progress-slide 1.5s linear infinite;
  pointer-events: none;
}
.map-progress.loading {
  opacity: 1;
}
@keyframes progress-slide {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@media (max-width: 768px) {
  header { flex-direction: column; align-items: flex-start; gap: 8px; }
  header p { display: none; }
  .main-nav { gap: 0; }
  .nav-link { font-size: 13px; padding: 4px 8px; }
  main { flex-direction: column; }
  #map { height: 55vh; flex: none; }
  #legend-panel {
    top: auto;
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: 220px;
  }
  #legend { max-height: 220px; overflow-y: auto; }
  #legend.legend-expanded { max-height: 50vh; }
  .maplibregl-popup-content { min-width: 312px; max-width: 360px; }
}

/* ── API landing page ───────────────────────────────────── */
.api-landing { max-width: 860px; }
.api-tagline { font-size: 1.1rem; color: #9ca3af; margin-bottom: 2rem; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0; }
@media (max-width: 700px) { .pricing-grid { grid-template-columns: 1fr; } }

.pricing-card { background: #1e2433; border: 1px solid #374151; border-radius: 10px; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.pricing-card-featured { border-color: #4ade80; box-shadow: 0 0 0 1px #4ade8033; }
.pricing-tier { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #9ca3af; }
.pricing-price { font-size: 2.2rem; font-weight: 800; color: #f9fafb; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: #6b7280; }
.pricing-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.pricing-features li { font-size: 0.9rem; color: #d1d5db; }
.pricing-features li::before { content: "✓ "; color: #4ade80; }
.pricing-cta { display: block; text-align: center; padding: 0.65rem 1rem; background: #4ade80; color: #0a0e1a; border-radius: 6px; font-weight: 700; font-size: 0.9rem; text-decoration: none; margin-top: auto; }
.pricing-cta:hover { background: #86efac; color: #0a0e1a; }
.pricing-cta-secondary { background: #374151; color: #e5e7eb; }
.pricing-cta-secondary:hover { background: #4b5563; color: #f9fafb; }

.api-success { background: #14532d; border: 1px solid #4ade80; border-radius: 8px; padding: 1rem 1.25rem; margin: 1rem 0; color: #bbf7d0; }

.api-endpoint { background: #1e2433; border: 1px solid #2d3748; border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.api-method { display: inline-block; background: #1d4ed8; color: #fff; font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-bottom: 0.5rem; font-family: monospace; }
.api-method-post { background: #7c3aed; }
.api-path { display: inline-block; font-family: monospace; font-size: 0.9rem; color: #93c5fd; margin-bottom: 0.5rem; margin-left: 0.5rem; }
.api-example { background: #0a0e1a; border: 1px solid #2d3748; border-radius: 6px; padding: 0.75rem 1rem; font-family: monospace; font-size: 0.8rem; color: #d1d5db; overflow-x: auto; white-space: pre; margin-top: 0.5rem; }

/* Run example button + response */
.run-example-btn { margin-top: 0.6rem; padding: 0.4rem 0.9rem; background: #1e40af; color: #fff; border: 1px solid #3b82f6; border-radius: 6px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.run-example-btn:hover:not(:disabled) { background: #2563eb; }
.run-example-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.run-response { margin-top: 0.5rem; padding: 0.75rem 1rem; background: #0a0e1a; border: 1px solid #2d3748; border-radius: 6px; font-family: monospace; font-size: 0.78rem; color: #d1d5db; white-space: pre-wrap; word-break: break-word; overflow-x: auto; max-height: 400px; overflow-y: auto; }
.run-response.run-ok { border-color: #16a34a; }
.run-response.run-err { border-color: #dc2626; color: #fecaca; }
.run-response.run-loading { border-color: #6b7280; color: #9ca3af; font-style: italic; }
.api-demo-note { margin: 0.5rem 0 1rem; padding: 0.6rem 0.9rem; background: #0f1e3a; border: 1px solid #1e3a8a; border-radius: 6px; color: #cbd5e1; font-size: 0.85rem; line-height: 1.5; }
.api-demo-note a { color: #93c5fd; }

/* Signup form */
.signup-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #2d3748; }
.signup-row { display: flex; gap: 0.5rem; max-width: 440px; }
.signup-row input[type="email"],
.signup-row input[type="text"] { flex: 1; padding: 0.6rem 0.8rem; border: 1px solid #374151; border-radius: 6px; background: #0f172a; color: #e5e7eb; font-size: 0.9rem; }
.signup-row input:focus { outline: none; border-color: var(--accent); }
.signup-result { margin-top: 0.75rem; padding: 0.75rem 1rem; border-radius: 6px; font-size: 0.9rem; line-height: 1.6; }
.signup-ok { background: #14532d; border: 1px solid #4ade80; color: #bbf7d0; }
.signup-error { background: #7f1d1d; border: 1px solid #f87171; color: #fecaca; }
.api-key-display { display: block; margin: 0.5rem 0; padding: 0.5rem 0.75rem; background: #0a0e1a; border: 1px solid #374151; border-radius: 4px; font-family: monospace; font-size: 0.85rem; word-break: break-all; user-select: all; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin: 1.25rem 0; }
.dash-card { background: #1e2433; border: 1px solid #2d3748; border-radius: 8px; padding: 1rem; text-align: center; }
.dash-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.dash-value { font-size: 1.4rem; font-weight: 700; color: #e5e7eb; }
.dash-bar-wrap { background: #1e2433; border-radius: 6px; height: 8px; overflow: hidden; margin: 0.5rem 0 1rem; }
.dash-bar { height: 100%; background: var(--accent); border-radius: 6px; transition: width 0.3s; }
.dash-bar-warn { background: #f59e0b; }
.dash-meta { font-size: 0.8rem; color: var(--muted); }
.dash-key-section { margin: 1.5rem 0; padding: 1rem 0; border-top: 1px solid var(--border); }
.dash-key-display { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.dash-key-display code { flex: 1; background: #0a0e1a; border: 1px solid var(--border); border-radius: 4px; padding: 8px 12px; font-size: 0.85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.dash-action-btn { padding: 6px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--text); font-size: 0.8rem; cursor: pointer; transition: all 0.15s; }
.dash-action-btn:hover { border-color: var(--accent); }
.dash-action-warn { border-color: #f87171; color: #f87171; }
.dash-action-warn:hover { background: #7f1d1d; }
.dash-warn-text { font-size: 0.85rem; color: #f87171; margin: 8px 0; }
.dash-history-section { margin: 1.5rem 0; padding: 1rem 0; border-top: 1px solid var(--border); }
.dash-upgrade { margin: 1.5rem 0; padding: 1.25rem; background: #1e2433; border: 1px solid var(--accent); border-radius: 8px; text-align: center; }
.dash-upgrade p { margin: 0 0 12px; color: var(--text); }

/* ── State selector ──────────────────────────────────── */
.state-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.state-select:focus { outline: none; border-color: var(--accent); }

/* ── Search ──────────────────────────────────────────── */
.search-box { position: relative; }
#search-input {
  width: 220px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
#search-input::placeholder { color: var(--muted); }
#search-input:focus { outline: none; border-color: var(--accent); }
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 280px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 4px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.1s;
}
.search-item:hover { background: var(--border); }
.search-swatch { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.search-icon-text { width: 14px; text-align: center; font-size: 11px; color: var(--muted); flex-shrink: 0; }
.search-label { font-size: 13px; color: var(--text); }
.search-sub { font-size: 11px; color: var(--muted); }
.search-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* ── Viewport stats ──────────────────────────────────── */
.stats-panel {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 160px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.stats-count { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.stats-crop-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.stats-swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.stats-crop-label { font-size: 12px; color: var(--text); flex: 1; }
.stats-crop-val { font-size: 12px; color: var(--muted); }
.stats-note { font-size: 10px; color: var(--muted); margin-top: 6px; font-style: italic; }

/* ── Rotation label ──────────────────────────────────── */
.popup-rotation {
  font-size: 12px;
  color: var(--accent);
  margin: 4px 0 2px;
  font-style: italic;
}

/* ── API error codes ─────────────────────────────────── */
.api-errors-table { margin-top: 0.5rem; }
.api-error-row { display: flex; gap: 0.75rem; padding: 0.3rem 0; font-size: 0.85rem; color: var(--muted); }
.api-error-row code { color: var(--accent); font-weight: 600; min-width: 32px; }

@media (max-width: 768px) {
  #search-input { width: 140px; font-size: 12px; }
  .search-results { min-width: 240px; }
  .stats-panel {
    bottom: auto;
    top: 60px;
    left: 8px;
    min-width: 130px;
    padding: 6px 10px;
  }
  .stats-count { font-size: 12px; }
  .stats-crop-row { font-size: 11px; }
}

/* ── Landing page ──────────────────────────────────────── */
.landing-content {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 80px;
  text-align: center;
}

.hero {
  padding: 80px 0 60px;
}
.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #e5e7eb 0%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.hero-counters {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 40px;
}
.counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.counter-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}
.counter-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.hero-btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #0a0e1a;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
.hero-btn-primary:hover {
  background: #86efac;
  color: #0a0e1a;
}
.hero-btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.hero-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hero-btn-tertiary {
  display: inline-block;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 12px 16px;
  text-decoration: none;
  transition: color 0.15s;
}
.hero-btn-tertiary:hover {
  color: var(--accent);
}

/* Sample band (above final footer CTA) */
.sample-band {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  text-align: center;
}
.sample-band-sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

/* API page: sample callout above pricing */
.api-sample-callout {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0 28px;
  color: var(--text);
  font-size: 0.95rem;
}
.api-sample-callout a {
  color: var(--accent);
  font-weight: 600;
}

/* Social proof */
.social-proof {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  margin-bottom: 56px;
}
.social-proof-text {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 16px;
}
.social-proof-logos {
  display: flex;
  justify-content: center;
  gap: 40px;
}
.social-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.02em;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  color: inherit;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.1);
  text-decoration: none;
}
.feature-card .feature-title,
.feature-card .feature-desc {
  text-decoration: none;
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}
.feature-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* How it works */
.how-it-works {
  margin-bottom: 56px;
}
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 32px;
  color: var(--text);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.step-number {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #0a0e1a;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.step-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.hero-asterisk {
  color: var(--accent);
  font-weight: 400;
  font-size: 0.6em;
  margin-left: 4px;
}
.hero-footnote {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  margin: 4px 0 20px;
  max-width: 720px;
}
.hero-footnote sup { color: var(--accent); margin-right: 2px; }

/* Landing pricing section */
.landing-pricing {
  margin-bottom: 56px;
}

/* Landing footer CTA */
.landing-footer-cta {
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.footer-cta-sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 24px;
}

/* Landing footer */
.landing-footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding-top: 32px;
  padding-bottom: 24px;
}
.landing-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 16px;
}
.landing-footer-links a,
.landing-footer-links .nav-link {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}
.landing-footer-links a:hover,
.landing-footer-links .nav-link:hover {
  color: var(--text);
  text-decoration: none;
}
.landing-footer-links a:visited {
  color: var(--muted);
}
.landing-footer-copy {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0;
}

/* Landing page mobile */
@media (max-width: 768px) {
  .hero { padding: 48px 0 40px; }
  .hero-title { font-size: 1.8rem; }
  .hero-sub { font-size: 1rem; }
  .hero-counters { gap: 24px; }
  .counter-value { font-size: 1.4rem; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .social-proof-logos { flex-wrap: wrap; gap: 20px; }
}

/* Admin dashboard */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.85rem; }
.admin-table th { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--muted); font-weight: 500; }
.admin-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); }
.admin-tier { padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.admin-tier-free { background: #1e3a5f; color: #60a5fa; }
.admin-tier-pro { background: #1a3d2e; color: #34d399; }
.admin-tier-enterprise { background: #3b2f1a; color: #fbbf24; }

/* Admin GA4 analytics section */
.admin-section-title { margin-top: 2rem; margin-bottom: 0.75rem; font-weight: 600; color: var(--text); font-size: 1rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.admin-ga4-loading { color: var(--muted); font-size: 0.9rem; padding: 8px 0; }
.admin-top-pages { margin-top: 1rem; }

/* ── Country selector ─────────────────────────────────── */
.country-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.country-select:focus { outline: none; border-color: var(--accent); }

/* ── Country cards (homepage) ─────────────────────────── */
.countries-section {
  margin-bottom: 56px;
}
.countries-sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 32px;
}
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  text-align: left;
}
.country-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.country-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.1);
}
.country-flag {
  font-size: 1.6rem;
  margin-bottom: 2px;
}
.country-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.country-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.country-status {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 6px;
  width: fit-content;
}
.country-status-live {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.country-status-beta {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}
.country-status-soon {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}
.country-card-disabled {
  opacity: 0.6;
  cursor: default;
}
.country-card-disabled:hover {
  border-color: var(--border);
  transform: none;
  box-shadow: none;
}

@media (max-width: 768px) {
  .country-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .country-grid { grid-template-columns: 1fr; }
}

