/*
Theme Name: Home Addition Estimator
Description: Classic theme reproducing the approved Home Addition Estimator demo design: sticky white header, navy hero and footer, cost tables, calculator cards, and blog cards. No webfonts and no external requests.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Text Domain: hae-demo-theme
*/

/* ===== DEMO STYLESHEET (verbatim from the approved demo) ===== */

:root{
  --navy:#0A1628; --navy2:#12294D; --blue:#2563EB; --blue-d:#1D4ED8; --blue-soft:#EFF6FF;
  --btn-bg:#2563EB; --btn-bg-h:#1D4ED8; --btn-ink:#ffffff;
  --ink:#0F172A; --muted:#475569; --bg:#F8FAFC; --card:#ffffff; --line:#E2E8F0;
  --green:#16A34A; --green-bright:#22C55E; --green-soft:#F0FDF4;
  --amber:#D97706; --amber-bright:#F59E0B; --amber-soft:#FFFBEB;
  --violet:#7C3AED; --violet-soft:#F5F3FF;
  --radius:16px; --shadow:0 10px 30px rgba(15,23,42,.08); --shadow-sm:0 3px 12px rgba(15,23,42,.06); --shadow-lg:0 24px 55px rgba(10,22,40,.32);
}
@media (prefers-color-scheme: dark){
  :root{ --navy:#0A1628; --navy2:#12294D; --blue:#60A5FA; --blue-d:#93C5FD; --blue-soft:#13294D;
    --btn-bg:#2563EB; --btn-bg-h:#3B82F6; --btn-ink:#ffffff;
    --ink:#EAF0F8; --muted:#9FB0C8; --bg:#0B1220; --card:#101D33; --line:#22344F;
    --green:#4ADE80; --green-bright:#22C55E; --green-soft:#0F2A1A;
    --amber:#FBBF24; --amber-bright:#F59E0B; --amber-soft:#2A1F0A;
    --violet:#A78BFA; --violet-soft:#221A3E;
    --shadow:0 10px 30px rgba(0,0,0,.4); --shadow-sm:0 3px 12px rgba(0,0,0,.35); --shadow-lg:0 24px 55px rgba(0,0,0,.5);}
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.65;font-size:17px}
a{color:var(--blue);text-decoration:none}
a:hover{text-decoration:underline}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--blue);outline-offset:2px;border-radius:6px}
img,svg{max-width:100%}
h1,h2,h3,h4{line-height:1.15;color:var(--ink);margin:0 0 .55em;font-weight:800;letter-spacing:-.02em}
h1{font-size:clamp(1.9rem,4.2vw,2.9rem)}
h2{font-size:clamp(1.55rem,2.8vw,2.05rem);margin-top:2.1rem}
h3{font-size:1.12rem;font-weight:750;margin-top:1.6rem}
p{margin:0 0 1em}
ul,ol{margin:0 0 1.1em;padding-left:1.25em}
li{margin-bottom:.4em}
.container{max-width:1140px;margin:0 auto;padding:0 20px}
.eyebrow{display:inline-block;font-size:.78rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--blue);margin-bottom:.7rem}
.lede{font-size:1.08rem;color:var(--muted);max-width:46rem;line-height:1.65}
.small{font-size:.88rem;color:var(--muted)}
.muted{color:var(--muted)}
/* Header */
.site-header{position:sticky;top:0;z-index:50;background:#ffffff;border-bottom:1px solid #E2E8F0;box-shadow:0 4px 18px rgba(15,23,42,.05)}
@media (prefers-color-scheme: dark){.site-header{background:#0E1A2E;border-bottom-color:#22344F}}
.header-in{display:flex;align-items:center;gap:18px;height:66px}
.logo{display:flex;align-items:center;gap:10px;font-weight:800;font-size:1.05rem;color:#0F172A;letter-spacing:-.01em;white-space:nowrap}
@media (prefers-color-scheme: dark){.logo{color:#EAF0F8}}
.logo:hover{text-decoration:none}
.logo-mark{width:40px;height:40px;display:grid;place-items:center;flex:none}.logo-mark svg{display:block;width:40px;height:40px}.footer-logo{display:flex;align-items:center;gap:10px;font-weight:800;font-size:1.02rem;color:#fff;letter-spacing:-.01em;margin:0 0 12px}.footer-logo .logo-mark{width:38px;height:38px}.footer-logo .logo-mark svg{width:38px;height:38px}
.main-nav{margin-left:auto}
.main-nav ul{display:flex;gap:4px;list-style:none;margin:0;padding:0}
.main-nav a{display:block;padding:8px 12px;border-radius:999px;color:inherit;font-weight:600;font-size:.92rem}
.main-nav a:hover{background:var(--bg);text-decoration:none}
.main-nav a.active{background:var(--blue-soft);color:var(--blue-d)}
.header-cta{flex:none}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--btn-bg);color:var(--btn-ink);border:1px solid var(--btn-bg);padding:12px 22px;border-radius:999px;font-weight:650;font-size:.95rem;cursor:pointer;text-align:center;line-height:1.3}
.btn:hover{background:var(--btn-bg-h);text-decoration:none;color:var(--btn-ink)}
.btn-ghost{background:transparent;color:var(--blue);border-color:var(--blue)}
.btn-ghost:hover{background:var(--blue-soft);color:var(--blue-d)}
.btn-light{background:#fff;color:#0A1628;border-color:#fff}
.btn-light:hover{background:#E2E8F0;color:#0A1628}
.btn-sm{padding:9px 16px;font-size:.88rem}
.btn-block{width:100%}
.nav-toggle{display:none;margin-left:auto;background:none;border:1px solid var(--line);border-radius:9px;padding:8px 11px;cursor:pointer;color:var(--ink);font-size:1.05rem}
/* Hero — dusk house scene */
.hero{position:relative;overflow:hidden;background:#0A1A33;color:#fff;padding:56px 0 96px}
.hero-photo{position:absolute;inset:0;background:#0A1A33} .hero-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 32%} .hero-credit{position:absolute;top:14px;right:16px;z-index:4;margin:0;font-size:.72rem;color:rgba(255,255,255,.78);letter-spacing:.02em} @media (max-width:1200px){.hero-credit{display:none}}
.hero-veil{position:absolute;inset:0;background:linear-gradient(90deg,rgba(7,17,33,.94) 0%,rgba(10,26,51,.86) 30%,rgba(10,26,51,.52) 55%,rgba(10,26,51,.18) 78%,rgba(10,26,51,.30) 100%),linear-gradient(180deg,rgba(7,17,33,.30) 0%,rgba(7,17,33,0) 30%,rgba(7,17,33,0) 62%,rgba(7,17,33,.66) 100%)}
.hero-grid{position:relative;z-index:2;display:grid;grid-template-columns:1.05fr .95fr;gap:44px;align-items:start}
.hero-badge{display:inline-flex;align-items:center;gap:9px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.24);color:#DBEAFE;padding:7px 14px;border-radius:999px;font-size:.82rem;font-weight:700;letter-spacing:.01em;margin-bottom:18px}
.hero-badge .dot{width:8px;height:8px;border-radius:50%;background:#22C55E;flex:none;box-shadow:0 0 0 4px rgba(34,197,94,.22)}
.hero h1{color:#fff;font-size:clamp(2.5rem,5vw,3.9rem);line-height:1.06;letter-spacing:-.025em;margin-bottom:.45em}
.hero h1 .h-white{display:block;color:#fff}
.hero h1 .h-sky{display:block;color:#93C5FD}
.hero .lede{color:#CBD5E1;font-size:1.13rem;max-width:34rem}
.hero-points{list-style:none;padding:0;margin:26px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:12px 20px;max-width:36rem}
.hero-points li{display:flex;gap:10px;align-items:flex-start;margin:0;color:#E2E8F0;font-size:.95rem;line-height:1.5}
.check{flex:none;width:23px;height:23px;border-radius:50%;background:#22C55E;color:#fff;display:grid;place-items:center;font-size:.8rem;font-weight:800;margin-top:1px}
.page-hero{background:linear-gradient(135deg,#0A1628,#12294D);color:#fff;padding:44px 0 40px}
.page-hero h1{color:#fff;margin-bottom:.35rem}
.page-hero .eyebrow{color:#93C5FD}
.page-hero p{color:#CBD5E1;margin:0;max-width:46rem}
.breadcrumb{font-size:.85rem;color:#94A3B8;margin-bottom:10px}
.breadcrumb a{color:#E2E8F0}
/* Overlapping statistics strip */
.stats-strip{position:relative;z-index:3;margin-top:-58px}
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.stat-grid .card{box-shadow:0 18px 40px rgba(15,23,42,.14)}
.stat-grid .stat-card:nth-child(1) b{color:#2563EB}
.stat-grid .stat-card:nth-child(2) b{color:#16A34A}
.stat-grid .stat-card:nth-child(3) b{color:#D97706}
.stat-grid .stat-card:nth-child(4) b{color:#7C3AED}
@media (prefers-color-scheme: dark){
  .stat-grid .stat-card:nth-child(1) b{color:#60A5FA}
  .stat-grid .stat-card:nth-child(2) b{color:#4ADE80}
  .stat-grid .stat-card:nth-child(3) b{color:#FBBF24}
  .stat-grid .stat-card:nth-child(4) b{color:#A78BFA}
}
/* Calculator card */
.calc-card{background:var(--card);color:var(--ink);border-radius:18px;box-shadow:var(--shadow-lg);padding:26px;min-height:420px;border:1px solid rgba(255,255,255,.35)}
@media (prefers-color-scheme: dark){.calc-card{border-color:#22344F}}
.calc-card h2{margin-top:0;font-size:1.25rem}
.progress{height:6px;background:var(--line);border-radius:99px;overflow:hidden;margin:6px 0 4px}
.progress i{display:block;height:100%;background:linear-gradient(90deg,#2563EB,#60A5FA);border-radius:99px;transition:width .3s}
.step-label{font-size:.82rem;font-weight:700;color:var(--muted);letter-spacing:.04em;text-transform:uppercase}
.opt-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:14px 0}
.opt-grid.cols3{grid-template-columns:repeat(3,1fr)}
.opt{display:flex;gap:11px;align-items:flex-start;text-align:left;background:var(--bg);border:2px solid var(--line);border-radius:12px;padding:13px 14px;cursor:pointer;font:inherit;color:var(--ink);width:100%}
.opt:hover{border-color:var(--blue)}
.opt.selected{border-color:var(--blue);background:var(--blue-soft);box-shadow:0 0 0 1px var(--blue)}
.opt .tile{flex:none;width:40px;height:40px;border-radius:10px;display:grid;place-items:center;font-weight:800;font-size:.8rem}.tile svg{width:28px;height:28px;display:block}
.opt b{display:block;font-size:.95rem;line-height:1.3}
.opt span{font-size:.82rem;color:var(--muted);line-height:1.35;display:block}
.opt .radio{margin-left:auto;flex:none;width:20px;height:20px;border-radius:50%;border:2px solid var(--line);margin-top:3px}
.opt.selected .radio{border-color:var(--blue);background:var(--blue);box-shadow:inset 0 0 0 4px var(--card)}
.tile-blue{background:#DBEAFE;color:#1D4ED8}.tile-green{background:#DCFCE7;color:#15803D}.tile-amber{background:#FFEDD5;color:#C2410C}.tile-rose{background:#FCE7F3;color:#BE185D}.tile-violet{background:#EDE9FE;color:#6D28D9}.tile-teal{background:#CCFBF1;color:#0F766E}.tile-slate{background:#E2E8F0;color:#334155}
@media (prefers-color-scheme: dark){.tile-blue{background:#1E3A5F;color:#BFDBFE}.tile-green{background:#14392A;color:#86EFAC}.tile-amber{background:#45300F;color:#FCD34D}.tile-rose{background:#4A1D33;color:#F9A8D4}.tile-violet{background:#2E2560;color:#C4B5FD}.tile-teal{background:#13413C;color:#99F6E4}.tile-slate{background:#26364C;color:#CBD5E1}}
.field{margin:14px 0}
.field label,.field legend{display:block;font-weight:700;margin-bottom:6px;font-size:.95rem}
.fieldset{border:0;padding:0;margin:0}
input[type=text],input[type=email],input[type=tel],input[type=number],select,textarea{width:100%;padding:11px 13px;border:1.5px solid #CBD5E1;border-radius:10px;font:inherit;background:var(--card);color:var(--ink)}
@media (prefers-color-scheme: dark){input[type=text],input[type=email],input[type=tel],input[type=number],select,textarea{border-color:#334155}}
input[type=text]:focus,input[type=email]:focus,input[type=tel]:focus,input[type=number]:focus,select:focus,textarea:focus{border-color:var(--blue);outline:none;box-shadow:0 0 0 3px rgba(37,99,235,.18)}
input[type=range]{width:100%;accent-color:#2563EB;height:34px}
.sqft-readout{font-size:2rem;font-weight:800;letter-spacing:-.02em}
.sqft-readout small{font-size:.95rem;font-weight:600;color:var(--muted)}
.feat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:12px 0}
.feat{display:flex;gap:10px;align-items:flex-start;border:1.5px solid var(--line);border-radius:11px;padding:11px 12px;cursor:pointer;background:var(--card)}
.feat input{margin-top:3px;accent-color:#2563EB;width:18px;height:18px;flex:none}
.feat b{font-size:.9rem;display:block;line-height:1.3}
.feat span{font-size:.82rem;color:var(--muted)}
.calc-nav{display:flex;gap:10px;margin-top:18px}
.calc-nav .btn{flex:1}
.calc-nav .btn-back{flex:0 0 auto;background:var(--bg);color:var(--ink);border-color:var(--line)}
.calc-nav .btn-back:hover{background:var(--line)}
.validation{background:#FEF2F2;color:#991B1B;border:1px solid #FECACA;border-radius:10px;padding:10px 13px;font-size:.9rem;font-weight:600;margin:12px 0}
@media (prefers-color-scheme: dark){.validation{background:#471A1A;color:#FECACA;border-color:#7F1D1D}}
/* Result */
.result{border:1.5px solid #BFDBFE;border-radius:16px;padding:22px;background:var(--blue-soft);margin-top:8px}
@media (prefers-color-scheme: dark){.result{border-color:#2A4A7A}}
.result .range{font-size:clamp(1.7rem,4vw,2.4rem);font-weight:800;letter-spacing:-.02em;line-height:1.15}
.result .central{font-size:1.02rem;font-weight:700;margin-top:6px}
.rangebar{margin:18px 0 4px}
.rangebar-track{position:relative;height:10px;border-radius:99px;background:#DBEAFE}
@media (prefers-color-scheme: dark){.rangebar-track{background:#1E3A5F}}
.rangebar-fill{position:absolute;left:20%;width:60%;top:0;height:100%;border-radius:99px;background:linear-gradient(90deg,#60A5FA,#2563EB)}
.rangebar-dot{position:absolute;left:40%;top:50%;width:18px;height:18px;border-radius:50%;background:#fff;border:3px solid #2563EB;transform:translate(-50%,-50%)}
.rangebar-labels{display:flex;justify-content:space-between;gap:10px;font-size:.82rem;color:var(--muted);margin-top:9px}
.rangebar-labels b{color:var(--ink)}
.rangebar-labels span:nth-child(2){text-align:center}
.rangebar-labels span:nth-child(3){text-align:right}
.breakdown{width:100%;border-collapse:collapse;margin:16px 0 6px;background:var(--card);border-radius:10px;overflow:hidden}
.breakdown th,.breakdown td{padding:9px 12px;text-align:left;font-size:.92rem;border-bottom:1px solid var(--line)}
.breakdown td:last-child,.breakdown th:last-child{text-align:right;font-weight:700}
.result-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
/* Sections / cards */
.section{padding:52px 0 8px}
.section > h2:first-child{margin-top:0}
section[id]{padding-top:48px}
section[id] > h2:first-child{margin-top:0}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:22px}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.stat-card{text-align:left}
.stat-card b{font-size:1.55rem;display:block;letter-spacing:-.02em}
.stat-card span{font-size:.86rem;color:var(--muted)}
.tool-card{display:flex;flex-direction:column;gap:8px}
.tool-card .tile{width:48px;height:48px;border-radius:12px;display:grid;place-items:center;font-weight:800}
.tool-card h3{margin:0;font-size:1.08rem}
.tool-card p{font-size:.92rem;color:var(--muted);margin:0;flex:1}
.tool-card .go{font-weight:700;font-size:.92rem}
.tool-card.blue{background:#0A1628;border-color:#0A1628;color:#fff}
.tool-card.blue h3,.tool-card.blue p{color:#fff}
.tool-card.blue a{color:#fff}
.tablewrap{overflow-x:auto;margin:16px 0;border:1px solid var(--line);border-radius:12px}
table.cost{width:100%;border-collapse:collapse;font-size:.93rem;background:var(--card)}
table.cost th{background:#0F172A;color:#fff;text-align:left;padding:12px 14px;font-size:.74rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;line-height:1.35}
table.cost th:not(:first-child),table.cost td:not(:first-child){text-align:center}
table.cost td{padding:11px 14px;border-bottom:1px solid var(--line)}
table.cost tbody tr:nth-child(even) td{background:#F1F5F9}
table.cost tbody tr:last-child td{border-bottom:0}
table.cost td:first-child{font-weight:650}
table.cost td:last-child{color:var(--blue-d);font-weight:750}
@media (prefers-color-scheme: dark){table.cost tbody tr:nth-child(even) td{background:#132238}table.cost th{background:#0A1628}}
details.toc{border:1px solid var(--line);border-radius:12px;background:var(--card);padding:16px 20px;margin:28px 0 4px}
details.toc summary{font-weight:750;cursor:pointer;font-size:1rem}
details.toc ul{columns:2;margin:12px 0 0}
details.toc li{break-inside:avoid}
.faq{border:1px solid var(--line);border-radius:12px;background:var(--card);overflow:hidden;margin-bottom:10px}
.faq summary{padding:16px 18px;font-weight:700;cursor:pointer;list-style:none;display:flex;justify-content:space-between;gap:14px;align-items:center}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"";width:9px;height:9px;border-right:2px solid var(--blue);border-bottom:2px solid var(--blue);transform:rotate(45deg);margin-top:-4px;flex:none;transition:transform .18s ease}
.faq[open] summary::after{transform:rotate(-135deg);margin-top:2px}
.faq[open]{background:var(--blue-soft)}
.faq .faq-body{padding:0 18px 18px;color:var(--muted)}
.faq .faq-body p:last-child{margin-bottom:0}
.chips{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0}
.chip{display:inline-block;padding:8px 15px;border:1.5px solid #CBD5E1;border-radius:999px;background:var(--card);color:var(--ink);font-weight:600;font-size:.9rem}
.chip:hover{border-color:var(--blue);background:var(--blue-soft);text-decoration:none}
.cta-banner{background:linear-gradient(135deg,#0A1628,#12294D);color:#fff;border-radius:18px;padding:34px 30px;display:flex;gap:24px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:44px 0}
.cta-banner h2{color:#fff;margin:0 0 6px}
.cta-banner p{color:#CBD5E1;margin:0;max-width:36rem}
.disclaimer{border-left:4px solid #F59E0B;background:var(--amber-soft);border-radius:0 10px 10px 0;padding:13px 16px;font-size:.9rem;margin:20px 0}
.callout{background:var(--blue-soft);border:1px solid #DBEAFE;border-radius:14px;padding:20px 22px;margin:20px 0}
@media (prefers-color-scheme: dark){.callout{border-color:#2A4A7A}}
.callout p:last-child{margin-bottom:0}
.two-col{display:grid;grid-template-columns:1fr 320px;gap:28px;align-items:start}
.two-col h2{margin-top:2rem}
.two-col h2:first-child{margin-top:0}
.sidebar{position:sticky;top:86px}
.sidebar h3{font-size:1rem;margin-top:0}
.sidebar ul{list-style:none;padding:0;margin:0}
.sidebar li{border-bottom:1px solid var(--line);padding:9px 0;margin:0}
.sidebar li:last-child{border-bottom:0}
.post-meta{font-size:.86rem;color:var(--muted);margin-bottom:14px}
.post-meta b{color:var(--ink)}
.blog-card{display:flex;flex-direction:column}
.blog-card .kicker{font-size:.72rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--blue)}
.blog-card h3{margin:.3rem 0 .4rem}
.blog-card p{color:var(--muted);font-size:.92rem;flex:1}
.form-note{font-size:.85rem;color:var(--muted)}
.success{background:var(--green-soft);border:1px solid var(--green);color:var(--green);border-radius:10px;padding:12px 15px;font-weight:650;margin-top:12px}
/* Footer */
.site-footer{background:#0A1628;color:#CBD5E1;margin-top:56px;padding:48px 0 26px}
.site-footer a{color:#E2E8F0}
.site-footer h4{color:#fff;font-size:.95rem;letter-spacing:.02em}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr 1fr;gap:28px}
.site-footer ul{list-style:none;padding:0;margin:0}
.site-footer li{margin-bottom:8px;font-size:.9rem}
.footer-bottom{border-top:1px solid rgba(255,255,255,.16);margin-top:34px;padding-top:20px;font-size:.85rem;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}
#toTop{position:fixed;right:18px;bottom:18px;z-index:60;width:46px;height:46px;border-radius:50%;border:0;background:#2563EB;color:#fff;font-size:1.2rem;cursor:pointer;box-shadow:0 8px 22px rgba(0,0,0,.3);display:none}
#toTop.show{display:block}
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.step-card{position:relative;padding-top:14px}
.step-num{width:36px;height:36px;border-radius:50%;background:#2563EB;color:#fff;display:grid;place-items:center;font-weight:800;margin-bottom:10px}
@media (prefers-reduced-motion: no-preference){.opt,.tool-card,.blog-card,.chip{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.opt:hover,.tool-card:hover,.blog-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}}
.factor-list{list-style:none;padding:0}
.factor-list li{display:flex;gap:12px;margin-bottom:14px}
.factor-list .check{margin-top:2px}
.sitemap-cols{columns:2;column-gap:32px}
.sitemap-cols ul{break-inside:avoid}
@media (max-width:900px){
  .hero-grid{grid-template-columns:1fr}
  .hero{padding:44px 0 84px}
  .hero-veil{background:linear-gradient(90deg,rgba(7,17,33,.92) 0%,rgba(10,26,51,.84) 45%,rgba(10,26,51,.70) 70%,rgba(10,26,51,.68) 100%),linear-gradient(180deg,rgba(7,17,33,.38) 0%,rgba(7,17,33,.48) 30%,rgba(7,17,33,.55) 65%,rgba(7,17,33,.80) 100%)}
  .hero-photo img{object-position:50% 24%}
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:repeat(2,1fr)}
  .two-col{grid-template-columns:1fr}
  .sidebar{position:static}
  .footer-grid{grid-template-columns:1fr 1fr}
  .steps{grid-template-columns:repeat(2,1fr)}
  .main-nav{display:none;position:absolute;top:66px;left:0;right:0;background:var(--card);border-bottom:1px solid var(--line);padding:10px 16px 16px}
  .main-nav.open{display:block}
  .main-nav ul{flex-direction:column}
  .nav-toggle{display:block}
  .header-cta{display:none}
}
@media (max-width:560px){
  body{font-size:16px}
  .grid-3,.grid-2{grid-template-columns:1fr}
  .grid-4{grid-template-columns:1fr}
  .opt-grid,.opt-grid.cols3,.feat-grid{grid-template-columns:1fr}
  .hero-points{grid-template-columns:1fr}
  details.toc ul{columns:1}
  .sitemap-cols{columns:1}
  .calc-card{padding:18px;min-height:0}
  .footer-grid{grid-template-columns:1fr}
  .steps{grid-template-columns:1fr}
  .cta-banner{padding:26px 20px}
  table.cost{font-size:.76rem}
  table.cost th,table.cost td{padding:8px 5px}
  table.cost th{font-size:.66rem;letter-spacing:.05em}
  .section{padding:40px 0 6px}
  .stats-strip{margin-top:-52px}
}
.grid-4.stat-grid{grid-template-columns:repeat(4,1fr)}
@media (max-width:900px){.grid-4.stat-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.grid-4.stat-grid{grid-template-columns:repeat(2,1fr);gap:12px}.grid-4.stat-grid .card{padding:16px}.grid-4.stat-grid .stat-card b{font-size:1.2rem}}
@media print{.site-header,.site-footer,#toTop,.calc-nav,.hero-photo,.hero-credit{display:none!important}.hero{background:#0A1628}}

/* ===== CALCULATOR / HAE RULES (verbatim from applier/assets/calculator.css) ===== */
/* Home Addition Estimator — shared theme (WordPress-ready draft).
 * Navy / royal-blue editorial theme. Upload once (e.g.
 * /wp-content/uploads/hae/calculator.css) and enqueue on every page/post,
 * or paste into the theme Customizer Additional CSS. System font stack
 * only — no webfonts — to protect first paint.
 * Header logo: house outline with a + over the roof (see snippets/header-logo.html).
 */
:root {
  --hae-navy: #0a1a33; --hae-ink: #0f172a; --hae-blue: #2563eb;
  --hae-sky: #8fb8ff; --hae-pale: #f8fafc; --hae-callout: #eff6ff;
  --hae-slate: #475569; --hae-muted: #64748b; --hae-green: #22c55e;
  --hae-amber: #f59e0b; --hae-violet: #7c3aed; --hae-border: #e2e8f0;
}
.hae-page { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--hae-slate); line-height: 1.65; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.hae-page h1, .hae-page h2, .hae-page h3 { color: var(--hae-ink); line-height: 1.15; letter-spacing: -0.02em; }
.hae-page h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; }
.hae-page h2 { font-size: 1.7rem; font-weight: 800; margin-top: 2.5rem; }
.hae-page h3 { font-size: 1.2rem; font-weight: 700; }
.hae-eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--hae-blue); margin: 0 0 .5rem; }
.hae-lead { font-size: 1.12rem; color: var(--hae-slate); }
.hae-hero { background: var(--hae-navy); color: #fff; border-radius: 20px; overflow: hidden; position: relative; }
.hae-hero img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hae-hero-veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,26,51,.94) 0%, rgba(10,26,51,.82) 45%, rgba(10,26,51,.35) 100%); }
.hae-hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; padding: 44px 36px; align-items: center; }
.hae-hero h1 { color: #fff; }
.hae-hero h1 span { color: var(--hae-sky); }
.hae-hero p { color: #cbd5e1; }
.hae-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 12px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.hae-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--hae-green); display: inline-block; }
.hae-checks { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; color: #e2e8f0; }
.hae-checks li::before { content: "✓"; color: var(--hae-green); font-weight: 800; margin-right: 8px; }
.hae-card { background: #fff; border: 1px solid var(--hae-border); border-radius: 18px; box-shadow: 0 12px 32px rgba(15,23,42,.10); padding: 24px; color: var(--hae-ink); }
.hae-btn { display: inline-block; background: var(--hae-blue); color: #fff !important; font-weight: 700; border-radius: 999px; padding: 12px 22px; text-decoration: none; border: 0; cursor: pointer; }
.hae-btn-secondary { background: #fff; color: var(--hae-blue) !important; border: 1px solid var(--hae-border); }
.hae-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: -28px 24px 0; position: relative; z-index: 2; }
.hae-stat { background: #fff; border: 1px solid var(--hae-border); border-radius: 14px; padding: 16px; box-shadow: 0 8px 24px rgba(15,23,42,.08); text-align: center; }
.hae-stat b { display: block; font-size: 1.4rem; }
.hae-stat .c-blue { color: var(--hae-blue); } .hae-stat .c-green { color: #16a34e; }
.hae-stat .c-amber { color: var(--hae-amber); } .hae-stat .c-violet { color: var(--hae-violet); }
.hae-stat span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--hae-muted); }
.hae-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hae-tool { background: #fff; border: 1px solid var(--hae-border); border-radius: 16px; padding: 20px; box-shadow: 0 6px 18px rgba(15,23,42,.06); }
.hae-tool a { color: var(--hae-blue); font-weight: 700; }
.hae-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--hae-callout); margin-bottom: 10px; }
.hae-icon svg { width: 30px; height: 30px; }
.hae-table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: #fff; }
.hae-table th { background: var(--hae-navy); color: #fff; text-align: left; padding: 10px 12px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.hae-table td, .hae-table th[scope="row"] { padding: 10px 12px; border-bottom: 1px solid var(--hae-border); }
.hae-table tbody tr:nth-child(even) td { background: var(--hae-pale); }
.hae-table td:last-child { color: var(--hae-blue); font-weight: 700; }
.hae-callout { background: var(--hae-callout); border-radius: 14px; padding: 20px; }
.hae-progress { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.hae-progress-fill { height: 100%; background: var(--hae-blue); width: 20%; transition: width .3s; }
.hae-step-label { font-size: .85rem; font-weight: 700; color: var(--hae-muted); }
.hae-type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.hae-option { border: 1px solid var(--hae-border); border-radius: 14px; padding: 14px; cursor: pointer; display: block; background: #fff; }
.hae-option:has(input:checked) { border-color: var(--hae-blue); box-shadow: 0 0 0 2px rgba(37,99,235,.25); }
.hae-option input { position: absolute; opacity: 0; }
.hae-option b { display: block; color: var(--hae-ink); }
.hae-option small { color: var(--hae-muted); }
.hae-field { margin: 14px 0; }
.hae-field label { display: block; font-weight: 700; color: var(--hae-ink); margin-bottom: 6px; }
.hae-field input[type="text"], .hae-field input[type="number"], .hae-field select, .hae-field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--hae-border); border-radius: 10px; font: inherit; }
.hae-field input[type="range"] { width: 100%; accent-color: var(--hae-blue); }
.hae-result { background: var(--hae-pale); border: 1px solid var(--hae-border); border-radius: 16px; padding: 20px; margin-top: 18px; }
.hae-result-kicker { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--hae-muted); margin: 0; }
.hae-result-range { font-size: 1.9rem; font-weight: 800; color: var(--hae-ink); margin: .25rem 0; }
.hae-result-central { margin-top: 0; }
.hae-range-bar { position: relative; height: 10px; background: #dbeafe; border-radius: 999px; margin: 14px 0; }
.hae-range-fill { position: absolute; top: 0; height: 100%; background: linear-gradient(90deg, var(--hae-blue), var(--hae-green)); border-radius: 999px; }
.hae-range-mid { position: absolute; left: 50%; top: -4px; width: 3px; height: 18px; background: var(--hae-ink); }
.hae-disclaimer { font-size: .88rem; color: var(--hae-muted); }
.hae-validation { color: #b91c1c; font-weight: 700; min-height: 1.4em; }
.hae-faq details { background: #fff; border: 1px solid var(--hae-border); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.hae-faq summary { font-weight: 700; color: var(--hae-ink); cursor: pointer; }
.hae-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--hae-ink); font-weight: 800; font-size: 1.15rem; line-height: 1.1; }
.hae-logo small { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--hae-muted); font-weight: 700; }
.hae-footer { background: var(--hae-navy); color: #94a3b8; border-radius: 16px; padding: 28px; }
.hae-footer h3, .hae-footer a { color: #fff; }
@media (max-width: 820px) {
  .hae-hero-inner { grid-template-columns: 1fr; padding: 30px 22px; }
  .hae-stats { grid-template-columns: 1fr 1fr; margin: -20px 12px 0; }
  .hae-grid { grid-template-columns: 1fr; }
  .hae-type-grid { grid-template-columns: 1fr; }
}

/* ===== BRIDGE (see /tmp source note in DEPLOY.md) ===== */
/* ==========================================================================
   BRIDGE — WordPress output mapped onto the demo design above.
   Every value below is taken from the demo stylesheet or from
   calculator.css (the .hae-* rules already enqueued by the mu-plugin).
   Nothing here introduces a new colour, font, or spacing scale.
   ========================================================================== */

/* Skip link (accessibility; demo has no equivalent element). */
.skip-link{position:absolute;left:-9999px;top:0;z-index:100;background:#fff;color:#0F172A;padding:8px 14px;font-weight:700;border-radius:0 0 10px 0}
.skip-link:focus{left:0}

/* Logged-in admin bar: keep the sticky demo header below it. */
body.admin-bar .site-header{top:32px}
@media (max-width:782px){body.admin-bar .site-header{top:46px}}

/* Logo wordmark (header-logo.html markup inside the demo .logo anchor). */
.logo small{display:block;font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-weight:700;line-height:1.4}
.logo .logo-text{line-height:1.15}

/* --- wp_nav_menu dropdowns, styled as the demo .main-nav --- */
.main-nav li{position:relative}
.main-nav .sub-menu{display:none;position:absolute;top:100%;left:0;min-width:250px;background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:8px;flex-direction:column;gap:0;z-index:60;list-style:none;margin:0}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu{display:flex}
.main-nav .sub-menu a{padding:9px 12px;border-radius:8px;white-space:nowrap;font-size:.92rem}
.main-nav .sub-menu a:hover{background:var(--bg)}
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current_page_item > a,
.main-nav .current_page_parent > a{background:var(--blue-soft);color:var(--blue-d)}
/* Mobile: the demo hides .main-nav until .open; sub-menus stack inside it. */
@media (max-width:900px){
  .main-nav .sub-menu{position:static;display:none;box-shadow:none;border:0;border-radius:0;padding:0 0 0 14px;min-width:0}
  .main-nav li:hover > .sub-menu,
  .main-nav li:focus-within > .sub-menu{display:flex}
}

/* --- WordPress block output, mapped to demo tables / FAQs / images --- */
.wp-block-table{margin:16px 0;overflow-x:auto;border:1px solid var(--line);border-radius:12px}
.wp-block-table table{width:100%;border-collapse:collapse;font-size:.93rem;background:var(--card);margin:0}
.wp-block-table thead th{background:#0F172A;color:#fff;text-align:left;padding:12px 14px;font-size:.74rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase;line-height:1.35}
.wp-block-table th[scope="row"]{font-weight:650}
.wp-block-table td{padding:11px 14px;border-bottom:1px solid var(--line)}
.wp-block-table tbody tr:nth-child(even) td{background:#F1F5F9}
.wp-block-table tbody tr:last-child td{border-bottom:0}
.wp-block-table td:first-child{font-weight:650}
.wp-block-table td:last-child{color:var(--blue-d);font-weight:750}
.wp-block-table figcaption{font-size:.85rem;color:var(--muted);padding:8px 14px}
.wp-block-details{border:1px solid var(--line);border-radius:12px;background:var(--card);overflow:hidden;margin-bottom:10px;padding:0}
.wp-block-details summary{font-weight:700;color:var(--ink);cursor:pointer;padding:16px 18px;list-style:none}
.wp-block-details summary::-webkit-details-marker{display:none}
.wp-block-details > *:not(summary){padding:0 18px 16px}
.wp-block-image{margin:16px 0}
.wp-block-image img{max-width:100%;height:auto}
.wp-block-image figcaption{font-size:.85rem;color:var(--muted);text-align:center}
/* Hero figure: the hero photo must fill the .hae-hero block (no figure margin). */
.hae-hero figure.wp-block-image{margin:0}
.hae-hero > .wp-block-group{position:relative;z-index:2}

/* --- Blog listing / pagination (demo .card + .blog-card, demo palette) --- */
.hae-pagination{margin:28px 0 8px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.hae-pagination .page-numbers{display:inline-block;padding:8px 14px;border:1px solid var(--line);border-radius:999px;font-weight:600;color:var(--ink);background:var(--card);text-decoration:none}
.hae-pagination .page-numbers:hover{background:var(--bg);text-decoration:none}
.hae-pagination .page-numbers.current{background:var(--blue);color:#fff;border-color:var(--blue)}
.hae-pagination .page-numbers.dots{border:0;background:transparent}

/* --- Related-service box: demo .cta-banner, white-outline secondary button --- */
.cta-banner .btn-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.cta-banner .btn-ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.6)}
.cta-banner .btn-ghost:hover{background:rgba(255,255,255,.12);color:#fff}

/* Page/article body spacing inside the demo .container. */
.entry-content > *:first-child{margin-top:0}
.entry-content h2{margin-top:2.1rem}
.entry-content h2:first-child{margin-top:0}

/* BRIDGE ADDENDUM — search form (404 / no-results), demo palette only. */
.search-form{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.search-form label{flex:1;min-width:200px}
.search-form input[type="search"]{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font:inherit;background:var(--card);color:var(--ink)}
.search-form input[type="submit"]{background:var(--blue);color:#fff;border:1px solid var(--blue);padding:10px 22px;border-radius:999px;font-weight:650;cursor:pointer}
