:root {
  --bg-obsidian: #060b16;
  --bg-dark: #0b1220;
  --bg-dark-elev: #111b2e;
  --bg-dark-panel: #16233b;
  --border-dark: #233352;
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-on-dark: #f8fafc;
  --text-on-dark-muted: #cbd5e1;
  --accent: #047857;
  --accent-hover: #065f46;
  --accent-bright: #10b981;
  --cobalt: #1d4ed8;
  --cobalt-hover: #1e40af;
  --danger-bg: #991b1b;
  --danger-fg: #ffffff;
  --warn-bg: #f59e0b;
  --warn-fg: #050811;
  --mod-bg: #1e293b;
  --mod-fg: #f8fafc;
  --ok-bg: #065f46;
  --ok-fg: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 16px 40px rgba(6, 11, 22, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: var(--text-main);
  background: var(--bg-page);
  scroll-behavior: smooth;
  font-variant-numeric: tabular-nums;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--cobalt);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: rgba(6, 11, 22, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
  position: sticky;
  top: 0;
  z-index: 600;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-link img {
  height: 36px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-on-dark-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: #ffffff;
  text-decoration: none;
}

.nav-cta {
  background: var(--accent-bright);
  color: #052e16 !important;
  font-weight: 700 !important;
  padding: 8px 15px;
  border-radius: 9px;
}

.nav-cta:hover {
  background: #34d399;
}

/* Architectural Topographic Hero (Clean monochrome contour lines — zero rainbow bars) */
.hero {
  background-color: var(--bg-obsidian);
  background-image:
    radial-gradient(circle at 82% 18%, rgba(16, 185, 129, 0.12), transparent 44%),
    radial-gradient(circle at 12% 88%, rgba(37, 99, 235, 0.14), transparent 42%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='360' viewBox='0 0 640 360'%3E%3Cg fill='none' stroke='%231e293b' stroke-width='1' opacity='0.55'%3E%3Cpath d='M-20 80 C 120 20, 260 150, 420 90 C 520 55, 580 110, 660 75'/%3E%3Cpath d='M-20 140 C 130 85, 250 205, 430 145 C 530 110, 585 165, 660 130'/%3E%3Cpath d='M-20 205 C 145 155, 265 265, 445 205 C 540 175, 595 225, 660 190'/%3E%3Cpath d='M-20 270 C 160 220, 285 320, 460 265 C 555 235, 600 285, 660 250'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover, cover, 640px 360px;
  color: var(--text-on-dark);
  padding: 40px 0 34px;
  border-bottom: 1px solid var(--border-dark);
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(17, 27, 46, 0.9);
  border: 1px solid var(--border-dark);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.hero-stats-strip {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: #94a3b8;
}

.hero-stats-strip strong {
  color: #f8fafc;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  max-width: 900px;
}

.hero-sub {
  margin: 0 0 22px;
  color: var(--text-on-dark-muted);
  font-size: 1.02rem;
  max-width: 800px;
}

/* Search Bar */
.search-box {
  background: rgba(17, 27, 46, 0.92);
  border: 1px solid #2a3d61;
  border-radius: 14px;
  padding: 14px;
  max-width: 980px;
  box-shadow: var(--shadow-lg);
}

.search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1 1 340px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.98rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.08s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-bright);
  color: #052e16;
}

.btn-primary:hover {
  background: #34d399;
}

.btn-solid-emerald {
  background: var(--accent);
  color: #ffffff;
}

.btn-solid-emerald:hover {
  background: var(--accent-hover);
}

.btn-cobalt {
  background: var(--cobalt);
  color: #ffffff;
}

.btn-cobalt:hover {
  background: var(--cobalt-hover);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.btn-outline:hover {
  background: #f1f5f9;
}

.sample-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.84rem;
  color: #94a3b8;
}

.chip-btn {
  background: #16233b;
  color: #e2e8f0;
  border: 1px solid #2d4269;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chip-btn:hover {
  background: #223557;
  border-color: #4768a3;
  color: #ffffff;
}

/* Main Geospatial Command Center */
.workspace-section {
  padding: 24px 0 48px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-header {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header h2,
.card-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.card-body {
  padding: 18px;
}

/* Map Studio Frame — Zero Leaflet Watermark */
.map-card {
  background: #0b1220;
  border: 1px solid #1e293b;
  color: #f8fafc;
}

.map-card .card-header {
  background: #0b1220;
  border-bottom: 1px solid #1e293b;
  color: #f8fafc;
}

.map-toolbar {
  background: #111b2e;
  border-bottom: 1px solid #1e293b;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.basemap-group,
.overlay-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tool-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-right: 4px;
}

.map-pill {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-pill:hover {
  background: #2b3c56;
  color: #ffffff;
}

.map-pill.active {
  background: #1d4ed8;
  border-color: #3b82f6;
  color: #ffffff;
}

.map-pill.overlay-pill.active {
  background: #065f46;
  border-color: #10b981;
  color: #ffffff;
}

.map-stage {
  position: relative;
  width: 100%;
  height: 540px;
  background: #070d19;
}

#map {
  width: 100%;
  height: 100%;
  background: #070d19;
  z-index: 1;
}

/* Remove any stray leaflet watermark completely */
.leaflet-control-attribution {
  display: none !important;
}

.leaflet-bar {
  border: 1px solid #334155 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-bar a {
  background: #0b1220 !important;
  color: #f8fafc !important;
  border-bottom: 1px solid #233352 !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
}

.leaflet-bar a:hover {
  background: #1e293b !important;
}

.map-legend-bar {
  background: #0b1220;
  border-top: 1px solid #1e293b;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.79rem;
  color: #cbd5e1;
}

.legend-items {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

/* Risk Gauge Header */
.risk-hero-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-bottom: 16px;
}

.gauge-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.gauge-wrap svg {
  width: 72px;
  height: 72px;
  transform: rotate(-90deg);
}

.gauge-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1;
}

.gauge-text small {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Intelligence Tabs */
.intel-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.intel-tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-bottom: 3px solid transparent;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: -1px;
}

.intel-tab:hover {
  color: var(--text-main);
}

.intel-tab.active {
  color: var(--cobalt);
  border-bottom-color: var(--cobalt);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Status / Risk Badges (Strictly WCAG AA+ Contrast — NEVER Green on Amber!) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-high {
  background: var(--danger-bg);
  color: var(--danger-fg);
}

.badge-elevated {
  background: var(--warn-bg);
  color: var(--warn-fg);
}

.badge-moderate {
  background: var(--mod-bg);
  color: var(--mod-fg);
}

.badge-low {
  background: var(--ok-bg);
  color: var(--ok-fg);
}

.badge-neutral {
  background: #e2e8f0;
  color: #0f172a;
}

.badge-dark-pill {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 540px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 11px 13px;
  background: #f8fafc;
}

.kpi-label {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.kpi-val {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
}

.kpi-sub {
  font-size: 0.79rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.risk-list {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--text-main);
  font-size: 0.9rem;
}

.risk-list li {
  margin-bottom: 5px;
}

/* Unlock CTA Panel */
.unlock-box {
  background: #0b1220;
  color: #f8fafc;
  border: 1px solid #233352;
  border-radius: 12px;
  padding: 18px;
  margin-top: 16px;
}

.unlock-box h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
}

.unlock-box p {
  margin: 0 0 14px;
  font-size: 0.89rem;
  color: #cbd5e1;
}

.unlock-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Data Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 10px;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  background: #ffffff;
}

table.data-table th,
table.data-table td {
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

table.data-table th {
  background: #f1f5f9;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

/* Sections */
.band {
  padding: 52px 0;
  border-top: 1px solid var(--border-light);
}

.band-white {
  background: #ffffff;
}

.section-title {
  margin: 0 0 8px;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 28px;
  color: var(--text-muted);
  max-width: 760px;
}

/* 24-Layer Agency Coverage Strip */
.layer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .layer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .layer-grid {
    grid-template-columns: 1fr;
  }
}

.layer-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
}

.layer-card h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
}

.layer-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Pricing Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1020px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.price-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

.price-card.featured {
  border: 2px solid var(--accent);
}

.price-tag {
  font-size: 2rem;
  font-weight: 800;
  margin: 8px 0 4px;
  color: var(--text-main);
}

.price-tag span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-features {
  list-style: none;
  padding: 0;
  margin: 14px 0 20px;
  font-size: 0.89rem;
  color: #334155;
}

.price-features li {
  padding: 5px 0;
  border-bottom: 1px solid #f1f5f9;
}

/* SEO Hub Links Grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 820px) {
  .hub-grid {
    grid-template-columns: 1fr;
  }
}

.hub-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px;
  display: block;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.hub-card:hover {
  border-color: var(--cobalt);
  transform: translateY(-2px);
  text-decoration: none;
}

.hub-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--text-main);
}

.hub-card p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-muted);
}

/* Alerts & Loading */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  margin-bottom: 14px;
  font-weight: 600;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-info {
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}

.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  border: 3px solid #cbd5e1;
  border-top-color: var(--cobalt);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-obsidian);
  color: var(--text-on-dark-muted);
  padding: 40px 0;
  font-size: 0.87rem;
  border-top: 1px solid var(--border-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 24px;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer h4 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 6px;
}

.site-footer a {
  color: #cbd5e1;
}

.disclaimer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-dark);
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Printable Audit Dossier Styles */
.dossier-sheet {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.dossier-letterhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 2px solid #0b1220;
  padding-bottom: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.dossier-section {
  margin-bottom: 26px;
  break-inside: avoid;
}

.dossier-section h2 {
  font-size: 1.12rem;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

@media print {
  .no-print,
  .site-header,
  .site-footer {
    display: none !important;
  }
  body {
    background: #ffffff !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .dossier-sheet {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  a {
    color: #0f172a !important;
    text-decoration: none !important;
  }
}
