/* TerraScope — habitability research atlas */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a0a;
  --bg-2: #141414;
  --bg-card: #1a1a1a;
  --border: #262626;
  --border-strong: #333;
  --text: #e0e0e0;
  --text-dim: #9aa0a6;
  --text-muted: #666;
  --green: #4ade80;
  --green-dim: #22c55e;
  --blue: #3b82f6;
  --purple: #a855f7;
  --amber: #f59e0b;
  --red: #ef4444;
  --gold: #b8860b;
}
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dim); }

/* layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* nav */
nav.top {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
nav.top .container { display: flex; align-items: center; gap: 32px; }
nav.top .logo {
  font-weight: 800; font-size: 1.15rem; color: #fff;
  letter-spacing: 0.02em;
}
nav.top .logo span { color: var(--green); }
nav.top .links { display: flex; gap: 24px; margin-left: auto; align-items: center; }
nav.top .links a { color: var(--text-dim); font-size: 0.9rem; }
nav.top .links a:hover { color: var(--text); }
nav.top .links .cta {
  background: var(--green); color: #052e16; padding: 8px 18px;
  border-radius: 4px; font-weight: 600;
}
nav.top .links .cta:hover { background: var(--green-dim); color: #052e16; }

/* hero */
.hero {
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse at top, rgba(74,222,128,0.05) 0%, transparent 60%);
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1; color: #fff;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--green); }
.hero .lead {
  font-size: 1.15rem;
  color: var(--text-dim); max-width: 720px;
  margin-bottom: 32px;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
  border: none;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #052e16; }
.btn-primary:hover { background: var(--green-dim); color: #052e16; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* sections */
section { padding: 80px 0; border-bottom: 1px solid var(--border); }
section h2 {
  font-size: 2rem; font-weight: 700; color: #fff;
  margin-bottom: 12px;
}
section h2 span { color: var(--green); }
section .lede {
  color: var(--text-dim); font-size: 1.05rem;
  margin-bottom: 48px; max-width: 700px;
}

/* metric grid */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.metric {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 24px;
  transition: border 0.15s, transform 0.15s;
}
.metric:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.metric .icon {
  width: 36px; height: 36px;
  border-radius: 8px; background: rgba(74,222,128,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--green); font-size: 1.2rem; margin-bottom: 14px;
}
.metric h3 { font-size: 1.05rem; color: #fff; margin-bottom: 8px; }
.metric p { color: var(--text-dim); font-size: 0.92rem; }

/* sample-tables */
.sample-table {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; margin: 24px 0;
}
.sample-table table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.sample-table th {
  background: #262626; color: var(--green); text-align: left;
  padding: 10px 14px; border-bottom: 2px solid #444;
  font-weight: 600; font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sample-table td {
  padding: 9px 14px; border-bottom: 1px solid #2a2a2a;
  color: var(--text);
}
.sample-table tr:last-child td { border-bottom: none; }
.sample-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sample-table .pct-good { color: var(--green); font-weight: 700; }
.sample-table .pct-mid { color: var(--amber); font-weight: 600; }

/* pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.tier {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 32px 24px;
  position: relative;
  transition: border 0.15s, transform 0.15s;
}
.tier:hover { border-color: var(--border-strong); }
.tier.featured {
  border-color: var(--green); border-width: 2px;
}
.tier.featured::before {
  content: "MOST POPULAR";
  position: absolute; top: -10px; left: 24px;
  background: var(--green); color: #052e16;
  padding: 3px 10px; font-size: 0.65rem; border-radius: 3px;
  font-weight: 700; letter-spacing: 0.08em;
}
.tier .name { color: var(--green); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.tier .price { font-size: 2.4rem; color: #fff; font-weight: 800; margin: 8px 0; }
.tier .price small { font-size: 0.9rem; color: var(--text-dim); font-weight: 400; }
.tier .desc { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 24px; }
.tier ul { list-style: none; margin-bottom: 28px; }
.tier li {
  color: var(--text); font-size: 0.9rem; padding: 6px 0; padding-left: 24px;
  position: relative;
}
.tier li::before {
  content: "✓"; color: var(--green); position: absolute; left: 0;
  font-weight: 700;
}
.tier .btn { width: 100%; text-align: center; }

/* who is it for */
.audience {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.audience .card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 28px 24px;
}
.audience .card h3 { color: #fff; margin-bottom: 10px; font-size: 1.1rem; }
.audience .card p { color: var(--text-dim); font-size: 0.92rem; }

/* faq */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; padding: 16px 20px;
}
.faq summary {
  cursor: pointer; font-weight: 600; color: #fff; font-size: 0.98rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--green); margin-right: 12px; font-weight: 700; }
.faq details[open] summary::before { content: "−"; }
.faq p { margin-top: 12px; color: var(--text-dim); font-size: 0.92rem; }

/* footer */
footer {
  padding: 50px 0 30px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
footer .grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
@media (max-width: 700px) {
  footer .grid { grid-template-columns: 1fr 1fr; }
}
footer h4 {
  color: #fff; font-size: 0.85rem; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 14px;
}
footer ul { list-style: none; }
footer li { padding: 4px 0; }
footer li a { color: var(--text-dim); font-size: 0.88rem; }
footer li a:hover { color: var(--text); }
footer .legal {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex; justify-content: space-between;
  color: var(--text-muted); font-size: 0.82rem;
  flex-wrap: wrap; gap: 12px;
}

/* doc page (terms / privacy / refunds) */
.doc { padding: 60px 0; }
.doc h1 { font-size: 2rem; color: #fff; margin-bottom: 12px; }
.doc .updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 40px; }
.doc h2 {
  font-size: 1.2rem; color: var(--green); margin-top: 36px; margin-bottom: 12px;
  font-weight: 700;
}
.doc p, .doc li { color: var(--text); font-size: 0.95rem; margin-bottom: 12px; }
.doc ul { padding-left: 22px; margin-bottom: 16px; }

/* login form */
.auth {
  min-height: calc(100vh - 80px);
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.auth .card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 36px 32px;
  width: 100%; max-width: 400px;
}
.auth h1 { color: #fff; margin-bottom: 8px; font-size: 1.5rem; }
.auth .sub { color: var(--text-dim); margin-bottom: 24px; font-size: 0.92rem; }
.auth label { display: block; color: var(--text); font-size: 0.85rem; margin-bottom: 6px; margin-top: 14px; }
.auth input {
  width: 100%; background: #0a0a0a; border: 1px solid var(--border-strong);
  color: #fff; padding: 10px 12px; border-radius: 5px; font-size: 0.95rem;
}
.auth input:focus { border-color: var(--green); outline: none; }
.auth .btn { width: 100%; margin-top: 20px; }
.auth .links { margin-top: 18px; text-align: center; font-size: 0.85rem; color: var(--text-dim); }
.auth .links a { margin: 0 8px; }

/* smooth scroll for anchor nav */
html { scroll-behavior: smooth; }

/* full-screen map viewer layout (used by /<region>/ on areas.cleanz.one) */
body.map-view { overflow: hidden; height: 100vh; background: #000; }
.map-shell {
  position: fixed; inset: 0;
  background: #000;
}

/* Sidebar is now a slide-out drawer (Google-Maps style) — does not push the map */
.map-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 360px; max-width: 90vw;
  background: #0a0a0a;
  border-right: 1px solid var(--border-strong);
  display: flex; flex-direction: column;
  overflow-y: auto;
  z-index: 30;
  transform: translateX(-100%);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 28px rgba(0,0,0,0.55);
}
body.drawer-open .map-sidebar { transform: translateX(0); }

/* Floating brand pill is the trigger; once drawer is open, hide it so it doesn't overlap the drawer header */
body.drawer-open .floating-brand { opacity: 0; pointer-events: none; }
.floating-brand { transition: opacity 0.18s, border-color 0.15s, background 0.15s; }

.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 25;
  transition: opacity 0.22s;
}
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }

.drawer-close {
  position: absolute;
  top: 12px; right: 12px;
  background: transparent; border: 0;
  color: var(--text-dim); cursor: pointer;
  font-size: 1.4rem; line-height: 1;
  width: 32px; height: 32px;
  border-radius: 5px;
  z-index: 5;
  font-family: inherit;
}
.drawer-close:hover { color: var(--green); background: #161616; }

/* Floating chrome — sits OVER the map */
.floating-top-bar {
  position: fixed;
  top: 14px; left: 14px;        /* +/- now bottom-right, so top-left is free */
  z-index: 20;
  display: flex; gap: 8px; align-items: stretch;
}
.floating-brand {
  position: relative;
  z-index: 20;
  display: flex; align-items: center; gap: 12px;
  background: rgba(10,10,10,0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 8px 14px 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  box-shadow: 0 2px 14px rgba(0,0,0,0.5);
  font-family: inherit;
  color: var(--text);
  max-width: calc(100vw - 200px);
  overflow: hidden;
}
.floating-brand:hover { border-color: var(--green); background: rgba(15,15,15,0.97); }
.floating-brand .menu-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 1.1rem; line-height: 1;
  flex-shrink: 0;
}
.floating-brand .brand-name {
  font-weight: 700; color: #fff; font-size: 0.94rem;
  letter-spacing: 0.01em; white-space: nowrap;
}
.floating-brand .brand-name span { color: var(--green); }
.floating-brand .region-name {
  color: var(--text-dim); font-size: 0.86rem;
  border-left: 1px solid var(--border-strong);
  padding-left: 12px; margin-left: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 360px;
}

/* Floating chip row — preset filters, BOTTOM-LEFT (above the dock) */
.floating-chips {
  position: fixed;
  left: 14px; bottom: 24px;
  z-index: 19;
  display: flex; align-items: center; gap: 6px;
  background: rgba(10,10,10,0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 5px 6px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.5);
  max-width: calc(100vw - 80px);
  overflow-x: auto;
}
/* When chips live INSIDE the canvas-frame they auto-track its height */
.canvas-frame .floating-chips {
  position: relative;
  left: auto; bottom: auto;
}
.canvas-frame .floating-chips-stack {
  position: absolute;
  left: 14px; bottom: 14px;
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-start;
  z-index: 19;
}
@media (max-width: 700px) {
  .canvas-frame .floating-chips-stack { left: 8px; bottom: 8px; gap: 4px; }
}
.floating-chips .chip-label {
  color: var(--text-muted); font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0 8px 0 4px; white-space: nowrap;
}
.floating-chips .chip {
  background: transparent; border: 0;
  color: var(--text-dim);
  padding: 6px 12px; border-radius: 5px;
  font-size: 0.82rem; font-family: inherit;
  cursor: pointer; white-space: nowrap;
  transition: background 0.12s, color 0.12s;
  position: relative;
}
.floating-chips .chip:hover { background: #161616; color: #fff; }
.floating-chips .chip.active {
  background: rgba(74,222,128,0.12);
  color: var(--green);
  font-weight: 600;
}
.floating-chips .chip.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.55;
}
.floating-chips .chip.disabled:hover { background: transparent; color: var(--text-muted); }
.floating-chips .chip.disabled::after {
  content: ''; position: absolute;
  top: 4px; right: 4px;
  width: 5px; height: 5px;
  background: var(--amber);
  border-radius: 50%;
  opacity: 0.7;
}

@media (max-width: 1100px) {
  .floating-chips { max-width: calc(100vw - 28px); }
}
@media (max-width: 700px) {
  .floating-chips .chip-label { display: none; }
  .floating-chips { padding: 4px 4px; gap: 2px; }
  .floating-chips .chip { padding: 6px 9px; font-size: 0.78rem; }
}

.floating-account {
  position: fixed;
  top: 14px; right: 64px;       /* clear of Folium LayerControl at top-right */
  z-index: 20;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(10,10,10,0.94);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  font-size: 0.82rem; font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  box-shadow: 0 2px 14px rgba(0,0,0,0.5);
  letter-spacing: 0.05em;
}
.floating-account:hover { border-color: var(--green); color: var(--green); }

/* Drawer account bar — sits at the bottom of the slide-out */
.drawer-account {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #060606;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}
.drawer-account:hover { background: #0f0f0f; color: var(--green); }
.drawer-account .account-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(74,222,128,0.12);
  border: 1px solid var(--green);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.86rem; font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.drawer-account .account-text {
  display: flex; flex-direction: column;
  line-height: 1.2;
}
.drawer-account .account-text strong {
  color: #fff; font-size: 0.92rem; font-weight: 600;
}
.drawer-account .account-text .account-sub {
  color: var(--text-muted); font-size: 0.74rem;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Old sidebar-toggle no longer used */
.sidebar-toggle { display: none !important; }

/* Theme toggle button (sits next to the floating brand pill) */
.floating-theme {
  background: rgba(10,10,10,0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  width: 42px;
  min-height: 42px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.18s, border-color 0.15s, background 0.15s, color 0.15s;
  box-shadow: 0 2px 14px rgba(0,0,0,0.5);
  padding: 0;
}
.floating-theme svg { display: block; }
.floating-theme:hover { border-color: var(--green); color: var(--green); background: rgba(15,15,15,0.97); }
body.drawer-open .floating-theme { opacity: 0; pointer-events: none; }
.map-sidebar::-webkit-scrollbar { width: 6px; }
.map-sidebar::-webkit-scrollbar-track { background: transparent; }
.map-sidebar::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }

.map-sidebar .drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  gap: 14px;
}
.map-sidebar .drawer-header .brand {
  padding: 0;
  border-bottom: 0;
  font-size: 1.15rem; font-weight: 800; color: #fff;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-block;
}
.drawer-theme-mini {
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  font-family: inherit;
  padding: 0;
}
.drawer-theme-mini:hover { color: var(--green); border-color: var(--green); background: rgba(74,222,128,0.06); }
.drawer-theme-mini svg { display: block; }

.map-sidebar .brand {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem; font-weight: 800; color: #fff;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: block;
}
.map-sidebar .brand span { color: var(--green); }

.map-sidebar .nav-core {
  display: flex; gap: 4px; padding: 12px 14px 0;
  flex-wrap: wrap;
}
.map-sidebar .nav-core a {
  font-size: 0.78rem; color: var(--text-dim);
  padding: 5px 9px; border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.map-sidebar .nav-core a:hover { background: #161616; color: #fff; }
.map-sidebar .nav-core a.active { color: var(--green); background: rgba(74,222,128,0.08); }

.map-sidebar .crumbs {
  padding: 14px 22px 4px;
  color: var(--text-muted); font-size: 0.74rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.map-sidebar .crumbs a { color: var(--text-dim); text-decoration: none; }
.map-sidebar .crumbs a:hover { color: var(--green); }

.map-sidebar h1.region {
  padding: 0 22px 8px;
  font-size: 1.4rem; color: #fff; font-weight: 700;
  line-height: 1.2;
}
.map-sidebar p.region-blurb {
  padding: 0 22px 18px;
  color: var(--text-dim); font-size: 0.86rem;
  line-height: 1.5;
}

.map-sidebar .region-picker {
  padding: 6px 14px 16px;
  border-bottom: 1px solid var(--border);
}
.map-sidebar .region-picker .label {
  font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); padding: 0 8px 6px;
}
.map-sidebar .region-picker a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: 5px;
  color: var(--text); font-size: 0.86rem;
  text-decoration: none;
  transition: background 0.15s;
}
.map-sidebar .region-picker a:hover { background: #161616; }
.map-sidebar .region-picker a.active {
  background: rgba(74,222,128,0.07);
  color: var(--green); font-weight: 600;
}
.map-sidebar .region-picker a .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-right: 9px; flex-shrink: 0;
}
.map-sidebar .region-picker a .dot.live { background: var(--green); }
.map-sidebar .region-picker a .dot.soon { background: var(--amber); opacity: 0.5; }
.map-sidebar .region-picker a .meta {
  font-size: 0.7rem; color: var(--text-muted); margin-left: auto;
}

.map-sidebar .panel {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.map-sidebar .panel h3 {
  font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green); margin-bottom: 10px;
}
.map-sidebar .panel .stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.map-sidebar .panel .stat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 5px; padding: 9px 11px;
}
.map-sidebar .panel .stat .v {
  font-size: 1.05rem; font-weight: 700; color: #fff; line-height: 1.1;
}
.map-sidebar .panel .stat .k {
  font-size: 0.66rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 3px;
}

.map-sidebar .panel ul.lt {
  list-style: none; padding: 0;
}
.map-sidebar .panel ul.lt li {
  font-size: 0.84rem; color: var(--text);
  padding: 5px 0; line-height: 1.4;
  display: flex; align-items: center; gap: 9px;
}
.map-sidebar .panel ul.lt li .swatch {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 2px; flex-shrink: 0;
}
.map-sidebar .panel ul.lt li .meta {
  font-size: 0.74rem; color: var(--text-muted); margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.map-sidebar .panel.fine p {
  font-size: 0.78rem; color: var(--text-muted);
  line-height: 1.5;
}

.map-sidebar .footer-note {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  font-size: 0.74rem; color: var(--text-muted);
}

/* When logged in: hide the legal/marketing links in the drawer (front-of-funnel stuff) */
body.logged-in .map-sidebar .footer-note { display: none; }
.map-sidebar .footer-note a { color: var(--text-dim); text-decoration: none; }
.map-sidebar .footer-note a:hover { color: var(--green); }

.map-canvas {
  position: absolute; inset: 0;
  background: #000;
  display: flex; flex-direction: column;
  z-index: 1;
}
.map-canvas .canvas-frame {
  flex: 1;
  position: relative;
  min-height: 0;
}
.map-canvas iframe {
  width: 100%; height: 100%;
  border: 0;
  display: block;
}

/* DevTools-style bottom dock */
.map-dock {
  flex-shrink: 0;
  background: #0a0a0a;
  border-top: 1px solid var(--border-strong);
  display: flex; flex-direction: column;
  height: 280px;
  min-height: 36px;
  max-height: 80vh;
  position: relative;
  z-index: 5;
}
.map-dock.collapsed { height: 36px !important; }

.dock-resize {
  position: absolute;
  top: -3px; left: 0; right: 0;
  height: 6px;
  cursor: ns-resize;
  z-index: 6;
  background: transparent;
}
.dock-resize:hover, .dock-resize.dragging {
  background: rgba(74,222,128,0.25);
}
.map-dock.collapsed .dock-resize { cursor: default; pointer-events: none; }

.dock-tabs {
  display: flex; align-items: stretch;
  background: #060606;
  border-bottom: 1px solid var(--border);
  height: 36px;
  flex-shrink: 0;
  padding: 0 4px;
  user-select: none;
}
.dock-tab {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 0 16px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 6px;
  position: relative;
  transition: color 0.12s, background 0.12s;
}
.dock-tab:hover { color: #fff; background: #0f0f0f; }
.dock-tab.active {
  color: var(--green);
  background: #0a0a0a;
}
.dock-tab.active::after {
  content: ''; position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--green);
}
.dock-tab .badge {
  font-size: 0.62rem;
  background: #161616;
  color: var(--text-muted);
  padding: 1px 5px; border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
.dock-spacer { flex: 1; }
.dock-toggle {
  background: transparent; border: 0;
  color: var(--text-muted);
  font-size: 1rem; line-height: 1;
  width: 32px; cursor: pointer;
  font-family: inherit;
}
.dock-toggle:hover { color: var(--green); }

.dock-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 18px;
}
.map-dock.collapsed .dock-body { display: none; }
.dock-body::-webkit-scrollbar { width: 8px; height: 8px; }
.dock-body::-webkit-scrollbar-track { background: #060606; }
.dock-body::-webkit-scrollbar-thumb { background: #222; border-radius: 4px; }

.dock-pane { display: none; }
.dock-pane.active { display: block; }

/* tables inside dock panes */
.dock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.dock-table thead th {
  text-align: left;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-strong);
  position: sticky; top: 0;
  background: #0a0a0a;
}
.dock-table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid #141414;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.dock-table tbody tr:hover td { background: #0f0f0f; }
.dock-table .rank {
  color: var(--text-muted);
  width: 38px;
  font-size: 0.74rem;
}
.dock-table .swatch {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; vertical-align: middle;
  margin-right: 8px;
}
.dock-table .num { text-align: right; }
.dock-table .pct {
  text-align: right;
  color: var(--green);
  font-weight: 600;
}

.dock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.dock-grid .stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 13px;
}
.dock-grid .stat .v {
  font-size: 1.15rem; font-weight: 700; color: #fff; line-height: 1.1;
}
.dock-grid .stat .k {
  font-size: 0.66rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px;
}

.dock-prose {
  max-width: 760px;
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.dock-prose p { margin-bottom: 10px; }
.dock-prose h4 {
  color: #fff; font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin: 14px 0 6px;
}

.sidebar-toggle {
  position: fixed;
  top: 14px; left: 354px;
  z-index: 20;
  width: 32px; height: 32px;
  background: rgba(10,10,10,0.92);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: left 0.25s, color 0.15s, border-color 0.15s;
  font-size: 1rem; line-height: 1;
}
.sidebar-toggle:hover { color: var(--green); border-color: var(--green); }

@media (max-width: 760px) {
  /* Mobile: collapse floating nav to hamburger icon ONLY, flush left edge */
  .floating-top-bar { left: 0; gap: 4px; top: 10px; }
  .floating-brand .region-name { display: none !important; }
  .floating-brand .brand-name { display: none !important; }
  .floating-brand {
    padding: 8px 10px !important;
    border-radius: 0 8px 8px 0 !important;
    border-left: 0 !important;
    max-width: none !important;
  }
  .floating-brand .menu-icon { font-size: 1.3rem; width: 22px; height: 22px; }
  /* Mobile: kill the floating theme button — the in-drawer mini button replaces it */
  .floating-theme { display: none !important; }
}

/* fullscreen blackout modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.modal-backdrop.open { display: flex; animation: modalIn 0.18s ease-out; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 36px 36px 28px;
  width: 100%; max-width: 480px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(74,222,128,0.15);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--text-dim); border-radius: 50%;
  font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}
.modal-close:hover { color: #fff; border-color: var(--green); }
.modal-card .price-stamp {
  display: inline-block;
  background: rgba(74,222,128,0.1);
  color: var(--green);
  font-size: 1.4rem; font-weight: 800;
  padding: 6px 14px; border-radius: 4px;
  margin-bottom: 14px;
  border: 1px solid rgba(74,222,128,0.3);
}
.modal-card .price-stamp span { font-size: 0.75rem; color: var(--text-dim); font-weight: 500; margin-left: 4px; }
.modal-card h2 {
  color: #fff; font-size: 1.55rem; font-weight: 700; margin-bottom: 8px;
}
.modal-sub {
  color: var(--text-dim); font-size: 0.92rem; margin-bottom: 20px; line-height: 1.55;
}
.modal-features {
  list-style: none; padding: 0; margin: 0 0 24px 0;
}
.modal-features li {
  color: var(--text); font-size: 0.88rem; padding: 5px 0 5px 22px;
  position: relative; line-height: 1.5;
}
.modal-features li::before {
  content: "✓"; color: var(--green); position: absolute; left: 0;
  font-weight: 700;
}
.modal-form label {
  display: block; color: var(--text); font-size: 0.85rem; margin-bottom: 6px;
}
.modal-form input {
  width: 100%; background: #0a0a0a; border: 1px solid var(--border-strong);
  color: #fff; padding: 11px 14px; border-radius: 5px; font-size: 0.95rem;
  margin-bottom: 14px;
}
.modal-form input:focus { border-color: var(--green); outline: none; }
.modal-submit { width: 100%; }
.modal-fine {
  font-size: 0.78rem; color: var(--text-muted);
  margin-top: 14px; text-align: center;
}

/* preview placeholder for embedded map */
.map-preview {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px;
  text-align: center; color: var(--text-dim);
  margin: 32px 0;
}
.map-preview .img-placeholder {
  background: linear-gradient(135deg, rgba(74,222,128,0.08), rgba(168,85,247,0.06));
  border: 1px dashed var(--border-strong);
  border-radius: 6px; height: 360px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.85rem;
  margin-bottom: 14px;
}
