@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(../fonts/plus-jakarta-sans-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF;
}

/* ---------- design tokens ----------
 * Navy = trust (banking); green = "sanctioned". */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --ink: #0b1430;
  --muted: #5a6479;
  --line: #e3e8f1;
  --navy: #0b1430;
  --navy-2: #13204a;
  --brand: #0e9f7a;
  --brand-ink: #087a5d;
  --brand-soft: #e6f6f0;
  --button-fill: #08785c;
  --accent: #6d5dfc;
  --accent-soft: #efedff;
  --good: #12a36b;
  --fair: #d08a0c;
  --poor: #d6453d;
  --good-soft: #e5f7ee;
  --fair-soft: #fdf3dd;
  --poor-soft: #fdeceb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 20, 48, .06);
  --shadow-lg: 0 6px 24px rgba(11, 20, 48, .1);
  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070c1d;
    --surface: #0f1730;
    --surface-2: #141e3c;
    --ink: #e9edf7;
    --muted: #9aa5bf;
    --line: #222d4d;
    --brand: #2fd3a3;
    --brand-ink: #6ee8c3;
    --brand-soft: #0f2f2c;
    --button-fill: #62d4af;
    --accent: #9b8fff;
    --accent-soft: #1f1d45;
    --good: #3ed195;
    --fair: #f2b84b;
    --poor: #ff7a70;
    --good-soft: #0e2f24;
    --fair-soft: #33280f;
    --poor-soft: #3a1717;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 28px rgba(0, 0, 0, .3);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .75rem; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-ink); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; border-radius: 8px; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }
.fine { font-size: .82rem; color: var(--muted); margin-top: 1rem; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem max(clamp(1rem, 5vw, 3rem), calc((100% - 1152px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span { font-size: 1.22rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.brand strong { color: var(--brand); font-weight: 800; }
.topnav { display: flex; align-items: center; gap: .35rem; }
.link { background: none; border: 0; padding: .45rem .8rem; border-radius: 999px; cursor: pointer; color: var(--muted); font-size: .92rem; font-weight: 600; transition: background .15s ease, color .15s ease; }
.link:hover { color: var(--ink); background: var(--surface-2); }
.link.is-current { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

main { max-width: 1080px; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem) 4rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border-radius: 8px; padding: .72rem 1.35rem; border: 1px solid transparent;
  font-weight: 700; cursor: pointer; letter-spacing: -0.005em;
  transition: transform .12s ease, background .15s ease, box-shadow .2s ease, border-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--button-fill); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--button-fill) 87%, var(--ink)); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #04261c; } }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.btn-lg { padding: .95rem 1.8rem; font-size: 1.05rem; }
.btn-sm { padding: .48rem .95rem; font-size: .88rem; }

/* ---------- shared headings ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 800; color: var(--brand-ink); background: var(--brand-soft); padding: .35rem .7rem; border-radius: 999px; margin-bottom: .9rem; }
.lede { font-size: 1.12rem; color: var(--muted); margin: 1rem 0 1.6rem; max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.ficon { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; }
.ficon svg { width: 22px; height: 22px; }

/* ---------- stepper ---------- */
.stepper { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; gap: .25rem; }
.stepper li { flex: 1; position: relative; }
.stepper li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--line); }
.stepper li.done::after, .stepper li.active::after { background: var(--brand); }
.stepper button { width: 100%; display: flex; align-items: center; gap: .5rem; background: none; border: 0; padding: .4rem 0 .7rem; cursor: pointer; color: var(--muted); font-size: .88rem; }
.stepper button:disabled { cursor: default; }
.stepper .active button { color: var(--ink); font-weight: 600; }
.stepper .dot { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; background: var(--line); color: var(--muted); }
.stepper .done .dot { background: var(--brand); color: #fff; }
.stepper .active .dot { background: var(--ink); color: var(--bg); }
@media (max-width: 600px) { .stepper .name { display: none; } .stepper .active .name { display: inline; } }

/* ---------- form ---------- */
.step { border: 1px solid var(--line); padding: 0; margin: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.1rem, 4vw, 2rem); animation: rise .35s ease; }
.step legend { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; padding: 0; float: left; width: 100%; margin-bottom: 1.25rem; }
.step legend + * { clear: both; }
.step-intro { color: var(--muted); margin: -0.5rem 0 1.25rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; }
.span-2 { grid-column: span 2; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.label { font-weight: 600; font-size: .95rem; }
.label em { font-weight: 400; color: var(--muted); font-style: normal; }
.hint { font-size: .82rem; color: var(--muted); min-height: 1.1em; }
.error { font-size: .85rem; color: var(--poor); font-weight: 500; }
.has-error input, .has-error select { border-color: var(--poor); background: var(--poor-soft); }

input[type=text], input[type=number], input[type=email], input[type=tel], input:not([type]), select {
  width: 100%; padding: .75rem .9rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease; font-weight: 500;
}
input[type=text]:focus, input[type=number]:focus, input[type=email]:focus, input[type=tel]:focus, input:not([type]):focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
input[type=text]:hover, input[type=number]:hover, input[type=email]:hover, input[type=tel]:hover, input:not([type]):hover, select:hover { border-color: color-mix(in srgb, var(--ink) 20%, var(--line)); }
.prefix { position: relative; display: block; }
.prefix::before { content: "₹"; position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.prefix input { padding-left: 1.8rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-block; padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); font-size: .92rem; font-weight: 500; transition: all .15s ease; user-select: none;
}
.chips label:hover span { border-color: var(--muted); }
.chips input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(11,20,48,.18); }
@media (prefers-color-scheme: dark) { .chips input:checked + span { background: var(--brand); border-color: var(--brand); color: #04261c; } }
.chips input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.chips-sm span { padding: .35rem .75rem; font-size: .85rem; }

.score-input { display: flex; gap: 1rem; align-items: center; --pct: 73%; }
.score-input input[type=number] { width: 6rem; flex: none; text-align: center; font-weight: 700; font-size: 1.1rem; }
.score-input input[type=range] { flex: 1; }
.score-input.is-disabled { opacity: .4; }
input[type=range] {
  -webkit-appearance: none; appearance: none; height: 8px; border-radius: 8px; cursor: pointer;
  background: linear-gradient(90deg, var(--poor), var(--fair) 55%, var(--good));
}
.whatif input[type=range] { background: var(--line); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }

.form-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 1.25rem; }
.step-count { color: var(--muted); font-size: .9rem; }

/* ---------- results ---------- */
.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.results-actions { display: flex; gap: .5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.2rem, 3vw, 1.75rem); margin-bottom: 1.1rem; animation: rise .45s ease both; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

.summary { display: flex; gap: clamp(1rem, 4vw, 2.25rem); align-items: center; }
@media (max-width: 560px) { .summary { flex-direction: column; text-align: center; } }
.gauge { position: relative; width: 150px; height: 150px; flex: none; --c: var(--brand); }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 11; }
.gauge-track { stroke: var(--line); }
.gauge-fill { stroke: var(--c); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.gauge-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge-text strong { font-size: 2.6rem; line-height: 1; letter-spacing: -0.03em; }
.gauge-text span { color: var(--muted); font-size: .85rem; }
.band-ready { --c: var(--good); }
.band-nearly { --c: var(--brand); }
.band-work { --c: var(--fair); }
.band-notyet { --c: var(--poor); }
.band { display: inline-block; padding: .3rem .8rem; border-radius: 999px; font-weight: 700; font-size: .9rem; margin-bottom: .6rem; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.summary-text p { font-size: 1.05rem; }
.blockers:empty { display: none; }
.blockers { margin-top: .9rem; padding: .8rem 1rem; border-radius: 10px; background: var(--poor-soft); border-left: 4px solid var(--poor); text-align: left; }
.blockers .blk-title { font-weight: 700; color: var(--poor); font-size: .92rem; }
.blockers ul { margin: .35rem 0 0; padding-left: 1.1rem; font-size: .92rem; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1.1rem; }
@media (max-width: 780px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .25rem; position: relative; overflow: hidden; animation: rise .45s ease both; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--line); }
.kpi.good::before { background: var(--good); }
.kpi.fair::before { background: var(--fair); }
.kpi.poor::before { background: var(--poor); }
.kpi strong { font-size: 1.35rem; letter-spacing: -0.01em; }
.kpi-label { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi-sub { font-size: .82rem; color: var(--muted); }
.kpi.good { border-top-color: var(--good); }
.kpi.fair { border-top-color: var(--fair); }
.kpi.poor { border-top-color: var(--poor); }
.kpi.good strong { color: var(--good); }
.kpi.poor strong { color: var(--poor); }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.cols .card { margin-bottom: 1.1rem; }
@media (max-width: 780px) { .cols { grid-template-columns: 1fr; gap: 0; } }

.pillar { margin-bottom: 1rem; --c: var(--brand); }
.pillar.good { --c: var(--good); }
.pillar.fair { --c: var(--fair); }
.pillar.poor { --c: var(--poor); }
.pillar-row { display: flex; justify-content: space-between; font-size: .93rem; margin-bottom: .35rem; }
.pts { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 10px; animation: grow 1s cubic-bezier(.2, .8, .2, 1) both; }

.slider { display: block; margin: .9rem 0; }
.slider > span { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .45rem; }
.slider output { font-weight: 700; font-variant-numeric: tabular-nums; }
.slider input { width: 100%; }
.wi-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1.1rem 0 .9rem; padding: .8rem; border-radius: 10px; background: var(--bg); }
.wi-results div { text-align: center; }
.wi-results dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wi-results dd { margin: .15rem 0 0; font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.wi-results .good { color: var(--good); }
.wi-results .fair { color: var(--fair); }
.wi-results .poor { color: var(--poor); }
.wi-results small { font-size: .78rem; }
.up { color: var(--good); }
.down { color: var(--poor); }

.actions { list-style: none; padding: 0; margin: 0; counter-reset: a; }
.actions li { counter-increment: a; display: flex; gap: 1rem; align-items: flex-start; padding: .9rem 0; border-top: 1px solid var(--line); }
.actions li:first-child { border-top: 0; }
.actions li::before { content: counter(a); flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: .85rem; }
.actions li.is-blocker::before { background: var(--poor); color: #fff; }
.actions li.empty::before { content: "✓"; }
.act-main { flex: 1; }
.act-main p { color: var(--muted); font-size: .93rem; margin-top: .15rem; }
.gain { flex: none; font-size: .82rem; font-weight: 700; color: var(--good); background: var(--good-soft); border-radius: 999px; padding: .2rem .6rem; white-space: nowrap; }
.is-blocker .gain { color: var(--poor); background: var(--poor-soft); }

.schemes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem; }
.scheme { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.scheme header { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .4rem; }
.scheme p { font-size: .92rem; }
.scheme .where { color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.fit { font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.fit-strong { background: var(--good-soft); color: var(--good); }
.fit-possible { background: var(--fair-soft); color: var(--fair); }

.progress-pill { font-size: .82rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; background: var(--bg); color: var(--muted); }
.progress-pill.complete { background: var(--good-soft); color: var(--good); }
.docs { columns: 2 300px; column-gap: 2rem; }
.doc-group { break-inside: avoid; margin-bottom: 1rem; }
.doc-group h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .4rem; }
.doc { display: flex; gap: .6rem; align-items: flex-start; padding: .35rem 0; cursor: pointer; font-size: .93rem; }
.doc input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: var(--brand); flex: none; }
.doc input:checked + span { color: var(--muted); text-decoration: line-through; }

.details summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: "+"; font-size: 1.4rem; color: var(--muted); }
.details[open] summary::after { content: "−"; }
.details summary h2 { margin: 0; }
.checks h3 { margin: 1.25rem 0 .4rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.checks ul { list-style: none; padding: 0; margin: 0; }
.chk { display: flex; gap: .75rem; align-items: flex-start; padding: .55rem 0; border-top: 1px solid var(--line); }
.chk p { color: var(--muted); font-size: .9rem; }
.chk > div { flex: 1; }
.chk-dot { flex: none; width: .7rem; height: .7rem; border-radius: 50%; margin-top: .4rem; background: var(--c); }
.chk.good { --c: var(--good); }
.chk.fair { --c: var(--fair); }
.chk.poor { --c: var(--poor); }
.chk-pts { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.disclaimer { font-size: .82rem; color: var(--muted); text-align: center; max-width: 640px; margin: 2rem auto 0; }

/* ---------- tool navigation ---------- */
.tools-nav { gap: .25rem 1rem; flex-wrap: wrap; justify-content: flex-end; }
a.link, a.btn { text-decoration: none; }
.nav-short { display: none; }
.link.is-current { color: var(--brand); font-weight: 600; }
.tool-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.tool-link { display: flex; gap: .85rem; align-items: center; text-decoration: none; color: var(--ink); background: var(--surface); border: 1.5px solid var(--brand); border-radius: var(--radius); padding: .9rem 1.1rem; }
.tool-link:hover { background: var(--brand-soft); }
.tool-link small { display: block; color: var(--muted); }

/* ---------- calculator ---------- */
.calc { max-width: 1100px; }
.calc-head { margin-bottom: 1.25rem; }
.calc-head .lede { margin: .6rem 0 0; }
.cgt-rate-out { display: block; padding: .6rem .85rem; border-radius: 10px; background: var(--brand-soft); color: var(--ink); font-size: .93rem; }
.inline-override { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--muted); margin-top: .3rem; }
.inline-override input { width: 7rem; flex: none; }
.bank-note { margin: 0; padding: .7rem .9rem; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.bank-note a { color: var(--brand); }
.estimate-note { margin-top: .9rem; padding: .7rem 1rem; border-radius: 10px; background: var(--fair-soft); border-left: 4px solid var(--fair); font-size: .92rem; max-width: 760px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.calc-grid .card { margin: 0; }
@media (max-width: 860px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-grid .card h2 { margin-bottom: 1rem; }
.calc .kpis { margin-top: 1.1rem; }
input[type=date] { width: 100%; padding: .7rem .9rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); font-weight: 500; }
input[type=date]:focus { outline: none; border-color: var(--brand); background: var(--surface); }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.card-head { flex-wrap: wrap; margin-bottom: .75rem; }
.card-head h2 { margin: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
.table-wrap.tall { max-height: 560px; overflow-y: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: .5rem .75rem; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.data th:first-child { text-align: left; }
table.data thead th { position: sticky; top: 0; background: var(--bg); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
table.data tbody th { font-weight: 500; }
table.data tfoot th, table.data tfoot td { font-weight: 700; border-bottom: 0; background: var(--bg); }
table.data tr.k-broken, table.data tr.k-moratorium { background: color-mix(in srgb, var(--fair) 8%, transparent); }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--fair-soft); color: var(--fair); margin-left: .35rem; vertical-align: middle; }
@media print {
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .table-wrap.tall { max-height: none; overflow: visible; }
  .row-actions, #printBtn { display: none !important; }
  table.data thead th { position: static; }
}

/* ---------- government schemes ---------- */
.scheme-filters { display: grid; gap: 1rem; }
.filter-group { display: flex; flex-direction: column; gap: .45rem; }
.filter-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.scheme-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 345px), 1fr)); gap: 1.1rem; margin-top: 1.1rem; }
.scheme-card { margin: 0; display: flex; flex-direction: column; gap: .75rem; }
.scheme-card h2 { margin: 0; font-size: 1.2rem; }
.scheme-card h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; }
.scheme-tagline { color: var(--muted); margin-top: .3rem; font-size: .95rem; }
.scheme-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0; }
.scheme-facts div { background: var(--brand-soft); border-radius: 10px; padding: .55rem .7rem; }
.scheme-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-ink); font-weight: 700; }
.scheme-facts dd { margin: .15rem 0 0; font-weight: 600; font-size: .92rem; }
.scheme-elig { margin: 0; padding-left: 1.1rem; font-size: .92rem; display: grid; gap: .3rem; }
.scheme-caution { margin: 0; padding: .55rem .8rem; border-radius: 10px; background: var(--fair-soft); border-left: 4px solid var(--fair); font-size: .88rem; }
.scheme-how { font-size: .92rem; }
.scheme-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.scheme-meta { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; font-size: .8rem; color: var(--muted); text-align: right; }
.scheme-domain { font-weight: 600; color: var(--ink); }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; row-gap: .4rem; }
  .tools-nav { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: .2rem .45rem; }
  .tools-nav .link { padding: .45rem .55rem; font-size: .85rem; }
  .tools-nav .nav-full { display: none; }
  .tools-nav .nav-short { display: inline; }
}
.empty-state { grid-column: 1 / -1; text-align: center; color: var(--muted); }
@media (max-width: 400px) { .scheme-facts { grid-template-columns: 1fr; } }

/* ---------- homepage ---------- */
main:has(.view-intro:not([hidden])) {
  max-width: none;
  padding: 0 0 4rem;
}
.view-intro { display: grid; gap: clamp(2rem, 5vw, 4.25rem); }
.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(2.75rem, 7vw, 6.75rem) max(clamp(1rem, 5vw, 3rem), calc((100% - 1152px) / 2));
  background: #111e30;
  color: #f4f8fc;
}
.hero-context {
  color: #a8dcc9;
  font-size: .87rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.hero-panel h1 {
  font-size: clamp(2.6rem, 5.7vw, 5rem);
  font-weight: 750;
  line-height: 1.03;
  letter-spacing: -.065em;
  max-width: 11ch;
}
.hero-panel h1 em { color: #a8e2cb; font-style: normal; }
.hero-panel .lede { color: #c4d0dd; max-width: 42ch; font-size: clamp(1rem, 1.55vw, 1.125rem); }
.hero-panel .btn-primary { background: #a8e2cb; color: #142d28; }
.hero-panel .btn-primary:hover { background: #c2efdb; }
.hero-panel .btn-ghost { background: transparent; border-color: #607287; color: #f4f8fc; }
.hero-panel .btn-ghost:hover { background: #213146; border-color: #9bafc4; }
.hero-panel .btn-lg { padding: .75rem 1.1rem; font-size: .95rem; min-height: 47px; }
.trust {
  list-style: none;
  padding: 0;
  margin: 1.45rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.15rem;
  color: #c4d0dd;
  font-size: .8rem;
}
.trust li { display: inline-flex; align-items: center; gap: .35rem; }
.trust svg { width: 14px; height: 14px; color: #a8e2cb; flex: none; }

.preview-card {
  margin: 0;
  padding: clamp(1.15rem, 2.8vw, 2.1rem);
  background: #fdfefe;
  color: #172438;
  border-radius: 16px;
  box-shadow: 0 16px 40px #050c1833;
}
.preview-card figcaption { font-size: .82rem; color: #52627a; font-weight: 700; margin-bottom: 1.15rem; }
.preview-top { display: flex; align-items: center; gap: 1rem; }
.preview-ring {
  width: 80px;
  height: 80px;
  border: 1px solid #d7e7df;
  border-radius: 12px;
  background: #eef7f2;
  display: grid;
  place-items: center;
  text-align: center;
  flex: none;
  font-size: 1.72rem;
  line-height: 1.15;
  color: #1a5242;
}
.preview-ring small { display: block; font-size: .75rem; color: #546d64; }
.preview-tag { color: #21654f; font-size: .79rem; font-weight: 750; }
.preview-title { font-weight: 800; font-size: 1.08rem; margin-top: .2rem; }
.preview-sub { font-size: .82rem; color: #52627a; }
.preview-stats {
  display: grid;
  grid-template-columns: .8fr 1.2fr 1fr;
  gap: .65rem;
  padding: .85rem 0;
  margin: 1.1rem 0;
  border-block: 1px solid #e1e7ee;
}
.preview-stats dt { font-size: .74rem; color: #52627a; }
.preview-stats dd { margin: .2rem 0 0; font-weight: 800; font-size: 1rem; }
.preview-bar { display: grid; gap: .38rem; }
.preview-bar p { display: flex; justify-content: space-between; gap: .5rem; font-size: .79rem; color: #34445a; }
.preview-bar i { display: block; height: 5px; border-radius: 4px; background: #e1e7ee; overflow: hidden; margin-bottom: .35rem; }
.preview-bar i b { display: block; height: 100%; border-radius: 4px; background: #438674; }

.view-intro > section {
  width: min(1152px, calc(100% - 2 * clamp(1rem, 5vw, 3rem)));
  margin-inline: auto;
}
.section-head { margin-bottom: 1rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin: 0; }
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.tool-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.tool-card:hover { border-color: var(--brand); background: var(--surface-2); }
.tool-card h3 { font-size: 1.08rem; }
.tool-card p { color: var(--muted); font-size: .94rem; }
.tool-card .go { margin-top: auto; display: inline-flex; align-items: center; gap: .45rem; color: var(--brand-ink); font-weight: 750; font-size: .89rem; padding-top: .35rem; }
.tool-card .go svg { width: 15px; height: 15px; }

@media (max-width: 760px) {
  .hero-panel, .tools-grid { grid-template-columns: 1fr; }
  .hero-panel { gap: 1.8rem; }
  .preview-card { width: min(100%, 470px); }
}
@media (max-width: 360px) {
  .hero-panel .hero-actions { display: grid; }
}

/* ---------- inner pages ---------- */
.calc-head {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.calc-head h1 { font-size: clamp(1.95rem, 4.8vw, 3.1rem); }
.calc-grid > section, .kpi, .scheme-card { min-width: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 2rem; }
.site-footer .inner { max-width: 1080px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2rem); display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; }
@media (max-width: 720px) { .site-footer .inner { grid-template-columns: 1fr; } }
.site-footer .brand span { font-size: 1.1rem; }
.site-footer p { color: var(--muted); font-size: .86rem; margin-top: .6rem; max-width: 52ch; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-content: start; justify-content: flex-end; }
@media (max-width: 720px) { .site-footer nav { justify-content: flex-start; } }
.site-footer nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.site-footer nav a:hover { color: var(--brand-ink); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1rem; font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }

/* ---------- balance sheet + ratios ---------- */
.bs-block { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px dashed var(--line); }
.bs-title { font-size: 1.02rem; margin-bottom: .4rem; }
.bs-title em { font-style: normal; font-weight: 500; color: var(--muted); font-size: .9rem; }
.ratios { display: grid; gap: .6rem; }
.ratio { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); }
.ratio strong { display: block; font-size: .98rem; }
.ratio span { font-size: .82rem; color: var(--muted); }
.ratio-val { text-align: right; }
.ratio-val b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ratio-tag { font-size: .74rem; font-weight: 800; padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; background: var(--line); color: var(--muted); }
.ratio.good .ratio-tag { background: var(--good-soft); color: var(--good); }
.ratio.fair .ratio-tag { background: var(--fair-soft); color: var(--fair); }
.ratio.poor .ratio-tag { background: var(--poor-soft); color: var(--poor); }
.ratio.good .ratio-val b { color: var(--good); }
.ratio.poor .ratio-val b { color: var(--poor); }
@media (max-width: 560px) { .ratio { grid-template-columns: 1fr auto; } .ratio-tag { grid-column: 1 / -1; justify-self: start; } }

/* ---------- share and enquiry ---------- */
.share-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.results-share { margin: -.25rem 0 1rem; }
.btn-whatsapp { background: #1fa855; color: #fff; border-color: #1fa855; }
.btn-whatsapp:hover { background: #178f47; border-color: #178f47; }
.btn-whatsapp svg { width: 16px; height: 16px; }
.share-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.share-card h2 { margin-bottom: .2rem; }
.cta-cma { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.cta-cma h2 { margin-bottom: .25rem; }
.cta-cma p { color: var(--muted); font-size: .93rem; }
.takeover-verdict { border-left: 5px solid var(--line); }
.takeover-verdict.good { border-left-color: var(--good); }
.takeover-verdict.poor { border-left-color: var(--poor); }
.takeover-verdict h2 { margin-bottom: .3rem; }
.takeover-verdict p { color: var(--muted); }
@media print { .share-bar, .cta-cma, .share-card { display: none !important; } }

/* ---------- floating WhatsApp button ---------- */
.wa-float { position: fixed; right: 16px; bottom: 76px; z-index: 30; display: inline-flex; align-items: center; gap: .45rem;
  background: #1fa855; color: #fff; text-decoration: none; font-weight: 700; font-size: .92rem; padding: .7rem 1rem .7rem .8rem;
  border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.22); transition: transform .15s ease, box-shadow .15s ease; }
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.28); }
.wa-float svg { width: 22px; height: 22px; flex: none; }
@media (max-width: 560px) { .wa-float span { display: none; } .wa-float { padding: .75rem; } }
@media print { .wa-float { display: none !important; } }

/* ---------- about / legal pages ---------- */
.legal-page { max-width: 820px; }
.prose h2 { font-size: 1.1rem; margin: 1.4rem 0 .5rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink); font-size: .97rem; }
.prose p + p { margin-top: .6rem; }
.prose ul { padding-left: 1.2rem; margin: .4rem 0 0; display: grid; gap: .35rem; }
.legal-links { display: inline-flex; flex-wrap: wrap; gap: .25rem .9rem; align-items: center; }
.legal-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.legal-links a:hover { color: var(--brand-ink); }
.contact-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }
.ficon.wa-icon { background: #e7f8ee; color: #1fa855; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { width: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- print ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --shadow: none; color-scheme: light; }
  body { font-size: 11pt; }
  .topbar, .results-actions, .whatif, .form-nav { display: none !important; }
  main { padding: 0; max-width: none; }
  .card, .kpi { border: 1px solid #ccc; break-inside: avoid; animation: none; }
  .cols { grid-template-columns: 1fr; }
  .details summary::after { display: none; }
  .bar i, .gauge-fill { animation: none; transition: none; }
}
.bs-block .step-intro { margin: .15rem 0 1.1rem; }

.hero-mode-note { color: #c4d0dd; font-size: .85rem; margin-top: .8rem; }
.check-mode { border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem .85rem; margin: 0 0 1.2rem; }
.check-mode legend { padding: 0 .35rem; font-weight: 700; }
.check-mode .hint { margin-top: .55rem; }
.ratio-guidance { margin-bottom: .75rem; }
#addBalanceBtn { margin-top: 1rem; }

/* Cash-credit renewal enquiry */
.cma-request-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.cma-request-grid .card { margin: 0; }
.cma-checklist p, .cma-form-note, .cma-invite p { color: var(--muted); font-size: .93rem; }
.cma-checklist ul { padding-left: 1.25rem; margin: .85rem 0 1.4rem; }
.cma-checklist li + li { margin-top: .45rem; }
.cma-consent { display: flex; align-items: start; gap: .6rem; margin: .9rem 0 1.1rem; font-size: .93rem; }
.cma-consent input { margin-top: .3rem; }
.cma-form-note { margin: 1rem 0 .65rem; }
.cma-form-note:empty { display: none; }
.cma-invite { display: flex; justify-content: space-between; align-items: start; gap: .8rem; flex-wrap: wrap; }
.cma-invite h2 { margin-bottom: .35rem; }
@media (max-width: 720px) { .cma-request-grid { grid-template-columns: 1fr; } }

.fee-assumptions { margin-top: .85rem; }
.fee-assumptions summary { cursor: pointer; font-weight: 700; }
.fee-assumptions ul { padding-left: 1.25rem; color: var(--muted); font-size: .9rem; }
.fee-assumptions li + li { margin-top: .4rem; }

/* Phones: keep the top menu on one row; demos stay reachable from the homepage and footer. */
@media (max-width: 760px) { .tools-nav .nav-demos { display: none; } }
