:root {
  --navy: #0a0a0a;
  --navy-light: #262626;
  --gold: #4f46e5;
  --gold-light: #6366f1;
  --bg: #fafafa;
  --card: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

/* Header */
header.site-header {
  background: var(--navy);
  color: #fff;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  border-top: 3px solid var(--gold);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .dot { color: var(--gold-light); }

nav.main-nav {
  display: flex;
  gap: 26px;
}

nav.main-nav a {
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: #fff;
  border-bottom-color: var(--gold);
}

/* Hero */
.hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(79,70,229,0.22), transparent 42%),
    radial-gradient(circle at 85% 0%, rgba(99,102,241,0.14), transparent 38%),
    var(--navy);
  color: #fff;
  padding: 80px 0 84px;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin: 0 0 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero p.lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.62);
  max-width: 620px;
  margin: 0 auto 32px;
}

.search-box {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.35);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
}

.search-box button {
  background: var(--gold);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.15s;
}
.search-box button:hover { background: var(--gold-light); transform: translateY(-1px); }

/* Stats */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 48px;
  flex-wrap: wrap;
}
.stats-bar .stat {
  text-align: center;
  padding: 0 32px;
}
.stats-bar .stat + .stat {
  border-left: 1px solid rgba(255,255,255,0.14);
}
.stats-bar .stat .num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: -0.02em;
}
.stats-bar .stat .label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* Sections */
.section { padding: 56px 0; }
.section h2 {
  font-size: 1.7rem;
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.section p.section-sub {
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 620px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.feature-card:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.feature-card .icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* CTA banner */
.cta-banner {
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border: 1px solid rgba(255,255,255,0.08);
}
.cta-banner h3 { margin: 0 0 6px; font-size: 1.35rem; letter-spacing: -0.01em; }
.cta-banner p { margin: 0; color: rgba(255,255,255,0.6); }

.btn {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--gold-light); transform: translateY(-1px); }

.btn.secondary {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--navy);
}
.btn.secondary:hover { border-color: var(--navy); background: rgba(0,0,0,0.03); transform: translateY(-1px); }

.cta-banner .btn.secondary {
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.cta-banner .btn.secondary:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

/* Directory toolbar */
.directory-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
  position: sticky;
  top: 70px;
  z-index: 40;
}
.directory-toolbar input[type="text"] {
  flex: 2;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.directory-toolbar select {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.directory-toolbar input[type="text"]:focus,
.directory-toolbar select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.directory-toolbar .result-count {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.directory-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.uni-card, .sch-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.uni-card:hover, .sch-card:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.uni-card .uni-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.3;
}
.uni-card .uni-state {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.uni-card .uni-link {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--navy-light);
  font-weight: 600;
  word-break: break-all;
}
.uni-card .uni-link:hover { text-decoration: underline; }
.uni-card .uni-profile-link {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 700;
}
.uni-card .uni-profile-link:hover { text-decoration: underline; }

.sch-card .sch-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
}
.sch-card .sch-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  margin: 4px 0;
}

/* Badge — unscoped so it works consistently across scholarship, degree, and term cards */
.badge {
  background: #f3f4f6;
  color: var(--navy);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.72rem;
  display: inline-block;
}
.badge.amount { background: #eef2ff; color: var(--gold); }

.sch-card p.desc { color: var(--muted); font-size: 0.88rem; margin: 6px 0; }
.sch-card p.elig { color: var(--text); font-size: 0.85rem; margin: 0 0 10px; }
.sch-card .sch-link {
  align-self: flex-start;
  margin-top: auto;
  background: var(--navy);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.15s;
}
.sch-card .sch-link:hover { background: var(--navy-light); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.degree-card, .term-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.degree-card:hover, .term-card:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.degree-card .degree-name, .term-card .term-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
}
.degree-card .degree-meta, .term-card .term-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  margin: 2px 0 4px;
}
.degree-card p.degree-desc, .term-card p.term-def {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Spin the Wheel */
.wheel-layout {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.wheel-side {
  flex: 1;
  min-width: 280px;
}
.wheel-stage {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wheel-add-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.wheel-add-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}
.wheel-add-row input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.wheel-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}
.wheel-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
  transition: border-color 0.15s;
}
.wheel-item-row:hover { border-color: var(--navy); }
.wheel-item-row button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 6px;
}
.wheel-item-row button:hover { color: #dc2626; }
.wheel-empty {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 12px 0;
}
.wheel-canvas-row {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.wheel-canvas-holder {
  position: relative;
  width: 360px;
  max-width: 100%;
}
.wheel-side-label {
  text-align: center;
  min-width: 160px;
  max-width: 220px;
}
.wheel-side-label-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.wheel-side-label-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 24px solid var(--gold);
  z-index: 5;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.25));
}
#wheelCanvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}
.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  background: var(--navy);
  border: 4px solid var(--gold);
  border-radius: 50%;
  z-index: 4;
}
.wheel-spin-btn {
  margin-top: 22px;
}
.wheel-result {
  margin-top: 22px;
  text-align: center;
  min-height: 90px;
}
.wheel-result-card {
  display: inline-block;
  background: var(--card);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 22px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.wheel-result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}
.wheel-result-verdict {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.wheel-result-name {
  color: var(--navy);
  font-weight: 700;
  font-size: 1.05rem;
}
.wheel-result-hint {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}
.wheel-disclaimer {
  background: #f5f5f5;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 24px;
}

/* Apartments */
.apt-search-row {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto 8px;
}
.apt-search-row input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}
.apt-search-row input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.apt-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  max-width: 640px;
  margin: 0 auto 32px;
}
.apt-status {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 24px 0;
}
.apt-result-header {
  text-align: center;
  margin-bottom: 24px;
}
.apt-result-header h3 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.apt-result-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.apt-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 780px;
  margin: 0 auto;
}
.apt-platform-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.apt-platform-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
  border-color: var(--navy);
}
.apt-platform-card .apt-icon { font-size: 1.6rem; margin-bottom: 8px; }
.apt-platform-card h4 { margin: 0 0 6px; color: var(--navy); font-size: 1.02rem; }
.apt-platform-card p { margin: 0 0 14px; color: var(--muted); font-size: 0.82rem; }
.apt-fallback {
  max-width: 780px;
  margin: 20px auto 0;
  text-align: center;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.apt-fallback a { color: var(--navy-light); font-weight: 700; font-size: 0.92rem; }
.apt-internal-link {
  text-align: center;
  margin: 0 0 24px;
}

.listings-directory {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.listing-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.listing-row:hover {
  border-color: var(--navy);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.listing-row.featured {
  border-left: 4px solid var(--gold);
  background: #f8f8ff;
}
.listing-badge {
  flex-shrink: 0;
  background: var(--gold);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 5px;
  white-space: nowrap;
}
.listing-index {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.listing-info {
  flex: 1;
  min-width: 0;
}
.listing-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}
.listing-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}
.listing-row .btn.secondary {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Footer */
footer.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 32px 0;
  margin-top: 40px;
  font-size: 0.85rem;
  text-align: center;
}
footer.site-footer a { color: var(--gold-light); font-weight: 600; }

.page-hero {
  background: var(--navy);
  color: #fff;
  padding: 40px 0;
  text-align: center;
}
.page-hero h1 { margin: 0 0 8px; font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.page-hero p { margin: 0; color: rgba(255,255,255,0.6); }

/* Profile page: title + map top row */
.profile-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  text-align: left;
}
.profile-hero-inner .profile-title { flex: 1; min-width: 240px; }
.profile-map-box {
  width: 260px;
  flex-shrink: 0;
}
#profileMap {
  width: 260px;
  height: 160px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.25);
  background: #1a1a1a;
}
.profile-address {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  margin: 8px 0 0;
  line-height: 1.4;
}
hr.profile-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

@media (max-width: 700px) {
  nav.main-nav { display: none; }
  .hero h1 { font-size: 2rem; }
  .stats-bar { gap: 0; }
  .stats-bar .stat { padding: 0 18px; }
  .directory-toolbar { position: static; }
  .profile-hero-inner { flex-direction: column; }
  .profile-map-box, #profileMap { width: 100%; }
}
