:root {
  --primary: #1D4ED8;
  --primary-dark: #1E3A8A;
  --primary-light: #93C5FD;
  --bg: #F8F7F5;
  --white: #FFFFFF;
  --gray-100: #F3F2F0;
  --gray-200: #E5E3DF;
  --gray-400: #9E9990;
  --gray-600: #5E5A55;
  --gray-800: #2D2B28;
  --gold: #F5A623;
  --silver: #A8A8A8;
  --bronze: #CD7F32;
  --text: #1A1916;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

section[id] { scroll-margin-top: 80px; }

/* ── NAV ── */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text .brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.logo-text .sub {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ── HERO ── */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 60px 24px 48px;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -90px;
  right: -70px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -110px;
  left: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.82;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 28px;
}

/* badge + checklist row */
.hero-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  max-width: 920px;
  margin: 0 auto 36px;
  text-align: left;
}

.hero-badge-wrap {
  position: relative;
  flex-shrink: 0;
  width: 190px;
  padding-bottom: 20px;
}

.hero-badge-shield {
  position: relative;
  background: white;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
  padding: 22px 16px 50px;
  text-align: center;
  box-shadow: 0 16px 34px rgba(0,0,0,0.28);
}

.hero-badge-mark {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 8px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-badge-mark svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.hero-badge-brand {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
}

.hero-badge-year {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-top: 2px;
}

.hero-badge-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
}

.hero-badge-ribbon {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 94%;
  background: var(--gold);
  color: #3A2400;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
  padding: 9px 6px;
  clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%);
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.hero-desc {
  font-size: 16px;
  opacity: 0.92;
  max-width: 620px;
  margin: 0 0 22px;
}

.hero-checklist {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

.hero-check-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}

.check-icon {
  color: #4ADE80;
  font-weight: 800;
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .hero-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero-desc {
    margin: 0 auto 22px;
  }
  .hero-checklist {
    justify-content: center;
  }
  .hero-check-item {
    white-space: normal;
  }
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero-stat span {
  font-size: 12px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── GENERIC SECTION WRAPPERS ── */
.lede-section {
  max-width: 820px;
  margin: 0 auto;
  padding: 44px 24px 8px;
}

.lede-section p {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.85;
}

.section-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

.section-wrap.tight { padding-top: 8px; }

.section-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--gray-600);
  max-width: 720px;
  margin-bottom: 4px;
}

.section-heading-block {
  margin-bottom: 24px;
}

/* ── HOW RANKINGS WORK ── */
.how-rankings-section {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 24px;
}

@media (max-width: 760px) {
  .criteria-grid { grid-template-columns: 1fr; }
}

.criteria-item {
  background: var(--bg);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  padding: 20px;
}

.criteria-item .icon { font-size: 24px; margin-bottom: 8px; }

.criteria-item h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.criteria-item p {
  font-size: 13px;
  color: var(--gray-600);
  margin: 0;
  line-height: 1.6;
}

.how-rankings-closing {
  font-size: 13px;
  color: var(--gray-400);
}

/* ── RANKINGS SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.section-header .section-subtitle {
  margin-bottom: 0;
}

.result-count {
  font-size: 13px;
  color: var(--gray-400);
  white-space: nowrap;
}

/* ── AGENT CARD ── */
.listings {
  display: flex;
  flex-direction: column;
}

.agent-card {
  background: var(--white);
  border-radius: 14px;
  border: 1.5px solid var(--gray-200);
  padding: 22px 22px 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
  flex-wrap: wrap;
}

.agent-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  border-color: var(--gray-400);
}

.agent-card.rank-1 {
  border-color: var(--primary);
  border-width: 2px;
  background: linear-gradient(135deg, #EEF3FF 0%, var(--white) 100%);
}

.agent-card.rank-2 { border-color: var(--silver); }
.agent-card.rank-3 { border-color: var(--bronze); }

/* rank badge */
.rank-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 12px;
}

.rank-1 .rank-badge { background: var(--gold); color: white; }
.rank-2 .rank-badge { background: var(--silver); color: white; }
.rank-3 .rank-badge { background: var(--bronze); color: white; }
.agent-card:not(.rank-1):not(.rank-2):not(.rank-3) .rank-badge {
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 13px;
}

/* avatar */
.agent-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gray-200);
  margin-top: 2px;
  flex-shrink: 0;
  background: var(--gray-100);
}

.rank-1 .agent-avatar { border-color: var(--primary); }
.rank-2 .agent-avatar { border-color: var(--silver); }
.rank-3 .agent-avatar { border-color: var(--bronze); }

.avatar-placeholder {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #9CA3AF;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 0;
  flex-shrink: 0;
  border: 1.5px solid var(--gray-200);
  overflow: hidden;
  position: relative;
  margin-top: 2px;
}

.avatar-placeholder::after {
  content: '';
  display: block;
  width: 56px;
  height: 56px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600' fill='white'%3E%3Cdefs%3E%3CclipPath id='cp'%3E%3Ccircle cx='300' cy='300' r='280'/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle cx='300' cy='230' r='115'/%3E%3Ccircle cx='300' cy='550' r='205' clip-path='url(%23cp)'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom center;
  flex-shrink: 0;
}

.agent-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.agent-info {
  flex: 1;
  min-width: 0;
}

.agent-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.agent-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.badge-top {
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agent-title {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 2px;
}

.agent-brokerage {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 500;
  margin-bottom: 8px;
}

.agent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.meta-item {
  font-size: 13px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.meta-item strong {
  color: var(--text);
  font-weight: 700;
}

.agent-bio {
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.65;
  margin-bottom: 12px;
  max-width: 700px;
}

.agent-tags, .agent-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-specialties { margin-top: 8px; }

.specialties-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-right: 4px;
  align-self: center;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--gray-100);
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tag.primary { background: #EEF3FF; color: var(--primary); }

.tag.quality {
  background: rgba(29, 78, 216, 0.08);
  color: var(--primary);
  border: 1px solid var(--primary);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.tag.bonus {
  background: #FEF3E2;
  color: #B45309;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

/* stars */
.stars-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-bottom: 6px;
}

.stars {
  display: flex;
  align-items: center;
  gap: 4px;
}

.star-icons {
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 1px;
}

.star-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.review-count {
  font-size: 12px;
  color: var(--gray-400);
}

.star-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #1A1916;
  color: white;
  font-size: 11px;
  line-height: 1.6;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 20;
}

.star-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 16px;
  border: 5px solid transparent;
  border-top-color: #1A1916;
}

.stars-wrap:hover .star-tooltip,
.stars-wrap:focus-within .star-tooltip {
  opacity: 1;
}

/* card right col */
.card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.agent-website {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  line-height: 1.4;
  white-space: nowrap;
}

.agent-website:hover { opacity: 0.75; }

.zillow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #0F5FA8;
  background: #E7F1FB;
  border: 1px solid #C6E0F5;
  border-radius: 999px;
  padding: 4px 10px 4px 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}

.zillow-link:hover { background: #D6E9F9; }

.zillow-badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0F5FA8;
  color: white;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── NEIGHBORHOODS ── */
.neighborhoods-section {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

.neighborhood-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .neighborhood-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .neighborhood-grid { grid-template-columns: 1fr; }
}

.neighborhood-card {
  background: var(--bg);
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  padding: 18px;
}

.neighborhood-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.neighborhood-card p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.6;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 6px 14px;
}

/* ── MARKET SNAPSHOT ── */
.market-section {
  background: var(--bg);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .market-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .market-grid { grid-template-columns: 1fr; }
}

.market-stat-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px;
}

.market-stat-card .value {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  display: block;
  margin-bottom: 4px;
}

.market-stat-card .label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: block;
}

.market-stat-card .context {
  font-size: 12.5px;
  color: var(--gray-600);
  line-height: 1.55;
}

.market-disclaimer {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.6;
  max-width: 800px;
}

/* ── MAP ── */
.map-section {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

.map-embed {
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
  line-height: 0;
}

.map-embed iframe {
  display: block;
}

/* ── FAQ SECTION ── */
.faq-section {
  background: var(--bg);
  border-top: 1px solid var(--gray-200);
  padding: 56px 24px 60px;
}

.faq-inner {
  max-width: 820px;
  margin: 0 auto;
}

.faq-section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
  color: var(--text);
}

.faq-section-sub {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 24px;
}

.faq-list {
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  overflow: hidden;
  background: var(--white);
}

.faq-item {
  border-bottom: 1px solid var(--gray-200);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  padding: 20px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: var(--gray-400);
  flex-shrink: 0;
  transition: transform 0.2s;
  line-height: 1;
}

.faq-item[open] > summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover { background: var(--gray-100); }
.faq-item[open] > summary { background: var(--gray-100); }

.faq-answer {
  padding: 4px 24px 20px;
  background: var(--gray-100);
}

.faq-answer p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.8;
}

/* ── ABOUT THIS LIST ── */
.about-section {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

.about-card {
  background: var(--bg);
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  padding: 28px;
  max-width: 820px;
}

.about-card p {
  font-size: 14.5px;
  color: var(--gray-600);
  line-height: 1.8;
}

.about-card a {
  color: var(--primary);
  font-weight: 600;
}

/* ── FOOTER ── */
footer {
  background: var(--gray-800);
  color: var(--gray-400);
  padding: 40px 24px 24px;
  margin-top: 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer-brand .logo { margin-bottom: 10px; }
.footer-brand .logo .logo-text .brand { color: white; }

.footer-brand p {
  font-size: 13px;
  color: var(--gray-400);
  max-width: 260px;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links ul li a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

.footer-links ul li a:hover { color: var(--primary-light); }

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid #3D3B38;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--gray-400);
}

.disclaimer {
  font-size: 11px;
  color: #6B6862;
  max-width: 1100px;
  margin: 16px auto 0;
  line-height: 1.5;
  white-space: pre-line;
}
