/* FightTech calculator landing pages. Base copied from web/assets/app.css; brand tokens are injected per site by landing-src/build.mjs. */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --line: #e2e6ee;
  --line-2: #cdd3de;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #5b6678;
  --brand: #4338CA;
  --brand-hover: #3730A3;
  --on-brand: #ffffff;
  --brand-tint: #ECEBFB;
  --on-tint: #312E81;
  --gold: #ffd166;
  --on-gold: #2b1f00;
  --hl: #ffd166;
  --c-principal: #1E1B4B;
  --c-interest: #e4572e;
  --interest-tint: #fce9e2;
  --interest-text: #b93a1f;
  --danger: #b3261e;
  --danger-tint: #fdecea;
  --ok: #15803d;
  --ok-tint: #e3f4ea;
  --panel: #15123a;
  --panel-line: transparent;
  --cta-glow: rgba(67,56,202,.55);
  --upsell-grad: linear-gradient(155deg, #1e1b4b 0%, #3730a3 55%, #4338CA 100%);
  --dot: rgba(15,23,42,.10);
  --focus: #4338CA;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 1px rgba(15,23,42,.04);
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 12px 32px -12px rgba(15,23,42,.16);
  --shadow-lg: 0 2px 4px rgba(15,23,42,.04), 0 32px 64px -24px rgba(15,23,42,.22);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6678' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --radius: 14px;
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17;
    --bg-alt: #0f1420;
    --surface: #121826;
    --surface-2: #182032;
    --line: #232c3f;
    --line-2: #354057;
    --ink: #e8edf6;
    --ink-2: #b4bfd0;
    --ink-3: #97a3b6;
    --brand: #9A94F0;
    --brand-hover: #BDB8F6;
    --on-brand: #16133A;
    --brand-tint: #25234A;
    --on-tint: #D4D2FA;
    --hl: rgba(255,209,102,.22);
    --c-principal: #E3E1FC;
    --c-interest: #db5733;
    --interest-tint: #3a1d14;
    --interest-text: #ff9c7e;
    --danger: #ff8a80;
    --danger-tint: #3a1614;
    --ok: #6ee7a0;
    --ok-tint: #12301f;
    --panel-line: color-mix(in srgb, var(--brand) 30%, transparent);
    --dot: rgba(236,243,239,.08);
    --focus: #ffd166;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 32px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 32px 64px -24px rgba(0,0,0,.7);
    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a3b6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--bg); }
.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 640px) { .container { padding-inline: 24px; } }

.eyebrow {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand);
}
.muted { color: var(--ink-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 999px; padding: 10px 18px;
  font-weight: 800; font-size: 0.95rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 0.875rem; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }

.play-badge { display: inline-block; border-radius: 10px; line-height: 0; }
.play-badge img { height: 70px; width: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .site-header { background: var(--bg); } }
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand .logo { width: 32px; height: 32px; flex: none; }
.nav { display: none; gap: 4px; margin-inline-start: 12px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 0.925rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
/* Wide enough for the nav next to a long translated app name, the language name and the button. */
@media (min-width: 1100px) { .nav { display: flex; } }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
/* Language picker: a pill showing the current language over a transparent native <select>. */
.lang {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding-inline: 11px 9px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink-2);
  font-size: 0.85rem; font-weight: 800; white-space: nowrap; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.lang:hover { border-color: var(--line-2); background: var(--surface); }
.lang:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.lang > .i { font-size: 1rem; }
.lang .lang-chev { font-size: 0.9rem; stroke-width: 2.5; color: var(--ink-3); }
.lang-cur { color: var(--ink); }
.lang-name { display: none; }
/* The header also carries the Get-the-app button, so the full name waits for more room than on the web app. */
@media (min-width: 720px) { .lang-name { display: inline; } .lang-short { display: none; } }
.lang select {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; border: 0; font-size: 16px;
}
.header-cta { display: none; }
@media (min-width: 600px) { .header-cta { display: inline-flex; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 80px; text-align: center; isolation: isolate; }
@media (min-width: 760px) { .hero { padding: 96px 0 112px; } }
.hero-dots {
  position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 25%, transparent 78%);
}
.hero-glow {
  position: absolute; z-index: -1; left: 50%; top: -10%; width: min(900px, 120vw); aspect-ratio: 1.8;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 16%, transparent), transparent);
  filter: blur(8px);
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  box-shadow: var(--shadow-sm); font-size: 0.85rem; font-weight: 700; color: var(--ink-2);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.hero h1 {
  margin-top: 22px; max-width: 17ch;
  font-size: clamp(2.3rem, 1.25rem + 4.6vw, 4.4rem); line-height: 1.04; letter-spacing: -0.04em;
}
.hl {
  background-image: linear-gradient(transparent 60%, var(--hl) 60%, var(--hl) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 0.06em;
}
.lede { margin-top: 22px; max-width: 60ch; color: var(--ink-2); font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.2rem); }
.hero-ctas { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; }
.btn-round {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 20px 8px 8px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 800; text-decoration: none;
  min-height: 56px;
}
.btn-round:hover { color: var(--ink); border-color: var(--ink-3); }
.round-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 1.1rem; }
.trust { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--ink-2); font-size: 0.9rem; font-weight: 700; }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .i { color: var(--brand); stroke-width: 3; }

.tiles { display: none; }
@media (min-width: 1100px) {
  .tiles { display: block; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
  .tile {
    position: absolute; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
    color: var(--brand); font-size: 1.6rem; font-weight: 800;
  }
  .tile .i { width: 28px; height: 28px; }
  .tile.soft { opacity: 0.7; filter: blur(1px); transform: scale(0.85); }
  .tile.softer { opacity: 0.45; filter: blur(2px); transform: scale(0.72); }
  .t1 { left: 7%; top: 20%; }
  .t2 { left: 15%; top: 50%; }
  .t3 { right: 8%; top: 18%; }
  .t4 { right: 14%; top: 56%; color: var(--c-interest); }
  .t5 { left: 5%; top: 76%; }
  .t6 { right: 4%; top: 40%; }
  .t7 { left: 11%; top: 6%; color: #b88a1a; }
  .t8 { right: 7%; top: 82%; }
  @media (prefers-reduced-motion: no-preference) {
    .t1, .t4, .t7 { animation: bob 7s ease-in-out infinite; }
    .t3, .t2 { animation: bob 8s ease-in-out -3s infinite; }
  }
}
@keyframes bob { 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-inner > .rise:nth-child(2) { animation-delay: .05s; }
  .hero-inner > .rise:nth-child(3) { animation-delay: .1s; }
  .hero-inner > .rise:nth-child(4) { animation-delay: .15s; }
  .hero-inner > .rise:nth-child(5) { animation-delay: .2s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Calculator window ---------- */
.calc-section { background: var(--bg-alt); padding: 56px 0 64px; border-block: 1px solid var(--line); }
@media (min-width: 760px) { .calc-section { padding: 80px 0 88px; } }
.window { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dots { display: inline-flex; gap: 6px; flex: none; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.window-title { flex: 1; min-width: 0; font: 600 0.8rem/1.2 var(--mono); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; unicode-bidi: plaintext; }
.chip-private { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 4px 10px; border-radius: 999px; background: var(--brand-tint); color: var(--on-tint); font-size: 0.75rem; font-weight: 800; }

.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .calc-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.calc-form { padding: 24px 20px; }
@media (min-width: 640px) { .calc-form { padding: 32px; } }
.calc-title { font-size: 1.35rem; margin-bottom: 20px; }

.field { margin: 0 0 18px; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; margin-bottom: 8px; padding: 0; font-weight: 800; font-size: 0.9rem; }
.opt { font-weight: 600; color: var(--ink-3); }
.input-group {
  display: flex; align-items: stretch; min-height: 50px;
  border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input-group:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.input-group input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 14px;
  font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.input-group input:focus, .group-select:focus { outline: none; }
.input-group input::placeholder { color: var(--ink-3); font-weight: 600; }
.adorn { display: flex; align-items: center; padding-inline-start: 14px; color: var(--ink-3); font-weight: 800; white-space: nowrap; unicode-bidi: plaintext; }
.adorn + input { padding-inline-start: 8px; }
.adorn-end { padding: 0; padding-inline-end: 14px; font-weight: 700; font-size: 0.9rem; }
.group-select, .select {
  -webkit-appearance: none; appearance: none; background: var(--chev) no-repeat right 10px center / 16px;
  font-weight: 800; font-size: 0.9rem; cursor: pointer;
}
.group-select {
  border: 0; border-inline-start: 1px solid var(--line); border-radius: 0; border-start-end-radius: var(--radius); border-end-end-radius: var(--radius);
  padding: 0; padding-inline: 12px 32px;
}
.group-select:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); }
.select, .input {
  width: 100%; min-height: 50px; border: 1.5px solid var(--line-2); border-radius: var(--radius); background-color: var(--surface);
  padding: 10px 14px; font-weight: 800;
}
.select { padding-inline-end: 36px; }
[dir="rtl"] .group-select, [dir="rtl"] .select { background-position: left 10px center; }
.select:focus, .input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.input { font-variant-numeric: tabular-nums; }
.field.invalid .input-group, .field.invalid .input { border-color: var(--danger); }
.err { margin-top: 6px; color: var(--danger); font-size: 0.85rem; font-weight: 700; }
.term-row { display: flex; gap: 10px; align-items: stretch; }
.grow { flex: 1; min-width: 0; }
.date-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.seg label { position: relative; display: flex; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; padding: 6px 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 800; color: var(--ink-3); transition: background-color .15s ease, color .15s ease; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-body {
  flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 12px 40px; position: relative;
  border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--surface); transition: border-color .15s ease, background-color .15s ease;
}
.choice-body::before {
  content: ""; position: absolute; inset-inline-start: 14px; top: 15px; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line-2); background: var(--surface);
}
.choice-body strong { font-size: 0.95rem; line-height: 1.3; }
.choice-body small { color: var(--ink-2); font-size: 0.8rem; font-weight: 600; line-height: 1.35; }
.choice input:checked + .choice-body { border-color: var(--brand); background: var(--brand-tint); }
.choice input:checked + .choice-body::before { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px var(--surface); }
.choice input:checked + .choice-body small { color: var(--on-tint); }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--focus); outline-offset: 2px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.form-actions .btn-primary { flex: 1 1 160px; }

/* ---------- Results ---------- */
.results { padding: 24px 20px 28px; background: var(--surface-2); border-top: 1px solid var(--line); min-width: 0; }
@media (min-width: 640px) { .results { padding: 32px; } }
@media (min-width: 960px) { .results { border-top: 0; border-inline-start: 1px solid var(--line); } }
.res-content { display: flex; flex-direction: column; gap: 22px; }
.res-invalid { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--danger-tint); color: var(--danger); font-weight: 700; }
.res-invalid .i { margin-top: 4px; }
.res-big {
  margin-top: 6px; font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.res-sub { margin-top: 8px; color: var(--ink-2); font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.res-extra {
  display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px;
  background: var(--brand-tint); color: var(--on-tint); font-size: 0.85rem; font-weight: 800; overflow-wrap: anywhere;
}
.res-split { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.donut { position: relative; width: 156px; height: 156px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 15; }
.donut-track { stroke: var(--line); }
.donut-principal { stroke: var(--c-principal); }
.donut-interest { stroke: var(--c-interest); }
@media (prefers-reduced-motion: no-preference) { .donut circle { transition: stroke-dasharray .5s ease, stroke-dashoffset .5s ease; } }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.1; }
.donut-center strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.donut-center span { font-size: 0.75rem; font-weight: 700; color: var(--ink-3); max-width: 90px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; flex: 1 1 180px; min-width: 0; }
.legend li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; }
.legend-label { color: var(--ink-2); font-weight: 700; font-size: 0.9rem; }
.legend strong { grid-column: 2; min-width: 0; font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw { width: 12px; height: 12px; border-radius: 4px; }
.sw-principal { background: var(--c-principal); }
.sw-interest { background: var(--c-interest); }
.stats { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.stats dt { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.stats dd { margin: 2px 0 0; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Numbers stay on one line; app.js shrinks them to fit and only wraps as a last resort. */
.res-big.fit-wrap, .stats dd.fit-wrap, .legend strong.fit-wrap { white-space: normal; overflow-wrap: anywhere; }
.stats dd.is-interest { color: var(--interest-text); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--brand-tint); color: var(--on-tint); font-size: 0.925rem; font-weight: 600; }
.callout .i { margin-top: 3px; font-size: 1.1rem; stroke-width: 2.5; }
.callout strong { font-weight: 800; }

/* ---------- Upsell ---------- */
.upsell {
  position: relative; overflow: hidden; margin: 0 12px 12px; padding: 28px 22px; border-radius: 20px;
  background: var(--upsell-grad); color: #ffffff;
  display: grid; gap: 22px;
}
@media (min-width: 640px) { .upsell { margin: 0 16px 16px; padding: 32px; } }
@media (min-width: 880px) { .upsell { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 32px; } }
.upsell-mark { position: absolute; inset-inline-end: -40px; bottom: -50px; width: 220px; height: 220px; color: #ffd166; opacity: 0.1; pointer-events: none; }
.eyebrow-gold { color: #ffd166; }
.upsell h3 { margin-top: 8px; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); color: #ffffff; }
.upsell-main p:not(.eyebrow) { margin-top: 8px; color: rgba(255, 255, 255, 0.86); }
.upsell .play-badge { margin-top: 16px; margin-inline-start: -8px; }
.upsell .play-badge img { height: 62px; }
.upsell .play-badge:focus-visible { outline-color: #ffd166; }
.upsell-list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px 20px; }
@media (min-width: 560px) { .upsell-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.upsell-list li { position: relative; padding-inline-start: 28px; font-size: 0.925rem; font-weight: 600; line-height: 1.4; color: #ffffff; }
.upsell-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: #ffd166; }
.upsell-list li::after { content: ""; position: absolute; inset-inline-start: 6.5px; top: 4.5px; width: 5px; height: 9px; border: solid #2b1f00; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------- Schedule ---------- */
.schedule { padding: 24px 20px 28px; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .schedule { padding: 32px; } }
.schedule-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.schedule-head h3 { font-size: 1.35rem; }
.schedule-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.table-wrap { max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overscroll-behavior: contain; }
.table-wrap:focus-visible { outline-offset: 2px; }
table { width: 100%; min-width: 580px; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
th, td { padding: 10px 14px; text-align: end; white-space: nowrap; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: start; }
thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td:first-child { font-weight: 800; }
td .when { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink-3); }
td.td-interest { color: var(--interest-text); }
td.td-balance { font-weight: 800; }
.fine { margin-top: 12px; color: var(--ink-3); font-size: 0.82rem; font-weight: 600; }
.calc-note { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; color: var(--ink-2); font-size: 0.875rem; font-weight: 600; text-align: center; }
.calc-note .i { color: var(--brand); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
@media (min-width: 760px) { .section { padding: 104px 0; } }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { margin-top: 10px; font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.1rem); }
.section-sub { margin-top: 16px; color: var(--ink-2); font-size: 1.05rem; }

.facts {
  margin: 0 0 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden;
}
@media (min-width: 720px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts > div { display: flex; flex-direction: column-reverse; align-items: center; padding: 20px 12px; text-align: center; border-color: var(--line); border-style: solid; border-width: 0; }
.facts > div:nth-child(odd) { border-inline-end-width: 1px; }
.facts > div:nth-child(-n+2) { border-bottom-width: 1px; }
@media (min-width: 720px) {
  .facts > div { border-width: 0 !important; border-inline-end-width: 1px !important; }
  .facts > div:last-child { border-inline-end-width: 0 !important; }
}
.facts dd { margin: 0; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.04em; color: var(--brand); line-height: 1.1; }
.facts dt { font-size: 0.85rem; font-weight: 700; color: var(--ink-2); }

.bento { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 720px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card-wide { grid-column: span 2; } }
@media (min-width: 1024px) { .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 720px) and (max-width: 1023.98px) { .card-globe { grid-column: auto; } }
.card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.card-num { position: absolute; top: 14px; inset-inline-end: 22px; font-size: 3.2rem; font-weight: 800; letter-spacing: -0.05em; color: var(--line); line-height: 1; }
.card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand-tint); color: var(--on-tint); font-size: 1.35rem; }
.card h3 { margin-top: 18px; font-size: 1.2rem; letter-spacing: -0.02em; }
.card p { margin-top: 8px; color: var(--ink-2); font-size: 0.95rem; }
.chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 4px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.chips-mono li { font-family: var(--mono); font-size: 0.78rem; }
.mini-chart { margin-top: 18px; padding: 14px 14px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.mini-chart svg { width: 100%; height: 110px; overflow: visible; }
.mc-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; fill: none; }
.mc-base { stroke: var(--ink-3); stroke-width: 2.5; stroke-dasharray: 6 5; fill: none; vector-effect: non-scaling-stroke; }
.mc-extra { stroke: var(--brand); stroke-width: 3.5; fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mc-dot { fill: var(--gold); stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.mc-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.mc-legend i { display: inline-block; width: 16px; height: 0; border-top: 3px solid var(--brand); }
.mc-legend i.k-base { border-top: 2.5px dashed var(--ink-3); }

/* ---------- Gallery ---------- */
.gallery {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 8px max(16px, calc((100% - 1112px) / 2)) 24px;
  scroll-padding-inline: max(16px, calc((100% - 1112px) / 2));
  scrollbar-width: thin;
}
.gallery img {
  flex: none; width: 200px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow); scroll-snap-align: start;
}
@media (min-width: 640px) { .gallery img { width: 240px; } }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; transition: border-color .2s ease; }
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; border-radius: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.plus { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--ink); transition: transform .2s ease; }
.plus::after { transform: rotate(90deg); }
details[open] .plus::after { transform: rotate(0deg); }
.faq details p { padding: 0 20px 20px; color: var(--ink-2); }

/* ---------- Final CTA ---------- */
.section-cta { padding-top: 0; }
.cta-panel {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  background: var(--panel); color: #ffffff; border: 1px solid var(--panel-line); border-radius: 32px;
  padding: 56px 20px; display: flex; flex-direction: column; align-items: center;
}
@media (min-width: 760px) { .cta-panel { padding: 80px 40px; } }
.cta-dots {
  position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1.2px, transparent 1.6px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 20%, transparent 80%);
}
.cta-panel::after {
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: -60%; width: 90%; aspect-ratio: 2; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--cta-glow), transparent);
}
.cta-logo { width: 64px; height: 64px; }
.cta-panel h2 { margin-top: 22px; max-width: 18ch; font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); color: #ffffff; }
.gold { color: #ffd166; }
.cta-panel p { margin-top: 16px; max-width: 56ch; color: rgba(255, 255, 255, 0.82); font-size: 1.05rem; }
.cta-panel .play-badge { margin-top: 28px; }
.cta-panel .play-badge:focus-visible { outline-color: #ffd166; }
.trust-dark { margin-top: 20px; color: rgba(255, 255, 255, 0.82); }
.trust-dark .i { color: #ffd166; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: 0.925rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } .footer-brand { grid-column: auto; } }
.footer-brand p { margin-top: 12px; max-width: 36ch; color: var(--ink-2); }
.footer-h { margin-bottom: 10px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.footer-col a { display: block; padding: 5px 0; color: var(--ink-2); text-decoration: none; font-weight: 700; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 6px; color: var(--ink-3); font-size: 0.82rem; font-weight: 600; }

/* ---------- Android smart banner ---------- */
.smart-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 8px;
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.25);
}
@media (prefers-reduced-motion: no-preference) { .smart-banner { animation: slide-up .35s ease both; } }
@keyframes slide-up { from { transform: translateY(100%); } }
.sb-close { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); font-size: 1.1rem; }
.sb-close:hover { background: var(--surface-2); color: var(--ink); }
.sb-icon { width: 44px; height: 44px; flex: none; }
.sb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sb-text strong { font-size: 0.95rem; font-weight: 800; }
.sb-text span { font-size: 0.8rem; color: var(--ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.has-banner { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Legal pages ---------- */
.legal { padding: 48px 0 72px; }
.legal .container { max-width: 800px; }
.legal h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.8rem); letter-spacing: -0.035em; }
.legal .meta { margin-top: 14px; color: var(--ink-2); font-size: 0.95rem; }
.legal h2 { margin-top: 36px; font-size: 1.3rem; letter-spacing: -0.02em; }
.legal p, .legal li { color: var(--ink-2); }
.legal p { margin-top: 12px; }
.legal ul { margin: 12px 0 0; padding-inline-start: 22px; }
.legal li { margin-top: 8px; }
.legal strong { color: var(--ink); }
.legal code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; font-weight: 800; text-decoration: none; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 72px 0; }
.notfound .big { font-size: clamp(4rem, 3rem + 6vw, 8rem); font-weight: 800; letter-spacing: -0.06em; color: var(--brand); line-height: 1; }
.notfound h1 { margin-top: 12px; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.notfound p { margin-top: 12px; color: var(--ink-2); }
.notfound .btn { margin-top: 24px; }

@media print {
  .site-header, .smart-banner, .upsell, .hero, #features, #screens, #faq, .section-cta, .site-footer, .form-actions { display: none !important; }
  .table-wrap { max-height: none; overflow: visible; }
}
.footer-bottom.flat { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- Scripts without Latin letter-case ---------- */
:lang(ar) *, :lang(hi) *, :lang(th) *, :lang(ja) *, :lang(ko) *, :lang(zh-CN) *, :lang(zh-TW) * { letter-spacing: normal !important; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(hi) h1, :lang(hi) h2, :lang(hi) h3, :lang(th) h1, :lang(th) h2, :lang(th) h3 { line-height: 1.35; }
:lang(ar) .eyebrow, :lang(hi) .eyebrow, :lang(th) .eyebrow { text-transform: none; }

/* ---------- Landing extras (shared by the five calculator sites) ---------- */
.calc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-bottom: 20px; }
.calc-head .calc-title { margin: 0; }
.select-sm {
  width: auto; min-height: 40px; padding: 6px 14px; padding-inline-end: 34px; border: 1.5px solid var(--line-2); border-radius: 999px;
  background-color: var(--surface); font-size: 0.875rem;
}
.select-sm:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 12px; }
@media (min-width: 400px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid2 .field > label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 8px; }
.field-top > label, .field-top > span.lbl { font-weight: 800; font-size: 0.9rem; }
.seg-sm { padding: 3px; }
.seg-sm span { padding: 4px 11px; font-size: 0.8rem; }
.seg-wide { display: flex; width: 100%; }
.seg-wide label { flex: 1; }
.seg-wide span { flex: 1; justify-content: center; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: -6px 0 18px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.fieldset-plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.subhead { margin: 6px 0 12px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* Split hero: copy on the left, a visual on the right from 960px. */
.hero-split .hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-split .hero-copy { display: flex; flex-direction: column; align-items: center; }
@media (min-width: 960px) {
  .hero-split { text-align: start; }
  .hero-split .hero-grid { grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); gap: 56px; }
  .hero-split .hero-copy { align-items: flex-start; }
  .hero-split .hero-ctas, .hero-split .trust { justify-content: flex-start; }
  .hero-split h1 { max-width: 14ch; }
  .hero-split .hero-glow { left: 30%; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > .rise:nth-child(2) { animation-delay: .05s; }
  .hero-copy > .rise:nth-child(3) { animation-delay: .1s; }
  .hero-copy > .rise:nth-child(4) { animation-delay: .15s; }
  .hero-copy > .rise:nth-child(5) { animation-delay: .2s; }
  .hero-visual.rise { animation-delay: .15s; }
}
.hero-visual { width: 100%; max-width: 520px; margin: 0 auto; text-align: start; }

/* Mortgage: the four letters of PITI plus HOA and PMI. */
.piti { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.piti li {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 0.875rem; font-weight: 700; color: var(--ink-2);
}
.piti b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 800; color: #ffffff; }
.piti .k-pi { background: var(--c-principal); color: var(--bg); }
.piti .k-tax { background: var(--brand); color: var(--on-brand); }
.piti .k-ins { background: var(--c-ins); color: #2b1f00; }
.piti .k-pmi { background: var(--c-interest); }

/* Mortgage: stacked bar of the monthly payment. */
.stack { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--line); }
.stack i { display: block; height: 100%; min-width: 0; }
@media (prefers-reduced-motion: no-preference) { .stack i { transition: width .4s ease; } }
.k-pi { background: var(--c-principal); }
.k-tax { background: var(--brand); }
.k-ins { background: var(--c-ins); }
.k-hoa { background: var(--c-hoa); }
.k-pmi { background: var(--c-interest); }
.legend.cols { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 16px; }

/* Car loan: deal sheet card in the hero and the ledger in the results. */
.deal { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 22px 22px 18px; }
.deal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 800; }
.deal-h .chip-private { font-size: 0.72rem; }
.deal ol { list-style: none; margin: 14px 0 0; padding: 0; }
.deal li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-weight: 700; color: var(--ink-2); font-size: 0.95rem; }
.deal .op { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font-weight: 800; }
.deal li.sum { margin-top: 10px; padding: 12px; border: 0; border-radius: 14px; background: var(--brand-tint); color: var(--on-tint); font-weight: 800; }
.deal li.sum .op { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.deal li.otd { color: var(--ink); font-weight: 800; }
.deal-foot { margin-top: 12px; font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }

.ledger { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.ledger li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 0.9rem; font-weight: 600; color: var(--ink-2); }
.ledger li:last-child { border-bottom: 0; }
.ledger li strong { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger li.total { background: var(--brand-tint); color: var(--on-tint); font-weight: 800; }
.ledger li.total strong { color: var(--on-tint); }

.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rule { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.rule-mark { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--ink-3); }
.rule-mark .i { width: 15px; height: 15px; stroke-width: 3; }
.rule-mark .i-ok, .rule-mark .i-bad { display: none; }
.rule.ok .rule-mark { background: var(--ok-tint); color: var(--ok); }
.rule.ok .i-ok, .rule.bad .i-bad { display: block; }
.rule.ok .i-na, .rule.bad .i-na { display: none; }
.rule.bad .rule-mark { background: var(--danger-tint); color: var(--danger); }
.rule-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.rule-text strong { font-size: 0.9rem; font-weight: 800; }
.rule-text small { font-size: 0.8rem; font-weight: 600; color: var(--ink-3); }
.rule-state { font-size: 0.8rem; font-weight: 800; color: var(--ink-3); white-space: nowrap; }
.rule.ok .rule-state { color: var(--ok); }
.rule.bad .rule-state { color: var(--danger); }
.callout.warn { background: var(--interest-tint); color: var(--interest-text); }
.callout.danger { background: var(--danger-tint); color: var(--danger); }
.res-block h3 { margin-bottom: 10px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* Business loan: mode switch and the factor-to-APR flow. */
.flow { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 10px; }
.flow-step {
  display: flex; flex-direction: column; gap: 2px; min-width: 170px; padding: 12px 16px; text-align: start;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.flow-step small { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.flow-step strong { font-size: 1rem; font-weight: 800; }
.flow-step.is-end { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.flow-step.is-end small { color: var(--on-brand); opacity: 0.8; }
.flow-arrow { display: grid; place-items: center; color: var(--brand); font-size: 1.3rem; }
@media (max-width: 599.98px) { .flow { flex-direction: column; align-items: center; } .flow-step { width: min(100%, 300px); } .flow-arrow { transform: rotate(90deg); } }
@media (min-width: 600px) { [dir="rtl"] .flow-arrow { transform: scaleX(-1); } }
.res-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 560px) { .res-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.res-flow > div { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.res-flow dt { font-size: 0.78rem; font-weight: 700; color: var(--ink-2); }
.res-flow dd { margin: 2px 0 0; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.res-flow > div.is-end { background: var(--brand-tint); border-color: transparent; }
.res-flow > div.is-end dd { color: var(--on-tint); }

/* Debt payoff: strategy cards, debt rows, payoff order and the comparison. */
.strategies { display: grid; gap: 14px; }
.strategy { position: relative; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.strategy .tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; background: var(--brand-tint); color: var(--on-tint); }
.strategy h3 { margin-top: 10px; font-size: 1.15rem; letter-spacing: -0.02em; }
.strategy p { margin-top: 6px; color: var(--ink-2); font-size: 0.925rem; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 14px; }
.bars i { flex: 1; border-radius: 6px 6px 2px 2px; background: var(--line-2); }
.bars i.hit { background: var(--brand); }
.bars-cap { display: flex; gap: 6px; margin-top: 6px; }
.bars-cap span { flex: 1; text-align: center; font-size: 0.72rem; font-weight: 800; color: var(--ink-3); }
.bars-cap span.hit { color: var(--brand); }
@media (min-width: 520px) and (max-width: 959.98px) { .strategies { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (min-width: 960px) { .calc-grid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.debts { display: grid; gap: 12px; margin-bottom: 18px; }
.debt-row { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); min-width: 0; }
.debt-row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.debt-num { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 0.8rem; font-weight: 800; }
.debt-name {
  flex: 1; min-width: 0; padding: 4px 2px; border: 0; border-bottom: 1.5px dashed var(--line-2); border-radius: 0;
  background: transparent; font-weight: 800; font-size: 0.95rem;
}
.debt-name:focus { outline: none; border-bottom-color: var(--brand); }
.debt-cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.debt-cells .field { margin: 0; min-width: 0; }
.debt-cells .field:first-child { grid-column: 1 / -1; }
@media (min-width: 480px) { .debt-cells { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr); } .debt-cells .field:first-child { grid-column: auto; } }
.debt-cells .field > label { margin-bottom: 4px; font-size: 0.78rem; }
.debt-cells .input-group { min-height: 44px; }
.debt-cells .input-group input { padding: 8px 10px; font-size: 0.95rem; }
.debt-cells .adorn { padding-inline-start: 10px; }
.debt-cells .adorn + input { padding-inline-start: 4px; }
.debt-cells .adorn-end { padding-inline-end: 10px; }
.debt-cells .err { font-size: 0.78rem; }
.order { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ord; }
.order li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; min-width: 0; }
.order li::before {
  counter-increment: ord; content: counter(ord); display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  border-radius: 50%; background: var(--brand-tint); color: var(--on-tint); font-size: 0.8rem; font-weight: 800;
}
.order .o-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order .o-when { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cmp { position: relative; min-width: 0; padding: 14px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface); }
.cmp.is-best { border-color: var(--brand); }
.cmp h4 { margin: 0; font-size: 0.85rem; font-weight: 800; color: var(--ink-2); }
.cmp-v { display: block; margin-top: 4px; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp-s { display: block; font-size: 0.8rem; font-weight: 700; color: var(--ink-3); }
.best { position: absolute; top: -10px; inset-inline-end: 10px; padding: 2px 8px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 0.7rem; font-weight: 800; }

/* EMI: loan-type chips and sliders; the calculator sits in the hero. */
.chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.chipset label { position: relative; display: flex; }
.chipset input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chipset span { padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 0.85rem; font-weight: 800; color: var(--ink-2); transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.chipset input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chipset input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.range { display: block; width: 100%; height: 26px; margin: 8px 0 0; accent-color: var(--brand); cursor: pointer; }
.range-scale { display: flex; justify-content: space-between; gap: 8px; font-size: 0.75rem; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.hero-calc { padding-top: 48px; }
@media (min-width: 760px) { .hero-calc { padding: 72px 0 88px; } }
@media (min-width: 960px) { .hero-calc .hero-grid { grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); align-items: start; } .hero-calc .hero-copy { padding-top: 32px; } }
.hero-calc .window { text-align: start; }
.hero-calc .calc-grid { grid-template-columns: minmax(0, 1fr); }
.hero-calc .results { border-inline-start: 0; border-top: 1px solid var(--line); }
.hero-calc .calc-form { padding: 22px 20px; }
@media (min-width: 640px) { .hero-calc .calc-form, .hero-calc .results { padding: 26px 28px; } }
.emi-extras .schedule { border-top: 0; }
.emi-extras .window { margin-bottom: 0; }

.hero-calc .hero-visual { max-width: 620px; }

/* Header: long app names shrink with an ellipsis instead of pushing the page sideways. */
.header-inner .brand { min-width: 0; }
.header-inner .brand > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-actions, .lang { flex: none; }
@media (max-width: 400px) { .header-inner { gap: 10px; } .header-inner .brand > span { font-size: 0.95rem; } }

/* Free / Pro chip on the feature cards. */
.chips li.tier-pro { background: var(--gold); border-color: transparent; color: var(--on-gold); }
.chips li.tier-free { background: var(--brand-tint); border-color: transparent; color: var(--on-tint); }

/* Commented-out screenshot slot (see index.html): kept hidden until real phone screenshots exist. */
.shots[hidden] { display: none !important; }
