/* HomeCost Guide — professional design system v2
   Trust palette: deep navy + confident blue, high-converting orange CTAs.
   System font stack (zero webfont cost), mobile-first, generous whitespace. */

:root {
  --navy: #0d2440;
  --navy-2: #12314f;
  --blue: #1663d9;
  --blue-dark: #0f4cab;
  --sky: #e9f1fd;
  --sky-2: #f4f8fe;
  --accent: #f97316;
  --accent-dark: #dd5f0b;
  --accent-soft: #fff4e8;
  --ink: #182234;
  --muted: #5a6b82;
  --faint: #8a99ad;
  --line: #dfe7f2;
  --bg: #ffffff;
  --bg-soft: #f6f9fd;
  --green: #157347;
  --green-soft: #e9f7ef;
  --red: #b42318;
  --red-soft: #fdecea;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(13, 36, 64, .08);
  --shadow-lg: 0 18px 50px rgba(13, 36, 64, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
  --measure: 740px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 99; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); font-weight: 600; font-size: 15px; padding: 9px 13px; border-radius: 9px; }
.site-nav a:hover { background: var(--sky-2); text-decoration: none; color: var(--blue-dark); }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 85% -60px, rgba(22, 99, 217, .35), transparent 60%),
    radial-gradient(800px 380px at 8% 110%, rgba(249, 115, 22, .14), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, #0a1c33 100%);
  color: #fff;
  padding: 76px 0 66px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
  padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  letter-spacing: .02em; margin-bottom: 20px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .2); }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 18px; max-width: 16em; font-weight: 800; }
.hero h1 .grad { background: linear-gradient(92deg, #7db4ff, #ffa25e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: 19px; line-height: 1.65; color: #c9d6e8; max-width: 38em; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 38px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .14); }
.hero-stats .stat b { display: block; font-size: 27px; letter-spacing: -.02em; }
.hero-stats .stat span { font-size: 13.5px; color: #9fb2c9; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 750; font-size: 16px; padding: 14px 26px; border-radius: 12px;
  border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none !important; line-height: 1.3;
}
.btn-primary { background: linear-gradient(180deg, var(--blue), var(--blue-dark)); color: #fff; box-shadow: 0 8px 22px rgba(22, 99, 217, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(22, 99, 217, .45); }
.btn-call {
  background: linear-gradient(180deg, #ff8a2a, var(--accent-dark)); color: #fff;
  font-size: 19px; padding: 17px 38px; border-radius: 14px;
  box-shadow: 0 10px 26px rgba(249, 115, 22, .42);
}
.btn-call:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(249, 115, 22, .5); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-soft); }
.section h2, .article h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; line-height: 1.25; margin: 0 0 14px; color: var(--navy); font-weight: 800; }
.section .sub { color: var(--muted); font-size: 18px; max-width: 44em; margin: 0 0 30px; }

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .16s ease, box-shadow .16s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--sky), #fff); border: 1px solid var(--line);
  margin-bottom: 14px; font-size: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.015em; }
.card h3 a { color: var(--navy); }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 15.5px; flex: 1; }
.card-meta { font-size: 13.5px; color: var(--faint); font-weight: 600; }
.card .price { font-weight: 800; color: var(--green); font-size: 16px; margin-bottom: 6px; }
.card-link { margin-top: 12px; font-weight: 700; font-size: 15px; }

/* ---------- article layout ---------- */
.article-wrap { display: grid; grid-template-columns: minmax(0, var(--measure)) 260px; gap: 48px; align-items: start; }
.article { min-width: 0; }
.article h1 { font-size: clamp(30px, 4.4vw, 44px); letter-spacing: -.03em; line-height: 1.12; color: var(--navy); margin: 6px 0 12px; font-weight: 800; }
.article h2 { margin-top: 52px; scroll-margin-top: 90px; padding-top: 6px; }
.article h3 { font-size: 20px; color: var(--navy); margin: 30px 0 10px; letter-spacing: -.015em; }
.article p, .article li { color: #2b3a52; }
.byline { color: var(--faint); font-size: 14px; margin: 0 0 26px; }
.byline b { color: var(--muted); }

/* cost hero box */
.cost-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-2) 70%, #143a63);
  color: #fff; border-radius: var(--radius); padding: 30px 32px; margin: 26px 0 34px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cost-hero::before { content: ""; position: absolute; top: -70px; right: -70px; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle, rgba(249,115,22,.35), transparent 70%); }
.cost-hero .ch-label { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: #9fb2c9; font-weight: 700; }
.cost-hero .ch-avg { font-size: clamp(34px, 5vw, 48px); font-weight: 800; letter-spacing: -.03em; margin: 6px 0 4px; }
.cost-hero .ch-avg small { font-size: 18px; font-weight: 600; color: #c9d6e8; }
.cost-hero .ch-range { font-size: 16.5px; color: #dbe6f5; }
.cost-hero .ch-note { font-size: 13.5px; color: #9fb2c9; margin-top: 10px; }

/* sticky TOC */
.toc { background: var(--sky-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 0 0 34px; }
.toc h2 { font-size: 15px !important; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px !important; color: var(--muted) !important; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.toc li { margin: 7px 0; font-size: 15px; break-inside: avoid; }
.toc-side { position: sticky; top: 96px; }
.toc-side .toc ol { columns: 1; }

/* tables */
table.cost-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 22px 0 30px; font-size: 15.5px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cost-table-wrap { overflow-x: auto; margin: 22px 0 30px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cost-table-wrap table.cost-table { margin: 0; border: 0; min-width: 560px; }
.cost-table thead th { background: var(--navy); color: #fff; text-align: left; padding: 13px 16px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.cost-table tbody td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.cost-table tbody tr:nth-child(even) td { background: var(--bg-soft); }
.cost-table tbody tr:hover td { background: var(--sky); }
.cost-table td:first-child { font-weight: 650; color: var(--navy); }

/* breakdown list */
.breakdown { list-style: none; margin: 18px 0 30px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.breakdown li { display: grid; grid-template-columns: 190px 170px 1fr; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); align-items: start; }
.breakdown li:first-child { border-top: 0; }
.breakdown li:nth-child(even) { background: var(--bg-soft); }
.breakdown .bi { font-weight: 750; color: var(--navy); }
.breakdown .br { font-weight: 800; color: var(--green); white-space: nowrap; }
.breakdown .bd { color: var(--muted); font-size: 15px; }

/* callouts */
.callout { border-radius: var(--radius-sm); padding: 20px 22px 20px 58px; margin: 26px 0; position: relative; font-size: 16px; }
.callout::before { position: absolute; left: 20px; top: 19px; font-size: 21px; }
.callout p { margin: 0; }
.callout strong.t { display: block; margin-bottom: 4px; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.callout.tip { background: var(--green-soft); border: 1px solid #bfe6cd; }
.callout.tip::before { content: "💡"; }
.callout.tip strong.t { color: var(--green); }
.callout.warn { background: var(--red-soft); border: 1px solid #f3c1bb; }
.callout.warn::before { content: "⚠️"; }
.callout.warn strong.t { color: var(--red); }
.callout.info { background: var(--sky-2); border: 1px solid #c3d8f5; }
.callout.info::before { content: "ℹ️"; }
.callout.info strong.t { color: var(--blue-dark); }

/* checklists + steps */
.checklist { list-style: none; padding: 0; margin: 18px 0 28px; }
.checklist li { padding: 10px 0 10px 36px; position: relative; border-bottom: 1px dashed var(--line); }
.checklist li::before { content: "✓"; position: absolute; left: 4px; top: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.checklist li:last-child { border-bottom: 0; }
.steps { list-style: none; padding: 0; margin: 18px 0 28px; counter-reset: step; }
.steps li { counter-increment: step; padding: 14px 0 14px 58px; position: relative; border-bottom: 1px dashed var(--line); }
.steps li::before { content: counter(step); position: absolute; left: 2px; top: 13px; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 16px; }
.steps li:last-child { border-bottom: 0; }
.steps li strong { color: var(--navy); }

/* FAQ accordions */
.faq { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 12px 0; background: #fff; overflow: hidden; }
.faq summary { padding: 17px 20px; font-weight: 700; color: var(--navy); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--blue); font-weight: 400; flex-shrink: 0; transition: transform .18s ease; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: var(--sky-2); }
.faq .faq-a { padding: 16px 20px 20px; color: #2b3a52; border-top: 1px solid var(--line); }

/* call band */
.call-band {
  background: linear-gradient(120deg, #fff7ef, #ffe9d2);
  border: 2px solid #f9c48a; border-radius: var(--radius);
  padding: 34px 30px; text-align: center; margin: 44px 0;
}
.call-band h2 { margin: 0 0 8px !important; color: var(--navy) !important; }
.call-band p { color: var(--muted); margin: 0 0 20px; }
.call-band .call-note { font-size: 13.5px; color: var(--faint); margin: 14px 0 0; }

/* breadcrumb */
.breadcrumb { font-size: 14px; color: var(--faint); margin: 0 0 6px; }
.breadcrumb a { color: var(--muted); }

/* sources */
.sources { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 24px; margin: 34px 0; }
.sources h2 { font-size: 18px !important; margin: 0 0 10px !important; }
.sources ul { margin: 0; padding-left: 20px; font-size: 15px; }
.source-note { font-size: 13.5px; color: var(--faint); font-style: italic; }

/* related */
.related { margin-top: 54px; padding-top: 34px; border-top: 2px solid var(--line); }

/* footer */
.site-footer { background: var(--navy); color: #b8c6da; padding: 54px 0 30px; margin-top: 20px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; }
.footer-brand .brand-name { color: #fff; font-size: 20px; font-weight: 800; }
.footer-tag { font-size: 14.5px; margin: 8px 0 0; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; align-content: start; }
.footer-nav a { color: #dbe6f5; font-weight: 600; font-size: 15px; }
.footer-note { grid-column: 1 / -1; font-size: 13px; color: #8fa3bd; border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; margin: 6px 0 0; }
.footer-copy { grid-column: 1 / -1; font-size: 13px; color: #8fa3bd; margin: 0; }

/* 404 */
.notfound { text-align: center; padding: 70px 0; }
.notfound h1 { font-size: 90px; margin: 0; color: var(--navy); letter-spacing: -.04em; }

/* trust/method blocks */
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin: 28px 0; }
.method { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.method .m-num { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }
.method h3 { margin: 0 0 8px; font-size: 17px; color: var(--navy); }
.method p { margin: 0; font-size: 15px; color: var(--muted); }

/* contact form */
.contact-form { max-width: 560px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.field input, .field textarea { width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,99,217,.15); }
.form-note { background: var(--sky-2); border: 1px solid var(--line); padding: 16px 20px; border-radius: 10px; margin-bottom: 24px; font-size: 15px; color: var(--muted); }

/* responsive */
@media (max-width: 960px) {
  .article-wrap { grid-template-columns: 1fr; }
  .toc-side { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 44px 0; }
  .hero { padding: 54px 0 46px; }
  .site-nav { display: none; }
  .breakdown li { grid-template-columns: 1fr; gap: 4px; }
  .toc ol { columns: 1; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .btn-call { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
