@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #F8F9FC;
  color: #0F172A;
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
}

nav {
  padding: 20px 40px;
  border-bottom: 1px solid #E2E8F0;
  background: #fff;
}

nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  color: #0F172A;
}

nav span { color: #22C55E; }

.hero {
  text-align: center;
  padding: 60px 20px 30px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.hero h1 span { color: #22C55E; }

.hero p {
  color: #64748B;
  margin-top: 10px;
  font-size: 1.05rem;
}

.form-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 40px;
  max-width: 560px;
  margin: 30px auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select {
  padding: 12px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  color: #0F172A;
  background: #F8F9FC;
  transition: border-color 0.2s;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #22C55E;
  background: #fff;
}

.btn {
  width: 100%;
  padding: 14px;
  background: #22C55E;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover:not(:disabled) { background: #16A34A; }

.results-wrapper {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.summary-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.summary-bar .tag {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-family: 'JetBrains Mono', monospace;
  color: #64748B;
}

.summary-bar .tag strong { color: #0F172A; }

.verdict-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-left: 5px solid #22C55E;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 40px;
}

.verdict-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #22C55E;
  margin-bottom: 14px;
}

.verdict-card p {
  line-height: 1.75;
  color: #334155;
  white-space: pre-line;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #0F172A;
}

.school-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}

.school-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.school-card .school-name {
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
  min-width: 160px;
}

.school-card .school-stats {
  display: flex;
  gap: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #64748B;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.elite {
  background: #FEF9C3;
  color: #854D0E;
}

.badge.mid {
  background: #F0FDF4;
  color: #166534;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: #64748B;
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover { color: #0F172A; }

.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.bullet-list li {
  padding-left: 20px;
  position: relative;
  color: #334155;
  line-height: 1.6;
}

.bullet-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #22C55E;
  font-weight: 700;
}

.expand-btn {
  background: none;
  border: 1.5px solid #22C55E;
  color: #22C55E;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.expand-btn:hover {
  background: #22C55E;
  color: #fff;
}

.details-box {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.details-box.open {
  max-height: 2000px;
  margin-top: 20px;
}

.details-box p {
  line-height: 1.8;
  color: #334155;
  white-space: pre-line;
}

.ad-placeholder {
  background: #F1F5F9;
  border: 1px dashed #CBD5E1;
  border-radius: 10px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  font-size: 0.8rem;
  margin-bottom: 30px;
}

.error-wrap {
  max-width: 500px;
  margin: 80px auto;
  padding: 0 20px;
}

.error-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-left: 5px solid #EF4444;
  border-radius: 12px;
  padding: 30px;
}

/* ── SPINNER ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

/* ── MOBILE ── */
@media (max-width: 600px) {
  nav { padding: 16px 20px; }

  .hero { padding: 40px 20px 20px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 0.95rem; }

  .form-card {
    margin: 16px;
    padding: 24px 20px;
  }

  .results-wrapper { padding: 0 16px; margin: 24px auto; }

  .summary-bar { gap: 8px; }
  .summary-bar .tag { font-size: 0.78rem; padding: 6px 10px; }

  .verdict-card { padding: 20px; }

  .school-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .school-card .school-stats {
    flex-direction: column;
    gap: 4px;
  }
}