/* ==========================================================================
   InsuranceByTrade — design system
   Fonts: Plus Jakarta Sans (display/UI) + Inter (text)
   ========================================================================== */
:root {
    --navy: #0a1633;
    --navy-2: #13235a;
    --primary: #2453e6;
    --primary-dark: #1a3fb8;
    --primary-soft: #eef2ff;
    --primary-ring: rgba(36, 83, 230, .22);
    --accent: #f5a524;
    --accent-soft: #fff5e1;
    --mint: #0f9f6e;
    --mint-soft: #e7f7f0;
    --rose: #d63c3c;
    --rose-soft: #fdeeee;
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --line: #e6e9f2;
    --surface: #f7f8fc;
    --white: #fff;
    --r-sm: 10px;
    --r: 16px;
    --r-lg: 22px;
    --sh-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
    --sh: 0 10px 30px -12px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .05);
    --sh-lg: 0 30px 60px -20px rgba(10, 22, 51, .35), 0 8px 20px -8px rgba(10, 22, 51, .15);
    --display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font: 400 17px/1.72 var(--body); color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 800; margin: .15em 0 .35em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); font-weight: 750; margin: 2em 0 .6em; }
h3 { font-size: 1.18rem; font-weight: 700; margin: 1.5em 0 .45em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; border-radius: 8px; }
.small { font-size: .875rem; color: var(--muted); }
.nowrap { white-space: nowrap; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text); line-height: 1.65; }
.icon { flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem var(--display); letter-spacing: -.01em;
    background: var(--primary); color: #fff; border: 0; border-radius: 12px; padding: 13px 22px; cursor: pointer; text-decoration: none;
    box-shadow: 0 8px 20px -8px rgba(36, 83, 230, .65); transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(36, 83, 230, .7); }
.btn .icon { width: 18px; height: 18px; }
.btn-ghost { background: #fff; color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary-dark); box-shadow: inset 0 0 0 1.5px var(--primary-ring); }
.btn-block { display: flex; width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; font-family: var(--display); }
.link-arrow .icon { width: 16px; height: 16px; transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(230, 233, 242, .8); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); font: 800 1.22rem var(--display); letter-spacing: -.03em; }
.logo b { color: var(--primary); font-weight: 800; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a { text-decoration: none; color: var(--text); padding: 8px 12px; border-radius: 10px; font: 600 .95rem var(--display); transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a.nav-cta { background: var(--navy); color: #fff; margin-left: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; }
.nav a.nav-cta:hover { background: var(--primary); }
.nav a.nav-cta .icon { width: 17px; height: 17px; }
.menu-btn { display: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font: 600 .95rem var(--display); cursor: pointer; color: var(--ink); }
@media (max-width: 940px) {
    .menu-btn { display: block; }
    .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch;
        padding: 10px 20px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--sh); }
    .nav.open { display: flex; }
    .nav a { padding: 12px; }
    .nav a.nav-cta { margin: 8px 0 0; justify-content: center; }
}

.crumb-bar { background: #f3f6ff; }
.breadcrumbs { font-size: .85rem; color: var(--muted); padding-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: #cdd6ee; padding: 72px 0 84px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 140%; z-index: -1;
    background: radial-gradient(600px 400px at 15% 30%, rgba(36, 83, 230, .55), transparent 60%),
                radial-gradient(500px 380px at 85% 20%, rgba(124, 58, 237, .35), transparent 60%),
                radial-gradient(520px 360px at 70% 95%, rgba(16, 185, 129, .22), transparent 60%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%); }
.hero-inner { display: grid; gap: 48px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 980px) { .hero-inner { grid-template-columns: 1.25fr 1fr; } }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5.2vw, 3.7rem); }
.hero h1 .hl { background: linear-gradient(90deg, #8fb2ff, #c6a7ff 55%, #7ff0c8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #c3cce6; max-width: 560px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font: 650 .82rem var(--display); letter-spacing: .01em; padding: 6px 12px 6px 8px;
    border-radius: 999px; background: rgba(255, 255, 255, .08); color: #dfe6fb; border: 1px solid rgba(255, 255, 255, .14); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .2); }
.finder { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 16px; padding: 8px; margin: 26px 0 18px;
    box-shadow: var(--sh-lg); max-width: 560px; }
.finder .icon { color: var(--muted); margin-left: 10px; width: 20px; height: 20px; }
.finder select { flex: 1 1 auto; min-width: 0; border: 0; font: 600 1.02rem var(--display); color: var(--ink); background: transparent; padding: 10px 6px; outline: none; cursor: pointer; }
.finder .btn { white-space: nowrap; box-shadow: none; }
@media (max-width: 520px) { .finder { flex-wrap: wrap; } .finder select { flex-basis: calc(100% - 40px); } .finder .btn { width: 100%; } }
.trust-row { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .93rem; color: #c3cce6; }
.trust-row li { display: inline-flex; align-items: center; gap: 8px; }
.trust-row .icon { width: 18px; height: 18px; color: #7ff0c8; }

.rate-card { position: relative; background: rgba(255, 255, 255, .98); border-radius: var(--r-lg); padding: 26px; color: var(--text); box-shadow: var(--sh-lg); }
.rate-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1;
    background: linear-gradient(140deg, rgba(143, 178, 255, .9), rgba(198, 167, 255, .4), rgba(127, 240, 200, .8)); }
.rate-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.rate-card-h p { margin: 0; font: 750 1.05rem var(--display); color: var(--ink); }
.rate-card-h span { font: 650 .75rem var(--display); color: var(--mint); background: var(--mint-soft); padding: 4px 10px; border-radius: 999px; }
.rate { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); text-decoration: none; color: inherit; }
.rate:last-of-type { border-bottom: 0; }
.rate-name { font-weight: 600; color: var(--ink); font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.rate-name .icon { width: 18px; height: 18px; color: var(--primary); }
.rate-price { font: 800 1.08rem var(--display); color: var(--ink); }
.rate-price small { font: 500 .8rem var(--body); color: var(--muted); }
.rate-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.rate-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #8b5cf6); }
.rate:hover .rate-name { color: var(--primary); }
.rate-card .small { margin: 12px 0 0; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-soft { background: var(--surface); }
.section-head { max-width: 680px; margin-bottom: 30px; }
.section-head h2 { margin: .2em 0 .3em; }
.section-head p { color: var(--muted); margin: 0; }
.kicker { font: 750 .78rem var(--display); color: var(--primary); text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Category cards (home + hub) */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
@media (max-width: 380px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--sh-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.cat-card:hover { box-shadow: var(--sh); transform: translateY(-2px); border-color: #d7ddf0; }
.cat-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cat-top h3 { margin: 0; font-size: 1.08rem; }
.cat-top .count { margin-left: auto; font: 650 .78rem var(--display); color: var(--muted); background: var(--surface); padding: 3px 10px; border-radius: 999px; }
.ico-tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.ico-tile .icon { width: 22px; height: 22px; }
.ico-tile.t2 { background: #f3edff; color: #7c3aed; }
.ico-tile.t3 { background: var(--mint-soft); color: var(--mint); }
.ico-tile.t4 { background: var(--accent-soft); color: #c27803; }
.ico-tile.t5 { background: var(--rose-soft); color: var(--rose); }
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list a { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--ink);
    text-decoration: none; font: 600 .88rem var(--display); border: 1px solid transparent; transition: all .15s; }
.chip-list a:hover { background: #fff; border-color: var(--primary); color: var(--primary); }

/* Coverage cards */
.cover-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cover-card { position: relative; display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
    padding: 22px; text-decoration: none; color: var(--text); box-shadow: var(--sh-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.cover-card:hover { box-shadow: var(--sh); transform: translateY(-3px); border-color: #d7ddf0; color: var(--text); }
.cover-card h3 { margin: 4px 0 0; font-size: 1.06rem; }
.cover-card p { font-size: .92rem; color: var(--muted); margin: 0; line-height: 1.6; }
.cover-card .price-tag { position: absolute; top: 20px; right: 20px; font: 750 .8rem var(--display); color: var(--ink); background: var(--surface); padding: 4px 10px; border-radius: 999px; }
.cover-card .price-tag small { font-weight: 500; color: var(--muted); }
.cover-card .link-arrow { margin-top: auto; font-size: .9rem; }

/* Steps / how it works */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; counter-reset: how; }
.how-step { background: #fff; border-radius: var(--r); padding: 26px; border: 1px solid var(--line); position: relative; }
.how-step::before { counter-increment: how; content: counter(how); position: absolute; top: 22px; right: 22px; font: 800 2.4rem/1 var(--display); color: var(--primary-soft); }
.how-step h3 { margin: 14px 0 6px; font-size: 1.1rem; }
.how-step p { margin: 0; font-size: .95rem; color: var(--muted); }

/* State chips */
.state-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.state-chips a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
    font: 650 .95rem var(--display); color: var(--ink); text-decoration: none; box-shadow: var(--sh-sm); transition: all .15s; }
.state-chips a .icon { width: 17px; height: 17px; color: var(--primary); }
.state-chips a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }

/* CTA band */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--navy), #1b2f79 55%, #3b2a8f); color: #d7def5; border-radius: var(--r-lg);
    padding: 40px; display: grid; gap: 20px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 820px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; }
.cta-band .btn { background: #fff; color: var(--navy); box-shadow: none; }
.cta-band .btn:hover { background: var(--accent); color: var(--navy); }

/* ---------- Page header band (articles, hubs) ---------- */
.page-band { background: linear-gradient(180deg, #f3f6ff 0%, #fafbff 100%); border-bottom: 1px solid var(--line); padding: 4px 0 34px; margin-bottom: 36px; }
.page-band h1 { max-width: 860px; }
.page-band .lead { max-width: 760px; margin: 0; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .9rem; color: var(--muted); margin-top: 6px; }
.byline .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: #fff; font: 800 .82rem var(--display); }
.byline .by { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.byline .by a { color: var(--ink); text-decoration: none; }
.byline .meta { display: inline-flex; align-items: center; gap: 5px; }
.byline .meta .icon { width: 16px; height: 16px; }
.byline .sep { width: 4px; height: 4px; border-radius: 50%; background: #c3cad8; }
.verified { display: inline-flex; align-items: center; gap: 6px; font: 650 .8rem var(--display); color: var(--mint); background: var(--mint-soft); padding: 4px 10px; border-radius: 999px; }
.verified .icon { width: 15px; height: 15px; }

/* ---------- Article ---------- */
.article { padding-bottom: 72px; }
.article-grid { display: grid; grid-template-columns: 1fr; gap: 44px; }
@media (min-width: 1040px) { .article-grid { grid-template-columns: minmax(0, 1fr) 290px; } }
.article-main { min-width: 0; }
.article-side { display: none; }
@media (min-width: 1040px) { .article-side { display: block; } }
.side-sticky { position: sticky; top: 92px; }
.toc ol { max-height: calc(100vh - 400px); min-height: 120px; overflow-y: auto; scrollbar-width: thin; }
.toc { padding: 4px 0 4px 2px; margin-bottom: 22px; }
.toc-h { font: 750 .78rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-size: .9rem; line-height: 1.45; transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.side-cta { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--navy), #24399a); color: #cdd6ee; border-radius: var(--r); padding: 22px; font-size: .92rem; }
.side-cta .ico-tile { background: rgba(255,255,255,.12); color: #fff; margin-bottom: 12px; }
.side-cta strong { display: block; color: #fff; font: 750 1.05rem var(--display); margin-bottom: 4px; }
.side-cta p { margin: 0 0 14px; }
.side-cta .btn { background: #fff; color: var(--navy); box-shadow: none; }
.side-cta .btn:hover { background: var(--accent); }

.quick-answer { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px; background: linear-gradient(135deg, #f3f6ff, #f7f3ff);
    border: 1px solid #dfe5fb; border-radius: var(--r); padding: 22px 24px; margin: 0 0 22px; }
.quick-answer .ico-tile { background: #fff; box-shadow: var(--sh-sm); }
.quick-answer p { margin: 0; font-size: 1.07rem; line-height: 1.7; color: var(--ink); }
.qa-label, .kf-label { font: 800 .74rem var(--display) !important; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); margin: 0 0 4px !important; }

.key-facts { margin: 0 0 30px; }
.key-facts dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.key-facts dl > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--sh-sm); }
.key-facts dt { font: 650 .78rem var(--display); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.key-facts dd { margin: 0; font-weight: 600; color: var(--ink); line-height: 1.45; font-size: .97rem; }
.kf-label { margin-bottom: 10px !important; }

.callout { display: grid; grid-template-columns: auto 1fr; gap: 12px; background: var(--accent-soft); border: 1px solid #f7dca6; border-radius: var(--r); padding: 18px 20px; margin: 0 0 24px; }
.callout .icon { color: #c27803; margin-top: 3px; }
.callout p { margin: .2em 0; }

.cover-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 10px; }
@media (min-width: 700px) { .cover-grid { grid-template-columns: 1fr 1fr; } }
.cover-grid > div { border-radius: var(--r); padding: 18px 20px; }
.cover-grid h2 { font-size: 1.05rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.cover-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cover-grid li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; font-size: .96rem; line-height: 1.5; }
.cover-grid li::before { font-weight: 800; }
.cover-yes { background: var(--mint-soft); border: 1px solid #c8ecdc; }
.cover-yes h2 { color: #0b7a54; }
.cover-yes li::before { content: "✓"; color: var(--mint); }
.cover-no { background: var(--rose-soft); border: 1px solid #f6d1d1; }
.cover-no h2 { color: #b42323; }
.cover-no li::before { content: "✕"; color: var(--rose); }

/* Policy cards (coverage a profession needs) */
.policy-list { display: grid; gap: 12px; margin: 0 0 8px; padding: 0; list-style: none; }
.policy-item { display: grid; grid-template-columns: auto 1fr; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--sh-sm); }
.policy-item h3 { margin: 0; font-size: 1.05rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.policy-item h3 a { color: var(--ink); text-decoration: none; }
.policy-item h3 a:hover { color: var(--primary); }
.policy-item p { margin: 6px 0 0; font-size: .95rem; line-height: 1.6; }
.policy-item .covers { color: var(--muted); }
.policy-item .why { color: var(--text); }

.tag { display: inline-flex; align-items: center; gap: 5px; font: 700 .72rem var(--display); letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; white-space: nowrap; text-transform: uppercase; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-req { background: var(--rose-soft); color: var(--rose); }
.tag-ess { background: var(--primary-soft); color: var(--primary); }
.tag-rec { background: var(--mint-soft); color: var(--mint); }
.tag-opt { background: var(--surface); color: var(--muted); }

.prose { max-width: 760px; }
.prose h2 { padding-top: 6px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--primary); }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1.4em 0; padding: 16px 20px; background: var(--surface); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; }
.prose p:has(> strong:first-child) { }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: st; display: grid; gap: 12px; }
.steps { position: relative; }
.steps li { counter-increment: st; position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--sh-sm); transition: box-shadow .2s, border-color .2s; }
.steps li:hover { box-shadow: var(--sh); border-color: #d7ddf0; }
.steps li::before { content: counter(st); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff; font: 800 1.1rem var(--display); box-shadow: 0 8px 16px -8px rgba(36, 83, 230, .7); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 41px; top: 66px; bottom: -14px; width: 2px; background: linear-gradient(var(--primary-soft), transparent); }
.steps li > div { min-width: 0; padding-top: 2px; }
.steps strong { display: block; color: var(--ink); font: 700 1.04rem/1.4 var(--display); margin-bottom: 4px; }
.steps li p { margin: 0; color: var(--text); font-size: .97rem; line-height: 1.65; }

.sources ol { padding-left: 1.3em; font-size: .94rem; }
.sources li { margin: .3em 0; }
.disclaimer { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: .86rem; color: var(--muted); background: var(--surface); border-radius: 12px; padding: 14px 16px; margin-top: 36px; }
.disclaimer .icon { width: 18px; height: 18px; margin-top: 2px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--sh-sm); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface); font: 700 .8rem var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbff; }
tbody th { font-weight: 650; color: var(--ink); }
.wc-table tr:target { background: var(--accent-soft); }

/* ---------- Calculator & estimate ---------- */
.calc-card, .estimate { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh); padding: 26px; margin: 8px 0 32px; }
.estimate h2 { margin-top: 0; }
.calc { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; font: 650 .88rem var(--display); color: var(--ink); margin: 0; }
.field-narrow { max-width: 300px; }
.field input, .field select { width: 100%; font: 500 1rem var(--body); color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
    transition: border-color .15s, box-shadow .15s; appearance: auto; }
.field input:hover, .field select:hover { border-color: #cdd4e6; }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.checks { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) { .checks { grid-template-columns: 1fr 1fr; } }
.checks legend { font: 700 .95rem var(--display); color: var(--ink); padding: 0; margin-bottom: 10px; }
.checks label { position: relative; display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; line-height: 1.45; cursor: pointer; padding: 12px 14px;
    border: 1.5px solid var(--line); border-radius: 12px; transition: all .15s; color: var(--text); }
.checks label:hover { border-color: #cdd4e6; background: #fbfcff; }
.checks input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 2px solid #c3cad8; border-radius: 6px; display: grid; place-items: center; transition: all .15s; cursor: pointer; }
.checks input::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.checks input:checked { background: var(--primary); border-color: var(--primary); }
.checks input:checked::after { opacity: 1; }
.checks label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--ink); }
.calc-result { margin-top: 22px; scroll-margin-top: 90px; transition: opacity .2s; }
.calc-result.loading { opacity: .45; }
.advice-hero { position: relative; overflow: hidden; display: grid; gap: 4px; background: linear-gradient(120deg, var(--navy), #1d3a9e 60%, #4b3bb5); color: #d7def5; border-radius: var(--r); padding: 22px 24px; margin-bottom: 6px; }
.advice-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(127, 240, 200, .35), transparent 70%); }
.advice-label { margin: 0; font: 650 .8rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: #a9b7e6; }
.advice-big { margin: 0; font: 800 clamp(2.2rem, 6vw, 3rem)/1.1 var(--display); color: #fff; letter-spacing: -.03em; }
.advice-big small { font: 600 1rem var(--body); color: #c3cce6; letter-spacing: 0; }
.advice-sub { margin: 0; font-size: .93rem; color: #c3cce6; }
.advice-table td:nth-child(3) { font: 700 .95rem var(--display); color: var(--ink); }

/* ---------- Cards / related ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--text); background: #fff;
    box-shadow: var(--sh-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.card:hover { border-color: #d7ddf0; box-shadow: var(--sh); transform: translateY(-2px); color: var(--text); }
.card b { font: 750 1.02rem var(--display); color: var(--ink); }
.card span { font-size: .9rem; color: var(--muted); line-height: 1.55; }
.card .link-arrow { margin-top: auto; font-size: .88rem; }
.related { margin-top: 56px; }
.cat-h { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; margin: 2em 0 .9em; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; background: #fff; transition: box-shadow .2s, border-color .2s; }
.faq details[open] { box-shadow: var(--sh); border-color: #d7ddf0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 20px; font: 650 1.02rem/1.45 var(--display); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--primary); font: 600 1.3rem/1 var(--display); transition: transform .2s, background .2s; }
.faq details[open] summary::after { content: "–"; background: var(--primary); color: #fff; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--text); }

/* ---------- Glossary ---------- */
.az { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.az a { font: 600 .85rem var(--display); text-decoration: none; padding: 5px 11px; border-radius: 999px; background: var(--surface); color: var(--text); }
.az a:hover { background: var(--primary-soft); color: var(--primary); }
.glossary { margin: 0; display: grid; gap: 12px; }
.glossary div { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; scroll-margin-top: 90px; transition: background .3s; }
.glossary dt { font: 750 1.08rem var(--display); color: var(--ink); }
.glossary dd { margin: 6px 0 0; }
.glossary div:target { background: var(--accent-soft); border-color: #f7dca6; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--navy); color: #a9b4d0; padding: 64px 0 26px; font-size: .93rem; margin-top: 40px; }
.site-footer::before { content: ""; position: absolute; left: -10%; top: -60%; width: 60%; height: 140%; background: radial-gradient(closest-side, rgba(36, 83, 230, .35), transparent); pointer-events: none; }
.site-footer a { color: #dbe3f7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { position: relative; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { display: flex; align-items: center; gap: 10px; font: 800 1.2rem var(--display); color: #fff; margin: 0 0 12px; letter-spacing: -.03em; }
.footer-logo b { color: #8fb2ff; }
.footer-h { color: #fff; font: 750 .8rem var(--display); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.copyright { position: relative; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 44px; padding-top: 20px; color: #7f8bab; font-size: .84rem; }

/* ---------- Hub / page ---------- */
.page { padding-bottom: 72px; }
.page-narrow { max-width: 820px; }
.hub-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hub-stats span { display: inline-flex; align-items: center; gap: 6px; font: 650 .85rem var(--display); background: #fff; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; color: var(--ink); }
.hub-stats .icon { width: 16px; height: 16px; color: var(--primary); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
    .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
    .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1039px) {
    .article-grid { gap: 0; }
}
@media (max-width: 860px) {
    .section { padding: 56px 0; }
    .hero { padding: 48px 0 60px; }
    .hero-inner { gap: 36px; }
    .page-band { padding-bottom: 26px; margin-bottom: 26px; }
    .cta-band { padding: 30px 24px; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .wrap { padding: 0 16px; }
    h2 { margin-top: 1.6em; }
    .section { padding: 44px 0; }
    .section-head { margin-bottom: 22px; }
    .hero { padding: 36px 0 48px; }
    .rate-card { padding: 20px; }
    .cat-card, .cover-card, .how-step { padding: 18px; }
    .breadcrumbs { padding-top: 14px; font-size: .8rem; }
    .byline { gap: 6px 10px; font-size: .85rem; }
    .byline .sep { display: none; }
    .quick-answer { grid-template-columns: 1fr; gap: 0; padding: 18px; }
    .quick-answer .ico-tile { display: none; }
    .quick-answer p { font-size: 1rem; }
    .key-facts dl { grid-template-columns: 1fr 1fr; gap: 8px; }
    .key-facts dl > div { padding: 12px; }
    .key-facts dt { font-size: .7rem; }
    .key-facts dd { font-size: .9rem; }
    .policy-item { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 16px; }
    .policy-item .ico-tile { width: 38px; height: 38px; }
    .steps li { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px; }
    .steps li::before { width: 36px; height: 36px; font-size: .95rem; }
    .steps li:not(:last-child)::after { display: none; }
    .calc-card, .estimate { padding: 16px; border-radius: 18px; }
    .advice-hero { padding: 18px; }
    .checks label { padding: 10px 12px; font-size: .9rem; }
    .field-narrow { max-width: none; }
    .faq summary { padding: 14px 16px; font-size: .97rem; }
    .faq details p { padding: 0 16px 14px; }
    .cta-band { padding: 26px 20px; text-align: left; }
    .cta-band .btn { width: 100%; }
    .site-footer { padding-top: 44px; }
    .disclaimer { grid-template-columns: 1fr; }
    .disclaimer .icon { display: none; }

    /* Tables that turn into stacked cards on phones */
    .table-wrap:has(.stack-table) { border: 0; box-shadow: none; background: transparent; overflow: visible; }
    .stack-table thead { display: none; }
    .stack-table, .stack-table tbody, .stack-table tr, .stack-table th, .stack-table td { display: block; width: 100%; }
    .stack-table tr { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--sh-sm); }
    .stack-table tbody tr:hover { background: #fff; }
    .stack-table th, .stack-table td { border: 0; padding: 3px 0; white-space: normal; }
    .stack-table th[scope=row] { font-size: 1rem; padding-bottom: 6px; }
    .stack-table td[data-label]::before { content: attr(data-label) ": "; font: 650 .78rem var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
    .stack-table td.why::before { display: none; }
    .stack-table td.why { color: var(--text); font-size: .92rem; padding-top: 6px; }
    .stack-table td:empty { display: none; }
}
@media (max-width: 380px) {
    .key-facts dl { grid-template-columns: 1fr; }
    .finder select { font-size: .95rem; }
}

/* Collapsible table of contents for screens without the sidebar */
.toc-mobile { display: none; }
@media (max-width: 1039px) {
    .toc-mobile { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin: 0 0 26px; box-shadow: var(--sh-sm); }
    .toc-mobile summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px; font: 700 .98rem var(--display); color: var(--ink); }
    .toc-mobile summary::-webkit-details-marker { display: none; }
    .toc-mobile summary .icon { color: var(--primary); }
    .toc-mobile summary span { margin-left: auto; font: 600 .8rem var(--body); color: var(--muted); }
    .toc-mobile summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
    .toc-mobile[open] summary::after { transform: rotate(180deg); }
    .toc-mobile ol { margin: 0; padding: 4px 16px 14px 36px; border-top: 1px solid var(--line); }
    .toc-mobile li { margin: 8px 0; }
    .toc-mobile a { text-decoration: none; color: var(--text); font-size: .95rem; }
    .toc-mobile a:hover { color: var(--primary); }
}

/* Author / reviewer (E-E-A-T) */
.avatar-img { border-radius: 50%; object-fit: cover; flex: none; }
.author-box { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-top: 40px; }
.author-row { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.author-box .avatar { font-weight: 800; }
.author-kicker { margin: 0; font: 750 .72rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.author-name { margin: 2px 0 6px; font: 750 1.08rem var(--display); color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.author-name a { color: var(--ink); text-decoration: none; }
.author-name a:hover { color: var(--primary); }
.author-cred { font: 650 .75rem var(--display); color: var(--mint); background: var(--mint-soft); padding: 3px 10px; border-radius: 999px; }
.author-cred.big { display: inline-block; font-size: .85rem; }
.author-bio { margin: 0; font-size: .94rem; color: var(--text); }
.author-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 0; font-size: .88rem; }
.reviewer-row { border-top: 1px solid var(--line); padding-top: 14px; }
.author-hero { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 10px; }
.author-hero h1 { margin: .1em 0 .2em; }
