/* BlueDoor app layout. Tokens, fonts and base controls live in theme.css; sizes here use its --fs-* scale. */
:root { --rail: 232px; --topbar: 64px; --mapw: 46%; }

/* ---------- indigo palette (user pick 2026-10-30), app only ----------
   Lives here, not in theme.css, so the landing pages keep their own look. Primary buttons stay black (user decision);
   indigo carries the sidebar, links, focus rings and the score scale. --ink-deep..--glow are the sign-in panel colours. */
:root {
  --ink-deep: #0E0F14; --midnight: #161A2E; --indigo: #3B4A9C; --glow: #6F7FD6; --brand: #1F4FD8;
  --glass: rgba(255,255,255,.06); --glass-line: rgba(170,180,255,.28);
  --link: #3B4A9C; --accent-soft: #EEF0FB; --focus: #1F4FD8;
  --score-lo: #EEF0FB; --score-lo-ink: #3B4A9C; --score-mid: #6F7FD6; --score-mid-ink: #0E0F14; --score-hi: #3B4A9C; --score-hi-ink: #ffffff;
}
:root[data-theme="dark"] {
  --bg: #0E0F14; --bg-2: #12152A; --card: #161A2E; --ink: #EEF0FB; --ink-2: #C9CEEB; --muted: #9AA0C3; --line: rgba(170,180,255,.12); --line-strong: rgba(170,180,255,.24);
  --primary: #EEF0FB; --primary-ink: #0E0F14; --accent-soft: #232A4D; --link: #A9B4F5; --focus: #8E9BF0; --map-bg: #161A2E;
  --score-lo: #232A4D; --score-lo-ink: #C9CEEB; --score-mid: #6F7FD6; --score-mid-ink: #0E0F14; --score-hi: #A9B4F5; --score-hi-ink: #0E0F14;
}
:focus-visible { outline-color: var(--focus); }
.score { background: var(--score-lo); color: var(--score-lo-ink); }
.score.hi { background: var(--score-hi); color: var(--score-hi-ink); } .score.mid { background: var(--score-mid); color: var(--score-mid-ink); }
body { overflow: hidden; }

/* ---------- left rail ---------- */
/* The rail and the phone top bar are always the dark panel (near-black to midnight); their children read these scoped
   tokens, so buttons, the account row and hovers follow without their own dark rules. */
#rail { --ink: #EEF0FB; --ink-2: #C9CEEB; --muted: #9AA0C3; --bg-2: rgba(255,255,255,.06); --card: rgba(255,255,255,.04);
  --line: rgba(170,180,255,.14); --line-strong: var(--glass-line); --accent-soft: var(--glass); --primary: #EEF0FB; --primary-ink: #0E0F14; color: var(--ink); }
#rail { position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail); background: linear-gradient(180deg, var(--ink-deep) 0%, var(--midnight) 100%); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 14px; gap: 2px; z-index: 40; }
#rail .brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-wordmark); font-weight: 800; font-size: var(--fs-xl); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; padding: 2px 8px 18px; white-space: nowrap; }
.mark { width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; flex: none; }
#rail button[role=tab] { background: none; border: 0; border-radius: var(--r-pill); padding: 10px 12px; display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: var(--fs-md); font-weight: 500; cursor: pointer; text-align: left; white-space: nowrap; }
#rail button[role=tab] svg { width: 20px; height: 20px; flex: none; }
#rail button[role=tab]:hover { background: var(--bg-2); }
#rail button[role=tab][aria-selected="true"] { background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); font-weight: 600; }
#rail .spacer { flex: 1; }
#rail #upgradeCta { margin: 0 4px 12px; }
#upgradeCta svg { width: 16px; height: 16px; flex: none; }
#account .who { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; border-radius: var(--r); padding: 8px; cursor: pointer; text-align: left; }
#account .who:hover { background: var(--bg-2); }
.avatar, .mavatar { width: 34px; height: 34px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font-weight: 700; display: grid; place-items: center; flex: none; border: 0; cursor: pointer; }
#account .lines { display: flex; flex-direction: column; min-width: 0; }
#account .email { font-weight: 600; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#account .acctplan { color: var(--muted); font-size: var(--fs-xs); }
#account .more { margin-left: auto; color: var(--muted); }
#accountMenu { position: fixed; z-index: 1500; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; }
#accountMenu .menuwho { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: var(--fs-sm); }
#accountMenu .menuwho span:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
#accountMenu .menuwho span:last-child { color: var(--muted); font-size: var(--fs-xs); }
#accountMenu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; font-weight: 500; }
#accountMenu button:hover { background: var(--bg-2); }
#rail .foot { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; padding: 10px 8px 0; }

/* ---------- main ---------- */
#main { position: fixed; top: 0; left: var(--rail); right: 0; bottom: 0; display: flex; flex-direction: column; }
#top { height: var(--topbar); display: flex; align-items: center; gap: 14px; padding: 0 20px 0 28px; border-bottom: 1px solid var(--line); flex: none; }
#top .titles { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
#top h1 { margin: 0; font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
#top .h1sub { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#top .mbrand { display: none; }
#top .ctx { display: flex; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r-pill); overflow: hidden; flex: none; }
#top .ctx span { padding: 6px 14px; font-weight: 500; font-size: var(--fs-sm); border-left: 1px solid var(--line-strong); white-space: nowrap; }
#top .ctx span:first-child { border-left: 0; }
#top .ctx:empty { display: none; }
#top .spacer { flex: 1; }
#body { flex: 1; display: flex; min-height: 0; }

/* explore column: filters, then the card list or the table */
#explore { flex: 1; min-width: 0; overflow: auto; padding: 18px 28px 48px; }
#explore.bar-only { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 20px; }
#viewSeg { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); width: max-content; margin: 0 auto 18px; box-shadow: var(--shadow); }
#viewSeg button { background: none; border: 0; padding: 8px 16px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; color: var(--ink); }
#viewSeg button[aria-selected="true"] { background: var(--primary); color: var(--primary-ink); }
#viewSeg button:not([aria-selected="true"]):hover { background: var(--bg-2); }
.searchbar { display: flex; align-items: center; gap: 10px; height: 54px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 0 6px 0 18px; background: var(--card); box-shadow: var(--shadow); }
.searchbar:focus-within { border-color: var(--primary); }
.searchbar input[type=search] { flex: 1; min-width: 80px; border: 0; background: none; outline: none; font-size: var(--fs-lg); height: 100%; text-overflow: ellipsis; }
.searchbar .sep { width: 1px; height: 26px; background: var(--line-strong); }
.searchbar .inline { position: relative; display: inline-flex; align-items: center; gap: 7px; font-weight: 500; padding: 0 6px; cursor: pointer; white-space: nowrap; }
.inline select, .chip select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.searchbar .btn { height: 42px; padding: 0 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 18px; }
.chips .inline svg { width: 14px; height: 14px; }
.loaderr { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--hot-soft); color: var(--hot); border-radius: var(--r); padding: 10px 10px 10px 16px; margin: 0 0 14px; font-weight: 600; font-size: var(--fs-sm); }
.loaderr .btn { height: 34px; flex: none; }
.listhead { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
#count { font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); }
.sortsel { position: relative; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.sortsel select { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.empty { padding: 40px 20px; color: var(--muted); text-align: center; grid-column: 1 / -1; }
body.loading #list, body.loading #table { opacity: .5; pointer-events: none; transition: opacity .2s; }
body.loading #count::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px; border: 2px solid var(--line-strong); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
body.loading #list.skeleton { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk { background: linear-gradient(90deg, var(--bg-2) 25%, var(--line) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--r-sm); }
.skcard .sk.photo { aspect-ratio: 4 / 3; border-radius: var(--r-lg); }
.skcard .sk.l1 { height: 16px; width: 70%; margin-top: 12px; }
.skcard .sk.l2 { height: 12px; width: 45%; margin-top: 8px; }
.skcard .sk.l3 { height: 22px; width: 85%; margin-top: 10px; border-radius: var(--r-pill); }
.skrow { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); }
.skrow .sk { height: 28px; } .skrow .sk + .sk { height: 14px; align-self: center; width: 60%; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* photo cards, two columns */
#list.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
.card { cursor: pointer; border-radius: var(--r-lg); }
.card .photo { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(90deg, var(--bg-2) 25%, var(--line) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.card .photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.card:hover .photo img { transform: scale(1.03); }
.card .photo img.tiny { filter: blur(14px) saturate(1.1); transform: scale(1.25); }
.card:hover .photo img.tiny { transform: scale(1.3); }
.card .photo .lockchip { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.94); color: #111; border-radius: var(--r-pill); padding: 6px 12px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); }
.card .photo .lockchip svg { width: 13px; height: 13px; }
.card .photo .score { position: absolute; top: 12px; left: 12px; box-shadow: var(--shadow); background: var(--card); }
.card .photo .score.mid { background: var(--score-mid); }
.card .photo .score.hi { background: var(--score-hi); color: var(--score-hi-ink); }
.card .photo .tag { position: absolute; top: 12px; right: 12px; }
.card .photo .county { position: absolute; bottom: 10px; left: 12px; background: rgba(255,255,255,.92); color: #111; border-radius: var(--r-pill); padding: 2px 9px; font-size: var(--fs-xs); font-weight: 600; }
.card .title { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-weight: 600; font-size: var(--fs-lg); line-height: 1.3; }
.card .meta { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.card .sigs { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.card .owner { margin-top: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.card.active .photo { outline: 3px solid var(--primary); outline-offset: 2px; }
.card:focus-visible { outline-offset: 4px; }
.btn.more { grid-column: 1 / -1; justify-self: center; margin-top: 6px; }

/* compact rows (Twenty / Juicebox style) */
#list.compact { display: block; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
#list.compact .row, #list.compact .hdr { display: grid; grid-template-columns: 56px minmax(0, 1.6fr) minmax(0, 1.3fr) minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 9px 12px; }
#list.compact .row { border-bottom: 1px solid var(--line); cursor: pointer; font-size: var(--fs-sm); }
#list.compact .row:last-of-type { border-bottom: 0; }
#list.compact .row:hover, #list.compact .row.active { background: var(--bg-2); }
#list.compact .row .addr { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#list.compact .row .sub { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* pills that do not fit wrap onto a hidden second line, so none shows cut in half */
#list.compact .row .sigs { display: flex; flex-wrap: wrap; gap: 4px; height: 22px; overflow: hidden; }
td.c-signals .cell { display: flex; gap: 4px; }  /* one pill plus "+n": never wraps */
#list.compact .row .owner { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#list.compact .hdr { padding: 8px 12px; background: var(--bg-2); color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; border-bottom: 1px solid var(--line); }
#list.compact .btn.more { display: flex; margin: 10px auto; }

/* map */
#mapcol { width: var(--mapw); position: relative; flex: none; border-left: 1px solid var(--line); }
#map { position: absolute; inset: 0; background: var(--map-bg); }
.mapnote:empty { display: none; }
.mapnote { position: absolute; top: 12px; right: 12px; z-index: 500; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 12px; font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow); }
.leaflet-container { font: inherit; background: var(--map-bg); }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: var(--r) !important; overflow: hidden; }
.leaflet-control-zoom a { background: var(--card) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-popup-content-wrapper { border-radius: var(--r); box-shadow: var(--shadow-lg); background: var(--card); color: var(--ink); }
.leaflet-popup-tip { background: var(--card); }
.leaflet-popup-content { margin: 10px 12px; font-size: var(--fs-sm); }
.leaflet-control-attribution { font-size: 10px; }
/* lead pins carry the score; clusters carry a count and are round, so the two never read alike */
.pin { display: inline-block; border-radius: var(--r-pill); padding: 3px 8px; font-size: var(--fs-xs); font-weight: 800; white-space: nowrap; transform: translate(-50%, -50%); font-variant-numeric: tabular-nums; background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .12s; }
.pin.mid { background: var(--score-mid); color: var(--score-mid-ink); border-color: var(--score-mid); }
.pin.hi { background: var(--score-hi); color: var(--score-hi-ink); border-color: var(--score-hi); }
.pin.focus { transform: translate(-50%, -50%) scale(1.25); box-shadow: 0 0 0 3px var(--card), 0 2px 8px rgba(0,0,0,.35); z-index: 10; }
.marker-cluster { background: none; }
.marker-cluster div { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 11px; color: var(--ink); background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }

/* ---------- table views (inside the explore column, full width) ---------- */
#tablecol { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tablehead { padding: 0 0 10px; }
.tablehead .sub { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
#stats { display: flex; gap: 10px; padding: 0 0 12px; flex-wrap: wrap; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; min-width: 140px; }
.stat .n { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; font-family: var(--font-display); }
.stat .l { color: var(--muted); font-size: var(--fs-xs); }
#tablewrap { flex: 1; min-height: 0; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--fs-sm); }
th, td { text-align: left; padding: 0 8px; height: 52px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { position: sticky; top: 0; height: 38px; background: var(--bg-2); z-index: 1; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); cursor: pointer; user-select: none; }
th.sorted::after { content: " ▾"; } th.sorted.asc::after { content: " ▴"; }
td .cell { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
td.c-owner .cell { max-width: 190px; }
td.c-situs .cell, td.c-address .cell { max-width: 230px; font-weight: 600; }
td.c-signals .cell { max-width: none; }
td.c-snippet .cell { max-width: 460px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); }
td.c-score { width: 56px; }
tbody tr[data-pid] { cursor: pointer; }
tbody tr:hover td { background: var(--bg-2); }
/* phone: table rows become list items */
.mlist { display: block; }
.mrow { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mrow .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .s { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .lead { grid-row: span 2; }
.mrow .lead .when { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; text-align: center; }

/* ---------- gate (sign-in): split screen, Midday style (index.html gate and verify.html share it) ---------- */
/* The logo is one file, /brand/mark.svg (logo #17, B door on a blue tile): swapping it is replacing that file. */
.bdmark { display: inline-block; width: 28px; height: 28px; background: url(/brand/mark.svg) center / contain no-repeat; }
#gate { position: fixed; inset: 0; z-index: 2000; background: var(--card); display: grid; grid-template-columns: 1fr 1fr; overflow: auto; }
/* Panel palette (user pick, GoDaddy AI Assist card): near-black at the top into deep indigo, a faint glow at the bottom,
   glass pills with lavender borders. Scoped to the sign-in panel; the app stays black and white. */
.gateside { --ink-deep: #0E0F14; --midnight: #161A2E; --indigo: #3B4A9C; --glow: #6F7FD6;
  --glass: rgba(255,255,255,.06); --glass-line: rgba(170,180,255,.28);
  position: relative; overflow: hidden; color: #fff; padding: 32px 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background: radial-gradient(90% 55% at 50% 115%, color-mix(in srgb, var(--glow) 55%, transparent) 0%, transparent 70%),
              linear-gradient(180deg, var(--ink-deep) 0%, var(--ink-deep) 22%, var(--midnight) 55%, var(--indigo) 100%); }
.gateside::before { content: ""; position: absolute; inset: 0; opacity: .22; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.gateside > * { position: relative; }
.gatebrand { display: flex; align-items: center; gap: 10px; font-family: var(--font-wordmark); font-weight: 800; letter-spacing: -0.02em; font-size: var(--fs-xl); }
.gatequote { margin: 0 0 8vh; }
.gatequote blockquote { max-width: 22em; }
.gatequote blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; }
.gatequote figcaption { margin-top: 16px; color: rgba(255,255,255,.66); font-size: var(--fs-sm); }
.gatequote .glass { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gatequote .glass span { padding: 6px 12px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--glass-line); color: #fff;
  font-size: var(--fs-xs); font-weight: 600; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.gatecard { display: flex; flex-direction: column; justify-content: center; width: min(380px, 100%); margin: 0 auto; padding: 40px 24px; min-height: 100%; box-sizing: border-box; }
.gatepane h2 { margin: 0 0 6px; font-family: ui-serif, "New York", Georgia, "Times New Roman", serif; font-weight: 400; font-size: var(--fs-2xl); letter-spacing: -0.01em; }
.gatepane p { margin: 0 0 20px; color: var(--muted); }
.gatepane p b { color: var(--ink); }
.gatepane form { display: flex; flex-direction: column; gap: 10px; }
.gatepane input[type=email] { height: 46px; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 14px; background: var(--card); color: var(--ink); outline: none; font-size: var(--fs-lg); }
.gatepane input[type=email]:focus { border-color: var(--primary); }
.gatepane .btn { height: 46px; width: 100%; }
.gatepane .btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.gatepane .gatelegal { color: var(--muted); font-size: var(--fs-xs) !important; margin-top: 28px !important; }
.gatepane .gatelegal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* Phone and narrow tablet: the dark panel becomes a short band with the brand and the statement. */
@media (max-width: 820px) {
  #gate { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .gateside { padding: 18px 20px 20px; gap: 14px; }
  .gatequote { margin: 0; }
  .gatequote blockquote { font-size: 17px; }
  .gatequote figcaption { display: none; }
  .gatecard { justify-content: flex-start; padding: 28px 20px; min-height: 0; }
}
.mailbtns { display: flex; gap: 8px; }
.mailbtns .btn { height: 42px; }
.gatefine { font-size: var(--fs-sm); margin-top: 14px !important; }
.gatealert { background: var(--warn-soft); color: var(--warn) !important; border-radius: var(--r-sm); padding: 8px 12px; font-size: var(--fs-sm); }
.gatealert.bad { background: var(--hot-soft); color: var(--hot) !important; }

/* ---------- upgrade modal (Mobbin style) ---------- */
#upgrade { position: fixed; inset: 0; z-index: 2100; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; overflow: auto; }
.upcard { position: relative; width: min(520px, 100%); background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 40px 36px 28px; text-align: center; }
.upcard .close { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.uplogo { width: 48px; height: 48px; border-radius: var(--r); background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; margin: 0 auto 14px; }
img.logo { display: block; flex: none; background: none; border-radius: 0; }  /* /brand/mark.svg everywhere */
img.logo.uplogo { margin: 0 auto 14px; }
.upcard h2 { margin: 0; font-size: var(--fs-2xl); font-weight: 700; }
.upsub { margin: 8px 0 22px; color: var(--muted); }
.upsub b { color: var(--ink); }
.plan { background: var(--bg-2); border-radius: var(--r-lg); padding: 22px 24px 18px; text-align: left; }
.planhead { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.planname { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); }
.feat { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feat li { display: flex; align-items: flex-start; gap: 10px; }
.feat svg { width: 18px; height: 18px; flex: none; color: var(--ink-2); margin-top: 2px; }
.seats { margin: 0 0 14px; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.seats::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.plan .btn { width: 100%; height: var(--btn-h-lg); }
.plan .btn.ghost { margin-top: 6px; height: 42px; }
.upfine { margin: 18px 0 0; color: var(--muted); font-size: var(--fs-sm); }
#upWho b { white-space: nowrap; font-weight: 500; }

/* ---------- debug overlay ---------- */
#debug { position: fixed; right: 16px; bottom: 16px; z-index: 3000; width: 280px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); }
#debug .dhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
#debug .dhead span { color: var(--muted); font-size: var(--fs-xs); }
#debug label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 500; }
#debug .seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 2px; }
#debug .seg button { background: none; border: 0; padding: 4px 10px; border-radius: var(--r-pill); cursor: pointer; font-weight: 600; font-size: var(--fs-xs); }
#debug .seg button.on { background: var(--primary); color: var(--primary-ink); }
#debug .btn { height: 32px; margin-top: 4px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-pill); font-weight: 600; z-index: 3500; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); text-align: center; }

/* ---------- detail overlay ---------- */
#backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; z-index: 1000; }
#backdrop.open { display: block; }
#detail { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); width: min(1120px, calc(100vw - 32px)); height: calc(100vh - 48px); background: var(--card); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); z-index: 1001; display: none; flex-direction: column; overflow: hidden; }
#detail.open { display: flex; }
#detail .bar { height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 8px; border-bottom: 1px solid var(--line); flex: none; }
#detail .bar .back { background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-pill); font-weight: 600; color: var(--ink); flex: none; }
#detail .bar .back:hover { background: var(--bg-2); }
#detail .tabs { display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
#detail .tabs::-webkit-scrollbar { display: none; }
#detail .tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 15px 12px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
#detail .tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
#detail .bar .tools { margin-left: auto; display: flex; gap: 4px; flex: none; }
#detail .bar .tools a { background: none; border: 0; cursor: pointer; padding: 8px 10px; border-radius: var(--r-pill); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
#detail .bar .tools a:hover { background: var(--bg-2); }
#detail .scroll { flex: 1; overflow: auto; }
#detail .hero { position: relative; height: 340px; background: var(--bg-2); overflow: hidden; }
#detail .hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
#detail .hero img.tiny { filter: blur(22px) saturate(1.1); transform: scale(1.2); }
#detail .hero .nohero { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
#detail .hero .nohero[data-unlock] { cursor: pointer; }
#detail .hero .nohero .lockchip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.94); color: #111; border-radius: var(--r-pill); padding: 8px 16px; font-weight: 600; box-shadow: var(--shadow); }
#detail .hero .nohero .lockchip svg { width: 15px; height: 15px; }
#detail .hero .toggle { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 4px; }
#detail .hero .toggle button { background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: var(--r-pill); padding: 4px 12px; font-size: var(--fs-xs); cursor: pointer; font-weight: 600; }
#detail .hero .toggle button[aria-pressed="true"] { background: #fff; color: #111; }
/* Photo gallery (PHOTOS=1): one slide per view, scroll-snap swipe, count badge bottom right. */
#detail .hero .gal, #detail .hero .gal .track { position: absolute; inset: 0; }
#detail .hero .gal .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
#detail .hero .gal .track::-webkit-scrollbar { display: none; }
#detail .hero .gal .slide { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; background: var(--bg-2); }
#detail .hero .gal .slide figcaption, #detail .hero .gal .gcount { position: absolute; bottom: 12px; background: rgba(0,0,0,.6); color: #fff; border-radius: var(--r-pill); padding: 4px 12px; font-size: var(--fs-xs); font-weight: 600; }
#detail .hero .gal .slide figcaption { left: 12px; }
#detail .hero .gal .gcount { right: 12px; font-variant-numeric: tabular-nums; }
#detail .hero .gal .gattr { position: absolute; bottom: 14px; right: 72px; color: #fff; font-size: 11px; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
#detail .hero .gal .pin { position: absolute; left: 50%; top: 50%; width: 28px; height: 38px; transform: translate(-50%, -100%); filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
#detail .hero .gal .gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #111; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
#detail .hero .gal .gnav.prev { left: 12px; } #detail .hero .gal .gnav.next { right: 12px; }
#detail .hero .gal .gnav:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { #detail .hero .gal .gnav { display: none; } }
#detail .hero .scoreflag { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.95); color: #111; border-radius: var(--r); padding: 6px 10px 6px 6px; font-weight: 600; font-size: var(--fs-sm); }
#detail .cols { display: grid; grid-template-columns: 1fr 320px; gap: 28px; padding: 22px 28px 48px; }
#detail h2 { margin: 0; font-size: var(--fs-2xl); line-height: 1.2; }
#detail .sub { color: var(--muted); margin-top: 4px; }
#detail .facts { display: flex; gap: 22px; margin: 16px 0 6px; flex-wrap: wrap; }
#detail .facts div { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.01em; font-family: var(--font-display); }
#detail .facts span { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 400; font-family: var(--font-body); }
#detail section { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 10px; }
#detail h3 { font-size: var(--fs-lg); margin: 0 0 10px; }
#detail dl { display: grid; grid-template-columns: 160px 1fr; gap: 7px 14px; margin: 0; font-size: var(--fs-sm); }
#detail dt { color: var(--muted); } #detail dd { margin: 0; }
#detail .why { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#detail .why .pill { font-size: var(--fs-sm); padding: 4px 10px; }
#detail .note { color: var(--muted); font-size: var(--fs-sm); margin: 8px 0 0; }
#detail .notice { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; }
#detail .notice .h { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
#detail .notice .t { color: var(--muted); font-size: var(--fs-sm); margin-top: 6px; }
#detail .side { position: sticky; top: 16px; align-self: start; }
#detail .cta { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); background: var(--card); }
#detail .cta .big { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); }
#detail .cta .big small { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; font-family: var(--font-body); }
#detail .cta .btn { width: 100%; margin-top: 10px; height: 44px; }
#detail .cta .mail { margin-top: 14px; font-size: var(--fs-sm); line-height: 1.45; }
#detail .cta .mail .l { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
#detail .links { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#detail .links a { border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 10px; font-size: var(--fs-sm); font-weight: 600; text-decoration: none; color: var(--ink); text-align: center; }
#detail .links a:hover { border-color: var(--ink); }
#detail .links a.m-only { display: none; }
#detail .contactlist a { font-weight: 600; text-decoration: none; }
#detail .bar .nav { display: inline-flex; gap: 2px; flex: none; }
#detail .bar .nav button { background: none; border: 1px solid var(--line-strong); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
#detail .bar .nav button:disabled { opacity: .35; cursor: default; }

/* ---------- responsive ---------- */
/* tablet: the rail folds to icons so the list keeps room beside the map; county and score move to the chip row */
@media (max-width: 1180px) and (min-width: 821px) {
  :root { --rail: 72px; --mapw: 40%; }
  #rail { padding: 18px 10px 14px; align-items: center; }
  #rail .brand { padding: 2px 0 18px; } #rail .brand [data-brand] { display: none; }
  #rail button[role=tab] { font-size: 0; gap: 0; padding: 12px; justify-content: center; }
  #rail #upgradeCta { margin: 0 0 12px; width: 44px; padding: 0; } #rail #upgradeCta .lbl { display: none; }
  #account .lines, #account .more, #rail .foot { display: none; }
  #account .who { padding: 4px; }
  #top .ctx span:nth-child(n+2) { display: none; }
}
@media (max-width: 1000px) { #detail .cols { grid-template-columns: 1fr; } #detail .side { position: static; } }
@media (max-width: 820px) {
  :root { --rail: 0px; --topbar: 56px; }
  #rail { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 62px; flex-direction: row; justify-content: space-around; border-right: 0; border-top: 1px solid var(--line); padding: 4px; }
  #rail .brand, #rail .spacer, #rail .foot, #rail #upgradeCta, #account { display: none; }
  #rail button[role=tab] { flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 2px; flex: 1; border-radius: var(--r-sm); min-width: 0; }
  #main { bottom: 62px; }
  #top { padding: 0 12px; gap: 8px; background: linear-gradient(180deg, var(--ink-deep) 0%, var(--midnight) 100%); border-bottom-color: transparent; }
  #top { --ink: #EEF0FB; --muted: #9AA0C3; --bg-2: rgba(255,255,255,.06); --card: rgba(255,255,255,.04); --line-strong: var(--glass-line); --primary: #EEF0FB; --primary-ink: #0E0F14; color: var(--ink); }
  #top .mbrand { display: block; text-decoration: none; }
  #top .h1sub, #top .ctx { display: none; }
  #exportBtn { width: var(--btn-h); padding: 0; } #exportBtn .lbl { display: none; }
  #mUpgrade { height: 36px; padding: 0 14px; }
  #body { flex-direction: column; }
  #explore { padding: 12px 12px 24px; order: 2; }
  #explore.bar-only { padding-bottom: 12px; }
  #mapcol { width: 100%; flex: 0 0 42%; order: 1; border-left: 0; border-bottom: 1px solid var(--line); }
  .searchbar { height: 48px; padding-left: 12px; }
  .searchbar input[type=search] { font-size: var(--fs-lg); }
  .searchbar .btn { padding: 0 14px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -12px; margin-right: -12px; padding: 0 12px; }
  .chips::-webkit-scrollbar { display: none; }
  #list.cards { grid-template-columns: 1fr; }
  #list.compact .row, #list.compact .hdr { grid-template-columns: 48px minmax(0, 1fr) auto; }
  #list.compact .row > :nth-child(4), #list.compact .hdr > :nth-child(4) { display: none; }
  #list.compact .row .sigs .pill:nth-child(n+2) { display: none; }
  #detail { top: 0; height: 100%; width: 100vw; border-radius: 0; }
  #detail .hero { height: 220px; }
  #detail .cols { padding: 16px; }
  #detail dl { grid-template-columns: 120px 1fr; }
  #detail .bar { padding: 0 6px; gap: 4px; }
  #detail .bar .back span, #detail .bar .tools { display: none; }
  #detail .tabs { margin-left: 0; }
  #detail .tabs button { padding: 14px 8px; font-size: var(--fs-sm); }
  #detail .links a.m-only { display: block; }
  .upcard { padding: 32px 20px 20px; }
  #debug { right: 8px; left: 8px; width: auto; bottom: 70px; }
}
body.locked .searchbar input:disabled { cursor: not-allowed; }
.optin { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.optin input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
th:first-child, td:first-child { padding-left: 12px; }
