:root {
  --ink: #2f241d;
  --ink-soft: #5a4a3f;
  --muted: #84756a;
  --line: #ebe3d6;
  --bg: #ffffff;
  --bg-soft: #faf6ee;
  --bg-tint: #fff7de;
  --brand: #2f241d;
  --brand-dark: #1b140f;
  --accent: #ffc425;
  --accent-dark: #f0b000;
  --gold-text: #8f6400;
  --ok: #1f8a4c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(47, 36, 29, 0.10);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-tint { background: var(--bg-tint); }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 10px;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.center { text-align: center; }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }

/* Preview banner */
.preview-bar {
  background: var(--ink); color: #fff; font-size: 0.85rem; text-align: center; padding: 8px 16px;
}

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand); display: grid; place-items: center;
}
.logo-mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px; font-weight: 650; font-size: 1rem;
  border: 0; cursor: pointer; transition: background 0.15s, transform 0.05s; font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-dark { background: var(--brand); color: #fff; }
.btn-dark:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-ghost:hover { background: var(--bg-tint); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--bg-tint) 0%, #fff 100%); padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
.hero h1 span { color: var(--brand); }
.hero-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); }
.check { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; margin-top: 2px; }
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: 0.9rem; }
.trust-row strong { color: var(--ink); font-size: 1.25rem; display: block; }

/* Card */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }

/* Calculator */
.calc h3 { font-size: 1.35rem; }
.calc .sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field select, .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
.field select:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: block; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 600; font-size: 0.9rem; margin: 0;
}
.seg label small { display: block; font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.seg input:checked + label { border-color: var(--brand); background: var(--bg-tint); }
.range-row { display: flex; justify-content: space-between; font-size: 0.9rem; }
.range-row output { font-weight: 700; color: var(--brand); }
input[type="range"] { width: 100%; accent-color: var(--brand); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.result { margin-top: 8px; border-radius: 12px; background: var(--ink); color: #fff; padding: 20px; }
.result .label { font-size: 0.82rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.06em; }
.result .big { font-size: 2rem; font-weight: 800; margin: 2px 0 10px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 12px; font-size: 0.9rem; }
.result-grid strong { display: block; font-size: 1.05rem; }
.fine { font-size: 0.78rem; color: var(--muted); margin-top: 10px; }
.result .fine { color: rgba(255,255,255,0.6); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-tint); color: var(--brand); font-weight: 800; display: grid; place-items: center; margin-bottom: 14px; }

/* Types */
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.type { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.type-art { height: 120px; display: grid; place-items: center; background: var(--bg-tint); }
.type-art svg { width: 110px; height: 80px; }
.type-body { padding: 20px; }
.type-body .price { font-weight: 750; color: var(--brand); margin-bottom: 6px; }
.type-body p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* Cities */
.cities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.city {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 0.95rem;
}
.city:hover { border-color: var(--brand); text-decoration: none; }
.city .tag { font-size: 0.72rem; font-weight: 600; color: var(--muted); background: var(--bg-soft); padding: 2px 8px; border-radius: 99px; }
.city .tag.live { color: var(--ok); background: #e6f4ec; }

/* Builders */
.builders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.builder { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.builder-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.1rem; flex: 0 0 52px; }
.builder h3 { font-size: 1.05rem; margin: 0; }
.builder .meta { color: var(--muted); font-size: 0.85rem; }
.stars { color: #e0a21b; letter-spacing: 1px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.badge { font-size: 0.75rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--bg-soft); color: var(--ink-soft); }
.badge.featured { background: #fdeee7; color: var(--accent-dark); }
.badge.verified { background: #e6f4ec; color: var(--ok); }
.builder ul { padding-left: 18px; margin: 0 0 16px; color: var(--ink-soft); font-size: 0.9rem; }
.builder .btn { margin-top: auto; }
.sample-note { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 18px; }

/* Guides */
.guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.guide { padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--ink); }
.guide:hover { border-color: var(--brand); text-decoration: none; }
.guide .kicker { font-size: 0.78rem; font-weight: 700; color: var(--accent-dark); text-transform: uppercase; letter-spacing: 0.06em; }
.guide h3 { margin-top: 8px; }
.guide p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 12px 0 0; color: var(--ink-soft); }

/* Quote form */
.quote-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.quote-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.quote-list li { display: flex; gap: 12px; }
.success { display: none; text-align: center; padding: 24px 8px; }
.success .big-check { width: 64px; height: 64px; border-radius: 50%; background: #e6f4ec; color: var(--ok); display: grid; place-items: center; font-size: 30px; margin: 0 auto 16px; font-weight: 800; }

/* CTA band */
.cta-band { background: var(--brand); color: #fff; border-radius: 20px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: 0.85; }

/* Footer */
.footer { background: var(--ink); color: rgba(255,255,255,0.75); padding: 56px 0 28px; font-size: 0.92rem; margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; font-size: 0.95rem; }
.footer a { color: rgba(255,255,255,0.75); display: block; margin-bottom: 8px; }
.footer a:hover { color: #fff; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 36px; padding-top: 20px; font-size: 0.82rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Page header (inner pages) */
.page-head { background: var(--bg-tint); padding: 48px 0; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }

/* City page */
.article-grid { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.article h2 { margin-top: 1.6em; font-size: 1.6rem; }
.article h2:first-child { margin-top: 0; }
.article ul { color: var(--ink-soft); }
.article li { margin-bottom: 6px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.fact { background: var(--bg-soft); border-radius: 12px; padding: 16px; }
.fact strong { display: block; font-size: 1.3rem; color: var(--brand); }
.fact span { font-size: 0.85rem; color: var(--ink-soft); }
table.costs { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
table.costs th, table.costs td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
table.costs th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.callout { border-left: 4px solid var(--accent); background: #fdf4ef; padding: 16px 18px; border-radius: 0 10px 10px 0; margin: 20px 0; color: var(--ink-soft); }
.sticky { position: sticky; top: 92px; }

/* Directory filters */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.filters select { padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 0.95rem; background: #fff; }
.count { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }

/* Mobile */
.menu-btn { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); }
@media (max-width: 980px) {
  .hero-grid, .quote-wrap, .article-grid { grid-template-columns: 1fr; }
  .types { grid-template-columns: repeat(2, 1fr); }
  .cities { grid-template-columns: repeat(2, 1fr); }
  .builders, .guides, .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }
}
@media (max-width: 720px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px 20px; border-bottom: 1px solid var(--line); align-items: flex-start; }
  .nav-links.open { display: flex; }
  .menu-btn { display: block; }
  .section { padding: 52px 0; }
  .types, .builders, .guides, .steps, .footer-grid, .facts { grid-template-columns: 1fr; }
  .cities { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .cta-band { padding: 32px 24px; }
  .two { grid-template-columns: 1fr; }
}


/* ---- Theme system ---- */
:root {
  --accent-ink: #2f241d;
  --highlight: #ffc425;
  --eyebrow: #8f6400;
  --footer: #1b140f;
  --link: #6b4e12;
  --display: "Inter", system-ui, sans-serif;
  --display-weight: 800;
}
/* A: Coastal Sand (deep sea teal, sand, terracotta) */
:root[data-theme="coastal"] {
  --ink: #1f2d2b; --ink-soft: #4a5856; --muted: #77827f; --line: #e6e0d5;
  --bg-soft: #f7f1e8; --bg-tint: #eef3ef;
  --brand: #1f4e4a; --brand-dark: #173a37;
  --accent: #d4643f; --accent-dark: #b9502e; --accent-ink: #ffffff;
  --highlight: #f2c46d; --eyebrow: #b4532f; --footer: #172624; --link: #1f4e4a;
  --display: "Fraunces", Georgia, serif; --display-weight: 650;
}
/* B: Torrey Pine (forest green, cream, gold) */
:root[data-theme="torrey"] {
  --ink: #1e2a22; --ink-soft: #4b5a4f; --muted: #76827a; --line: #e5e2d6;
  --bg-soft: #f6f2e7; --bg-tint: #edf1e8;
  --brand: #2d4a36; --brand-dark: #203628;
  --accent: #e0a526; --accent-dark: #c98f12; --accent-ink: #1e2a22;
  --highlight: #f3cf6e; --eyebrow: #8a6a14; --footer: #18241c; --link: #2d4a36;
  --display: "Fraunces", Georgia, serif; --display-weight: 650;
}
/* C: Mission Adobe (soft brown, clay, gold) */
:root[data-theme="adobe"] {
  --ink: #2b211b; --ink-soft: #5c4d43; --muted: #85766b; --line: #ebe1d4;
  --bg-soft: #f8f1e7; --bg-tint: #f6ece0;
  --brand: #4a3226; --brand-dark: #34231a;
  --accent: #c2563a; --accent-dark: #a8452b; --accent-ink: #ffffff;
  --highlight: #f0c35a; --eyebrow: #a4472d; --footer: #221914; --link: #8a3d26;
  --display: "Fraunces", Georgia, serif; --display-weight: 650;
}

h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight); }
h1 { letter-spacing: -0.02em; }
a { color: var(--link); }
.btn-primary, .btn-primary:hover, .nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: var(--accent-ink); }
.eyebrow { color: var(--eyebrow); }
.hero { background: linear-gradient(180deg, var(--bg-tint) 0%, #fff 100%); }
.hero h1 span { color: var(--ink); background: linear-gradient(transparent 62%, var(--highlight) 62%); padding: 0 4px; }
.check { background: var(--accent); color: var(--accent-ink); }
.logo-mark { background: var(--accent); }
.logo-mark svg { stroke: var(--accent-ink); }
.preview-bar { background: var(--brand-dark); color: var(--highlight); }
.range-row output { color: var(--ink); }
input[type="range"] { accent-color: var(--brand); }
.result { background: var(--brand); }
.result .big { color: var(--highlight); }
.step-num { background: var(--accent); color: var(--accent-ink); }
.type-art svg { stroke: var(--brand); }
.type-art [stroke="#e0a800"] { stroke: var(--accent); }
.type-art [fill="#ffc425"] { fill: var(--accent); }
.type-body .price { color: var(--eyebrow); }
.avatar { background: var(--brand) !important; color: var(--highlight); }
.badge.featured { background: var(--accent); color: var(--accent-ink); }
.city .tag.live { background: var(--accent); color: var(--accent-ink); }
.guide .kicker { color: var(--eyebrow); }
.faq summary::after { color: var(--eyebrow); }
.callout { border-left-color: var(--accent); background: var(--bg-soft); }
.cta-band { background: var(--brand); }
.cta-band h2 { color: var(--highlight); }
.footer { background: var(--footer); }
.footer h4 { color: var(--highlight); }
.fact strong { color: var(--brand); }
.fact { background: var(--bg-tint); }
.btn-ghost { color: var(--brand); border-color: var(--brand); }
.seg input:checked + label { border-color: var(--brand); background: var(--bg-tint); }
.field select:focus, .field input:focus, .field textarea:focus { border-color: var(--accent); }

/* Theme picker (preview only) */
.theme-picker { position: fixed; right: 16px; bottom: 16px; z-index: 100; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; font-size: 0.82rem; }
.theme-picker strong { display: block; margin-bottom: 6px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.theme-picker a { display: inline-block; margin: 2px 4px 2px 0; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); }
.theme-picker a:hover { text-decoration: none; border-color: var(--ink); }

/* ---- San Diego details: county map, regions, neighborhoods ---- */
.map-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 36px; align-items: start; }
.map-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); position: sticky; top: 92px; }
.county-map { width: 100%; height: auto; display: block; border-radius: 10px; }
.county-map .land { fill: var(--bg-soft); }
.county-map .ocean { fill: #dcebea; }
.county-map .coast { fill: none; stroke: #b9d3d0; stroke-width: 2; }
.county-map .border { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.county-map .map-note { font-size: 11px; fill: var(--muted); font-family: Inter, sans-serif; }
.county-map .map-ocean-label { font-size: 13px; fill: #6f9c98; font-style: italic; font-family: Fraunces, Georgia, serif; }
.county-map text { font-family: Inter, sans-serif; font-size: 11.5px; font-weight: 600; fill: var(--ink-soft); paint-order: stroke; stroke: rgba(255,255,255,0.85); stroke-width: 3px; }
.county-map .map-city circle { stroke: #fff; stroke-width: 2; }
.county-map .map-city:hover circle { r: 9; }
.county-map .map-city.live text { font-size: 13.5px; font-weight: 800; fill: var(--ink); }
.ncc circle, .swatch.ncc { fill: #2a7f8f; background: #2a7f8f; }
.nci circle, .swatch.nci { fill: #6a8f3b; background: #6a8f3b; }
.cen circle, .swatch.cen { fill: #d4643f; background: #d4643f; }
.east circle, .swatch.east { fill: #c9962b; background: #c9962b; }
.sb circle, .swatch.sb { fill: #7a5aa6; background: #7a5aa6; }
.unc circle, .swatch.unc { fill: #8a7d6e; background: #8a7d6e; }
.regions { display: grid; gap: 22px; }
.region h4 { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.15rem; margin-bottom: 10px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.region-cities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.region-cities .city { padding: 11px 14px; font-size: 0.92rem; }

.hoods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.hood { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.hood-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.hood-name { font-family: var(--display); font-weight: 650; font-size: 1.35rem; color: var(--ink); }
.hood-type { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--eyebrow); white-space: nowrap; }
.hood-price { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.hood-spec { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.hood p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

@media (max-width: 980px) {
  .map-wrap { grid-template-columns: 1fr; }
  .map-card { position: static; max-width: 520px; margin: 0 auto; }
  .hoods { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .hoods { grid-template-columns: 1fr; }
  .region-cities { grid-template-columns: 1fr; }
}
