/* ============================================================
   doineedapermit.org — v3 Civic Blue Design System
   Primary: #2563EB · Accent: #F59E0B · Authority: #1E3A8A (navy)
   Typography: Fraunces (display) + Inter (body)
   ============================================================ */

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* Tokens */
:root {
  --blue-50:#EFF6FF; --blue-100:#DBEAFE; --blue-200:#BFDBFE; --blue-300:#93C5FD;
  --blue-400:#60A5FA; --blue-500:#3B82F6; --blue-600:#2563EB; --blue-700:#1D4ED8;
  --blue-800:#1E40AF; --blue-900:#1E3A8A; --blue-950:#172554;

  --amber-50:#FFFBEB; --amber-100:#FEF3C7; --amber-400:#FBBF24; --amber-500:#F59E0B;
  --amber-600:#D97706; --amber-700:#B45309; --amber-accent:#FCD34D;

  --green-50:#F0FDF4; --green-100:#DCFCE7; --green-600:#16A34A; --green-700:#15803D;
  --red-50:#FEF2F2; --red-600:#DC2626; --red-700:#B91C1C;

  --bg:#FAFAF7;
  --section:#F5F4EF;
  --card:#FFFFFF;
  --border:#E7E5E0;
  --border-soft:#EFEDE8;
  --muted:#57534E;
  --muted-soft:#78716C;
  --text:#1C1917;
  --text-inverse:#FFFFFF;

  --font-display:'Fraunces',Georgia,serif;
  --font-body:'Inter',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --font-mono:ui-monospace,'SF Mono',Menlo,monospace;

  --shadow-subtle:0 1px 2px rgba(0,0,0,0.04);
  --shadow-card:0 4px 20px rgba(0,0,0,0.06);
  --shadow-hero:0 20px 60px rgba(0,0,0,0.25);
  --shadow-cta:0 4px 12px rgba(37,99,235,0.25);

  --radius-sm:6px; --radius-md:8px; --radius-lg:12px; --radius-xl:14px;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11","ss03";
}

/* =========== NAV =========== */
.nav { background: var(--card); border-bottom: 1px solid var(--border); padding: 14px 32px; position: sticky; top: 0; z-index: 50; }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.nav-left { display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { width: 26px; height: 26px; background: var(--blue-900); border-radius: 5px; display: flex; align-items: center; justify-content: center; color: var(--amber-accent); font-weight: 700; font-size: 13px; font-family: var(--font-body); }
.brand-name { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.brand-name .blue-accent { color: var(--blue-600); }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a { text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { background: var(--blue-600); color: white; padding: 10px 18px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; text-decoration: none; transition: background 0.15s; white-space: nowrap; }
.nav-cta:hover { background: var(--blue-700); }

/* =========== HERO (navy, full-width, grid pattern) =========== */
.hero { background: var(--blue-900); color: white; padding: 56px 32px 180px; position: relative; overflow: hidden; }
.hero.hero-tall { padding-bottom: 220px; }
.hero-pattern { position: absolute; inset: 0; opacity: 0.05; pointer-events: none; }
.hero-pattern svg { width: 100%; height: 100%; }
.hero-inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.hero-eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.hero-eyebrow-line { width: 36px; height: 1px; background: var(--amber-accent); }
.hero-eyebrow-text { font-size: 12px; letter-spacing: 0.14em; color: var(--amber-accent); text-transform: uppercase; font-weight: 600; }
.hero-eyebrow-dot { width: 4px; height: 4px; background: rgba(255,255,255,0.3); border-radius: 50%; }
.hero-eyebrow-sub { font-size: 12px; letter-spacing: 0.14em; color: rgba(255,255,255,0.75); text-transform: uppercase; font-weight: 600; }
.hero-breadcrumb { font-size: 12px; color: rgba(255,255,255,0.7); margin-bottom: 20px; }
.hero-breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.hero-breadcrumb a:hover { color: white; }
.hero-breadcrumb .sep { margin: 0 6px; color: rgba(255,255,255,0.3); }
.hero-breadcrumb .current { color: white; }
.hero-h1 { font-family: var(--font-display); font-size: 60px; line-height: 1.04; letter-spacing: -0.026em; font-weight: 500; margin: 0 0 22px; color: white; }
.hero-h1 .italic-accent { font-style: italic; color: var(--amber-accent); font-weight: 400; }
.hero-h1 .ghost { color: rgba(255,255,255,0.55); }
.hero-deck { font-size: 20px; color: rgba(255,255,255,0.85); line-height: 1.55; max-width: 680px; margin: 0 0 28px; }
.hero-deck strong { color: white; font-weight: 600; }
.hero-byline { display: inline-flex; align-items: center; gap: 12px; padding: 9px 16px 9px 10px; background: rgba(252,211,77,0.12); border: 1px solid rgba(252,211,77,0.28); border-radius: 999px; }
.hero-byline-mark { width: 26px; height: 26px; background: var(--amber-accent); color: var(--blue-900); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hero-byline-text { font-size: 13px; color: rgba(255,255,255,0.9); }
.hero-byline-text strong { color: white; font-weight: 600; }

/* =========== FLOATING BUY CARD =========== */
.buy-card-wrap { max-width: 900px; margin: -140px auto 0; padding: 0 32px; position: relative; z-index: 2; }
.buy-card-wrap.tall { margin-top: -170px; }
.buy-card { background: var(--card); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-hero); display: grid; grid-template-columns: 1.35fr 1fr; }
.buy-card-stats { padding: 26px 30px; border-right: 1px solid var(--border); }
.buy-card-stats-label { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; font-weight: 700; margin-bottom: 14px; }
.buy-card-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.stat-block { }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 6px; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1; letter-spacing: -0.015em; color: var(--text); }
.stat-value.amber { color: var(--amber-700); }
.stat-value.blue { color: var(--blue-600); }
.stat-value.green { color: var(--green-700); }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.buy-card-cta { padding: 26px 28px; background: linear-gradient(180deg, #FAFAF7 0%, #FFFFFF 100%); }
.buy-card-eyebrow { font-size: 11px; letter-spacing: 0.1em; color: var(--amber-700); text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.buy-card-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.buy-card-price { font-family: var(--font-display); font-size: 42px; font-weight: 600; letter-spacing: -0.025em; line-height: 1; color: var(--text); }
.buy-card-price-sub { font-size: 13px; color: var(--muted); }
.buy-card-desc { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 10px 0 16px; }
.buy-card-guarantee { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--green-700); font-weight: 600; margin-top: 10px; }
.buy-card-guarantee svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Primary CTA button */
.btn-primary { display: inline-block; background: var(--blue-600); color: white; padding: 14px 22px; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; text-align: center; text-decoration: none; box-shadow: var(--shadow-cta); transition: background 0.15s, transform 0.1s; border: 0; cursor: pointer; font-family: inherit; }
.btn-primary:hover { background: var(--blue-700); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary.block { display: block; width: 100%; }
.btn-primary.amber { background: var(--amber-accent); color: var(--blue-900); box-shadow: none; }
.btn-primary.amber:hover { background: var(--amber-400); }

.btn-secondary { display: inline-block; background: transparent; color: var(--blue-600); border: 1.5px solid var(--blue-600); padding: 12px 20px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; text-decoration: none; transition: all 0.15s; cursor: pointer; font-family: inherit; }
.btn-secondary:hover { background: var(--blue-50); }

/* =========== ARTICLE BODY =========== */
.article-body { max-width: 720px; margin: 64px auto 0; padding: 0 32px; }
.article-body.narrow { max-width: 680px; }
.article-body.wide { max-width: 900px; }
.article-body .lede { font-family: var(--font-display); font-size: 24px; line-height: 1.5; color: var(--text); font-weight: 400; letter-spacing: -0.008em; margin: 0 0 36px; }
.dropcap { font-family: var(--font-display); font-size: 80px; font-weight: 600; float: left; line-height: 0.8; margin: 12px 14px -8px 0; color: var(--blue-800); }
.article-body p { font-size: 18px; line-height: 1.72; color: var(--text); margin: 0 0 18px; }
.article-body h2 { font-family: var(--font-display); font-size: 34px; font-weight: 500; letter-spacing: -0.022em; line-height: 1.2; margin: 48px 0 16px; color: var(--blue-900); padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.article-body h3 { font-family: var(--font-display); font-size: 24px; font-weight: 500; letter-spacing: -0.018em; line-height: 1.3; margin: 32px 0 12px; color: var(--text); }
.article-body h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; margin: 20px 0 8px; color: var(--text); }
.article-body ul, .article-body ol { font-size: 18px; line-height: 1.72; color: var(--text); margin: 0 0 18px 1.4rem; padding: 0; }
.article-body li { margin: 0 0 8px; }
.article-body strong { font-weight: 600; color: var(--text); }
.article-body em { font-style: italic; }
.article-body a { color: var(--blue-700); text-decoration: underline; text-decoration-color: var(--blue-200); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: var(--blue-600); }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.article-body table th, .article-body table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.article-body table th { font-weight: 600; background: var(--section); color: var(--text); font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; }
.article-body table tr:last-child td { border-bottom: none; }
.article-body blockquote { border-left: 3px solid var(--border); padding-left: 20px; margin: 24px 0; color: var(--muted); font-style: italic; }

/* Callouts */
.callout { background: var(--blue-50); border-left: 4px solid var(--blue-600); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; padding: 20px 24px; margin: 28px 0; }
.callout-label { font-size: 11px; letter-spacing: 0.1em; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; color: var(--blue-800); }
.callout-body { font-size: 16px; line-height: 1.6; color: var(--text); margin: 0; }
.callout-body p { font-size: 16px; margin: 0 0 10px; }
.callout-body p:last-child { margin: 0; }

.warning { background: var(--amber-50); border-left: 4px solid var(--amber-500); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; padding: 20px 24px; margin: 28px 0; }
.warning-label { font-size: 11px; letter-spacing: 0.1em; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; color: var(--amber-700); }
.warning-body { font-size: 16px; line-height: 1.6; color: var(--text); margin: 0; }

.key-point { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--blue-600); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: 16px 20px; margin: 20px 0; font-size: 15px; line-height: 1.6; }

/* Code citation (official code reference) */
.code-cite { background: var(--section); border-radius: var(--radius-xl); padding: 28px 32px; margin: 36px 0; position: relative; }
.code-cite-mark { font-family: var(--font-display); font-size: 84px; color: var(--blue-800); line-height: 0.65; font-weight: 600; position: absolute; top: 22px; left: 24px; opacity: 0.3; }
.code-cite-body { font-family: var(--font-display); font-size: 20px; line-height: 1.55; color: var(--text); font-weight: 400; font-style: italic; margin: 0 0 14px 40px; letter-spacing: -0.005em; }
.code-cite-source { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; margin-left: 40px; }
.code-cite-source strong { color: var(--text); font-weight: 700; }

/* Mid-article CTA */
.inline-cta { background: var(--blue-900); color: white; border-radius: var(--radius-xl); padding: 36px 32px; margin: 48px 0; text-align: center; position: relative; overflow: hidden; }
.inline-cta::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(135deg, transparent 48%, rgba(252,211,77,0.08) 48%, rgba(252,211,77,0.08) 52%, transparent 52%); pointer-events: none; opacity: 0.6; }
.inline-cta-eyebrow { font-size: 11px; letter-spacing: 0.14em; color: var(--amber-accent); text-transform: uppercase; font-weight: 700; margin-bottom: 12px; position: relative; }
.inline-cta-title { font-family: var(--font-display); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; color: white; margin: 0 auto 20px; line-height: 1.25; max-width: 540px; position: relative; }
.inline-cta-title em { color: var(--amber-accent); font-style: italic; font-weight: 400; }
.inline-cta-btn { display: inline-block; background: var(--amber-accent); color: var(--blue-900); padding: 15px 32px; border-radius: var(--radius-md); font-size: 15px; font-weight: 700; text-decoration: none; transition: transform 0.1s, background 0.15s; position: relative; }
.inline-cta-btn:hover { background: var(--amber-400); transform: translateY(-1px); }
.inline-cta-trust { font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 14px; position: relative; }

/* Trust bar */
.trust-bar { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 14px 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 24px 0; font-size: 13px; }
.trust-bar-item { display: flex; align-items: center; gap: 6px; color: var(--text); }
.trust-bar-check { color: var(--green-700); font-weight: 700; }
.trust-bar-item strong { font-weight: 600; }

/* Footer CTA (full-width navy) */
.footer-cta { background: var(--blue-900); color: white; padding: 64px 32px; margin-top: 80px; text-align: center; position: relative; overflow: hidden; }
.footer-cta-pattern { position: absolute; inset: 0; opacity: 0.04; pointer-events: none; }
.footer-cta-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.footer-cta h2 { font-family: var(--font-display); font-size: 44px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 16px; color: white; }
.footer-cta h2 em { color: var(--amber-accent); font-weight: 400; }
.footer-cta p { font-size: 18px; color: rgba(255,255,255,0.8); margin: 0 auto 28px; max-width: 540px; line-height: 1.6; }
.footer-cta-btn { display: inline-block; background: var(--amber-accent); color: var(--blue-900); padding: 16px 32px; border-radius: var(--radius-md); font-size: 16px; font-weight: 700; text-decoration: none; transition: transform 0.1s; }
.footer-cta-btn:hover { transform: translateY(-1px); }
.footer-cta-trust { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 14px; }

/* Site footer */
.site-footer { background: var(--card); border-top: 1px solid var(--border); padding: 28px 32px; font-size: 13px; color: var(--muted); }
.site-footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; margin-left: 20px; }
.site-footer a:hover { color: var(--text); }
.site-footer-links { }

/* Breadcrumb (in-page) */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: var(--border); }

/* Verdict classes — preserved from legacy */
.verdict { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius-lg); padding: 22px 26px; margin: 0 0 28px; }
.verdict-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--blue-800); margin-bottom: 10px; }
.verdict-text { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 10px; }
.verdict-detail { font-size: 16px; color: var(--muted); line-height: 1.6; }

/* Compact stat strip (for category/state/city hub pages) */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; margin: 28px 0; }
.stat-strip-cell { padding: 20px 22px; border-right: 1px solid var(--border); }
.stat-strip-cell:last-child { border-right: 0; }
.stat-strip-label { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; font-weight: 700; margin-bottom: 8px; }
.stat-strip-value { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--text); letter-spacing: -0.015em; line-height: 1; }
.stat-strip-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* City/project chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 6px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--text); text-decoration: none; transition: all 0.12s; }
.chip:hover { border-color: var(--blue-600); color: var(--blue-700); }
.chip.primary { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-800); font-weight: 500; }

/* Feature cards */
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
.feat { padding-top: 12px; border-top: 1px solid var(--border); }
.feat-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.feat-body { font-size: 14px; color: var(--muted); line-height: 1.55; }

/* State grid */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.state-card { display: block; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); text-decoration: none; color: var(--text); transition: all 0.12s; }
.state-card:hover { border-color: var(--blue-600); background: var(--blue-50); }
.state-card-name { font-family: var(--font-display); font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.state-card-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Section shell */
main { min-height: 60vh; }
.section { max-width: 900px; margin: 0 auto; padding: 48px 32px 0; }
.section h2 { font-family: var(--font-display); font-size: 32px; font-weight: 500; letter-spacing: -0.022em; line-height: 1.2; margin: 0 0 16px; color: var(--blue-900); }
.section h2.lite { color: var(--text); }
.section p { font-size: 17px; line-height: 1.65; color: var(--text); }

.section.wide { max-width: 1100px; }

/* Mobile */
@media (max-width: 780px) {
  .nav { padding: 12px 20px; }
  .nav-links { display: none; }
  .nav-cta { font-size: 13px; padding: 8px 14px; }

  .hero { padding: 40px 20px 160px; }
  .hero.hero-tall { padding-bottom: 180px; }
  .hero-h1 { font-size: 38px; }
  .hero-deck { font-size: 17px; }

  .buy-card-wrap { padding: 0 20px; margin-top: -130px; }
  .buy-card-wrap.tall { margin-top: -160px; }
  .buy-card { grid-template-columns: 1fr; }
  .buy-card-stats { border-right: none; border-bottom: 1px solid var(--border); padding: 22px 22px; }
  .buy-card-cta { padding: 22px 22px; }
  .buy-card-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  .article-body { padding: 0 20px; margin-top: 44px; }
  .article-body .lede { font-size: 20px; }
  .article-body p { font-size: 17px; }
  .article-body h2 { font-size: 26px; margin-top: 36px; }
  .article-body h3 { font-size: 21px; }
  .dropcap { font-size: 58px; margin: 8px 10px -6px 0; }

  .inline-cta { padding: 24px 20px; margin: 32px 0; }
  .inline-cta-title { font-size: 22px; }

  .footer-cta { padding: 44px 20px; margin-top: 56px; }
  .footer-cta h2 { font-size: 30px; }
  .footer-cta p { font-size: 16px; }

  .code-cite { padding: 22px 22px 22px 52px; }
  .code-cite-body { margin-left: 0; font-size: 17px; }
  .code-cite-source { margin-left: 0; }
  .code-cite-mark { font-size: 60px; top: 18px; left: 18px; }

  .section { padding: 36px 20px 0; }
  .section h2 { font-size: 26px; }

  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip-cell:nth-child(2) { border-right: 0; }
  .stat-strip-cell:nth-child(1), .stat-strip-cell:nth-child(2) { border-bottom: 1px solid var(--border); }

  .feat-grid { grid-template-columns: 1fr; }

  .site-footer { padding: 24px 20px; }
  .site-footer-inner { flex-direction: column; gap: 12px; }
  .site-footer a { margin-left: 0; margin-right: 16px; }

  /* Sticky mobile bottom bar (shows after scroll via JS) */
  .mobile-bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--border); padding: 10px 16px; display: none; z-index: 100; box-shadow: 0 -4px 20px rgba(0,0,0,0.08); }
  .mobile-bottom-bar.visible { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .mobile-bottom-bar-price { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); line-height: 1; }
  .mobile-bottom-bar-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
  .mobile-bottom-bar-btn { background: var(--blue-600); color: white; padding: 12px 16px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; text-decoration: none; }
}

/* ============================================================
   CALCULATOR / QUIZ (shared, used in embed + home)
   ============================================================ */
.pc { /* scoped container for calculator */ }
#permit-calculator, #calc-mount { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px 28px 24px; margin: 28px 0; box-shadow: var(--shadow-card); }
#permit-calculator *, #calc-mount * { box-sizing: border-box; }

.pc-progress { height: 4px; background: var(--border-soft); border-radius: 2px; overflow: hidden; margin-bottom: 20px; }
.pc-progress-fill { height: 100%; background: var(--blue-600); transition: width 0.4s cubic-bezier(0.4,0,0.2,1); border-radius: 2px; }
.pc-progress-fill.pc-progress-indeterminate { width: 40% !important; animation: pc-indeterminate 1.4s cubic-bezier(0.4,0,0.2,1) infinite; }
@keyframes pc-indeterminate {
  0%   { transform: translateX(-100%); width: 40%; }
  50%  { transform: translateX(80%); width: 60%; }
  100% { transform: translateX(300%); width: 40%; }
}

/* Spinner used in audit/loading UI */
.pc-spinner { display: inline-block; width: 14px; height: 14px; position: relative; vertical-align: middle; margin-right: 8px; }
.pc-spinner > span { display: block; width: 100%; height: 100%; border: 2px solid var(--blue-200); border-top-color: var(--blue-600); border-radius: 50%; animation: pc-spin 0.8s linear infinite; }
@keyframes pc-spin {
  to { transform: rotate(360deg); }
}

/* Audit head label — flex so spinner sits inline */
.pc-audit-head .pc-audit-label { display: inline-flex; align-items: center; }

/* "Finalizing your report…" row, fades in after the 4 checklist items */
.pc-audit-finalizing { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 14px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); background: var(--section); border-radius: var(--radius-md); opacity: 0; transform: translateY(4px); transition: opacity 0.4s, transform 0.4s; }
.pc-audit-finalizing.show { opacity: 1; transform: translateY(0); }
.pc-audit-finalizing .pc-spinner > span { border-color: var(--border); border-top-color: var(--amber-500); }

.pc-q-num { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 8px; }
.pc-title { font-family: var(--font-display); font-size: 26px; font-weight: 500; line-height: 1.25; letter-spacing: -0.018em; margin: 0 0 8px; color: var(--text); }
.pc-sub { font-size: 14px; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }

.pc-ctx-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pc-ctx { font-size: 11px; padding: 4px 10px; background: var(--section); border-radius: 999px; color: var(--muted); font-weight: 500; }
.pc-ctx b { color: var(--text); font-weight: 600; }

.pc-opt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.pc-opt-grid.three { grid-template-columns: repeat(3, 1fr); }
.pc-opt-grid.one { grid-template-columns: 1fr; }
.pc-opt-grid.two-wide { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pc-opt-grid.two-wide .pc-opt { padding: 16px 14px; font-size: 15px; text-align: center; font-weight: 600; }

.pc-opt { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 13px 14px; font-size: 14px; cursor: pointer; text-align: left; font-family: inherit; color: var(--text); transition: all 0.12s; line-height: 1.35; font-weight: 500; }
.pc-opt:hover { border-color: var(--blue-400); background: var(--blue-50); }
.pc-opt.sel { border: 2px solid var(--blue-600); padding: 12px 13px; background: var(--blue-50); color: var(--blue-800); font-weight: 600; }
.pc-opt.sel::before { content: '✓ '; color: var(--blue-600); font-weight: 700; }

.pc-inp { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-size: 15px; font-family: inherit; background: var(--card); color: var(--text); transition: all 0.12s; }
.pc-inp:focus { outline: 0; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-100); }

.pc-row { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.pc-btn { flex: 1; background: var(--blue-600); color: white; border: 0; padding: 13px 18px; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.12s; box-shadow: var(--shadow-cta); }
.pc-btn:hover:not(:disabled) { background: var(--blue-700); }
.pc-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.pc-btn-back { background: transparent; border: 0; padding: 13px 14px; font-size: 13px; color: var(--muted); cursor: pointer; font-family: inherit; font-weight: 500; border-radius: var(--radius-md); }
.pc-btn-back:hover { color: var(--text); background: var(--section); }

.pc-places-wrap { position: relative; }
.pc-places-drop { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0,0,0,0.08); display: none; z-index: 20; max-height: 280px; overflow-y: auto; }
.pc-places-drop.show { display: block; }
.pc-place-item { padding: 10px 14px; cursor: pointer; font-size: 14px; border-bottom: 1px solid var(--border-soft); display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.pc-place-item:last-child { border-bottom: 0; }
.pc-place-item:hover { background: var(--blue-50); }
.pc-place-pin { flex-shrink: 0; width: 14px; height: 14px; margin-top: 2px; color: var(--muted); }
.pc-place-text { color: var(--text); }
.pc-place-empty { padding: 10px 14px; font-size: 13px; color: var(--muted); }

.pc-mismatch { background: var(--blue-50); border: 1px solid var(--blue-200); border-radius: var(--radius-md); padding: 10px 14px; margin-top: 10px; font-size: 13px; color: var(--blue-800); line-height: 1.5; opacity: 0; transform: translateY(4px); transition: opacity 0.25s, transform 0.25s; }
.pc-mismatch.show { opacity: 1; transform: translateY(0); }
.pc-mismatch b { color: var(--blue-900); font-weight: 700; }

.pc-audit-head { text-align: center; padding: 6px 0 22px; }
.pc-audit-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 8px; }
.pc-audit-addr { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.3; letter-spacing: -0.01em; }
.pc-audit-note { text-align: center; margin: -8px 0 14px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.pc-audit-note b { color: var(--text); font-weight: 600; }
.pc-audit-list { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 12px; }
.pc-audit-line { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 14px; color: var(--muted); opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s, color 0.2s, background 0.2s; }
.pc-audit-line::before { content: ''; width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 50%; flex-shrink: 0; position: relative; transition: all 0.2s; }
.pc-audit-line.appear { opacity: 1; transform: translateY(0); }
.pc-audit-line.checked { color: var(--text); background: var(--blue-50); border-color: var(--blue-200); }
.pc-audit-line.checked::before { border-color: var(--blue-600); background: var(--blue-600); }
.pc-audit-line.checked::after { content: ''; position: absolute; left: 22px; width: 6px; height: 3px; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg); margin-top: -2px; }

.pc-sources-byline { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
.pc-sources-byline b { color: var(--text); font-weight: 600; }

.pc-hero { border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 14px; opacity: 0; transform: translateY(16px) scale(0.98); transition: opacity 0.3s, transform 0.3s; }
.pc-hero.reveal { opacity: 1; transform: translateY(0) scale(1); }
.pc-hero.yes { background: var(--amber-50); border: 1px solid var(--amber-100); }
.pc-hero.no { background: var(--green-50); border: 1px solid var(--green-100); }
.pc-hero.maybe { background: var(--blue-50); border: 1px solid var(--blue-100); }
.pc-hero-badge { display: inline-block; font-size: 10px; padding: 3px 8px; border-radius: 999px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; }
.pc-hero.yes .pc-hero-badge { background: var(--amber-500); color: white; }
.pc-hero.no .pc-hero-badge { background: var(--green-600); color: white; }
.pc-hero.maybe .pc-hero-badge { background: var(--blue-600); color: white; }
.pc-hero-headline { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; color: var(--text); margin: 0; }
.pc-dept { font-size: 13px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }
.pc-dept b { color: var(--text); font-weight: 600; }

.pc-paid-wrap { background: var(--card); border: 2px solid var(--blue-600); border-radius: var(--radius-xl); padding: 24px 24px; margin-top: 20px; box-shadow: 0 8px 24px rgba(37,99,235,0.12); position: relative; }
.pc-paid-badge { position: absolute; top: -11px; left: 20px; background: var(--amber-accent); color: var(--blue-900); font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.04em; }
.pc-paid-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; margin: 0 0 4px; }
.pc-paid-price-row { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 4px; }
.pc-paid-price { font-family: var(--font-display); font-size: 40px; font-weight: 600; color: var(--blue-900); letter-spacing: -0.025em; line-height: 1; }
.pc-paid-price-sub { font-size: 13px; color: var(--muted); }
.pc-paid-desc { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 10px 0 16px; }
.pc-paid-email { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-size: 15px; margin-bottom: 10px; font-family: inherit; }
.pc-paid-email:focus { outline: 0; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-100); }
.pc-paid-btn { width: 100%; background: var(--blue-600); color: white; border: 0; padding: 14px 18px; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-cta); font-family: inherit; }
.pc-paid-btn:hover { background: var(--blue-700); }
.pc-paid-trust { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 11px; color: var(--muted); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }

/* Result/reveal view — the screen after the quiz finishes */
.pc-hero { position: relative; border-radius: var(--radius-xl); padding: 24px 26px 20px; margin-bottom: 18px; opacity: 0; transform: translateY(16px) scale(0.98); transition: opacity 0.3s, transform 0.3s; }
.pc-hero.reveal { opacity: 1; transform: translateY(0) scale(1); }
.pc-hero.amber { background: var(--amber-50); border: 1px solid var(--amber-100); }
.pc-hero.green { background: var(--green-50); border: 1px solid var(--green-100); }
.pc-hero.blue { background: var(--blue-50); border: 1px solid var(--blue-100); }
.pc-hero-sub { font-size: 15px; color: var(--muted); line-height: 1.6; margin: 10px 0 0; }

/* Findings list (the "!" rows: timeline, penalty, dept) */
.pc-findings { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 22px; }
.pc-finding { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 14px; line-height: 1.55; color: var(--text); opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s; }
.pc-finding.reveal { opacity: 1; transform: translateY(0); }
.pc-finding-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; line-height: 1; font-family: var(--font-body); }
.pc-finding-icon.amber { background: var(--amber-100); color: var(--amber-700); }
.pc-finding-icon:not(.amber) { background: var(--blue-100); color: var(--blue-800); }
.pc-finding-text { flex: 1; }
.pc-finding-text b { color: var(--text); font-weight: 600; }

/* Safe-to-Build Confirmation card (no-permit scenarios) */
.confirm-kit-card { background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 16px; }
.confirm-kit-eyebrow { font-size: 11px; letter-spacing: 0.1em; color: var(--green-700); text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.confirm-kit-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.3; color: var(--text); margin: 0 0 8px; }
.confirm-kit-body { font-size: 14px; color: var(--text); line-height: 1.6; }

/* Email capture + CTA button for the Kit purchase */
.pc-email-wrap { margin-bottom: 12px; }
.pc-email-label { display: block; font-size: 12px; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; font-weight: 600; margin-bottom: 8px; }
.pc-email-error { display: none; font-size: 13px; color: var(--red-600); margin-top: 6px; }
.pc-email-error.show { display: block; }

.pc-cta { display: block; width: 100%; background: var(--blue-600); color: white; border: 0; padding: 16px 22px; border-radius: var(--radius-md); font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-cta); font-family: inherit; transition: background 0.15s, transform 0.1s; opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s, background 0.15s; }
.pc-cta.reveal { opacity: 1; transform: translateY(0); }
.pc-cta:hover { background: var(--blue-700); }
.pc-cta:active { transform: translateY(1px); }
.pc-cta:disabled { opacity: 0.5; cursor: not-allowed; }

.pc-cta-sub { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.55; margin-top: 10px; opacity: 0; transition: opacity 0.3s; }
.pc-cta-sub.reveal { opacity: 1; }

.pc-guarantee { margin-top: 14px; padding: 12px 16px; background: var(--section); border-radius: var(--radius-md); font-size: 13px; color: var(--text); line-height: 1.55; }
.pc-guarantee b { color: var(--green-700); font-weight: 700; }

.pc-sources-line { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-soft); font-size: 11px; color: var(--muted); line-height: 1.6; }

.pc-error { background: var(--red-50); border: 1px solid #FECACA; color: var(--red-700); padding: 10px 14px; border-radius: var(--radius-md); font-size: 13px; margin-top: 10px; }
.pc-addr { font-weight: 600; color: var(--text); }

/* Update existing .pc-hero-headline styling to work in result context */
.pc-hero .pc-hero-headline { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; color: var(--text); margin: 6px 0 0; }

@media (max-width: 780px) {
  #permit-calculator, #calc-mount { padding: 22px 20px 20px; margin: 22px 0; }
  .pc-title { font-size: 22px; }
  .pc-opt-grid { grid-template-columns: 1fr; }
  .pc-opt-grid.three { grid-template-columns: 1fr; }
  .pc-opt-grid.two-wide { grid-template-columns: 1fr; }
  .pc-paid-price { font-size: 34px; }
  .pc-paid-title { font-size: 18px; }
  .pc-hero { padding: 20px 20px 18px; }
  .pc-hero .pc-hero-headline { font-size: 20px; }
  .pc-hero-sub { font-size: 14px; }
  .pc-finding { padding: 12px 14px; font-size: 13px; }
  .confirm-kit-title { font-size: 18px; }
  .pc-cta { font-size: 15px; padding: 14px 18px; }
}

/* ============================================================
   Flash-pulse attention animation — used when user clicks a CTA
   that scrolls to the project search card / quiz.
   ============================================================ */
.flash-pulse {
  animation: flash-pulse 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-xl);
}
@keyframes flash-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
  18%  { box-shadow: 0 0 0 6px rgba(252, 211, 77, 0.45), 0 8px 28px rgba(37, 99, 235, 0.18); }
  42%  { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35), 0 8px 28px rgba(37, 99, 235, 0.22); }
  70%  { box-shadow: 0 0 0 2px rgba(252, 211, 77, 0.30), 0 6px 22px rgba(37, 99, 235, 0.14); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .flash-pulse { animation: none; }
}
