:root {
  --ink: #172026;
  --muted: #5d6974;
  --line: #d9e1e7;
  --surface: #ffffff;
  --band: #f4f7f5;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --gold: #b7791f;
  --gold-soft: #f2c14e;
  --clay: #8a4b2a;
  --sky: #dfeef2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfcfd;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 6vw;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.brand img {
  width: 168px;
  height: auto;
}

.brand span {
  border-left: 1px solid var(--line);
  padding-left: 10px;
  color: var(--accent-dark);
}

nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.button.secondary {
  background: #22313a;
}

.button.small {
  min-height: 34px;
  padding: 7px 12px;
}

.inline-form {
  display: inline;
}

.inline-form button {
  min-height: 0;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 40px;
  min-height: 520px;
  padding: 74px 6vw 46px;
  background:
    linear-gradient(90deg, rgba(12, 40, 38, 0.92), rgba(12, 40, 38, 0.72)),
    url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.hero.compact {
  grid-template-columns: minmax(0, 820px);
  min-height: 430px;
}

.hero-home {
  background:
    linear-gradient(90deg, rgba(12, 40, 38, 0.93), rgba(20, 58, 58, 0.72)),
    url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
}

.hero-borrowers {
  background:
    linear-gradient(90deg, rgba(18, 49, 47, 0.92), rgba(44, 68, 63, 0.74)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
}

.hero-lenders {
  background:
    linear-gradient(90deg, rgba(25, 40, 47, 0.92), rgba(68, 52, 38, 0.72)),
    url("https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
}

.hero-scoring {
  background:
    linear-gradient(90deg, rgba(18, 49, 47, 0.94), rgba(65, 85, 70, 0.72)),
    url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
}

.hero-security {
  background:
    linear-gradient(90deg, rgba(23, 32, 38, 0.94), rgba(18, 49, 47, 0.7)),
    url("https://images.unsplash.com/photo-1563986768609-322da13575f3?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
}

.hero h1,
.page-head h1,
.form-page h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.05;
}

.lead {
  max-width: 760px;
  color: #e7f0ee;
  font-size: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-soft);
  font-weight: 700;
  text-transform: uppercase;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.metrics-panel {
  align-self: end;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.metrics-panel div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.metrics-panel strong {
  font-size: 30px;
}

.band,
.page-head,
.dashboard-grid,
.content-grid,
.catalog,
.evidence-grid,
.form-page,
.split-section,
.profile-hero,
.profile-workspace,
.verification-grid,
.cta-band,
.pricing-grid,
.contact-layout {
  padding: 42px 6vw;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading h2,
.split-section h2,
.cta-band h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.steps,
.dashboard-grid,
.content-grid,
.catalog,
.profile-workspace,
.verification-grid,
.evidence-grid,
.pricing-grid,
.contact-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.steps article,
.panel,
.evidence-card,
.form-card,
.price-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
}

.steps article {
  min-height: 190px;
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 36px;
  margin-bottom: 14px;
  border-radius: 6px;
  background: #e9f4f2;
  color: var(--accent-dark);
  font-weight: 800;
  letter-spacing: 0;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  background: var(--band);
}

.public-head {
  min-height: 260px;
  align-items: center;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(19, 36, 38, 0.94), rgba(17, 94, 89, 0.72)),
    url("https://images.unsplash.com/photo-1601597111158-2fceff292cdc?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.profile-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: 44px;
  line-height: 1.08;
}

.profile-hero p {
  max-width: 720px;
  color: #e7f0ee;
  font-size: 18px;
}

.profile-status-card,
.profile-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 22px;
}

.profile-status-card {
  display: grid;
  gap: 10px;
  align-content: center;
}

.profile-status-card strong {
  color: var(--accent-dark);
  font-size: 34px;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff4df;
  color: var(--clay);
  font-size: 13px;
  font-weight: 800;
}

.status-pill.paid {
  background: #e7f7ef;
  color: var(--accent-dark);
}

.profile-workspace {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: start;
}

.verification-grid {
  padding-top: 0;
}

.panel-heading {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.panel-heading > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #e9f4f2;
  color: var(--accent-dark);
  font-weight: 900;
}

.panel-heading h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.compact-heading {
  margin-bottom: 12px;
}

.compact-heading > span {
  width: 44px;
}

.panel-heading p,
.muted-note {
  margin: 0;
  color: var(--muted);
}

.stacked-form {
  display: grid;
  gap: 16px;
}

.stacked-form.compact {
  gap: 12px;
}

.payment-status-check {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.payment-status-check .button { width: 100%; }
.payment-status-check small { color: var(--muted); text-align: center; }

.commitment-purpose-note {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #eef8f5;
  padding: 12px 14px;
}
.commitment-purpose-note strong { color: var(--accent-dark); }
.commitment-purpose-note p { margin: 0; color: var(--ink); line-height: 1.45; }
.commitment-purpose-note small { color: var(--muted); line-height: 1.4; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.profile-field { grid-column: span 2; align-self: start; }
.profile-field > span { min-height: 18px; }
.profile-field > input,
.profile-field > select { height: 44px; }
.profile-field--phone_number,
.profile-field--national_id,
.profile-field--date_of_birth {
  grid-column: span 2;
  grid-template-rows: 18px 44px auto;
}
.profile-field--county,
.fixed-profile-field { grid-column: span 3; }

.stacked-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 700;
}

.stacked-form input,
.stacked-form select,
.stacked-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
}

.stacked-form input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
}

.stacked-form input[disabled] {
  border-color: #cfd8df;
  background: #eef2f5;
  color: #53616c;
  cursor: not-allowed;
}

.toggle-field {
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.toggle-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #c7d1d8;
  transition: background 0.2s ease;
}

.toggle-switch::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 24, 32, 0.22);
  content: "";
  transition: transform 0.2s ease;
}

.toggle-field input:checked + .toggle-switch {
  background: var(--accent);
}

.toggle-field input:checked + .toggle-switch::after {
  transform: translateX(22px);
}

.toggle-field strong {
  display: block;
}

.stacked-form small,
.form-error {
  color: var(--muted);
  font-weight: 400;
}

.form-error {
  color: #9f1239;
}

.success-box {
  border: 1px solid #b9d8d3;
  border-radius: 8px;
  background: #f0fbf8;
  padding: 14px;
}

.verified-box {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  border: 1px solid #b9d8d3;
  border-radius: 8px;
  background: #f0fbf8;
  padding: 16px;
}

.verified-box strong {
  color: var(--accent-dark);
}

.verified-box dl {
  margin: 0;
}

.score-access-box {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid rgba(22, 139, 125, .22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 170, 53, .15), transparent 32%),
    linear-gradient(145deg, #f3fbf8, #fff 72%);
  padding: 20px;
}

.score-access-box.sharing-active {
  box-shadow: 0 16px 34px rgba(19, 73, 65, .09);
}

.profile-sharing-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
}

.profile-sharing-head h2,
.profile-sharing-head p {
  margin: 0;
}

.profile-sharing-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent-dark);
  color: #fff;
  font-weight: 900;
}

.profile-sharing-status {
  border-radius: 999px;
  background: #e9ece9;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.profile-sharing-status.active {
  background: #dff4ee;
  color: #087466;
}

.profile-sharing-score {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 7px;
}

.profile-sharing-score > div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 74px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  padding: 10px;
}

.profile-sharing-score span,
.profile-sharing-score small {
  color: var(--muted);
  font-size: 10px;
}

.profile-sharing-score strong {
  color: var(--ink);
  font-size: 21px;
}

.profile-sharing-validity {
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--accent);
  background: #eaf7f3;
  padding: 11px 13px;
}

.profile-sharing-validity span,
.profile-sharing-offer span,
.profile-sharing-note,
.profile-sharing-copy {
  color: var(--muted);
  font-size: 12px;
}

.profile-sharing-offer {
  display: grid;
  gap: 2px;
}

.profile-sharing-offer strong {
  color: var(--accent-dark);
  font-size: 27px;
}

.profile-sharing-benefits {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-sharing-benefits li {
  position: relative;
  padding-left: 20px;
  font-size: 12px;
}

.profile-sharing-benefits li::before {
  position: absolute;
  left: 0;
  color: var(--accent);
  content: "✓";
  font-weight: 900;
}

.profile-sharing-action {
  width: 100%;
  text-align: center;
}

.profile-sharing-note {
  text-align: center;
}

.success-box p {
  margin: 6px 0 0;
  color: var(--muted);
}

.panel.highlight {
  border-color: #8bbdb7;
}

.score-overview {
  background: linear-gradient(145deg, #f4fbf9 0%, #ffffff 70%);
}

.dashboard-lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
}

.dashboard-score-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(340px, 1.1fr);
  gap: 18px 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(22, 139, 125, 0.14), transparent 28%),
    linear-gradient(145deg, #f4fbf9 0%, #ffffff 68%);
  padding: clamp(22px, 4vw, 38px);
}

.dashboard-score-card .dashboard-panel-heading { grid-column: 1 / -1; }
.dashboard-score-card .score-gauge-wrap { grid-column: 1; grid-row: 2 / span 4; }
.dashboard-score-card .limit-card,
.dashboard-score-card .score-meta-grid,
.dashboard-score-card > form { grid-column: 2; }

.score-gauge-wrap {
  position: relative;
  max-width: 440px;
  min-height: 245px;
  margin: 0 auto;
  text-align: center;
}

.score-gauge { width: 100%; overflow: visible; }
.gauge-track,
.gauge-progress {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
}
.gauge-track { stroke: #dfe9e7; }
.gauge-progress { stroke: url(#scoreGaugeGradient); }
.gauge-needle {
  stroke: #203b38;
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}
.gauge-hub { fill: #203b38; stroke: #fff; stroke-width: 3; }

.gauge-score {
  display: grid;
  margin-top: -20px;
}
.gauge-score strong {
  color: var(--accent-dark);
  font-size: clamp(44px, 7vw, 68px);
  line-height: 1;
}
.gauge-score span { color: var(--muted); font-weight: 700; }
.gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-panel-heading,
.contribution-row,
.review-alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-panel-heading h2,
.formula-panel h2,
.contribution-panel h2,
.review-alert h2 {
  margin-top: 0;
}

.score-status {
  border-radius: 999px;
  background: #dff3ed;
  padding: 7px 11px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.score-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 18px;
}

.score-display strong {
  color: var(--accent-dark);
  font-size: clamp(52px, 8vw, 78px);
  line-height: 0.9;
}

.score-display span {
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
}

.limit-card {
  display: grid;
  gap: 5px;
  border: 1px solid #cde4df;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.limit-card > span,
.limit-card small,
.score-meta,
.contribution-row small,
.review-items span,
.review-items small {
  color: var(--muted);
}

.limit-card strong {
  font-size: clamp(24px, 4vw, 34px);
}

.score-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.score-meta-grid > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 12px;
}
.score-meta-grid span { color: var(--muted); font-size: 12px; }
.score-meta-grid strong { color: var(--ink); }

.score-status.expired { background: #fff0dc; color: #965313; }

.score-expiry-alert {
  display: grid;
  grid-column: 2;
  gap: 8px;
  border: 1px solid #e0c26e;
  border-radius: 10px;
  background: #fffaf0;
  padding: 14px;
}

.score-expiry-alert p { margin: 0; color: var(--muted); }
.score-expiry-alert .button { justify-self: start; }

.affordability-section {
  padding: 14px 6vw 34px;
  background: linear-gradient(180deg, #f7faf9 0%, #ffffff 100%);
}

.dashboard-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}
.dashboard-section-heading h2 { margin: 0; }
.dashboard-section-heading p { max-width: 760px; color: var(--muted); }
.rate-source { display: block; color: var(--muted); }

.affordability-pulse {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  border-radius: 10px;
  background: var(--accent-dark);
  padding: 14px 18px;
  color: #fff;
  box-shadow: 0 12px 28px rgba(18, 91, 82, 0.18);
}
.affordability-pulse span { color: #cce8e3; font-size: 12px; }
.affordability-pulse strong { font-size: 22px; }

.term-scenario-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 16px;
}
.term-card {
  border: 1px solid #cfe2de;
  border-radius: 12px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(28, 57, 53, 0.07);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.term-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 17px 34px rgba(28, 57, 53, 0.11);
}
.term-card-top { display: flex; align-items: center; justify-content: space-between; }
.term-card-top span {
  border-radius: 999px;
  background: #e8f5f2;
  padding: 6px 10px;
  color: var(--accent-dark);
  font-weight: 800;
}
.term-card-top small,
.term-card > p { color: var(--muted); }
.term-card > p { margin: 18px 0 4px; font-size: 13px; }
.term-card > strong { color: var(--ink); font-size: clamp(23px, 3vw, 31px); }
.term-meter {
  height: 7px;
  margin: 16px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e7efed;
}
.term-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}
.term-card dl { grid-template-columns: 1fr auto; margin: 0; font-size: 13px; }
.term-card dt { color: var(--muted); }
.term-card dd { font-weight: 800; }
.scenario-disclaimer { margin-bottom: 0; color: var(--muted); font-size: 12px; }

.loan-request-panel { grid-column: 1 / -1; }
.dashboard-loan-form {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(150px, 0.6fr) minmax(220px, 1.2fr) auto;
  align-items: end;
  gap: 12px;
  margin: 18px 0 24px;
  border-radius: 10px;
  background: #f3f8f7;
  padding: 16px;
}
.dashboard-loan-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.dashboard-loan-form input,
.dashboard-loan-form select { width: 100%; min-height: 44px; }
.dashboard-loan-form button { min-height: 44px; white-space: nowrap; }
.loan-request-panel .list li { display: grid; gap: 3px; }
.loan-request-panel .list span { color: var(--muted); font-size: 13px; }

.lender-match-form { max-width: 760px; }
.lender-match-page { max-width: none !important; }
.matching-back-row { margin-bottom: 18px; }
.matching-intro-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: stretch;
}
.matching-form-column { min-width: 0; }
.matching-process-panel {
  align-self: stretch;
  border: 1px solid #b9d8d3;
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(22, 139, 125, 0.18), transparent 34%),
    linear-gradient(145deg, #f4fbf9, #ffffff);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: 0 16px 36px rgba(28, 57, 53, 0.09);
}
.matching-process-panel h2 { margin-top: 0; }
.matching-process-panel ol { display: grid; gap: 14px; margin: 20px 0; padding: 0; list-style: none; }
.matching-process-panel li { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; }
.matching-process-panel li > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-dark);
  color: #fff;
  font-weight: 900;
}
.matching-process-panel li div { display: grid; gap: 3px; }
.matching-process-panel li small { color: var(--muted); line-height: 1.45; }
.matching-safety-note {
  border-left: 3px solid #d4aa35;
  margin: 18px 0 0;
  background: #fff9e9;
  padding: 11px 12px;
  color: #6c5824;
  font-size: 12px;
}
.match-results-section { padding: 8px 6vw 46px; }
.match-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 18px;
}
.lender-offer-card { position: relative; display: grid; align-content: start; gap: 10px; }
.lender-offer-card.best-offer {
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(22, 139, 125, 0.13);
}
.offer-rank { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.offer-rank span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8f5f2;
  color: var(--accent-dark);
  font-weight: 900;
}
.offer-rank strong { color: var(--accent-dark); font-size: 12px; }
.lender-offer-card h2 { margin: 0; }
.offer-payment {
  display: grid;
  gap: 3px;
  border-radius: 8px;
  background: #f2f8f7;
  padding: 14px;
}
.offer-payment span { color: var(--muted); font-size: 12px; }
.offer-payment strong { color: var(--accent-dark); font-size: 25px; }
.offer-details { grid-template-columns: 1fr auto; margin: 2px 0; }
.offer-details dd { text-align: right; font-weight: 800; }
.benchmark-note,
.mapped-rate-note,
.offer-criteria,
.rate-verification-link { color: var(--muted); font-size: 12px; }
.benchmark-note { border-left: 3px solid #d4aa35; padding-left: 9px; }
.mapped-rate-note { border-left: 3px solid var(--accent); padding-left: 9px; }
.lender-offer-card form { align-self: end; margin-top: auto; }
.lender-offer-card form button { width: 100%; }

.dashboard-alert-section,
.score-explanation {
  padding: 0 6vw 24px;
}

.crb-impact-section {
  width: 100%;
  padding: 0 6vw 24px;
}

.crb-impact-card {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  border-top: 4px solid var(--accent);
}

.crb-impact-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.crb-impact-heading > div { min-width: 0; }
.crb-impact-heading h2 { margin: 0 0 6px; }
.crb-impact-heading p { margin: 0; color: var(--muted); }

.crb-risk-badge {
  align-self: start;
  justify-self: end;
  min-width: 72px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #fff3d4;
  color: #805a00;
  text-align: center;
  white-space: nowrap;
}

.crb-risk-badge.positive { background: #dff4ed; color: #11695e; }

.crb-impact-metrics,
.crb-effect-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.crb-impact-metrics > div,
.crb-effect-item {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  background: #f5f9f8;
}

.crb-impact-metrics > div {
  grid-template-rows: minmax(30px, auto) 1fr;
  align-items: end;
  min-height: 96px;
}

.crb-impact-metrics span,
.crb-effect-item span { color: var(--muted); font-size: 12px; font-weight: 700; }
.crb-impact-metrics strong {
  align-self: end;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(17px, 1.55vw, 21px);
  line-height: 1.15;
}
.crb-impact-metrics strong small { font-size: 12px; color: var(--muted); }

.crb-effect-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.crb-effect-item {
  grid-template-rows: auto auto 1fr;
  align-content: start;
  min-height: 150px;
  border-left: 4px solid #9aa9a6;
}
.crb-effect-item.positive { border-left-color: var(--accent); }
.crb-effect-item.review { border-left-color: #d49b20; background: #fff9ea; }
.crb-effect-item strong { font-size: 17px; color: var(--ink); }
.crb-effect-item small { color: var(--muted); line-height: 1.45; }

.crb-impact-note {
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: #edf6ff;
  color: #27465e;
}

.crb-impact-disclaimer { display: block; color: var(--muted); line-height: 1.5; }

.score-explanation {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
}

.review-alert {
  border-color: #e0c26e;
  background: #fffaf0;
}

.review-items,
.contribution-list {
  display: grid;
  gap: 10px;
}

.review-items {
  min-width: min(440px, 100%);
}

.review-items > div {
  display: grid;
  gap: 3px;
  border-left: 3px solid #d4aa35;
  background: #ffffff;
  padding: 10px 12px;
}

.formula-box {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.formula-box code {
  overflow-wrap: anywhere;
  border-radius: 6px;
  background: #edf4f3;
  padding: 12px;
  color: #194f49;
  font-family: inherit;
  font-weight: 700;
}

.affordability-formula-detail {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.sacco-calculation-detail {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.sacco-calculation-detail h3 { margin: 0 0 3px; }
.sacco-calculation-detail > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.4fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  background: #f7faf9;
  padding: 10px 12px;
}
.sacco-calculation-detail span { color: var(--muted); font-size: 12px; font-weight: 700; }
.sacco-calculation-detail code { padding: 8px 10px; }
.affordability-formula-detail h3 { margin: 0 0 3px; }
.affordability-formula-detail .other-calculations-heading {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dce9e6;
}
.affordability-formula-detail .other-calculation-row span small {
  display: block;
  margin-top: 3px;
  font-weight: 400;
  line-height: 1.35;
}
.affordability-formula-detail > div {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(220px, 1.4fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 7px;
  background: #f7faf9;
  padding: 10px 12px;
}
.affordability-formula-detail span { color: var(--muted); font-size: 12px; font-weight: 700; }
.affordability-formula-detail code { overflow-wrap: anywhere; color: #34524f; font-family: inherit; }
.affordability-formula-detail strong { white-space: nowrap; color: var(--accent-dark); }
.affordability-formula-detail .capacity-result {
  border: 1px solid #b9d8d3;
  background: #eaf6f3;
}
.affordability-formula-detail .formula-note {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4f8f7;
  color: #48625f;
  font-size: 12px;
  line-height: 1.55;
}

.contribution-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.6fr) minmax(135px, 0.9fr) 72px 94px minmax(135px, 0.9fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.contribution-row div {
  display: grid;
  gap: 3px;
}

.contribution-row > span {
  display: grid;
  gap: 2px;
  white-space: nowrap;
  color: var(--accent-dark);
  font-weight: 800;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.contribution-row > span small { display: none; }

.confidence-basis {
  margin-top: 3px;
  color: #4d6c68 !important;
  font-style: italic;
}

.contribution-breakdown-head {
  display: grid;
  grid-template-columns: minmax(190px, 1.6fr) minmax(135px, 0.9fr) 72px 94px minmax(135px, 0.9fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.contribution-breakdown-head span:nth-child(n + 3) {
  text-align: left;
}

.verification-page {
  display: grid;
  place-items: center;
  min-height: 68vh;
  padding: 36px 0;
}

.verification-card {
  width: min(620px, 100%);
  border-top: 6px solid var(--accent);
  text-align: center;
}

.verification-card.is-invalid { border-top-color: #c84f45; }
.verification-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #e7f5f1;
  color: var(--accent-dark);
  font-size: 34px;
  font-weight: 900;
}
.verification-card.is-invalid .verification-mark { background: #fbecea; color: #a93830; }
.verification-details {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}
.verification-details dt,
.verification-details dd { margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.verification-details dt { background: #f4f8f7; color: var(--muted); font-weight: 700; }
.verification-details dd { font-weight: 800; }
.verification-guidance,
.verification-reference { padding: 12px 14px; border-radius: 10px; background: #f4f8f7; color: var(--muted); }

@media (max-width: 1180px) {
  .score-explanation {
    grid-template-columns: 1fr;
  }
}

.duplicate-note {
  display: block;
  margin-top: 4px;
  color: #8c5f00;
  font-weight: 700;
}

.recent-documents-panel {
  grid-column: 1 / -1;
  min-width: 0;
}

.recent-documents-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.recent-documents-table {
  table-layout: fixed;
  font-size: clamp(11px, 1.15vw, 14px);
}

.recent-documents-table th:nth-child(1) { width: 24%; }
.recent-documents-table th:nth-child(2) { width: 38%; }
.recent-documents-table th:nth-child(3) { width: 18%; }
.recent-documents-table th:nth-child(4) { width: 20%; }
.recent-documents-table td { line-height: 1.35; }
.recent-documents-table td:nth-child(2) { overflow-wrap: anywhere; }
.recent-documents-table td:last-child { white-space: nowrap; }

.capacity-scope-note {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.cashflow-guidance-section {
  width: 100%;
  margin: 0;
  padding: 14px 6vw 34px;
  background: linear-gradient(180deg, #f7faf9 0%, #ffffff 100%);
}
.cashflow-guidance-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(190px, auto);
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  border-left: 5px solid #d4aa35;
  background: linear-gradient(135deg, #fffaf0, #ffffff 72%);
  padding: 20px;
}
.cashflow-guidance-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f6e7b8;
  color: #725b16;
  font-weight: 900;
}
.cashflow-guidance-card h2 { margin: 2px 0 7px; font-size: clamp(22px, 2.4vw, 30px); }
.cashflow-guidance-card p:not(.eyebrow) { margin: 0 0 6px; line-height: 1.5; }
.cashflow-guidance-card small { color: var(--muted); line-height: 1.4; }
.cashflow-guidance-action { display: flex; justify-content: flex-end; white-space: nowrap; }
.cashflow-guidance-action .button { width: 100%; max-width: 250px; text-align: center; }

.crb-guidance-section {
  width: 100%;
  padding: 0 6vw 24px;
}
.crb-guidance-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(190px, auto);
  align-items: center;
  gap: 18px;
  width: 100%;
  border-left: 5px solid var(--accent);
  background: linear-gradient(135deg, #eff9f6, #ffffff 72%);
}
.crb-guidance-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #dcefeb;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}
.crb-guidance-card h2 { margin: 2px 0 7px; font-size: clamp(22px, 2.4vw, 30px); }
.crb-guidance-card p:not(.eyebrow) { margin: 0 0 6px; line-height: 1.5; }
.crb-guidance-card small { color: var(--muted); line-height: 1.4; }
.crb-guidance-action { display: flex; justify-content: flex-end; white-space: nowrap; }
.crb-guidance-action .button { width: 100%; max-width: 250px; text-align: center; }

.identity-disclaimer {
  margin-top: 10px;
  border-left: 4px solid #d4aa35;
  background: #fff9e8;
  padding: 10px 12px;
  color: #604f20;
  font-size: 13px;
  line-height: 1.45;
}

.profile-form-alert {
  margin: 10px 0;
  border: 2px solid #c7433a;
  border-radius: 8px;
  background: #fff0ef;
  padding: 10px 12px;
  color: #8f2923;
  font-weight: 700;
}

.fixed-profile-field {
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f8f7;
  padding: 11px 12px;
}
.fixed-profile-field span { color: var(--muted); font-size: 13px; font-weight: 700; }
.fixed-profile-field strong { color: var(--accent-dark); }
.fixed-profile-field small { color: var(--muted); }

.stacked-form label.has-error input,
.stacked-form label.has-error select,
.stacked-form label.has-error textarea {
  border: 2px solid #c7433a;
  outline-color: #c7433a;
  background: #fff8f7;
}

.button.disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.score-share-action {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.score-share-action small {
  color: var(--muted);
}

.sharing-status {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e9ece9;
  color: #4f5a57;
  font-size: 13px;
  font-weight: 700;
}

.sharing-status.active {
  background: #dff4ee;
  color: #087466;
}

.sharing-preferences,
.sharing-payment-form {
  display: grid;
  gap: 12px;
}

.sharing-preferences label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px;
  border-radius: 12px;
  background: #f6f8f7;
}

.sharing-preferences .partner-search-label {
  display: grid;
  gap: 6px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.partner-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.partner-search-row button {
  min-height: 44px;
}

.partner-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-height: 310px;
  overflow-y: auto;
  padding: 2px;
}

.partner-group {
  display: grid;
  align-content: start;
  gap: 7px;
}

.partner-group h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  background: #fff;
  padding: 7px 2px;
  font-size: 14px;
}

.sharing-preferences .partner-group label {
  align-items: center;
  padding: 9px 10px;
  cursor: pointer;
}

.sharing-preferences [data-partner-name][hidden] {
  display: none;
}

.partner-search-count {
  min-height: 18px;
  color: var(--accent-dark);
  font-weight: 700;
}

.partner-search-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
}

.sharing-preferences input {
  width: auto;
  margin-top: 3px;
}

.sharing-payment-form label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.share-score-dialog {
  width: min(640px, calc(100vw - 32px));
  border: 0;
  border-radius: 20px;
  padding: 26px;
  color: var(--ink);
  box-shadow: 0 26px 80px rgba(12, 35, 31, .28);
}

.share-score-dialog::backdrop {
  background: rgba(9, 24, 22, .58);
  backdrop-filter: blur(3px);
}

.share-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.share-dialog-heading h2 {
  margin: 2px 0 0;
}

.dialog-close {
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  background: #edf2f0;
  color: var(--ink);
  font-size: 24px;
}

.share-dialog-price {
  display: grid;
  gap: 2px;
  margin: 20px 0;
  color: var(--accent-dark);
  font-size: 28px;
  font-weight: 900;
}

.share-dialog-price small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.share-history-section {
  margin: 0;
  padding: 36px 6vw;
}

.share-history-panel {
  overflow: hidden;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(22, 139, 125, .08), transparent 28%),
    #fff;
  padding: clamp(20px, 3vw, 30px);
}

.share-history-section .section-heading {
  margin-bottom: 18px;
}

.share-history-section .section-heading .eyebrow {
  margin-bottom: 5px;
}

.share-history-section .section-heading p:last-child {
  margin: 8px 0 0;
}

.share-history-list {
  display: grid;
  gap: 10px;
}

.share-history-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #dce7e4;
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
}

.share-history-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 52px;
  border-radius: 8px;
  background: #e7f5f1;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
}

.share-history-card > div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.share-history-card span,
.share-history-card small {
  color: var(--muted);
  line-height: 1.45;
}

.share-history-card small b {
  color: var(--ink);
}

.share-history-card > a {
  justify-self: end;
  white-space: nowrap;
}

.share-history-empty {
  display: grid;
  justify-items: center;
  gap: 9px;
  max-width: 620px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 26px 18px 6px;
  text-align: center;
}

.share-history-section.is-empty .section-heading {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.share-history-section.is-empty .section-heading p {
  margin-right: auto;
  margin-left: auto;
}

.share-history-empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 60px;
  border-radius: 10px;
  background: #e7f5f1;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.share-history-empty h3,
.share-history-empty p {
  margin: 0;
}

.share-history-empty p {
  max-width: 520px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .cashflow-guidance-card { grid-template-columns: 1fr; }
  .cashflow-guidance-action,
  .cashflow-guidance-action .button { width: 100%; text-align: center; }
  .crb-guidance-card { grid-template-columns: 1fr; }
  .crb-guidance-action,
  .crb-guidance-action .button { width: 100%; text-align: center; }

  .field-grid { grid-template-columns: 1fr; }
  .profile-field,
  .profile-field--phone_number,
  .profile-field--national_id,
  .profile-field--date_of_birth,
  .profile-field--county,
  .fixed-profile-field { grid-column: 1; }

  .share-history-card {
    grid-template-columns: auto 1fr;
  }

  .share-history-card > a {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }
  .partner-search-row {
    grid-template-columns: 1fr;
  }
  .partner-picker {
    grid-template-columns: 1fr;
  }
  .dashboard-score-card { grid-template-columns: 1fr; }
  .dashboard-score-card .score-gauge-wrap,
  .dashboard-score-card .limit-card,
  .dashboard-score-card .score-meta-grid,
  .dashboard-score-card > form { grid-column: 1; grid-row: auto; }
  .score-expiry-alert { grid-column: 1; }
  .score-share-action {
    grid-column: 1;
  }
  .dashboard-section-heading { display: grid; align-items: start; }
  .affordability-pulse { justify-self: stretch; }
  .term-scenario-grid { grid-template-columns: 1fr; }
  .loan-request-panel { grid-column: auto; }
  .dashboard-loan-form { grid-template-columns: 1fr; }
  .match-card-grid { grid-template-columns: 1fr; }
  .matching-intro-grid { grid-template-columns: 1fr; }
  .score-meta-grid { grid-template-columns: 1fr 1fr; }
  .score-explanation { grid-template-columns: 1fr; }
  .crb-impact-heading { grid-template-columns: 1fr; gap: 12px; }
  .crb-risk-badge { justify-self: start; }
  .crb-impact-metrics { grid-template-columns: 1fr 1fr; }
  .crb-effect-grid { grid-template-columns: 1fr; }
  .review-alert { display: grid; }
  .review-items { min-width: 0; }
  .contribution-breakdown-head { display: none; }
  .contribution-row { grid-template-columns: 1fr 1fr; }
  .contribution-row > div { grid-column: 1 / -1; }
  .contribution-row > span small { display: block; color: var(--muted); }
  .affordability-formula-detail > div,
  .sacco-calculation-detail > div { grid-template-columns: 1fr; }
}

.evidence-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding-top: 0;
}

.evidence-card {
  display: grid;
  gap: 14px;
}

.evidence-card h2,
.evidence-card h3 {
  margin: 0;
}

.evidence-card p {
  margin: 0;
  color: var(--muted);
}

.evidence-card dl {
  grid-template-columns: 90px 1fr;
  margin: 0;
}

.compact-tags {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-top: 8px;
}

.compact-tags span {
  padding: 8px 10px;
  font-size: 13px;
}

.document-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.document-type-box {
  display: grid;
  gap: 4px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.document-type-box strong {
  color: var(--ink);
  line-height: 1.2;
}

.document-type-box span {
  color: var(--accent-dark);
  font-weight: 800;
}

.document-type-box small {
  color: var(--muted);
}

.document-type-sample-card {
  position: relative;
  cursor: help;
}

.sample-card-hint {
  color: var(--accent-dark) !important;
  font-weight: 700;
}

.document-type-card-popover {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 8px);
  z-index: 25;
  display: none;
  width: min(390px, 82vw);
  border: 1px solid #b9d8d3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 32, 0.2);
  padding: 14px;
}

.document-type-sample-card:hover .document-type-card-popover,
.document-type-sample-card:focus .document-type-card-popover,
.document-type-sample-card:focus-within .document-type-card-popover {
  display: block;
}

.document-type-card-popover > strong,
.document-type-card-popover > small,
.card-sample-sheet,
.card-sample-sheet > span {
  display: block;
}

.document-type-card-popover > small {
  margin: 5px 0 10px;
  font-weight: 400;
}

.card-sample-sheet {
  border: 1px solid #d7dcdf;
  border-radius: 5px;
  background: #fbfbfb;
  padding: 10px;
}

.card-redaction,
.card-bond-layout i,
.card-statement-layout i {
  display: inline-block;
  width: 28%;
  height: 8px;
  border-radius: 2px;
  background: #c7cbce;
}

.card-redaction.wide { display: block; width: 70%; margin-bottom: 5px; }
.card-redaction.medium { display: block; width: 45%; margin-bottom: 8px; }
.card-sample-sheet > span:not(.card-bond-layout):not(.card-statement-layout) {
  display: grid;
  grid-template-columns: 28% 1fr;
  gap: 8px;
  align-items: center;
  border-top: 1px solid #e4e7e8;
  padding: 5px 0;
}
.card-sample-sheet em { color: #697176; font-size: 11px; font-style: normal; }
.card-bond-layout {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 8px;
  border-top: 1px solid #d7dcdf;
  padding-top: 7px;
  font-size: 9px;
}
.card-bond-layout i { width: 75%; }

.card-statement-layout {
  display: grid !important;
  grid-template-columns: 1.5fr 1fr 0.75fr repeat(3, 0.9fr);
  gap: 4px;
  margin-top: 8px;
  overflow-x: auto;
  border-top: 1px solid #d7dcdf;
  padding-top: 7px;
  font-size: 7px;
}

.card-statement-layout i { width: 78%; height: 6px; }

.muted-copy {
  color: var(--muted);
}

.notice-copy {
  border-left: 3px solid var(--accent);
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #f2faf8;
  color: #34524f;
  font-size: 14px;
}

.evidence-sample-help {
  position: relative;
  float: right;
}

.sample-help-trigger {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  cursor: help;
}

.evidence-sample-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  z-index: 30;
  display: none;
  width: min(430px, 84vw);
  border: 1px solid #b9d8d3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 32, 0.2);
  padding: 15px;
  color: var(--ink);
}

.evidence-sample-help:hover .evidence-sample-popover,
.evidence-sample-help:focus-within .evidence-sample-popover {
  display: block;
}

.evidence-sample-popover > strong,
.sample-note,
.sample-sheet,
.sample-field-row,
.bond-sample-table,
.bond-sample-table > span {
  display: block;
}

.sample-note {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.sample-sheet {
  border: 1px solid #d7dcdf;
  border-radius: 5px;
  background: #fbfbfb;
  padding: 12px;
}

.sample-sheet-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sample-sheet i,
.sample-redacted-line {
  display: inline-block;
  height: 8px;
  border-radius: 2px;
  background: #c7cbce;
}

.sample-sheet-head i:first-child { width: 32%; height: 17px; }
.sample-sheet-head i:last-child { width: 18%; height: 17px; }
.sample-redacted-line { display: block; margin: 5px 0; }
.sample-redacted-line.wide { width: 72%; }
.sample-redacted-line.medium { width: 48%; margin-bottom: 10px; }

.sample-field-row {
  display: grid;
  grid-template-columns: 28% 1fr;
  gap: 9px;
  align-items: center;
  border-top: 1px solid #e4e7e8;
  padding: 6px 0;
}

.sample-field-row i { width: 100%; }
.sample-field-row em { color: #697176; font-size: 11px; font-style: normal; }

.bond-sample-table { margin-top: 8px; border: 1px solid #d7dcdf; }
.bond-sample-table > span { display: grid; grid-template-columns: 1fr 0.8fr 1fr; }
.bond-sample-table b { padding: 4px; background: #e7e9ea; font-size: 9px; }
.bond-sample-table i { width: 78%; margin: 7px 4px; }
.bond-sample-table .bond-total { grid-template-columns: 1.8fr 1fr; border-top: 1px solid #d7dcdf; }

.bond-sample-table[hidden],
.statement-sample-table[hidden] {
  display: none !important;
}

.statement-sample-table {
  display: block;
  margin-top: 9px;
  overflow-x: auto;
  border: 1px solid #d7dcdf;
  min-width: 540px;
}

.statement-sample-table > span {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.75fr repeat(3, 0.9fr);
}

.statement-sample-table b {
  padding: 5px 4px;
  background: #e7e9ea;
  font-size: 8px;
}

.statement-sample-table i {
  width: 76%;
  margin: 8px 4px;
}

@media (max-width: 560px) {
  .evidence-sample-popover { right: -8px; }
  .crb-impact-metrics { grid-template-columns: 1fr; }
  .crb-impact-metrics > div { min-height: 82px; }
  .crb-effect-item { min-height: 0; }
}

.document-progress-list {
  display: grid;
  gap: 14px;
}

.active-document-progress {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #b9d8d3;
  border-radius: 8px;
  background: #f7fcfb;
}

.progress-track.indeterminate {
  overflow: hidden;
}

.progress-track.indeterminate .progress-bar {
  width: 35% !important;
  animation: marker-progress 1.5s ease-in-out infinite;
}

@keyframes marker-progress {
  from { transform: translateX(-120%); }
  to { transform: translateX(340%); }
}

.processing-actions[hidden] {
  display: none;
}

.readiness-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.readiness-status-grid div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.readiness-status-grid strong {
  font-size: 26px;
}

.readiness-status-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.readiness-status-grid .completed { border-color: #8bbdb7; }
.readiness-status-grid .review { border-color: #e0c26e; }
.readiness-status-grid .processing { border-color: #89acd8; }
.readiness-status-grid .rejected { border-color: #d99b9b; }

@media (max-width: 640px) {
  .readiness-status-grid { grid-template-columns: repeat(2, 1fr); }
}

.document-progress-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.document-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.document-progress-head h3 {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.validation-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.validation-badge.accepted {
  border-color: #8bbdb7;
  background: #eaf6f3;
  color: var(--accent-dark);
}

.validation-badge.review {
  border-color: #e0c26e;
  background: #fff8df;
  color: #7c5b00;
}

.validation-badge.rejected {
  border-color: #e2a09a;
  background: #fff1ef;
  color: #8c2d24;
}

.validation-status-with-reason {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.validation-badge.has-reason {
  cursor: help;
  outline-offset: 3px;
}

.validation-reason-tooltip {
  display: none;
  width: min(300px, 72vw);
  margin-top: 9px;
  padding: 11px 13px;
  border: 1px solid #e2a09a;
  border-radius: 9px;
  background: #fffaf9;
  box-shadow: 0 10px 28px rgba(61, 34, 30, 0.18);
  color: #5f2822;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-transform: none;
  white-space: normal;
}

.validation-reason-tooltip strong {
  display: block;
  margin-bottom: 3px;
  color: #8c2d24;
}

.validation-status-with-reason:hover .validation-reason-tooltip,
.validation-status-with-reason:focus-within .validation-reason-tooltip {
  display: block;
}

.validation-badge.duplicate {
  border-color: #c5a76a;
  background: #fff7e7;
  color: #765817;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ecef;
}

.progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.progress-steps span {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.progress-steps span.current {
  border-color: #8bbdb7;
  color: var(--accent-dark);
}

.progress-steps span.done {
  border-color: #8bbdb7;
  background: #eaf6f3;
  color: var(--accent-dark);
}

.validation-summary {
  margin: 0;
  color: var(--muted);
}

.document-system-output {
  grid-template-columns: 120px 1fr;
  margin: 0;
  padding-top: 4px;
}

.score {
  margin: 0;
  color: var(--accent-dark);
  font-size: 56px;
  font-weight: 700;
}

dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 14px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}

.form-page {
  max-width: 760px;
}

.form-page.wide {
  max-width: 960px;
}

.form-card p {
  display: grid;
  gap: 6px;
}

.auth-page {
  min-height: 520px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 34px;
  align-items: center;
  min-height: 640px;
  padding: 56px 6vw;
  background:
    linear-gradient(120deg, rgba(18, 49, 47, 0.95), rgba(34, 49, 58, 0.86)),
    url("https://images.unsplash.com/photo-1551836022-d5d88e9218df?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
}

.auth-intro {
  max-width: 760px;
  color: #ffffff;
}

.auth-intro h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.05;
}

.auth-intro p {
  color: #e6efed;
  font-size: 18px;
}

.auth-points {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.auth-points div {
  display: grid;
  gap: 4px;
  max-width: 620px;
  border-left: 4px solid var(--gold-soft);
  background: rgba(255, 255, 255, 0.1);
  padding: 14px 16px;
}

.auth-points span {
  color: #dbe8e5;
}

.auth-card {
  display: grid;
  gap: 16px;
  max-width: 520px;
  width: 100%;
  justify-self: end;
}

.auth-card h2 {
  margin: 0;
  font-size: 28px;
}

.google-button {
  width: 100%;
  min-height: 52px;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(16, 24, 32, 0.08);
}

.google-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f2f5f7;
  color: #1a73e8;
  font-weight: 900;
}

.auth-note {
  border-radius: 6px;
  background: #edf7f5;
  color: var(--muted);
  padding: 12px 14px;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
}

.helptext {
  color: var(--muted);
  font-size: 13px;
}

.messages {
  padding: 12px 6vw 0;
}

.message {
  border-radius: 6px;
  padding: 10px 14px;
  background: #e8f5f3;
}

.list {
  padding-left: 18px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 34px;
  align-items: start;
}

.feature-list {
  display: grid;
  gap: 12px;
}

.feature-list div {
  display: grid;
  gap: 4px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  padding: 16px 18px;
}

.feature-list span {
  color: var(--muted);
}

.tag-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag-grid span {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 10px 12px;
  font-weight: 700;
}

.cta-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  background: #12312f;
  color: #ffffff;
}

.price-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.price-card.featured {
  border-color: var(--gold-soft);
  background: #fffaf0;
}

.price {
  margin: 0;
  color: var(--clay);
  font-size: 26px;
  font-weight: 800;
}

.lender-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 22px;
  padding: 42px 6vw;
}

.lender-search {
  display: grid;
  gap: 24px;
  padding: 36px 6vw 0;
}

.search-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
}

.search-card label {
  font-size: 20px;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-card p {
  margin: 0;
  color: var(--muted);
}

.match-results {
  display: grid;
  gap: 14px;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.match-card {
  display: grid;
  gap: 12px;
  border: 1px solid #b9d8d3;
  border-radius: 8px;
  background: #f8fcfb;
  padding: 18px;
}

.match-card h3 {
  margin: 0;
}

.match-card p {
  margin: 0;
}

.match-score {
  color: var(--accent-dark);
  font-weight: 800;
}

.match-card dl {
  grid-template-columns: 110px 1fr;
}

.lender-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
}

.lender-card-head {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  align-items: center;
}

.partner-category-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 7px;
  border-radius: 999px;
  background: #e9f2f0;
  padding: 5px 9px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.partner-category-badge.digital_lender { background: #e9eefb; color: #344f91; }
.partner-category-badge.microfinance { background: #fff2d9; color: #805d14; }
.partner-category-badge.hire_purchase { background: #f1e9f8; color: #674283; }

.partner-group label span {
  display: grid;
  gap: 2px;
}

.partner-group label span small {
  color: var(--muted);
  font-size: 11px;
}

.lender-card-head h2 {
  margin: 0 0 6px;
}

.lender-card-head p {
  margin: 0;
  color: var(--muted);
}

.lender-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef6f4;
  color: var(--accent-dark);
  font-size: 24px;
  font-weight: 900;
}

.lender-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  background: #ffffff;
}

.lender-meta,
.lender-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lender-meta span,
.lender-links a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 14px;
}

.lender-links .icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--accent-dark);
}

.lender-links .icon-link svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.lender-links .icon-link:hover {
  border-color: #b9d8d3;
  background: #eef6f4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.product-tree {
  display: grid;
  gap: 10px;
}

.product-tree h3 {
  margin: 0;
}

.product-node {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.product-node summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
}

.product-node summary::-webkit-details-marker {
  display: none;
}

.product-node summary span {
  font-weight: 800;
}

.product-node summary strong {
  color: var(--accent-dark);
  white-space: nowrap;
}

.product-node[open] summary {
  border-bottom: 1px solid var(--line);
  background: #eef6f4;
}

.product-details {
  padding: 14px 16px 16px;
}

.product-details dl {
  grid-template-columns: 150px 1fr;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) repeat(3, minmax(150px, 0.6fr));
  gap: 30px;
  padding: 44px 6vw 22px;
  border-top: 1px solid var(--line);
  background: #101820;
  color: #d8e4e2;
}

.site-footer p {
  max-width: 560px;
}

.footer-company {
  display: grid;
  gap: 8px;
}

.footer-brand img {
  width: 180px;
  height: auto;
}

.footer-brand {
  display: inline-flex;
  width: fit-content;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
}

.footer-meta {
  color: #9eb3b0;
  font-size: 14px;
}

.footer-column {
  display: grid;
  gap: 9px;
  align-content: start;
}

.footer-column h2 {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 14px;
  text-transform: uppercase;
}

.footer-column a {
  color: #d8e4e2;
}

.footer-column a:hover {
  color: #ffffff;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  color: #9eb3b0;
  font-size: 13px;
  flex-wrap: wrap;
}

.ai-help {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.ai-help summary {
  list-style: none;
}

.ai-help summary::-webkit-details-marker {
  display: none;
}

.ai-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(16, 24, 32, 0.22);
  user-select: none;
}

.ai-help-card {
  width: min(320px, calc(100vw - 44px));
  border: 1px solid #b9d8d3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(16, 24, 32, 0.18);
  padding: 16px;
}

.ai-help:not([open]) .ai-help-card {
  display: none;
}

.ai-help[open] .ai-help-button {
  background: #22313a;
}

.ai-help-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.ai-help-header span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.chat-thread {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.chat-message {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.chat-message.assistant {
  background: #eef6f4;
}

.chat-message.user {
  justify-self: end;
  background: #172026;
  color: #ffffff;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.chat-input input {
  min-height: 40px;
}

.chat-input button {
  min-height: 40px;
}

.ai-help-card p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .site-header,
  .page-head,
  .site-footer,
  .split-section,
  .cta-band {
    align-items: flex-start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .brand img {
    width: 152px;
  }

  nav {
    gap: 10px;
    width: 100%;
  }

  nav a,
  nav form,
  nav .button {
    min-height: 36px;
  }

  .dashboard-grid,
  .content-grid,
  .pricing-grid,
  .contact-layout,
  .profile-hero,
  .profile-workspace,
  .verification-grid,
  .steps,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    min-height: auto;
    padding: 40px 6vw;
  }

  .auth-intro h1 {
    font-size: 36px;
  }

  .auth-intro p {
    font-size: 16px;
  }

  .auth-card {
    justify-self: stretch;
  }

  .form-page {
    width: 100%;
  }

  .google-button {
    min-height: 56px;
  }

  .document-progress-head {
    display: grid;
  }

  .validation-badge {
    width: fit-content;
  }

  .progress-steps {
    grid-template-columns: 1fr;
  }

  .lender-card-head {
    grid-template-columns: 1fr;
  }

  .lender-directory,
  .match-grid,
  .search-row {
    grid-template-columns: 1fr;
  }

  .product-node summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-node summary strong {
    white-space: normal;
  }

  .product-details dl {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero h1,
  .profile-hero h1,
  .page-head h1,
  .form-page h1 {
    font-size: 38px;
  }

  .section-heading h2,
  .split-section h2,
  .cta-band h2 {
    font-size: 28px;
  }

  .ai-help {
    right: 14px;
    bottom: 14px;
  }
}
