/* ==========================================================================
   Fara — design system
   ========================================================================== */
:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --ink: #0f2133;
  --ink-soft: #33485c;
  --muted: #6b7e90;
  --line: #e1e8ef;
  --line-strong: #cdd8e2;

  --brand: #123a5e;        /* Fara navy */
  --brand-700: #0d2c48;
  --brand-600: #16466f;
  --accent: #2f80c2;       /* action blue */
  --accent-600: #246aa3;
  --accent-soft: #e8f1f9;
  --gold: #c79a4b;

  --green: #1a7f4b;
  --green-soft: #e3f4ea;
  --yellow: #b5840b;
  --yellow-soft: #fbf1d6;
  --red: #c0392b;
  --red-soft: #fbe6e3;
  --slate-soft: #eef2f6;

  --shadow-sm: 0 1px 2px rgba(16, 42, 67, .06), 0 1px 3px rgba(16, 42, 67, .05);
  --shadow-md: 0 4px 14px rgba(16, 42, 67, .08);
  --shadow-lg: 0 18px 48px rgba(16, 42, 67, .18);

  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 244px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* per-portal accent (overridden for borrower white-label) */
  --portal: var(--brand);
  --portal-accent: var(--accent);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 15px; font-size: 14px; font-weight: 600; line-height: 1;
  background: var(--surface-2); color: var(--ink-soft); border-color: var(--line-strong);
  transition: .15s ease; white-space: nowrap;
}
.btn:hover { background: #eef2f6; }
.btn-primary { background: var(--portal-accent); color: #fff; border-color: var(--portal-accent); }
.btn-primary:hover { filter: brightness(1.07); background: var(--portal-accent); }
.btn-dark { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-dark:hover { background: var(--brand-700); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--slate-soft); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ----------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--slate-soft); color: var(--ink-soft); white-space: nowrap;
}
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--accent-soft); color: var(--accent-600); }
.badge.gold { background: #f6eed9; color: #97732a; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

.light { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.light .orb { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.light.green .orb { background: #1fae63; }
.light.yellow .orb { background: #e0a30c; }
.light.red .orb { background: #e0503e; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px 22px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 15px; }

/* ============================================================ login screen */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
}
.auth-hero {
  background: radial-gradient(1200px 600px at -10% -10%, #1d5685 0%, var(--brand) 45%, var(--brand-700) 100%);
  color: #eaf2f9; padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-hero::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(199,154,75,.25), transparent 60%);
}
.auth-hero .logo-lg { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; color: #fff; }
.auth-hero h1 { color: #fff; font-size: 40px; line-height: 1.1; margin: 0 0 16px; max-width: 16ch; }
.auth-hero p { color: #cfe0ee; font-size: 16px; max-width: 46ch; }
.auth-points { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; color: #dcebf9; }
.auth-point .ic { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: none; }
.auth-point b { color: #fff; display: block; font-size: 14.5px; }
.auth-point span { color: #b9d0e3; font-size: 13px; }
.auth-foot { color: #9fbdd6; font-size: 12.5px; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { font-size: 24px; }
.auth-box .sub { color: var(--muted); margin: 6px 0 26px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); transition: .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-error { background: var(--red-soft); color: var(--red); padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }

.demo-accounts { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.demo-accounts .lbl { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-chip {
  text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px;
  padding: 9px 11px; transition: .15s; display: flex; flex-direction: column; gap: 1px;
}
.demo-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.demo-chip b { font-size: 13px; color: var(--ink); }
.demo-chip span { font-size: 11.5px; color: var(--muted); }

/* ============================================================== app shell */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--brand); color: #cfe0ee; padding: 18px 14px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 8px 10px 18px; }
.sidebar .brand .mark { width: 34px; height: 34px; border-radius: 9px; background: #fff; display: grid; place-items: center; flex: none; }
.sidebar .brand .name { color: #fff; font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.sidebar .brand .name small { display: block; font-size: 10.5px; font-weight: 500; color: #9cc0dd; letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  color: #bcd4e8; font-weight: 550; font-size: 14px; transition: .15s;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.nav a .ic { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav a .pill { margin-left: auto; background: var(--gold); color: #3a2c08; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; padding: 10px; }
.usercard { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.07); }
.usercard .meta { overflow: hidden; }
.usercard .meta b { color: #fff; font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usercard .meta span { color: #9cc0dd; font-size: 11.5px; text-transform: capitalize; }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12.5px; font-weight: 700; flex: none; }
.avatar.lg { width: 46px; height: 46px; font-size: 16px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 26px; position: sticky; top: 0; z-index: 30;
}
.topbar .crumb { font-weight: 650; font-size: 16px; }
.topbar .crumb small { color: var(--muted); font-weight: 500; font-size: 13px; display: block; }
.topbar .spacer { flex: 1; }
.searchbox { position: relative; }
.searchbox input { width: 260px; padding: 8px 12px 8px 34px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.searchbox input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.searchbox .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-soft); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .count { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }

.content { padding: 26px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }

/* --------------------------------------------------------------- stat row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat .k { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.stat .v { font-size: 27px; font-weight: 700; margin-top: 8px; letter-spacing: -.02em; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-600); margin-left: auto; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-side { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }

/* ----------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: .1s; cursor: pointer; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.dealno { font-weight: 650; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.cellsub { font-size: 12px; color: var(--muted); }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ic { width: 54px; height: 54px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 14px; color: var(--line-strong); }

/* ------------------------------------------------------------ deal detail */
.detail-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.detail-head .title h1 { font-size: 22px; }
.detail-head .title .meta { color: var(--muted); margin-top: 4px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.detail-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.factgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.fact { background: var(--surface); padding: 14px 16px; }
.fact .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.fact .v { font-size: 17px; font-weight: 650; margin-top: 4px; }
.fact .v small { font-size: 12px; color: var(--muted); font-weight: 500; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0 18px; }
.tab { padding: 10px 15px; border: none; background: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--portal-accent); border-bottom-color: var(--portal-accent); }

/* score panel */
.score-ring { display: flex; align-items: center; gap: 16px; }
.ring { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none; }
.ring .inner { width: 60px; height: 60px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 21px; font-weight: 750; }
.score-notes { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.score-notes li { font-size: 13px; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.score-notes li::before { content: "•"; color: var(--muted); }

/* --------------------------------------------------------------- chat box */
.chat { display: flex; flex-direction: column; height: 540px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; background: var(--surface-2); }
.msg { display: flex; gap: 10px; max-width: 84%; }
.msg .bubble { padding: 10px 14px; border-radius: 13px; font-size: 13.5px; box-shadow: var(--shadow-sm); white-space: pre-wrap; }
.msg.them .bubble { background: #fff; border-top-left-radius: 4px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble { background: var(--portal-accent); color: #fff; border-top-right-radius: 4px; }
.msg.ai .bubble { background: #fff; border: 1px solid var(--accent-soft); border-top-left-radius: 4px; }
.msg .who { font-size: 11px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.msg .bubble strong { font-weight: 700; }
.chat-ai-avatar { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--brand)); display: grid; place-items: center; color: #fff; flex: none; font-weight: 700; font-size: 13px; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: #fff; }
.chat-input textarea { flex: 1; resize: none; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; height: 44px; max-height: 120px; }
.chat-input textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.typing { display: inline-flex; gap: 3px; align-items: center; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* checklist */
.doc-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: none; }
.doc-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); flex: none; }
.doc-row .info { flex: 1; min-width: 0; }
.doc-row .info b { font-size: 13.5px; display: block; }
.doc-row .info span { font-size: 12px; color: var(--muted); }
.doc-actions { display: flex; gap: 6px; }

/* progress bar */
.progress { height: 7px; background: var(--slate-soft); border-radius: 999px; overflow: hidden; }
.progress .fill { height: 100%; background: var(--portal-accent); border-radius: 999px; transition: width .4s; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 24px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--portal-accent); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 14px; bottom: -2px; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li .t { font-size: 12px; color: var(--muted); }

/* ----------------------------------------------------------- term sheet */
.termsheet { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.ts-head { padding: 26px 30px; color: #fff; }
.ts-head .brand { font-size: 22px; font-weight: 700; }
.ts-head .tag { opacity: .85; font-size: 13px; margin-top: 2px; }
.ts-head .doc-type { margin-top: 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; opacity: .85; }
.ts-head h2 { color: #fff; font-size: 24px; margin-top: 2px; }
.ts-body { padding: 26px 30px; }
.ts-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 8px 0 20px; }
.ts-term { background: #fff; padding: 14px 16px; }
.ts-term .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ts-term .v { font-size: 18px; font-weight: 700; margin-top: 3px; }
.ts-conditions { margin: 6px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 13px; }
.ts-conditions li { margin-bottom: 5px; }
.ts-foot { border-top: 1px dashed var(--line); margin-top: 22px; padding-top: 18px; color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
textarea.input { resize: vertical; min-height: 80px; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------------------------ modal */
.overlay { position: fixed; inset: 0; background: rgba(15, 33, 51, .45); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ------------------------------------------------------------------ toast */
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--brand); color: #fff; padding: 13px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 340px; display: flex; gap: 10px; align-items: flex-start; animation: slidein .25s ease; }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes slidein { from { transform: translateY(12px); opacity: 0; } }

/* ----------------------------------------------------------- lending page */
.lp-wrap { min-height: 100vh; background: #fff; }
.lp-hero { color: #fff; padding: 26px 0 90px; }
.lp-nav { max-width: 1080px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.lp-nav .brand { font-size: 20px; font-weight: 700; }
.lp-hero-body { max-width: 1080px; margin: 0 auto; padding: 60px 24px 0; }
.lp-hero-body h1 { color: #fff; font-size: 44px; max-width: 18ch; line-height: 1.08; }
.lp-hero-body p { font-size: 18px; opacity: .9; max-width: 50ch; margin-top: 16px; }
.lp-quote { max-width: 1080px; margin: -64px auto 0; padding: 0 24px; }
.lp-quote-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lp-section { max-width: 1080px; margin: 0 auto; padding: 56px 24px; }
.lp-section h2 { font-size: 28px; text-align: center; }
.lp-section .lead { text-align: center; color: var(--muted); margin: 8px auto 0; max-width: 56ch; }
.lp-programs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.lp-prog { border: 1px solid var(--line); border-radius: 14px; padding: 22px; transition: .18s; }
.lp-prog:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.lp-prog h3 { font-size: 17px; }
.lp-prog .ptypes { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.lp-prog .specs { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; }
.lp-prog .spec { display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.lp-prog .spec b { font-weight: 650; }
.lp-cta { background: var(--surface-2); border-radius: 16px; padding: 40px; text-align: center; margin-top: 20px; }
.lp-foot { border-top: 1px solid var(--line); padding: 26px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.lp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 560px; margin: 22px auto 0; text-align: left; }

/* ---------------------------------------------------------------- utility */
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.gap-sm { gap: 6px; }
.mt { margin-top: 16px; } .mt-sm { margin-top: 8px; } .mb { margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .stats, .ts-terms, .lp-programs, .lp-quote-card { grid-template-columns: 1fr 1fr; }
  .factgrid { grid-template-columns: 1fr 1fr; }
  .grid-side, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; z-index: 60; transition: left .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .menu-btn { display: grid !important; }
}
@media (max-width: 560px) {
  .stats, .factgrid, .ts-terms, .lp-programs, .lp-quote-card, .demo-grid, .form-grid, .lp-form { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .searchbox input { width: 150px; }
  .lp-hero-body h1 { font-size: 32px; }
}
.menu-btn { display: none; }
