:root {
  --sky-50: #eff9ff;
  --sky-100: #dff4ff;
  --sky-200: #cfeeff;
  --sky-300: #b8e8ff;
  --sky-400: #8ad0f9;
  --sky-500: #57b8f1;
  --sky-700: #2c8ed9;
  --sky-900: #1b5e8d;
  --navy-900: #14314e;
  --navy-700: #395d7b;
  --white: #ffffff;
  --muted: #466785;
  --shadow: rgba(28, 88, 130, 0.12);
  --line: rgba(51, 115, 163, 0.18);
  --panel: rgba(255, 255, 255, 0.75);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #f4fbff 0%, #dff5ff 36%, #ffffff 100%);
  color: var(--navy-900);
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 18px 60px;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1100px, 100%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 15px 30px var(--shadow);
  backdrop-filter: blur(8px);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sky-300), var(--sky-500));
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 12px 20px rgba(87, 184, 241, 0.25);
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.step-indicator {
  display: flex;
  gap: 8px;
}

.step-pill {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(87, 184, 241, 0.12);
  border: 1px solid rgba(87,184,241,0.2);
  display: grid;
  place-items: center;
  color: var(--navy-700);
  font-weight: 800;
}

.step-pill.active {
  background: linear-gradient(135deg, var(--sky-300), var(--sky-500));
  color: var(--navy-900);
  border-color: transparent;
}

.onboarding-app {
  position: relative;
  margin-top: 28px;
  min-height: 620px;
}

.screen {
  display: none;
  background: rgba(255,255,255,0.62);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 34px 30px 26px;
  box-shadow: 0 18px 34px var(--shadow);
}

.screen.active {
  display: block;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(87, 184, 241, 0.14);
  color: var(--sky-900);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 900;
}

.eyebrow.small {
  padding: 7px 12px;
  font-size: 0.68rem;
}

.bubble {
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

h1.bubble {
  font-size: clamp(2.7rem, 7vw, 5rem);
  margin: 0;
}

h2.bubble {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin: 0;
}

h3 {
  margin: 0;
  font-size: 1.5rem;
}

.intro-copy {
  max-width: 660px;
}

.subtext {
  margin: 18px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.cta-row,
.nav-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.primary-btn,
.ghost-btn,
.toggle-btn,
.choice-card {
  border: none;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.ghost-btn {
  min-height: 52px;
  padding: 0 24px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--sky-400), var(--sky-700));
  color: var(--white);
  box-shadow: 0 18px 24px rgba(44, 142, 217, 0.2);
}

.primary-btn:hover,
.ghost-btn:hover,
.choice-card:hover,
.toggle-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn {
  background: rgba(255,255,255,0.8);
  color: var(--navy-900);
  border: 1px solid var(--line);
}

.info-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
  margin-top: 28px;
}

.mini-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.mini-label {
  color: var(--sky-900);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.mini-card strong {
  font-size: 1.04rem;
  line-height: 1.4;
}

.age-box {
  max-width: 640px;
  margin-top: 28px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px;
}

.age-readout {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  color: var(--navy-900);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--sky-700);
  margin: 18px 0 6px;
}

.age-note {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.age-tag {
  display: inline-flex;
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(87,184,241,0.12);
  color: var(--sky-900);
  font-weight: 800;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
  margin-top: 24px;
}

.choice-card {
  min-height: 74px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  color: var(--navy-900);
  padding: 16px 18px;
  text-align: left;
  font-weight: 800;
}

.choice-card.active {
  background: linear-gradient(135deg, rgba(184,232,255,0.9), rgba(255,255,255,0.9));
  border-color: rgba(44,142,217,0.35);
}

.card-header {
  margin-bottom: 10px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  margin-top: 16px;
}

.profile-side {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
}

.avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.avatar-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky-300), var(--sky-500));
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 2.2rem;
  font-weight: 900;
  box-shadow: 0 18px 24px rgba(87,184,241,0.2);
  background-size: cover;
  background-position: center;
}

.avatar-circle.pink {
  background: linear-gradient(135deg, #ffb8d2, #e66b9a);
}

.avatar-circle.purple {
  background: linear-gradient(135deg, #d0b8ff, #8762d6);
}

.avatar-circle.green {
  background: linear-gradient(135deg, #a9e8c4, #45ae75);
}

.avatar-circle.gold {
  background: linear-gradient(135deg, #ffe4a1, #e1a62a);
}

.avatar-circle.has-image {
  background-color: var(--sky-300);
  background-repeat: no-repeat;
}

.avatar-colors {
  display: flex;
  gap: 10px;
  margin: 8px 0 14px;
}

.avatar-color {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky-300), var(--sky-500));
  cursor: pointer;
}

.avatar-color.pink { background: linear-gradient(135deg, #ffb8d2, #e66b9a); }
.avatar-color.purple { background: linear-gradient(135deg, #d0b8ff, #8762d6); }
.avatar-color.green { background: linear-gradient(135deg, #a9e8c4, #45ae75); }
.avatar-color.gold { background: linear-gradient(135deg, #ffe4a1, #e1a62a); }
.avatar-color.active { border-color: var(--navy-900); }

.upload-btn {
  display: inline-flex;
  width: fit-content;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sky-900);
  background: rgba(255,255,255,0.78);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.upload-btn input {
  display: none;
}

.hidden-field {
  display: none;
}

.avatar-crop-controls {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
}

.crop-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.avatar-crop-controls input[type="range"] {
  margin: 4px 0 2px;
}

.school-search {
  position: relative;
}

.school-suggestions {
  position: absolute;
  z-index: 4;
  display: none;
  width: 100%;
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 14px 30px rgba(23, 59, 87, 0.14);
}

.school-suggestions.visible {
  display: block;
}

.school-suggestion {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--navy-900);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.school-suggestion:hover {
  background: rgba(184,232,255,0.35);
}

.school-suggestion small {
  color: var(--sky-900);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.school-abbreviation {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.small-link {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sky-900);
  font-weight: 800;
  cursor: pointer;
}

.field-label {
  display: block;
  margin: 14px 0 8px;
  color: var(--navy-900);
  font-weight: 800;
}

.text-field {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  padding: 12px 14px;
  color: var(--navy-900);
}

.text-field.area {
  min-height: 120px;
  resize: vertical;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.interest-tags span {
  display: inline-flex;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(87,184,241,0.12);
  color: var(--sky-900);
  font-size: 0.82rem;
  font-weight: 700;
}

.interest-tags span.active {
  background: linear-gradient(135deg, var(--sky-300), var(--sky-500));
  color: var(--navy-900);
  box-shadow: 0 8px 16px rgba(44,142,217,0.14);
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.toggle-btn {
  min-height: 44px;
  padding: 0 16px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  color: var(--navy-900);
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--sky-300), var(--sky-500));
  border-color: transparent;
}

.match-box {
  max-width: 680px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 22px;
  margin-top: 20px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(87,184,241,0.15);
  color: var(--sky-900);
  padding: 8px 12px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38b47a;
  box-shadow: 0 0 0 6px rgba(56, 180, 122, 0.12);
}

.match-box h3 {
  margin-top: 18px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.match-box ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 2;
}

.match-description {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 680px;
  margin-top: 18px;
}

.action-grid .choice-card {
  min-height: 64px;
  text-align: center;
}

.nav-row.end {
  justify-content: space-between;
}

@media (max-width: 820px) {
  .choice-grid,
  .info-panel,
  .profile-layout,
  .action-grid {
    grid-template-columns: 1fr;
  }

  .nav-row {
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .screen {
    padding: 24px 18px 20px;
  }

  .nav-row,
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }
}
