/* KS Associates — mobile-first stylesheet. No external fonts (system stack) for best LCP/CLS. */
:root {
  --navy: #0b2341; --navy-2: #12325a; --ink: #1b2533; --muted: #556275;
  --line: #e3e8ef; --bg: #ffffff; --bg-alt: #f5f7fa; --gold: #b8892b; --gold-soft: #f6efe0;
  --wa: #0f7d43; --wa-hover: #0b6636; --focus: #1d6fe0;
  --radius: 14px; --shadow: 0 1px 2px rgba(11,35,65,.06), 0 8px 24px rgba(11,35,65,.08);
  --wrap: 1180px; --gutter: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font: 400 1rem/1.65 var(--font); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; color: var(--navy); letter-spacing: -.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 5vw + .5rem, 3.1rem); font-weight: 750; }
h2 { font-size: clamp(1.45rem, 2.4vw + .6rem, 2.1rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 650; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.center { text-align: center; margin-top: 2rem; }
.small, .meta { font-size: .875rem; color: var(--muted); }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon-sm { width: 1em; height: 1em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: .65em 1.15em; border-radius: 999px; font-weight: 650; text-decoration: none; border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s; line-height: 1.2; cursor: pointer; }
.btn-sm { min-height: 40px; padding: .45em .95em; font-size: .95rem; }
.btn-lg { min-height: 52px; padding: .8em 1.5em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-hover); color: #fff; }
.btn-ghost { color: #fff; background: transparent; border-color: rgba(255,255,255,.45); font: inherit; font-weight: 650; }
.btn-ghost:hover { color: var(--navy); background: #fff; }
.btn-outline { color: var(--navy); border-color: var(--navy); margin: .25rem; }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--navy); }
.brand-logo { display: block; flex: none; width: 48px; height: 48px; object-fit: contain; }
.footer-brand { display: flex; align-items: center; gap: .75rem; }
.footer-brand .brand-logo { width: 64px; height: 64px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.1rem; }
.brand-text small { font-size: .72rem; color: var(--muted); }
.nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1rem; box-shadow: var(--shadow); }
.site-nav.open { display: block; }
.no-js .site-nav { display: block; position: static; box-shadow: none; }
.site-nav ul { list-style: none; margin: 0 0 .75rem; padding: 0; }
.site-nav li a { display: block; padding: .7rem .25rem; text-decoration: none; color: var(--ink); font-weight: 550; border-bottom: 1px solid var(--line); }
.site-nav a[aria-current="page"] { color: var(--gold); }

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: .75rem var(--gutter) 0; font-size: .85rem; color: var(--muted); }
.crumbs { padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: .25rem; color: #a3adbb; }
.crumbs a { color: var(--muted); }

/* Hero */
.hero, .page-hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(184,137,43,.22), transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0e2c52 60%, var(--navy-2) 100%); color: #e9eef6; }
.hero h1, .page-hero h1 { color: #fff; }
.hero-inner { display: grid; gap: 2rem; padding: 3rem var(--gutter) 3.5rem; }
.lead { font-size: 1.1rem; color: #cfd8e6; max-width: 60ch; }
.prose .lead { color: var(--muted); }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.eyebrow-light { color: #e3c47e; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; font-size: .95rem; color: #cfd8e6; }
.hero-points li { display: flex; gap: .5rem; align-items: center; }
.hero-points .icon { color: #e3c47e; }
.hero-panel { display: none; }
.panel-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 1.75rem; backdrop-filter: blur(4px); }
.panel-h { font-weight: 700; color: #fff; margin-bottom: 1rem; }
.panel-card ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.panel-card li { display: flex; align-items: center; gap: .8rem; color: #e9eef6; }
.panel-card li span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; flex: none; }
.page-hero { padding: 2.5rem 0 2.75rem; }
.crumbs + .page-hero, .crumbs + article .page-hero { margin-top: .75rem; }
.byline { font-size: .9rem; color: #b9c5d8; margin: 0; }

/* Sections & grids */
.section { padding: 3.25rem 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section-head p:last-child { color: var(--muted); }
.grid { display: grid; gap: 1.1rem; }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; transition: box-shadow .2s, transform .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #d3dbe6; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card p { color: var(--muted); margin-bottom: .6rem; }
.card .meta { margin: 0; }
.card-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); margin-bottom: .9rem; }
.card-more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 650; color: var(--navy-2); font-size: .92rem; }
.split { display: grid; gap: 2rem; align-items: start; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.steps .icon { width: 30px; height: 30px; color: var(--gold); margin-bottom: .6rem; }
.steps p { color: var(--muted); margin: 0; }
.audience { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.audience li { display: flex; gap: 1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.audience .icon { width: 28px; height: 28px; color: var(--gold); }
.audience h3 { margin-bottom: .25rem; }
.audience p { margin: 0; color: var(--muted); }

/* Content layout */
.layout-2 { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 3rem; }
.prose { min-width: 0; }
.prose h2 { margin-top: 2rem; }
.prose section:first-child h2, .prose > h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--bg-alt); color: var(--navy); }
ul.ticks { list-style: none; padding: 0; }
ul.ticks li { position: relative; padding-left: 1.75rem; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 1.05rem; height: .6rem; border-left: 2.5px solid var(--wa); border-bottom: 2.5px solid var(--wa); transform: rotate(-45deg) scale(.75); }
.process { list-style: none; padding: 0; counter-reset: p; }
.process li { position: relative; padding: 0 0 1.1rem 3.25rem; counter-increment: p; }
.process li::before { content: counter(p); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 750; }
.process li:not(:last-child)::after { content: ""; position: absolute; left: 1.08rem; top: 2.4rem; bottom: .2rem; width: 2px; background: var(--line); }
.process h3 { margin: .25rem 0 .3rem; }
.process p { color: var(--muted); margin: 0; }
.note { background: var(--gold-soft); border-left: 3px solid var(--gold); padding: .75rem 1rem; border-radius: 6px; font-size: .95rem; }
.notice { background: var(--bg-alt); border: 1px dashed #c3ccd8; padding: .8rem 1rem; border-radius: 8px; }
.key-points { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem .5rem; margin-bottom: 1.75rem; }
.inline-cta { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; background: linear-gradient(135deg, #eef7f1, #f7fbf8); border: 1px solid #cfe7d8; border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 2rem 0; }
.inline-cta p { margin: 0; }
.faq { margin-top: 2.25rem; }
.faq details { border: 1px solid var(--line); border-radius: 10px; margin-bottom: .6rem; background: #fff; }
.faq summary { cursor: pointer; padding: 1rem 2.5rem 1rem 1.1rem; font-weight: 650; color: var(--navy); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: .85rem; font-size: 1.3rem; color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq-a { padding: 0 1.1rem 1rem; color: var(--muted); }
.faq-a p:last-child { margin: 0; }
.sources { margin-top: 2rem; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); }
.sources h2 { font-size: 1.05rem; margin: 0 0 .5rem; }
.sources ul { margin: 0 0 .5rem; }
.sidebar { display: grid; gap: 1rem; align-content: start; }
.side-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: #fff; }
.side-cta { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #dfe6f1; border: 0; }
.side-cta h2, .side-cta h3, .side-cta .side-h { color: #fff; }
.side-cta .notice { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); color: #fff; }
.side-cta .small { color: #b9c5d8; }
.side-h { font-weight: 700; color: var(--navy); margin-bottom: .6rem; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list li:last-child { border: 0; }
.link-list a { display: block; padding: .55rem 0; text-decoration: none; font-weight: 550; }
.contact-dl dt { font-weight: 700; color: var(--navy); margin-top: .75rem; }
.contact-dl dd { margin: 0; }
.contact-main { padding: 1.75rem; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: #dfe6f1; padding: 3rem 0; }
.cta-band h2 { color: #fff; }
.cta-inner { display: grid; gap: 1.25rem; align-items: center; }
.cta-inner p { margin: 0; max-width: 62ch; }

/* Footer */
.site-footer { background: #081a31; color: #b9c5d8; padding: 3rem 0 6rem; font-size: .95rem; }
.site-footer a { color: #dfe6f1; text-decoration: none; }
.site-footer a:hover { color: #e3c47e; }
.footer-grid { display: grid; gap: 2rem; }
.footer-brand { font-size: 1.25rem; font-weight: 750; color: #fff; }
.footer-h { color: #fff; font-weight: 700; margin-bottom: .6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; }
.footer-legal p { margin: 0 0 .4rem; }

/* Floating WhatsApp */
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: inline-flex; align-items: center; gap: .5rem; background: var(--wa); color: #fff; text-decoration: none; font-weight: 700; padding: .8rem 1.1rem; border-radius: 999px; box-shadow: 0 6px 20px rgba(15,125,67,.35); min-height: 52px; }
.wa-float:hover { background: var(--wa-hover); color: #fff; }
.wa-float .icon { width: 1.5em; height: 1.5em; }

@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .inline-cta { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav, .no-js .site-nav { display: flex; align-items: center; gap: 1rem; position: static; padding: 0; border: 0; box-shadow: none; background: none; }
  .site-nav ul { display: flex; gap: .25rem; margin: 0; }
  .site-nav li a { border: 0; padding: .5rem .7rem; border-radius: 8px; }
  .site-nav li a:hover { background: var(--bg-alt); color: var(--navy); }
  .hero-inner { grid-template-columns: 1.35fr 1fr; align-items: center; padding: 5rem var(--gutter); }
  .hero-panel { display: block; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .layout-2 { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; }
  .sidebar { position: sticky; top: 92px; }
  .cta-inner { grid-template-columns: 1fr auto; }
  .footer-grid { grid-template-columns: 1.4fr 1.2fr 1fr 1fr; }
  .section { padding: 4.5rem 0; }
  .site-footer { padding-bottom: 3rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .site-header, .wa-float, .cta-band, .sidebar, .site-footer { display: none; } }
.no-js .header-inner { flex-wrap: wrap; }
.no-js .nav-toggle { display: none; }
@media (max-width: 639px) { .wa-float { padding: .85rem; } .wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* Tax calculator */
.nav-hl { color: var(--navy) !important; font-weight: 700 !important; }
.nav-hl::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: .45rem; vertical-align: middle; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.calc-form { display: grid; gap: 1.1rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 2rem; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 650; color: var(--navy); margin-bottom: .4rem; padding: 0; }
.field select, .field input[type="text"] { width: 100%; min-height: 48px; padding: .6rem .8rem; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c3ccd8; border-radius: 10px; }
.field input[aria-invalid="true"] { border-color: #b42318; }
.field-error { color: #b42318; font-size: .9rem; margin: .4rem 0 0; }
.choice { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin-right: 1.25rem; cursor: pointer; }
.choice input { width: 1.15rem; height: 1.15rem; accent-color: var(--navy); }
.calc-result { scroll-margin-top: 90px; margin-bottom: 2.5rem; }
.calc-result:focus { outline: none; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0 0 1.75rem; }
.stats div { border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; background: #fff; }
.stats dt { font-size: .8rem; color: var(--muted); }
.stats dd { margin: .15rem 0 0; font-size: 1.15rem; font-weight: 750; color: var(--navy); overflow-wrap: anywhere; }
.stats .stat-main { background: linear-gradient(160deg, var(--navy), var(--navy-2)); border: 0; }
.stats .stat-main dt { color: #cfd8e6; } .stats .stat-main dd { color: #fff; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1rem; }
.prose .table-wrap table { display: table; margin: 0; min-width: 480px; }
.slab-table td:not(:first-child), .slab-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.slab-table tfoot th { text-align: left !important; }
.slab-table tr.active td { background: #f3f8f5; }
.slab-table tfoot td, .slab-table tfoot th { border-top: 1px solid var(--line); }
.slab-table tr.total th, .slab-table tr.total td { font-weight: 750; color: var(--navy); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .calc-form { padding: 1.75rem; } }
.prose .table-wrap table.rates { min-width: 0; }
.slab-table.rates td, .slab-table.rates th { white-space: normal; text-align: left; }
.site-nav li a { white-space: nowrap; }
@media (min-width: 960px) and (max-width: 1179px) {
  .brand-text small { display: none; }
  .site-nav { gap: .5rem; }
  .site-nav li a { padding: .5rem .45rem; font-size: .95rem; }
}

/* Tax cards */
.h3 { font-size: 1.12rem; }
.no-js .js-only { display: none; }
.card-search { max-width: 560px; margin-bottom: 1.5rem; }
.card-search label { display: block; font-weight: 650; color: var(--navy); margin-bottom: .4rem; }
.card-search input { width: 100%; min-height: 48px; padding: .6rem .9rem; font: inherit; border: 1px solid #c3ccd8; border-radius: 10px; }
.card-search .small { min-height: 1.4em; margin: .4rem 0 0; }
.tc-item[hidden] { display: none; }
.tc-tags { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.tc-tags li { font-size: .75rem; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .6rem; color: var(--muted); }
.tc-grid { margin-bottom: 1.5rem; }
.tc-brand { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); margin-bottom: 1.75rem; background: #fff; }
.tc-brand div { display: flex; flex-direction: column; line-height: 1.3; }
.tc-brand strong { color: var(--navy); font-size: 1.1rem; }
.tc-brand span { color: var(--muted); font-size: .9rem; }
.tc-label { display: inline-block; font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; padding: .2rem .55rem; border-radius: 6px; background: var(--navy); color: #fff; margin-right: .4rem; }
.tc-label-wht { background: var(--gold); color: var(--navy); }
.tc-wht { border: 1px dashed var(--gold); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-top: 2rem; background: var(--gold-soft); }
.tc-wht h2 { margin-top: 0; }
.doc-list { list-style: none; padding: 0 !important; margin: .5rem 0 1rem; }
.doc-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.doc-title { display: inline-flex; gap: .45rem; align-items: flex-start; }
.doc-title .icon { margin-top: .3em; color: var(--gold); }
.doc-actions { display: inline-flex; gap: 1rem; font-weight: 650; white-space: nowrap; }
.tc-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-weight: 650; }
@media print {
  .page-hero, .crumbs, .tc-pager, .inline-cta { display: none; }
  .layout-2 { display: block; padding: 0; }
  .tc-wht { background: none; }
  .table-wrap { overflow: visible; }
  a { color: inherit; text-decoration: none; }
}
