:root {
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --bg-input: #f8fafc;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --green: #059669;
  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;
  --green-bright: #10b981;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --purple: #7c3aed;
  --purple-bg: #f5f3ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; color: var(--text); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-red { color: var(--red); }
.text-primary { color: var(--primary); }
.mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

/* ─── Layout ──────────────────────────────────────────────────────────────── */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── Hero Header ─────────────────────────────────────────────────────────── */

.hero-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f4c75 100%);
  color: #fff;
  padding: 0;
  margin: 0 -20px 28px;
  border-radius: 0;
}

.hero-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 28px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.topbar-logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.topbar-brand-name {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}

.hero-top-bar .nav-links { display: flex; gap: 18px; align-items: center; }
.hero-top-bar .nav-links a {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}
.hero-top-bar .nav-links a:hover { color: #fff; }

.hero-main {
  padding: 36px 28px 32px;
  text-align: center;
}

.hero-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  justify-content: center;
}

.hero-header .logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.hero-header .brand h1 {
  font-size: 1.75rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero-tagline {
  margin-top: 12px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.hero-trust-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
}

.trust-pill svg {
  color: #10b981;
  flex-shrink: 0;
}

.repo-rate-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  color: #6ee7b7;
  font-weight: 600;
}

.repo-rate-badge .dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── Cards ───────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 10px;
}

.card-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
}

.card-header .step-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── Form ────────────────────────────────────────────────────────────────── */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full { grid-column: 1 / -1; }

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group label .hint {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.form-group input,
.form-group select {
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder { color: var(--text-dim); }

.input-with-unit { position: relative; }
.input-with-unit input { padding-right: 54px; width: 100%; }
.input-with-unit .unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  pointer-events: none;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: #fff;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--text-dim);
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-block { width: 100%; padding: 14px; font-size: 0.95rem; }

/* ─── Toast ───────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast.toast-error { background: var(--red); color: #fff; }
.toast.toast-success { background: var(--green); color: #fff; }
.toast.toast-info { background: var(--primary); color: #fff; }

/* ─── Results ─────────────────────────────────────────────────────────────── */

#results { display: none; }
#results.visible { display: block; }

/* Same hide/show contract for the personal-loan results pane */
#plResults { display: none; }
#plResults.visible { display: block; }

.savings-hero {
  text-align: center;
  padding: 44px 28px;
  background: linear-gradient(160deg, var(--green-bg), var(--primary-light));
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.savings-hero .verdict {
  font-size: 0.8rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.savings-hero .big-number {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 8px 0 6px;
}
.savings-hero .sub {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-box .stat-label { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.stat-box .stat-value { font-size: 1.4rem; font-weight: 800; }
.stat-box .stat-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }

/* ─── Action Cards ────────────────────────────────────────────────────────── */

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.action-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.action-card.action-green::before { background: var(--green); }
.action-card.action-amber::before { background: var(--amber); }
.action-card.action-blue::before { background: var(--primary); }
.action-card.action-purple::before { background: var(--purple); }

.action-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.action-header h3 { font-size: 1rem; }

.action-effort {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.effort-low { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.effort-medium { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }

.action-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 18px; line-height: 1.7; }

.action-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.action-stat {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.action-stat .as-label { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; }
.action-stat .as-value { font-size: 1.05rem; font-weight: 800; margin-top: 3px; }
.action-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── Balance Transfer Table ──────────────────────────────────────────────── */

.bt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.bt-table th {
  text-align: left;
  padding: 12px 14px;
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}

.bt-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.bt-table tr:last-child td { border-bottom: none; }
.bt-table tr:hover td { background: var(--bg); }

.bt-bank-name { font-weight: 600; color: var(--text); }
.bt-bank-type { font-size: 0.7rem; color: var(--text-dim); }
.bt-rate { font-weight: 800; color: var(--green); font-size: 1rem; }
.bt-saving { font-weight: 600; color: var(--green); }
.bt-negative { color: var(--text-dim); }
.bt-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.row-cheaper { background: var(--green-bg); }
.row-cheaper:hover { background: #d1fae5 !important; }
.row-same { background: var(--amber-bg); }
.row-same:hover { background: #fef3c7 !important; }
.row-expensive { opacity: 0.5; }
.row-expensive:hover { opacity: 0.75; }

.bt-rate-range { font-size: 0.68rem; color: var(--text-dim); font-weight: 400; margin-top: 2px; }

.market-legend {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-cheaper { background: var(--green); }
.legend-same { background: var(--amber); }
.legend-expensive { background: var(--text-dim); opacity: 0.4; }

/* ─── Prepayment Grid ─────────────────────────────────────────────────────── */

.prepay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.prepay-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.prepay-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.prepay-card.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.04);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.prepay-card .pp-extra { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 3px; }
.prepay-card .pp-amount { font-size: 1.15rem; font-weight: 800; color: var(--primary); }
.prepay-card .pp-divider { width: 20px; height: 2px; background: var(--border); margin: 12px auto; }
.prepay-card .pp-stat-label { font-size: 0.68rem; color: var(--text-dim); }
.prepay-card .pp-stat-value { font-size: 0.9rem; font-weight: 700; margin-top: 2px; }
.prepay-card .pp-stat-value.text-green { color: var(--green); }
.prepay-card .pp-stats { display: flex; flex-direction: column; gap: 10px; }
.prepay-card .pp-hint {
  font-size: 0.65rem;
  color: var(--primary);
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}
.prepay-card:hover .pp-hint { opacity: 1; }

/* ─── Prepay Detail Panel ────────────────────────────────────────────────── */

.prepay-detail { margin-top: 20px; }

.ppd-header { margin-bottom: 16px; }
.ppd-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-body);
  margin: 0 0 4px;
}
.ppd-sub { font-size: 0.78rem; color: var(--text-dim); margin: 0; }

.ppd-comparison {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ppd-col {
  flex: 1;
  padding: 14px 18px;
}
.ppd-before { background: var(--bg); }
.ppd-after { background: rgba(16, 185, 129, 0.04); }
.ppd-col-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.ppd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.8rem;
}
.ppd-row span { color: var(--text-dim); }
.ppd-row strong { color: var(--text-body); }
.ppd-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 700;
  padding: 0 4px;
  background: var(--card-bg);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.ppd-savings-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.ppd-savings-item {
  background: var(--bg);
  padding: 12px 10px;
  text-align: center;
}
.ppd-savings-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.ppd-savings-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--green);
}

@media (max-width: 640px) {
  .ppd-comparison { flex-direction: column; }
  .ppd-arrow {
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 4px 0;
    font-size: 0.9rem;
    transform: rotate(90deg);
  }
  .ppd-savings-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ─── PDF Upload (compact) ────────────────────────────────────────────────── */

.pdf-upload-compact { margin-bottom: 0; }

.pdf-compact-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-compact-label { font-size: 0.8rem; color: var(--text-dim); }

.pdf-status {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}
.pdf-status.loading { background: var(--primary-light); color: var(--primary); border: 1px solid #bfdbfe; }
.pdf-status.success { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.pdf-status.partial { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.pdf-status.error { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }

/* ─── Info Banner ─────────────────────────────────────────────────────────── */

.info-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.info-banner.info { background: var(--primary-light); border: 1px solid #bfdbfe; color: var(--text-muted); }
.info-banner.success { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green); }
.info-banner.warning { background: var(--amber-bg); border: 1px solid var(--amber-border); color: var(--amber); }
.info-banner strong { color: var(--text); }

/* ─── Help Panel ──────────────────────────────────────────────────────────── */

.help-panel {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.help-panel h3 { font-size: 0.92rem; margin-bottom: 14px; color: var(--primary); }

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.help-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.help-item-title { font-weight: 600; font-size: 0.82rem; margin-bottom: 6px; color: var(--text); }
.help-item-body { font-size: 0.78rem; color: var(--text-muted); line-height: 1.6; }
.help-item-body ul { margin: 6px 0 0 16px; padding: 0; }
.help-item-body li { margin-bottom: 3px; }
.help-item-body strong { color: var(--text); }

/* ─── Dual Select ─────────────────────────────────────────────────────────── */

.dual-select { display: flex; gap: 8px; }
.dual-select select {
  flex: 1;
  padding: 11px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  appearance: auto;
}
.dual-select select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ─── Computed Section ────────────────────────────────────────────────────── */

.computed-section {
  margin: 24px 0 0;
  padding: 20px;
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
}

.computed-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.computed-icon { font-size: 1rem; }

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  padding: 0;
}
.btn-link:hover { color: var(--primary-hover); }

.approx-warning {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.approx-warning strong { color: var(--text); }

.field-hint { font-size: 0.72rem; color: var(--text-dim); margin-top: 3px; }
.required-star { color: var(--red); font-weight: 700; }
.computed-section .form-grid { margin-top: 0; }

/* ─── Negotiation Steps ───────────────────────────────────────────────────── */

.negotiation-steps {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 12px 0 4px;
}
.neg-steps-title { font-weight: 600; font-size: 0.82rem; margin-bottom: 6px; }
.neg-steps-list { margin: 0; padding-left: 20px; font-size: 0.8rem; line-height: 1.7; color: var(--text-muted); }
.neg-steps-list li { margin-bottom: 3px; }
.neg-steps-list li:last-child { margin-bottom: 0; }

/* ─── Lead Capture ────────────────────────────────────────────────────────── */

.lead-capture {
  margin-top: 24px;
  background: linear-gradient(135deg, var(--primary-light), var(--green-bg));
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 20px;
}
.lead-capture-inner { display: flex; flex-direction: column; gap: 12px; }
.lead-capture-text strong { font-size: 0.92rem; }
.lead-capture-text p { margin: 3px 0 0; font-size: 0.8rem; color: var(--text-muted); }
.lead-capture-form { display: flex; gap: 8px; align-items: center; }
.lead-input {
  flex: 1;
  max-width: 200px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}
.lead-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.lead-status { font-size: 0.8rem; color: var(--text-muted); }

@media (min-width: 600px) {
  .lead-capture-inner { flex-direction: row; align-items: center; }
  .lead-capture-text { flex: 1; }
}

/* ─── Letter Modal ────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s;
}
.modal-close:hover { background: var(--border); }

.modal-body { padding: 24px; overflow-y: auto; flex: 1; }

.letter-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.letter-form .form-group label { font-size: 0.75rem; }
.letter-form .form-group input { padding: 9px 12px; font-size: 0.85rem; }

.letter-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-height: 380px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ─── Detail Modal (wider, for prepayment / lumpsum detail popups) ────────── */

.modal-detail { max-width: 720px; }
.modal-detail .modal-body { padding: 0; }

.modal-detail .ppd-header,
.modal-detail .next-steps-box,
.modal-detail .lumpsum-result-grid { margin-left: 24px; margin-right: 24px; }

.modal-detail .ppd-header { padding-top: 20px; }
.modal-detail .next-steps-box { padding-bottom: 4px; margin-bottom: 8px; }

.modal-detail .ppd-comparison { margin: 0; }
.modal-detail .ppd-savings-bar { margin: 0; border-radius: 0; }

.modal-detail .lumpsum-result-grid { padding-top: 20px; }
.modal-detail .lumpsum-popup-next-steps { padding: 0 24px 12px; }

/* ─── Lumpsum Calculator ──────────────────────────────────────────────────── */

.lumpsum-section { padding: 4px 0; }
.lumpsum-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}
.lumpsum-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.lumpsum-result-card {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.lr-label { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 4px; text-transform: uppercase; }
.lr-value { font-size: 1.2rem; font-weight: 700; color: var(--green); }
.lr-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }

/* ─── Next Steps Box ─────────────────────────────────────────────────────── */

.next-steps-box {
  margin-top: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
}
.next-steps-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.next-steps-box h4::before {
  content: '📋';
  font-size: 1.1rem;
}
.next-steps-list {
  list-style: none;
  counter-reset: steps;
  padding: 0;
  margin: 0;
}
.next-steps-list li {
  counter-increment: steps;
  position: relative;
  padding: 10px 0 10px 42px;
  font-size: 0.82rem;
  color: var(--text-body);
  line-height: 1.55;
  border-bottom: 1px solid var(--border);
}
.next-steps-list li:last-child { border-bottom: none; }
.next-steps-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.next-steps-tip {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  font-size: 0.78rem;
  color: var(--text-body);
  line-height: 1.5;
}
.next-steps-tip + .next-steps-tip { margin-top: 8px; }
.source-link {
  font-size: 0.68rem;
  color: var(--primary);
  opacity: 0.7;
  text-decoration: none;
  border-bottom: 1px dotted;
}
.source-link:hover { opacity: 1; }

/* ─── BT Inquiry Modal ───────────────────────────────────────────────────── */

.modal-bt-inquiry { max-width: 560px; }
.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.form-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-weight: 600;
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.form-section-label:first-child { margin-top: 0; }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bt-inq-form .form-group { margin-bottom: 10px; }
.bt-inq-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 4px;
}
.bt-inq-form .required { color: #ef4444; }
.form-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-body);
  font-size: 0.82rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.form-input.readonly {
  background: rgba(99, 102, 241, 0.04);
  color: var(--text-dim);
  cursor: default;
}
textarea.form-input { resize: vertical; min-height: 60px; }

.email-flow-info {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.email-flow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.78rem;
  color: var(--text-body);
  flex-wrap: wrap;
}
.email-flow-row + .email-flow-row { border-top: 1px solid rgba(99, 102, 241, 0.08); }
.efl {
  font-weight: 700;
  color: var(--text-dim);
  min-width: 72px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.efl-sub { color: var(--text-muted); font-size: 0.72rem; }
.modal-footer-bt { gap: 8px; }
.modal-footer-bt .btn { flex: none; }

.bt-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 640px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .modal-bt-inquiry { margin: 12px; }
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f4c75 100%);
  color: rgba(255, 255, 255, 0.8);
  margin: 48px -20px 0;
  padding: 0;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 40px 36px;
  max-width: 960px;
  margin: 0 auto;
}

.footer-brand-col { display: flex; flex-direction: column; gap: 12px; }

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.footer-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.footer-brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.footer-tagline {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  margin: 0;
}

.footer-trust-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.footer-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}
.footer-trust-item svg { color: #10b981; opacity: 0.7; }

.footer-links-col h4 {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-links-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.2s;
}
.footer-links-col ul li a:hover { color: #fff; }

.footer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-contact-item svg { opacity: 0.5; flex-shrink: 0; }

.footer-disclaimer {
  padding: 16px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
  line-height: 1.6;
}

.footer-bottom {
  padding: 16px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
}

/* Legacy footer (terms/privacy pages) */
footer:not(.site-footer) {
  margin-top: 48px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--border);
  text-align: center;
}
footer:not(.site-footer) .footer-content p { color: var(--text-dim); font-size: 0.72rem; }
.footer-links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.72rem;
}
.footer-links a { color: var(--text-dim); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-sep { color: var(--text-dim); opacity: 0.3; }

/* ─── Spinner ─────────────────────────────────────────────────────────────── */

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Legal Page Header ──────────────────────────────────────────────────── */

.legal-header {
  margin: 0 -20px 28px;
}

.legal-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 28px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f4c75 100%);
  font-size: 0.75rem;
}
.legal-top-bar .topbar-brand-name { color: #fff; }
.legal-top-bar .nav-links { display: flex; gap: 18px; }
.legal-top-bar .nav-links a {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.legal-top-bar .nav-links a:hover { color: #fff; }

/* ─── Legal Pages ─────────────────────────────────────────────────────────── */

.legal-page h2 { font-size: 1.4rem; margin-bottom: 8px; }
.legal-page h3 { margin-top: 28px; margin-bottom: 10px; }
.legal-page h4 { margin-top: 20px; margin-bottom: 8px; font-size: 0.92rem; }
.legal-page p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.7; margin-bottom: 10px; }
.legal-page ul { color: var(--text-muted); font-size: 0.85rem; line-height: 1.8; margin: 8px 0 16px 20px; }
.legal-page code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .hero-top-bar { flex-wrap: wrap; gap: 8px; justify-content: center; padding: 8px 16px; }
  .topbar-brand { display: none; }
  .hero-main { padding: 24px 16px 22px; }
  .hero-header .brand h1 { font-size: 1.35rem; }
  .hero-tagline { font-size: 0.9rem; }
  .hero-trust-pills { gap: 8px; }
  .trust-pill { font-size: 0.7rem; padding: 5px 10px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .action-stats { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .savings-hero .big-number { font-size: 2rem; }
  .savings-hero { padding: 32px 20px; }
  h1 { font-size: 1.2rem; }
  .card { padding: 24px 18px; }
  .prepay-grid { grid-template-columns: 1fr 1fr; }
  .bt-table { font-size: 0.75rem; }
  .bt-table th, .bt-table td { padding: 8px; }
  .help-grid { grid-template-columns: 1fr; }
  .lumpsum-input-row { grid-template-columns: 1fr; }
  .modal-footer { justify-content: center; }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
    padding: 32px 24px 28px;
  }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-disclaimer, .footer-bottom { padding: 14px 24px; }
  .hero-top-bar .nav-links { gap: 12px; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
  .prepay-grid { grid-template-columns: 1fr; }
  .savings-hero { padding: 24px 14px; }
  .savings-hero .big-number { font-size: 1.8rem; }
  .footer-main { grid-template-columns: 1fr; gap: 24px; padding: 28px 20px; }
  .footer-disclaimer, .footer-bottom { padding: 12px 20px; }
  .hero-top-bar .nav-links { gap: 8px; }
  .hero-top-bar .nav-links a { font-size: 0.68rem; }
}

/* ─── Products Dropdown (Nav) ─────────────────────────────────────────────── */
.nav-dropdown { position: relative; display: inline-flex; }
.nav-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0; border: none; background: transparent;
  color: rgba(255,255,255,0.75); font-size: 0.75rem; font-weight: 500;
  font-family: inherit; cursor: pointer; transition: color 0.2s;
}
.nav-dropdown-trigger:hover, .nav-dropdown.open .nav-dropdown-trigger { color: #fff; }
.nav-dropdown-trigger svg { opacity: 0.7; transition: transform 0.2s; }
.nav-dropdown.open .nav-dropdown-trigger svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 320px; padding: 8px;
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; box-shadow: 0 12px 36px rgba(0,0,0,0.18);
  display: none; z-index: 100; opacity: 0; transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.nav-dropdown.open .nav-dropdown-menu {
  display: block; opacity: 1; transform: translateY(0);
}
.nav-dropdown-menu a {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 14px; border-radius: 8px;
  text-decoration: none; color: #0f172a;
  transition: background 0.15s;
}
.nav-dropdown-menu a:hover { background: #f1f5f9; color: #0f172a; }
.nav-dropdown-menu a.active { background: #eff6ff; }
.nav-dd-title {
  font-size: 0.86rem; font-weight: 600; color: #0f172a;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-dd-sub { font-size: 0.72rem; color: #64748b; font-weight: 400; }
.nav-dd-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: linear-gradient(135deg, #10b981, #3b82f6); color: #fff;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.03em;
}

/* Light-background variants (for blog/privacy/terms pages where nav is on white) */
.blog-top-bar .nav-dropdown-trigger,
.legal-top-bar .nav-dropdown-trigger { color: #475569; }
.blog-top-bar .nav-dropdown-trigger:hover,
.legal-top-bar .nav-dropdown-trigger:hover,
.blog-top-bar .nav-dropdown.open .nav-dropdown-trigger,
.legal-top-bar .nav-dropdown.open .nav-dropdown-trigger { color: #0f172a; }

/* ─── Hero Loan-Type Segmented Selector ──────────────────────────────────── */
.loan-type-selector {
  display: inline-flex;
  gap: 4px;
  margin: 14px auto 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.lts-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: background 0.18s, color 0.18s, transform 0.12s;
  white-space: nowrap;
}
.lts-pill:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.lts-pill.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.lts-pill svg { opacity: 0.9; flex-shrink: 0; }
.lts-pill.active svg { color: var(--primary); opacity: 1; }
.lts-badge {
  display: inline-block; padding: 1px 7px;
  border-radius: 4px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  color: #fff;
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em;
  margin-left: 2px;
}
.lts-pill.active .lts-badge {
  background: linear-gradient(135deg, #059669, #2563eb);
}
@media (max-width: 480px) {
  .loan-type-selector { width: calc(100% - 16px); justify-content: center; }
  .lts-pill { padding: 8px 12px; font-size: 0.78rem; }
}

/* ─── Personal Loan page specifics ────────────────────────────────────────── */
.rbi-hero-callout {
  margin: 16px auto 0; max-width: 640px;
  padding: 14px 18px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(16,185,129,0.16), rgba(59,130,246,0.12));
  border: 1px solid rgba(110,231,183,0.4);
  color: #e6fffa; font-size: 0.84rem; line-height: 1.5;
  text-align: left;
}
.rbi-hero-callout strong { color: #fff; }
.rbi-hero-callout a { color: #a7f3d0; text-decoration: underline; }

.rights-card {
  border: 1px solid var(--green-border);
  background: linear-gradient(135deg, var(--green-bg), #fff);
  padding: 24px 26px; border-radius: var(--radius);
  margin-bottom: 24px;
}
.rights-card.warn { border-color: var(--amber-border); background: linear-gradient(135deg, var(--amber-bg), #fff); }
.rights-card.neutral { border-color: var(--border); background: var(--bg-card); }
.rights-card .rights-label {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  background: var(--green); color: #fff;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.rights-card.warn .rights-label { background: var(--amber); }
.rights-card.neutral .rights-label { background: var(--text-dim); }
.rights-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.rights-card p { color: var(--text-muted); font-size: 0.9rem; }
.rights-card .rights-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 8px 14px; border-radius: 8px;
  background: var(--green); color: #fff; text-decoration: none;
  font-size: 0.82rem; font-weight: 600; border: none; cursor: pointer;
  font-family: inherit;
}
.rights-card.warn .rights-cta { background: var(--amber); }

.foreclose-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin: 20px 0;
}
.foreclose-tile {
  padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-input);
}
.foreclose-tile .label {
  font-size: 0.7rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
}
.foreclose-tile .value { font-size: 1.3rem; font-weight: 800; margin-top: 4px; }
.foreclose-tile .value.green { color: var(--green); }
.foreclose-tile .value.red { color: var(--red); }
.foreclose-tile .value.amber { color: var(--amber); }
.foreclose-tile .sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }

.partpay-scenario-row {
  display: grid; grid-template-columns: 60px 1fr 1fr 1fr 1fr;
  gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  align-items: center; font-size: 0.82rem;
}
.partpay-scenario-row:first-child {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-dim); font-weight: 600;
}
.partpay-scenario-row .pct { font-weight: 700; color: var(--primary); }

.rate-type-toggle {
  display: inline-flex; background: var(--bg-card-alt);
  border-radius: 999px; padding: 3px; border: 1px solid var(--border);
}
.rate-type-toggle button {
  padding: 6px 14px; border: none; border-radius: 999px;
  background: transparent; color: var(--text-muted);
  font-size: 0.78rem; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.rate-type-toggle button.active {
  background: var(--primary); color: #fff;
}

.sources-strip {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
  font-size: 0.7rem; color: var(--text-dim);
}
.sources-strip a {
  color: var(--primary); text-decoration: none;
  border-bottom: 1px dotted var(--primary); padding-bottom: 1px;
}
.sources-strip a:hover { color: var(--primary-hover); }

@media (max-width: 640px) {
  .nav-dropdown-menu { min-width: 260px; left: -40px; }
  .partpay-scenario-row { grid-template-columns: 50px 1fr 1fr; gap: 8px; font-size: 0.75rem; }
  .partpay-scenario-row > *:nth-child(4), .partpay-scenario-row > *:nth-child(5) { display: none; }
}

/* ─── Quick Rate Check ────────────────────────────────────────────────── */

.quick-check-card {
  background: linear-gradient(160deg, #ffffff 0%, var(--primary-light) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.quick-check-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.qc-header {
  text-align: center;
  margin-bottom: 22px;
  position: relative;
}

.qc-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.qc-title {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.qc-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 480px;
  margin: 0 auto;
}

.qc-form { position: relative; }

.qc-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr auto;
  gap: 12px;
  align-items: end;
}

.qc-field { display: flex; flex-direction: column; gap: 6px; }
.qc-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.qc-field select,
.qc-field input {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.qc-field select:focus,
.qc-field input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.qc-input-wrap { position: relative; }
.qc-input-wrap input { padding-right: 56px; }
.qc-unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  pointer-events: none;
}

.qc-cta {
  padding: 12px 22px;
  font-size: 0.92rem;
  white-space: nowrap;
  height: 46px;
  font-weight: 700;
}

.qc-helper-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.qc-helper-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}
.qc-helper-item svg { color: var(--green); }

/* Quick Check Result */
.qc-result {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  animation: qcSlideIn 0.35s ease-out;
}

@keyframes qcSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.qc-result.qc-result-overpaying { border-color: var(--red-border); background: linear-gradient(180deg, var(--red-bg), #fff); }
.qc-result.qc-result-warn { border-color: var(--amber-border); background: linear-gradient(180deg, var(--amber-bg), #fff); }
.qc-result.qc-result-good { border-color: var(--green-border); background: linear-gradient(180deg, var(--green-bg), #fff); }

.qc-result-verdict {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.qc-result-overpaying .qc-result-verdict { color: var(--red); }
.qc-result-warn .qc-result-verdict { color: var(--amber); }
.qc-result-good .qc-result-verdict { color: var(--green); }

.qc-result-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: baseline;
  margin-bottom: 12px;
}

.qc-num-block { display: flex; flex-direction: column; gap: 2px; }
.qc-num-big {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.qc-num-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.qc-result-overpaying .qc-num-big { color: var(--red); }
.qc-result-warn .qc-num-big { color: var(--amber); }
.qc-result-good .qc-num-big { color: var(--green); }

.qc-result-detail {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.55;
}
.qc-result-detail strong { color: var(--text); }

.qc-result-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.qc-result-foot {
  font-size: 0.74rem;
  color: var(--text-dim);
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .quick-check-card { padding: 22px 18px; }
  .qc-title { font-size: 1.25rem; }
  .qc-grid { grid-template-columns: 1fr; gap: 14px; }
  .qc-cta { width: 100%; }
  .qc-result-numbers { gap: 18px; }
  .qc-num-big { font-size: 1.65rem; }
}

/* ─── Quick Check → Full Form: secondary entry points ──────────────── */

.qc-secondary-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.qc-skip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.82rem;
  color: var(--primary);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.qc-skip-link:hover { background: rgba(37, 99, 235, 0.08); }
.qc-skip-link strong { font-weight: 700; }

.qc-skip-link-muted {
  color: var(--text-muted, #6b7280);
  font-size: 0.78rem;
}
.qc-skip-link-muted:hover { color: var(--text); }

/* ─── Input Card progressive disclosure ────────────────────────────── */

.input-card-collapsed { display: none !important; }

.input-card-revealing {
  animation: inputCardReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes inputCardReveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.input-card-intro {
  margin: -4px 0 18px;
  color: var(--text-muted, #6b7280);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ─── QC Summary Chip (shown inside input card when coming from QC) ── */

.qc-summary-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin: 0 0 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 10px;
  animation: chipFadeIn 0.4s ease both;
}

@keyframes chipFadeIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.qc-chip-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  color: var(--success, #10b981);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.qc-chip-content {
  flex: 1;
  min-width: 0;
}

.qc-chip-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 2px;
}

.qc-chip-values {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.qc-chip-values strong { font-weight: 600; }

.qc-chip-edit {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 6px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.qc-chip-edit:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.qc-duplicate-hidden { display: none !important; }

@media (max-width: 620px) {
  .qc-summary-chip { padding: 10px 12px; gap: 10px; }
  .qc-chip-title { font-size: 0.65rem; }
  .qc-chip-values { font-size: 0.85rem; }
  .qc-chip-edit { padding: 5px 10px; font-size: 0.78rem; }
  .qc-secondary-row { flex-direction: column; gap: 6px; }
}

/* ─── Sample Report Preview ───────────────────────────────────────────── */

.sample-report {
  margin-bottom: 24px;
}

.sample-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s;
  color: var(--text);
}
.sample-toggle:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.sample-toggle-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sample-toggle-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light);
  border-radius: 10px;
  color: var(--primary);
  flex-shrink: 0;
}

.sample-toggle-left strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.sample-toggle-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.sample-toggle-chevron {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.sample-toggle[aria-expanded="true"] .sample-toggle-chevron { transform: rotate(180deg); }

.sample-panel {
  margin-top: 12px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  animation: qcSlideIn 0.3s ease-out;
}

.sample-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed var(--amber-border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--amber);
  font-weight: 500;
  margin-bottom: 20px;
}
.sample-banner svg { flex-shrink: 0; }

.sample-hero {
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(160deg, var(--green-bg), var(--primary-light));
  border: 1px solid var(--green-border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.sample-hero-verdict {
  font-size: 0.72rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}
.sample-hero-big {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green);
  margin: 6px 0 4px;
  letter-spacing: -0.02em;
}
.sample-hero-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sample-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.sample-stat {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.sample-stat-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 4px;
}
.sample-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.sample-stat-value.sample-stat-green { color: var(--green); }
.sample-stat-unit { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.sample-stat-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sample-action-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: #fff;
  margin-bottom: 10px;
}

.sample-action-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sample-action-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sample-action-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.sample-action-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.sample-action-saving {
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--green);
  white-space: nowrap;
}

.sample-table-wrap {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.sample-table-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.sample-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 700;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.sample-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
}
.sample-table tr:last-child td { border-bottom: none; }
.sample-rate-good { color: var(--green); font-weight: 700; }
.sample-rate-warn { color: var(--amber); font-weight: 700; }
.sample-table-foot td {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  padding-top: 12px;
}

.sample-letter {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}
.sample-letter-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card-alt);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.sample-letter-head strong { color: var(--text); }
.sample-letter-pill {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sample-letter-body {
  padding: 14px 16px;
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.sample-letter-body > div { margin-bottom: 6px; }
.sample-letter-line {
  height: 8px;
  background: linear-gradient(90deg, var(--bg-card-alt) 0%, var(--bg-card-alt) 60%, transparent 100%);
  border-radius: 4px;
  margin: 6px 0;
}
.sample-letter-line.short { width: 40%; }

.sample-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .sample-panel { padding: 16px; }
  .sample-stat-grid { grid-template-columns: 1fr; }
  .sample-hero-big { font-size: 1.9rem; }
  .sample-action-head { flex-wrap: wrap; }
  .sample-action-saving { margin-left: 38px; }
  .sample-toggle { padding: 14px 16px; }
}

/* ─── Live Bank Rates Ticker ──────────────────────────────────────────── */

.rate-ticker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 28px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.rate-ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #6ee7b7;
  flex-shrink: 0;
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.rate-ticker-dot {
  width: 6px; height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.rate-ticker-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.rate-ticker-track {
  display: inline-flex;
  gap: 32px;
  white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
  will-change: transform;
}
.rate-ticker:hover .rate-ticker-track { animation-play-state: paused; }

.rate-ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}
.rate-ticker-name {
  font-weight: 600;
  color: #fff;
}
.rate-ticker-rate {
  font-weight: 700;
  color: #6ee7b7;
  font-family: 'JetBrains Mono', monospace;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 640px) {
  .rate-ticker { padding: 8px 16px; }
  .rate-ticker-label { font-size: 0.62rem; padding-right: 10px; }
}

/* ─── Social Proof Stats Strip ────────────────────────────────────────── */

.stats-strip {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 12px;
  padding: 20px 28px;
  margin-bottom: 18px;
  background: linear-gradient(120deg, #0f172a 0%, #1e3a5f 100%);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.stats-strip::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.stats-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.stats-strip-num {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #dbeafe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.stats-strip-num.stats-strip-green {
  background: linear-gradient(135deg, #6ee7b7 0%, #10b981 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stats-strip-suffix {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0;
}

.stats-strip-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.stats-strip-divider {
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .stats-strip { padding: 16px 14px; flex-wrap: wrap; gap: 14px; }
  .stats-strip-divider { display: none; }
  .stats-strip-item { flex: 0 0 calc(50% - 8px); }
  .stats-strip-num { font-size: 1.35rem; }
  .stats-strip-label { font-size: 0.66rem; }
}

/* ─── How It Works ────────────────────────────────────────────────────── */

.how-it-works {
  margin-bottom: 18px;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.hiw-header { text-align: center; margin-bottom: 22px; }
.hiw-eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.hiw-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hiw-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
}

.hiw-step {
  padding: 20px 18px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
  text-align: center;
  position: relative;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.hiw-step:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.hiw-step-num {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}
.hiw-step-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--primary);
  margin-bottom: 12px;
  margin-top: 4px;
}
.hiw-step-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.hiw-step-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hiw-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

@media (max-width: 720px) {
  .hiw-grid { grid-template-columns: 1fr; gap: 18px; }
  .hiw-arrow { transform: rotate(90deg); padding: 2px 0; }
}

/* ─── Scroll Reveal Animations ────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .rate-ticker-track { animation: none; }
}

/* ─── Slideshow (Sample Report Tabs) ──────────────────────────────────── */

.slideshow-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.slideshow-tabs::-webkit-scrollbar { display: none; }

.slide-tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--text-muted);
  transition: all 0.2s;
  white-space: nowrap;
}
.slide-tab:hover { background: rgba(37, 99, 235, 0.05); color: var(--text); }
.slide-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.slide-tab-num {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.7;
  font-family: 'JetBrains Mono', monospace;
}
.slide-tab-label {
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.slideshow-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.slideshow-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.slideshow-slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 22px;
  box-sizing: border-box;
}

.slide-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-align: center;
  padding: 10px 14px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
}

.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.18s;
  z-index: 2;
  font-family: inherit;
}
.slide-arrow:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.06);
}
.slide-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: translateY(-50%);
}
.slide-arrow-prev { left: 10px; }
.slide-arrow-next { right: 10px; }

.slideshow-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 4px 0;
}
.slide-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}
.slide-dot:hover { background: var(--text-dim); }
.slide-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 999px;
}

@media (max-width: 640px) {
  .slide-tab-label { font-size: 0.78rem; }
  .slide-tab { padding: 8px 10px; }
  .slideshow-slide { padding: 16px 14px; }
  .slide-arrow { width: 32px; height: 32px; }
  .slide-arrow-prev { left: 6px; }
  .slide-arrow-next { right: 6px; }
}
