/* ============================================
   CollegeTrue — CSS v4 "Harbor Haze"
   + Scroll Reveal Animations
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

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

:root {
  --haze-fog:       #e8edf0;
  --haze-mist:      #dde4e9;
  --haze-shore:     #c8d4dc;
  --haze-slate:     #2d3f50;
  --haze-depth:     #1e2f3c;
  --haze-ink:       #1e2f3c;
  --haze-teal:      #2e7d6e;
  --haze-teal2:     #3a9480;
  --haze-warm:      #c8a96e;
  --haze-coral:     #c05a48;
  --haze-sky:       #4a85a8;

  --bg:             var(--haze-fog);
  --surface:        #ffffff;
  --surface2:       var(--haze-mist);
  --border:         var(--haze-shore);
  --border2:        #b8c8d4;
  --ink:            var(--haze-ink);
  --ink2:           var(--haze-depth);
  --ink3:           var(--haze-slate);
  --accent:         var(--haze-teal);
  --accent2:        var(--haze-teal2);
  --green:          #2e7d6e;
  --green-mid:      #3a9480;
  --amber:          #b7862a;
  --red:            #c05a48;
  --radius:         10px;
  --radius-sm:      6px;
  --radius-lg:      16px;
  --shadow:         0 2px 8px rgba(30,47,60,0.07), 0 1px 2px rgba(30,47,60,0.05);
  --shadow-md:      0 4px 16px rgba(30,47,60,0.10), 0 1px 3px rgba(30,47,60,0.06);
  --shadow-lg:      0 8px 32px rgba(30,47,60,0.13), 0 2px 6px rgba(30,47,60,0.07);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'DM Mono', 'Courier New', monospace; }
.accent { color: var(--accent); }

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

/* Hero entrance — plays immediately on load */
.reveal-hero {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-hero.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-hero-late {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.22s;
}
.reveal-hero-late.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll-triggered reveal — base */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Scale-in variant for cards */
.reveal-scale {
  opacity: 0;
  transform: scale(0.93) translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Slide-left variant */
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   NAV
   ============================================ */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  position: relative;
  z-index: 10;
}
.nav-logo {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.45rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-pill {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}
.nav-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--surface);
  background: var(--ink);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100vh;
  background: linear-gradient(165deg, #f0f4f7 0%, #e5ecf0 60%, #d8e6ec 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-bg-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46,125,110,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,125,110,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-watermark {
  position: absolute;
  bottom: -40px;
  right: -20px;
  font-family: 'Instrument Serif', serif;
  font-size: 22vw;
  color: rgba(46,125,110,0.04);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.hero-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
  padding: 48px 40px 80px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-content { max-width: 600px; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.hero-eyebrow-tag {
  font-size: 0.72rem;
  color: var(--ink3);
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
}
.hero-eyebrow-dot {
  width: 4px;
  height: 4px;
  background: var(--ink3);
  border-radius: 50%;
}

.hero-headline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--ink2);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 520px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 4px 14px rgba(46,125,110,0.28);
  margin-bottom: 40px;
}
.cta-btn:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46,125,110,0.35);
}

.hero-stats {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 20px 24px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.hero-stat { flex: 1; padding: 0 16px; }
.hero-stat:first-child { padding-left: 0; }
.hero-stat-div { width: 1px; background: var(--border); align-self: stretch; }
.hero-stat-num {
  display: block;
  font-family: 'Instrument Serif', serif;
  font-size: 2.1rem;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat-label {
  font-size: 0.7rem;
  color: var(--ink3);
  line-height: 1.4;
}

/* Hero Demo Card */
.hero-demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.demo-topline {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink3);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.demo-school {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  margin-bottom: 8px;
  background: var(--surface2);
}
.demo-school.win {
  border-color: rgba(46,125,110,0.4);
  background: rgba(46,125,110,0.06);
}
.demo-school.risk {
  border-color: rgba(192,90,72,0.35);
  background: rgba(192,90,72,0.05);
}
.demo-school span { font-size: 0.88rem; font-weight: 500; color: var(--ink); }
.demo-school-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.demo-school strong { font-size: 0.95rem; color: var(--ink); font-weight: 700; }
.demo-school small { font-size: 0.68rem; color: var(--ink3); font-family: 'DM Mono', monospace; text-align: right; }
.demo-gap {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(46,125,110,0.08), rgba(46,125,110,0.04));
  border: 1px solid rgba(46,125,110,0.2);
  border-radius: var(--radius-sm);
}
.demo-gap-label { font-size: 0.68rem; color: var(--ink3); font-family: 'DM Mono', monospace; margin-bottom: 4px; }
.demo-gap-amount { font-family: 'Instrument Serif', serif; font-size: 1.7rem; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.demo-gap p { font-size: 0.78rem; color: var(--ink2); line-height: 1.5; }

/* ============================================
   FORM SECTION
   ============================================ */

.form-section {
  background: var(--surface);
  padding: 80px 40px;
  border-top: 1px solid var(--border);
}
.form-container { max-width: 900px; margin: 0 auto; }

.form-header { margin-bottom: 40px; }
.form-step-tag {
  font-size: 0.7rem;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 10px;
}
.form-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.form-desc { font-size: 0.95rem; color: var(--ink2); }

.schools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
  position: relative;
  z-index: 20;
}

.school-input-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.school-input-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,125,110,0.12);
  z-index: 30;
  position: relative;
}
.school-input-num {
  font-size: 0.68rem;
  color: var(--ink3);
  margin-bottom: 6px;
}
.school-label {
  display: block;
  font-size: 0.7rem;
  color: var(--ink3);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.school-input {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
}
.school-input::placeholder { color: var(--ink3); }

.school-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: none;
  overflow: hidden;
}
.school-autocomplete.open { display: block; }
.ac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: background 0.12s;
  gap: 8px;
}
.ac-item:hover, .ac-item:focus { background: var(--surface2); outline: none; }
.ac-item-type { font-size: 0.7rem; color: var(--ink3); font-family: 'DM Mono', monospace; white-space: nowrap; }

.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.select-group {}
.select-label {
  display: block;
  font-size: 0.7rem;
  color: var(--ink3);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.custom-select-wrap {
  position: relative;
}
.custom-select {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 38px 11px 14px;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.custom-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,125,110,0.12);
}
.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--ink3);
}

.form-submit-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.run-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
  white-space: nowrap;
}
.run-btn:hover:not(:disabled) {
  background: var(--accent);
  transform: translateY(-1px);
}
.run-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.run-btn-icon { display: flex; align-items: center; }

.form-note { font-size: 0.72rem; color: var(--ink3); line-height: 1.5; }
.form-error {
  display: none;
  padding: 12px 16px;
  margin-top: 16px;
  background: rgba(192,90,72,0.08);
  border: 1px solid rgba(192,90,72,0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.85rem;
}
.form-error.visible { display: block; }

/* ============================================
   LOADING
   ============================================ */

.loading-section {
  min-height: 300px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.loading-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 40px;
}
.loading-bar {
  width: 7px;
  background: var(--accent);
  border-radius: 3px;
  animation: loadBar 1.1s ease-in-out infinite;
}
.loading-bar:nth-child(1) { animation-delay: 0s; }
.loading-bar:nth-child(2) { animation-delay: 0.18s; }
.loading-bar:nth-child(3) { animation-delay: 0.36s; }

@keyframes loadBar {
  0%, 100% { height: 12px; opacity: 0.5; }
  50%       { height: 36px; opacity: 1; }
}
.loading-text { font-size: 0.82rem; color: var(--ink3); }

/* ============================================
   RESULTS
   ============================================ */

.results-section {
  background: var(--bg);
  padding: 60px 40px 80px;
}
.results-container { max-width: 1060px; margin: 0 auto; }

.results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
}
.results-header-left {}
.results-tag {
  display: block;
  font-size: 0.68rem;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.results-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.reset-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--ink3);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.reset-btn:hover { color: var(--ink); border-color: var(--ink3); background: var(--surface); }

/* ---- Score Cards ---- */

.score-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.score-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s;
}
.score-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.score-card.winner {
  border-color: rgba(46,125,110,0.45);
  box-shadow: 0 0 0 1px rgba(46,125,110,0.15), var(--shadow);
}
.score-card.winner::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(46,125,110,0.07), transparent);
  animation: cardShimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cardShimmer {
  0%   { left: -60%; }
  60%  { left: 120%; }
  100% { left: 120%; }
}
.score-card.worst {
  border-color: rgba(192,90,72,0.35);
}
.score-card-verdict {
  font-family: 'DM Mono', monospace;
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink3);
  margin-bottom: 14px;
}
.score-card.winner .score-card-verdict { color: var(--green); }
.score-card.worst  .score-card-verdict { color: var(--red); }

.score-card-school { margin-bottom: 18px; }
.score-card-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.25;
}
.score-card-type { font-size: 0.72rem; color: var(--ink3); font-family: 'DM Mono', monospace; }

/* Score display row — number on left, logo on right */
.score-display-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.score-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.score-number {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 3.2rem;
  line-height: 1;
  font-weight: 400;
}
.score-number.green { color: var(--green); }
.score-number.amber { color: var(--amber); }
.score-number.red   { color: var(--red); }
.score-suffix {
  font-size: 0.62rem;
  color: var(--ink3);
  font-family: 'DM Mono', monospace;
  line-height: 1.4;
}

/* College Logo */
.school-logo-wrap {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  overflow: hidden;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(30,47,60,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.score-card:hover .school-logo-wrap {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(30,47,60,0.14);
}
.school-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
}
.school-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.score-bar-wrap {
  height: 5px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 18px;
}
.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.score-stats { display: flex; flex-direction: column; gap: 8px; }
.score-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.78rem;
}
.score-stat-k { color: var(--ink3); }
.score-stat-v { font-weight: 600; color: var(--ink); font-family: 'DM Mono', monospace; font-size: 0.77rem; }
.estimated-note {
  font-size: 0.65rem;
  color: var(--amber);
  font-family: 'DM Mono', monospace;
  margin-top: 4px;
}

/* ---- Section Dividers ---- */

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 0 24px;
  color: var(--ink3);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.section-divider::before, .section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Snapshot ---- */

.snapshot-lead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.snapshot-lead strong { display: block; font-weight: 700; font-size: 1rem; color: var(--ink); }
.snapshot-k { font-size: 0.7rem; color: var(--ink3); font-family: 'DM Mono', monospace; display: block; margin-bottom: 4px; }
.snapshot-gap { text-align: right; }
.snapshot-gap span { font-size: 0.7rem; color: var(--ink3); font-family: 'DM Mono', monospace; display: block; margin-bottom: 4px; }
.snapshot-gap strong { font-size: 1.6rem; font-family: 'Instrument Serif', serif; color: var(--accent); }

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.snapshot-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.snapshot-card.green { border-color: rgba(46,125,110,0.3); }
.snapshot-card.amber { border-color: rgba(183,134,42,0.3); }
.snapshot-card.red   { border-color: rgba(192,90,72,0.3); }

.snapshot-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.snapshot-card-head span { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.snapshot-card-head strong { font-family: 'Instrument Serif', serif; font-size: 1.5rem; color: var(--ink); }

.snapshot-bar-wrap {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.snapshot-card.green .snapshot-bar-fill { background: var(--green); }
.snapshot-card.amber .snapshot-bar-fill { background: var(--amber); }
.snapshot-card.red   .snapshot-bar-fill { background: var(--red); }
.snapshot-bar-fill { height: 100%; border-radius: 3px; }

.snapshot-detail { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.snapshot-detail span { font-size: 0.68rem; color: var(--ink3); }

.snapshot-verdict {
  font-size: 0.72rem;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
}
.snapshot-verdict.green { color: var(--green); }
.snapshot-verdict.amber { color: var(--amber); }
.snapshot-verdict.red   { color: var(--red); }

/* ---- Burden Bars ---- */

.burden-section { margin-bottom: 48px; }
.burden-row {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
}
.burden-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.burden-school-name { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.burden-pct { font-family: 'DM Mono', monospace; font-weight: 700; font-size: 0.92rem; }
.burden-sub { font-size: 0.73rem; color: var(--ink3); font-family: 'DM Mono', monospace; margin-bottom: 14px; }

.burden-scale {
  position: relative;
  height: 16px;
  margin-bottom: 2px;
}
.burden-scale-label {
  position: absolute;
  font-size: 0.6rem;
  color: var(--amber);
  font-family: 'DM Mono', monospace;
  transform: translateX(-50%);
}
.burden-scale-label.danger { color: var(--red); }

.burden-track {
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: visible;
  position: relative;
}
.burden-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 100%;
}
.burden-threshold {
  position: absolute;
  top: -3px;
  width: 2px;
  height: calc(100% + 6px);
  background: var(--amber);
  border-radius: 1px;
}
.burden-threshold.danger { background: var(--red); }

/* ---- Timeline ---- */

.timeline-section { margin-bottom: 48px; }

/* Global legend — shown once above all schools */
.timeline-legend-global {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.tl-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
}

.timeline-school { margin-bottom: 32px; }
.timeline-school-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.timeline-saved-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--ink2);
  font-weight: 400;
}
.timeline-track {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 24px;
  position: relative;
  overflow: hidden;
}
.timeline-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: flex-end;
}
/* Stacked bar — segments sit bottom-up: payment (bottom), living (mid), savings (top) */
.timeline-bar-stack {
  width: 100%;
  max-width: 30px;
  display: flex;
  flex-direction: column-reverse; /* payment at bottom visually */
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  cursor: default;
}
.timeline-seg {
  width: 100%;
  transition: height 0.6s cubic-bezier(0.16,1,0.3,1);
  flex-shrink: 0;
}
.timeline-seg.saved   { border-radius: 3px 3px 0 0; }
.timeline-seg.payment { border-radius: 0; }
.timeline-seg.living  { border-radius: 0; }
.timeline-col.free .timeline-seg.payment { display: none; }
.timeline-age {
  font-size: 0.52rem;
  color: var(--ink3);
  font-family: 'DM Mono', monospace;
  margin-top: 4px;
  white-space: nowrap;
}
.timeline-legend-row { display: none; } /* replaced by global legend */
.tl-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ---- Verdict ---- */

.verdict-section { margin-bottom: 48px; }
.verdict-inner {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  color: #fff;
}
.verdict-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
  display: block;
  margin-bottom: 12px;
}
.verdict-headline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 14px;
  color: #fff;
}
.verdict-headline em { font-style: italic; color: var(--haze-warm); }
.verdict-body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.75);
  margin-bottom: 24px;
  max-width: 680px;
}
.verdict-body strong { color: #fff; }

/* Tie-breaking explanation */
.verdict-tie-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  line-height: 1.55;
}

/* Per-school comparison rows */
.verdict-comparisons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.verdict-comparison-row {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.55;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  border-left: 3px solid rgba(255,255,255,0.15);
}
.verdict-comparison-row strong { color: #fff; }

.verdict-scores {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.verdict-score-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.verdict-score-name { font-weight: 500; }
.verdict-score-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.verdict-score-detail {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
}
.verdict-score-num {
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 0.88rem;
}
.verdict-score-num.green { color: #5ec9a4; }
.verdict-score-num.amber { color: #e9b96a; }
.verdict-score-num.red   { color: #e5887a; }
.verdict-caveat {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
}

/* ---- Share ---- */

.share-section {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.share-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.share-headline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.share-sub { font-size: 0.72rem; color: var(--ink3); }
.share-btns { display: flex; gap: 10px; flex-shrink: 0; }
.share-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
  white-space: nowrap;
}
.share-btn.primary {
  background: var(--ink);
  color: #fff;
  border: none;
}
.share-btn.primary:hover { background: var(--accent); transform: translateY(-1px); }
.share-btn.secondary {
  background: transparent;
  color: var(--ink2);
  border: 1.5px solid var(--border);
}
.share-btn.secondary:hover { border-color: var(--ink3); background: var(--surface2); }

/* ---- Footer ---- */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 36px 40px;
}
.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.footer-logo {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.2rem;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.footer-texts { display: flex; flex-direction: column; gap: 6px; }
.footer-text { font-size: 0.72rem; color: var(--ink3); line-height: 1.6; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .hero-main { grid-template-columns: 1fr; }
  .hero-demo { display: none; }
  .schools-grid { grid-template-columns: 1fr; }
  .score-cards { grid-template-columns: 1fr; }
  .snapshot-grid { grid-template-columns: 1fr; }
  .form-row-two { grid-template-columns: 1fr; }
  .nav { padding: 16px 20px; }
  .nav-pill { display: none; }
  .hero-main { padding: 32px 20px 60px; }
  .form-section { padding: 60px 20px; }
  .results-section { padding: 40px 20px 60px; }
  .verdict-inner { padding: 24px; }
  .share-inner { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; gap: 16px; }
}

@media (max-width: 600px) {
  .hero-stats { flex-direction: column; }
  .hero-stat-div { width: 100%; height: 1px; }
  .form-submit-row { flex-direction: column; align-items: flex-start; }
  .results-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ============================================
   SCORE COLOR UTILITIES
   ============================================ */

.green { color: var(--green); }
.amber { color: var(--amber); }
.red   { color: var(--red); }
