/* =========================================================================
   YourFICOFixed — Design System
   A clean, trustworthy fintech visual language built from scratch.
   Primary: confident blue. Type: Figtree (warm geometric sans).
   Numerics: tabular for data legibility. Single positive accent (green)
   used sparingly for "no-impact / trust" signals only.
   ========================================================================= */

:root {
  /* ---- Brand & semantic color ---- */
  --primary:        #0B5FFF;
  --primary-600:    #0A50DB;
  --primary-700:    #0840AE;
  --primary-050:    #EEF3FF;
  --primary-100:    #DDE8FF;

  --ink:            #0B1B3B;   /* headings / strongest text */
  --ink-2:          #364463;   /* body text */
  --ink-3:          #5A6A89;   /* secondary text */
  --ink-4:          #8593AD;   /* muted / captions */

  --positive:       #0E9F6E;   /* trust / no-impact, used sparingly */
  --positive-050:   #E7F7F0;
  --warning:        #B7791F;
  --warning-050:    #FBF4E6;

  --surface:        #FFFFFF;
  --surface-2:      #F6F8FC;   /* page sections */
  --surface-3:      #EEF2F9;   /* inset / hover */
  --border:         #E4EAF3;
  --border-2:       #D3DCEA;
  --ring:           rgba(11, 95, 255, 0.28);

  /* ---- Type ---- */
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ---- Radius ---- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* ---- Shadow (soft, low-contrast — trustworthy not flashy) ---- */
  --sh-xs: 0 1px 2px rgba(11, 27, 59, 0.05);
  --sh-sm: 0 2px 8px rgba(11, 27, 59, 0.06);
  --sh-md: 0 8px 24px rgba(11, 27, 59, 0.08);
  --sh-lg: 0 18px 50px rgba(11, 27, 59, 0.12);
  --sh-primary: 0 8px 22px rgba(11, 95, 255, 0.26);

  /* ---- Layout ---- */
  --maxw: 1160px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--surface);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.08; margin: 0; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "lnum" 1; }

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary); margin: 0 0 16px;
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  --bg: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 16px; line-height: 1;
  padding: 15px 24px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .14s ease, box-shadow .2s ease, background .18s ease, border-color .18s ease, color .18s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--sh-primary); }
.btn--primary:hover { background: var(--primary-600); box-shadow: 0 10px 26px rgba(11,95,255,.32); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--border-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--ink-4); }
.btn--quiet { background: transparent; color: var(--primary); padding-inline: 8px; }
.btn--quiet:hover { color: var(--primary-700); }
.btn--lg { font-size: 17px; padding: 18px 30px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* =========================================================================
   Chips / tags / badges
   ========================================================================= */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--border-2);
  padding: 7px 13px; border-radius: var(--r-pill);
}
.chip--positive { color: #0a7d56; background: var(--positive-050); border-color: #BFEBD9; }
.tag-bestfor {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .01em;
  color: var(--primary-700); background: var(--primary-050);
  padding: 5px 11px; border-radius: var(--r-pill);
}

.trustline {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 600; color: #0a7d56;
}
.trustline svg { flex: none; }

/* =========================================================================
   Cards & surfaces
   ========================================================================= */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}

/* focus utility for inputs */
.field-focus:focus-visible { outline: 3px solid var(--ring); outline-offset: 1px; }

/* =========================================================================
   Forms
   ========================================================================= */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--ink-3); }
.input, .select {
  width: 100%; font-family: inherit; font-size: 16.5px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--border-2);
  border-radius: var(--r-md); padding: 14px 15px; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--ink-4); }
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.input.is-invalid { border-color: #DC4B4B; box-shadow: 0 0 0 4px rgba(220,75,75,.15); }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 16.5px; pointer-events: none; }
.input-prefix .input { padding-left: 30px; }
.err-msg { font-size: 13px; color: #C53B3B; font-weight: 600; display: flex; gap: 6px; align-items: center; }

/* selectable option cards (loan purpose, credit tier) */
.opt-grid { display: grid; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 13px; text-align: left;
  padding: 16px; border: 1.5px solid var(--border-2); border-radius: var(--r-md);
  background: var(--surface); cursor: pointer; transition: all .15s ease; width: 100%;
}
.opt:hover { border-color: var(--primary); background: var(--primary-050); }
.opt.is-selected { border-color: var(--primary); background: var(--primary-050); box-shadow: 0 0 0 1px var(--primary) inset; }
.opt .opt-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--primary); }
.opt.is-selected .opt-ic { background: var(--primary); color: #fff; }
.opt .opt-title { display: block; font-weight: 700; color: var(--ink); font-size: 15.5px; }
.opt .opt-sub { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }

/* =========================================================================
   Animations
   ========================================================================= */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scan {
  0% { transform: translateY(-100%); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(220%); opacity: 0; }
}
/* Entrance reveals are intentionally omitted: any "from opacity:0" entrance is
   invisible when animations are paused (backgrounded tab, print, PDF export).
   Content rests in its visible end-state. Motion lives in interactions instead
   (hover, slider, accordion, loading scan, nav blur). .rise is kept as an inert
   hook in case a gated, active-only reveal is added later. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =========================================================================
   Misc utility
   ========================================================================= */
.muted { color: var(--ink-3); }
.tiny { font-size: 13px; line-height: 1.5; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.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; }
