/* ALION PARTNERS - editorial ledger design
   Palette: paper #f5f0e6 · ink #0f1c2e · vermilion #b8431a
   Fonts (self-hosted): Fraunces 600 for headings, Figtree for text.
   To change fonts later, edit only --serif and --sans below and the two @font-face blocks. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f5f0e6;
  --paper-2: #ebe4d4;
  --card: #fffdf8;
  --ink: #0f1c2e;
  --text: #29333f;
  --muted: #565f6c;
  --faint: #737b87;
  --line: rgba(15, 28, 46, 0.14);
  --line-strong: rgba(15, 28, 46, 0.32);
  --accent: #b8431a;
  --accent-hi: #96340f;
  --accent-soft: rgba(184, 67, 26, 0.09);
  --ok: #1f6b4a;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 6px;
  --radius-sm: 4px;
  --gutter: 24px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.12;
  -webkit-hyphens: auto;
  hyphens: auto;
}
p { margin-top: 0; }
strong { color: var(--ink); font-weight: 650; }
.container { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
:focus-visible { outline: 3px solid rgba(184, 67, 26, 0.55); outline-offset: 2px; }
[hidden] { display: none !important; }
section { padding: 92px 0; }
.soft { background: var(--paper-2); border-block: 1px solid var(--line); }

/* ---------- Top bar and header ---------- */
.top {
  padding: 9px 0;
  background: var(--ink);
  color: rgba(245, 240, 230, 0.82);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.top .container { display: flex; justify-content: space-between; gap: 16px; }
header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(245, 240, 230, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav { display: flex; align-items: center; gap: 12px; height: 76px; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.logo::before {
  content: "";
  width: 11px;
  height: 11px;
  background: var(--accent);
  transform: rotate(45deg);
}
.menu {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-size: 0.94rem;
  font-weight: 600;
}
.menu a:not(.cta) { color: var(--muted); transition: color 0.15s; }
.menu a:not(.cta):hover { color: var(--ink); }
.menu a.active:not(.cta) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 9px;
}
.cta {
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  transition: background 0.15s;
}
.cta:hover { background: var(--accent-hi); }
.mobile {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 1.35rem;
  cursor: pointer;
}

/* Language picker */
.language-picker { display: flex; align-items: center; }
.language-picker select {
  max-width: 140px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.language-picker option { color: #17231d; background: #fff; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.google-translate-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
}
.goog-te-banner-frame, .skiptranslate > iframe { display: none !important; }
body { top: 0 !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.primary, .btn-accent { background: var(--accent); color: #fff; }
.primary:hover, .btn-accent:hover { background: var(--accent-hi); }
.secondary { border-color: var(--ink); background: transparent; color: var(--ink); }
.secondary:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; }

/* ---------- Home: hero ---------- */
.hero {
  padding: 84px 0 92px;
  border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 84px);
  align-items: center;
}
.hero-grid > * { min-width: 0; }
.hero-eyebrow, .eyebrow, .calculator-intro, .essential-number, .num {
  color: var(--accent-hi);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.hero-eyebrow, .eyebrow { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.hero-eyebrow::before, .eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}
.hero h1 {
  -webkit-hyphens: manual;
  hyphens: manual;
  margin: 0 0 24px;
  font-size: clamp(2.5rem, 5.2vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.hero h1 span { color: var(--accent); }
.hero-copy > p {
  max-width: 33em;
  margin: 0;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.7;
}
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 30px; }
.hero-link { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--line-strong); padding-bottom: 2px; }
.hero-link:hover { border-bottom-color: var(--accent); }
.hero-link span { margin-left: 5px; color: var(--accent); }
.hero-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}
.hero-points div { display: flex; flex-direction: column; padding: 0 18px; border-left: 1px solid var(--line); }
.hero-points div:first-child { padding-left: 0; border-left: 0; }
.hero-points strong { font-size: 0.95rem; font-weight: 700; }
.hero-points span { margin-top: 3px; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }

/* ---------- Cards, calculator ---------- */
.hero-card {
  padding: 34px 34px 26px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 9px 9px 0 rgba(15, 28, 46, 0.1);
}
.hero-card h2 { margin: 0 0 24px; font-size: 1.6rem; }
.calculator-intro { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); }
.calculator-intro .card-mark { color: var(--accent-hi); }
.range-field { margin: 0 0 26px; }
.range-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.range-heading label { color: var(--muted); font-weight: 600; }
.range-heading output {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
input[type="range"] {
  width: 100%;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--accent) 0, var(--accent) var(--range-progress, 35%), rgba(15, 28, 46, 0.18) var(--range-progress, 35%));
}
input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--accent) 0, var(--accent) var(--range-progress, 35%), rgba(15, 28, 46, 0.18) var(--range-progress, 35%));
}
input[type="range"]::-webkit-slider-thumb {
  width: 24px; height: 24px; margin-top: -9.5px;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--paper);
  -webkit-appearance: none; appearance: none;
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--paper);
}
.range-limits { display: flex; justify-content: space-between; color: var(--faint); font-size: 0.8rem; font-weight: 600; }
.estimate { padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--paper); }
.monthly-line, .estimate-detail { display: flex; align-items: baseline; gap: 12px; }
.monthly-line > span, .estimate-detail > span { display: flex; flex: 1; align-items: baseline; min-width: 0; }
.monthly-line > span::after, .estimate-detail > span::after {
  content: "";
  flex: 1;
  min-width: 14px;
  margin: 0 8px;
  border-bottom: 2px dotted var(--line-strong);
}
.monthly-line { padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); color: var(--muted); }
.monthly-line strong { color: var(--ink); font-family: var(--serif); font-size: 2.1rem; font-variant-numeric: tabular-nums; }
.estimate-detail { padding-top: 10px; color: var(--muted); font-size: 0.9rem; }
.estimate-detail strong { font-variant-numeric: tabular-nums; }
.simulator-cta { width: 100%; margin-top: 24px; }
.hero-card .estimate-note { margin: 16px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; text-align: center; }

/* ---------- Section heads, cards ---------- */
.section-head { max-width: 700px; margin-bottom: 42px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 { margin: 0 0 14px; font-size: clamp(1.9rem, 3.5vw, 2.7rem); }
.section-head p { margin: 0; color: var(--muted); font-size: 1.08rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
}
.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
}
.card h3 { margin: 0 0 10px; font-size: 1.4rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ---------- Loan cards ---------- */
.loan-products { align-items: stretch; }
.loan-card { position: relative; display: flex; flex-direction: column; padding: 30px 26px 26px; }
.loan-kind { min-height: 46px; color: var(--muted); font-size: 0.92rem; }
.loan-card h3 { font-size: 1.75rem; }
.loan-limit { margin: 14px 0 0; padding: 16px 0; border-bottom: 1px solid var(--line-strong); color: var(--muted); }
.loan-limit strong { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; }
.loan-features { display: grid; gap: 12px; margin: 0; padding: 20px 0 26px; list-style: none; color: var(--text); font-size: 0.95rem; }
.loan-features li { display: flex; gap: 12px; }
.loan-features li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 0.55em; background: var(--accent); transform: rotate(45deg); }
.loan-card .btn { margin-top: auto; }
.loan-card:not(.loan-card-featured) .btn { border-color: var(--ink); background: transparent; color: var(--ink); }
.loan-card:not(.loan-card-featured) .btn:hover { background: var(--ink); color: var(--paper); }
.loan-card-featured { border: 2px solid var(--ink); background: var(--card); box-shadow: 8px 8px 0 rgba(15, 28, 46, 0.1); }
.loan-badge {
  position: absolute;
  top: -13px;
  right: 20px;
  padding: 4px 13px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.loan-disclaimer { max-width: 860px; margin: 30px 0 0; padding-left: 16px; border-left: 3px solid var(--accent); color: var(--muted); font-size: 0.9rem; }

/* ---------- Home: representative example strip ---------- */
.example-strip { padding: 0; border-bottom: 1px solid var(--line-strong); background: var(--ink); color: rgba(245, 240, 230, 0.9); }
.example-strip .container { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 26px 0; }
.example-strip h2 { color: var(--paper); font-size: 1.15rem; white-space: nowrap; }
.example-strip p { margin: 0; font-size: 0.93rem; line-height: 1.6; }
.example-strip strong { color: #fff; }

/* ---------- Home: identity, never, rights ---------- */
.id-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.id-layout > * { min-width: 0; }
.id-layout h2 { margin: 0 0 16px; font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.id-layout p { color: var(--muted); }
.id-card { margin: 0; padding: 8px 26px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--card); }
.id-card div { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px dotted var(--line-strong); }
.id-card div:last-child { border-bottom: 0; }
.id-card dt { color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.id-card dd { margin: 0; color: var(--ink); font-weight: 600; }
.id-card a, .text-link { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.never-grid, .rights-grid, .essentials-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.never-item, .right-item, .essential-card {
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
}
.never-item .essential-number, .right-item .essential-number { display: block; margin-bottom: 18px; }
.never-item h3, .right-item h3 { margin-bottom: 9px; font-family: var(--sans); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.005em; line-height: 1.3; }
.never-item p, .right-item p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.never-item { border-top: 4px solid var(--accent); }
.right-item { border-top: 4px solid var(--ink); }
.essentials-grid { grid-template-columns: repeat(3, 1fr); }

/* ---------- Steps, banner ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); }
.num { margin-bottom: 14px; }
.step h3 { margin: 0 0 8px; font-size: 1.4rem; }
.step p { margin: 0; color: var(--muted); }
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 48px;
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: 9px 9px 0 rgba(184, 67, 26, 0.35);
}
.banner h2 { margin: 0 0 8px; color: var(--paper); font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.banner p { margin: 0; color: rgba(245, 240, 230, 0.85); }
.banner .btn { flex: none; background: var(--accent); color: #fff; }
.banner .btn:hover { background: #d4561f; }

/* ---------- Sub pages ---------- */
.page-hero { padding: 72px 0 60px; background: var(--ink); }
.page-hero h1 { margin: 0 0 16px; color: var(--paper); font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
.page-hero p { max-width: 40em; margin: 0; color: rgba(245, 240, 230, 0.86); font-size: 1.15rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.two > * { min-width: 0; }
.two h2 { margin: 0 0 16px; font-size: 1.9rem; }
.two p { color: var(--muted); }
.panel { padding: 30px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); }
.panel h2 { margin-top: 0; }
.panel p { margin-bottom: 16px; }
.panel a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: 13px 0; border-bottom: 1px dotted var(--line-strong); }
.list li:last-child { border-bottom: 0; }
.list b { margin-right: 8px; color: var(--accent); }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 14px; }
.faq details { padding: 4px 22px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; color: var(--ink); font-weight: 650; list-style: none; cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--accent); font-size: 1.5rem; font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { margin: 0 0 18px; color: var(--muted); font-size: 0.96rem; }

/* ---------- Footer ---------- */
footer { padding: 64px 0 28px; background: var(--ink); color: rgba(245, 240, 230, 0.78); }
.footergrid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; }
.footergrid > * { min-width: 0; }
.footerlogo { margin-bottom: 12px; color: var(--paper); font-family: var(--serif); font-size: 1.5rem; font-weight: 600; letter-spacing: 0.05em; }
.footergrid p { max-width: 30em; margin: 0 0 14px; font-size: 0.93rem; }
.footergrid h4 { margin: 0 0 14px; color: var(--paper); font-size: 0.8rem; font-weight: 750; letter-spacing: 0.13em; text-transform: uppercase; }
.footergrid a { display: block; padding: 7px 0; font-size: 0.93rem; transition: color 0.15s; }
.footergrid a:hover { color: #fff; }
.footergrid p a { display: inline; padding: 0; color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.footer-example { margin: 36px 0 22px; padding-top: 24px; border-top: 1px solid rgba(245, 240, 230, 0.2); color: rgba(245, 240, 230, 0.78); font-size: 0.82rem; line-height: 1.65; }
.footer-example strong { color: #fff; }
.legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(245, 240, 230, 0.2); color: rgba(245, 240, 230, 0.66); font-size: 0.84rem; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field.full { grid-column: 1 / -1; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 26px; }
.formgrid .field { margin-bottom: 0; }
.field label { color: var(--ink); font-size: 0.9rem; font-weight: 650; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; }
.field select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%23565f6c' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-repeat: no-repeat;
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(184, 67, 26, 0.2); }
.consent { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 0.9rem; }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.consent a, .notice a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.notice { margin: 16px 0 0; color: var(--faint); font-size: 0.82rem; }
.success {
  display: none; margin-top: 16px; padding: 15px 16px;
  border: 1px solid rgba(31, 107, 74, 0.4); border-radius: var(--radius-sm);
  background: rgba(31, 107, 74, 0.09); color: #174f37;
}
/* script.js sets inline colours made for a dark theme; override for the light theme */
.form-error {
  border-color: rgba(160, 30, 30, 0.45) !important;
  background: #fbe9e7 !important;
  color: #8a1c1c !important;
}

/* ---------- Loan enquiry wizard ---------- */
.wizard { scroll-margin-top: 96px; max-width: 700px; margin: 0 auto; }
.stepper { position: relative; display: flex; justify-content: space-between; margin: 0 0 56px; padding: 0; list-style: none; }
.stepper::before, .stepper::after { content: ""; position: absolute; top: 16px; left: 17px; height: 3px; border-radius: 3px; }
.stepper::before { right: 17px; background: var(--line-strong); }
.stepper::after { width: calc((100% - 34px) * var(--progress, 0)); background: var(--accent); transition: width 0.3s ease; }
.stepper li { position: relative; z-index: 1; flex: 0 0 34px; height: 34px; }
.stepper-dot {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 2px solid var(--line-strong); border-radius: 50%;
  background: var(--paper); color: var(--muted); font-size: 0.85rem; font-weight: 750;
}
.stepper-text { position: absolute; top: 44px; left: 50%; color: var(--muted); font-size: 0.85rem; font-weight: 600; white-space: nowrap; transform: translateX(-50%); }
.stepper li:first-child .stepper-text { left: 0; transform: none; }
.stepper li:last-child .stepper-text { right: 0; left: auto; transform: none; }
.stepper .is-active .stepper-dot { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 0 0 5px rgba(184, 67, 26, 0.2); }
.stepper .is-active .stepper-text { color: var(--ink); }
.stepper .is-done .stepper-dot { position: relative; border-color: var(--accent); background: var(--accent); color: transparent; }
.stepper .is-done .stepper-dot::after { content: "\2713"; position: absolute; color: #fff; font-size: 1rem; font-weight: 800; }
.form-card.hero-card { padding: 40px 42px 32px; }
.wizard-step h2 { margin: 0 0 8px; font-size: 2rem; }
.step-intro { margin: 0 0 28px; color: var(--muted); }
.field .amount-input { padding: 15px 18px; font-size: 1.35rem; font-weight: 700; }
.wizard .range-field { margin-top: 24px; }
.offer-hint { min-height: 24px; margin: -8px 0 24px; color: var(--accent-hi); font-size: 0.9rem; }
.chips { min-width: 0; margin: 0; padding: 0; border: 0; }
.chips legend { margin-bottom: 12px; padding: 0; color: var(--ink); font-size: 0.9rem; font-weight: 650; }
.chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chip { position: relative; display: block; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 8px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--muted); font-size: 0.88rem; font-weight: 600; line-height: 1.3; text-align: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip:hover span { border-color: var(--accent); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hi); }
.chip input:focus-visible + span { outline: 3px solid rgba(184, 67, 26, 0.55); outline-offset: 2px; }
.summary {
  margin: 0 0 24px; padding: 14px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); font-size: 0.95rem; font-weight: 600;
}
.wizard-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 30px; }
.wizard-actions .secondary { margin-right: auto; }
.wizard-done { padding: 30px 0; text-align: center; }
.wizard-done h2 { justify-content: center; margin-bottom: 10px; }
.wizard-done p { margin: 0 0 26px; color: var(--muted); }
.done-icon {
  display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 18px;
  border-radius: 50%; background: rgba(31, 107, 74, 0.12); color: var(--ok); font-size: 1.9rem; font-weight: 800;
}

/* ---------- Legal pages ---------- */
.legal-page { padding: 60px 0 88px; }
.legal-doc { max-width: 820px; }
.legal-doc h2 { margin: 48px 0 14px; font-size: 1.65rem; }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc h3 { margin: 26px 0 8px; font-family: var(--sans); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
.legal-doc p, .legal-doc li { max-width: 75ch; color: var(--text); }
.legal-doc ul, .legal-doc ol { padding-left: 22px; }
.legal-doc li { margin: 7px 0; }
.legal-doc a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.legal-meta { color: var(--faint) !important; font-size: 0.85rem; }
.legal-box { margin: 18px 0; padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); color: var(--text); }
.table-scroll { overflow-x: auto; }
.legal-table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 0.97rem; }
.legal-table th, .legal-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table th { width: 34%; color: var(--ink); font-weight: 650; }
.legal-table td { color: var(--text); }

/* ---------- Tablet ---------- */
@media (max-width: 1040px) {
  .never-grid, .rights-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  section { padding: 64px 0; }
  .nav { height: 68px; }
  .logo { order: 1; }
  .language-picker { order: 2; margin-left: auto; }
  .mobile { order: 3; display: grid; place-items: center; }
  .menu { display: none; margin-left: 0; }
  .menu.open {
    position: absolute; top: 100%; right: 0; left: 0;
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px var(--gutter) 22px;
    border-bottom: 1px solid var(--line-strong);
    background: var(--paper);
    box-shadow: 0 24px 40px rgba(15, 28, 46, 0.18);
  }
  .menu.open a:not(.cta) { display: flex; align-items: center; min-height: 52px; padding: 14px 2px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .menu.open a.active:not(.cta) { color: var(--accent-hi); text-decoration: none; }
  .menu.open .cta { margin-top: 18px; padding: 15px; text-align: center; }
  .hero { padding: 52px 0 60px; }
  .hero-grid, .two, .id-layout { grid-template-columns: 1fr; gap: 40px; }
  .cards, .steps, .faq, .essentials-grid { grid-template-columns: 1fr; }
  .loan-card-featured { order: -1; }
  .loan-kind { min-height: 0; margin-bottom: 6px; }
  .example-strip .container { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .example-strip h2 { white-space: normal; }
  .footergrid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footergrid > :first-child { grid-column: 1 / -1; }
  .page-hero { padding: 52px 0 44px; }
  .banner { padding: 36px 30px; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  header { padding-top: env(safe-area-inset-top, 0); }
  section { padding: 52px 0; }
  .top .container span:last-child { display: none; }
  .logo { font-size: 1.1rem; letter-spacing: 0.03em; }
  .logo::before { width: 9px; height: 9px; }
  .language-picker select { max-width: 112px; padding: 8px; font-size: 0.82rem; }
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 2.7rem); }
  .hero-copy > p { font-size: 1.05rem; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 14px; }
  .hero-link { align-self: flex-start; }
  .hero-points { grid-template-columns: 1fr; gap: 0; margin-top: 30px; padding-top: 0; }
  .hero-points div, .hero-points div:first-child { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .hero-card { padding: 24px 18px 20px; box-shadow: 6px 6px 0 rgba(15, 28, 46, 0.1); }
  .hero-card h2 { font-size: 1.35rem; }
  .monthly-line strong { font-size: 1.75rem; }
  .estimate { padding: 16px; }
  .range-heading output { font-size: 1.15rem; }
  .section-head { margin-bottom: 30px; }
  .section-head h2 { font-size: 1.75rem; }
  .card, .step, .panel, .never-item, .right-item { padding: 24px 20px; }
  .loan-card { padding: 28px 20px 22px; }
  .never-grid, .rights-grid { grid-template-columns: 1fr; }
  .id-card { padding: 4px 18px; }
  .id-card div { grid-template-columns: 1fr; gap: 2px; }
  .btn { width: 100%; min-height: 52px; }
  .banner { display: block; padding: 30px 22px; box-shadow: 6px 6px 0 rgba(184, 67, 26, 0.35); }
  .banner .btn { margin-top: 22px; }
  .page-hero h1 { font-size: 2.15rem; }
  .page-hero p { font-size: 1.05rem; }
  .formgrid { grid-template-columns: 1fr; gap: 16px; }
  .form-card.hero-card { padding: 26px 18px 22px; }
  .wizard-step h2 { font-size: 1.7rem; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .stepper-text { font-size: 0.78rem; }
  .chip-grid { grid-template-columns: 1fr 1fr; }
  .wizard-actions { flex-direction: column-reverse; }
  .wizard-actions .btn, .wizard-actions .secondary { width: 100%; margin-right: 0; }
  .faq details { padding: 4px 16px; }
  .footergrid { grid-template-columns: 1fr; gap: 30px; }
  footer { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0)); }
  .legal-page { padding: 44px 0 64px; }
  .legal-doc h2 { margin-top: 38px; font-size: 1.45rem; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; width: 100%; }
  .legal-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .legal-table th, .legal-table td { padding: 2px 0; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
