:root {
  --bg: #e9eef2;
  --bg-wash: #dfe6ec;
  --surface: #f7f9fb;
  --card: #ffffff;
  --text: #142033;
  --muted: #5c6b7c;
  --accent: #1a5f5a;
  --accent-hover: #144a46;
  --accent-2: #8a6a2f;
  --accent-soft: #e3efee;
  --border: #cfd8e1;
  --border-strong: #b4c0cc;
  --warn: #9a6b12;
  --danger: #b83a3a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 32, 51, 0.05), 0 12px 32px rgba(20, 32, 51, 0.06);
  --font: "Public Sans", "Segoe UI", sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(26, 95, 90, 0.08), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(138, 106, 47, 0.07), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-wash) 100%);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-hover); }

header,
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 249, 251, 0.88);
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.logo span { color: var(--accent); font-style: italic; font-weight: 500; }

nav a { margin-left: 1rem; color: var(--muted); font-size: 0.92rem; font-weight: 500; }
nav a.active { color: var(--text); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 1rem; }
.lead { color: var(--muted); font-size: 1.1rem; line-height: 1.6; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.7rem 0.5rem;
}
.btn.ghost:hover { background: transparent; color: var(--danger); text-decoration: underline; }
.btn.sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.site-banner {
  max-width: 1100px;
  margin: 0.75rem auto;
  text-align: center;
}

.grid-3, .grid-4 {
  display: grid;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card h3 { margin-top: 0; }
.muted { color: var(--muted); }

#app-view { display: none; max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }
#app-view.visible { display: block; }

.tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0 0 1.5rem;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex: 0 0 auto;
  padding: 0.65rem 0.15rem;
  margin-right: 1.35rem;
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-color: var(--accent); }

form label { display: block; margin: 0.6rem 0 0.25rem; font-size: 0.9rem; color: var(--muted); }
input, select, textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-height: 140px; font-family: inherit; }
input[type="checkbox"], input[type="radio"] {
  width: auto;
  accent-color: var(--accent);
}
form label:has(> input[type="checkbox"]),
form label:has(> input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  color: var(--text);
}

#app-view .panel { margin-bottom: 1.25rem; }
#app-view .panel:last-child { margin-bottom: 0; }
#app-view > .panel > h2:first-child,
#app-view .panel > h2:first-child { margin-top: 0; font-size: 1.4rem; }

.match-list { display: grid; gap: 0.85rem; }
.match-item {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.match-item:hover { border-color: var(--border-strong); }
.match-item p { line-height: 1.5; }
.match-item > button,
.match-item > .btn {
  margin: 0.75rem 0.4rem 0 0;
}
.match-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.match-actions .btn.ghost { margin-left: auto; }
.match-actions .btn.ghost + .btn.ghost { margin-left: 0; }
.score { color: var(--accent); font-weight: 700; font-family: var(--font-display); font-size: 1.05rem; }
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.badge-fresh { background: rgba(26, 95, 90, 0.12); color: #145049; }
.badge-verify { background: rgba(154, 107, 18, 0.14); color: #7a550e; }
.badge-stale { background: rgba(184, 58, 58, 0.12); color: #922c2c; }
.badge-urgent { background: rgba(184, 58, 58, 0.16); color: #922c2c; }
.badge-soon { background: rgba(202, 138, 4, 0.16); color: #8a5a04; }
.badge-later { background: var(--bg-wash); color: var(--muted); }
.reason-strengths { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.reason-gaps { margin: 0.25rem 0 0; padding-left: 1.1rem; color: var(--muted, #94a3b8); }
.action-plan h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.action-plan h4 { margin: 0.75rem 0 0.35rem; font-size: 0.9rem; }
.action-plan ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.action-plan .plan-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
/* Applications workspace */
.apps-header { margin-bottom: 0.75rem; }
.apps-header h2 { margin: 0 0 0.25rem; }
.apps-subtitle { margin: 0; }
.apps-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.apps-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.apps-list-pane,
.apps-detail-pane {
  min-width: 0;
}
.apps-list {
  display: grid;
  gap: 0.65rem;
  max-height: min(70vh, 820px);
  overflow: auto;
  padding-right: 0.15rem;
}
.app-row {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.app-row:hover { border-color: var(--accent); }
.app-row.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.app-row.needs-attention { border-left: 3px solid var(--warn); }
.app-row-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}
.app-row-title {
  font-size: 0.95rem;
  line-height: 1.3;
}
.app-row-meta,
.app-row-next { font-size: 0.8rem; }
.app-row-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.app-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-wash);
  overflow: hidden;
}
.app-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.app-progress-lg { height: 8px; margin: 0.55rem 0 0.75rem; }
.app-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  white-space: nowrap;
  background: var(--bg-wash);
  color: var(--muted);
}
.app-status-draft { background: var(--bg-wash); color: var(--muted); }
.app-status-in_progress { background: rgba(26, 95, 90, 0.12); color: #145049; }
.app-status-submitted { background: rgba(138, 106, 47, 0.14); color: #6b5218; }
.app-status-won { background: rgba(26, 95, 90, 0.16); color: #0f453f; }
.app-status-lost { background: rgba(184, 58, 58, 0.12); color: #922c2c; }
.apps-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.apps-empty {
  padding: 1.25rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.apps-empty h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.apps-empty p { margin: 0; }
.apps-detail-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.25rem;
  min-height: 420px;
}
.app-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.app-detail-header h3 { margin: 0.15rem 0 0.35rem; font-size: 1.35rem; line-height: 1.25; }
.app-detail-kicker { margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.app-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}
.app-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.app-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}
.app-section h4 { margin: 0 0 0.55rem; font-size: 1rem; }
.app-section-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.55rem;
}
.app-section-head h4 { margin: 0; }
.app-next-card { border-color: var(--accent); background: var(--accent-soft); }
.app-next-list { margin: 0; padding-left: 1.15rem; }
.app-next-list li { margin: 0.3rem 0; }
.app-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.app-checklist label { display: flex; gap: 0.5rem; align-items: flex-start; color: var(--text); margin: 0; }
.app-checklist input { width: auto; margin-top: 0.2rem; }
.app-prefill {
  white-space: pre-wrap;
  font-size: 0.85rem;
  margin: 0;
  padding: 0.75rem;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  max-height: 240px;
  overflow: auto;
}
.app-inline-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
@media (max-width: 960px) {
  .apps-toolbar { grid-template-columns: 1fr; }
  .apps-workspace { grid-template-columns: 1fr; }
  .apps-list { max-height: none; }
  .app-detail-grid { grid-template-columns: 1fr; }
  .app-detail-header { flex-direction: column; }
  .app-detail-actions { justify-content: flex-start; }
}

.essay-controls {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border, #d5dbe3);
  border-radius: 8px;
  background: var(--panel-bg, #f7f9fc);
}
.essay-controls label {
  font-weight: 600;
  font-size: 0.92rem;
}
.essay-controls textarea {
  min-height: 72px;
  margin-bottom: 0.35rem;
}
.essay-revise-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 500 !important;
  margin-top: 0.25rem;
}
.essay-revise-toggle input {
  margin-top: 0.2rem;
}
.essay-integrity {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
  border-radius: 0 6px 6px 0;
}
.deadline-group { margin-bottom: 1.25rem; }
.deadline-group h3 { font-size: 1rem; margin: 0 0 0.5rem; }
.match-winrate { font-size: 0.9rem; }

.pricing .price { font-size: 1.8rem; font-weight: 700; }
.hidden { display: none !important; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.hidden { display: none !important; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(4, 8, 18, 0.78);
  cursor: pointer;
  z-index: 0;
}
.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  pointer-events: auto;
}
body.modal-open { overflow: hidden; }
.error { color: var(--danger); font-size: 0.9rem; }
.success { color: var(--accent); font-size: 0.9rem; }

footer {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem 3rem;
  font-size: 0.9rem;
}

.nav-toggle { display: none; margin-left: 1rem; }
@media (max-width: 768px) {
  .nav-toggle { display: inline-block; }
  header nav { display: none; flex-direction: column; gap: 0.5rem; padding: 1rem 0; }
  header nav.open { display: flex; }
  header { flex-wrap: wrap; }
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.toast.error { border-color: var(--danger); color: var(--danger); }
.warn-banner { border-color: var(--warn); color: var(--warn); }

.modal-wide { max-width: 640px; }
.onboarding-wizard { margin-bottom: 1rem; }
.wizard-steps { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.wizard-step {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--muted);
}
.wizard-step.active { color: var(--accent); border: 1px solid var(--accent); }
.tab:focus-visible, .btn:focus-visible, .tab.active { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Scholarship hub / SEO landing pages */
main .panel { margin-bottom: 1.25rem; }
.breadcrumb { margin: 0 0 1rem; font-size: 0.85rem; }
.breadcrumb a { color: var(--muted); }
.hub-stats { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1rem 0 1.25rem; }
.hub-stats .stat { display: flex; flex-direction: column; }
.hub-stats .stat-num { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.hub-stats .stat-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.hub-intro p { line-height: 1.6; margin: 0.75rem 0; }
.deadline-list { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.deadline-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.faq-item { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin: 0.5rem 0 0; color: var(--muted); line-height: 1.55; }
.related-hubs { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; }
.related-hubs li a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

/* ============ Landing page (marketing) ============ */
.landing-shell {
  max-width: none;
  margin: 0;
  padding: 0 0 3rem;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes heroReveal { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes brandIn { from { opacity: 0; letter-spacing: 0.12em; } to { opacity: 1; letter-spacing: 0.02em; } }

.landing-hero {
  position: relative;
  max-width: 1040px;
  min-height: min(52vh, 440px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin: 1rem auto 1.75rem;
  padding: 0 1.25rem;
  color: #f4f1ea;
}
.landing-hero-bg {
  position: absolute;
  inset: 0 1.25rem;
  z-index: 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.landing-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  animation: heroReveal 1.4s ease both;
}
.landing-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(12, 22, 34, 0.88) 0%, rgba(12, 22, 34, 0.62) 42%, rgba(12, 22, 34, 0.28) 70%, rgba(12, 22, 34, 0.12) 100%),
    linear-gradient(180deg, rgba(12, 22, 34, 0.15) 0%, rgba(12, 22, 34, 0.55) 100%);
}
.landing-hero-content {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.5rem) clamp(1.75rem, 5vw, 2.5rem);
  animation: fadeUp 0.7s ease 0.15s both;
}
.landing-hero-brand {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
  animation: brandIn 0.9s ease both;
}
.landing-hero-brand em {
  font-style: italic;
  font-weight: 500;
  color: #d8c089;
}
.landing-hero-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.12;
  color: #fff;
  max-width: 14ch;
}
.landing-hero-lead {
  margin: 0;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(244, 241, 234, 0.88);
}
.landing-hero-note {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: rgba(244, 241, 234, 0.72);
}
.btn-lg { padding: 0.8rem 1.4rem; font-size: 0.95rem; }
.hero-cta { display: flex; gap: 0.65rem; flex-wrap: wrap; margin: 1.25rem 0 0; }
.landing-hero .btn { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.landing-hero .btn.secondary.on-hero,
.btn.secondary.on-hero {
  border-color: rgba(244, 241, 234, 0.45);
  color: #f4f1ea;
  background: rgba(12, 22, 34, 0.25);
}
.landing-hero .btn.secondary.on-hero:hover {
  border-color: #d8c089;
  color: #fff;
  background: rgba(12, 22, 34, 0.45);
}
@media (max-width: 700px) {
  .landing-hero {
    min-height: min(48vh, 380px);
    padding: 0 1rem;
    margin-bottom: 1.25rem;
  }
  .landing-hero-bg { inset: 0 1rem; }
  .landing-hero-title { max-width: none; }
}

.badge-beta {
  display: inline-block;
  padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(26, 95, 90, 0.25);
}
.hero-beta-row {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  margin-bottom: 0.65rem;
}
.hero-inquire-btn {
  padding: 0.28rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.landing-shell > .landing-section,
.landing-shell > .landing-block,
.landing-shell > .stat-band,
.landing-shell > .landing-meta {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.stat-band {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding-top: 0;
  padding-bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
@media (max-width: 760px) { .stat-band { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: transparent;
  border: none;
  border-top: 2px solid var(--accent);
  border-radius: 0;
  padding: 0.85rem 0.15rem 0.35rem;
  text-align: left;
  box-shadow: none;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.stat-label { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }

.landing-section { margin: 2rem auto; padding: 0; }

.how-steps-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.5rem 1.5rem;
}
.how-steps-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.how-steps-head h2 {
  margin: 0;
  font-size: 1.35rem;
}
.how-steps-head p {
  margin: 0;
  font-size: 0.92rem;
}
.steps-row {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}
.steps-row li {
  list-style: none;
  padding: 0 1.25rem;
  border-right: 1px solid var(--border);
}
.steps-row li:first-child { padding-left: 0; }
.steps-row li:last-child {
  padding-right: 0;
  border-right: none;
}
.step-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.steps-row h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.steps-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
@media (max-width: 760px) {
  .how-steps-head { flex-direction: column; align-items: flex-start; }
  .steps-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .steps-row li {
    padding: 0 0 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .steps-row li:last-child {
    padding-bottom: 0;
    border-bottom: none;
  }
}
.landing-block {
  margin: 1.75rem auto;
  padding: 1.35rem 1.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.landing-block h2 { margin-top: 0; font-size: 1.45rem; }
.hub-links-title { font-size: 1rem; margin: 1rem 0 0.35rem; font-family: var(--font); font-weight: 600; }
.hub-links a { margin-right: 0.15rem; }
.landing-meta {
  text-align: center;
  font-size: 0.85rem;
  margin: 0.5rem auto 1rem;
}
.section-head { text-align: left; margin-bottom: 1.25rem; max-width: 40rem; }
.section-head h2 { margin: 0 0 0.4rem; font-size: clamp(1.45rem, 2.4vw, 1.85rem); }
.section-head p { margin: 0; font-size: 0.98rem; }
#match-demo .section-head,
#essay-help .section-head,
#pricing .section-head,
#seo-hubs .section-head {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.pricing-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
}
.pricing-grid .panel { padding: 1.15rem; box-shadow: none; }
.pricing-grid h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.pricing-grid p { font-size: 0.88rem; margin: 0; }
.pricing-grid .price {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0.35rem 0;
}
.pricing-tier.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 100%);
}
.pricing-interval-toggle {
  display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: center;
  margin: 0 0 1rem;
}
.pricing-interval {
  padding: 0.4rem 0.9rem; border-radius: 8px; font-size: 0.82rem;
  border: 1px solid var(--border); background: #fff;
  color: var(--muted); cursor: pointer; font-family: inherit;
}
.pricing-interval.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.pricing-save-pill {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--accent);
}
.pricing-interval:not(.active) .pricing-save-pill {
  background: rgba(26, 95, 90, 0.18);
  color: var(--accent);
}
.savings-badge { font-size: 0.78rem; color: var(--accent); margin: 0.15rem 0 0.35rem; }

.landing-newsletter form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.landing-newsletter input[type=email] {
  flex: 1 1 200px;
  max-width: 320px;
}

/* ============ "Try the matcher" animation ============ */
.match-anim {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.1rem;
  max-width: 920px;
  margin: 0 auto;
}
@media (max-width: 760px) {
  .match-anim { grid-template-columns: 1fr; justify-items: stretch; }
}
.match-anim-panel { min-height: 178px; }
.match-anim-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.match-anim-engine {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  justify-self: center;
}
@media (max-width: 760px) {
  .match-anim-engine { width: 100%; height: 56px; }
}
.match-anim-engine::before,
.match-anim-engine::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 2px;
  width: 3.5rem;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px);
  background-size: 200% 100%;
  animation: flowDash 1.1s linear infinite;
}
.match-anim-engine::before { right: 100%; }
.match-anim-engine::after { left: 100%; animation-direction: reverse; }
@media (max-width: 760px) {
  .match-anim-engine::before,
  .match-anim-engine::after { display: none; }
}
.engine-core {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 6px 20px rgba(26, 95, 90, 0.35);
}
.engine-spin {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  animation: engineSpin 1.8s linear infinite;
}
.engine-spin-rev {
  width: 68px;
  height: 68px;
  border-top-color: var(--accent-2);
  border-right-color: transparent;
  border-left-color: var(--accent-2);
  animation-duration: 1.35s;
  animation-direction: reverse;
  opacity: 0.6;
}

.anim-chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-content: flex-start; min-height: 92px; }
.anim-chip {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(26, 95, 90, 0.22);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
}
.match-anim.is-in .anim-chip {
  animation: chipIn 0.6s cubic-bezier(0.22,1,0.36,1) both;
}
.anim-chip:nth-child(1) { animation-delay: 0.1s; }
.anim-chip:nth-child(2) { animation-delay: 0.45s; }
.anim-chip:nth-child(3) { animation-delay: 0.8s; }
.anim-chip:nth-child(4) { animation-delay: 1.15s; }

.anim-result-list { display: grid; gap: 0.65rem; }
.anim-result-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name score" "bar bar";
  column-gap: 0.6rem;
  row-gap: 0.3rem;
  opacity: 0;
  transform: translateY(6px);
}
/* animation-delay for each row is set inline by JS so it can stay in sync
   with when that row's score count-up and bar fill are triggered. */
.match-anim.is-in .anim-result-row {
  animation: chipIn 0.6s cubic-bezier(0.22,1,0.36,1) both;
}
.anim-result-name { grid-area: name; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.anim-result-score { grid-area: score; font-family: var(--font-display); font-weight: 600; color: var(--accent); font-size: 0.9rem; }
.anim-bar-track { grid-area: bar; background: var(--bg-wash); border-radius: 999px; height: 7px; overflow: hidden; }
.anim-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1s cubic-bezier(0.22,1,0.36,1);
}
.match-anim-caption {
  max-width: 640px;
  margin: 1.1rem auto 0;
  text-align: center;
  min-height: 1.4em;
  transition: opacity 0.4s ease;
}
.match-anim-caption.is-out { opacity: 0.25; }
.match-anim-panel { transition: opacity 0.4s ease; }
.match-anim.is-out .match-anim-panel { opacity: 0.25; }

.match-anim-progress {
  max-width: 220px;
  height: 3px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: var(--bg-wash);
  overflow: hidden;
}
.match-anim-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
  transition-property: width;
  transition-timing-function: linear;
  /* transition-duration is set inline by JS to match the cycle length */
}
.match-anim-progress-fill.is-running { width: 100%; }

@keyframes chipIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes engineSpin { to { transform: rotate(360deg); } }
@keyframes flowDash { to { background-position: -24px 0; } }

@media (prefers-reduced-motion: reduce) {
  /* Only the perpetual/continuous motion (the spinning engine ring and the
     flowing connector dashes) is suppressed here. The one-shot content
     reveal (chip/result fade-in, bar fill, cross-fade between cycles) still
     plays — it's a short, purposeful animation, not the kind of continuous
     motion prefers-reduced-motion is meant to suppress. */
  .engine-spin, .match-anim-engine::before, .match-anim-engine::after { animation: none; opacity: 0.3; }
}

.essay-sample {
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
}
.essay-sample-prompt {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text);
  transition: opacity 0.4s ease;
  min-height: 1.5em;
}
.essay-sample.is-out .essay-sample-prompt,
.essay-sample.is-out .ai-output {
  opacity: 0.25;
}
.ai-output {
  white-space: pre-wrap; font-family: var(--font-display); line-height: 1.6; font-size: 1rem;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.15rem; min-height: 5.5rem; margin: 0;
  border-left: 3px solid var(--accent);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: opacity 0.4s ease;
}
.ai-output::after { content: "▋"; color: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ai-foot { margin-top: 0.75rem; font-size: 0.88rem; }

.beta-banner { background: var(--accent-soft); border: 1px solid rgba(26, 95, 90, 0.25); color: var(--accent); }
.referral-discount-banner {
  background: rgba(26, 95, 90, 0.08);
  border: 1px solid rgba(26, 95, 90, 0.22);
  color: var(--accent);
  font-weight: 500;
}
.beta-banner-row {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  flex-wrap: wrap; text-align: center;
}
.beta-note {
  background: var(--accent-soft);
  border: 1px solid rgba(26, 95, 90, 0.25);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  margin: 0 0 1rem;
}

.inquire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.inquire-card {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.inquire-card .btn { margin-top: 0.35rem; align-self: flex-start; }

.legal-page h2 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }
.legal-modal .legal-sections { max-height: 40vh; overflow: auto; margin: 0.75rem 0; }
.legal-modal .legal-sections h3 { font-size: 0.95rem; margin: 0.75rem 0 0.25rem; }
.legal-modal .legal-sections p { margin: 0 0 0.5rem; font-size: 0.9rem; line-height: 1.5; }
.legal-ack {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 1rem 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.45;
}
.legal-ack input { margin-top: 0.2rem; }
.provider-disclaimer-notice {
  border: 1px solid rgba(255, 180, 80, 0.35);
  background: rgba(255, 180, 80, 0.08);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin: 0.75rem 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

#faq details { padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
#faq details summary { cursor: pointer; font-size: 0.98rem; font-weight: 600; }
#faq details p { margin: 0.4rem 0 0; font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  .landing-hero-img, .landing-hero-content, .landing-hero-brand, .ai-output::after { animation: none; }
}

.profile-optional { margin: 1rem 0; padding: 0.75rem; border: 1px solid var(--border); border-radius: 8px; }
.profile-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.1rem 1.2rem 0.75rem;
  margin: 1.1rem 0;
}
.profile-section legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0 0.4rem;
  color: var(--text);
}
.profile-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 640px) { .profile-row { grid-template-columns: 1fr; } }
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.35rem 0.75rem;
  margin: 0.35rem 0 0.75rem;
}
.check-grid label {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0;
}
.check-grid input { margin-top: 0.15rem; }
#profile-form textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0.55rem 0.65rem;
  font-family: inherit;
}
.profile-optional summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.optional-wizard-btn { font-size: 0.85rem; padding: 0.25rem 0.6rem; margin-left: auto; }
.optional-wizard { max-width: 520px; }
.profile-gaps .gap-insight { font-style: italic; margin: 0.75rem 0; padding: 0.5rem 0.75rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
.field-help { font-size: 0.85rem; margin: 0.25rem 0 0.5rem; }
.elig-list { margin: 0.5rem 0; padding-left: 1.25rem; }
footer .link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }

/* ============ Account tab ============ */
.account-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
  margin-top: 1rem;
}
.account-section h3 { margin: 0 0 0.6rem; font-size: 1.05rem; }
.account-check { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; margin: 0.4rem 0 !important; }
.account-check input { width: auto; }
.account-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
#account-info h3 {
  margin: 1.35rem 0 0.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 1.1rem;
}
#account-info h3:first-child { margin-top: 0.5rem; padding-top: 0; border-top: none; }
#account-info ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
#account-info > p:first-child { margin-top: 0; }

/* ============ Deadlines & applications detail polish ============ */
.apps-detail-pane { box-shadow: var(--shadow); }
.app-row { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.deadline-group h3 { border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }

/* ============ Document extraction (transcript -> profile) ============ */
.doc-row { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.doc-row:last-child { border-bottom: none; }
.doc-extract-panel {
  margin-top: 0.6rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.9rem;
}
.doc-extract-list { list-style: none; margin: 0.5rem 0; padding: 0; display: grid; gap: 0.35rem; }
.doc-extract-list label { display: flex; align-items: flex-start; gap: 0.45rem; font-weight: 400; }
.doc-extract-list input { width: auto; margin-top: 0.2rem; }
