:root {
  --navy: #123a6b;
  --navy-2: #0c2a50;
  --blue: #1f6feb;
  --gold: #f2b134;
  --ink: #17202b;
  --muted: #5d6b7a;
  --line: #e2e8f0;
  --bg: #f6f8fb;
  --card: #fff;
  --a: #0f7b4d; --a-bg: #e3f5ec;
  --b: #2d6a1f; --b-bg: #eef7dd;
  --c: #8a5a00; --c-bg: #fdf1d6;
  --d: #9b2c2c; --d-bg: #fbe4e4;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 80px; }
body { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 3.2vw, 2rem); margin: 0 0 8px; }
h3 { font-size: 1.1rem; margin-bottom: 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; }
.sub { color: var(--muted); margin-bottom: 18px; max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--gold); margin-bottom: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--gold); color: var(--navy-2); font-weight: 700; text-decoration: none; border: 0; border-radius: 999px; padding: 13px 24px; font-size: 1rem; cursor: pointer; font-family: inherit; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(242, 177, 52, .35); }
.btn-sm { padding: 9px 18px; font-size: .92rem; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-ghost:hover { box-shadow: none; background: rgba(18, 58, 107, .06); }
.btn[disabled] { opacity: .6; cursor: wait; }
.link { background: none; border: 0; color: var(--navy); font: inherit; font-weight: 600; text-align: left; cursor: pointer; padding: 0; text-decoration: underline; text-decoration-color: rgba(18, 58, 107, .25); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--navy); }

/* Header */
.topbar { background: var(--navy-2); color: #cfdcef; font-size: .84rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 1.1rem; }
.brand b { color: var(--blue); }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-weight: 800; }
nav { display: flex; align-items: center; gap: 20px; }
nav > a:not(.btn), .cities-menu summary { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; cursor: pointer; }
.cities-menu { position: relative; }
.cities-menu summary { list-style: none; }
.cities-menu summary::-webkit-details-marker { display: none; }
.cities-menu summary::after { content: " ▾"; color: var(--muted); }
.cities-pop { position: absolute; right: -60px; top: 34px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .12); padding: 12px; display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 2px 10px; width: 470px; }
.cities-pop a { text-decoration: none; color: var(--ink); padding: 5px 8px; border-radius: 6px; font-size: .92rem; }
.cities-pop a:hover { background: var(--bg); }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 80% -10%, #2a5f9e 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 64px 0 52px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; max-width: 820px; margin-bottom: 14px; }
.lede { font-size: 1.12rem; color: #d6e2f3; max-width: 720px; margin-bottom: 26px; }
.crumbs { font-size: .88rem; color: #a9bfdc; margin-bottom: 10px; }
.crumbs a { color: #fff; }
.search { position: relative; display: flex; gap: 8px; background: #fff; border-radius: 999px; padding: 6px; max-width: 680px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1.02rem; padding: 10px 16px; border-radius: 999px; min-width: 0; color: var(--ink); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .2); overflow: hidden; z-index: 30; color: var(--ink); }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: 11px 18px; cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest button:hover, .suggest button:focus { background: var(--bg); outline: 0; }
.suggest small { color: var(--muted); display: block; font-size: .8rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; max-width: 820px; }
.stats div { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 14px 16px; }
.stats b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--gold); }
.stats span { font-size: .85rem; color: #c9d7ea; }

/* CTA strip */
.cta-strip { background: var(--gold); padding: 22px 0; }
.cta-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.cta-strip p { font-weight: 600; color: var(--navy-2); font-size: 1.05rem; }
.cta-strip .btn { background: var(--navy); color: #fff; white-space: nowrap; }

/* City cards */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 15px; font: inherit; font-size: .9rem; cursor: pointer; }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.city-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s; }
.city-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.city-card strong { font-size: 1.2rem; color: var(--navy); }
.cc-region { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.cc-count, .cc-med { font-size: .9rem; color: var(--muted); }
.cc-med b { color: var(--ink); }
.cc-top { font-size: .84rem; color: var(--muted); margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 8px; }

/* Ranking tables */
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; position: sticky; top: 64px; background: var(--bg); padding: 10px 0; z-index: 10; }
.tools input, .tools select, .field input, .field select, .field textarea { font: inherit; border: 1px solid #cdd6e1; border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--ink); }
.tools input { flex: 1; min-width: 200px; }
.tbl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 40px; }
table.rank { width: 100%; border-collapse: collapse; font-size: .94rem; }
.rank th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 12px; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; }
.rank td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rank tr:last-child td { border-bottom: 0; }
.rank tr:hover td { background: #fafcff; }
.rank .num { text-align: right; white-space: nowrap; }
.rank .rk { font-weight: 800; color: var(--navy); width: 44px; }
.rank .sn small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.tag { display: inline-block; font-size: .7rem; background: #eef2ff; color: #3949ab; border-radius: 5px; padding: 1px 6px; margin-left: 6px; font-weight: 600; vertical-align: middle; }
.pill { display: inline-block; min-width: 62px; text-align: center; border-radius: 999px; padding: 3px 10px; font-weight: 700; }
.pill.a { background: var(--a-bg); color: var(--a); }
.pill.b { background: var(--b-bg); color: var(--b); }
.pill.c { background: var(--c-bg); color: var(--c); }
.pill.d { background: var(--d-bg); color: var(--d); }
.pill.na { background: #eef1f5; color: var(--muted); }
.unranked { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.unranked summary { font-weight: 600; cursor: pointer; }
.unranked ul { list-style: none; columns: 2; column-gap: 30px; margin-top: 8px; }
.unranked li { padding: 4px 0; break-inside: avoid; }
.unranked small { color: var(--muted); }
.hide { display: none; }

/* Near me */
.near { background: #fff; border-bottom: 1px solid var(--line); }
#nearResults { margin-top: 20px; }
.near-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.near-col h3 { margin-bottom: 10px; }
.near-list { list-style: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.near-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.near-list li:last-child { border-bottom: 0; }
.near-list small { display: block; color: var(--muted); font-size: .8rem; }
.near-note { font-size: .85rem; color: var(--muted); margin-top: 12px; }

/* Lead form */
.report { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; }
.report-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: start; }
.report h2 { color: #fff; }
.report-copy p { color: #d6e2f3; margin-bottom: 10px; }
.ticks { list-style: none; margin: 14px 0 24px; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: 10px; color: #eef3fa; }
.ticks li::before { content: "✔"; position: absolute; left: 0; color: var(--gold); font-weight: 800; }
.agent { display: flex; gap: 14px; align-items: center; background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 14px; }
.agent img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.agent strong { display: block; }
.agent span { display: block; font-size: .86rem; color: #c9d7ea; }
.agent a { color: #fff; }
#leadForm, .form-success { background: #fff; color: var(--ink); border-radius: 18px; padding: 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; margin-bottom: 12px; }
.field label { font-size: .84rem; font-weight: 600; margin-bottom: 5px; }
.consent { display: flex; gap: 10px; font-size: .82rem; color: var(--muted); margin: 6px 0 14px; align-items: flex-start; }
.consent input { margin-top: 3px; flex-shrink: 0; }
.form-msg { font-size: .9rem; margin-bottom: 10px; }
.form-msg.error { color: var(--d); }
.form-success h3 { font-size: 1.3rem; margin-bottom: 8px; }

/* Method / FAQ */
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 18px 0; }
.method-grid > div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.method-grid p { color: var(--muted); font-size: .94rem; }
.note { background: #fff8e6; border: 1px solid #f5dc9c; border-radius: 12px; padding: 14px 18px; font-size: .94rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin-top: 8px; color: var(--muted); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(8, 20, 38, .6); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 18px; max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 26px; position: relative; }
.modal-x { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 1.9rem; cursor: pointer; color: var(--muted); line-height: 1; }
.m-head small { color: var(--muted); display: block; margin-top: 4px; }
.m-score { display: flex; gap: 14px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.m-score .pill { font-size: 1.3rem; padding: 6px 16px; }
.m-table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: .94rem; }
.m-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.m-table td:last-child, .m-table td:nth-child(2) { text-align: right; white-space: nowrap; }
.trend-up { color: var(--a); }
.trend-down { color: var(--d); }
.m-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.m-facts b { color: var(--ink); font-weight: 600; }
.m-cta { background: var(--bg); border-radius: 12px; padding: 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* Footer */
.footer { background: #0a1d36; color: #a9bad0; padding: 46px 0 90px; font-size: .9rem; }
.footer strong { color: #fff; }
.footer a { color: #d9e4f2; }
.foot-cities { margin-bottom: 26px; }
.foot-cities div { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 24px; }
.foot-grid p { margin-top: 6px; }
.disclaimer { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 18px; font-size: .8rem; }
.disclaimer p { margin-bottom: 8px; }
.sticky-cta { display: none; }

@media (max-width: 900px) {
  nav > a:not(.btn), .cities-menu { display: none; }
  .report-grid { grid-template-columns: 1fr; gap: 26px; }
  .method-grid { grid-template-columns: 1fr; }
  .near-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  section { padding: 40px 0; }
  .wrap { padding: 0 16px; }
  .topbar span { display: none; }
  .topbar .wrap { justify-content: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .cta-strip .wrap { flex-direction: column; align-items: stretch; text-align: center; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .rank th:nth-child(n+4), .rank td:nth-child(n+4) { display: none; }
  .rank td, .rank th { padding: 10px 8px; }
  .unranked ul { columns: 1; }
  .foot-grid { grid-template-columns: 1fr; }
  .m-facts { grid-template-columns: 1fr; }
  .tools { top: 64px; }
  .sticky-cta { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); z-index: 50; }
  .sticky-cta .btn { flex: 1; padding: 12px; }
  #leadForm, .form-success { padding: 20px; }
}
