/* YT Finance — design system */
:root {
  /* Verdant — a layered money-green palette.
     brand: forest → pine, accent: vivid emerald, spark: electric lime. */
  --brand-900: #022C22;   /* emerald-950 · deepest forest */
  --brand-800: #064E3B;   /* emerald-900 · rich forest */
  --brand-700: #065F46;   /* emerald-800 · pine */
  --brand-50:  #ECFDF5;   /* emerald-50 · mint cream */
  --accent: #10B981;      /* emerald-500 · the workhorse */
  --accent-dark: #059669; /* emerald-600 */
  --accent-light: #34D399;/* emerald-400 · for hovers / brighter accents */
  --accent-spark: #84CC16;/* lime-500 · creative pop for gradients & glows */
  --warning: #F59E0B;
  --danger: #EF4444;
  --bg: #F1F5F9;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; background: transparent; }
code { background: #F1F5F9; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; transition: all .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--brand-900); color: white; }
.btn-primary:hover { background: var(--brand-800); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--brand-50); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Forms */
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 14px;
  background: white; color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand-700);
  box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.12);
}
label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--muted); margin-bottom: 6px;
}
.form-group { margin-bottom: 16px; }

/* Cards */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}

/* Badges */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; text-transform: capitalize;
}
.badge-success { background: rgba(16, 185, 129, 0.12); color: var(--accent-dark); }
.badge-warning { background: rgba(245, 158, 11, 0.14); color: #B45309; }
.badge-danger { background: rgba(239, 68, 68, 0.12); color: #B91C1C; }
.badge-muted { background: #F1F5F9; color: var(--muted); }

/* Tables — GLOBAL alignment guarantees.
   Every dashboard table (wallet, applications, borrowers, repayments,
   billing, admin lenders/loans/audit, etc.) now uses:
     - table-layout: fixed   →  browser MUST honour <colgroup> widths
     - white-space: nowrap   →  cells can't wrap to two lines and break
                                row rhythm (the bug Stephen flagged
                                across every table)
     - overflow + text-overflow: ellipsis → long content truncates with '…'
                                instead of forcing the column wider
   Combined with a <colgroup> on each table HTML, this makes every
   column physically respect its declared width. No more shifted data. */
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
th { background: #F8FAFC; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFBFC; }

/* App shell */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--brand-900); color: white;
  padding: 24px 0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .logo { padding: 0 24px 28px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.sidebar .logo span { color: var(--accent); }
.sidebar .logo img.brand-mark { height: 30px; width: auto; display: block; }
.sidebar .logo .wordmark { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: rgba(255,255,255,0.9); }
.sidebar nav { flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 24px; color: rgba(255,255,255,0.7);
  font-size: 14px; font-weight: 500; border-left: 3px solid transparent;
}
.sidebar nav a:hover { color: white; background: rgba(255,255,255,0.05); text-decoration: none; }
.sidebar nav a.active { color: white; background: rgba(255,255,255,0.08); border-left-color: var(--accent); }
.sidebar .foot {
  padding: 20px 24px; border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px; color: rgba(255,255,255,0.6);
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; background: white; border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 20px; font-weight: 700; }
.user-chip { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--brand-700);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
}

.content { padding: 32px; }
.content > .page { display: none; }
.content > .page.active { display: block; }
.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.page-header h2 { font-size: 24px; font-weight: 700; }
.page-header p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* KPI cards */
/* 2026-06-23: minmax tightened from 200 → 160 so 6 KPI cards fit per row
   on standard desktop widths (~1200px). Previously the Overview's 6th
   card ("Collected") was orphaned on its own row and looked unbalanced. */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.kpi {
  background: white; border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.kpi .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 8px; color: var(--brand-900); letter-spacing: -0.01em; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.accent .value { color: var(--accent-dark); }

/* Filled hero KPI — emerald gradient, white text. Use for the single most
   important metric on a dashboard (wallet balance, etc.) */
.kpi.emerald-hero {
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 55%, var(--accent-spark) 130%);
  color: white;
  border: none;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.32), 0 0 0 1px rgba(132, 204, 22, 0.1);
}
.kpi.emerald-hero .label { color: rgba(255, 255, 255, 0.85); }
.kpi.emerald-hero .value { color: white; }
.kpi.emerald-hero .sub { color: rgba(255, 255, 255, 0.8); }

/* Subtle category accents — coloured top stripe on white KPI cards */
.kpi.themed-brand { border-top: 3px solid var(--brand-700); }
.kpi.themed-emerald { border-top: 3px solid var(--accent); }
.kpi.themed-warning { border-top: 3px solid var(--warning); }
.kpi.themed-danger { border-top: 3px solid var(--danger); }

/* Brand welcome banner — sits above the KPI grid on the lender dashboard */
.dashboard-welcome {
  background:
    radial-gradient(circle at 100% 0%, rgba(132, 204, 22, 0.32) 0%, transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(16, 185, 129, 0.25) 0%, transparent 50%),
    linear-gradient(135deg, var(--brand-900) 0%, var(--brand-800) 60%, var(--brand-700) 100%);
  color: white;
  padding: 24px 28px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: 0 12px 36px rgba(6, 78, 59, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.dashboard-welcome::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(132, 204, 22, 0.18) 0%, transparent 65%);
  pointer-events: none;
}
.dashboard-welcome::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.dashboard-welcome .greet { z-index: 1; position: relative; }
.dashboard-welcome h2 {
  font-size: 22px; font-weight: 800; margin: 0;
  letter-spacing: -0.02em; color: white;
}
.dashboard-welcome p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px; margin-top: 6px; max-width: 540px;
}
.dashboard-welcome .stat-pill {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: left;
  min-width: 150px;
  z-index: 1;
  position: relative;
  backdrop-filter: blur(6px);
}
.dashboard-welcome .stat-pill .lbl {
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: rgba(255, 255, 255, 0.7); font-weight: 600;
}
.dashboard-welcome .stat-pill .val {
  font-size: 22px; font-weight: 700; margin-top: 4px; color: white;
}

/* Subtle coloured dot for section headings */
.section-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
  margin-right: 10px; vertical-align: middle;
}

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(11, 37, 69, 0.55);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: white; border-radius: var(--radius);
  padding: 28px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto;
}
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.modal .sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* Auth tabs (inside modal) */
.auth-tabs {
  display: flex; gap: 4px; background: var(--bg); padding: 4px;
  border-radius: var(--radius-sm); margin-bottom: 24px;
}
.auth-tabs button {
  flex: 1; padding: 8px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 13px; color: var(--muted); transition: all .15s;
}
.auth-tabs button.active { background: white; color: var(--brand-900); box-shadow: var(--shadow-sm); }

/* Landing page */
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px; background: white; border-bottom: 1px solid var(--border);
}
.landing-nav .logo { font-size: 22px; font-weight: 800; color: var(--brand-900); letter-spacing: -0.02em; }
.landing-nav .logo span { color: var(--accent); }
.hero {
  padding: 80px 48px 60px; text-align: center;
  background: linear-gradient(180deg, white, var(--bg));
}
.hero h1 {
  font-size: 48px; line-height: 1.1; max-width: 820px;
  margin: 0 auto 20px; font-weight: 800; letter-spacing: -0.025em;
  color: var(--brand-900);
}
.hero p {
  font-size: 18px; color: var(--muted);
  max-width: 600px; margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features { padding: 60px 48px; max-width: 1100px; margin: 0 auto; }
.features h2 { text-align: center; font-size: 32px; font-weight: 800; margin-bottom: 12px; color: var(--brand-900); }
.features .lede { text-align: center; color: var(--muted); margin-bottom: 40px; }
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature {
  background: white; padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.feature .icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: rgba(11, 37, 69, 0.06); color: var(--brand-900);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; margin-bottom: 16px;
}
.feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14px; }

.pricing { padding: 60px 48px; max-width: 720px; margin: 0 auto; text-align: center; }
.pricing h2 { font-size: 32px; font-weight: 800; color: var(--brand-900); }
.pricing-card {
  background: white; border-radius: var(--radius); padding: 40px;
  border: 2px solid var(--accent); margin-top: 24px;
}
.pricing-card .price { font-size: 56px; font-weight: 800; color: var(--brand-900); letter-spacing: -0.03em; }
.pricing-card .price small { font-size: 16px; color: var(--muted); font-weight: 500; }

.footer { padding: 32px 48px; background: var(--brand-900); color: rgba(255,255,255,0.7); text-align: center; font-size: 14px; }

/* Tabs */
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 20px; overflow-x: auto;
}
.tabs button {
  padding: 11px 18px; color: var(--muted); font-weight: 600;
  font-size: 14px; border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs button.active { color: var(--brand-900); border-bottom-color: var(--accent); }

/* Toast — DISMISSIBLE on click. Previously had pointer-events:none which
   meant long error messages disappeared after 3s with no way to keep them
   visible or copy the text. Now: click to dismiss + cursor:pointer. */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--brand-900); color: white;
  padding: 12px 20px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); z-index: 200; font-size: 14px;
  opacity: 0; transform: translateY(10px); transition: all .2s;
  cursor: pointer;
  max-width: min(420px, calc(100vw - 48px));
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.success { background: var(--accent-dark); }
.toast.error { background: var(--danger); }

/* Empty state */
.empty-state { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty-state .icon { font-size: 36px; margin-bottom: 12px; opacity: 0.5; }

/* Utility */
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.text-muted { color: var(--muted); }
.text-success { color: var(--accent-dark); }
.text-danger { color: var(--danger); }
.text-right { text-align: right; }

/* Card with no padding (for tables) */
.card.flush { padding: 0; }
.card.flush > h3 { padding: 20px 24px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 700; }

@media (max-width: 800px) {
  /* Mobile sidebar — show first 2 chars as a glyph instead of font-size:0
     that previously hid everything. The text-only nav ("Dashboard",
     "Borrowers"…) used to collapse into a blank 64px green bar with no
     way to navigate. This rule keeps the layout compact AND keeps each
     link tappable + identifiable by its first letter or two. */
  .sidebar { width: 76px; }
  .sidebar .logo {
    font-size: 0;
    padding-left: 0; padding-right: 0;
    text-align: center; justify-content: center;
  }
  .sidebar .logo::before {
    content: "YT";
    font-size: 17px; font-weight: 800; letter-spacing: -0.03em;
    color: var(--accent-spark);
  }
  .sidebar nav a {
    font-size: 0;
    padding: 14px 8px;
    text-align: center; justify-content: center;
    position: relative;
  }
  .sidebar nav a::before {
    content: attr(data-page);
    display: inline-block;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    max-width: 60px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
  }
  .sidebar .foot { font-size: 0; padding-left: 0; padding-right: 0; }
  .landing-nav { padding: 16px 20px; }
  .hero { padding: 60px 20px 40px; }
  .hero h1 { font-size: 32px; }
  .features, .pricing { padding: 40px 20px; }
  .content { padding: 20px; }
  .topbar { padding: 14px 20px; }
  /* Tables can pan horizontally instead of being sliced into "…" */
  .card.flush { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card.flush > table { min-width: 600px; }
}

/* ============================================================
   Polish layer — entrance motion, micro-interactions, focus craft
   ============================================================ */

/* --- Global selection & scrollbar tint --- */
::selection { background: var(--accent-spark); color: var(--brand-900); }

* { scrollbar-width: thin; scrollbar-color: rgba(6, 95, 70, 0.35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(6, 95, 70, 0.28); border-radius: 999px;
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(6, 95, 70, 0.5); background-clip: padding-box; border: 2px solid transparent; }

/* --- Keyframes --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes heroSheen {
  0% { transform: translateX(-30%) rotate(8deg); }
  100% { transform: translateX(130%) rotate(8deg); }
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}
@keyframes rowEnter {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Entrance animations on dashboard surfaces --- */
.card, .kpi, .page-header, .section-header, .dashboard-welcome {
  animation: fadeUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.kpi-grid .kpi:nth-child(1) { animation-delay: 40ms; }
.kpi-grid .kpi:nth-child(2) { animation-delay: 100ms; }
.kpi-grid .kpi:nth-child(3) { animation-delay: 160ms; }
.kpi-grid .kpi:nth-child(4) { animation-delay: 220ms; }
.kpi-grid .kpi:nth-child(5) { animation-delay: 280ms; }
.kpi-grid .kpi:nth-child(6) { animation-delay: 340ms; }

/* Page transitions */
.page.active { animation: fadeUp 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* Row entrance utility (JS may opt in) */
.row-enter { animation: rowEnter 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* --- Card refinements --- */
.card {
  box-shadow: 0 1px 2px rgba(2, 44, 34, 0.05), 0 2px 6px rgba(2, 44, 34, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(2, 44, 34, 0.06), 0 8px 24px rgba(2, 44, 34, 0.07);
}

/* --- KPI hover lift + emerald-hero sheen --- */
.kpi { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.kpi:hover {
  transform: translateY(-1px) scale(1.005);
  box-shadow: 0 1px 2px rgba(2, 44, 34, 0.06), 0 6px 18px rgba(2, 44, 34, 0.06);
}
.kpi.emerald-hero { position: relative; overflow: hidden; }
.kpi.emerald-hero::after {
  content: ""; position: absolute; top: -50%; left: 0;
  width: 40%; height: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%);
  animation: heroSheen 4.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}
.kpi.emerald-hero:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 32px rgba(16, 185, 129, 0.38), 0 0 0 1px rgba(132, 204, 22, 0.18);
}

/* --- Buttons: lift, sheen, active press, focus ring --- */
.btn {
  position: relative; overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(2, 44, 34, 0.12); }
.btn:active { transform: translateY(0); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12); }
.btn-primary::before,
.btn-accent::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg); transition: left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.btn-primary:hover::before,
.btn-accent:hover::before { left: 130%; }

/* Universal focus ring */
:focus-visible {
  outline: 2px solid var(--accent-spark);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.sidebar nav a:focus-visible, .tabs button:focus-visible, .auth-tabs button:focus-visible {
  outline: 2px solid var(--accent-spark); outline-offset: 2px;
}

/* --- Form fields --- */
input, select, textarea {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14), inset 0 1px 0 rgba(16, 185, 129, 0.06);
}
input:disabled, select:disabled, textarea:disabled {
  background: #F8FAFC; color: var(--muted);
  border-color: var(--border); cursor: not-allowed; opacity: 0.85;
}

/* --- Sidebar polish --- */
.sidebar nav a { transition: background 0.18s ease, color 0.18s ease, border-left-color 0.18s ease; }
.sidebar nav a.active {
  box-shadow: inset 2px 0 0 var(--accent), -2px 0 14px rgba(16, 185, 129, 0.22);
}

/* --- Tables: sticky head, hover accent --- */
.card.flush table { position: relative; }
.card.flush thead th {
  position: sticky; top: 0; z-index: 1;
  background: #F8FAFC;
  box-shadow: 0 1px 0 var(--border);
}
tbody tr {
  position: relative;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
/* 2026-06-23 Audit #167 (HIGH): the previous hover accent used
 * `tbody tr::before { content:""; position:absolute; ... }`. On any table
 * where `<tr>` is set to `display:contents` (lender Borrowers/Applications/
 * Repayments/Billing/Wallet — they switched to display:grid for column-pinning),
 * the `::before` pseudo becomes a real grid child and shifts every <td> one
 * column right. We already fixed this for admin tables via a scoped override
 * (commit fb3fb21), but lender.html still inherited the bug.
 *
 * Permanent fix: use box-shadow inset on the row hover instead. Box-shadow
 * is rendering-only (doesn't reflow children), and on display:contents rows
 * it simply isn't painted — which is the desired behaviour (no broken layout,
 * no fake hover bar on grid tables).
 */
tbody tr:hover {
  box-shadow: inset 2px 0 0 var(--accent-light);
}
tr[onclick] { cursor: pointer; }
tr[onclick]:hover { background: var(--brand-50); }

/* --- Badges: dot indicator + optional pulse --- */
.badge { display: inline-flex; align-items: center; gap: 6px; }
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.85; flex: none;
}
.badge-muted::before { background: var(--muted); }
.badge-pulse { animation: badgePulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* --- Modal motion --- */
.modal-backdrop {
  background: rgba(2, 44, 34, 0.45);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}
.modal-backdrop.open { animation: fadeIn 0.2s ease both; }
.modal-backdrop.open .modal {
  animation: scaleIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* --- Toast: slide + icon + glow --- */
.toast {
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-flex; align-items: center; gap: 10px;
  padding-left: 16px;
}
.toast.show {
  animation: slideInRight 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  box-shadow: 0 10px 28px rgba(2, 44, 34, 0.22);
}
.toast::before {
  content: "i"; flex: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex; align-items: center; justify-content: center;
  font-style: italic; font-weight: 700; font-size: 12px;
}
.toast.success::before { content: "\2713"; font-style: normal; }
.toast.success.show { box-shadow: 0 10px 28px rgba(16, 185, 129, 0.35); }
.toast.error::before { content: "!"; font-style: normal; }
.toast.error.show { box-shadow: 0 10px 28px rgba(239, 68, 68, 0.32); }

/* --- Skeleton loader --- */
.skel {
  background: linear-gradient(90deg, #F1F5F9 0%, #E2E8F0 50%, #F1F5F9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--radius-sm);
  display: block;
}
.skel.skel-line { height: 12px; width: 100%; margin: 6px 0; }
.skel.skel-block { height: 80px; width: 100%; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================================================================
   MARKETING LAYER
   ----------------------------------------------------------------
   Everything below powers the standalone marketing site (landing,
   pricing, features, about, etc.). It is fully scoped under
   .mkt-page or its own prefixed classes so it never collides with
   the app workspace classes above. Do not modify anything above
   this banner — those classes are load-bearing for the lender,
   borrower and admin views.

   Conventions:
     - Class prefix `mkt-` for nav/footer (top-level chrome only).
     - Generic marketing primitives (.section, .hero, .container,
       .feature-grid, .pricing-card, .feature-card, .stat...) are
       intended to live inside `.mkt-page` only.
     - All non-essential motion is gated behind
       `prefers-reduced-motion: no-preference`.
   ================================================================ */

/* ---------- Page container ---------- */
.mkt-page {
  background: #FFFFFF;
  color: var(--text);
  min-height: 100vh;
  font-feature-settings: "ss01", "cv11", "kern";
  text-rendering: optimizeLegibility;
}
.mkt-page a { color: var(--brand-800); }
.mkt-page a:hover { text-decoration: none; }

/* Subtle dot-grid background pattern, e.g. behind hero */
.dotgrid-bg {
  background-image: radial-gradient(circle at 1px 1px, rgba(6, 78, 59, 0.10) 1px, transparent 0);
  background-size: 24px 24px;
}

/* ---------- Container ---------- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; position: relative; }
.section-lg { padding: 140px 0; position: relative; }
.section-tinted {
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.55) 0%, rgba(236, 253, 245, 0.15) 100%);
}
.section-dark {
  background:
    radial-gradient(circle at 12% 18%, rgba(132, 204, 22, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 88% 82%, rgba(16, 185, 129, 0.22) 0%, transparent 50%),
    linear-gradient(135deg, var(--brand-900) 0%, var(--brand-800) 55%, var(--brand-700) 100%);
  color: #FFFFFF;
}
.section-dark .eyebrow { color: var(--accent-spark); }
.section-dark .lede { color: rgba(255, 255, 255, 0.78); }
.section-dark a { color: var(--accent-light); }

.section-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}

/* ---------- Top nav ---------- */
.mkt-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}
.mkt-nav.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom-color: rgba(16, 185, 129, 0.18);
  box-shadow: 0 1px 0 rgba(2, 44, 34, 0.04), 0 12px 32px rgba(2, 44, 34, 0.05);
}
.mkt-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px;
}
.mkt-nav .logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-900);
}
.mkt-nav .logo span { color: var(--accent); }
.mkt-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
/* Scope nav-link styling to .mkt-nav-links only so it doesn't clobber
   padding on .mkt-nav-cta / sign-in pills in .mkt-nav-auth. */
.mkt-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(2, 44, 34, 0.7);
  position: relative;
  padding: 6px 2px;
  transition: color 0.18s ease;
}
.mkt-nav-links a:hover { color: var(--brand-900); text-decoration: none; }
.mkt-nav-links a::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 0;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-spark));
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mkt-nav-links a:hover::after,
.mkt-nav-links a.active::after { transform: scaleX(1); }
.mkt-nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mkt-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 55%, var(--accent-spark) 130%);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.mkt-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  text-decoration: none; color: #FFFFFF;
  filter: saturate(110%);
}

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.headline-xl {
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-900);
}
.headline-lg {
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--brand-900);
}
.headline-md {
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-900);
}
.section-dark .headline-xl,
.section-dark .headline-lg,
.section-dark .headline-md { color: #FFFFFF; }

.mkt-page .lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 640px;
}
.gold, .spark {
  background: linear-gradient(120deg, var(--accent-spark) 0%, var(--accent) 60%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  position: relative;
  white-space: nowrap;
}
.kicker {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-700);
  margin-bottom: 10px;
}

/* ---------- CTAs ---------- */
.btn-xl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 100%);
  box-shadow: 0 8px 24px rgba(2, 44, 34, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  text-decoration: none;
}
.btn-xl:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(2, 44, 34, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-decoration: none; color: #FFFFFF;
}
.btn-xl:active { transform: translateY(0); }
.btn-xl::before {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-22deg);
  transition: left 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.btn-xl:hover::before { left: 140%; }
.btn-xl.btn-xl-accent {
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 55%, var(--accent-spark) 130%);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-xl.btn-xl-accent:hover {
  box-shadow: 0 14px 32px rgba(16, 185, 129, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-900);
  background: transparent;
  border: 1.5px solid rgba(2, 44, 34, 0.30);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
  text-decoration: none;
}
.btn-ghost:hover {
  border-color: var(--brand-800);
  background: rgba(236, 253, 245, 0.6);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--brand-900);
}
.section-dark .btn-ghost {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
}
.section-dark .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
  color: #FFFFFF;
}
/* When ghost is combined with btn-xl, keep the larger XL sizing/padding */
.btn-ghost.btn-xl {
  padding: 14px 28px;
  min-height: 52px;
  font-size: 16px;
  background: transparent;
  /* Override the .btn-xl gradient/box-shadow inherited above */
  box-shadow: none;
  color: var(--brand-900);
  border: 1.5px solid rgba(2, 44, 34, 0.30);
}
.btn-ghost.btn-xl:hover {
  background: rgba(236, 253, 245, 0.6);
  border-color: var(--brand-800);
  box-shadow: 0 6px 18px rgba(2, 44, 34, 0.08);
  color: var(--brand-900);
}
.section-dark .btn-ghost.btn-xl {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
}
.section-dark .btn-ghost.btn-xl:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
  color: #FFFFFF;
}

.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  /* brand-800 gives ~10.6:1 on white (AA+), accent-dark only reaches ~3.77 */
  color: var(--brand-800);
  background: transparent;
  text-decoration: none;
  padding: 4px 0;
}
.btn-arrow::after {
  content: "→";
  display: inline-block;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn-arrow:hover { color: var(--brand-900); text-decoration: none; }
.btn-arrow:hover::after { transform: translateX(5px); }
.section-dark .btn-arrow { color: var(--accent-spark); }
.section-dark .btn-arrow:hover { color: #FFFFFF; }

/* ---------- Hero (scoped to .mkt-page to avoid hitting legacy .hero) ---------- */
.mkt-page .hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 128px) 0 clamp(64px, 8vw, 112px);
  background:
    radial-gradient(900px 600px at 92% -10%, rgba(132, 204, 22, 0.16) 0%, transparent 60%),
    radial-gradient(800px 600px at -10% 110%, rgba(16, 185, 129, 0.18) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, #FFFFFF 70%);
  text-align: center;
}
.mkt-page .hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(6, 78, 59, 0.07) 1px, transparent 0);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.mkt-page .hero > .container { position: relative; z-index: 1; }

.mkt-page .hero-headline {
  max-width: 920px;
  margin: 0 auto 22px;
}
.mkt-page .hero-subhead {
  margin: 0 auto 36px;
  max-width: 720px;
  text-align: center;
}
.mkt-page .hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: var(--brand-800);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 28px;
  max-width: 100%;
  flex-wrap: wrap;
  text-align: center;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  flex-shrink: 0;
}
.hero-visual {
  position: relative;
  margin-top: 64px;
  display: flex;
  justify-content: center;
}

/* ---------- Feature grid (scoped — legacy .feature-grid uses auto-fit) ---------- */
.mkt-page .feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid rgba(2, 44, 34, 0.08);
  border-radius: 16px;
  padding: 32px 28px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.32);
  box-shadow:
    0 1px 2px rgba(2, 44, 34, 0.04),
    0 16px 40px rgba(16, 185, 129, 0.14);
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-900);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}
.section-dark .feature-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
}
.section-dark .feature-card h3 { color: #FFFFFF; }
.section-dark .feature-card p { color: rgba(255, 255, 255, 0.72); }
.section-dark .feature-icon {
  background: rgba(132, 204, 22, 0.18);
  color: var(--accent-spark);
}

/* ---------- Split grid (image + text) ---------- */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.split-grid.alt .split-text { order: 2; }
.split-grid.alt .split-visual { order: 1; }
.split-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 320px;
  background:
    radial-gradient(circle at 30% 20%, rgba(132, 204, 22, 0.18) 0%, transparent 55%),
    linear-gradient(135deg, var(--brand-50) 0%, #FFFFFF 100%);
  border: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow: 0 24px 48px rgba(2, 44, 34, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat {
  text-align: left;
  padding: 8px 0;
}
.stat .num {
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 50%, var(--accent-spark) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.stat .label {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}
.section-dark .stat .label { color: rgba(255, 255, 255, 0.7); }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.pricing-grid.single {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}
/* Scoped under .mkt-page so legacy index.html's .pricing-card stays intact */
.mkt-page .pricing-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid rgba(2, 44, 34, 0.08);
  border-radius: 20px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  margin-top: 0;
}
.mkt-page .pricing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.32);
  box-shadow: 0 18px 44px rgba(2, 44, 34, 0.10);
}
.mkt-page .pricing-card .tier {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-700);
  margin-bottom: 12px;
}
.mkt-page .pricing-card .price {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  color: var(--brand-900);
  letter-spacing: -0.03em;
  line-height: 1;
}
.mkt-page .pricing-card .price small {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}
.mkt-page .pricing-card .price-sub {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}
.mkt-page .pricing-card .pricing-cta { margin-top: 24px; }
.pricing-feature-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.pricing-feature-list li {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.pricing-feature-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.14);
}
.pricing-feature-list li::after {
  content: "";
  position: absolute;
  left: 6px; top: 7px;
  width: 8px; height: 5px;
  border-left: 2px solid var(--accent-dark);
  border-bottom: 2px solid var(--accent-dark);
  transform: rotate(-45deg);
}
.mkt-page .pricing-card.featured {
  background:
    radial-gradient(circle at 0% 0%, rgba(132, 204, 22, 0.25) 0%, transparent 55%),
    linear-gradient(140deg, var(--accent-dark) 0%, var(--accent) 60%, var(--accent-spark) 130%);
  color: #FFFFFF;
  border-color: transparent;
  transform: scale(1.02);
  box-shadow: 0 24px 56px rgba(16, 185, 129, 0.32);
}
.mkt-page .pricing-card.featured:hover {
  transform: scale(1.02) translateY(-3px);
  box-shadow: 0 32px 64px rgba(16, 185, 129, 0.38);
}
.mkt-page .pricing-card.featured .tier { color: rgba(255, 255, 255, 0.85); }
.mkt-page .pricing-card.featured .price {
  color: #FFFFFF;
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 800;
}
.mkt-page .pricing-card.featured .price small { color: rgba(255, 255, 255, 0.78); }
.mkt-page .pricing-card.featured .price-sub { color: rgba(255, 255, 255, 0.82); }
.mkt-page .pricing-card.featured .pricing-feature-list li { color: #FFFFFF; }
.mkt-page .pricing-card.featured .pricing-feature-list li::before { background: rgba(255, 255, 255, 0.2); }
.mkt-page .pricing-card.featured .pricing-feature-list li::after {
  border-color: #FFFFFF;
}
.mkt-page .pricing-card.featured .ribbon {
  position: absolute;
  top: -12px; right: 24px;
  background: var(--brand-900);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(2, 44, 34, 0.28);
}
/* Featured pricing card has an emerald gradient bg; a btn-xl-accent CTA
   on that bg disappears into the card. Re-skin the CTA to a solid white
   pill with dark text so the call to action stays visually distinct. */
.mkt-page .pricing-card.featured .pricing-cta .btn-xl,
.mkt-page .pricing-card.featured .pricing-cta .btn-xl.btn-xl-accent,
.mkt-page .pricing-card.featured .pricing-cta a.btn-xl,
.mkt-page .pricing-card.featured .pricing-cta a.btn-xl.btn-xl-accent {
  background: #FFFFFF !important;
  background-image: none !important;
  color: var(--brand-900) !important;
  box-shadow: 0 10px 24px rgba(2, 44, 34, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}
.mkt-page .pricing-card.featured .pricing-cta .btn-xl:hover,
.mkt-page .pricing-card.featured .pricing-cta a.btn-xl:hover {
  background: #F8FAFC !important;
  color: var(--brand-900) !important;
  box-shadow: 0 16px 32px rgba(2, 44, 34, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

/* ---------- FAQ ---------- */
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid rgba(2, 44, 34, 0.08);
  border-radius: 14px;
  background: #FFFFFF;
  padding: 4px 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.faq-item[open] {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.10);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.4), #FFFFFF);
}
.faq-item summary { list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--brand-900);
  padding: 18px 0;
  cursor: pointer;
  letter-spacing: -0.005em;
}
.faq-q::after {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border-right: 2px solid var(--brand-800);
  border-bottom: 2px solid var(--brand-800);
  transform: rotate(45deg);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin-right: 4px;
}
.faq-item[open] .faq-q::after { transform: rotate(-135deg); border-color: var(--accent-dark); }
.faq-a {
  padding: 0 0 20px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 720px;
}

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  position: relative;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Gradient border via mask: 1px border that fades emerald → lime */
  background-clip: padding-box;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(2, 44, 34, 0.04), 0 10px 30px rgba(2, 44, 34, 0.05);
}
.testimonial-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.5) 0%, rgba(132, 204, 22, 0.4) 50%, rgba(2, 44, 34, 0.12) 100%);
  -webkit-mask:
     linear-gradient(#000 0 0) content-box,
     linear-gradient(#000 0 0);
          mask:
     linear-gradient(#000 0 0) content-box,
     linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.testimonial-quote {
  position: relative;
  font-size: 18px;
  line-height: 1.55;
  font-style: italic;
  color: var(--text);
  padding-left: 24px;
}
.testimonial-quote::before {
  content: "\201C";
  position: absolute;
  left: -4px;
  top: -18px;
  font-size: 64px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  opacity: 0.9;
}
.testimonial-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}
.testimonial-meta .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-700), var(--accent));
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}
.testimonial-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--brand-900);
}
.testimonial-role {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Logo cloud ---------- */
.logo-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 48px;
  opacity: 0.7;
}
.logo-cloud > * {
  height: 28px;
  display: inline-flex;
  align-items: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--muted);
  filter: grayscale(100%);
  transition: filter 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.logo-cloud > *:hover { filter: grayscale(0%); color: var(--brand-800); }

/* ---------- Marketing footer ---------- */
.mkt-footer {
  background:
    radial-gradient(circle at 12% 0%, rgba(132, 204, 22, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 88% 100%, rgba(16, 185, 129, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, var(--brand-900) 0%, #011a14 100%);
  color: rgba(255, 255, 255, 0.78);
  padding: 80px 0 32px;
}
.mkt-footer a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.18s ease;
}
.mkt-footer a:hover { color: #FFFFFF; }
.mkt-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mkt-footer-brand .logo {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.mkt-footer-brand .logo span { color: var(--accent-spark); }
.mkt-footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  max-width: 320px;
}
.mkt-footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 18px;
}
.mkt-footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mkt-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.mkt-footer-bottom .legal-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- Decorative ---------- */
.glow-blob {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.5) 0%, transparent 70%);
  z-index: 0;
}
.glow-blob.lime  { background: radial-gradient(circle, rgba(132, 204, 22, 0.45) 0%, transparent 70%); }
.glow-blob.deep  { background: radial-gradient(circle, rgba(6, 95, 70, 0.55)   0%, transparent 70%); }
.glow-blob.mint  { background: radial-gradient(circle, rgba(52, 211, 153, 0.45) 0%, transparent 70%); }

.divider-curve {
  position: relative;
  height: 80px;
  width: 100%;
  background: inherit;
  -webkit-mask: radial-gradient(ellipse 120% 100% at 50% 0%, transparent 60%, #000 60.5%);
          mask: radial-gradient(ellipse 120% 100% at 50% 0%, transparent 60%, #000 60.5%);
}

/* ---------- Scroll reveal ----------
   Pure-CSS animation. Text is always visible — the fade-up is decorative.
   Crucially: if the JS observer never fires (slow page, blocked script,
   race condition) the content STILL shows up. The old observer-only
   pattern left text invisible whenever the JS path failed; this fixes
   the "bad alignments" / ghost-text bug across the marketing site.
*/
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: ytfRevealIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 100ms forwards;
  }
  .reveal-1 { animation-delay: 180ms; }
  .reveal-2 { animation-delay: 260ms; }
  .reveal-3 { animation-delay: 340ms; }
  .reveal-4 { animation-delay: 420ms; }
}
.reveal { will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: translateY(0); } /* legacy observer fallback */
@keyframes ytfRevealIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Motion keyframes (marketing) ---------- */
@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  }
  50% {
    transform: scale(1.18);
    opacity: 0.85;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(-6px); }
  50%      { transform: translateY(6px); }
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-badge .dot {
    animation: pulseDot 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }
  .float-slow {
    animation: floatSlow 6s ease-in-out infinite;
  }
  .mkt-page .hero {
    background-size: 200% 200%, 200% 200%, 100% 100%;
    /* shimmer is decorative; only animate when motion is welcome */
    animation: gradientShift 14s ease-in-out infinite alternate;
  }
  .hover-tilt {
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
    perspective: 800px;
  }
  .hover-tilt:hover {
    transform: perspective(800px) rotateX(3deg) rotateY(-2deg) translateY(-2px);
    box-shadow: 0 30px 60px rgba(2, 44, 34, 0.12);
  }
}

/* ---------- Marketing responsiveness ---------- */
@media (max-width: 1024px) {
  .section { padding: 80px 0; }
  .section-lg { padding: 110px 0; }
  .mkt-page .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid > .pricing-card.featured { grid-column: 1 / -1; }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .section-split,
  .split-grid { gap: 48px; }
  .mkt-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; row-gap: 36px; }
  .mkt-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .section-split,
  .split-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .split-grid.alt .split-text { order: 1; }
  .split-grid.alt .split-visual { order: 2; }
  .mkt-page .hero { padding: 80px 0 60px; }
  .hero-visual { margin-top: 44px; }
  .mkt-page .hero-cta { gap: 10px; }
  .mkt-page .hero-cta .btn-xl,
  .mkt-page .hero-cta .btn-ghost { width: 100%; max-width: 320px; justify-content: center; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section-lg { padding: 88px 0; }
  .mkt-page .container { padding: 0 20px; }
  .mkt-nav-inner { padding: 14px 20px; gap: 12px; }
  .mkt-nav-links { display: none; }
  .mkt-page .feature-grid,
  .pricing-grid,
  .testimonial-grid { grid-template-columns: 1fr; gap: 16px; }
  .mkt-page .pricing-card.featured { transform: none; }
  .mkt-page .pricing-card.featured:hover { transform: translateY(-3px); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .mkt-footer-grid { grid-template-columns: 1fr 1fr; }
  .mkt-footer-brand { grid-column: 1 / -1; }
  .mkt-page .lede { font-size: 18px; }
  .logo-cloud { gap: 28px; }
}

@media (max-width: 480px) {
  .section { padding: 56px 0; }
  .stat-grid { grid-template-columns: 1fr; gap: 18px; }
  .mkt-footer { padding: 56px 0 24px; }
  .mkt-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .mkt-footer-bottom { flex-direction: column; align-items: flex-start; }
  .btn-xl { padding: 13px 22px; font-size: 15px; }
  .hero-badge {
    font-size: 12px;
    padding: 6px 14px 6px 10px;
    line-height: 1.4;
    gap: 8px;
  }
}

/* --- Button contrast bulletproofing -----------------------------------------
   Defensive rules so anchor link states (:link, :visited, :hover, :active)
   never override the white text on filled dark/emerald buttons.
   Bare a.btn-xl is INTENTIONALLY excluded here because the .btn-ghost.btn-xl
   combo needs dark text on a light/transparent background. The base .btn-xl
   rule already sets color:#FFFFFF and a gradient bg, so filled XL anchors
   stay readable on their own. */
a.btn-primary, a.btn-primary:link, a.btn-primary:visited, a.btn-primary:hover, a.btn-primary:active,
a.btn-accent, a.btn-accent:link, a.btn-accent:visited, a.btn-accent:hover, a.btn-accent:active,
a.btn-danger, a.btn-danger:link, a.btn-danger:visited, a.btn-danger:hover, a.btn-danger:active,
a.btn-xl.btn-xl-accent, a.btn-xl.btn-xl-accent:link, a.btn-xl.btn-xl-accent:visited,
a.btn-xl.btn-xl-accent:hover, a.btn-xl.btn-xl-accent:active,
.mkt-nav-cta, .mkt-nav-cta:link, .mkt-nav-cta:visited, .mkt-nav-cta:hover, .mkt-nav-cta:active {
  color: #FFFFFF !important;
  text-decoration: none;
}
/* Filled (non-ghost) btn-xl anchors: force white over the gradient.
   The :not(.btn-ghost) guard lets ghost+xl keep its dark/inverted text. */
a.btn-xl:not(.btn-ghost),
a.btn-xl:not(.btn-ghost):link,
a.btn-xl:not(.btn-ghost):visited,
a.btn-xl:not(.btn-ghost):hover,
a.btn-xl:not(.btn-ghost):active {
  color: #FFFFFF !important;
  text-decoration: none;
}
/* Ghost variant: brand-coloured text on transparent — keep readable always.
   This must come AFTER the filled rule so the ghost+xl combo wins. */
a.btn-ghost, a.btn-ghost:link, a.btn-ghost:visited, a.btn-ghost:hover, a.btn-ghost:active,
a.btn-ghost.btn-xl, a.btn-ghost.btn-xl:link, a.btn-ghost.btn-xl:visited,
a.btn-ghost.btn-xl:hover, a.btn-ghost.btn-xl:active {
  color: var(--brand-900);
  text-decoration: none;
}
.section-dark a.btn-ghost,
.section-dark a.btn-ghost:link,
.section-dark a.btn-ghost:visited,
.section-dark a.btn-ghost:hover,
.section-dark a.btn-ghost:active,
.section-dark a.btn-ghost.btn-xl,
.section-dark a.btn-ghost.btn-xl:link,
.section-dark a.btn-ghost.btn-xl:visited,
.section-dark a.btn-ghost.btn-xl:hover,
.section-dark a.btn-ghost.btn-xl:active { color: #FFFFFF; }
/* Arrow link variant — must beat a.btn-primary's white !important when
   an author accidentally combines .btn-primary with .btn-arrow.
   .btn-arrow strips bg+padding, so white text on the page bg = invisible. */
a.btn-arrow,
a.btn-arrow:link,
a.btn-arrow:visited,
a.btn-arrow:hover,
a.btn-arrow:active,
a.btn-primary.btn-arrow,
a.btn-primary.btn-arrow:link,
a.btn-primary.btn-arrow:visited,
a.btn-primary.btn-arrow:hover,
a.btn-primary.btn-arrow:active,
a.btn-xl.btn-arrow,
a.btn-xl.btn-arrow:link,
a.btn-xl.btn-arrow:visited,
a.btn-xl.btn-arrow:hover,
a.btn-xl.btn-arrow:active,
a.btn-ghost.btn-arrow,
a.btn-ghost.btn-arrow:link,
a.btn-ghost.btn-arrow:visited,
a.btn-ghost.btn-arrow:hover,
a.btn-ghost.btn-arrow:active {
  color: var(--brand-800) !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  text-decoration: none;
}
/* On dark sections, arrow links use the brighter accent-spark/white per design */
.section-dark a.btn-arrow,
.section-dark a.btn-arrow:link,
.section-dark a.btn-arrow:visited,
.section-dark a.btn-primary.btn-arrow,
.section-dark a.btn-primary.btn-arrow:link,
.section-dark a.btn-primary.btn-arrow:visited,
.section-dark a.btn-xl.btn-arrow,
.section-dark a.btn-xl.btn-arrow:link,
.section-dark a.btn-xl.btn-arrow:visited,
.section-dark a.btn-ghost.btn-arrow,
.section-dark a.btn-ghost.btn-arrow:link,
.section-dark a.btn-ghost.btn-arrow:visited {
  color: var(--accent-spark) !important;
}
.section-dark a.btn-arrow:hover,
.section-dark a.btn-primary.btn-arrow:hover,
.section-dark a.btn-xl.btn-arrow:hover,
.section-dark a.btn-ghost.btn-arrow:hover { color: #FFFFFF !important; }
a.btn-arrow:hover, a.btn-arrow:active { color: var(--brand-800); text-decoration: none; }

/* ---------- Homepage mobile density polish ----------
   Tighter section padding on phones, smaller hero headline at the
   narrowest widths, and full-width stacked CTAs below 480px. */
@media (max-width: 768px) {
  .mkt-page .section { padding: 56px 0; }
  .mkt-page .section-lg { padding: 80px 0; }
}
@media (max-width: 480px) {
  .mkt-page .section { padding: 48px 0; }
  .mkt-page .section-lg { padding: 64px 0; }
  .headline-xl { font-size: clamp(28px, 8vw, 36px); line-height: 1.08; }
  .headline-lg { font-size: clamp(24px, 7vw, 30px); line-height: 1.12; }
  .headline-md { font-size: clamp(22px, 6.2vw, 26px); }
  .mkt-page .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .mkt-page .hero-cta .btn-xl,
  .mkt-page .hero-cta .btn-ghost,
  .mkt-page .hero-cta .btn-xl-accent {
    width: 100%;
    max-width: none;
    justify-content: center;
  }
}

/* ============================================================
   Personas section — replaces the testimonial. Dark emerald
   to mirror the footer treatment, with the same lime "Finance"
   spark used in the brand wordmark.
   ============================================================ */
.personas-section {
  background:
    radial-gradient(circle at 15% 0%, rgba(132, 204, 22, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 90% 100%, rgba(16, 185, 129, 0.12) 0%, transparent 55%),
    linear-gradient(180deg, var(--brand-900) 0%, #011a14 100%);
  color: rgba(255, 255, 255, 0.85);
}
.personas-eyebrow {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 14px;
}
.personas-headline {
  color: #FFFFFF;
  letter-spacing: -0.02em;
}
.personas-headline .spark-lime {
  color: var(--accent-spark);
  background: none;
  -webkit-text-fill-color: var(--accent-spark);
}
.personas-lede {
  color: rgba(255, 255, 255, 0.75);
  font-size: 17px;
  line-height: 1.6;
  margin-top: 16px;
}
.personas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.persona-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.persona-card:hover {
  border-color: rgba(132, 204, 22, 0.55);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
}
.persona-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-spark);
  background: rgba(132, 204, 22, 0.10);
  border: 1px solid rgba(132, 204, 22, 0.32);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 18px;
}
.persona-title {
  font-size: 19px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 10px;
  line-height: 1.35;
}
.persona-body {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
  margin: 0 0 18px;
}
.persona-points {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}
.persona-points li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.45;
}
.persona-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-spark);
  box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.15);
}

@media (max-width: 980px) {
  .personas-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .personas-grid { grid-template-columns: 1fr; gap: 18px; }
  .persona-card { padding: 24px 22px; }
}

/* ============================================================
   Brand wordmark unification — every "Finance" wordmark in the
   site uses the same lime spark colour as the footer, so the
   header / footer / dashboards all read as one identity.
   ============================================================ */
.mkt-nav .logo span,
.landing-nav .logo span,
.sidebar .logo span,
.topbar .logo span {
  color: var(--accent-spark);
}

/* ============================================================
   Marketing page section-headers — centred eyebrow + headline
   + lede now share a consistent vertical rhythm. Fixes the
   "bad alignments" Stephen flagged across multiple pages.
   ============================================================ */
.section .eyebrow,
.section-lg .eyebrow {
  display: inline-block;
  text-align: center;
  margin-bottom: 12px;
}
.section .headline-lg + .lede,
.section-lg .headline-lg + .lede {
  margin-top: 16px;
}

/* ============================================================
   GLOBAL ALIGNMENT FIX — June 2026
   The legacy .section-split / .split-grid put text on the LEFT
   with a visual on the right, which left text bleeding into the
   page edge on certain viewports. Override every split-section
   to be a CENTERED single-column with the visual stacked below.
   Affects: for-lenders, for-borrowers, features, security pages.
   ============================================================ */
.section-split {
  display: block !important;
  grid-template-columns: none !important;
}
.split-grid,
.split-grid.alt {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: 1fr !important;
  gap: 40px !important;
  max-width: 820px !important;
  margin: 0 auto !important;
  text-align: center !important;
  align-items: center !important;
}
.split-grid > div,
.split-grid.alt > div {
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  order: 0 !important;
}
/* The text column always reads first, the visual sits below */
.split-grid > div:first-child,
.split-grid.alt > div:first-child {
  order: 0 !important;
}
.split-grid > div:last-child,
.split-grid.alt > div:last-child {
  order: 1 !important;
}
.split-grid .eyebrow,
.split-grid.alt .eyebrow {
  text-align: center;
  display: block;
}
.split-grid h2,
.split-grid.alt h2,
.split-grid .lede,
.split-grid.alt .lede {
  text-align: center;
}
/* Check-lists / feature bullets stay readable inside the centered column —
   list itself is centered, but bullet items align to the left of an
   inner left-aligned block so the eye still has a vertical rhythm. */
.split-grid .check-list,
.split-grid.alt .check-list {
  text-align: left;
  display: inline-block;
  margin: 16px auto 0;
  max-width: 620px;
}
/* Visual element: centred, capped width, sits nicely below the text */
.split-visual,
.split-grid > div[aria-hidden="true"],
.split-grid.alt > div[aria-hidden="true"] {
  max-width: 540px !important;
  margin: 0 auto !important;
}
.split-grid svg,
.split-grid.alt svg {
  max-width: 100%;
  height: auto;
}

/* Section padding tweak so sections breathe on every viewport */
.section, .section-lg {
  padding-left: 0;
  padding-right: 0;
}
.container {
  padding-left: 24px;
  padding-right: 24px;
}
@media (max-width: 600px) {
  .container { padding-left: 18px; padding-right: 18px; }
}

/* Footer column links — stack vertically with consistent spacing */
.mkt-footer-col > a {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.70);
  text-decoration: none;
  transition: color 0.18s ease;
}
.mkt-footer-col > a:first-of-type { margin-top: 0; }
.mkt-footer-col > a:hover { color: #FFFFFF; }
.mkt-footer-col > h4 + a { margin-top: 0; }

/* Footer brand subhead — premium readability */
.mkt-footer-brand p {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 340px;
  margin: 0 0 18px;
}

/* ===== Marketing animation primitives (data-reveal observer) ===== */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity .7s cubic-bezier(0.22, 1, 0.36, 1),
                transform .7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  [data-reveal-type="fade-up"] { transform: translateY(24px); }
  [data-reveal-type="fade"] { transform: none; }
  [data-reveal-type="scale"] { transform: scale(0.94); }
  [data-reveal].in {
    opacity: 1;
    transform: none;
  }
}

/* Magnetic lift on opt-in cards */
.yt-lift {
  transition: transform .28s cubic-bezier(.22,1,.36,1),
              box-shadow .28s cubic-bezier(.22,1,.36,1);
}
@media (hover: hover) {
  .yt-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px -16px rgba(2, 44, 34, 0.18);
  }
}

/* Spark gradient animated */
@media (prefers-reduced-motion: no-preference) {
  .spark {
    background-size: 200% 100%;
    animation: ytfSparkSlide 8s ease-in-out infinite alternate;
  }
}
@keyframes ytfSparkSlide {
  to { background-position: 100% 0; }
}

/* Button micro-interaction */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn-xl, .btn-primary {
    transition: transform .22s ease-out, box-shadow .22s ease-out, background .15s ease;
  }
  .btn-xl:hover, .btn-primary:hover { transform: translateY(-2px) scale(1.02); }
  .btn-xl:active, .btn-primary:active { transform: scale(0.98); transition-duration: 80ms; }
}

/* Mobile typography + spacing tightening */
@media (max-width: 600px) {
  .mkt-hero,
  .mkt-page section.mkt-hero,
  section[class*="mkt-hero"] { padding: 60px 0 50px !important; }
  .mkt-hero h1 { margin-bottom: 14px !important; }
  .mkt-hero h1 + p,
  .mkt-hero p.lede { margin-bottom: 16px !important; }
}

/* Mobile persona / privacy / glass card padding tighten */
@media (max-width: 640px) {
  .yt-persona-card,
  .yt-privacy-card,
  .yt-glass-card { padding: 24px 22px !important; }
}

/* Mobile hamburger nav */
.mkt-nav-toggle {
  display: none;
  background: transparent; border: none; cursor: pointer; padding: 8px;
  color: #022C22;
}
@media (max-width: 760px) {
  .mkt-nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #FFFFFF; flex-direction: column; padding: 14px 20px; gap: 6px;
    border-bottom: 1px solid #E2E8F0; box-shadow: 0 10px 30px rgba(2,44,34,0.08);
    align-items: stretch;
  }
  .mkt-nav-links.open { display: flex; }
  .mkt-nav-links a { padding: 10px 4px; font-size: 15px; }
  .mkt-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .mkt-nav-auth { gap: 6px; }
  .mkt-nav-auth .btn-sm { padding: 6px 10px; font-size: 12px; }
  /* Ensure nav-inner is positioning context for the absolutely-positioned dropdown */
  .mkt-nav-inner { position: relative; }
}

/* Mobile footer single-column + full-width support pill */
@media (max-width: 600px) {
  .mkt-footer-grid { grid-template-columns: 1fr !important; }
  .mkt-footer-brand a[href^="mailto:"] {
    display: flex !important;
    width: 100% !important;
    justify-content: center;
  }
}

/* ============================================================
   MOBILE MARKETING POLISH (≤640px)
   - Tighter container padding
   - Stack hero CTAs to full width
   - Single-column section grids
   - Headline scale + line-height
   - Touch-friendly tap targets (≥44px)
   ============================================================ */
@media (max-width: 640px) {

  /* Container side padding — give content room to breathe */
  .container { padding-left: 20px !important; padding-right: 20px !important; }

  /* All marketing sections — tighter vertical rhythm so mobile isn't 1000px tall per section */
  .mkt-page section,
  .mkt-page .section { padding-top: 56px !important; padding-bottom: 56px !important; }

  /* Hero — vertical CTA stack, full-width buttons, bigger headline tracking */
  .mkt-hero h1 { font-size: clamp(30px, 8.5vw, 42px) !important; line-height: 1.1 !important; }
  .mkt-hero p { font-size: 15.5px !important; line-height: 1.55 !important; }
  .mkt-hero .btn-xl,
  .mkt-hero a.btn-xl,
  .mkt-hero .btn-primary { width: 100% !important; max-width: 320px; text-align: center; }
  .mkt-hero a.btn-ghost,
  .mkt-hero a.btn-arrow {
    width: 100% !important; max-width: 320px;
    justify-content: center; padding: 14px 18px !important; font-size: 15px;
    border: 1px solid #E2E8F0; border-radius: 10px; background:#fff;
  }
  .mkt-hero .btn-arrow::after { display: none; }

  /* Stack the hero CTA group vertically */
  .mkt-hero div[data-reveal] { gap: 10px !important; }

  /* Feature grids — single column on phone, with consistent gap */
  .feature-grid,
  .pillar-grid,
  .pricing-grid,
  .persona-grid,
  .yt-pricing-grid,
  .yt-persona-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .feature-card,
  .yt-persona-card,
  .yt-privacy-card,
  .yt-glass-card,
  .pricing-card {
    padding: 22px 20px !important;
    border-radius: 14px !important;
  }
  .feature-card h3 { font-size: 17px !important; }
  .feature-card p,
  .pricing-card p { font-size: 14px !important; line-height: 1.55 !important; }

  /* Section headlines */
  .headline-lg,
  h2.headline-lg,
  section h2 { font-size: clamp(24px, 6.5vw, 32px) !important; line-height: 1.15 !important; }
  .lede { font-size: 15px !important; line-height: 1.55 !important; }
  .eyebrow { font-size: 11px !important; letter-spacing: .08em !important; }

  /* Hero glow blobs — smaller + softer so they don't dominate */
  [data-yt-hero-glow] {
    width: 80% !important;
    height: 50% !important;
    opacity: 0.7;
  }

  /* Hide oversized hero mocks that are content-heavy on desktop */
  .yt-hero-mock { display: none !important; }

  /* Generic 3-col grids → 1-col on phone */
  div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* Tap target hygiene — every nav link/button at least 44px tall */
  .mkt-nav-auth .btn-sm { min-height: 36px; padding: 8px 12px !important; }
  .mkt-nav-links a { min-height: 44px; display: flex; align-items: center; }

  /* Reduce footer top padding */
  .mkt-footer { padding-top: 48px !important; padding-bottom: 24px !important; }
  .mkt-footer-grid { gap: 32px !important; }
}

/* Tiny-phone polish (≤380px) — iPhone SE, Galaxy S5 etc. */
@media (max-width: 380px) {
  .container { padding-left: 16px !important; padding-right: 16px !important; }
  .mkt-hero h1 { font-size: 28px !important; }
  .feature-card { padding: 20px 18px !important; }
}

/* ============================================================================
   YT FINANCE BRAND ASSETS — single source of truth for the official logo.
   The asset files live in /assets/img/. Use these classes anywhere an
   `<img>` of the YT Finance logo appears.
   2026-06-21 brand rollout — replaces the ad-hoc text "YT<span>Finance</span>"
   markup with the real PNG brand mark + wordmark on every YT Finance
   system surface (auth, admin, lender chrome, marketing, errors, emails).
   Borrower-facing pages MUST NOT use this — they show the lender's brand
   only (see task #196).
   ============================================================================ */
.brand-mark, .brand-logo {
  display: inline-block;
  vertical-align: middle;
  height: auto;
  width: auto;
  image-rendering: -webkit-optimize-contrast;
}
/* MARK = icon-only "YT" glyph (no wordmark). Use in tight chrome:
   topbars, sidebar headers, nav, favicon-adjacent contexts. */
.brand-mark { height: 28px; }
.brand-mark--sm { height: 22px; }
.brand-mark--lg { height: 36px; }
.brand-mark--xl { height: 56px; }
/* LOGO = mark + "finance" wordmark stacked. Use where you want full,
   recognisable branding: hero of auth.html, 404/500 pages, footer,
   email templates, PDF cover. */
.brand-logo { height: 56px; }
.brand-logo--sm { height: 40px; }
.brand-logo--lg { height: 80px; }
.brand-logo--xl { height: 112px; }

/* Anchor the marketing nav logo to the new image so it doesn't ALSO
   render the old text. Replace text content with image — the existing
   anchor stays so the home-link still works. */
.mkt-nav .logo,
.landing-nav .logo,
.mkt-footer-brand .logo,
.topbar .logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  line-height: 0;
  /* Hide the old YT<span>Finance</span> text fallback if any HTML page
     still renders it under .logo without an <img>. Pages that include
     <img class="brand-mark"> inside .logo will display the image
     naturally. */
}
.mkt-nav .logo img.brand-mark { height: 30px; }
.mkt-nav .logo .wordmark { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--brand-900); margin-left: 10px; line-height: 1; }
.landing-nav .logo img.brand-mark { height: 30px; }
.mkt-footer-brand .logo img.brand-mark { height: 36px; }
.mkt-footer-brand .logo .wordmark { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: #fff; margin-left: 10px; line-height: 1; }
.topbar .logo img.brand-mark { height: 26px; }

@media (max-width: 760px) {
  .mkt-nav .logo img.brand-mark { height: 26px; }
  .mkt-nav .logo .wordmark { font-size: 16px; margin-left: 8px; }
  .mkt-footer-brand .logo img.brand-mark { height: 32px; }
  .brand-logo { height: 48px; }
  .brand-logo--lg { height: 64px; }
}

/* High-DPI safety net — even at full source resolution we want crisp
   rendering. The source PNGs are 538×488 / 538×328 so they already
   look sharp on retina, but anti-aliasing helps. */
.brand-mark, .brand-logo, .mkt-nav .logo img, .mkt-footer-brand .logo img {
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}
