:root {
  --navy: #111b2e;
  --navy-2: #1d3455;
  --orange: #ff8f00;
  --orange-dark: #bd6500;
  --blue-pale: #eaf2fa;
  --white: #fff;
  --ink: #172033;
  --muted: #5e6879;
  --line: #dce3eb;
  --surface: #f5f7fa;
  --shadow: 0 14px 36px rgba(17, 27, 46, .09);
  --radius-lg: 24px;
  --radius-md: 16px;
  --shell: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  color: var(--navy);
  line-height: 1.12;
  letter-spacing: -.035em;
}

h1 { margin-bottom: 14px; font-size: clamp(2.4rem, 6vw, 4.45rem); }
h2 { margin-bottom: 12px; font-size: clamp(1.85rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; }

.shell {
  width: min(calc(100% - 40px), var(--shell));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 10px;
  left: 10px;
  padding: 10px 15px;
  color: var(--white);
  background: var(--navy);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #2f80ed; outline-offset: 3px; }

.site-header {
  position: relative;
  z-index: 20;
  color: var(--white);
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.nav {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  width: min(275px, 48vw);
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 100%;
  max-height: 50px;
  object-fit: contain;
  object-position: left center;
}

.brand-fallback { display: none; color: var(--white); font-weight: 900; }
.brand-fallback span { color: var(--orange); }

.nav-home {
  display: inline-flex;
  min-height: 42px;
  padding: 8px 16px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-home:hover { color: var(--navy); background: var(--orange); border-color: var(--orange); }

.map-intro {
  padding-block: 62px 54px;
  color: var(--white);
  background: linear-gradient(125deg, var(--navy), #203c62);
}

.map-intro-grid {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) minmax(310px, .48fr);
  gap: 55px;
}

.map-intro h1 { color: var(--white); }

.map-intro p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: #cbd8e6;
  font-size: 1.08rem;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--orange-dark);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.map-intro .eyebrow { color: var(--orange); }

.guide-shortcut {
  display: grid;
  min-height: 84px;
  padding: 14px 17px;
  align-items: center;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  color: var(--navy);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
  text-decoration: none;
  transition: transform .16s ease;
}

.guide-shortcut:hover { transform: translateY(-2px); }

.guide-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--navy);
  background: var(--orange);
  border-radius: 13px;
  font-size: 1.15rem;
  font-weight: 900;
}

.guide-shortcut small,
.guide-shortcut strong { display: block; }

.guide-shortcut small {
  color: var(--muted);
  font-size: .63rem;
  font-weight: 850;
  letter-spacing: .07em;
}

.guide-shortcut strong { margin-top: 2px; font-size: .96rem; }

.course-browser { padding-block: 34px 90px; }

.browser-toolbar {
  position: sticky;
  z-index: 10;
  top: 0;
  margin: 0 -14px 20px;
  padding: 14px;
  background: rgba(245, 247, 250, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.path-tabs {
  display: flex;
  padding-bottom: 2px;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
}

.path-tabs::-webkit-scrollbar { display: none; }

.path-tab {
  min-height: 43px;
  padding: 9px 15px;
  flex: 0 0 auto;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 800;
  scroll-snap-align: start;
}

.path-tab:hover,
.path-tab.active {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.map-status {
  display: flex;
  min-height: 38px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: .86rem;
}

.map-status p { margin: 0; }
.map-status strong { color: var(--navy); }

.course-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.course-card {
  position: relative;
  display: flex;
  min-height: 315px;
  padding: 23px;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--course-accent, var(--orange));
  border-radius: var(--radius-md);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.course-card:hover {
  border-color: #c0cad5;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.course-card[hidden] { display: none; }

.course-category {
  color: var(--muted);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.course-card h3 { margin: 13px 0 4px; font-size: 1.4rem; }

.course-author {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  gap: 7px;
  color: var(--navy-2);
  font-size: .78rem;
  font-weight: 800;
}

.course-author::before {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  content: "↗";
  color: var(--navy);
  background: var(--blue-pale);
  border-radius: 50%;
  font-size: .65rem;
}

.course-card > p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.48;
}

.course-card-meta {
  display: flex;
  margin-top: auto;
  padding-top: 15px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .76rem;
}

.course-card a {
  display: flex;
  min-height: 48px;
  margin: 8px -8px -8px;
  padding: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--navy);
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 900;
  text-decoration: none;
}

.course-card a:hover { color: var(--orange-dark); background: #fff9f0; }

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 12px 19px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.button-dark { color: var(--white); background: var(--navy); }
.button-light { color: var(--navy); background: var(--blue-pale); }
.button-light:disabled { opacity: .42; cursor: not-allowed; }
.button-primary { color: var(--navy); background: var(--orange); }

.finder-section {
  padding-block: 82px;
  background: var(--blue-pale);
  border-top: 1px solid #cfdfed;
}

.finder-heading {
  margin-bottom: 30px;
}

.finder-heading > div:first-child > p:last-child { max-width: 660px; margin: 0; color: var(--muted); }

.quiz-card {
  min-height: 470px;
  padding: clamp(22px, 5vw, 40px);
  background: var(--white);
  border: 1px solid rgba(17, 27, 46, .08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.restart-link {
  padding: 3px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: 0;
  text-decoration: underline;
  text-transform: none;
}

.progress-track {
  height: 6px;
  margin-block: 14px 28px;
  overflow: hidden;
  background: var(--blue-pale);
  border-radius: 20px;
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--orange);
  border-radius: inherit;
  transition: width .2s ease;
}

.question-kicker {
  margin-bottom: 7px;
  color: var(--orange-dark);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.question-title { margin-bottom: 8px; font-size: clamp(1.55rem, 3vw, 2.15rem); }
.question-help { margin-bottom: 21px; color: var(--muted); }

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quiz-option {
  display: flex;
  min-height: 70px;
  padding: 13px 14px;
  align-items: center;
  gap: 11px;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}

.quiz-option:hover { background: #fff9f0; border-color: var(--orange); }

.option-mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: .75rem;
  font-weight: 900;
}

.option-copy strong, .option-copy small { display: block; }
.option-copy strong { line-height: 1.25; }
.option-copy small { margin-top: 2px; color: var(--muted); font-size: .75rem; line-height: 1.35; }
.quiz-nav { margin-top: 22px; }

.result-section {
  padding-block: 75px;
  background: #fffaf3;
  border-top: 1px solid #efddc4;
}

.result-banner { margin-bottom: 24px; }

.recommendation-card {
  padding: clamp(24px, 5vw, 42px);
  background: var(--white);
  border: 1px solid #ead9c2;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.recommendation-badge {
  display: inline-flex;
  margin-bottom: 15px;
  padding: 6px 10px;
  color: #7d4600;
  background: #fff0d8;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.recommendation-card h3 { margin-bottom: 5px; font-size: clamp(2rem, 4vw, 3rem); }
.result-author { margin-bottom: 19px; color: var(--navy-2); font-size: .9rem; font-weight: 850; }
.result-reason { max-width: 850px; color: var(--muted); font-size: 1.02rem; }

.course-outcome {
  max-width: 850px;
  margin-top: 20px;
  padding: 14px 17px;
  background: var(--blue-pale);
  border-left: 4px solid var(--orange);
  border-radius: 0 11px 11px 0;
}

.course-outcome strong { display: block; margin-bottom: 2px; }

.result-meta {
  display: grid;
  max-width: 900px;
  margin-block: 22px;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.result-meta div {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.result-meta small, .result-meta strong { display: block; }
.result-meta small { color: var(--muted); font-size: .65rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.result-meta strong { margin-top: 2px; font-size: .84rem; line-height: 1.35; }
.result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

.alternative-card {
  display: flex;
  margin-top: 16px;
  padding: 20px 23px;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.alternative-card h3 { margin: 3px 0 4px; font-size: 1.25rem; }
.alternative-card p { margin: 0; color: var(--muted); font-size: .86rem; }
.alternative-author { color: var(--navy-2) !important; font-weight: 800; }
.alternative-card .button { flex: 0 0 auto; }
.free-start { margin: 16px 0 0; color: var(--muted); font-size: .86rem; text-align: center; }
.free-start a { color: var(--navy); font-weight: 850; }

@media (max-width: 950px) {
  .map-intro-grid { grid-template-columns: 1fr; gap: 28px; }
  .guide-shortcut { max-width: 520px; }
  .course-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .nav { min-height: 64px; }
  .brand { width: min(230px, 62vw); }
  .nav-home { min-height: 40px; padding: 7px 12px; font-size: .8rem; }

  .map-intro { padding-block: 42px 38px; }
  .map-intro p:not(.eyebrow) { font-size: .96rem; }
  .guide-shortcut { min-height: 76px; padding: 11px 13px; }
  .guide-icon { width: 40px; height: 40px; }

  .course-browser { padding-block: 20px 62px; }
  .browser-toolbar { margin-inline: -14px; padding: 10px 14px 9px; }
  .path-tab { min-height: 40px; padding: 8px 13px; font-size: .8rem; }
  .map-status { margin-bottom: 10px; }

  .course-map { grid-template-columns: 1fr; gap: 12px; }
  .course-card { min-height: 0; padding: 19px; }
  .course-card h3 { font-size: 1.3rem; }
  .course-card > p { margin-bottom: 15px; }
  .course-card-meta { margin-top: 0; }

  .finder-section { padding-block: 62px; }
  .finder-heading { margin-bottom: 22px; }
  .quiz-card { min-height: 0; padding: 20px; }
  .option-grid { grid-template-columns: 1fr; }
  .quiz-option { min-height: 64px; }

  .result-section { padding-block: 60px; }
  .result-meta { grid-template-columns: 1fr; }
  .result-actions .button { width: 100%; }
  .alternative-card { align-items: stretch; flex-direction: column; }
  .alternative-card .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
