/* =====================================================================
   StreetPOTENTIA design system — Deep Navy + Teal + White
   Contrast notes (WCAG 2.2 AA):
   - White on navy #15324B  ≈ 12.9:1  ✓
   - Charcoal #27272A on white ≈ 14.9:1 ✓   Slate #64748B on white ≈ 4.8:1 ✓
   - White on brand teal #16A6A1 ≈ 3.0:1 ✗ for body text → text-bearing teal
     surfaces and links use --teal-ink #0E7C78 (≈ 5.0:1 with white / on white).
   Brand teal #16A6A1 is reserved for accents, focus rings, icons, progress
   and large display text.
   ===================================================================== */
:root {
  --navy: #15324B;
  --navy-900: #0E2335;
  --navy-800: #122B41;
  --navy-700: #1C4060;
  --navy-600: #2A5478;
  --navy-50: #EEF3F7;
  --teal: #16A6A1;
  --teal-ink: #0E7C78;
  --teal-ink-hover: #0B6A66;
  --teal-50: #E8F7F6;
  --teal-100: #C9EEEC;
  --white: #FFFFFF;
  --charcoal: #27272A;
  --slate: #64748B;
  --light: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --success: #15803D; --success-bg: #ECFDF3;
  --warning: #D97706; --warning-ink: #B45309; --warning-bg: #FFFBEB;
  --error: #DC2626;   --error-bg: #FEF2F2;
  --info: #2563EB;    --info-bg: #EFF6FF;

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px;
  --shadow-sm: 0 1px 2px rgba(21, 50, 75, .06);
  --shadow: 0 1px 2px rgba(21, 50, 75, .05), 0 4px 14px rgba(21, 50, 75, .06);
  --shadow-lg: 0 8px 30px rgba(21, 50, 75, .12);
  --focus: 0 0 0 3px rgba(22, 166, 161, .45);
  --sidebar-w: 264px;
  --topbar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--white); color: var(--charcoal);
  font: 400 15.5px/1.6 var(--font-body); -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--teal-ink); text-decoration: none; }
a:hover { color: var(--teal-ink-hover); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.2; margin: 0 0 var(--s3); letter-spacing: -.015em; }
h1 { font-size: clamp(1.7rem, 2.6vw, 2.25rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 650; }
h3 { font-size: 1.08rem; font-weight: 650; }
h4 { font-size: .95rem; font-weight: 650; }
p { margin: 0 0 var(--s3); }
small, .small { font-size: .85rem; }
.muted { color: var(--slate); }
.mono { font-family: var(--font-mono); font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s6) 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: var(--r); z-index: 1000; }
.skip-link:focus { left: 8px; color: #fff; }
[x-cloak] { display: none !important; }
.icon { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--s5); }
.container-narrow { max-width: 820px; }
.stack > * + * { margin-top: var(--s4); }
.stack-sm > * + * { margin-top: var(--s2); }
.row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.grid { display: grid; gap: var(--s5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s6); align-items: start; }
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.mt-0 { margin-top: 0 !important; } .mt-2 { margin-top: var(--s2); } .mt-4 { margin-top: var(--s4); } .mt-6 { margin-top: var(--s6); } .mt-8 { margin-top: var(--s8); }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: var(--s2); } .mb-4 { margin-bottom: var(--s4); } .mb-6 { margin-bottom: var(--s6); }
.w-full { width: 100%; } .text-center { text-align: center; } .nowrap { white-space: nowrap; }
.hide-sm { } @media (max-width: 720px) { .hide-sm { display: none !important; } }
.show-sm { display: none !important; } @media (max-width: 720px) { .show-sm { display: initial !important; } }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--white); --fg: var(--navy); --bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--r); border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); font: 600 .93rem/1 var(--font-body); cursor: pointer;
  transition: background .15s var(--ease), border-color .15s, transform .1s, box-shadow .15s; text-decoration: none !important; white-space: nowrap;
}
.btn:hover { --bg: var(--light); color: var(--fg); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { --bg: var(--navy); --fg: #fff; --bd: var(--navy); }
.btn-primary:hover { --bg: var(--navy-700); --bd: var(--navy-700); color: #fff; }
.btn-accent { --bg: var(--teal-ink); --fg: #fff; --bd: var(--teal-ink); }
.btn-accent:hover { --bg: var(--teal-ink-hover); --bd: var(--teal-ink-hover); color: #fff; }
.btn-ghost { --bg: transparent; --bd: transparent; }
.btn-ghost:hover { --bg: var(--light); }
.btn-danger { --bg: #fff; --fg: var(--error); --bd: #FCA5A5; }
.btn-danger:hover { --bg: var(--error-bg); }
.btn-on-navy { --bg: rgba(255,255,255,.08); --fg: #fff; --bd: rgba(255,255,255,.22); }
.btn-on-navy:hover { --bg: rgba(255,255,255,.16); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 1rem; }
.btn-icon { width: 42px; padding: 0; }
.btn-block { width: 100%; }
.htmx-request .btn-spinner, .btn-spinner.htmx-request { display: inline-block; }
.btn-spinner { display: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- cards & surfaces ---------- */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow-sm); }
.card-pad-lg { padding: var(--s8); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: var(--s5); }
.card-link { display: block; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: var(--teal); box-shadow: var(--shadow); text-decoration: none; color: inherit; transform: translateY(-1px); }
.panel { background: var(--light); border-radius: var(--r-lg); padding: var(--s5); }
.panel-navy { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: var(--s6); }
.panel-navy h2, .panel-navy h3 { color: #fff; }
.divider-list > * + * { border-top: 1px solid var(--border); }
.section { padding: var(--s16) 0; }
.section-alt { background: var(--light); }
.eyebrow { font: 700 .74rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--teal-ink); margin-bottom: var(--s3); display: inline-flex; gap: 8px; align-items: center; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--teal); border-radius: 2px; }

/* ---------- badges / status ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-full); font: 600 .76rem/1.4 var(--font-body); background: var(--light); color: var(--navy-700); border: 1px solid var(--border); white-space: nowrap; }
.badge .icon { width: 13px; height: 13px; }
.badge-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.badge-teal { background: var(--teal-50); color: var(--teal-ink); border-color: var(--teal-100); }
.badge-success { background: var(--success-bg); color: var(--success); border-color: #BBF7D0; }
.badge-warning { background: var(--warning-bg); color: var(--warning-ink); border-color: #FDE68A; }
.badge-error { background: var(--error-bg); color: var(--error); border-color: #FECACA; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: #BFDBFE; }
.badge-demo { background: #fff; color: var(--slate); border: 1px dashed var(--border-strong); }
.label-submitted { } .label-under_review { background: var(--warning-bg); color: var(--warning-ink); border-color: #FDE68A; }
.label-community_corroborated { background: var(--teal-50); color: var(--teal-ink); border-color: var(--teal-100); }
.label-evidence_reviewed, .label-officially_acknowledged { background: var(--info-bg); color: var(--info); border-color: #BFDBFE; }
.label-work_in_progress { background: var(--navy-50); color: var(--navy); border-color: #D3DEE8; }
.label-resolution_evidence, .label-verified_outcome { background: var(--success-bg); color: var(--success); border-color: #BBF7D0; }
.label-disputed { background: var(--error-bg); color: var(--error); border-color: #FECACA; }
.label-withdrawn { background: var(--light); color: var(--slate); }
.basis { display: inline-flex; align-items: center; gap: 4px; font: 600 .7rem/1.5 var(--font-body); text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--border); color: var(--slate); background: #fff; }
.basis-source { color: var(--success); border-color: #BBF7D0; background: var(--success-bg); }
.basis-report { color: var(--navy); border-color: #D3DEE8; background: var(--navy-50); }
.basis-estimate { color: var(--warning-ink); border-color: #FDE68A; background: var(--warning-bg); }
.basis-hypothesis { color: var(--slate); border-style: dashed; }
.basis-proposal { color: var(--teal-ink); border-color: var(--teal-100); background: var(--teal-50); }

/* ---------- alerts ---------- */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--border); background: var(--light); font-size: .93rem; }
.alert .icon { margin-top: 2px; }
.alert-info { background: var(--info-bg); border-color: #BFDBFE; color: #1E3A8A; }
.alert-success { background: var(--success-bg); border-color: #BBF7D0; color: #14532D; }
.alert-warning { background: var(--warning-bg); border-color: #FDE68A; color: #78350F; }
.alert-error { background: var(--error-bg); border-color: #FECACA; color: #7F1D1D; }
.alert-teal { background: var(--teal-50); border-color: var(--teal-100); color: var(--navy); }
.alert strong { display: block; margin-bottom: 2px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s4); }
.field > label, .label { font: 600 .88rem/1.3 var(--font-body); color: var(--navy); }
.field .hint { font-size: .82rem; color: var(--slate); }
.field .errorlist, .errorlist { list-style: none; padding: 0; margin: 0; color: var(--error); font-size: .84rem; font-weight: 500; }
.req::after { content: " *"; color: var(--error); }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url],
.field input[type=date], .field input[type=search], .field input[type=tel], .field select, .field textarea, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: var(--r);
  background: #fff; color: var(--charcoal); font: 400 .95rem/1.45 var(--font-body); transition: border-color .15s, box-shadow .15s;
}
.field textarea, textarea.input { min-height: 110px; resize: vertical; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--slate); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: var(--focus); }
.field input[aria-invalid=true], .field .has-error { border-color: var(--error); }
.field input[type=file] { padding: 9px; font-size: .88rem; border: 1px dashed var(--border-strong); border-radius: var(--r); width: 100%; background: var(--light); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal-ink); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--r); cursor: pointer; font-size: .9rem; font-weight: 500; transition: all .15s; height: 100%; }
.choice label:hover { border-color: var(--teal); }
.choice input:checked + label { border-color: var(--teal-ink); background: var(--teal-50); box-shadow: inset 0 0 0 1px var(--teal-ink); color: var(--navy); }
.choice input:focus-visible + label { box-shadow: var(--focus); }
.form-section { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); margin-bottom: var(--s5); background: #fff; }
.form-section > h3 { display: flex; align-items: center; gap: 10px; }
.form-section > h3 .step { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .8rem; display: inline-grid; place-items: center; }
.input-group { display: flex; gap: 8px; }
.input-group > * { flex: 1; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; }
.table th { text-align: left; font: 650 .76rem/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--slate); background: var(--light); padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFCFD; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: var(--s5); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 11px 15px; font: 600 .9rem/1 var(--font-body); color: var(--slate); border: 0; background: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; gap: 7px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--navy); }
.tabs .active, .tabs [aria-selected=true] { color: var(--navy); border-bottom-color: var(--teal); }
.pill-tabs { display: inline-flex; background: var(--light); border-radius: var(--r); padding: 3px; gap: 2px; }
.pill-tabs a, .pill-tabs button { padding: 7px 14px; border-radius: 8px; font: 600 .85rem/1 var(--font-body); color: var(--slate); border: 0; background: none; cursor: pointer; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.pill-tabs .active, .pill-tabs [aria-selected=true] { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }

/* ---------- stats ---------- */
.stat { padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-lg); background: #fff; }
.stat .k { font: 600 .8rem/1.3 var(--font-body); color: var(--slate); display: flex; align-items: center; gap: 8px; }
.stat .v { font: 700 1.75rem/1.1 var(--font-display); color: var(--navy); margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .8rem; color: var(--slate); margin-top: 4px; }
.stat-icon { width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--teal-50); color: var(--teal-ink); }
.meter { height: 8px; background: var(--light); border-radius: var(--r-full); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--teal); border-radius: var(--r-full); transition: width .4s var(--ease); }
.meter-navy > span { background: var(--navy); }

/* ---------- avatars ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 .8rem/1 var(--font-display); color: #fff; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-600) 100%); flex-shrink: 0; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.avatar-teal { background: linear-gradient(135deg, var(--teal-ink), var(--teal)); }
.avatar-lg { width: 64px; height: 64px; font-size: 1.2rem; }

/* ---------- empty states / skeleton ---------- */
.empty { text-align: center; padding: var(--s12) var(--s5); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: #fff; }
.empty .empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--teal-50); color: var(--teal-ink); display: grid; place-items: center; margin: 0 auto var(--s4); }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--slate); max-width: 440px; margin: 0 auto var(--s4); }
.skeleton { background: linear-gradient(90deg, var(--light) 25%, #E8EEF4 50%, var(--light) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
#page-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--teal); z-index: 2000; transition: width .25s var(--ease), opacity .3s; }
body.is-loading #page-progress { width: 70%; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 1500; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--navy); color: #fff; padding: 13px 15px; border-radius: var(--r); box-shadow: var(--shadow-lg); font-size: .9rem; animation: toast-in .3s var(--ease); }
.toast.toast-error { background: #7F1D1D; } .toast.toast-warning { background: #78350F; } .toast.toast-success { background: #14532D; }
.toast button { background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; margin-left: auto; padding: 0; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
@media (max-width: 860px) { .toasts { bottom: 84px; right: 16px; left: 16px; max-width: none; } }

/* =====================================================================
   PUBLIC SITE
   ===================================================================== */
.pub-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.pub-nav .inner { display: flex; align-items: center; gap: var(--s6); height: 72px; }
.brand-logo { height: 34px; width: auto; }
.pub-nav nav { display: flex; gap: 2px; margin-right: auto; }
.pub-nav nav a { padding: 8px 12px; border-radius: 8px; color: var(--navy); font-weight: 550; font-size: .93rem; text-decoration: none; }
.pub-nav nav a:hover, .pub-nav nav a.active { background: var(--light); }
.pub-nav .mobile-toggle { display: none; }
@media (max-width: 960px) {
  .pub-nav nav { display: none; }
  .pub-nav .mobile-toggle { display: inline-flex; margin-left: auto; }
  .pub-nav .desktop-cta { display: none; }
  .brand-logo { height: 28px; }
}
.mobile-menu { border-top: 1px solid var(--border); padding: var(--s3) var(--s5) var(--s5); background: #fff; }
.mobile-menu a { display: block; padding: 12px 4px; color: var(--navy); font-weight: 600; border-bottom: 1px solid var(--border); }

.hero { position: relative; overflow: hidden; padding: var(--s16) 0 var(--s12); background: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(600px 300px at 85% 10%, rgba(22,166,161,.10), transparent 70%),
  linear-gradient(180deg, #fff 0%, #fff 60%, var(--light) 100%); pointer-events: none; }
.hero .container { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s12); align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 750; letter-spacing: -.03em; line-height: 1.05; margin-bottom: var(--s5); }
.hero h1 .accent { color: var(--teal-ink); }
.hero .lead { font-size: 1.15rem; color: #3F4A5A; max-width: 560px; margin-bottom: var(--s6); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: var(--s6); margin-top: var(--s8); flex-wrap: wrap; color: var(--slate); font-size: .88rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-visual { position: relative; }
.hero-map { height: 420px; border-radius: var(--r-xl); border: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow: hidden; background: var(--light); }
.hero-float { position: absolute; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 14px 16px; font-size: .85rem; z-index: 500; max-width: 250px; }
.hero-float.f1 { left: -28px; bottom: 36px; }
.hero-float.f2 { right: -18px; top: 28px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero-float { display: none; } .hero-map { height: 320px; } .hero { padding-top: var(--s10); } }

.flow { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; counter-reset: flow; }
.flow-step { position: relative; text-align: center; padding: 16px 6px; border-radius: var(--r); background: #fff; border: 1px solid var(--border); font: 650 .82rem/1.2 var(--font-display); color: var(--navy); }
.flow-step .icon { margin: 0 auto 8px; color: var(--teal-ink); }
@media (max-width: 960px) { .flow { grid-template-columns: repeat(3, 1fr); } }

.feature { display: flex; flex-direction: column; gap: 10px; }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--navy); color: #fff; }
.feature-icon.teal { background: var(--teal-50); color: var(--teal-ink); }
.audience { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); background: #fff; }
.audience ul { padding-left: 18px; margin: 0; color: #3F4A5A; font-size: .92rem; }
.audience li + li { margin-top: 4px; }
.cta-band { background: var(--navy); color: #fff; border-radius: var(--r-xl); padding: var(--s12) var(--s10); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 40px solid rgba(22,166,161,.18); }
.cta-band h2 { color: #fff; font-size: 1.9rem; }
.cta-band p { color: #C9D6E2; max-width: 600px; }

.pub-footer { background: var(--navy-900); color: #B6C5D3; padding: var(--s12) 0 var(--s6); margin-top: var(--s16); font-size: .9rem; }
.pub-footer h4 { color: #fff; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: var(--s3); }
.pub-footer a { color: #D8E2EB; display: block; padding: 3px 0; }
.pub-footer a:hover { color: #fff; }
.pub-footer .fgrid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s8); }
.pub-footer .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: var(--s8); padding-top: var(--s5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s3); font-size: .82rem; }
@media (max-width: 860px) { .pub-footer .fgrid { grid-template-columns: 1fr 1fr; } }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--navy); color: #C9D6E2; padding: var(--s12); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; left: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 56px solid rgba(22,166,161,.16); }
.auth-side h2 { color: #fff; font-size: 2rem; max-width: 420px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: var(--s8) var(--s5); }
.auth-card { width: 100%; max-width: 440px; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* =====================================================================
   APP SHELL
   ===================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: var(--light); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--navy); color: #C9D6E2; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar .sb-brand { display: flex; align-items: center; height: var(--topbar-h); padding: 0 var(--s5); border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .sb-brand img { height: 26px; width: auto; }
.sb-section { padding: var(--s4) var(--s3) 0; }
.sb-title { font: 700 .68rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #7F97AD; padding: 0 var(--s3) var(--s2); }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #D3DEE8; font-size: .9rem; font-weight: 500; text-decoration: none !important; position: relative; }
.sb-link .icon { width: 17px; height: 17px; color: #9FB4C7; }
.sb-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-link:hover .icon { color: #fff; }
.sb-link.active { background: rgba(22,166,161,.16); color: #fff; }
.sb-link.active .icon { color: var(--teal); }
.sb-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal); }
.sb-count { margin-left: auto; background: var(--teal); color: var(--navy-900); font: 700 .7rem/1 var(--font-body); padding: 3px 7px; border-radius: var(--r-full); }
.sb-foot { margin-top: auto; padding: var(--s4); border-top: 1px solid rgba(255,255,255,.08); }
.sb-user { display: flex; gap: 10px; align-items: center; color: #fff; font-size: .88rem; }
.sb-user small { display: block; color: #9FB4C7; font-size: .75rem; }
.topbar { position: sticky; top: 0; z-index: 90; height: var(--topbar-h); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s6); }
.topbar .search { flex: 1; max-width: 520px; position: relative; }
.topbar .search input { width: 100%; height: 40px; border-radius: var(--r); border: 1px solid var(--border); background: var(--light); padding: 0 14px 0 40px; font: 400 .92rem var(--font-body); }
.topbar .search input:focus { outline: none; background: #fff; border-color: var(--teal); box-shadow: var(--focus); }
.topbar .search .icon { position: absolute; left: 13px; top: 11px; color: var(--slate); }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.bell { position: relative; }
.bell .dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--error); color: #fff; font: 700 .65rem/17px var(--font-body); text-align: center; padding: 0 4px; border: 2px solid #fff; }
.main { padding: var(--s6) var(--s6) var(--s12); max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s6); flex-wrap: wrap; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--slate); }
.breadcrumbs { display: flex; gap: 6px; align-items: center; font-size: .82rem; color: var(--slate); margin-bottom: 8px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--slate); }
.bottom-nav { display: none; }
.drawer-backdrop { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 300; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .drawer-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(14,35,53,.45); z-index: 250; }
  .topbar { padding: 0 var(--s4); }
  .topbar .search { display: none; }
  .main { padding: var(--s4) var(--s4) 110px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: 68px; background: #fff; border-top: 1px solid var(--border); z-index: 200; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 600 .68rem/1 var(--font-body); color: var(--slate); text-decoration: none; }
  .bottom-nav a.active { color: var(--navy); }
  .bottom-nav a.active .icon { color: var(--teal-ink); }
  .bottom-nav .fab { width: 50px; height: 50px; border-radius: 16px; background: var(--teal-ink); color: #fff; display: grid; place-items: center; margin: -22px auto 0; box-shadow: 0 6px 18px rgba(14,124,120,.35); }
}

/* ---------- report components ---------- */
.report-card { display: flex; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); color: inherit; transition: border-color .15s, box-shadow .15s; }
.report-card:hover { border-color: var(--teal); box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.report-card .thumb { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--light); display: grid; place-items: center; color: var(--slate); }
.report-card .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.report-card h3 { font-size: 1rem; margin-bottom: 4px; }
.report-card .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8rem; color: var(--slate); align-items: center; }
.report-card .meta span { display: inline-flex; gap: 4px; align-items: center; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; font: 600 .78rem/1 var(--font-body); color: var(--navy); }
.cat-chip .dot { width: 22px; height: 22px; border-radius: 7px; background: var(--navy-50); display: grid; place-items: center; }
.cat-chip .dot .icon { width: 13px; height: 13px; color: var(--navy); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery a, .gallery .file { display: block; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4/3; background: var(--light); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .file { display: grid; place-items: center; text-align: center; padding: 10px; font-size: .8rem; color: var(--slate); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: .9rem; }
.kv dt { color: var(--slate); }
.kv dd { margin: 0; color: var(--charcoal); font-weight: 500; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 8px; } }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 18px 36px; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--border-strong); }
.timeline li.done::before { border-color: var(--teal); background: var(--teal); }
.timeline li.current::before { border-color: var(--navy); }
.timeline li strong { color: var(--navy); display: block; }
.evidence-meter { display: flex; align-items: center; gap: 10px; }
.evidence-meter .meter { flex: 1; }

/* analysis */
.analysis-section { padding: var(--s5) 0; border-top: 1px solid var(--border); }
.analysis-section:first-child { border-top: 0; padding-top: 0; }
.analysis-section h3 { display: flex; align-items: center; gap: 9px; }
.analysis-section h3 .num { font: 700 .72rem/1 var(--font-mono); color: var(--teal-ink); background: var(--teal-50); padding: 4px 6px; border-radius: 5px; }
.claim { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.claim + .claim { border-top: 1px dashed var(--border); }
.solution { border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; background: #fff; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; font-size: .86rem; }
.pros-cons ul { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 600px) { .pros-cons { grid-template-columns: 1fr; } }
.rating { display: inline-flex; gap: 3px; }
.rating i { width: 10px; height: 10px; border-radius: 3px; background: var(--border); display: inline-block; }
.rating.r-low i:nth-child(-n+1), .rating.r-medium i:nth-child(-n+2), .rating.r-high i:nth-child(-n+3) { background: var(--teal); }

/* map */
.map { width: 100%; height: 100%; min-height: 360px; border-radius: var(--r-lg); background: var(--light); z-index: 1; }
.map-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 0; height: calc(100vh - var(--topbar-h) - 48px); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.map-layout .map { border-radius: 0; min-height: 0; }
.map-list { overflow-y: auto; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.map-list .filters { padding: 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 2; }
.map-list .items { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 960px) { .map-layout { grid-template-columns: 1fr; height: auto; } .map-layout .map { height: 360px; } .map-list { border-right: 0; border-top: 1px solid var(--border); order: 2; } }
.sp-marker { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--navy); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); display: grid; place-items: center; }
.sp-marker svg { transform: rotate(45deg); width: 14px; height: 14px; color: #fff; stroke: #fff; }
.sp-marker.t-opportunity, .sp-marker.t-asset, .sp-marker.t-idea, .sp-marker.t-success { background: var(--teal-ink); }
.sp-marker.t-proposal { background: var(--navy-600); }
.sp-marker.demo { border-style: dashed; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(22,166,161,.25) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--navy) !important; color: #fff !important; font: 700 .78rem var(--font-body) !important; }
.map-legend { position: absolute; bottom: 14px; left: 14px; z-index: 500; background: #fff; border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; font-size: .78rem; box-shadow: var(--shadow); }
.map-legend div { display: flex; gap: 8px; align-items: center; margin: 2px 0; }
.map-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border-strong); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper { border-radius: var(--r); }
.leaflet-popup-content { margin: 12px 14px; font-size: .88rem; }
.map-fallback { display: grid; place-items: center; height: 100%; min-height: 300px; color: var(--slate); text-align: center; padding: 20px; }

/* finance */
.fin-table td input { width: 100%; min-height: 36px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; font: inherit; }
.scenario { border: 1px solid var(--border); border-radius: var(--r); padding: 14px; background: #fff; }
.scenario.base { border-color: var(--navy); box-shadow: inset 0 3px 0 var(--navy); }
.chart-box { position: relative; height: 280px; }

/* print */
@media print {
  .sidebar, .topbar, .bottom-nav, .no-print, .toasts, .pub-nav, .pub-footer { display: none !important; }
  .app { display: block; background: #fff; }
  .main { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
gmp-place-autocomplete { width: 100%; display: block; color-scheme: light; }

/* Sign in with Google */
.google-signin { display: flex; justify-content: center; min-height: 44px; margin-bottom: var(--s4); }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--slate); font-size: .82rem; margin: 0 0 var(--s5); }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Country -> state -> local area picker */
.geo-picker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.geo-picker select[hidden] { display: none; }
.geo-picker.is-loading { opacity: .7; }
.geo-filter { display: grid; gap: 4px; }
.geo-filter-stack .geo-picker-grid { grid-template-columns: 1fr; gap: 6px; }
