:root {
  --bg: #0a0f14;
  --bg-elevated: #111a22;
  --bg-card: #141f28;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eef4;
  --text-muted: #8fa3b8;
  --accent: #3dd6c6;
  --accent-dim: rgba(61, 214, 198, 0.15);
  --accent-glow: rgba(61, 214, 198, 0.35);
  --gold: #e8c468;
  --danger: #f07178;
  --success: #7fd99a;
  --warning: #e8c468;
  --radius: 14px;
  --radius-sm: 8px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(61, 214, 198, 0.07), transparent),
    radial-gradient(ellipse 50% 40% at 100% 50%, rgba(232, 196, 104, 0.04), transparent);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-width: 320px;
}

main {
  display: block;
  width: 100%;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Typography */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.section-head {
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.section-head p:last-child {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 15, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  z-index: 102;
}

.logo-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
}

.logo-icon { color: var(--accent); font-size: 1.25rem; flex-shrink: 0; }

.logo-ke {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  min-width: 0;
  flex: 1;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition);
}

.nav-list a:hover { color: var(--text); }

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  z-index: 102;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #52e8d8;
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

/* Hero */
.hero {
  position: relative;
  padding: calc(68px + 3.5rem) 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, var(--accent-dim), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(232, 196, 104, 0.08), transparent);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 2.5rem;
  align-items: start;
  position: relative;
}

.hero-content {
  min-width: 0;
}

.hero-lead {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.1rem);
  max-width: 34rem;
  margin: 1.25rem 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  max-width: 32rem;
}

.stat strong {
  display: block;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text);
}

.stat span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  min-width: 0;
}

.hero-card h3 {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-result {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  text-align: center;
}

.hero-result .label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.hero-result .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-insight {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 0.75rem;
  text-align: center;
  line-height: 1.45;
  min-height: 2.5em;
}

.hero-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

/* Fields */
.field { margin-bottom: 1.25rem; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.field input[type="number"],
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.field input.invalid,
.field select.invalid {
  border-color: var(--danger);
}

.field input[type="range"] {
  width: 100%;
  height: 6px;
  margin: 0.75rem 0 0.35rem;
  appearance: none;
  background: var(--bg-elevated);
  border-radius: 999px;
  outline: none;
}

.field input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--accent-dim);
  cursor: pointer;
}

.field input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-card);
  cursor: pointer;
}

.field output {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.field select option {
  background: var(--bg-card);
  color: var(--text);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  line-height: 1.45;
}

@media (min-width: 901px) {
  .assistant.card {
    position: sticky;
    top: 88px;
  }
}

.required-mark { color: var(--danger); }

.id-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.id-upload-box {
  position: relative;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  transition: border-color var(--transition);
}

.id-upload-box.has-file {
  border-style: solid;
  border-color: var(--accent);
}

.id-upload-box.uploading { opacity: 0.7; pointer-events: none; }

.id-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.id-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 1rem 0.5rem;
}

.id-upload-box.has-file .id-upload-label { display: none; }

.id-upload-icon { font-size: 1.5rem; opacity: 0.7; }
.id-upload-title { font-weight: 600; font-size: 0.9rem; }
.id-upload-hint { font-size: 0.75rem; color: var(--text-muted); }

.id-preview img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.id-preview .id-remove {
  background: none;
  border: none;
  color: var(--danger);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

.id-upload-status {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  min-height: 1.1em;
}

.id-upload-status.ok { color: var(--success); }
.id-upload-status.err { color: var(--danger); }

.selfie-upload-wrap {
  max-width: 280px;
}

.selfie-box .id-preview img {
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.field output {
  display: block;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Cards & sections */
.section { padding: clamp(3.5rem, 8vw, 5rem) 0; }
.section-alt { background: var(--bg-elevated); }

.section + .section-alt,
.section-alt + .section {
  border-top: 1px solid var(--border);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* Calculator */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.result-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.result-card .label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.result-card .value {
  font-size: 1.35rem;
  font-weight: 700;
}

.result-card.highlight {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.result-card.highlight .value { color: var(--accent); }

.smart-insights {
  margin-bottom: 1rem;
  border-color: rgba(61, 214, 198, 0.2);
  background: linear-gradient(135deg, var(--accent-dim), transparent);
}

.smart-insights h4 {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.smart-insights ul {
  list-style: none;
}

.smart-insights li {
  padding: 0.5rem 0 0.5rem 1.25rem;
  position: relative;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.smart-insights li:first-child { border-top: none; }

.smart-insights li::before {
  content: "◆";
  position: absolute;
  left: 0;
  font-size: 0.55rem;
  top: 0.75rem;
}

.smart-insights .insight-success::before { color: var(--success); }
.smart-insights .insight-warning::before { color: var(--warning); }
.smart-insights .insight-tip::before { color: var(--accent); }

.chart-wrap, .table-wrap { margin-top: 1rem; }
.chart-wrap h4, .table-wrap h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 500;
}

.table-scroll { overflow-x: auto; }

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

th, td {
  padding: 0.6rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 500;
  text-align: right;
}

th:first-child, td:first-child { text-align: left; }

/* Matcher */
.matcher-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.5rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover { border-color: var(--accent); color: var(--text); }

.chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.matcher-result { min-height: 400px; }

.matcher-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 360px;
  color: var(--text-muted);
  padding: 2rem;
}

.matcher-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.hidden { display: none !important; }

.match-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.match-desc {
  color: var(--text-muted);
  margin: 0.75rem 0 1.5rem;
}

.match-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.match-metrics .label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.match-metrics .value {
  font-weight: 700;
  font-size: 1.1rem;
}

.match-reasons {
  list-style: none;
  margin-bottom: 1.5rem;
}

.match-reasons li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.match-reasons li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Eligibility */
.elig-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.dti-gauge {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
}

.gauge-svg { transform: rotate(-90deg); width: 100%; height: 100%; }

.gauge-bg {
  fill: none;
  stroke: var(--bg);
  stroke-width: 10;
}

.gauge-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 0.8s ease, stroke 0.3s;
}

.gauge-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.gauge-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.elig-verdict {
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.elig-verdict strong { color: var(--accent); }

.elig-tips {
  list-style: none;
}

.elig-tips li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Compare */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  min-height: 120px;
}

.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.compare-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.compare-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 32px var(--accent-dim);
}

.compare-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.compare-card .rate {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.75rem 0;
}

.compare-card ul {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.compare-card li {
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.compare-card li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Checklist */
.progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 999px;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.check-items { list-style: none; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.check-item:hover { background: rgba(255,255,255,0.02); }

.check-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  margin-top: 2px;
  cursor: pointer;
}

.check-item.done label { text-decoration: line-through; color: var(--text-muted); }

.check-item label {
  flex: 1;
  cursor: pointer;
  font-weight: 500;
}

.check-item span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.2rem;
}

/* Loan application */
.apply-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.apply-steps {
  list-style: none;
  margin-bottom: 1.5rem;
}

.apply-step {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}

.apply-step:last-child { border-bottom: none; }

.step-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.apply-step.active {
  color: var(--text);
}

.apply-step.active .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.apply-step.done {
  color: var(--text-muted);
}

.apply-step.done .step-num {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.apply-sidebar-note {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.apply-sidebar-note strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.apply-sidebar-note p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.apply-main { min-height: 520px; }

.apply-panel {
  display: none;
}

.apply-panel.active { display: block; }

.apply-panel h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.panel-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.apply-estimate {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--accent-dim);
  border: 1px solid rgba(61, 214, 198, 0.25);
  border-radius: var(--radius-sm);
  text-align: center;
}

.apply-estimate span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.apply-estimate strong {
  display: block;
  font-size: 1.75rem;
  color: var(--accent);
  margin: 0.35rem 0;
}

.apply-estimate small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.smart-coach {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

.smart-coach p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.35rem 0;
}

.smart-coach p:first-child { margin-top: 0; }
.smart-coach p:last-child { margin-bottom: 0; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin-top: 3px;
  flex-shrink: 0;
}

.field-error {
  display: block;
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 0.5rem;
}

.review-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.review-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.review-row span:first-child {
  color: var(--text-muted);
}

.review-row span:last-child {
  font-weight: 600;
  text-align: right;
}

.apply-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.apply-actions-right {
  display: flex;
  gap: 0.75rem;
}

.apply-draft-msg {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--success);
  text-align: center;
}

.apply-success {
  text-align: center;
  padding: 2rem 1rem;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 1.75rem;
  font-weight: 700;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.apply-success h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.success-desc {
  color: var(--text-muted);
  max-width: 420px;
  margin: 1rem auto 1.5rem;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* FAQ & Assistant */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 2rem;
  align-items: start;
}

.faq-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition);
}

.faq-question:hover { color: var(--accent); }

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent);
  transition: transform var(--transition);
}

.faq-item.open .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer p {
  padding-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.faq-item.open .faq-answer { max-height: 200px; }

.assistant h3 { margin-bottom: 0.35rem; }
.assistant > p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1rem; }

.assistant-chat {
  min-height: 220px;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.msg {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  max-width: 95%;
}

.msg.bot {
  background: var(--bg);
  align-self: flex-start;
  color: var(--text-muted);
}

.msg.user {
  background: var(--accent-dim);
  align-self: flex-end;
  color: var(--text);
}

.assistant-input {
  display: flex;
  gap: 0.5rem;
}

.assistant-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
}

.assistant-input .btn { padding: 0.75rem 1rem; }

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.suggest-chip {
  padding: 0.35rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.suggest-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Footer */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer .logo { margin-bottom: 0.75rem; display: inline-block; }
.footer p { font-size: 0.85rem; color: var(--text-muted); max-width: 280px; }

.footer h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 0.5rem; }
.footer a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.footer a:hover { color: var(--accent); }

.footer-copy {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Auth banner */
.auth-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-color: rgba(232, 196, 104, 0.35);
  background: linear-gradient(135deg, rgba(232, 196, 104, 0.1), transparent);
}

.auth-banner strong {
  display: block;
  margin-bottom: 0.25rem;
}

.auth-banner p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.auth-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  position: relative;
  width: min(420px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.modal-close:hover { color: var(--text); }

.modal h3 {
  margin-bottom: 1.25rem;
  padding-right: 2rem;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.auth-form .field-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.auth-error {
  font-size: 0.85rem;
  color: var(--danger);
  margin-bottom: 1rem;
}

.auth-switch {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover { color: var(--accent-hover, #1a8f5a); }

.auth-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 10000;
  padding: 0.85rem 1.25rem;
  background: var(--surface, #fff);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.auth-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.btn-block { width: 100%; }

/* Account */
.account-guest {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 480px;
  margin: 0 auto;
}

.account-guest-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.account-guest h3 {
  margin-bottom: 0.5rem;
}

.account-guest p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.account-guest-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.account-dashboard {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.5rem;
  align-items: start;
}

.account-welcome {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--accent-dim), rgba(232, 196, 104, 0.08));
  border-color: rgba(61, 214, 198, 0.25);
  transition: box-shadow 0.4s ease;
}

.account-welcome-new {
  box-shadow: 0 0 32px var(--accent-glow);
  animation: welcomePulse 1.5s ease;
}

@keyframes welcomePulse {
  0%, 100% { box-shadow: 0 0 0 transparent; }
  50% { box-shadow: 0 0 40px var(--accent-glow); }
}

.account-welcome-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.account-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.account-welcome-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.account-welcome h3 {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.account-welcome p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 420px;
}

.account-quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.account-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.account-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  text-align: center;
}

.account-stat-card.highlight {
  border-color: rgba(61, 214, 198, 0.3);
  background: var(--accent-dim);
}

.account-stat-val {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.account-stat-card.highlight .account-stat-val {
  font-size: 1.1rem;
}

.account-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.account-profile h3,
.account-apps h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.account-apps-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.profile-grid { display: grid; gap: 0.5rem; }

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.profile-row span:first-child { color: var(--text-muted); }
.profile-row span:last-child { font-weight: 600; text-align: right; }

.applications-list {
  display: grid;
  gap: 0.75rem;
}

.app-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.app-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.app-card-head strong {
  font-size: 0.9rem;
  color: var(--accent);
}

.app-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
}

.app-status-submitted { background: rgba(143, 163, 184, 0.2); color: var(--text-muted); }
.app-status-reviewing { background: rgba(126, 184, 255, 0.15); color: #7eb8ff; }
.app-status-approved { background: rgba(127, 217, 154, 0.15); color: var(--success); }
.app-status-declined { background: rgba(240, 113, 120, 0.15); color: var(--danger); }

.app-payment {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.app-payment-unpaid { background: rgba(232, 196, 104, 0.15); color: var(--gold); }
.app-payment-partial { background: rgba(126, 184, 255, 0.15); color: #7eb8ff; }
.app-payment-paid { background: rgba(127, 217, 154, 0.15); color: var(--success); }
.app-payment-overdue { background: rgba(240, 113, 120, 0.15); color: var(--danger); }

.app-card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.account-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2.5rem 1.5rem;
}

.account-empty .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.account-empty h4 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.account-empty p {
  max-width: 360px;
  margin: 0 auto 1.25rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 1280px) and (min-width: 1025px) {
  .nav-list { gap: 0.85rem; }
  .nav-list a { font-size: 0.8rem; }
  .nav-auth .btn-sm { padding: 0.45rem 0.75rem; font-size: 0.8rem; }
}

@media (max-width: 1100px) {
  .hero-grid,
  .calc-grid,
  .matcher-grid,
  .elig-grid,
  .faq-layout,
  .apply-layout,
  .account-dashboard {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    max-width: none;
  }
}

@media (max-width: 1024px) {
  .nav-panel {
    flex: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-panel {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 101;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 15, 20, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem 1.5rem;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav-panel.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-list li {
    border-bottom: 1px solid var(--border);
  }

  .nav-list a {
    display: block;
    padding: 0.85rem 0.25rem;
    font-size: 0.95rem;
  }

  .nav-auth {
    flex-direction: column;
    width: 100%;
    padding-top: 1rem;
    margin-top: 0.5rem;
  }

  .nav-auth .btn {
    width: 100%;
  }

  .nav-user-name {
    max-width: none;
    text-align: center;
    padding-bottom: 0.5rem;
  }
}

@media (max-width: 900px) {
  .account-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .account-welcome {
    flex-direction: column;
    text-align: center;
  }

  .account-welcome-inner {
    flex-direction: column;
  }

  .account-quick-actions { width: 100%; justify-content: center; }

  .auth-banner {
    flex-direction: column;
    text-align: center;
  }

  .auth-banner-actions { width: 100%; }
  .auth-banner-actions .btn { flex: 1; }

  .match-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero-stats { grid-template-columns: 1fr; }
  .result-cards { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .id-upload-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .apply-actions { flex-direction: column; gap: 1rem; }
  .apply-actions-right { width: 100%; }
  .apply-actions-right .btn { flex: 1; }
  h1 { font-size: clamp(2rem, 9vw, 2.75rem); }
}
