:root {
  --navy: #0b3768;
  --blue: #0c65aa;
  --blue-dark: #084b80;
  --orange: #ef7b2d;
  --green: #2e7d63;
  --ink: #172536;
  --muted: #5c6c7e;
  --line: #d8e1ea;
  --soft: #f2f5f8;
  --white: #fff;
  --shadow: 0 18px 48px rgba(19, 45, 74, .12);
  --radius: 22px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #e9edf1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}
a { color: var(--blue); }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(var(--max), calc(100% - 36px)); margin-inline: auto; }
.sr-only { 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; left: 16px; top: -80px; z-index: 9999;
  background: #000; color: #fff; padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  width: min(1240px, calc(100% - 32px)); margin: auto;
  min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  color: #fff; background: var(--navy); font-weight: 800; letter-spacing: -.04em;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .75rem; }
.header-link { font-weight: 700; text-decoration: none; }

.hero {
  color: #fff;
  background:
    linear-gradient(120deg, rgba(7,42,78,.96), rgba(11,74,126,.88)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 34px);
  padding: 64px 0 104px;
}
.hero-inner { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.6fr); gap: 54px; align-items: end; }
.eyebrow, .panel-kicker {
  margin: 0 0 10px; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 800;
}
.eyebrow { color: #aee4ff; }
.hero h1 { margin: 0; max-width: 820px; font-size: clamp(2.15rem, 5vw, 4.45rem); line-height: 1.04; letter-spacing: -.045em; }
.lead { max-width: 800px; margin: 24px 0 0; color: #dbeeff; font-size: 1.13rem; }
.hero-note {
  border-left: 4px solid var(--orange); padding: 4px 0 4px 18px; color: #dbeeff;
}
.hero-note strong, .hero-note span { display: block; }
.hero-note strong { color: #fff; margin-bottom: 5px; }

.app-shell { margin-top: -62px; padding-bottom: 80px; }
.stream-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.stream-pill {
  display: flex; align-items: center; gap: 12px; min-height: 78px; padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.65); border-radius: 16px; background: rgba(255,255,255,.96);
  color: var(--ink); text-align: left; box-shadow: 0 8px 24px rgba(19,45,74,.08);
}
.stream-pill:hover, .stream-pill:focus-visible, .stream-pill.active { border-color: var(--orange); transform: translateY(-1px); }
.stream-icon { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); color: var(--navy); font-weight: 800; }
.stream-pill strong, .stream-pill small { display: block; }
.stream-pill small { color: var(--muted); margin-top: 2px; font-size: .74rem; }

.panel {
  background: rgba(255,255,255,.98); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 5vw, 54px); box-shadow: var(--shadow);
}
.panel-kicker { color: var(--blue); }
.panel h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.12; letter-spacing: -.025em; }
.panel > p, .chooser-panel > p { color: var(--muted); max-width: 820px; }

.chooser-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 32px; }
.choice-card {
  position: relative; min-height: 245px; padding: 30px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(145deg, #fff, #f7f9fb); color: var(--ink); text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.choice-card:hover, .choice-card:focus-visible { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 14px 30px rgba(19,45,74,.11); }
.choice-number { display: block; color: var(--orange); font-weight: 850; font-size: .82rem; letter-spacing: .11em; }
.choice-card h3 { margin: 42px 0 10px; font-size: 1.45rem; }
.choice-card p { margin: 0; color: var(--muted); }
.choice-action { position: absolute; bottom: 26px; color: var(--blue); font-weight: 800; }

.qualification-topline, .result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.text-button { border: 0; background: transparent; color: var(--blue); padding: 6px 0; font-weight: 800; }
.text-button:hover { text-decoration: underline; }

.progress-wrap { margin: 28px 0 34px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .86rem; font-weight: 700; }
.progress-track { height: 8px; margin-top: 9px; overflow: hidden; border-radius: 20px; background: #e8edf2; }
.progress-track span { display: block; width: 25%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .25s ease; }

.question-block { max-width: 920px; margin: 0; padding: 0; border: 0; }
.question-count { margin: 0 0 7px; color: var(--orange); font-weight: 850; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.question-block h3 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.2; }
.question-help { margin: 9px 0 0; color: var(--muted); }
.option-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; margin-top: 26px; }
.option-label { position: relative; display: block; }
.option-label input { position: absolute; opacity: 0; pointer-events: none; }
.option-card {
  display: block; min-height: 106px; padding: 20px 20px 20px 54px; border: 2px solid var(--line); border-radius: 15px;
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.option-card::before {
  content: ""; position: absolute; left: 20px; top: 23px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #9aabba; background: #fff;
}
.option-title { display: block; font-weight: 800; line-height: 1.3; }
.option-desc { display: block; margin-top: 5px; color: var(--muted); font-size: .9rem; }
.option-label input:checked + .option-card { border-color: var(--blue); background: #f2f8fd; box-shadow: 0 8px 20px rgba(12,101,170,.1); }
.option-label input:checked + .option-card::before { border-color: var(--blue); box-shadow: inset 0 0 0 4px #fff; background: var(--blue); }
.option-label input:focus-visible + .option-card { outline: 3px solid rgba(12,101,170,.25); outline-offset: 2px; }

.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 20px;
  border: 2px solid transparent; border-radius: 999px; font-weight: 800; text-decoration: none;
}
.button.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.button.secondary { color: var(--blue); background: #fff; border-color: #b9c9d8; }
.button.secondary:hover { border-color: var(--blue); background: #f5f9fc; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.form-message { min-height: 24px; margin: 12px 0 0; color: #a53b27; font-weight: 700; }

.result-heading { display: block; }
.result-heading p:last-child { color: var(--muted); max-width: 850px; font-size: 1.05rem; }
.recommendation-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 18px; margin-top: 32px; }
.recommendation-card { display: flex; flex-direction: column; min-height: 315px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: #f8fafc; }
.primary-recommendation { background: linear-gradient(145deg, #0c5b9b, #0a3e73); color: #fff; border-color: transparent; }
.recommendation-label { color: var(--orange); font-size: .75rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.recommendation-card h3 { margin: 40px 0 12px; font-size: 1.65rem; }
.recommendation-card p { margin: 0 0 26px; color: var(--muted); }
.primary-recommendation p { color: #d9ecff; }
.recommendation-card .button { align-self: flex-start; margin-top: auto; }
.primary-recommendation .button.primary { background: #fff; border-color: #fff; color: var(--navy); }

.pathway { margin-top: 38px; padding-top: 32px; border-top: 1px solid var(--line); }
.pathway h3 { font-size: 1.35rem; }
.pathway ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin: 20px 0 0; counter-reset: path; }
.pathway li { counter-increment: path; position: relative; min-height: 180px; padding: 58px 20px 20px; border-radius: 15px; background: var(--soft); }
.pathway li::before { content: counter(path); position: absolute; top: 17px; left: 20px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; }
.pathway li strong { display: block; margin-bottom: 7px; }
.pathway li span { color: var(--muted); font-size: .9rem; }

.reflection-box { display: grid; grid-template-columns: .7fr 1.3fr; gap: 28px; align-items: center; margin-top: 24px; padding: 27px; border-radius: 18px; background: #fff7ee; border: 1px solid #f2d4b9; }
.reflection-box h3 { margin: 0; }
.reflection-box blockquote { margin: 0; color: #6f3d17; font-size: clamp(1.2rem, 2.5vw, 1.55rem); font-weight: 750; line-height: 1.35; }
.result-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; }

.site-footer { border-top: 1px solid #cbd5de; background: #dfe5ea; }
.footer-inner { min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-inner p { margin: 0; color: #435365; }
.footer-inner div { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-inner a { font-weight: 750; text-decoration: none; }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .hero-inner, .recommendation-grid, .reflection-box { grid-template-columns: 1fr; }
  .stream-strip { grid-template-columns: repeat(2, 1fr); }
  .pathway ol { grid-template-columns: 1fr; }
  .pathway li { min-height: 0; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 22px, var(--max)); }
  .header-inner { width: calc(100% - 22px); min-height: 68px; }
  .header-link { display: none; }
  .hero { padding: 45px 0 92px; }
  .hero-inner { gap: 28px; }
  .stream-strip, .chooser-grid, .option-grid { grid-template-columns: 1fr; }
  .stream-pill { min-height: 66px; }
  .panel { padding: 24px 18px; border-radius: 18px; }
  .choice-card { min-height: 220px; }
  .qualification-topline { display: block; }
  .qualification-topline .text-button { margin-top: 8px; }
  .form-actions, .result-actions, .footer-inner { align-items: stretch; flex-direction: column; }
  .form-actions .button, .result-actions .button { width: 100%; }
  .footer-inner { padding: 28px 0; }
}

@media print {
  .site-header, .hero, .stream-strip, #chooser, #qualification, .result-actions, .site-footer { display: none !important; }
  body { background: #fff; }
  .app-shell { margin: 0; padding: 0; }
  #result { display: block !important; box-shadow: none; border: 0; padding: 0; }
  .primary-recommendation { color: #000; background: #fff; border: 2px solid #000; }
  .primary-recommendation p { color: #333; }
  .recommendation-card .button { display: none; }
}


/* Saved Journey and follow-up layer */
.save-journey {
  margin-top: 30px; padding: clamp(22px, 4vw, 34px); border: 1px solid #cbd9e6;
  border-radius: 20px; background: linear-gradient(145deg, #f7fbff, #eef5fa);
}
.save-journey-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.save-journey-intro h3 { margin: 0 0 8px; font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.save-journey-intro p:last-child { max-width: 720px; margin: 0; color: var(--muted); }
.privacy-badge { flex: 0 0 auto; display: inline-flex; padding: 8px 12px; border-radius: 999px; background: #e6f3ed; color: #1f654f; font-size: .78rem; font-weight: 800; }
.save-form { margin-top: 26px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; color: #31465d; font-weight: 780; font-size: .9rem; }
.field small { color: var(--muted); font-weight: 500; }
.field input {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #b9c9d8; border-radius: 11px;
  color: var(--ink); background: #fff; outline: 0;
}
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(12,101,170,.14); }
.field input[aria-invalid="true"] { border-color: #b7442f; }
.check-row { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin-top: 18px; color: #435365; font-size: .9rem; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.save-submit-row { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.save-status { min-height: 24px; margin: 0; color: var(--muted); font-weight: 700; }
.save-status.error { color: #a53b27; }
.save-status.success { color: #1f654f; }
.save-success { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; margin-top: 24px; padding: 20px; border-radius: 15px; background: #e8f6ef; border: 1px solid #b9dfcf; }
.success-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #2e7d63; color: #fff; font-size: 1.5rem; font-weight: 900; }
.save-success h4 { margin: 0 0 5px; font-size: 1.2rem; }
.save-success p { margin: 0 0 14px; color: #456154; }
@media (max-width: 700px) {
  .save-journey-intro, .save-submit-row { align-items: stretch; flex-direction: column; }
  .field-grid { grid-template-columns: 1fr; }
  .privacy-badge { align-self: flex-start; }
  .save-submit-row .button { width: 100%; }
}
@media print { .save-journey { display: none !important; } }
