/* OverCharge — design tokens, layout, components. Light theme, consumer
   real-estate feel: big imagery, rounded cards, clear grades. */

:root {
  --ink: #0b1526;
  --ink-2: #3d4757;
  --ink-3: #6b7484;
  --line: #e4e7ec;
  --line-2: #d0d5dd;
  --bg: #ffffff;
  --bg-2: #f5f7fa;
  --bg-3: #eef2f7;
  --brand: #1e5eff;
  --brand-ink: #ffffff;
  --brand-dark: #1446c7;
  --brand-soft: #e8efff;
  --coral: #ff5a3c;
  --coral-soft: #fff0ec;
  --warn-ink: #b3261e;
  --ok: #12a150;
  --ok-soft: #e7f6ee;

  --g-a: #12a150;
  --g-b: #6aab1f;
  --g-c: #e0a800;
  --g-d: #f07b1f;
  --g-f: #e0352b;
  --g-na: #98a2b3;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-2: 0 4px 12px rgba(16, 24, 40, 0.08), 0 2px 4px rgba(16, 24, 40, 0.05);
  --shadow-3: 0 18px 40px rgba(16, 24, 40, 0.16);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: 40px; font-weight: 800; }
h2 { font-size: 26px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ header */

header.site {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { height: 100%; display: flex; align-items: center; gap: 28px; max-width: 1400px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 21px; letter-spacing: -0.03em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand .c { color: var(--brand); }
header.site nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
header.site nav a {
  color: var(--ink-2); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px;
}
header.site nav a:hover { background: var(--bg-2); text-decoration: none; }
header.site nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
header.site nav .saved-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 99px; background: var(--coral); color: #fff; font-size: 12px; font-weight: 700;
}
.menu-btn { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  header.site nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 12px 14px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2);
  }
  header.site nav.open { display: flex; }
  header.site nav a { padding: 12px; border-radius: 10px; }
}

main { min-height: calc(100vh - var(--header-h) - 200px); }

/* ------------------------------------------------------------ buttons, inputs */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 15px;
  cursor: pointer; white-space: nowrap; transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { background: var(--bg-2); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.coral { background: var(--coral); }
.btn.coral:hover { background: #e94a2d; }
.btn.sm { padding: 7px 13px; font-size: 14px; }
.btn.lg { padding: 15px 26px; font-size: 17px; }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line-2); cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn svg { width: 20px; height: 20px; }
.heart[aria-pressed="true"] { color: var(--coral); border-color: #ffc9bd; background: var(--coral-soft); }
.heart[aria-pressed="true"] svg path { fill: currentColor; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

input[type="text"], input[type="search"], input[type="number"], input[type="date"], select {
  width: 100%; min-width: 0; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 10px;
  background: #fff; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(30, 94, 255, 0.15); }
label.field { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label.field > input, label.field > select { margin-top: 6px; }
:focus-visible { outline: 3px solid rgba(30, 94, 255, 0.45); outline-offset: 2px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.chip:hover { background: var(--bg-2); text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------ search box + autocomplete */

.search-box { position: relative; display: flex; gap: 8px; background: #fff; border-radius: 999px; padding: 6px; box-shadow: var(--shadow-3); }
.search-box .icon { display: grid; place-items: center; padding-left: 12px; color: var(--ink-3); }
.search-box .icon svg { width: 22px; height: 22px; }
.search-box input { border: 0; box-shadow: none; padding: 12px 6px; font-size: 17px; background: transparent; }
.search-box input:focus { box-shadow: none; }
.search-box .apt { max-width: 96px; border-left: 1px solid var(--line); border-radius: 0; padding-left: 14px; }
.search-box .btn { padding: 12px 24px; font-size: 16px; }
.search-box.compact { box-shadow: none; border: 1px solid var(--line-2); padding: 3px; }
.search-box.compact input { font-size: 15px; padding: 8px 6px; }
.search-box.compact .btn { padding: 8px 16px; font-size: 14px; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-3); overflow: hidden; list-style: none; margin: 0; padding: 6px;
}
.suggest li { padding: 11px 14px; border-radius: 10px; cursor: pointer; display: flex; gap: 12px; align-items: center; color: var(--ink); }
.suggest li svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.suggest li .sub { color: var(--ink-3); font-size: 13.5px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--bg-2); }
@media (max-width: 560px) {
  .search-box { flex-wrap: wrap; border-radius: 18px; }
  .search-box .icon { display: none; }
  .search-box input.addr { flex: 1 1 100%; padding-left: 12px; }
  .search-box .apt { max-width: none; flex: 1; border-left: 0; border-top: 1px solid var(--line); padding-left: 12px; }
  .search-box .btn { flex: 1; }
}

/* ------------------------------------------------------------ home */

.hero {
  position: relative; min-height: 560px; display: grid; align-items: center; color: #fff;
  background: #0b1526 url("../img/hero.jpg") center / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 15, 30, 0.55) 0%, rgba(8, 15, 30, 0.35) 45%, rgba(8, 15, 30, 0.75) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: 56px; padding-bottom: 72px; }
.hero h1 { font-size: 56px; max-width: 760px; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35); }
.hero h1 .hl { color: #ffd2c7; }
.hero .lede { font-size: 20px; max-width: 640px; color: rgba(255, 255, 255, 0.92); margin-bottom: 28px; }
.hero .search-box { max-width: 760px; }
.hero .quick { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .quick a { color: #fff; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.28); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14.5px; backdrop-filter: blur(6px); }
.hero .quick a:hover { background: rgba(255, 255, 255, 0.24); text-decoration: none; }
.hero .credit { position: absolute; right: 14px; bottom: 10px; z-index: 1; font-size: 11.5px; color: rgba(255, 255, 255, 0.7); }
@media (max-width: 720px) {
  .hero { min-height: 520px; }
  .hero h1 { font-size: 36px; }
  .hero .lede { font-size: 17px; }
}

.stats-strip { border-bottom: 1px solid var(--line); background: #fff; }
.stats-strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 26px; padding-bottom: 26px; }
.stats-strip .n { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.stats-strip .l { color: var(--ink-3); font-size: 14px; }
@media (max-width: 720px) { .stats-strip .wrap { grid-template-columns: repeat(2, 1fr); } }

section.band { padding: 64px 0; }
section.band.alt { background: var(--bg-2); }
.band-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.band-head p { color: var(--ink-3); margin: 0; max-width: 620px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12.5px; font-weight: 800; color: var(--brand); margin-bottom: 8px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); display: flex; flex-direction: column; color: var(--ink); }
.feature:hover { box-shadow: var(--shadow-2); text-decoration: none; transform: translateY(-2px); transition: 0.18s; }
.feature .pic { aspect-ratio: 16 / 9; background: var(--bg-3) center / cover; position: relative; }
.feature .pic .badge-float { position: absolute; left: 14px; bottom: 14px; }
.feature .body { padding: 20px; }
.feature .body p { color: var(--ink-3); margin: 0; }
.feature .go { margin-top: 14px; color: var(--brand); font-weight: 700; }

.nbhd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .nbhd-grid { grid-template-columns: repeat(2, 1fr); } }
.nbhd { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-3) center / cover; color: #fff; box-shadow: var(--shadow-1); }
.nbhd::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.72) 100%); transition: 0.2s; }
.nbhd:hover::after { background: linear-gradient(180deg, rgba(0,0,0,0.05) 20%, rgba(0,0,0,0.8) 100%); }
.nbhd:hover { text-decoration: none; }
.nbhd .t { position: absolute; left: 16px; bottom: 14px; right: 16px; z-index: 1; }
.nbhd .t b { display: block; font-size: 19px; letter-spacing: -0.02em; }
.nbhd .t span { font-size: 13.5px; opacity: 0.9; }

.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 900px) { .steps-row { grid-template-columns: 1fr; } }
.step { counter-increment: step; padding: 24px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.step::before { content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; margin-bottom: 14px; }
.step p { color: var(--ink-3); margin: 0; }

.cta-band { background: var(--ink); color: #fff; border-radius: 22px; padding: 42px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; overflow: hidden; position: relative; }
.cta-band p { color: rgba(255, 255, 255, 0.78); }
.cta-band .pic { border-radius: 16px; aspect-ratio: 16 / 10; background: center / cover; }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; padding: 28px; } }

/* ------------------------------------------------------------ grade badge */

.grade {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  color: #fff; font-weight: 800; font-size: 20px; letter-spacing: 0; flex: none; box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.grade.lg { width: 76px; height: 76px; border-radius: 18px; font-size: 42px; }
.grade.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 15px; }
.grade.A { background: var(--g-a); } .grade.B { background: var(--g-b); } .grade.C { background: var(--g-c); }
.grade.D { background: var(--g-d); } .grade.F { background: var(--g-f); } .grade.NA { background: var(--g-na); font-size: 13px; }
.grade.lg.NA { font-size: 18px; }

/* ------------------------------------------------------------ building cards */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.bcard { position: relative; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink); display: flex; flex-direction: column; transition: box-shadow 0.15s, transform 0.15s; }
.bcard:hover { box-shadow: var(--shadow-2); text-decoration: none; transform: translateY(-2px); }
.bcard.active { outline: 3px solid var(--brand); }
.bcard .thumb { height: 168px; }
.bcard .info { padding: 12px 14px 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: start; }
.bcard .addr { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.bcard .where { color: var(--ink-3); font-size: 13.5px; grid-column: 1 / -1; }
.bcard .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.bcard .meta b { font-weight: 700; color: var(--ink); }
.bcard .heart { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; box-shadow: var(--shadow-1); }
.bcard .tagrow { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,0.92); color: var(--ink); box-shadow: var(--shadow-1); }
.tag.warn { background: var(--coral); color: #fff; }

/* Aerial thumbnail: a grid of map tiles positioned so the building sits centred. */
.aerial { position: relative; overflow: hidden; background: #c9cfd6; }
.aerial .tiles { position: absolute; left: 50%; top: 50%; display: grid; grid-template-columns: repeat(3, 320px); }
.aerial .tiles img { width: 320px; height: 320px; max-width: none; }
.aerial .pin { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--coral); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(255, 90, 60, 0.28), 0 2px 6px rgba(0,0,0,0.4); }

/* ------------------------------------------------------------ map search page */

.mapsearch { display: grid; grid-template-columns: minmax(0, 1fr) 520px; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - var(--header-h)); }
.mapsearch .filters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.mapsearch .filters .search-box { flex: 1 1 280px; max-width: 420px; }
.mapsearch .filters select { width: auto; padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.mapsearch .grade-filter { display: flex; gap: 4px; }
.mapsearch .grade-filter button { width: 34px; height: 34px; border-radius: 9px; border: 2px solid transparent; color: #fff; font-weight: 800; cursor: pointer; opacity: 0.35; }
.mapsearch .grade-filter button[aria-pressed="true"] { opacity: 1; border-color: rgba(0,0,0,0.25); }
.mapsearch .body { display: contents; }
.mapsearch .mapwrap { position: relative; min-height: 0; }
.mapsearch #map { position: absolute; inset: 0; }
.mapsearch .list { overflow-y: auto; padding: 16px; background: var(--bg-2); border-left: 1px solid var(--line); min-height: 0; }
.mapsearch .list .cards { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mapsearch .list .bcard .thumb { height: 140px; }
.mapsearch .list-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; gap: 10px; }
.mapsearch .list-head h2 { font-size: 19px; margin: 0; }
.map-toggle { position: absolute; top: 12px; left: 12px; z-index: 5; display: flex; background: #fff; border-radius: 999px; box-shadow: var(--shadow-2); padding: 4px; }
.map-toggle button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.map-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.legend-float { position: absolute; left: 12px; bottom: 30px; z-index: 5; background: #fff; border-radius: 12px; box-shadow: var(--shadow-2); padding: 10px 12px; font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.legend-float i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); margin-right: 3px; vertical-align: -2px; }
.view-switch { display: none; }
@media (max-width: 1100px) { .mapsearch { grid-template-columns: minmax(0, 1fr) 360px; } .mapsearch .list .cards { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .mapsearch { display: flex; flex-direction: column; height: auto; }
  .mapsearch .mapwrap { height: 58vh; }
  .mapsearch .list { border-left: 0; }
  .mapsearch .list .cards { grid-template-columns: 1fr 1fr; }
  .mapsearch .filters .search-box { flex-basis: 100%; max-width: none; }
}
@media (max-width: 480px) { .mapsearch .list .cards { grid-template-columns: 1fr; } }

.maplibregl-popup-content { border-radius: 14px !important; padding: 0 !important; overflow: hidden; box-shadow: var(--shadow-3) !important; font-family: var(--font); }
.popcard { display: block; width: 240px; color: var(--ink); }
.popcard:hover { text-decoration: none; }
.popcard .aerial { height: 110px; }
.popcard .t { padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; }
.popcard .t b { font-size: 14.5px; line-height: 1.3; }
.popcard .t span { grid-column: 1 / -1; color: var(--ink-3); font-size: 12.5px; }

/* ------------------------------------------------------------ building page */

.bhero { position: relative; height: 380px; background: #c9cfd6; }
.bhero #bmap { position: absolute; inset: 0; }
.bhero .aerial { position: absolute; inset: 0; }
@media (max-width: 720px) { .bhero { height: 260px; } }

.bhead { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; margin-top: -64px; position: relative; z-index: 3; }
@media (max-width: 960px) { .bhead { grid-template-columns: 1fr; margin-top: -40px; } }
.bhead .titlecard { background: #fff; border-radius: 18px; box-shadow: var(--shadow-2); padding: 24px 26px; }
.bhead .titlecard h1 { font-size: 32px; margin-bottom: 4px; }
.crumbs { font-size: 13.5px; color: var(--ink-3); margin-bottom: 8px; }
.crumbs a { color: var(--ink-3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.factrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.factrow > div { padding: 12px 14px; border-right: 1px solid var(--line); }
.factrow > div:last-child { border-right: 0; }
.factrow .n { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.factrow .l { font-size: 12.5px; color: var(--ink-3); }

.side { display: flex; flex-direction: column; gap: 16px; }
.side .card { margin: 0; }
@media (min-width: 961px) { .side.sticky { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; } }
.gradecard { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.gradecard .what { font-weight: 800; font-size: 18px; }
.gradecard .why { color: var(--ink-3); font-size: 14px; }
.breakdown { list-style: none; margin: 14px 0 0; padding: 0; font-size: 14px; }
.breakdown li { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); }
.breakdown li b { font-variant-numeric: tabular-nums; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 18px; box-shadow: var(--shadow-1); }
.card h2 { font-size: 21px; }
.card.soft { background: var(--bg-2); box-shadow: none; }

.bbody { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; margin-top: 26px; padding-bottom: 60px; }
@media (max-width: 960px) { .bbody { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; position: sticky; top: var(--header-h); background: #fff; z-index: 4; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 14px 14px 12px; font-weight: 700; font-size: 15px; color: var(--ink-3); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.tabs button .n { font-weight: 600; color: var(--ink-3); margin-left: 4px; font-size: 13px; }

.flags { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.flags li { padding: 14px 16px; border-radius: 12px; background: var(--bg-2); display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.flags li .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); margin-top: 7px; }
.flags li.high { background: var(--coral-soft); }
.flags li.high .dot { background: var(--coral); }
.flags li strong { display: block; }
.flags li p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 16px; }
.stat { background: var(--bg-2); border-radius: 12px; padding: 12px 14px; }
.stat .n { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13px; color: var(--ink-3); }
.stat.warn .n { color: var(--warn-ink); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-3); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
tr:hover td { background: #fafbfc; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 108px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.timeline li .d { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.timeline li .k { display: inline-block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 99px; background: var(--bg-3); color: var(--ink-2); margin-right: 6px; }
.timeline li.eviction .k { background: var(--coral); color: #fff; }
.timeline li.permit .k { background: var(--brand-soft); color: var(--brand); }

.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.notice { padding: 13px 16px; border-radius: 12px; background: var(--bg-2); font-size: 14.5px; margin-bottom: 12px; }
.notice.warn { background: var(--coral-soft); color: #7a2414; }
.notice.ok { background: var(--ok-soft); }

.skeleton { background: linear-gradient(90deg, var(--bg-3) 25%, #f7f9fb 50%, var(--bg-3) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading { color: var(--ink-3); padding: 16px 0; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 10px 0 0; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; margin-bottom: 14px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 14px; display: grid; place-items: center; }

/* ------------------------------------------------------------ owner + landlords */

.page-head { padding-top: 40px; padding-bottom: 24px; }
.page-head .lede { color: var(--ink-3); font-size: 18px; max-width: 720px; }
.owner-head { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.avatar { width: 72px; height: 72px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 28px; }
.gradebar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--bg-3); margin: 8px 0; }
.gradebar span { display: block; height: 100%; }
.owner-map { height: 360px; border-radius: var(--radius); overflow: hidden; position: relative; border: 1px solid var(--line); }
.lrow { display: grid; grid-template-columns: 44px 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px 6px; border-bottom: 1px solid var(--line); color: var(--ink); }
.lrow:hover { background: var(--bg-2); text-decoration: none; }
.lrow .rank { color: var(--ink-3); font-weight: 700; text-align: center; }
.lrow .nm b { display: block; }
.lrow .nm span { color: var(--ink-3); font-size: 13px; }
.lrow .num { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.lrow .num small { display: block; color: var(--ink-3); font-size: 12px; }
@media (max-width: 640px) { .lrow { grid-template-columns: 30px 1fr auto; } .lrow .hide-sm { display: none; } }

/* ------------------------------------------------------------ compare */

.compare th:first-child, .compare td:first-child { position: sticky; left: 0; background: #fff; }
.compare td { min-width: 180px; }
.compare .best { color: var(--ok); font-weight: 800; }

/* ------------------------------------------------------------ rent check */

.history-table input, .history-table select { padding: 7px 9px; font-size: 14px; border-radius: 8px; }
.history-table td { padding: 5px 4px; border-bottom: 0; }
.history-table tr:hover td { background: none; }
.history-table .money { width: 112px; }
.history-table .dt { width: 150px; }
.ok { color: var(--ok); font-weight: 700; }
.bad { color: var(--warn-ink); font-weight: 700; }
.big-number { font-size: 48px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--warn-ink); }
.result-card.over { border-left: 5px solid var(--coral); }
.result-card.clean { border-left: 5px solid var(--ok); }
.history-table select { min-width: 150px; }
.lease-list { list-style: none; padding: 0; margin: 0; }
.lease-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.lease-list li:last-child { border-bottom: none; }
.lease-list .head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-weight: 700; }
.lease-list .why { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
details.how { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; background: #fff; }
details.how > summary { padding: 16px 20px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.how > summary::-webkit-details-marker { display: none; }
details.how > summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 20px; line-height: 1; }
details.how[open] > summary::after { content: "–"; }
details.how .body { padding: 0 20px 16px; }

/* ------------------------------------------------------------ footer */

footer.site { background: var(--ink); color: rgba(255, 255, 255, 0.7); padding: 48px 0 40px; font-size: 14px; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
footer.site h4 { color: #fff; font-size: 14px; margin-bottom: 12px; letter-spacing: 0; }
footer.site a { color: rgba(255, 255, 255, 0.85); }
footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer.site .brand { color: #fff; margin-bottom: 12px; }
footer.site .fine { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 32px; padding-top: 20px; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }
@media (max-width: 760px) { footer.site .cols { grid-template-columns: 1fr; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-3); z-index: 100; }

@media print {
  header.site, footer.site, .no-print, .tabs, .bhero, .actions { display: none !important; }
  .card { box-shadow: none; break-inside: avoid; }
  .bhead, .bbody { grid-template-columns: 1fr; margin-top: 0; }
}

.aerial-pin span { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--coral); border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(255, 90, 60, 0.28), 0 2px 8px rgba(0, 0, 0, 0.45); }

[hidden] { display: none !important; }
.avatar svg { width: 34px; height: 34px; }
