/* Signalhood v2 — neighbourhood page styles */

.topbar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 44px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(231, 224, 214, 0.8);
    position: sticky;
    top: 0;
    z-index: 20;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--navy);
    font-size: 21px;
}

.logo-mark {
    width: 27px;
    height: 27px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #dca45b, #f3d8a6);
    color: var(--navy);
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(201, 137, 59, 0.24);
}

.topbar nav {
    display: flex;
    gap: 28px;
    font-size: 14px;
    color: #344054;
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.global-search {
    width: 255px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 16px;
    color: var(--muted);
    background: #fff;
    font-size: 13px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gold) center/cover;
    border: 2px solid #fff;
    box-shadow: var(--shadow-soft);
}

/* Hero */
.hero {
    position: relative;
    min-height: 480px;
    padding: 52px 0 110px;
    color: #fff;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 18, 34, 0.88) 0%, rgba(7, 18, 34, 0.58) 48%, rgba(7, 18, 34, 0.25) 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 140px;
    background: linear-gradient(to bottom, rgba(251, 250, 247, 0), #fbfaf7);
    pointer-events: none;
}

.breadcrumbs {
    color: rgba(255,255,255,.76);
    font-size: 13px;
    margin-bottom: 48px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.hero h1 {
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(54px, 8vw, 92px);
    line-height: .9;
    letter-spacing: -0.06em;
    font-weight: 500;
}

.hero-subtitle {
    font-size: 25px;
    line-height: 1.25;
    max-width: 600px;
    margin: 0 0 22px;
    color: rgba(255,255,255,.92);
}

.save-btn {
    height: 40px;
    padding: 0 17px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.32);
    background: rgba(255,255,255,.08);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 38px;
}

.stat-card {
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(8, 24, 45, 0.48);
    backdrop-filter: blur(16px);
    border-radius: 18px;
    padding: 18px;
    min-height: 98px;
}

.stat-top {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.74);
    font-size: 13px;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.1);
    color: #f3d8a6;
}

.stat-value {
    margin: 10px 0 3px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.stat-note {
    font-size: 12px;
    color: #9ee2b6;
}

/* Search dock */
.search-dock {
    margin-top: -56px;
    z-index: 5;
}

.search-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 12px;
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr) auto;
    align-items: center;
    gap: 6px;
}

.search-cell {
    min-height: 64px;
    border-right: 1px solid #eee7dd;
    padding: 8px 16px;
}

.search-cell:last-of-type { border-right: 0; }

.search-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 6px;
}

.search-value {
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
}

/* Page grid */
.page-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    margin-top: 32px;
    align-items: start;
}
/* Let grid columns shrink below their content's min-width — otherwise the Mapbox
   canvas's intrinsic pixel width forces the whole content column (and every section)
   ~1261px wide on mobile, blowing out the layout. */
.page-grid > * { min-width: 0; }
.mapboxgl-canvas, #signalhood-explore-map canvas, #signalhood-map canvas { max-width: 100%; }
/* Gate-CTA grid moved off inline styles so it can stack on mobile. */
#sh-gate-cta { grid-template-columns: 1fr 380px; }
@media (max-width: 760px) { #sh-gate-cta { grid-template-columns: 1fr; } }

/* Filter rail */
.filter-rail {
    position: sticky;
    top: 96px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 22px;
}

.filter-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.filter-head h3 { margin: 0; font-size: 16px; letter-spacing: -0.03em; }

.reset { color: var(--muted); font-size: 12px; text-decoration: underline; }

.filter-group { border-top: 1px solid #efe8df; padding-top: 18px; margin-top: 18px; }
.filter-group:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

.filter-title { font-weight: 800; font-size: 13px; margin-bottom: 12px; }

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 24px 1fr;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}

.mini-input {
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 10px;
    color: var(--muted);
    background: #fbfaf7;
    display: flex;
    align-items: center;
    font-size: 12px;
}

.range {
    margin: 16px 0 10px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold) 68%, #ded7cd 68%);
    border-radius: 999px;
    position: relative;
}

.range::before, .range::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    background: white;
    border: 2px solid var(--gold);
    border-radius: 50%;
}

.range::before { left: 0; }
.range::after { left: 68%; }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }

.mini-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 11px;
    color: #475467;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}

.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: #475467; font-size: 13px; }
.check input { accent-color: var(--gold); }

.toggle-row {
    display: grid;
    grid-template-columns: 32px 1fr 34px;
    gap: 10px;
    align-items: center;
    margin: 16px 0;
}

.toggle-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--soft);
    color: var(--navy);
}

.toggle-copy strong { display: block; font-size: 13px; }
.toggle-copy span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.switch {
    height: 19px;
    width: 34px;
    border-radius: 999px;
    background: #e8e4dd;
    position: relative;
    cursor: pointer;
}

.switch::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 13px;
    height: 13px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,.18);
}

.more {
    width: 100%;
    height: 40px;
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--gold-dark);
    font-weight: 800;
    cursor: pointer;
}

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }

.tab {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    height: 38px;
    padding: 0 17px;
    color: #475467;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}

.tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Listings */
.listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.listing-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform .2s ease, box-shadow .2s ease;
}

.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.listing-img {
    height: 174px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(9, 32, 56, .82);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .03em;
}

.heart {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.86);
    display: grid;
    place-items: center;
    color: var(--navy);
    font-size: 18px;
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.listing-body { padding: 15px; }

.price { font-size: 21px; font-weight: 900; letter-spacing: -0.05em; margin-bottom: 5px; color: var(--navy); }
.meta { color: #475467; font-size: 13px; margin-bottom: 9px; font-weight: 650; }
.address { color: var(--muted); font-size: 12px; line-height: 1.35; }

/* Expert card */
.expert-card {
    display: grid;
    grid-template-columns: 180px 1fr 240px;
    gap: 25px;
    align-items: center;
    background: linear-gradient(135deg, #fff 0%, #fbf6ed 100%);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    padding: 18px;
    overflow: hidden;
    margin-bottom: 46px;
}

.agent-photo {
    height: 182px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
}

.expert-card h3 {
    margin: 0 0 9px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    letter-spacing: -0.05em;
    font-weight: 500;
    color: var(--navy);
}

.quote { color: #344054; line-height: 1.6; font-size: 14px; margin-bottom: 15px; }
.signature { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 21px; color: var(--navy); }
.disclosure { font-size: 11px; color: var(--muted); margin-top: 4px; }

.expert-actions { display: grid; gap: 10px; }
.phone { text-align: center; color: #475467; font-size: 13px; font-weight: 800; }
.legal-small { grid-column: 1 / -1; border-top: 1px solid #eee1d1; padding-top: 10px; font-size: 11px; color: var(--muted); text-align: center; }

/* Professional Directory */
.directory { margin-bottom: 46px; }

.dir-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.dir-tabs::-webkit-scrollbar { display: none; }

.dir-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #475467;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}
.dir-tab:hover { border-color: var(--gold); color: var(--navy); }
.dir-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.dir-tab.active .dir-tab-icon svg { stroke: #fff; }
.dir-tab-icon { display: flex; align-items: center; }

.dir-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
}

.dir-panel { margin-bottom: 0; }

/* Active sponsor card */
.dir-sponsor {
    display: grid;
    grid-template-columns: 200px 1fr 260px;
    gap: 28px;
    background: linear-gradient(135deg, #fff 0%, #fbf6ed 100%);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    padding: 24px;
    overflow: hidden;
}

.dir-sponsor-photo {
    height: 220px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: var(--soft);
}

.dir-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 5px 12px;
    background: rgba(11, 28, 51, 0.85);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 8px;
    letter-spacing: 0.02em;
}

.dir-sponsor-info h3 {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    letter-spacing: -0.04em;
    font-weight: 500;
    color: var(--navy);
}

.dir-sponsor-title {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 14px;
}

.dir-sponsor-quote {
    color: #344054;
    line-height: 1.6;
    font-size: 14px;
    font-style: italic;
    margin-bottom: 16px;
}

.dir-sponsor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-dark);
}
.dir-sponsor-meta a { text-decoration: underline; }

.dir-sponsor-action { display: grid; gap: 10px; align-content: start; }

.dir-input {
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    background: #fff;
    width: 100%;
}

.dir-consent {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}

/* Empty slot CTA */
.dir-empty {
    display: grid;
    grid-template-columns: 56px 1fr 220px;
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg, #fff 0%, #f8f5ef 100%);
    border: 2px dashed #d5cbbf;
    border-radius: 22px;
    padding: 28px;
}

.dir-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--soft);
    display: grid;
    place-items: center;
    color: var(--gold-dark);
}
.dir-empty-icon svg { width: 26px; height: 26px; }

.dir-empty-content h3 {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    letter-spacing: -0.04em;
    font-weight: 500;
    color: var(--navy);
}

.dir-empty-content p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.dir-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13px;
    color: #475467;
    font-weight: 600;
}

.dir-empty-cta {
    display: grid;
    gap: 12px;
    text-align: center;
}

.dir-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.dir-price-amount {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--navy);
}

.dir-price-period {
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
}

.dir-legal {
    margin-top: 14px;
    font-size: 11px;
    color: var(--muted);
    text-align: center;
}

/* Scores */
.score-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.scores { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 18px; }

.score-box {
    border: 1px solid #eee7dd;
    border-radius: 17px;
    padding: 17px 12px;
    text-align: center;
    background: #fff;
}

.score-icon { font-size: 21px; margin-bottom: 7px; }
.score-label { font-size: 12px; color: #475467; font-weight: 800; margin-bottom: 7px; }
.score-number { font-size: 28px; font-weight: 950; color: var(--navy); letter-spacing: -0.06em; line-height: 1; }
.score-word { font-size: 11px; color: var(--green); font-weight: 900; margin-top: 4px; }

.meter { margin-top: 11px; height: 6px; border-radius: 999px; background: #e9ece7; overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--w, 88%); background: var(--green); border-radius: 999px; }

/* Vibe grid */
.vibe-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr 1.25fr;
    grid-template-rows: 150px 150px;
    gap: 14px;
}

.vibe-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-soft);
    min-height: 140px;
    cursor: pointer;
    display: block;
}

.vibe-card.large { grid-row: span 2; }
.vibe-card.tall { grid-row: span 2; }

.vibe-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 20, 38, .72), rgba(6,20,38,.08));
    transition: background .2s ease;
}

.vibe-card:hover::before { background: linear-gradient(to top, rgba(6, 20, 38, .82), rgba(6,20,38,.22)); }

.vibe-copy { position: absolute; left: 16px; right: 16px; bottom: 14px; color: #fff; }
.vibe-copy h4 { margin: 0 0 4px; font-size: 16px; letter-spacing: -0.03em; }
.vibe-copy p { margin: 0; font-size: 12px; color: rgba(255,255,255,.82); font-weight: 650; }

.vibe-hover { opacity: 0; transform: translateY(8px); transition: all .2s ease; margin-top: 8px; font-size: 12px; color: #f3d8a6; font-weight: 900; }
.vibe-card:hover .vibe-hover { opacity: 1; transform: translateY(0); }

/* Map grid */
.map-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }

.map-container {
    min-height: 395px;
    border-radius: 22px;
    border: 1px solid var(--line);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #dcebed, #fbf1dc 60%, #bdd9e6);
}

.info-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.map-tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); }

.map-tab {
    padding: 14px 8px;
    text-align: center;
    font-size: 12px;
    color: #475467;
    font-weight: 800;
    border-right: 1px solid #eee7dd;
    cursor: pointer;
}

.map-tab.active { color: var(--navy); background: #fbf7ef; }

.commute-list { padding: 18px; }

.commute-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #eee7dd;
}

.commute-item:last-child { border-bottom: 0; }

.commute-icon {
    width: 39px;
    height: 39px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--soft);
    color: var(--navy);
}

.commute-title { font-weight: 900; color: var(--navy); margin-bottom: 2px; }
.commute-sub { color: var(--muted); font-size: 12px; }

.time { text-align: right; color: var(--green); font-weight: 950; font-size: 24px; letter-spacing: -0.05em; }
.time span { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0; font-weight: 800; }

/* Schools */
.school-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.school-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 17px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.school-img { height: 112px; background-size: cover; background-position: center; }

.school-body {
    padding: 13px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
}

.school-name { font-weight: 900; margin-bottom: 4px; color: var(--navy); }
.school-type { color: var(--muted); font-size: 12px; line-height: 1.35; }

.rating { font-weight: 950; color: var(--navy); font-size: 21px; letter-spacing: -0.05em; }
.rating small { font-size: 11px; color: var(--muted); font-weight: 700; }

/* Money section */
.money {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    padding: 22px;
    display: grid;
    grid-template-columns: 1.05fr .8fr 1fr;
    gap: 22px;
    align-items: stretch;
}

.budget-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 20px; }

.budget-tab {
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #475467;
    font-weight: 850;
    font-size: 12px;
    cursor: pointer;
}

.budget-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.slider-row { margin: 17px 0; }
.slider-row label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 800; margin-bottom: 9px; }

.expect-card {
    background: #fbfaf7;
    border: 1px solid #eee7dd;
    border-radius: 17px;
    padding: 18px;
}

.expect-card h4 { margin: 0 0 16px; font-size: 15px; color: var(--navy); }
.expect-row { display: flex; gap: 10px; align-items: center; margin: 13px 0; color: #475467; font-weight: 750; }

.example-home {
    border-radius: 17px;
    overflow: hidden;
    position: relative;
    min-height: 230px;
    background-size: cover;
    background-position: center;
}

.example-home::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 18, 34, .78), transparent 60%);
}

.example-copy { position: absolute; left: 18px; bottom: 18px; color: #fff; }
.example-copy strong { display: block; font-size: 25px; letter-spacing: -0.05em; }

/* Compare */
.compare-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 18px; }

.hood-card {
    min-height: 140px;
    border-radius: 17px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line);
}

.hood-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8,20,37,.84), rgba(8,20,37,.15));
}

.hood-copy { position: absolute; left: 14px; right: 14px; bottom: 12px; color: #fff; }
.hood-copy h4 { margin: 0 0 2px; font-size: 16px; }
.hood-copy p { margin: 0 0 10px; font-size: 11px; color: rgba(255,255,255,.76); }

.score-pill { display: inline-flex; align-items: baseline; gap: 5px; font-weight: 900; font-size: 22px; }
.score-pill span { font-size: 11px; color: rgba(255,255,255,.8); }

/* Signup */
.signup {
    background: var(--navy);
    color: #fff;
    border-radius: 22px;
    padding: 32px 36px;
    display: grid;
    grid-template-columns: 1fr 430px;
    gap: 24px;
    align-items: center;
    box-shadow: var(--shadow);
}

.signup h3 {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    letter-spacing: -0.04em;
    font-weight: 500;
}

.signup p { margin: 0; color: rgba(255,255,255,.72); line-height: 1.5; }

.email-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    padding: 7px;
    border-radius: 15px;
}

.email-form input {
    border: 0;
    background: #fff;
    height: 44px;
    border-radius: 10px;
    padding: 0 15px;
    min-width: 0;
}

/* Footer */
.site-footer { padding: 32px 0 52px; color: var(--muted); font-size: 13px; }

.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; gap: 22px; }

/* Mobile filter */
.mobile-filter { display: none; }

/* Responsive */
@media (max-width: 1050px) {
    .topbar { padding: 0 22px; }
    .topbar nav, .global-search { display: none; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .search-panel { grid-template-columns: 1fr; }
    .search-cell { border-right: 0; border-bottom: 1px solid #eee7dd; }
    .page-grid { grid-template-columns: 1fr; }
    .filter-rail { display: none; }
    .mobile-filter {
        display: flex;
        position: sticky;
        top: 84px;
        z-index: 10;
        margin-bottom: 18px;
        justify-content: space-between;
        align-items: center;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 999px;
        padding: 10px 13px;
        box-shadow: var(--shadow-soft);
    }
    .listings, .school-grid { grid-template-columns: repeat(2, 1fr); }
    .expert-card, .money, .map-grid, .signup { grid-template-columns: 1fr !important; }
    .expert-actions { grid-template-columns: 1fr 1fr; }
    .dir-sponsor { grid-template-columns: 160px 1fr 220px; gap: 18px; padding: 18px; }
    .dir-sponsor-photo { height: 180px; }
    .dir-empty { grid-template-columns: 1fr; text-align: center; }
    .dir-empty-icon { margin: 0 auto; }
    .dir-perks { justify-content: center; }
    .dir-empty-cta { margin-top: 8px; }
    .scores { grid-template-columns: repeat(3, 1fr); }
    .vibe-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
    .vibe-card.large, .vibe-card.tall { grid-row: span 1; min-height: 210px; }
    .compare-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
    .hero { min-height: auto; padding: 42px 0 94px; }
    .hero h1 { font-size: 58px; }
    .hero-subtitle { font-size: 19px; }
    .stat-row { grid-template-columns: 1fr; }
    .listings, .school-grid, .scores, .compare-row, .vibe-grid { grid-template-columns: 1fr; }
    .search-dock { margin-top: -40px; }
    .expert-card { padding: 14px; }
    .agent-photo { height: 260px; }
    .expert-actions { grid-template-columns: 1fr; }
    .dir-sponsor { grid-template-columns: 1fr; }
    .dir-sponsor-photo { height: 200px; }
    .dir-sponsor-info h3 { font-size: 22px; }
    .dir-tab { padding: 8px 14px; font-size: 13px; }
    .dir-empty { grid-template-columns: 1fr; padding: 20px; }
    .dir-empty-content h3 { font-size: 19px; }
    .footer-inner, .footer-links { flex-direction: column; align-items: flex-start; }
    .email-form { grid-template-columns: 1fr; }
    .email-form .primary-btn { width: 100%; }
}

/* Prevent phantom horizontal page-scroll from internal horizontal card scrollers
   (compare carousel, explore-map hood row). overflow:clip does NOT create a scroll
   container, so it leaves position:sticky and the inner overflow-x:auto rows intact. */
@media (max-width: 980px) { html, body { overflow-x: clip; } }
