/* RentoFly - light editorial theme. Knowledge-base layout: fixed sidebar
   of controls, scrollable result column, optional map. System font stack
   for speed, CSS custom properties for the palette. */

:root {
  --paper: #faf8f4;
  --card: #fffdf9;
  --ink: #1a1613;
  --muted: #5c544b;
  --faint: #9c9388;
  --line: #e6ddd0;
  --line-soft: #f1ece3;
  --accent: #db6a4a;       /* terracotta - editorial accent */
  --accent-soft: #f7e6dd;
  --rapid: #e4007c;     /* Rapid Metro magenta */
  --yellow: #f5b301;    /* Delhi Metro Yellow Line */
  --good: #15803d;
  --good-bg: #e7f5ec;
  --mid: #b45309;
  --mid-bg: #fdf3e3;
  --low: #b91c1c;
  --low-bg: #fbeaea;
  --shadow: 0 1px 2px rgba(20, 21, 26, .04), 0 8px 24px rgba(20, 21, 26, .05);
  --radius: 14px;
  --sidebar-w: 320px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.brand { min-width: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

[x-cloak] { display: none !important; }

/* ---------- Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(247, 246, 243, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand .tag { color: var(--muted); font-size: 12.5px; margin-top: 3px; letter-spacing: -.005em; }

/* Monochrome stylized wordmark: G TOWN pill + Rent~O~Fly with a roundel O */
.wordmark { display: flex; align-items: baseline; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 23px; letter-spacing: -.01em; color: var(--ink); line-height: 1; }
.wordmark::after { content: "."; color: var(--accent); }
/* editorial serif touches across app + auth */
.score, .panel h2, .count b, .auth-card h1, .sc-title { font-family: "Fraunces", Georgia, serif; }
.score { font-weight: 600; }
.brand.center .wordmark { justify-content: center; }
.wordmark .gtown { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; border: 1.5px solid var(--ink); border-radius: 6px; padding: 3px 7px; margin-right: 10px; }
.wordmark .rof { display: inline-flex; align-items: center; }
.wordmark .tld { color: var(--faint); font-weight: 500; margin: 0 1px; transform: translateY(-2px); }
.wordmark .o { display: inline-flex; align-items: center; justify-content: center; width: .98em; height: .98em; border: 2.5px solid var(--ink); border-radius: 50%; font-size: .64em; font-weight: 700; margin: 0 1.5px; }

/* Navbar stays monochrome */
.topbar .btn:hover { border-color: var(--ink); color: var(--ink); }
.topbar .spacer { flex: 1; }
.freshness { font-size: 12px; color: var(--faint); text-align: right; line-height: 1.3; }
.freshness b { color: var(--muted); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 8px 13px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-deep, #c2553a); color: #fff; }
.btn svg { width: 15px; height: 15px; }
.btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Shell ---------- */
.shell { display: flex; align-items: flex-start; }
/* Sidebar is an off-canvas drawer on every viewport, toggled by the hamburger */
.sidebar {
  position: fixed;
  left: 0; top: 58px; bottom: 0;
  width: min(330px, 88vw);
  z-index: 1100;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 26px 20px 60px;
  background: var(--paper);
  transform: translateX(-100%);
  transition: transform .22s ease;
  box-shadow: var(--shadow);
}
.sidebar.open { transform: translateX(0); }
.sb-bar { display: none; }   /* mobile-only drawer header (see media query) */
.sb-body { display: contents; }   /* desktop: transparent wrapper; mobile: scroll container */
.scrim { position: fixed; inset: 58px 0 0 0; background: rgba(20, 21, 26, .32); z-index: 1080; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

.main { flex: 1; min-width: 0; padding: 18px 22px 80px; }

/* ---------- Sidebar groups ---------- */
.group { margin-bottom: 20px; }
.group h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--faint); margin: 0 0 9px; font-weight: 700;
}
.search {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); font-size: 14px; color: var(--ink);
}
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  padding: 6px 11px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  user-select: none; transition: all .12s ease; font-weight: 600;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.on.rapid { background: var(--rapid); border-color: var(--rapid); }
.chip.on.yellow { background: var(--yellow); border-color: var(--yellow); color: #4a3500; }

.field { margin-bottom: 12px; }
.field label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.field label .val { color: var(--ink); }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 4px; }
select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); font-size: 13.5px; color: var(--ink);
}
select:focus { outline: none; border-color: var(--accent); }

.weights .field label .val { color: var(--accent); font-variant-numeric: tabular-nums; }
.linkbtn { background: none; border: none; color: var(--accent); font-size: 12.5px; cursor: pointer; padding: 0; font-weight: 600; }
.linkbtn:hover { text-decoration: underline; }

.statline { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; color: var(--muted); }
.statline b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Main toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.count { font-size: 14px; color: var(--muted); }
.count b { color: var(--ink); font-size: 16px; }
.toolbar .spacer { flex: 1; }
.viewtabs { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.viewtabs button { border: none; background: none; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.viewtabs button.on { background: var(--accent); color: #fff; }

/* ---------- Layout modes ---------- */
.content.list .map-wrap { display: none; }
.content.map .grid { display: none; }
.content.map .map-wrap { display: block; }
.content.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.content.split .map-wrap { position: sticky; top: 130px; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.content.split .grid { grid-template-columns: 1fr; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; cursor: pointer; transition: all .15s ease; position: relative;
}
.card:hover { box-shadow: var(--shadow); border-color: #d8d5cf; transform: translateY(-1px); }
.card.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.card .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card .title { font-weight: 650; font-size: 15px; letter-spacing: -.01em; line-height: 1.35; }
.card .area { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.score {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; line-height: 1; font-variant-numeric: tabular-nums;
}
.score small { font-size: 8px; font-weight: 700; opacity: .7; margin-top: 2px; letter-spacing: .04em; }
.score.good { background: var(--good-bg); color: var(--good); }
.score.mid { background: var(--mid-bg); color: var(--mid); }
.score.low { background: var(--low-bg); color: var(--low); }

.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { font-size: 11.5px; padding: 3px 9px; border-radius: 7px; background: var(--line-soft); color: var(--muted); font-weight: 600; }
.tag.type { background: var(--accent-soft); color: var(--accent); }
.tag.metro { background: #fde7f3; color: var(--rapid); }
.tag.metro.yellow { background: #fdf3d6; color: #8a6500; }
.tag.approx { background: transparent; color: var(--faint); border: 1px dashed var(--line); }
.card .priceline { display: flex; align-items: baseline; justify-content: space-between; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.price { font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.price small { font-size: 12px; color: var(--faint); font-weight: 500; }
.card .src { font-size: 12px; color: var(--faint); }

/* ---------- Map ---------- */
.map-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: calc(100vh - 150px); min-height: 460px; }
#map { width: 100%; height: 100%; }
.leaflet-container { font: inherit; background: #eceae5; }
.pin-label { font-weight: 700; font-size: 11px; }

/* ---------- Detail panel ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,21,26,.4); z-index: 2000; backdrop-filter: blur(2px); }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 92vw); z-index: 2001;
  background: var(--card); box-shadow: -10px 0 40px rgba(0,0,0,.18); overflow-y: auto;
  padding: 22px 24px 50px; animation: slidein .22s ease;
}
@keyframes slidein { from { transform: translateX(100%); } to { transform: translateX(0); } }
.panel .close { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; }
.panel h2 { font-size: 20px; letter-spacing: -.02em; margin: 4px 60px 6px 0; }
.panel .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.panel .bigscore { display: flex; align-items: center; gap: 14px; margin: 16px 0 20px; padding: 16px; border-radius: 12px; }
.panel .bigscore .score { width: 60px; height: 60px; font-size: 22px; }
.panel .bigscore .label { font-size: 13px; color: var(--muted); }
.panel .bigscore .label b { color: var(--ink); display: block; font-size: 15px; }

.bars { margin: 18px 0; }
.bar { margin-bottom: 11px; }
.bar .lab { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.bar .lab .n { color: var(--muted); font-weight: 600; }
.bar .lab .w { color: var(--faint); font-size: 11px; }
.bar .track { height: 7px; background: var(--line-soft); border-radius: 6px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 6px; background: var(--accent); transition: width .3s ease; }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 13.5px; margin: 16px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; }
.panel .minimap { height: 200px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin: 16px 0; }

/* ---------- States ---------- */
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty .big { font-size: 17px; color: var(--ink); margin-bottom: 6px; font-weight: 600; }
.loading { text-align: center; padding: 80px; color: var(--muted); }

/* Full-screen loader — covers the app until the active city's data is ready */
.app-loader {
  position: fixed; inset: 0; z-index: 6000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: var(--paper);
}
.app-loader .al-mark { font-family: "Fraunces", Georgia, serif; font-size: 36px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.app-loader .al-ring { width: 40px; height: 40px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.app-loader .al-phrase { font-size: 15px; font-weight: 500; color: var(--muted); min-height: 1.3em; transition: opacity .2s ease; }
.app-loader .al-mark .dot { color: var(--accent); }

/* "Filters applied" toast — one balloon, +N counter for rapid changes */
.filter-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2500;
  background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
.filter-toast .ft-n { background: var(--accent); color: #fff; padding: 1px 8px; border-radius: 999px; font-size: 12px; }
.notice { background: var(--accent-soft); border: 1px solid #ecd6cb; color: #8a4636; border-radius: 10px; padding: 10px 13px; font-size: 12.5px; margin-bottom: 16px; }
.footer { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; line-height: 1.6; }

/* ---------- Pagination ---------- */
.showmore { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; padding: 22px 0 6px; }
.showmore-count { color: var(--muted); font-size: 13px; }
.showmore-count b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .content.split { grid-template-columns: 1fr; }
  .content.split .map-wrap { position: relative; top: 0; }
  .content.split .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
.menu-toggle { display: inline-flex; align-items: center; gap: 7px; }
.menu-toggle .mt-label { font-size: 13px; font-weight: 600; }

@media (max-width: 760px) {
  .topbar { gap: 10px; padding: 10px 13px; }
  .freshness { display: none; }
  .brand .tag { display: none; }
  .wordmark { font-size: 17px; }
  .wordmark .gtown { font-size: 9px; margin-right: 7px; padding: 3px 6px; }
  .topbar .btn span { display: none; }       /* icon-only Sync on phones */
  .topbar .btn svg { width: 16px; height: 16px; }
  .topbar .gh { display: none; }             /* GitHub link moves to footer on phones */
  .viewtabs .vt-split { display: none; }      /* split view is desktop/tablet only */
  .main { padding: 14px 13px 70px; }
  .notice { font-size: 12px; padding: 9px 11px; }
  .toolbar { gap: 8px; }
  .toolbar .count { width: 100%; order: -1; }
  .toolbar select { flex: 1; }
  .grid, .content.split .grid { grid-template-columns: 1fr; }
  .map-wrap { height: 64vh; min-height: 380px; }
  .panel { width: 100vw; padding: 20px 18px 50px; }
  .group { margin-bottom: 16px; }
  .toolbar .spacer { display: none; }        /* no growing gap that pushes tabs off-screen */
  .toolbar select { min-width: 0; flex: 1; }

  /* Phones: the header is taller (city tabs wrap to their own row), so the
     sidebar becomes a full-height drawer ABOVE the header. It's a flex COLUMN:
     a fixed header bar (never scrolls) + a scrolling body — no sticky glitch. */
  .sidebar {
    top: 0; z-index: 2200; padding: 0; overflow: hidden;
    display: flex; flex-direction: column; width: min(340px, 90vw);
  }
  .scrim { inset: 0; z-index: 2150; }
  .sb-bar {
    display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto;
    padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--paper);
    font-weight: 700; font-size: 13.5px; color: var(--ink);
  }
  .sb-close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 6px; }
  .sb-body {
    display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto;
    padding: 16px 18px 60px; -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 380px) {
  .wordmark .gtown { display: none; }       /* tightest screens: drop the pill */
  .viewtabs button { padding: 8px 10px; }
}

/* Preset quick-pick buttons */
.presets { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.presets .lbl { font-size: 12px; color: var(--faint); font-weight: 600; }
.preset { border: 1px solid var(--line); background: var(--card); color: var(--muted); padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .12s ease; }
.preset:hover { border-color: var(--accent); color: var(--accent); }
.preset.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.tag.est { background: #f1ecff; color: #6d28d9; }
.checkrow { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; cursor: pointer; margin: 6px 0 10px; }
.checkrow input { accent-color: var(--accent); width: 15px; height: 15px; }

/* Compact cards on desktop/tablet (the sidebar is a drawer now, so more room) */
@media (min-width: 761px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 12px; }
  .content.split .grid { grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); }
  .card { padding: 13px 14px; }
  .card .title { font-size: 14px; }
  .card .score { width: 42px; height: 42px; font-size: 15px; }
  .card .score small { font-size: 7px; }
  .card .priceline { margin-top: 10px; padding-top: 9px; }
  .card .price { font-size: 16px; }
  .card .meta { margin-top: 9px; }
}

@media (max-width: 760px) {
  .menu-toggle .mt-label { display: none; }   /* icon-only hamburger on phones */
  .presets .lbl { display: none; }
}

/* ---------- City tabs + auth (app header) ---------- */
a.brand { text-decoration: none; color: inherit; }
a.brand:hover { text-decoration: none; }
.citytabs { display: inline-flex; gap: 4px; margin-left: 14px; background: var(--line-soft); padding: 3px; border-radius: 11px; overflow-x: auto; max-width: 46vw; }
.citytab { border: none; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 8px; cursor: pointer; white-space: nowrap; transition: all .12s ease; }
.citytab:hover { color: var(--ink); }
.citytab.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(20,21,26,.08); }
.authbox { display: inline-flex; align-items: center; gap: 8px; }
.userchip { font-size: 13px; font-weight: 600; color: var(--ink); background: var(--line-soft); padding: 7px 11px; border-radius: 999px; }
.btn.big { padding: 11px 20px; font-size: 14.5px; border-radius: 11px; }

@media (max-width: 760px) {
  .citytabs { margin-left: 8px; max-width: none; order: 3; width: 100%; margin-top: 2px; }
  .topbar { flex-wrap: wrap; }
  .signin-btn { padding: 8px 12px; }
}

/* ---------- Landing page (editorial: Fraunces + terracotta on warm white) ---------- */
body.landing {
  --paper: #faf8f4; --paper2: #f1ece3; --ink: #1a1613; --ink-soft: #5c544b; --faint: #9c9388;
  --coral: #db6a4a; --coral-deep: #c2553a; --coral-tint: #f7e6dd; --line: #e6ddd0; --card: #fffdf9;
  background: var(--paper); color: var(--ink); position: relative;
}
body.landing ::selection { background: var(--coral); color: #fff; }
.landing .display, .landing .sec-h, .landing .logo, .landing .cc-name, .landing .cc-idx,
.landing .step-no, .landing .sc-badge, .landing .num, .landing .sc-title, .landing .sc-foot span:first-child,
.landing .step h3, .landing .marquee-track { font-family: "Fraunces", Georgia, serif; }
.landing em { font-style: italic; color: var(--coral); }

.route-bg { position: absolute; top: 0; left: 0; width: 100%; height: 760px; color: var(--coral); opacity: .10; pointer-events: none; z-index: 0; }

.ln-nav { position: relative; z-index: 2; display: flex; align-items: center; gap: 22px; padding: 22px 40px; max-width: 1240px; margin: 0 auto; }
.landing a.brand { text-decoration: none; }
.landing .logo { font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.landing .logo i { color: var(--coral); font-style: normal; }
.ln-links { display: flex; gap: 22px; }
.ln-links a { font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.ln-links a:hover { color: var(--coral); }
.ln-nav .spacer { flex: 1; }
.ln-ghost { font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 9px 4px; }
.ln-ghost:hover { color: var(--coral); }
.ln-cta { font-size: 14px; font-weight: 600; color: #fff; background: var(--coral); padding: 10px 18px; border-radius: 999px; text-decoration: none; transition: all .15s ease; }
.ln-cta:hover { background: var(--coral-deep); transform: translateY(-1px); color: #fff; text-decoration: none; }
.ln-cta.big { font-size: 16px; padding: 15px 26px; }

.hero { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 56px 40px 36px; }
.display { font-weight: 400; letter-spacing: -.025em; line-height: .98; margin: 0; }
.hero .display { font-size: clamp(46px, 9vw, 118px); }
.hero .display span { display: block; }
.hero .display em { font-weight: 500; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk", sans-serif; font-size: 12.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--coral); margin-bottom: 26px; }
.eyebrow i { color: var(--faint); font-style: normal; }
.hero .lede { font-family: "Space Grotesk", sans-serif; font-size: clamp(16px, 1.7vw, 20px); line-height: 1.6; color: var(--ink-soft); max-width: 620px; margin: 30px 0 0; }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 34px; }
.hero-actions.center { justify-content: center; }
.ln-text-link { font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--coral); padding-bottom: 2px; }
.ln-text-link:hover { color: var(--coral); }
.hero-stats { display: flex; gap: 48px; margin-top: 56px; flex-wrap: wrap; }
.hstat { display: flex; flex-direction: column; }
.hstat .num { font-size: 44px; font-weight: 400; line-height: 1; color: var(--ink); }
.hstat .lab { font-family: "Space Grotesk", sans-serif; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-top: 8px; }

.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin-top: 40px; background: var(--paper2); }
.marquee-track { display: inline-flex; align-items: center; gap: 18px; white-space: nowrap; animation: marquee 38s linear infinite; font-size: 22px; color: var(--ink); will-change: transform; }
.marquee-track i { color: var(--coral); font-style: normal; }
.marquee-track span { font-style: italic; }
@keyframes marquee { to { transform: translateX(-50%); } }

.sec-head { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.sec-kicker { font-family: "Space Grotesk", sans-serif; font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--coral); }
.sec-h { font-size: clamp(30px, 5vw, 56px); font-weight: 400; letter-spacing: -.02em; line-height: 1.02; margin: 16px 0 0; color: var(--ink); }

.cities-sec { padding: 90px 0 30px; }
.city-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; max-width: 1240px; margin: 38px auto 0; padding: 0 40px; }
.city-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.city-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(26,22,19,.10); border-color: var(--coral); text-decoration: none; }
.cc-idx { position: absolute; top: 16px; right: 22px; font-size: 40px; color: var(--coral-tint); }
.cc-name { font-size: 38px; font-weight: 400; letter-spacing: -.02em; }
.cc-transit { font-family: "Space Grotesk", sans-serif; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.cc-count { font-family: "Space Grotesk", sans-serif; font-size: 14px; font-weight: 700; color: var(--coral); margin-top: 22px; }
.cc-go { font-family: "Space Grotesk", sans-serif; font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 6px; }
.cc-go i { font-style: normal; display: inline-block; transition: margin .2s ease; }
.city-card:hover .cc-go i { margin-left: 6px; color: var(--coral); }

.how { padding: 90px 0 30px; }
.steps { max-width: 1240px; margin: 30px auto 0; padding: 0 40px; }
.step { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 34px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-no { font-size: 56px; font-weight: 300; color: var(--coral); line-height: 1; }
.step h3 { font-size: 26px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 10px; }
.step p { font-family: "Space Grotesk", sans-serif; font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); margin: 0; max-width: 640px; }

.score-sec { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; max-width: 1240px; margin: 90px auto 0; padding: 60px 40px; }
.score-copy .sec-h { margin-top: 14px; }
.score-copy p { font-family: "Space Grotesk", sans-serif; font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin: 20px 0 24px; max-width: 460px; }
.score-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: 0 18px 50px rgba(26,22,19,.08); }
.sc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.sc-title { font-size: 21px; font-weight: 500; }
.sc-sub { font-family: "Space Grotesk", sans-serif; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.sc-badge { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 14px; background: var(--coral-tint); color: var(--coral-deep); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 26px; font-weight: 500; }
.sc-badge small { font-family: "Space Grotesk", sans-serif; font-size: 8px; letter-spacing: .1em; font-weight: 700; }
.sc-bars { margin: 22px 0; display: flex; flex-direction: column; gap: 12px; }
.sc-bar { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 12px; font-family: "Space Grotesk", sans-serif; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.sc-bar .track { height: 8px; background: var(--paper2); border-radius: 6px; overflow: hidden; }
.sc-bar .track i { display: block; height: 100%; background: var(--coral); border-radius: 6px; }
.sc-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.sc-foot span:first-child { font-size: 22px; font-weight: 500; }
.sc-foot small { font-family: "Space Grotesk", sans-serif; font-size: 12px; color: var(--faint); font-weight: 500; }
.sc-tag { font-family: "Space Grotesk", sans-serif; font-size: 12px; font-weight: 600; color: var(--coral); background: var(--coral-tint); padding: 5px 11px; border-radius: 999px; }

.cta-band { text-align: center; max-width: 1000px; margin: 90px auto 0; padding: 80px 40px; }
.cta-band .display { font-size: clamp(30px, 5.5vw, 64px); line-height: 1.04; margin: 0 0 36px; }

.ln-footer { max-width: 1240px; margin: 80px auto 0; padding: 40px; border-top: 1px solid var(--line); }
.lf-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.lf-top .logo { font-size: 22px; }
.lf-top nav { display: flex; gap: 22px; margin-left: auto; }
.lf-top nav a { font-family: "Space Grotesk", sans-serif; font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.lf-top nav a:hover { color: var(--coral); }
.lf-fine { font-family: "Space Grotesk", sans-serif; font-size: 12.5px; line-height: 1.6; color: var(--faint); margin: 24px 0 0; max-width: 760px; }

@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow, .hero .display span, .hero .lede, .hero-actions, .hero-stats { animation: rise .7s both; }
  .hero .display .r1 { animation-delay: .05s; }
  .hero .display .r2 { animation-delay: .12s; }
  .hero .display .r3 { animation-delay: .19s; }
  .hero .lede { animation-delay: .26s; }
  .hero-actions { animation-delay: .33s; }
  .hero-stats { animation-delay: .4s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 860px) {
  .ln-links { display: none; }
  .ln-nav { padding: 16px 20px; gap: 12px; }
  .hero { padding: 30px 20px; }
  .sec-head, .city-cards, .steps, .score-sec, .cta-band, .ln-footer { padding-left: 20px; padding-right: 20px; }
  .score-sec { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; }
  .step { grid-template-columns: 60px 1fr; gap: 14px; }
  .step-no { font-size: 34px; }
  .hero-stats { gap: 30px; }
  .hstat .num { font-size: 34px; }
  .cities-sec, .how { padding-top: 60px; }
  .lf-top nav { margin-left: 0; gap: 14px; flex-wrap: wrap; }
}

/* ---------- Auth pages ---------- */
body.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 32px 30px; box-shadow: var(--shadow); }
.brand.center { display: block; text-align: center; margin-bottom: 20px; }
.brand.center .wordmark { justify-content: center; font-size: 26px; }
.auth-card h1 { font-size: 23px; letter-spacing: -.02em; margin: 0 0 6px; text-align: center; }
.auth-sub { color: var(--muted); font-size: 14px; text-align: center; margin: 0 0 22px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.auth-form input { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); background: var(--paper); }
.auth-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--card); }
.auth-err { color: var(--low); font-size: 12.5px; min-height: 16px; font-weight: 600; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--muted); margin: 18px 0 0; }
.auth-demo { text-align: center; font-size: 11.5px; color: var(--faint); margin: 16px 0 0; line-height: 1.5; }
.auth-skip { display: block; text-align: center; font-size: 13px; font-weight: 600; margin-top: 16px; }

/* ---------- Map: clustered dots + tooltips (editorial coral) ---------- */
.marker-cluster { background: transparent; }
.marker-cluster div {
  background: var(--accent, #db6a4a); color: #fff; font-family: "Space Grotesk", sans-serif;
  font-weight: 700; font-size: 12px; width: 34px; height: 34px; margin-left: 3px; margin-top: 3px;
  border-radius: 50%; box-shadow: 0 0 0 5px rgba(219,106,74,.25); display: flex; align-items: center; justify-content: center;
}
.marker-cluster-large div { width: 40px; height: 40px; box-shadow: 0 0 0 7px rgba(219,106,74,.22); }
.marker-cluster-small div { background: #c2553a; }
.leaflet-tooltip.pin-tip {
  background: #14151a; color: #fff; border: none; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  font-family: "Space Grotesk", sans-serif; font-size: 12px; padding: 7px 10px;
}
.leaflet-tooltip.pin-tip::before { border-top-color: #14151a; }
.pin-tip-in b { font-weight: 600; }
.pin-tip .pp-score { font-weight: 800; margin-right: 4px; }
.pin-tip .pp-walk { color: #b9b2a8; font-size: 11px; }
.leaflet-container { cursor: grab; }
.leaflet-interactive { cursor: pointer; }
