:root {
  --ink: #0F172A;
  --paper: #FFFFFF;
  --surface: #FFFFFF;
  --accent: #0F766E;
  --accent-ink: #0F766E;
  --accent-soft: #E6F4F2;
  --muted: #64748B;
  --line: #E2E8F0;
  --input-fill: #EDF5F4;
  --input-fill-hover: #E6F1EF;
  --page-bg: #F8FAFC;
  --accent-dark: #115E59;
  --success: #15803D;
  --success-soft: #DCFCE7;
  --danger: #DC2626;
  --danger-soft: #FEE2E2;
  --warn: #D97706;
  --warn-soft: #FEF3C7;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F1F5F9;
    --paper: #0B1120;
    --surface: #131C2E;
    --accent: #2DD4BF;
    --accent-ink: #2DD4BF;
    --accent-soft: #113B37;
    --muted: #94A3B8;
    --line: #253044;
    --input-fill: #1B2842;
    --input-fill-hover: #22314F;
    --page-bg: #0B1120;
    --accent-dark: #14B8A6;
    --success: #4ADE80;
    --success-soft: #14301F;
    --danger: #F09A9A;
    --danger-soft: #3A1F1F;
    --warn: #F4CE72;
    --warn-soft: #3A2F14;
  }
}

:root[data-theme="dark"] {
  --ink: #F1F5F9;
  --paper: #0B1120;
  --surface: #131C2E;
  --accent: #2DD4BF;
  --accent-ink: #2DD4BF;
  --accent-soft: #113B37;
  --muted: #94A3B8;
  --line: #253044;
  --input-fill: #1B2842;
  --input-fill-hover: #22314F;
  --page-bg: #0B1120;
  --accent-dark: #14B8A6;
  --success: #4ADE80;
  --success-soft: #14301F;
  --danger: #F09A9A;
  --danger-soft: #3A1F1F;
  --warn: #F4CE72;
  --warn-soft: #3A2F14;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; text-wrap: balance; margin: 0; }
code, .mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

/* Topbar */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.topbar-inner {
  max-width: 1180px;
  margin-inline: auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
  min-width: 0;
}
.brand-mark { color: var(--accent); flex-shrink: 0; }
.topbar-right { flex-shrink: 0; }
@media (max-width: 460px) {
  .brand { font-size: 12.5px; gap: 5px; white-space: normal; }
  .brand-mark { width: 16px; height: 16px; }
  .topbar-link { display: none; }
  .theme-option { padding: 4px 7px; font-size: 10.5px; }
  .topbar-right { gap: 8px; }
}
.brand-wordmark-radar { color: var(--accent); }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-link {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
}
.topbar-link:hover { color: var(--accent-ink); }

.theme-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 2px;
  gap: 2px;
}
.theme-option {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 100px;
  padding: 5px 11px;
  cursor: pointer;
}
.theme-option:hover { color: var(--ink); }
.theme-option[aria-checked="true"] {
  background: var(--accent);
  color: var(--paper);
}

main { padding-inline: 20px; }

/* Hero */
.hero { padding-block: 64px 48px; }
.hero-grid {
  max-width: 1180px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.hero-inner { max-width: 1180px; margin-inline: auto; }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 60px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.01em;
}
.hero-h1-accent { color: var(--accent-ink); }
.hero-sub {
  font-size: 16.5px;
  color: var(--muted);
  max-width: 46ch;
  margin-top: 22px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-full { width: 100%; margin-top: 8px; }

.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 72px;
}
@media (max-width: 600px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}
.pillar-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--accent-ink);
  letter-spacing: 0.06em;
}
.pillar h3 { font-size: 18px; font-weight: 600; margin-top: 6px; }
.pillar p { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stat { display: flex; flex-direction: column; gap: 4px; }
.hero-stat-num {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--accent-ink);
  line-height: 1;
}
.hero-stat-label {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* Hero visual: radar scope + a browser-frame preview of a real listing card */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}
.radar-scope {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  transform: translate(-50%, -50%);
  color: var(--accent);
  pointer-events: none;
}
.radar-rings { position: absolute; inset: 0; width: 100%; height: 100%; }
.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--accent) 8deg, transparent 46deg);
  opacity: 0.35;
  animation: radar-spin 4.5s linear infinite;
}
@keyframes radar-spin { to { transform: rotate(360deg); } }
.radar-blip {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: radar-blip-pulse 2.6s ease-in-out infinite;
}
.radar-blip-1 { top: 32%; left: 62%; animation-delay: 0s; }
.radar-blip-2 { top: 58%; left: 34%; animation-delay: 0.9s; }
.radar-blip-3 { top: 68%; left: 68%; animation-delay: 1.8s; }
@keyframes radar-blip-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}
.browser-frame {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 32px 64px -24px rgba(15, 23, 42, 0.32), 0 8px 20px -8px rgba(15, 118, 110, 0.18);
  transform: rotate(-1.2deg);
  transition: transform 0.35s ease;
}
.browser-frame:hover { transform: rotate(0deg) translateY(-4px); }
@media (max-width: 900px) {
  .browser-frame { transform: none; }
  .browser-frame:hover { transform: none; }
}
.browser-chrome {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--page-bg);
}
.browser-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser-body { padding: 20px; min-height: 220px; }
.browser-skeleton { display: flex; flex-direction: column; gap: 10px; }
.skeleton-line { height: 12px; border-radius: 4px; background: var(--input-fill); }
.skeleton-line-title { width: 70%; height: 16px; }
.skeleton-line-short { width: 45%; }
.hero-preview-card + .hero-preview-card { margin-top: 14px; }
.hero-preview-title { font-size: 15px; font-weight: 600; }
.hero-preview-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.hero-preview-badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .hero-visual { min-height: 300px; margin-top: 8px; }
  .radar-scope { width: 260px; height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .radar-sweep, .radar-blip { animation: none; }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.proof-section { margin-top: 64px; }
.proof-header h2 { font-size: 22px; font-weight: 600; }
.proof-header p { color: var(--muted); font-size: 14px; margin: 6px 0 20px; }
.proof-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.proof-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}
.proof-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.proof-title { font-size: 16px; font-weight: 600; }
.proof-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.proof-note {
  font-size: 13px;
  color: var(--ink);
  background: var(--page-bg);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 10px;
}
.proof-note b { color: var(--accent-ink); }

/* Form */
.form-view { padding-block: 48px 64px; display: flex; justify-content: center; }
.form-view-inner { width: 100%; max-width: 622px; }
.form-heading { text-align: center; margin-bottom: 32px; }
.form-heading h1 { font-size: 32px; line-height: 40px; font-weight: 600; }
.form-heading p { color: var(--muted); font-size: 16px; margin: 10px 0 0; }
.form-card {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.back-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 18px;
  font-family: inherit;
}
.back-link:hover { color: var(--accent-ink); }
.form-card h2 { font-size: 24px; font-weight: 600; }
.form-sub { color: var(--muted); font-size: 14px; margin-top: 6px; margin-bottom: 24px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}
.optional { font-weight: 400; color: var(--muted); }
.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-fill);
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input[type="text"]:hover,
.field select:hover,
.field textarea:hover { background: var(--input-fill-hover); }
.field input[type="text"]:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; }
.field-checkbox { display: flex; align-items: center; gap: 8px; }
.field-checkbox label { margin: 0; font-weight: 500; }
.field-checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }

.field-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px;
}
.field input[type="file"] {
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.field-status {
  font-size: 12.5px;
  color: var(--accent-ink);
  margin: -4px 0 10px;
}

.cv-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 111px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-fill);
  cursor: pointer;
  text-align: center;
  margin-bottom: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cv-dropzone:hover { background: var(--input-fill-hover); }
.cv-dropzone:focus-within { border-color: var(--accent); }
.cv-dropzone.has-file { border-color: var(--accent); }
.cv-dropzone-icon { color: var(--muted); }
.cv-dropzone.has-file .cv-dropzone-icon { color: var(--accent); }
.cv-dropzone-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.cv-dropzone-cta {
  font-size: 12px;
  text-decoration: underline;
}
.cv-dropzone-filename {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink);
}
.cv-dropzone-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
}
.cv-dropzone-remove:hover { color: var(--danger); }
.cv-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.waec-subject-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.waec-subject-row input[type="text"] { flex: 2; }
.waec-subject-row select { flex: 1; }
.waec-subject-row .btn-remove-subject {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.waec-subject-row .btn-remove-subject:hover { color: var(--danger); }
.waec-subject-row.has-error input[type="text"],
.waec-subject-row.has-error select {
  border-color: var(--danger);
}
.waec-subject-row .btn-remove-subject:hover { background: var(--danger-soft); border-radius: 6px; }

.field.has-error input[type="text"],
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}
#field-gpa-waec.has-error input[type="text"],
#field-gpa-waec.has-error select {
  border-color: inherit;
}
.field-error {
  color: var(--danger);
  font-size: 12.5px;
  margin: 6px 0 0;
}
.form-error-banner {
  color: var(--danger);
  font-size: 13.5px;
  margin: 0 0 18px;
}

/* Loading */
.loading-view, .error-view {
  padding-block: 100px 64px;
  display: flex;
  justify-content: center;
}
.loading-card, .error-card { text-align: center; max-width: 420px; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 22px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-card h2 { font-size: 24px; }
.loading-sub { color: var(--muted); font-size: 15px; margin-top: 10px; }
.error-card h2 { font-size: 24px; color: var(--ink); }
.error-card p { color: var(--muted); font-size: 15px; margin: 10px 0 22px; }

/* Results */
.results-view { padding-block: 32px 64px; }
.results-inner { max-width: 720px; margin-inline: auto; }
.results-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.demo-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--warn);
  flex-shrink: 0;
}
.digest-summary { font-size: 24px; line-height: 32px; font-weight: 600; margin-bottom: 22px; }

.results-list { display: flex; flex-direction: column; gap: 14px; }
.listing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.listing-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.listing-title { font-size: 20px; line-height: 28px; font-weight: 600; font-family: 'Inter', sans-serif; }
.listing-title a { color: inherit; text-decoration: none; }
.listing-title a:hover { color: var(--accent-ink); }
.listing-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }

.badges { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.badge {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.badge-eligible { background: var(--success-soft); color: var(--success); }
.badge-partial { background: var(--warn-soft); color: var(--warn); }
.badge-noteligible { background: var(--danger-soft); color: var(--danger); }
.badge-lowrisk { background: var(--success-soft); color: var(--success); }
.badge-someconcerns { background: var(--warn-soft); color: var(--warn); }
.badge-highrisk { background: var(--danger-soft); color: var(--danger); }
.badge-confidence { background: var(--paper); color: var(--muted); border: 1px solid var(--line); }

.listing-body { margin-top: 14px; font-size: 14px; }
.listing-desc { color: var(--muted); margin: 0 0 10px; }
.listing-note {
  font-size: 13.5px;
  color: var(--ink);
  background: var(--paper);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
}
.listing-note b { color: var(--accent-ink); }
.listing-note.trust b { color: var(--warn); }
.action-steps {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--muted);
}

.no-results {
  text-align: center;
  max-width: 460px;
  margin: 48px auto 0;
}
.no-results h3 { font-size: 22px; font-weight: 600; }
.no-results p { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.no-results-label { font-weight: 600; color: var(--ink) !important; margin-top: 20px !important; }
.no-results-tips {
  text-align: left;
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
  padding-left: 18px;
}
.no-results-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 500px) {
  .form-card { padding: 24px 20px; }
}
