/* Career Path Finder: Step Up Initiative brand (see the brand system).
   Layout rules, so every screen lines up on every device:
   - ONE column (.wrap): max 560px, 16px side gutter (20px from 600px up). The header
     inner row and every screen use it, so all left and right edges are identical.
   - Everything is left-aligned. Main actions are full-width buttons.
   - Vertical rhythm comes only from `gap` on flex columns (no stray margins).
   - Tap targets are at least 48px (44px for the header Back button). */
/* Fonts are served from this site (no requests to Google), so student IPs are not shared. */
@font-face { font-family: "Lexend"; src: url("/fonts/lexend-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-latin-wght-normal.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --paper: #fbf8f3;
  --surface: #ffffff;
  --line: #e4ddd2;
  --line-strong: #948878;
  --ink: #1f2a37;
  --ink-muted: #566170;
  --deep-teal: #0f3b38;
  --teal: #0b7a70;
  --on-teal: #ffffff;
  --teal-soft: #e2f3f0;
  --amber: #f5a524;
  --mark-bg: #ffe0a3;
  --amber-ink: #8a4b06;
  --amber-soft: #fff1db;
  --focus: #b06a00;
  --error: #b54708;
  --whatsapp: #1f7a45;
  --m1: #3fae9f; --m2: #0f8a7e; --m3: #0a5c55;
  --shadow: 0 1px 2px rgba(31, 42, 55, .06), 0 4px 14px rgba(31, 42, 55, .05);

  --font-display: "Lexend", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --radius-sm: 8px; --radius-md: 14px; --radius-lg: 22px; --radius-pill: 999px;
  --gutter: 16px;
  --tap: 48px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #11191e; --surface: #18232a; --line: #2a3840; --line-strong: #6b7f89;
    --ink: #eaf0f2; --ink-muted: #a9b6bd; --deep-teal: #cdeee9;
    --teal: #5fd3c4; --on-teal: #0b1a1c; --teal-soft: #173a37;
    --amber: #f5b94a; --mark-bg: #6b4e12; --amber-ink: #fdba74; --amber-soft: #3a2614;
    --focus: #f5b94a; --error: #fca17d;
    --m1: #9fded5; --m2: #5fd3c4; --m3: #eaf0f2;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #11191e; --surface: #18232a; --line: #2a3840; --line-strong: #6b7f89;
  --ink: #eaf0f2; --ink-muted: #a9b6bd; --deep-teal: #cdeee9;
  --teal: #5fd3c4; --on-teal: #0b1a1c; --teal-soft: #173a37;
  --amber: #f5b94a; --mark-bg: #6b4e12; --amber-ink: #fdba74; --amber-soft: #3a2614;
  --focus: #f5b94a; --error: #fca17d;
  --m1: #9fded5; --m2: #5fd3c4; --m3: #eaf0f2;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
/* Keep focused fields and scrolled-to boxes clear of the sticky header and the pinned bottom button. */
html { scroll-padding-top: 120px; scroll-padding-bottom: 104px; }
@media (min-width: 600px) { html { scroll-padding-bottom: 24px; } }
body {
  margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  display: flex; flex-direction: column;
}
button, a, input, label { touch-action: manipulation; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- The one column ---------- */
.wrap {
  width: 100%; max-width: calc(560px + 2 * var(--gutter)); margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--paper);
  border-bottom: 1px solid transparent; padding-top: env(safe-area-inset-top);
}
/* Header, every screen:   [logo | Career Path Finder]
   In the quiz, two more rows: a thin progress bar running edge to edge (it is the divider),
   then one slim control row:  [‹ Back ............ Question 2 of 15]
   A grid places the pieces; .quizbar and .progress only group them in the HTML. */
.topbar { overflow-x: clip; }
.topbar-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--space-3); padding-block: var(--space-4) var(--space-3); }
.topbar.in-quiz .topbar-inner { padding-bottom: 0; }
.brand { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.brand .logo { display: block; height: 36px; width: auto; flex: none; }   /* SVG viewBox is cropped to the ink, so its left edge sits on the column edge */
.brand-sep { flex: none; width: 1px; height: 28px; background: var(--line); }
.brand-text { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.2; color: var(--ink-muted); }

.quizbar, .progress { display: contents; }
.quizbar .bar { grid-row: 2; grid-column: 1 / -1; justify-self: center; width: 100vw; height: 4px; margin-top: var(--space-3); border-radius: 0; }
.quizbar .bar span { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.quizbar .back { grid-row: 3; grid-column: 1; margin-block: var(--space-1); }
.progress-top { grid-row: 3; grid-column: 2; justify-self: end; }
.cheer { display: none; }
.back {
  flex: none; display: inline-flex; align-items: center; gap: 2px;
  min-height: 44px; min-width: 44px; padding: 0 var(--space-2) 0 0; margin-left: -8px;   /* chevron ink lands on the column edge */
  background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer;
  font: 700 15px var(--font-body); color: var(--ink-muted);
}
.back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.back:disabled { visibility: hidden; }
.progress-top { display: flex; align-items: center; font-size: 14px; font-weight: 700; color: var(--ink-muted); white-space: nowrap; }
.bar { height: 8px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: var(--radius-pill); background: var(--teal); transition: width .3s ease; }

/* ---------- Screens ---------- */
/* A screen fills the window under the header:
   - .screen-body starts at the top with generous padding (the layout students know from the first
     version), and long content simply scrolls.
   - .screen-foot holds the main button. On phones it is pinned to the bottom (thumb zone) and
     clears the iPhone home bar; content scrolls under it behind a soft fade. */
.screen { flex: 1; display: flex; flex-direction: column; }
.screen-body { display: flex; flex-direction: column; gap: var(--space-5); padding-block: var(--space-7) var(--space-5); }
.screen-body:last-child { padding-bottom: calc(var(--space-7) + env(safe-area-inset-bottom)); }
.screen-foot {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; flex-direction: column; gap: var(--space-2);
  margin-inline: calc(-1 * var(--gutter)); padding: var(--space-4) var(--gutter) max(var(--space-4), env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--paper) var(--space-4));
}
/* Start screen on phones: lift the Start button a little off the bottom edge. */
.foot-note { font-size: 14px; line-height: 1.4; color: var(--ink-muted); text-align: center; }
.screen-foot { margin-top: auto; }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.q-head { display: flex; flex-direction: column; gap: var(--space-2); }
.eyebrow { font-size: 13px; font-weight: 800; line-height: 16px; text-transform: uppercase; letter-spacing: .07em; color: var(--teal); }
.q-title { font-size: clamp(22px, 5.6vw, 26px); line-height: 1.25; }
.hint { font-size: 15px; line-height: 1.45; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }

/* Answer cards */
.opts { display: flex; flex-direction: column; gap: var(--space-3); }
.opt {
  display: flex; align-items: center; gap: var(--space-4); width: 100%; min-height: 60px;
  padding: var(--space-3) var(--space-4); text-align: left;
  background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: var(--radius-md);
  font: 600 17px/1.35 var(--font-body); cursor: pointer; box-shadow: var(--shadow);
  transition: border-color .15s, background-color .15s;
}
.opt .bub {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal); font-size: 14px; font-weight: 800;
}
.opt .lab { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt .lab small { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--ink-muted); }
.opt[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); }
.opt[aria-pressed="true"] .bub { background: var(--teal); color: var(--on-teal); }
.opt:active { transform: scale(.99); }
.check .bub { border-radius: var(--radius-sm); }
@media (hover: hover) { .opt:hover { border-color: var(--teal); } }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  width: 100%; min-height: 56px; padding: 0 var(--space-5);
  border: 0; border-radius: var(--radius-md); background: var(--teal); color: var(--on-teal);
  font: 700 17px/1.2 var(--font-body); text-decoration: none; text-align: center; cursor: pointer; box-shadow: var(--shadow);
}
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.btn.ghost { background: var(--teal-soft); color: var(--teal); box-shadow: none; }
.btn.whatsapp { background: var(--whatsapp); color: #ffffff; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Start screen */
.hero { display: flex; flex-direction: column; gap: var(--space-5); }
.hero h1 { font-size: clamp(32px, 9vw, 44px); line-height: 1.12; }
.lead-line { font-size: 19px; line-height: 1.45; color: var(--ink-muted); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-pill); background: var(--teal-soft); color: var(--teal); font-size: 14px; font-weight: 700; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-size: 15px; font-weight: 700; color: var(--ink); }
.input, .prefix-wrap {
  width: 100%; min-height: 54px; background: var(--surface); color: var(--ink);
  border: 2px solid var(--line-strong); border-radius: var(--radius-md);
}
.input { padding: 0 var(--space-4); font: 500 17px var(--font-body); }
.input::placeholder, .prefix-wrap input::placeholder { color: var(--ink-muted); opacity: .75; }
.prefix-wrap { display: flex; align-items: stretch; overflow: hidden; }
.prefix-wrap:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.prefix-wrap span { display: flex; align-items: center; padding: 0 var(--space-3) 0 var(--space-4); font-weight: 700; color: var(--ink-muted); border-right: 2px solid var(--line); }
.prefix-wrap input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 var(--space-4); font: 500 17px var(--font-body); color: var(--ink); }
.prefix-wrap input:focus-visible { outline: none; }
.err { font-size: 14px; font-weight: 700; color: var(--error); }
.field.bad .input, .field.bad .prefix-wrap { border-color: var(--error); }
.field > label.consent { font-weight: 500; color: var(--ink-muted); }
.consent { display: flex; align-items: flex-start; gap: var(--space-3); min-height: var(--tap); font-size: 15px; line-height: 1.45; color: var(--ink-muted); cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 0; margin-top: 1px; accent-color: var(--teal); }
.form-error { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--amber-soft); color: var(--amber-ink); font-size: 15px; font-weight: 700; }
.notice { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--amber-soft); color: var(--amber-ink); font-size: 14px; font-weight: 700; }
/* Honeypot: in the DOM for bots, invisible and unreachable for people. */
.hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Result */
.card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.path-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 7.6vw, 36px); line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
.path-name mark { background: linear-gradient(transparent 60%, var(--mark-bg) 60%); color: inherit; padding: 0 2px; margin: 0 -2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.type-chip { align-self: flex-start; display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-pill); background: var(--teal-soft); color: var(--ink); font-size: 15px; font-weight: 700; }
.section { display: flex; flex-direction: column; gap: var(--space-3); }
.section h3 { font-size: 19px; line-height: 1.3; }
.list { display: flex; flex-direction: column; gap: var(--space-2); }
.item { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.item b { font-weight: 700; line-height: 1.35; }
.item span { font-size: 14px; color: var(--ink-muted); }
.item.alt { flex-direction: row; align-items: flex-start; gap: var(--space-3); }
.item.alt::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--m2); }
.item.alt > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.why { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--teal-soft); }
.why h2 { font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--teal); }
.why p { font-size: 15px; line-height: 1.5; color: var(--ink); }
.actions { display: flex; flex-direction: column; gap: var(--space-3); }
.closing { font-size: 14px; line-height: 1.45; color: var(--ink-muted); }

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  :root { --gutter: 20px; }
  body { font-size: 18px; }
  .card { padding: var(--space-6); }
  .item { padding: var(--space-4) var(--space-5); }
  /* Tablets and laptops: the button sits right under its content and the pair is centred
     together. A button pinned to the bottom of a tall window would be far from what it acts on. */
  .screen-body { padding-block: var(--space-7) var(--space-6); }
  .screen.is-intro { justify-content: center; padding-bottom: 64px; }
  .screen.is-intro .screen-body { padding-top: var(--space-6); }
  .screen-foot { position: static; margin: 0; padding: 0 0 var(--space-6); background: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .screen-body > *, .screen-foot { animation: rise .28s ease-out both; }
  @keyframes rise { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .bar span, .opt { transition: none; }
}

/* Privacy policy page: same column and tokens as the quiz, tuned for reading. */
a.brand { text-decoration: none; }
.doc { gap: var(--space-6); }
.doc h1 { font-size: 28px; line-height: 1.2; }
.doc h2 { font-size: 20px; line-height: 1.3; }
.doc h3 { font-size: 16px; line-height: 1.35; margin-top: var(--space-2); }
.doc p, .doc li { font-size: 16px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: var(--space-2); }
.doc li::marker { color: var(--teal); }
.doc .card { gap: var(--space-3); background: var(--teal-soft); border-color: transparent; box-shadow: none; }
.doc .item b { overflow-wrap: anywhere; }
.doc [hidden] { display: none !important; }
.doc a:not(.btn), .footnote a { color: var(--teal); font-weight: 700; text-underline-offset: 3px; }
.footnote { font-size: 14px; line-height: 1.45; color: var(--ink-muted); }
.agree { margin-top: calc(-1 * var(--space-3)); }
.agree .consent { align-items: center; gap: 8px; min-height: 44px; font-size: 13px; line-height: 16px; }
.agree .consent input { width: 15px; height: 15px; margin: 0; }
.agree .consent a { font-weight: 600; }
.consent a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -11px; color: var(--teal); font-weight: 700; text-underline-offset: 3px; }
