/* =========================================================
   RoadWatch Perth County — frontend prototype
   ========================================================= */

:root {
  --navy-950: #071526;
  --navy-900: #0B2036;
  --navy-800: #11304F;
  --navy-700: #1A4068;
  --navy-600: #2C5A8A;
  --navy-100: #E4EBF3;
  --navy-50:  #F1F5FA;

  --ink: #0E1A28;
  --text: #2A3747;
  --muted: #5F6C7C;
  --faint: #8C97A5;
  --line: #DCE2E9;
  --line-2: #EAEEF2;
  --bg: #F3F5F8;
  --surface: #FFFFFF;

  --orange: #E2680A;
  --orange-700: #B85205;
  --orange-50: #FFF3E7;
  --red: #C42B2F;
  --red-700: #A11F23;
  --red-50: #FCECEC;
  --green: #1C8550;
  --green-700: #156A3F;
  --green-50: #E7F4EC;
  --slate: #5B7089;
  --slate-50: #EEF2F6;

  --r: 10px;
  --r-sm: 6px;
  --shadow-1: 0 1px 2px rgba(11, 32, 54, .06), 0 1px 3px rgba(11, 32, 54, .07);
  --shadow-2: 0 4px 14px rgba(11, 32, 54, .10), 0 1px 3px rgba(11, 32, 54, .08);
  --shadow-3: 0 18px 50px rgba(11, 32, 54, .22);

  --hdr-h: 60px;
  --panel-w: 420px;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
body.modal-open { overflow: hidden; }
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--navy-600); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(226, 104, 10, .45); outline-offset: 2px; }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 2000; background: #fff; padding: 8px 12px; border-radius: 6px; }
.skip:focus { top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.btn-primary:hover { background: var(--orange-700); }
.btn-primary:disabled { background: #E9C9AE; cursor: not-allowed; }
.btn-navy { background: var(--navy-900); color: #fff; }
.btn-navy:hover { background: var(--navy-800); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #C5CEDA; background: var(--navy-50); }
.btn.is-loading { pointer-events: none; }
.btn.is-loading::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-ghost.is-loading::before { border-color: var(--line); border-top-color: var(--navy-700); }

.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; flex: none;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text);
}
.icon-btn:hover { background: var(--navy-50); }
.icon-btn.spinning .ic { animation: spin .8s linear infinite; }

/* ---------- Header ---------- */
.hdr { flex: none; height: var(--hdr-h); background: var(--navy-900); color: #fff; position: relative; z-index: 1100; }
.hdr-in { height: 100%; display: flex; align-items: center; gap: 28px; padding: 0 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: none; }
.brand-mark { width: 32px; height: 32px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.brand-txt span { font-size: 11.5px; color: #9FB3C9; font-weight: 500; letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 4px; height: 100%; }
.nav a, .nav button {
  height: 100%; display: inline-flex; align-items: center; padding: 0 12px;
  color: #C7D4E2; text-decoration: none; font-size: 14px; font-weight: 600;
  background: none; border: 0; border-bottom: 2px solid transparent; border-top: 2px solid transparent;
}
.nav a:hover, .nav button:hover { color: #fff; }
.nav a.is-active { color: #fff; border-bottom-color: var(--orange); }

.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.proto-pill { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9FB3C9; border: 1px solid #2A4767; padding: 3px 8px; border-radius: 4px; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid #2A4767; background: transparent; color: #fff; place-items: center; }
.menu-btn .ic { width: 20px; height: 20px; }

/* ---------- Demo bar ---------- */
.demo-bar {
  flex: none; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 20px;
  background: #FFF6EC; border-bottom: 1px solid #F3DCC3; color: #6B4A22; font-size: 13px;
}
.demo-tag { flex: none; background: var(--orange); color: #fff; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 2px 7px; border-radius: 3px; }
.demo-short { display: none; }
.demo-bar a { margin-left: auto; color: #8A4F0C; font-weight: 600; text-decoration: none; white-space: nowrap; }
.demo-bar a:hover { text-decoration: underline; }

/* =========================================================
   MAP VIEW (desktop: side panel + map)
   ========================================================= */
.view { flex: 1; min-height: 0; }
.mapview {
  display: grid;
  grid-template-columns: var(--panel-w) 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "toolbar map" "sheet map";
  position: relative;
}
.toolbar { grid-area: toolbar; background: #fff; border-right: 1px solid var(--line); padding: 16px 16px 12px; position: relative; z-index: 20; }
.sheet { grid-area: sheet; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 10; }
.map-wrap { grid-area: map; position: relative; min-width: 0; }
#map { position: absolute; inset: 0; background: #E9ECEF; }

/* Search */
.search { position: relative; }
.search input {
  width: 100%; height: 44px; padding: 0 40px 0 42px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); font-size: 15px; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; background: #fff; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(44, 90, 138, .15); }
.search-ic { position: absolute; left: 14px; top: 13px; color: var(--muted); pointer-events: none; }
.search-clear { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.search-clear:hover { background: var(--line-2); }

.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-3);
  padding: 6px; max-height: 320px; overflow-y: auto;
}
.sg-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 10px 4px; }
.sg-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; }
.sg-item .ic { color: var(--muted); }
.sg-item b { display: block; font-weight: 600; color: var(--ink); font-size: 14px; }
.sg-item small { display: block; color: var(--muted); font-size: 12px; }
.sg-item:hover, .sg-item.is-active { background: var(--navy-50); }
.sg-empty { padding: 14px 10px; color: var(--muted); font-size: 14px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 11px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .12s, border-color .12s;
}
.chip .ic { width: 15px; height: 15px; color: var(--muted); }
.chip .n { font-size: 11px; font-weight: 700; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--line-2); color: var(--muted); display: inline-grid; place-items: center; }
.chip:hover { border-color: #C3CCD8; background: var(--navy-50); }
.chip[aria-pressed="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.chip[aria-pressed="true"] .ic { color: #fff; }
.chip[aria-pressed="true"] .n { background: rgba(255,255,255,.16); color: #fff; }

/* Sheet head */
.sheet-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--line-2); flex: none; }
.grabber { display: none; }
.sh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sh-title { font-size: 16px; font-weight: 700; }
.sh-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(28, 133, 80, .18); flex: none; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.sheet.has-detail .stats { display: none; }
.stat { border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 9px; background: #fff; min-width: 0; }
.stat b { display: block; font-size: 19px; font-weight: 700; line-height: 1.1; color: var(--c, var(--ink)); }
.stat span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.sk b { width: 24px; height: 20px; }
.stat.sk span { width: 70%; height: 10px; margin-top: 4px; }

.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-fab { display: none; }

/* List controls */
.list-controls { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: #fff; z-index: 2; }
.seg { display: inline-flex; background: var(--bg); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; height: 28px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.sort { margin-left: auto; position: relative; display: inline-flex; align-items: center; }
.sort select { -webkit-appearance: none; appearance: none; border: 1px solid var(--line); background: #fff; height: 34px; padding: 0 28px 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.sort .ic { position: absolute; right: 8px; width: 14px; height: 14px; pointer-events: none; color: var(--muted); }

/* Priority alert */
.alert-strip {
  display: flex; align-items: center; gap: 10px; margin: 12px 16px 4px; padding: 10px 12px;
  border-radius: 8px; background: var(--red-50); border: 1px solid #F2C9CA; color: var(--red-700);
  text-decoration: none; font-size: 13px;
}
.alert-strip .ic { color: var(--red); }
.alert-strip b { color: var(--ink); font-weight: 700; }
.alert-strip .chev { margin-left: auto; width: 16px; height: 16px; }
.alert-strip:hover { border-color: #E7A9AB; }

/* Report row/card */
.rcard {
  --tone: var(--slate); --tone-50: var(--slate-50);
  display: grid; grid-template-columns: 40px 1fr; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-2);
  color: inherit; text-decoration: none; position: relative; background: #fff;
  transition: background .12s;
}
.rcard:hover { background: #F8FAFC; }
.rcard.is-sel { background: var(--navy-50); box-shadow: inset 3px 0 0 var(--orange); }
.rcard.is-cleared { opacity: .78; }
.tone-red    { --tone: var(--red);    --tone-50: var(--red-50); }
.tone-orange { --tone: var(--orange); --tone-50: var(--orange-50); }
.tone-slate  { --tone: var(--slate);  --tone-50: var(--slate-50); }
.tone-green  { --tone: var(--green);  --tone-50: var(--green-50); }

.type-ic { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: var(--tone-50); color: var(--tone); position: relative; }
.type-ic .ic { width: 21px; height: 21px; }
.is-official .type-ic::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 2px;
  background: var(--navy-900); transform: rotate(45deg);
  border: 2px solid #fff;
}
.rc-main { min-width: 0; display: block; }
.rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rc-type { font-weight: 700; color: var(--ink); font-size: 14.5px; line-height: 1.3; }
.rc-road { display: block; font-size: 14px; color: var(--text); font-weight: 500; margin-top: 2px; }
.rc-loc { display: block; font-size: 13px; color: var(--muted); }
.rc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 9px; font-size: 12.5px; color: var(--muted); }
.rc-meta > span:not(.badge) { display: inline-flex; align-items: center; gap: 4px; }
.rc-meta .ic { width: 14px; height: 14px; }
.rc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--faint); }
.conf { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; white-space: nowrap; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; letter-spacing: .01em; flex: none; }
.badge .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.src-official { background: var(--navy-900); color: #fff; }
.src-community { background: #fff; color: var(--navy-800); box-shadow: inset 0 0 0 1px #CBD4DF; }
.st-official   { background: var(--navy-100); color: var(--navy-800); }
.st-unverified { background: #F1F3F6; color: var(--muted); box-shadow: inset 0 0 0 1px #DFE4EA; }
.st-confirmed  { background: var(--orange-50); color: var(--orange-700); }
.st-improving  { background: var(--green-50); color: var(--green-700); }
.st-cleared    { background: var(--green); color: #fff; }
.demo-chip { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8A4F0C; background: #FFF1E1; padding: 2px 5px; border-radius: 3px; }

/* Confidence meter */
.meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.meter i { width: 4px; border-radius: 1px; background: #D5DCE4; }
.meter i:nth-child(1) { height: 5px; } .meter i:nth-child(2) { height: 8px; } .meter i:nth-child(3) { height: 12px; }
.meter.m1 i:nth-child(-n+1), .meter.m2 i:nth-child(-n+2), .meter.m3 i { background: var(--navy-600); }

/* Skeleton */
.sk-card { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line-2); }
.sk, .sk b, .sk span, .sk-box, .sk-line { background: linear-gradient(90deg, #EDF0F4 0%, #F6F8FA 40%, #EDF0F4 80%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: 4px; }
.stat.sk { background: #fff; animation: none; }
.sk-box { width: 40px; height: 40px; border-radius: 9px; }
.sk-line { height: 11px; margin-bottom: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Empty / error */
.empty { padding: 48px 28px; text-align: center; }
.empty-ic { width: 52px; height: 52px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--bg); color: var(--muted); margin-bottom: 12px; }
.empty-ic .ic { width: 24px; height: 24px; }
.empty h3 { font-size: 15px; }
.empty p { font-size: 13.5px; color: var(--muted); margin: 6px auto 16px; max-width: 300px; }
.list-foot { padding: 14px 16px 24px; font-size: 12px; color: var(--faint); text-align: center; }

/* ---------- Detail view ---------- */
.dv { padding-bottom: 28px; }
.dv-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 8px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: #fff; z-index: 2; }
.back-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; font-weight: 600; font-size: 14px; color: var(--navy-700); padding: 6px 8px; border-radius: 6px; }
.back-btn:hover { background: var(--navy-50); }
.dv-bar-r { display: flex; gap: 6px; }
.dv-head { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 18px 16px 6px; }
.dv-head .type-ic { width: 48px; height: 48px; border-radius: 11px; }
.dv-head .type-ic .ic { width: 25px; height: 25px; }
.dv-type { font-size: 13px; font-weight: 700; color: var(--tone); text-transform: uppercase; letter-spacing: .04em; }
.dv-road { font-size: 20px; font-weight: 700; margin-top: 2px; }
.dv-loc { font-size: 14px; color: var(--muted); margin-top: 2px; }
.dv-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
.dv-agency { margin: 14px 16px 0; padding: 10px 12px; border-radius: 8px; background: var(--navy-50); border: 1px solid var(--navy-100); font-size: 13px; color: var(--navy-800); display: flex; gap: 8px; align-items: flex-start; }
.dv-agency .ic { margin-top: 1px; color: var(--navy-700); }
.facts { display: grid; grid-template-columns: 1fr 1fr; margin: 16px 16px 0; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.facts div { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.facts div:nth-child(odd) { border-right: 1px solid var(--line-2); }
.facts div:nth-last-child(-n+2) { border-bottom: 0; }
.facts dt { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.facts dd small { font-weight: 400; color: var(--muted); font-size: 12px; }
.dv-expiry { margin: 10px 16px 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.dv-expiry .ic { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.dv-expiry b { color: var(--ink); font-weight: 600; }
.dv-remove { margin: 18px 16px 0; color: var(--red-700); }
.dv-remove:hover { border-color: #E7A9AB; background: var(--red-50); }
.dv-desc { margin: 16px 16px 0; font-size: 14.5px; color: var(--text); }
.dv-photo { margin: 16px 16px 0; }
.dv-photo button { display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; position: relative; background: var(--bg); cursor: zoom-in; }
.dv-photo img { display: block; width: 100%; height: 220px; object-fit: cover; }
.ph-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; background: rgba(7,21,38,.78); color: #fff; font-size: 12.5px; font-weight: 600; }
.ph-count .ic { width: 15px; height: 15px; }
.dv-photo figcaption { margin-top: 6px; font-size: 12px; color: var(--faint); }
.dv-photo figcaption a, .lightbox figcaption a { color: inherit; }
.h-count { font-size: 11px; font-weight: 700; color: var(--navy-700); background: var(--navy-100); padding: 1px 7px; border-radius: 999px; margin-left: 6px; letter-spacing: 0; text-transform: none; vertical-align: 1px; }

/* card thumbnail */
.rc-mid { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.rc-where { min-width: 0; }
.rc-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; margin-top: 4px; background: var(--bg); box-shadow: 0 0 0 1px var(--line-2); }

/* timeline extras */
.t-text { display: block; }
.t-note { display: block; margin-top: 4px; padding: 6px 10px; border-left: 3px solid var(--line); background: var(--bg); border-radius: 0 6px 6px 0; color: var(--ink); font-size: 13.5px; quotes: none; }
.t-mine .t-note { border-left-color: var(--orange); }
.t-photo { position: relative; display: block; margin-top: 8px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; width: 120px; height: 84px; cursor: zoom-in; background: var(--bg); }
.t-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.t-photo:hover img { transform: scale(1.05); }
.t-photo .ic { position: absolute; right: 5px; bottom: 5px; width: 20px; height: 20px; padding: 3px; border-radius: 4px; background: rgba(7,21,38,.7); color: #fff; }

/* update composer */
.add-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 0; border: 0; background: none; color: var(--navy-700); font-size: 13.5px; font-weight: 600; }
.add-note .ic { width: 16px; height: 16px; }
.add-note:hover { text-decoration: underline; }
.composer { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.cmp-vote { background: #fff; box-shadow: inset 0 0 0 1px var(--line); width: 100%; }
.cmp-vote button { flex: 1; }
.cmp-vote button[aria-checked="true"] { background: var(--navy-900); color: #fff; }
.composer textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 15px; resize: vertical; background: #fff; color: var(--ink); }
.composer textarea:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(44,90,138,.15); }
.cmp-row { display: flex; align-items: center; gap: 10px; }
.cmp-row .btn { margin-left: auto; }
.cmp-photo { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1.5px dashed #C6CFDA; border-radius: 8px; background: #fff; font-size: 13.5px; font-weight: 600; color: var(--navy-700); cursor: pointer; }
.cmp-photo:hover { border-color: var(--navy-600); }
.cmp-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cmp-photo .ic { width: 17px; height: 17px; }
.cmp-preview { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; }
.cmp-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp-remove { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(7,21,38,.8); color: #fff; display: grid; place-items: center; padding: 0; }
.cmp-remove .ic { width: 12px; height: 12px; stroke-width: 2.6; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 3500; background: rgba(5, 14, 26, .92); display: flex; align-items: center; justify-content: center; padding: 56px 72px 24px; animation: fade .18s; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 170px); border-radius: 6px; object-fit: contain; }
.lightbox figcaption { margin-top: 12px; color: #B9C6D4; font-size: 13px; text-align: center; max-width: 640px; display: grid; gap: 4px; }
.lightbox figcaption q { color: #fff; font-size: 15px; quotes: "“" "”"; }
.lb-close, .lb-nav { position: absolute; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 12px; right: 12px; width: 42px; height: 42px; }
.lb-nav { top: 50%; width: 46px; height: 46px; transform: translateY(-50%); }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-nav .ic, .lb-close .ic { width: 22px; height: 22px; }
.vote { margin: 18px 16px 0; padding: 14px; border-radius: 10px; background: var(--bg); }
.vote p { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.vote p b { color: var(--ink); display: block; font-size: 14px; margin-bottom: 2px; }
.vote-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vote-btns .btn { width: 100%; }
.vote-done { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--green-700); }
.dv h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 16px 10px; }
.timeline { list-style: none; margin: 0 16px; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid var(--slate); }
.timeline li.t-official::before { background: var(--navy-900); border-color: var(--navy-900); border-radius: 2px; transform: rotate(45deg); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline time { display: block; font-size: 12px; color: var(--faint); }
.dv-note { margin: 10px 16px 0; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; }
.dv-note .ic { width: 16px; height: 16px; margin-top: 1px; }

/* ---------- Map overlays ---------- */
.map-loader { position: absolute; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(243, 245, 248, .85); font-size: 14px; color: var(--muted); font-weight: 600; transition: opacity .3s; }
.map-loader.is-done { opacity: 0; pointer-events: none; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--navy-700); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-badge { position: absolute; top: 14px; left: 14px; z-index: 450; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; font-size: 12px; color: var(--muted); box-shadow: var(--shadow-1); display: flex; gap: 6px; align-items: center; }
.map-badge b { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: #fff; background: var(--orange); padding: 1px 6px; border-radius: 3px; }

.map-ctrls { position: absolute; top: 14px; right: 14px; z-index: 450; display: flex; flex-direction: column; gap: 8px; }
.ctrl-stack { display: flex; flex-direction: column; background: #fff; border-radius: 8px; box-shadow: var(--shadow-2); overflow: hidden; border: 1px solid var(--line); }
.ctrl-stack button { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: #fff; color: var(--ink); }
.ctrl-stack button + button { border-top: 1px solid var(--line-2); }
.ctrl-stack button:hover { background: var(--navy-50); }
.ctrl-stack button[aria-expanded="true"] { color: var(--orange); }

.legend { position: absolute; left: 14px; bottom: 28px; z-index: 450; background: #fff; border-radius: 10px; box-shadow: var(--shadow-2); border: 1px solid var(--line); padding: 12px 14px; font-size: 12.5px; width: 200px; }
.legend.is-closed { display: none; }
.lg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lg-head strong { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lg-close { border: 0; background: none; padding: 2px; color: var(--muted); display: grid; }
.lg-close .ic { width: 15px; height: 15px; }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legend ul + ul { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.legend li { display: flex; align-items: center; gap: 9px; color: var(--text); }
.lg-mk { --c: var(--slate); width: 16px; height: 16px; display: inline-block; flex: none; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--navy-900); }
.lg-community { border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.lg-official { transform: rotate(45deg) scale(.85); border-radius: 2px; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; margin: 0 3px; }

/* Leaflet tweaks */
.leaflet-container { font-family: var(--font); }
.leaflet-tile-pane { filter: saturate(.6) contrast(.96) brightness(1.02); }
.leaflet-control-attribution { font-size: 10.5px; background: rgba(255,255,255,.85) !important; }
.leaflet-control-attribution a { color: var(--navy-700); }

/* Markers */
.rw-mk { background: none; border: 0; }
.mk { --tone: var(--slate); width: 36px; height: 36px; position: relative; display: grid; place-items: center; transition: transform .15s; }
.mk-shape { position: absolute; inset: 5px; border-radius: 50%; background: var(--tone); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(11,32,54,.35), 0 0 0 1px rgba(0,0,0,.08); }
.mk-official .mk-shape { inset: 7px; border-radius: 4px; transform: rotate(45deg); box-shadow: 0 2px 6px rgba(11,32,54,.35), 0 0 0 2px var(--navy-900); }
.mk .ic { position: relative; width: 15px; height: 15px; color: #fff; stroke-width: 2.3; }
.mk.tone-red { --tone: var(--red); } .mk.tone-orange { --tone: var(--orange); } .mk.tone-green { --tone: var(--green); } .mk.tone-slate { --tone: var(--slate); }
.rw-mk.is-hover .mk { transform: scale(1.18); }
.mk.is-sel { transform: scale(1.3); }
.mk.is-sel::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--tone); opacity: .6; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(.7); opacity: .7; } to { transform: scale(1.35); opacity: 0; } }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2B7BD6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(43,123,214,.2), 0 1px 4px rgba(0,0,0,.3); }

/* =========================================================
   HOW IT WORKS
   ========================================================= */
.howview { overflow-y: auto; background: #fff; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.how-intro { padding: 48px 0 32px; max-width: 760px; }
.eyebrow { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--orange-700); margin-bottom: 10px; }
.how-intro h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.lead { font-size: 16.5px; color: var(--muted); margin-top: 14px; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.how-steps article { padding: 22px; background: #fff; }
.how-steps article + article { border-left: 1px solid var(--line); }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--navy-900); color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.how-steps h2 { font-size: 16px; margin-bottom: 6px; }
.how-steps p { font-size: 14px; color: var(--muted); }
.how-block { padding: 40px 0 0; }
.how-block > h2 { font-size: 20px; margin-bottom: 16px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp { border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.cmp-official { border-color: #BFCCDB; background: var(--navy-50); }
.cmp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cmp h3 { font-size: 16px; margin-bottom: 6px; }
.cmp p { font-size: 14px; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: 13.5px; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 6px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.status-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.status-table [role="row"] { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; padding: 12px 18px; font-size: 14px; }
.status-table [role="row"] + [role="row"] { border-top: 1px solid var(--line-2); }
.conf-legend { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.conf-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.safety { margin-top: 40px; display: flex; gap: 16px; padding: 20px 22px; border-radius: 12px; background: #FFF6EC; border: 1px solid #F3DCC3; }
.safety > .ic { width: 28px; height: 28px; color: var(--orange-700); }
.safety h2 { font-size: 16px; margin-bottom: 4px; }
.safety p { font-size: 14px; color: #5C4426; }
.safety a { color: #8A4F0C; font-weight: 600; }
.partners { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.partners > div { max-width: 640px; }
.partners h2 { font-size: 20px; margin-bottom: 8px; }
.partners p { color: var(--muted); font-size: 14.5px; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq details:first-of-type { border-top: 1px solid var(--line-2); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; font-weight: 600; color: var(--ink); cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--muted); transition: transform .2s; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { padding: 0 0 16px; color: var(--muted); font-size: 14.5px; max-width: 720px; }
.ftr { margin-top: 56px; background: var(--navy-950); color: #9FB3C9; padding: 28px 0 32px; font-size: 13px; }
.ftr-in { display: grid; gap: 10px; }
.ftr a { color: #C7D4E2; }
.ftr-small { font-size: 12px; color: #7790AA; }

/* =========================================================
   REPORT MODAL
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(7, 21, 38, .55); animation: fade .2s; }
.modal-dialog {
  position: relative; width: 100%; max-width: 580px; max-height: calc(100dvh - 48px);
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-3); display: flex; flex-direction: column;
  animation: rise .22s ease-out;
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px 14px; }
.modal-step { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--orange-700); }
.modal-head h2 { font-size: 19px; margin-top: 3px; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 22px; }
.progress span { height: 3px; border-radius: 2px; background: var(--line-2); transition: background .2s; }
.progress span.on { background: var(--orange); }
.modal-body { flex: 1; overflow-y: auto; padding: 18px 22px 8px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px 18px; border-top: 1px solid var(--line-2); }
.safety-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.safety-note .ic { width: 16px; height: 16px; color: var(--orange-700); }
.modal-actions { display: flex; gap: 8px; margin-left: auto; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.type-opt { position: relative; }
.type-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.type-opt span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 96px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.25; transition: border-color .12s, background .12s;
}
.type-opt .ic { width: 26px; height: 26px; color: var(--tone, var(--navy-700)); }
.type-opt:hover span { border-color: #BFC9D6; background: var(--navy-50); }
.type-opt input:checked + span { border-color: var(--orange); background: var(--orange-50); box-shadow: inset 0 0 0 1px var(--orange); }
.type-opt input:focus-visible + span { outline: 3px solid rgba(226,104,10,.45); outline-offset: 2px; }

.mini-map-wrap { position: relative; height: 210px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
#miniMap { position: absolute; inset: 0; }
.mini-pin { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -100%); z-index: 500; fill: var(--orange); stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); pointer-events: none; }
.mini-pin circle { fill: #fff; stroke: none; }
.mini-hint { position: absolute; left: 10px; top: 10px; z-index: 500; background: rgba(11,32,54,.85); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 5px; pointer-events: none; }
.mini-locate { position: absolute; right: 10px; top: 10px; z-index: 500; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-1); }
.mini-locate .ic { width: 15px; height: 15px; }
.town-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.town-chips::-webkit-scrollbar { display: none; }
.town-chips button { flex: none; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text); }
.town-chips button:hover { background: var(--navy-50); }

.field { margin-top: 16px; }
.field label, .field legend, .field .label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; padding: 0; }
.req, .opt { font-size: 11px; font-weight: 600; color: var(--faint); }
.req { color: var(--orange-700); }
.field input:not([type="radio"]):not([type="file"]), .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 15px; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(44,90,138,.15); }
.field textarea { resize: vertical; min-height: 80px; }
.field.has-err input { border-color: var(--red); box-shadow: 0 0 0 3px rgba(196,43,47,.12); }
.field-err { color: var(--red); font-size: 12.5px; margin-top: 6px; }
.counter { text-align: right; font-size: 12px; color: var(--faint); margin-top: 4px; }

.sev { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sev label { display: block; position: relative; margin: 0; }
.sev input { position: absolute; opacity: 0; }
.sev span { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--muted); font-weight: 500; cursor: pointer; }
.sev b { display: block; font-size: 14px; color: var(--ink); }
.sev label:nth-child(1) input:checked + span { border-color: var(--slate); background: var(--slate-50); box-shadow: inset 0 0 0 1px var(--slate); }
.sev label:nth-child(2) input:checked + span { border-color: var(--orange); background: var(--orange-50); box-shadow: inset 0 0 0 1px var(--orange); }
.sev label:nth-child(3) input:checked + span { border-color: var(--red); background: var(--red-50); box-shadow: inset 0 0 0 1px var(--red); }
.sev input:focus-visible + span { outline: 3px solid rgba(226,104,10,.45); outline-offset: 2px; }

.photo-drop { display: flex !important; align-items: center; gap: 12px; padding: 14px; border: 1.5px dashed #C6CFDA; border-radius: 10px; cursor: pointer; position: relative; margin: 0 !important; font-weight: 400 !important; }
.photo-drop:hover { border-color: var(--navy-600); background: var(--navy-50); }
.photo-drop input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.photo-drop .ic { width: 24px; height: 24px; color: var(--navy-700); }
.photo-drop span { font-size: 12.5px; color: var(--muted); }
.photo-drop b { display: block; font-size: 14px; color: var(--ink); }
.photo-preview { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.photo-preview img { display: block; width: 100%; max-height: 200px; object-fit: cover; }
.photo-preview .icon-btn { position: absolute; top: 8px; right: 8px; }
.summary { margin-top: 16px; padding: 10px 12px; border-radius: 8px; background: var(--bg); font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.summary .type-ic { width: 32px; height: 32px; border-radius: 7px; }
.summary .type-ic .ic { width: 17px; height: 17px; }
.summary b { color: var(--ink); display: block; font-size: 13.5px; }

.step-done { text-align: center; padding: 18px 8px 10px; }
.done-ic { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--green-50); color: var(--green); margin-bottom: 14px; }
.done-ic .ic { width: 28px; height: 28px; stroke-width: 2.4; }
.step-done h3 { font-size: 18px; }
.step-done p { color: var(--muted); font-size: 14.5px; margin: 8px auto 0; max-width: 400px; }
.done-demo { font-size: 12.5px !important; color: var(--faint) !important; }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 4000; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--navy-900); color: #fff; padding: 11px 16px; border-radius: 8px; font-size: 14px; box-shadow: var(--shadow-3); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; display: flex; align-items: center; gap: 8px; }
.toast .ic { color: #7FD3A4; }
.toast.in { opacity: 1; transform: none; }

/* =========================================================
   ACCOUNTS
   ========================================================= */
.account { position: relative; }
.btn-outline-light { background: transparent; border-color: #34557A; color: #fff; height: 38px; }
.btn-outline-light:hover { background: rgba(255,255,255,.08); }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border-radius: 999px; border: 1px solid #2A4767; background: transparent; color: #fff; font-weight: 600; font-size: 14px; }
.acct-btn:hover { background: rgba(255,255,255,.06); }
.acct-btn .ic { width: 15px; height: 15px; color: #9FB3C9; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.acct-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: #fff; color: var(--text); border-radius: 10px; box-shadow: var(--shadow-3); border: 1px solid var(--line); padding: 6px; z-index: 1200; }
.acct-who { padding: 10px 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.acct-who b { display: block; color: var(--ink); }
.acct-who small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.acct-menu a, .acct-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 6px; font-size: 14px; color: var(--ink); text-decoration: none; text-align: left; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--navy-50); }
.acct-menu .ic { color: var(--muted); }
.role-tag { display: inline-block; margin-top: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--navy-800); background: var(--navy-100); padding: 2px 6px; border-radius: 3px; }
time .role-tag { margin: 0 0 0 4px; vertical-align: 1px; }
.nav-account { display: none; }

.modal-sm .modal-dialog { max-width: 440px; }
.auth-lead { font-size: 14px; color: var(--muted); }
.auth-submit { width: 100%; height: 46px; margin-top: 18px; font-size: 15px; }
.auth-small { margin-top: 12px; font-size: 12px; color: var(--faint); text-align: center; }
.auth-sent { text-align: center; padding-bottom: 24px; }
.auth-sent h3 { font-size: 18px; }
.auth-sent p { color: var(--muted); font-size: 14.5px; margin: 8px 0 16px; }
.dev-link { margin: 0 0 16px; padding: 12px; border-radius: 8px; background: #FFF6EC; border: 1px dashed #E9B98A; font-size: 13px; color: #6B4A22; text-align: left; }
.dev-link a { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--orange-700); }
.flag-opts { display: grid; gap: 6px; }
.flag-opts label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; cursor: pointer; }
.flag-opts label:has(input:checked) { border-color: var(--orange); background: var(--orange-50); }
.flag-opts input { accent-color: var(--orange); }
.dv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 18px 16px 0; }
.dv-actions .dv-remove { margin: 0; }
.flag-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 0; font-size: 13px; color: var(--muted); }
.flag-btn .ic { width: 15px; height: 15px; }
.flag-btn:hover { color: var(--red-700); text-decoration: underline; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 1400px) { :root { --panel-w: 460px; } }

@media (max-width: 1100px) {
  .proto-pill { display: none; }
  .demo-long { display: none; }
  .demo-short { display: inline; }
}

@media (max-width: 899px) {
  :root { --hdr-h: 56px; }
  .hdr-in { padding: 0 12px 0 16px; gap: 12px; }
  .brand-mark { width: 30px; height: 30px; }
  .hdr-report { display: none; }
  .menu-btn { display: grid; }

  /* Mobile nav drawer */
  .nav {
    position: absolute; top: var(--hdr-h); left: 0; right: 0; height: auto;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 12px 14px;
    background: var(--navy-900); border-top: 1px solid #1F3A58; box-shadow: 0 12px 30px rgba(0,0,0,.25);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a, .nav button { height: 48px; padding: 0 12px; font-size: 16px; border: 0; border-radius: 8px; text-align: left; }
  .nav a.is-active { background: rgba(255,255,255,.07); box-shadow: inset 3px 0 0 var(--orange); }
  .nav button { color: #fff; background: var(--orange); margin-top: 8px; justify-content: center; }
  .account { display: none; }
  .nav-account { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid #1F3A58; }
  .nav-account button, .nav-account a { display: flex; width: 100%; color: #C7D4E2; background: none; margin: 0; justify-content: flex-start; }
  .nav-account button[data-action="signin"] { color: #fff; border: 1px solid #34557A; justify-content: center; margin-top: 4px; }
  .nav-who { color: #9FB3C9; font-size: 13px; padding: 4px 12px 6px; }
  .nav-who b { color: #fff; }
  .nav-backdrop { position: fixed; inset: var(--hdr-h) 0 0 0; z-index: 1050; background: rgba(7,21,38,.35); }

  .demo-bar { padding: 5px 12px; min-height: 30px; font-size: 12px; gap: 8px; }
  .demo-tag { font-size: 9.5px; }

  /* Map fills, sheet floats */
  .mapview { display: block; overflow: hidden; }
  .map-wrap { position: absolute; inset: 0; }
  .toolbar { position: absolute; top: 0; left: 0; right: 0; background: transparent; border: 0; padding: 10px 12px 0; pointer-events: none; z-index: 600; }
  .toolbar > * { pointer-events: auto; }
  .search input { background: #fff; box-shadow: var(--shadow-2); border-color: transparent; height: 46px; font-size: 16px; }
  .search-ic { top: 14px; }
  .search-clear { top: 7px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 8px -12px 0; padding: 0 12px 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; height: 34px; box-shadow: var(--shadow-1); border-color: transparent; }

  .sheet {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 700;
    border: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px rgba(11,32,54,.16);
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    will-change: transform;
  }
  .sheet.no-anim { transition: none; }
  .sheet-head { touch-action: none; cursor: grab; padding: 6px 16px 12px; user-select: none; }
  .grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: #CDD5DF; margin: 2px auto 8px; }
  .sh-title { font-size: 15.5px; }
  .stats { margin-top: 10px; }
  .stat { padding: 6px 8px; }
  .stat b { font-size: 17px; }
  .stat span { font-size: 11px; }

  .sheet-fab {
    display: inline-flex; align-items: center; gap: 8px; position: absolute; right: 12px; top: -72px;
    height: 48px; padding: 0 18px 0 14px; border-radius: 999px; border: 0;
    background: var(--orange); color: #fff; font-weight: 700; font-size: 15px;
    box-shadow: 0 6px 18px rgba(184, 82, 5, .38), 0 2px 4px rgba(0,0,0,.15);
    transition: opacity .2s, transform .2s;
  }
  .sheet-fab .ic { width: 20px; height: 20px; stroke-width: 2.4; }
  .sheet[data-state="full"] .sheet-fab { opacity: 0; transform: scale(.85); pointer-events: none; }

  .list-controls { padding: 8px 12px; }
  .seg button { padding: 0 9px; }
  .rcard { padding: 14px 14px; }

  .map-badge { top: calc(var(--tb-bottom, 110px) + 10px); left: 12px; font-size: 11px; }
  .map-ctrls { top: calc(var(--tb-bottom, 110px) + 10px); right: 12px; }
  .map-ctrls .ctrl-stack:first-child { display: none; } /* pinch-zoom on touch */
  .ctrl-stack button { width: 42px; height: 42px; }
  .legend { left: auto; right: 64px; bottom: auto; top: calc(var(--tb-bottom, 110px) + 10px); }
  #map .leaflet-bottom { bottom: var(--sheet-vis, 140px); transition: bottom .28s; }

  .toasts { bottom: auto; top: calc(var(--hdr-h) + 40px); }

  /* How it works */
  .wrap { padding: 0 16px; }
  .how-intro { padding: 28px 0 22px; }
  .how-intro h1 { font-size: 23px; }
  .lead { font-size: 15px; }
  .how-steps { grid-template-columns: 1fr; }
  .how-steps article + article { border-left: 0; border-top: 1px solid var(--line); }
  .compare { grid-template-columns: 1fr; }
  .status-table [role="row"] { grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; }
  .partners { flex-direction: column; align-items: flex-start; }
  .how-block { padding-top: 32px; }

  /* Modal becomes full-screen sheet */
  .modal { padding: 0; align-items: stretch; }
  .modal-dialog { max-width: none; max-height: none; height: 100%; border-radius: 0; animation: slideup .25s ease-out; }
  @keyframes slideup { from { transform: translateY(30px); opacity: 0; } }
  .modal-head { padding: 16px 16px 12px; padding-top: max(16px, env(safe-area-inset-top)); }
  .progress { padding: 0 16px; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .safety-note { width: 100%; }
  .modal-actions { width: 100%; }
  .modal-actions .btn { flex: 1; height: 48px; font-size: 15px; }
  .type-grid { grid-template-columns: 1fr 1fr; }
  .type-opt span { flex-direction: row; justify-content: flex-start; text-align: left; min-height: 76px; padding: 10px 12px; gap: 10px; }
  .type-opt .ic { width: 24px; height: 24px; }
  .mini-map-wrap { height: 190px; }

  .lightbox { padding: 60px 8px 20px; }
  .lb-nav { top: auto; bottom: 16px; transform: none; width: 44px; height: 44px; }
  .lightbox img { max-height: calc(100dvh - 220px); }
  .lightbox figcaption { padding: 0 56px; }
  .dv-photo img { height: 190px; }
  .cmp-row { flex-wrap: wrap; }
  .sev span { padding: 9px 10px; }
}

@media (max-width: 380px) {
  .brand-txt span { display: none; }
  .demo-bar a { display: none; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .seg button { padding: 0 7px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
