/* BTO Radar design system.
   Identity: a radar scope — deep navy ink, signal teal for data, an amber sweep for emphasis.
   System fonts only (no font download); tabular figures wherever numbers line up.
   Chart colors are validated (dataviz skill): light #12968c / #e9a23b, dark #2ba597 / #c4862a. */

:root {
  color-scheme: light;
  --bg: #f5f7fa; --bg-2: #eef2f6; --surface: #ffffff; --surface-2: #f8fafc;
  --ink: #0c1f33; --ink-2: #3b5167; --muted: #6a7d90; --line: #e2e8ef; --line-2: #cfd8e2;
  --navy: #0d2640; --navy-2: #13355a;
  --signal: #0b7d75;            /* text-safe teal (4.9:1 on white) */
  --signal-soft: #e3f4f2;
  --series: #12968c;            /* chart marks */
  --mark: #e9a23b;              /* amber marker; always labeled */
  --amber-soft: #fdf3e2; --amber-ink: #8a5a0b;
  --prime: #8a5a0b; --prime-soft: #fdf1dc;
  --plus: #0b6f8c; --plus-soft: #e2f1f7;
  --standard: #46586b; --standard-soft: #edf1f5;
  --good: #1e7a46; --good-soft: #e3f3e9; --error: #b3261e; --error-soft: #fdecea;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(12, 31, 51, .04), 0 8px 24px -12px rgba(12, 31, 51, .14);
  --shadow-lift: 0 2px 6px rgba(12, 31, 51, .06), 0 18px 40px -18px rgba(12, 31, 51, .28);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #07111c; --bg-2: #0b1826; --surface: #0f1f30; --surface-2: #12253a;
    --ink: #e7eef5; --ink-2: #b4c3d2; --muted: #8698aa; --line: #1d3147; --line-2: #2a4361;
    --navy: #06101b; --navy-2: #0c1d30;
    --signal: #4fd1c3; --signal-soft: #12342f;
    --series: #2ba597; --mark: #c4862a;
    --amber-soft: #2e2412; --amber-ink: #f1c27a;
    --prime: #f1c27a; --prime-soft: #2e2412;
    --plus: #7fcfe8; --plus-soft: #0f2c3a;
    --standard: #b4c3d2; --standard-soft: #18293b;
    --good: #6fd39b; --good-soft: #10291c; --error: #ff8a80; --error-soft: #3a1714;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 40px -18px rgba(0, 0, 0, .6);
  }
}

/* ——— Base ——— */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16.5px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--signal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--series) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 750; }
h2 { font-size: clamp(21px, 2.4vw, 26px); font-weight: 700; }
h3 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.num, table, .stat-value, .big { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 50; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ——— Header ——— */
header.site { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.logo { width: 30px; height: 30px; color: var(--signal); flex: none; }
header nav { display: flex; gap: 4px; flex-wrap: wrap; }
header nav a { white-space: nowrap; color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 550; padding: 7px 12px; border-radius: 999px; }
header nav a:hover { background: var(--bg-2); color: var(--ink); }
header nav a[aria-current="page"] { background: var(--signal-soft); color: var(--signal); }
header nav a.nav-cta { background: var(--navy); color: #fff; }
header nav a.nav-cta:hover { background: var(--navy-2); }
@media (prefers-color-scheme: dark) { header nav a.nav-cta { background: var(--signal); color: #04201d; } }

/* ——— Main ——— */
main { padding: 20px 0 80px; min-height: 60vh; }
.crumbs { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 22px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--signal); margin: 0 0 12px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--series); box-shadow: 0 0 0 4px var(--signal-soft); }
.lede { font-size: clamp(17px, 1.6vw, 19.5px); color: var(--ink-2); max-width: 680px; margin: 14px 0 0; }
.page-head { padding: 8px 0 30px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.page-head .meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.section { margin: 56px 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head p { margin: 6px 0 0; color: var(--muted); }

/* ——— Buttons, pills, badges ——— */
.button, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--navy); color: #fff; border: 0;
  border-radius: 999px; padding: 13px 22px; font: 650 15.5px var(--sans); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover, button:hover { background: var(--navy-2); transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.button.ghost:hover { background: var(--surface); }
@media (prefers-color-scheme: dark) { .button:not(.ghost), button { background: var(--signal); color: #04201d; } .button:not(.ghost):hover, button:hover { background: #6fe0d3; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.pill.live { background: var(--good-soft); color: var(--good); }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; letter-spacing: .01em; }
.badge.prime { background: var(--prime-soft); color: var(--prime); }
.badge.plus { background: var(--plus-soft); color: var(--plus); }
.badge.standard { background: var(--standard-soft); color: var(--standard); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); }

/* ——— Hero (home) ——— */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 34px 0 20px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 780; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--signal); }
.radar { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin-left: auto; }
.radar svg { width: 100%; height: 100%; }
.radar .ring { fill: none; stroke: var(--line-2); stroke-width: 1; }
.radar .axis { stroke: var(--line); stroke-width: 1; }
.radar .disc { fill: var(--surface); }
.radar .sweep { transform-origin: 200px 200px; animation: sweep 6s linear infinite; }
.radar .blip { fill: var(--series); }
.radar .blip-ring { fill: none; stroke: var(--series); stroke-width: 1.5; opacity: .5; transform-box: fill-box; transform-origin: center; animation: ping 3s ease-out infinite; }
.radar text { fill: var(--ink-2); font: 600 11px var(--sans); }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .radar .sweep, .radar .blip-ring, .pill.live::before { animation: none; } html { scroll-behavior: auto; } }

/* ——— Status band ——— */
.status { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 26px 0 0; padding: 18px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.status strong { font-size: 16px; }
.status .when { color: var(--muted); font-size: 14.5px; }

/* ——— Stat tiles ——— */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.stat-label { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.stat-value { font-size: 28px; font-weight: 720; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.stat-note { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }

/* ——— Cards ——— */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; color: var(--ink); text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--line-2); text-decoration: none; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.card .card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .card-foot { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; color: var(--muted); }
.card .card-foot b { color: var(--ink); font-size: 18px; font-weight: 720; }
.card .arrow { color: var(--signal); font-weight: 700; transition: transform .18s; }
a.card:hover .arrow { transform: translateX(3px); }
.icon-tile { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--signal-soft); color: var(--signal); }
.icon-tile svg { width: 22px; height: 22px; }

/* ——— Steps ——— */
.steps { counter-reset: step; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font: 700 13px var(--mono); color: var(--signal); margin-bottom: 10px; }
.steps h3 { margin-bottom: 6px; } .steps p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ——— Calculator ——— */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.calc { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field > span, .field legend { font-weight: 650; font-size: 14.5px; }
.field small, .hint { color: var(--muted); font-size: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input[type="number"] { font: 600 17px var(--sans); font-variant-numeric: tabular-nums; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
select { font: 600 16px var(--sans); padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); color: var(--ink); width: 100%; }
input[type="number"]:focus, select:focus { outline: none; border-color: var(--series); box-shadow: 0 0 0 4px color-mix(in srgb, var(--series) 18%, transparent); }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 12px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; text-align: center; padding: 9px 4px; border-radius: 9px; font-weight: 650; font-size: 14.5px; color: var(--ink-2); }
.segmented input:checked + span { background: var(--surface); color: var(--signal); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--series); }
.segmented input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--series) 55%, transparent); }
fieldset.field { border: 0; padding: 0; margin: 0; }
details.more { border-top: 1px solid var(--line); padding-top: 16px; }
details.more summary { cursor: pointer; font-weight: 650; font-size: 14.5px; color: var(--signal); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+ "; } details.more[open] summary::before { content: "– "; }
.mix { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.mix label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.result { position: sticky; top: 88px; }
.result .big { font-size: clamp(56px, 7vw, 80px); font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 6px 0 4px; }
.result .odds { font-size: 17px; font-weight: 600; color: var(--ink-2); margin: 0 0 18px; }
.meter { height: 12px; border-radius: 999px; background: var(--signal-soft); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--series); transition: width .35s cubic-bezier(.2, .8, .2, 1); }
.compare { margin: 22px 0 0; display: grid; gap: 10px; }
.compare h3 { font-size: 13.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.cmp-row { display: grid; grid-template-columns: 112px 1fr 48px; gap: 10px; align-items: center; font-size: 14px; }
.cmp-row .track { height: 10px; border-radius: 0 4px 4px 0; background: var(--bg-2); }
.cmp-row .track i { display: block; height: 100%; max-width: 100%; border-radius: 0 4px 4px 0; background: var(--series); }
.cmp-row.you span:first-child { font-weight: 700; }
.cmp-row b { text-align: right; font-weight: 700; }
.result .note { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.error { color: var(--error); background: var(--error-soft); border-radius: 12px; padding: 12px 14px; font-weight: 600; }

/* ——— Rate bars (single series: first-timer applicants per flat) ——— */
.rate-chart { display: grid; gap: 12px; margin: 0; }
.rate-chart .caption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.rate-chart .key { display: inline-flex; align-items: center; gap: 6px; }
.rate-chart .key i { width: 2px; height: 12px; background: var(--mark); display: inline-block; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 200px) 1fr; gap: 14px; align-items: center; }
.bar-row .label { font-size: 14px; font-weight: 600; line-height: 1.3; }
.bar-row .label small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.bar-row .plot { position: relative; height: 22px; display: flex; align-items: center; }
.bar-row .fill { height: 18px; min-width: 3px; background: var(--series); border-radius: 0 4px 4px 0; }
.bar-row .value { padding-left: 8px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.bar-row .ref { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--mark); }
.bar-row:hover .fill, .bar-row:focus-within .fill { filter: brightness(1.08); }
.bar-row[title] { cursor: default; }

/* ——— Tables ——— */
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; background: var(--surface-2); }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; }
tbody tr:hover td { background: var(--surface-2); }

/* ——— Prose ——— */
.prose { max-width: 720px; }
.prose h2 { margin: 2.2em 0 .6em; padding-top: 4px; }
.prose h3 { margin: 1.6em 0 .5em; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin: 6px 0; } .prose li::marker { color: var(--series); }
.prose code { font: 14px var(--mono); background: var(--bg-2); padding: 2px 6px; border-radius: 6px; }
.prose .table { margin: 1.2em 0; }
.callout { border-left: 3px solid var(--series); background: var(--signal-soft); padding: 14px 18px; border-radius: 0 12px 12px 0; color: var(--ink); margin: 0 0 1.5em; }
.callout p { margin: 0; color: var(--ink); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.toc { position: sticky; top: 92px; font-size: 14px; border-left: 1px solid var(--line); padding-left: 18px; }
.toc p { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 4px 0; } .toc a:hover { color: var(--signal); }

/* ——— FAQ ——— */
.faq { margin-top: 56px; max-width: 760px; }
.faq h2 { margin-bottom: 14px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--signal); font-weight: 700; font-size: 20px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

/* ——— Notices ——— */
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--amber-soft); color: var(--amber-ink); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14.5px; }
.notice.info { background: var(--signal-soft); color: var(--ink); }
.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }

/* ——— Footer ——— */
footer.site { background: var(--navy); color: #b9c8d8; padding: 56px 0 28px; position: relative; overflow: hidden; }
footer.site::before { content: ""; position: absolute; right: -180px; top: -180px; width: 520px; height: 520px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 58px, rgba(255, 255, 255, .06) 58px 59px); pointer-events: none; }
footer .brand { color: #fff; } footer .logo { color: #6fe0d3; }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; position: relative; }
.foot p { font-size: 14.5px; max-width: 360px; margin-top: 14px; }
.foot ul { list-style: none; padding: 0; margin: 0; } .foot li { margin: 7px 0; font-size: 14.5px; }
.foot a { color: #dce6f0; text-decoration: none; } .foot a:hover { color: #fff; text-decoration: underline; }
.foot-h { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: #8ea3b8; font-weight: 700; margin: 0 0 6px !important; }
.fine { font-size: 13px; color: #8ea3b8; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 36px; padding-top: 20px; position: relative; }
.fine a { color: #dce6f0; }

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .hero, .calc-layout, .two-col { grid-template-columns: 1fr; }
  .radar { max-width: 340px; margin: 0 auto; }
  .result { position: static; }
  .toc { display: none; }
  .foot { grid-template-columns: 1fr 1fr; } .foot > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .bar { min-height: 58px; }
  header nav a.opt { display: none; }
  header nav { flex-wrap: nowrap; }
  .brand { white-space: nowrap; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; } .stat-value { font-size: 24px; }
  header nav a { padding: 7px 11px; font-size: 14px; }
  .brand { font-size: 16px; }
  .radar { max-width: 260px; }
  .hero { gap: 24px; padding-top: 18px; }
  .calc-layout .result { order: -1; }
  .result .big { font-size: 56px; }
  .field-row, .mix { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .panel { padding: 20px; }
  th, td { padding: 10px 12px; }
}
