/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1a2744;
  --navy-light: #243456;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-pale: #eff6ff;
  --green: #059669;
  --green-pale: #ecfdf5;
  --gold: #d97706;
  --gold-pale: #fffbeb;
  --slate: #475569;
  --slate-light: #94a3b8;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--navy);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; }
h2 { font-size: 2.25rem; font-weight: 700; margin-bottom: 0.5rem; }

.section-sub {
  font-size: 1.125rem;
  color: var(--slate);
  max-width: 600px;
  margin: 0 auto 3rem;
  text-align: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--gray-300);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-link {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
}
.btn-link:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
}
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1px;
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.2rem;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  text-decoration: none;
  color: var(--slate);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover { color: var(--navy); }
.mobile-menu-btn { display: none; }
.mobile-menu { display: none; }

/* ===== HERO ===== */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  text-align: center;
}
.hero h1 {
  font-size: 3.25rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
}
.hero-sub {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.75);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.7;
}
.hero-search { max-width: 640px; margin: 0 auto 3rem; }
.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow-xl);
}
.search-icon { width: 20px; height: 20px; color: var(--slate-light); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  padding: 10px 12px;
  color: var(--navy);
  font-family: inherit;
  background: transparent;
}
.search-bar input::placeholder { color: var(--slate-light); }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}
.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* ===== SCHOOL MAP ===== */
.map-section {
  padding: 64px 0;
  background: var(--white);
}
#schoolMap {
  width: 100%;
  height: 520px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  z-index: 1;
}
.map-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.map-toggle {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius);
}
.map-filter-btn {
  padding: 8px 18px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.2s;
}
.map-filter-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.map-filter-btn:hover:not(.active) {
  color: var(--navy);
}
.map-stats {
  font-size: 0.85rem;
  color: var(--slate);
}

/* Leaflet popup overrides */
.school-popup { font-family: 'Inter', sans-serif; min-width: 220px; }
.school-popup h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  margin: 0 0 6px;
  color: var(--navy);
}
.school-popup .popup-location {
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 6px;
}
.school-popup .popup-details {
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 10px;
  line-height: 1.5;
}
.school-popup .popup-jobs {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.popup-jobs.has-jobs {
  background: var(--green-pale);
  color: var(--green);
}
.popup-jobs.no-jobs {
  background: var(--gray-100);
  color: var(--slate-light);
}
.school-popup .popup-links {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.school-popup .popup-links a {
  font-size: 0.8rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.school-popup .popup-links a:hover {
  text-decoration: underline;
}

/* ===== SEARCH SECTION ===== */
.search-section {
  padding: 64px 0 80px;
  background: var(--gray-50);
}
.search-header {
  text-align: center;
  margin-bottom: 2rem;
}
.search-header p { color: var(--slate); font-size: 1.05rem; }

.filters {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.filter-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
}
.filter-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate);
  margin-bottom: 6px;
}
.filter-group input,
.filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.2s;
}
.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--blue);
}
.filter-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
  font-size: 0.875rem;
  color: var(--slate);
}

/* ===== JOB LISTINGS ===== */
.job-list { display: flex; flex-direction: column; gap: 12px; }
.loading { text-align: center; padding: 60px; color: var(--slate-light); }

.job-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--white);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.job-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-light);
  transform: translateY(-1px);
}
.job-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}
.job-school {
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 6px;
}
.job-school a, .job-school-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
.job-school a:hover, .job-school-link:hover {
  color: var(--navy);
  text-decoration: underline;
}
.school-popup .popup-title-link {
  text-decoration: none;
  color: var(--navy);
  display: block;
}
.school-popup .popup-title-link:hover h4 {
  color: var(--blue);
}
.school-popup h4 { transition: color 0.15s; }
.job-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.job-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.tag-location {
  background: var(--blue-pale);
  color: var(--blue);
}
/* Classification chips on job cards (matches the app's classify tags) */
.job-classify-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.job-classify-tag {
  background: rgba(94,106,210,0.18);
  color: #5e6ad2;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: none;
}
.tag-salary {
  background: var(--green-pale);
  color: var(--green);
}
.tag-recency {
  background: var(--blue-pale);
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.tag-stale {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}
/* Report-this-job button on home page job cards */
.job-flag-btn {
  background: transparent;
  border: 1px solid var(--gray-200);
  color: var(--slate);
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 6px;
  font-family: inherit;
  transition: all 0.15s;
}
.job-flag-btn:hover { border-color: #b91c1c; color: #b91c1c; }
.job-flag-btn:disabled {
  opacity: 0.6;
  cursor: default;
  border-color: var(--green);
  color: var(--green);
}
.job-card-flagged {
  opacity: 0.5;
  background: var(--gray-50);
}
.job-card-flagged .job-title { text-decoration: line-through; }
.job-card-stale {
  opacity: 0.7;
  filter: grayscale(0.15);
}
.job-card-stale .job-title { text-decoration: line-through; text-decoration-color: rgba(185, 28, 28, 0.4); }
.job-card-stale .job-apply .btn { opacity: 0.7; }
.sp-job-recency {
  color: var(--blue);
  font-weight: 600;
}
.sp-stale {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
/* Flag-this-job button on school profile pages */
.sp-job-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.sp-job-row > .sp-job { flex: 1; }
.sp-job-flag {
  background: transparent;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--slate-light);
  transition: all 0.15s;
  align-self: stretch;
}
.sp-job-flag:hover { border-color: #b91c1c; color: #b91c1c; }
.sp-job-flag:disabled {
  opacity: 0.7;
  cursor: default;
  border-color: var(--green);
  color: var(--green);
}
.sp-job-flagged { opacity: 0.5; }
.sp-job-flagged .sp-job strong { text-decoration: line-through; }
.tag-source {
  background: var(--gray-100);
  color: var(--slate);
}
.job-apply {
  flex-shrink: 0;
}
.job-apply .btn {
  padding: 8px 20px;
  font-size: 0.85rem;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}
.pagination button {
  padding: 8px 14px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--slate);
  transition: all 0.2s;
}
.pagination button:hover { border-color: var(--blue); color: var(--blue); }
.pagination button.active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}
.pagination .page-info {
  font-size: 0.85rem;
  color: var(--slate-light);
  padding: 0 8px;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 80px 0;
  background: var(--white);
}
.cta-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-xl);
  padding: 56px;
  color: var(--white);
}
.cta-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.cta-content p {
  color: rgba(255,255,255,0.75);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}
.cta-features {
  list-style: none;
  margin-bottom: 2rem;
}
.cta-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 500;
}
.cta-features svg { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; stroke: #34d399; }

.match-preview {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.match-header {
  background: var(--gray-50);
  padding: 14px 20px;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-200);
}
.match-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--navy);
}
.match-item:last-child { border-bottom: none; }
.match-score {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}
.match-high .match-score { background: var(--green-pale); color: var(--green); }
.match-med .match-score { background: var(--blue-pale); color: var(--blue); }
.match-item strong { font-size: 0.9rem; display: block; margin-bottom: 2px; }
.match-item span { font-size: 0.8rem; color: var(--slate-light); }

/* ===== HOW IT WORKS ===== */
.how-section {
  padding: 80px 0;
  background: var(--gray-50);
  text-align: center;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 2rem;
}
.step {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.step-num {
  width: 48px;
  height: 48px;
  background: var(--blue-pale);
  color: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 1rem;
  font-family: 'Playfair Display', serif;
}
.step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}
.step p {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.6;
}

/* ===== FOR SCHOOLS ===== */
.schools-section {
  padding: 80px 0;
  background: var(--white);
}
.schools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.schools-content h2 { margin-bottom: 1rem; }
.schools-content > p { color: var(--slate); margin-bottom: 2rem; line-height: 1.7; }

.comparison {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 2rem;
}
.comp-item {
  flex: 1;
  padding: 20px;
  border-radius: var(--radius-lg);
  text-align: center;
}
.comp-old { background: var(--gray-100); }
.comp-new { background: var(--green-pale); border: 2px solid var(--green); }
.comp-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate);
  margin-bottom: 4px;
}
.comp-price {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  margin-bottom: 2px;
}
.comp-detail {
  font-size: 0.8rem;
  color: var(--slate-light);
}
.comp-vs {
  font-weight: 700;
  color: var(--slate-light);
  font-size: 0.875rem;
}

.schools-features { display: flex; flex-direction: column; gap: 24px; }
.feature {
  display: flex;
  gap: 16px;
  align-items: start;
}
.feature-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--blue-pale);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg { width: 22px; height: 22px; color: var(--blue); }
.feature strong { display: block; margin-bottom: 4px; font-size: 1rem; }
.feature p { font-size: 0.9rem; color: var(--slate); line-height: 1.5; }

/* ===== FOOTER ===== */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 56px 0 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 40px;
}
.footer-brand { max-width: 320px; }
.footer-brand .logo-icon { background: rgba(255,255,255,0.15); }
.footer-brand .logo-text { color: var(--white); }
.footer-brand p { margin-top: 12px; font-size: 0.9rem; line-height: 1.6; }
.footer-links { display: flex; gap: 64px; }
.footer-links h4 {
  color: var(--white);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  font-size: 0.8rem;
  text-align: center;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--slate-light);
  cursor: pointer;
  line-height: 1;
}
.modal h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.modal p.modal-sub {
  color: var(--slate);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
}
.modal .btn { width: 100%; margin-top: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }
  .mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    transition: 0.2s;
  }
  .mobile-menu {
    display: none;
    flex-direction: column;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--gray-200);
  }
  .mobile-menu.active { display: flex; }
  .mobile-menu a {
    text-decoration: none;
    color: var(--slate);
    padding: 10px 0;
    font-weight: 500;
  }

  .hero { padding: 110px 0 60px; }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }
  .hero-stats { gap: 24px; }
  .stat-num { font-size: 1.25rem; }
  .search-bar { flex-direction: column; padding: 12px; gap: 8px; }
  .search-bar input { width: 100%; text-align: center; }
  .search-bar .btn { width: 100%; }

  .filter-row { grid-template-columns: 1fr; }
  .cta-card { grid-template-columns: 1fr; padding: 32px; }
  .steps { grid-template-columns: 1fr; }
  .schools-grid { grid-template-columns: 1fr; gap: 32px; }
  .comparison { flex-direction: column; }
  .comp-vs { transform: rotate(90deg); }

  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links { gap: 40px; }

  .job-card { grid-template-columns: 1fr; }
  .job-apply { width: 100%; }
  .job-apply .btn { width: 100%; }

  h2 { font-size: 1.75rem; }
}

/* ===== TEACHER PRICING ===== */
.pricing-section { padding: 80px 0; background: var(--gray-50); }
.pricing-head { text-align: center; margin-bottom: 48px; }
.pricing-head h2 { font-size: 2.5rem; margin-bottom: 8px; }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.pricing-card-featured {
  border-color: var(--blue);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.18);
  transform: translateY(-4px);
}
.pricing-flag {
  position: absolute;
  top: -14px;
  right: 28px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
}
.pricing-tier {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blue);
  margin-bottom: 12px;
}
.pricing-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.pricing-num {
  font-family: 'Playfair Display', serif;
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.pricing-per { font-size: 1.05rem; color: var(--slate); font-weight: 500; }
.pricing-tagline { color: var(--slate); margin-bottom: 24px; line-height: 1.5; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 32px; flex: 1; }
.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--navy);
}
.pricing-features svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--green);
  margin-top: 2px;
}
.pricing-cta { width: 100%; }
.pricing-note {
  text-align: center;
  margin-top: 32px;
  color: var(--slate);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card-featured { transform: none; }
  .pricing-num { font-size: 2.8rem; }
}

.hero-quiz-cta {
  margin-top: 20px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
}
.hero-quiz-cta a {
  color: var(--white);
  border-bottom: 1.5px solid rgba(255,255,255,0.6);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.hero-quiz-cta a:hover { border-color: var(--white); }

/* ===========================================================================
   SCHOOL PROFILE PAGES
   =========================================================================== */

.sp-body { padding-top: 64px; background: var(--gray-50); min-height: 100vh; }
.sp-container { max-width: 900px; }

.sp-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0f1a36 100%);
  color: var(--white);
  padding: 56px 0 44px;
}
.sp-crumb {
  display: inline-block;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 16px;
  transition: color 0.15s;
}
.sp-crumb:hover { color: var(--white); }
.sp-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  line-height: 1.15;
  margin-bottom: 12px;
}
.sp-loc { color: rgba(255,255,255,0.8); font-size: 1rem; margin-bottom: 20px; }
.sp-loc a { color: var(--white); border-bottom: 1px solid rgba(255,255,255,0.4); }

.sp-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sp-badge {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
}
.sp-badge-accent {
  background: rgba(217, 119, 6, 0.22);
  color: #fed7aa;
}

.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sp-chip {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.sp-chip-blue { background: var(--blue-pale); color: var(--blue); }
.sp-chip-gold { background: var(--gold-pale); color: var(--gold); }

.sp-main { padding: 40px 0 80px; }
.sp-profile {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.sp-profile p {
  color: var(--navy);
  font-size: 1.02rem;
  line-height: 1.75;
  margin-bottom: 1em;
}
.sp-profile p:last-child { margin-bottom: 0; }

.sp-sig {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.sp-sig h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--navy);
}
.sp-sig ul { list-style: none; padding: 0; margin: 0; }
.sp-sig li {
  padding: 8px 0 8px 22px;
  border-top: 1px solid var(--gray-100);
  color: var(--slate);
  font-size: 0.93rem;
  position: relative;
}
.sp-sig li:first-child { border-top: none; }
.sp-sig li::before {
  content: '★';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.85rem;
}

.sp-jobs {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.sp-jobs h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.sp-jobs-sub { color: var(--slate); font-size: 0.92rem; margin-bottom: 20px; }
.sp-job-list { display: flex; flex-direction: column; gap: 10px; }
.sp-job {
  display: block;
  padding: 14px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
  transition: all 0.15s;
}
.sp-job:hover { border-color: var(--blue); background: var(--blue-pale); }
.sp-job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sp-job-head strong { font-size: 0.98rem; }
.sp-job-sal {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-pale);
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.sp-job-meta { font-size: 0.82rem; color: var(--slate); margin-top: 4px; }
.sp-jobs-more { margin-top: 16px; font-size: 0.85rem; color: var(--slate); font-style: italic; }

.sp-jobs-empty h2 { font-family: 'Playfair Display', serif; font-size: 1.25rem; }
.sp-jobs-empty p { color: var(--slate); margin-top: 8px; }
.sp-jobs-empty a { color: var(--blue); }

.sp-cta { margin-top: 40px; }
.sp-cta-card {
  background: linear-gradient(135deg, var(--blue-pale) 0%, #dbeafe 100%);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  text-align: center;
}
.sp-cta-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.sp-cta-card p { color: var(--slate); margin-bottom: 24px; max-width: 580px; margin-left: auto; margin-right: auto; }

@media (max-width: 768px) {
  .sp-hero { padding: 36px 0 28px; }
  .sp-hero h1 { font-size: 1.7rem; }
  .sp-profile { padding: 24px 20px; }
  .sp-jobs { padding: 24px 20px; }
  .sp-cta-card { padding: 28px 20px; }
}

/* ===========================================================================
   TEACHER MATCH QUIZ
   =========================================================================== */

.quiz-body { padding-top: 64px; background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%); min-height: 100vh; }
.quiz-container { max-width: 820px; }
.quiz-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-pale);
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* INTRO */
.quiz-intro { padding: 80px 0 64px; }
.quiz-intro-inner { text-align: center; }
.quiz-intro h1 { font-size: 3rem; line-height: 1.1; margin-bottom: 24px; }
.quiz-intro h1 em { color: var(--blue); font-style: italic; }
.quiz-sub { font-size: 1.15rem; color: var(--slate); max-width: 640px; margin: 0 auto 40px; line-height: 1.7; }
.quiz-intro-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 640px;
  margin: 0 auto 40px;
}
.qif {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.qif-num { font-family: 'Playfair Display', serif; font-size: 1.75rem; font-weight: 700; color: var(--navy); }
.qif-label { font-size: 0.8rem; color: var(--slate); text-transform: uppercase; letter-spacing: 0.5px; }

.quiz-resume {
  margin-top: 24px;
  font-size: 0.95rem;
  color: var(--slate);
}
.quiz-resume .sep { margin: 0 8px; color: var(--gray-300); }
.quiz-privacy {
  margin-top: 32px;
  font-size: 0.85rem;
  color: var(--slate-light);
}
.quiz-privacy a { color: var(--blue); }

/* PROGRESS */
.quiz-progress-wrap {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0 12px;
}
.quiz-progress {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%);
  transition: width 0.4s ease;
  width: 0%;
}
.quiz-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--slate);
  font-weight: 600;
}

/* QUIZ CARD */
.quiz-section { padding: 32px 0 64px; }
.quiz-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}
.quiz-section-head { margin-bottom: 32px; border-bottom: 1px solid var(--gray-200); padding-bottom: 24px; }
.quiz-section-head h2 { font-size: 2rem; margin-bottom: 8px; }
.quiz-section-intro { color: var(--slate); font-size: 1rem; }

/* QUESTIONS */
.q { margin-bottom: 28px; }
.q label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 1rem;
}
.q .req { color: var(--gold); font-weight: 700; }
.q-hint { font-size: 0.85rem; color: var(--slate); margin-bottom: 12px; }

.q input[type=text], .q input[type=email], .q select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.q input:focus, .q select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* MULTI */
.multi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.multi-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.4;
}
.multi-option:hover { border-color: var(--blue-light); background: var(--blue-pale); }
.multi-option input[type=checkbox] {
  margin-top: 2px;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
}
.multi-option input[type=checkbox]:checked + span { color: var(--blue); font-weight: 600; }
.multi-option:has(input:checked) { border-color: var(--blue); background: var(--blue-pale); }

/* SLIDER */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}
.slider-wrap input[type=range] {
  flex: 1;
  accent-color: var(--blue);
  height: 6px;
}
.slider-value {
  min-width: 80px;
  text-align: right;
  font-weight: 700;
  color: var(--blue);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.slider-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--slate);
}

/* TRI-SLIDER */
.tri-grid { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.tri-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 16px;
}
.tri-label { font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.tri-choices { display: flex; gap: 6px; }
.tri-btn {
  flex: 1;
  padding: 10px 8px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--slate);
  transition: all 0.15s;
}
.tri-btn:hover { border-color: var(--blue-light); }
.tri-btn.active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.tri-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-left: 176px;
  font-size: 0.75rem;
  color: var(--slate);
}

/* MATRIX */
.matrix {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.matrix-head, .matrix-row {
  display: grid;
  /* minmax(0, Xfr) makes columns ignore content basis so header labels and
     row radios align in identical column widths regardless of content length. */
  grid-template-columns: minmax(120px, 2fr) repeat(3, minmax(0, 1fr));
  align-items: center;
}
.matrix-head {
  background: var(--gray-50);
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.matrix-head span {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}
.matrix-head span:first-child { display: block; }
.matrix-row { padding: 10px 12px; border-top: 1px solid var(--gray-100); }
.matrix-row:hover { background: var(--gray-50); }
.matrix-label { font-size: 0.9rem; color: var(--navy); font-weight: 500; }
.matrix-cell {
  display: flex;
  justify-content: center;
  cursor: pointer;
}
.matrix-cell input[type=radio] { accent-color: var(--blue); cursor: pointer; transform: scale(1.2); }

/* NAV */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  gap: 16px;
}
.quiz-autosave {
  font-size: 0.85rem;
  color: var(--slate-light);
  flex: 1;
  text-align: center;
}
.quiz-autosave.flash { color: var(--green); font-weight: 600; }

/* RESULTS */
.results-section { padding: 48px 0 80px; }
.result-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0f1a36 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  margin-bottom: 32px;
  box-shadow: var(--shadow-xl);
}
.result-hero .quiz-kicker {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
.result-archetype {
  font-size: 2.75rem;
  line-height: 1.15;
  margin: 16px 0;
  color: var(--white);
  font-family: 'Playfair Display', serif;
}
.result-tagline {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.5;
}
.result-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.chip-gold { background: var(--gold-pale); color: var(--gold); }
.chip-blue { background: var(--blue-pale); color: var(--blue); }
.share-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* SUMMARY */
.result-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}
.summary-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.summary-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--navy);
}
.summary-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--gray-100);
  font-size: 0.9rem;
}
.summary-list > div:first-child { border-top: none; }
.summary-list dt { color: var(--slate); font-weight: 500; }
.summary-list dd { color: var(--navy); font-weight: 600; }

/* MATCHES */
.result-matches {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}
.matches-head { margin-bottom: 24px; }
.matches-head h2 { font-size: 1.75rem; margin-bottom: 6px; }
.matches-head p { color: var(--slate); }
.match-row {
  display: grid;
  grid-template-columns: 48px 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--gray-100);
}
.match-row:first-of-type { border-top: 2px solid var(--gray-200); }
.match-rank {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-light);
}
.match-fit {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}
.match-fit-num { font-size: 1.15rem; font-weight: 800; }
.match-fit-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; }
/* Phase 3b: Reach/Fit/Strong pill (matches the app's JobMatchCard) */
.match-fit-pill {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  min-width: 60px;
  text-align: center;
}
.fit-pill-strong { background: #16a34a; }       /* green-600 */
.fit-pill-fit    { background: #2563eb; }       /* brand blue */
.fit-pill-reach  { background: #d97706; }       /* amber-600 */
.fit-pill-no-fit { background: rgba(148,163,184,0.55); }
.match-fit-pct { font-size: 0.7rem; color: var(--slate); }
.match-body strong { display: block; font-size: 1.05rem; color: var(--navy); margin-bottom: 4px; }
.match-meta { font-size: 0.85rem; color: var(--slate); margin-bottom: 8px; }
.match-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.match-tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  background: var(--green-pale);
  color: var(--green);
  border-radius: 999px;
  font-weight: 600;
}
.match-sigprog {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--slate);
  font-style: italic;
}
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* RESULT FOOTER */
.result-footer {
  background: linear-gradient(135deg, var(--blue-pale) 0%, #dbeafe 100%);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
}
.footer-cta h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.footer-cta p { color: var(--slate); margin-bottom: 24px; }
.shared-note {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--slate);
}
.shared-note code {
  background: rgba(255,255,255,0.7);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  word-break: break-all;
}

/* PRINT (for PDF download) */
@media print {
  .header, .quiz-progress-wrap, .footer, .share-row, .match-actions { display: none !important; }
  .result-hero { background: var(--navy) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .quiz-body { background: white; padding-top: 0; }
  .result-matches, .result-summary, .summary-card { box-shadow: none; break-inside: avoid; }
  .match-row { break-inside: avoid; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .quiz-intro { padding: 48px 0 32px; }
  .quiz-intro h1 { font-size: 2rem; }
  .quiz-intro-features { grid-template-columns: repeat(2, 1fr); }
  .quiz-card { padding: 28px 20px; }
  .quiz-section-head h2 { font-size: 1.5rem; }
  .result-hero { padding: 36px 24px; }
  .result-archetype { font-size: 1.85rem; }
  .result-tagline { font-size: 1rem; }
  .result-summary { grid-template-columns: 1fr; }
  .result-matches { padding: 24px 16px; }
  .match-row { grid-template-columns: 36px 60px 1fr; }
  .match-actions { grid-column: 1 / -1; margin-top: 8px; }
  .tri-row { grid-template-columns: 1fr; gap: 6px; }
  .tri-legend { padding-left: 0; }
  .matrix-head, .matrix-row { grid-template-columns: minmax(80px, 1.2fr) repeat(3, minmax(0, 1fr)); }
  .matrix-head { font-size: 0.62rem; padding: 8px 6px; letter-spacing: 0.2px; }
  .matrix-row { padding: 10px 6px; }
  .matrix-label { font-size: 0.8rem; }
  .result-footer { padding: 32px 20px; }
  .summary-list > div { grid-template-columns: 1fr; gap: 4px; }
}
