/* Colours, type and shapes come from the sponsor demo (web/public/index.html).
   The demo switches off its dark theme so this page is light only as well. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1b1f24;
  --muted: #59636e;
  --border: #d5dae0;
  --accent: #1d5fbf;
  --accent-text: #ffffff;
  --coach-bubble: #f1f5fb;
  --coach-border: #dce5f2;
  --user-bubble: #1d5fbf;
  --user-text: #ffffff;
  --choice-bg: #eef3fb;
  --choice-text: #123f80;
  --card-bg: #ffffff;
  --chip-bg: #e3ecfa;
  --chip-text: #123f80;
  --error: #b3261e;
  --focus: #f0a400;
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(16, 40, 80, 0.06);
}
header h1 { font-size: 1.1rem; margin: 0; color: var(--user-bubble); white-space: nowrap; }
header h1::before {
  content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  background: var(--user-bubble); margin-right: 8px; vertical-align: 1px;
}
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.spacer { flex: 1; }

button { font: inherit; cursor: pointer; }
button:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
main:focus { outline: none; }
.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.9rem;
  min-height: 44px;
  white-space: nowrap;
}

.progress { background: var(--surface); padding: 8px 16px; border-bottom: 1px solid var(--border); }
.progress-inner { width: 100%; max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.progress-label { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.progress-track { flex: 1; height: 8px; border-radius: 999px; background: var(--chip-bg); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width 0.25s ease; }

main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}
.msg { display: flex; flex-direction: column; max-width: 92%; flex-shrink: 0; }
.msg.coach { align-self: flex-start; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.wide { max-width: 100%; width: 100%; }
.bubble {
  padding: 10px 14px;
  border-radius: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.coach .bubble {
  background: var(--coach-bubble);
  border: 1px solid var(--coach-border);
  border-bottom-left-radius: 6px;
}
.user .bubble {
  background: var(--user-bubble);
  color: var(--user-text);
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(29, 95, 191, 0.2);
}
.msg.error .bubble { border-color: var(--error); }
.bubble a, .card a { color: var(--accent); }
.meta { font-size: 0.8rem; color: var(--muted); margin: 0 0 4px 4px; }

.choices { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.choices.frozen { display: none; }
.choices.multi { flex-direction: row; flex-wrap: wrap; }
.choice, .action {
  text-align: left;
  background: var(--choice-bg);
  color: var(--choice-text);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 10px 14px;
  min-height: 44px;
  overflow-wrap: anywhere;
  transition: background 0.15s, box-shadow 0.15s;
}
.choices.multi .choice { border-radius: 999px; }
.choice.skip { border-style: dashed; background: transparent; }
.skip-hint { font-size: 0.85rem; color: var(--muted); margin: 10px 0 0; text-align: center; }
.choices.frozen + .skip-hint { display: none; }
.back-link {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: flex-start;
  background: transparent;
  border: 0;
  color: var(--accent);
  font-weight: 600;
  padding: 8px 4px;
  min-height: 44px;
  text-decoration: underline;
}
.back-link::before { content: "\2190\00a0"; }
.choice[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.choice[aria-pressed="true"]::before { content: "\2713\00a0"; }
.choices-done { width: 100%; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (hover: hover) {
  .choice:not(:disabled):hover, .action:not(:disabled):hover {
    background: var(--accent); color: var(--accent-text);
    box-shadow: 0 2px 8px rgba(29, 95, 191, 0.25);
  }
}
.primary {
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: 14px;
  padding: 10px 18px;
  min-height: 44px;
  font-weight: 600;
}
.primary:disabled { opacity: 0.5; cursor: default; }
.hint { font-size: 0.85rem; color: var(--muted); margin: 0; }

.cards { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 1px 2px rgba(16, 40, 80, 0.06), 0 4px 14px rgba(16, 40, 80, 0.06);
  overflow-wrap: anywhere;
}
.card h3 { font-size: 1.25rem; margin: 8px 0 4px; }
.card dl { margin: 0; }
.card dt {
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  margin-top: 10px;
}
.card dd { margin: 0; }
.chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--chip-bg);
  color: var(--chip-text);
  border-radius: 999px;
  padding: 2px 10px;
  margin: 0 6px 4px 0;
}
.card .chip:first-child { background: var(--user-bubble); color: var(--user-text); }

.typing { display: inline-flex; gap: 5px; padding: 14px 16px; align-self: flex-start; }
.typing span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.slow { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0 4px; }
@media (prefers-reduced-motion: reduce) {
  .typing span { animation: none; opacity: 0.7; }
  .progress-fill, .choice, .action { transition: none; }
}

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 12px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.inner { width: 100%; max-width: 960px; margin: 0 auto; display: flex; gap: 8px; }
.attach {
  width: 100%;
  max-width: 960px;
  margin: 0 auto 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.attach-note { font-size: 0.85rem; color: var(--muted); margin: 0; }
.attach-error { font-size: 0.85rem; color: var(--error); margin: 0; }
.attach-error:empty { display: none; }

.dropzone {
  flex-shrink: 0;
  background: var(--coach-bubble);
  border: 2px dashed var(--accent);
  border-radius: 16px;
  padding: 16px 20px;
}
.dropzone.over { background: var(--chip-bg); }
.dropzone h2 { font-size: 1.1rem; margin: 0 0 4px; }
.dropzone p { margin: 0 0 4px; }
.dropzone .attach-error { margin-top: 8px; }
.dropzone-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#input {
  flex: 1;
  min-width: 0;
  resize: none;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  max-height: 140px;
  scrollbar-width: none;
}
.note { text-align: center; color: var(--muted); font-size: 0.8rem; margin: 6px 0 0; }

@media (max-width: 420px) {
  header { gap: 6px; padding-left: 12px; padding-right: 12px; }
  header h1 { font-size: 1rem; }
  .tag { font-size: 0.62rem; letter-spacing: 0; padding: 2px 6px; }
  .ghost { padding: 6px 8px; font-size: 0.85rem; }
  .card { padding: 14px 16px; }
}
@media (min-width: 900px) {
  html { font-size: 18px; }
  body { font-size: 19px; }
  .choices { flex-direction: row; flex-wrap: wrap; }
  .choice { border-radius: 999px; padding: 10px 20px; }
}

/* ===================================================================
   Visual design, 19 Nov. Features and behaviour are unchanged.
   Font: Plus Jakarta Sans, hosted in fonts/ (SIL Open Font License).
   =================================================================== */
@font-face {
  font-family: "Jakarta";
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --ink: #0b1f44;
  --navy: #0f2f63;
  --accent: #2563eb;
  --accent-2: #4f46e5;
  --sun: #f59e0b;
  --page: #eef2fa;
  --line: #e2e8f3;
  --muted: #5b6577;
  --best: #059669;  --best-soft: #e6f7f0;
  --stretch: #7c3aed; --stretch-soft: #f1eafe;
  --quick: #d97706; --quick-soft: #fef3e2;
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15.5 8.5l-2 5-5 2 2-5z' fill='white'/%3E%3C/svg%3E");
  --shadow-sm: 0 1px 2px rgba(11,31,68,0.06), 0 1px 3px rgba(11,31,68,0.05);
  --shadow-md: 0 4px 12px rgba(11,31,68,0.07), 0 1px 3px rgba(11,31,68,0.05);
  --shadow-lg: 0 24px 60px -12px rgba(11,31,68,0.22), 0 8px 20px -8px rgba(11,31,68,0.12);
}
html { font-size: 16px; }
body {
  font-family: "Jakarta", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 16px;
  color: #172033;
  background:
    radial-gradient(1100px 520px at 12% -10%, #3b6fe0 0%, transparent 60%),
    radial-gradient(900px 480px at 95% -15%, #6d4ee6 0%, transparent 55%),
    linear-gradient(180deg, #0f2f63 0px, #1b3f86 180px, #5b7fc4 330px, var(--page) 520px);
  background-color: var(--page);
}

/* Header sits on the gradient */
header {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #fff;
  padding: 18px 28px 14px;
  padding-top: max(18px, env(safe-area-inset-top));
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
}
.logo {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  background: var(--mark) center / 24px no-repeat, linear-gradient(135deg, #60a5fa, #6366f1);
  box-shadow: 0 6px 16px rgba(37,99,235,0.45), inset 0 1px 0 rgba(255,255,255,0.35);
}
.brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
header h1 { color: #fff; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }
header h1::before { display: none; }
.brand-sub { font-size: 0.8rem; color: rgba(255,255,255,0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header .tag { color: #fff; border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.1); }
header .ghost {
  color: #fff; border: 1px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.1);
  border-radius: 12px; font-weight: 600; backdrop-filter: blur(6px);
}
header .ghost:hover { background: rgba(255,255,255,0.2); }

/* Two column shell */
.shell {
  flex: 1; min-height: 0;
  display: flex; gap: 20px;
  width: 100%; max-width: 1320px; margin: 0 auto;
  padding: 0 28px 20px;
}
.chat {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  background: #fbfcfe;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.6);
}
.journey {
  width: 300px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto; scrollbar-width: none;
}
.panel {
  background: #fff; border-radius: 20px; padding: 18px 18px 16px;
  box-shadow: var(--shadow-md); border: 1px solid var(--line);
}
.panel-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.journey-status { margin: 0 0 12px; font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.steps li {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 700; color: #94a3b8; background: #f1f5f9;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.steps li.done { background: var(--best); color: #fff; }
.steps li.now { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; transform: scale(1.12); box-shadow: 0 0 0 4px rgba(37,99,235,0.15); }
.answers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.answers li { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 3px solid #dbe4f5; animation: rise 0.3s ease both; }
.answers li.empty { border: 0; padding: 0; color: #94a3b8; font-size: 0.88rem; }
.a-q { font-size: 0.76rem; color: var(--muted); }
.a-a { font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.paths { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.paths li {
  position: relative; padding: 9px 10px 9px 44px; border-radius: 12px; font-size: 0.88rem; font-weight: 600; color: #334155;
  background: #f8fafc; transition: background 0.3s, color 0.3s;
}
.paths li::before {
  content: ""; position: absolute; left: 9px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 8px;
  background-color: #cbd5e1; background-position: center; background-repeat: no-repeat; background-size: 15px;
  transition: background-color 0.3s;
}
.paths li.hit { background: #eef4ff; color: var(--ink); }
.paths li.hit::before { background-color: var(--accent); }
.paths li.hit::after {
  content: ""; position: absolute; right: 10px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%;
  background: var(--best) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.paths li.hit { padding-right: 36px; }
.i-trade::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 0 0 5.4-5.4l-2.5 2.5-2.4-.6-.6-2.4z'/%3E%3C/svg%3E"); }
.i-school::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9l10-5 10 5-10 5z'/%3E%3Cpath d='M6 11v5c3 2 9 2 12 0v-5'/%3E%3C/svg%3E"); }
.i-mission::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3 3 15 0 18M12 3c-3 3-3 15 0 18'/%3E%3C/svg%3E"); }
.i-job::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V5h6v2'/%3E%3C/svg%3E"); }
.i-move::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 18l6-6 4 4 6-8'/%3E%3Cpath d='M15 8h5v5'/%3E%3C/svg%3E"); }
.privacy {
  margin: 0; padding: 12px 14px 12px 44px; border-radius: 16px; position: relative;
  background: rgba(124,58,237,0.07); color: #4c3a8a; font-size: 0.82rem; font-weight: 500;
}
.privacy::before {
  content: ""; position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 7px;
  background: var(--stretch) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* Progress bar inside the chat card */
.progress { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px; box-shadow: none; }
.progress-inner { max-width: none; }
.progress-label { font-weight: 700; color: var(--ink); font-size: 0.82rem; }
.progress-track { height: 8px; background: #eef2f8; }
.progress-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--sun)); }

main { max-width: 860px; padding: 28px 24px 28px; gap: 16px; }
.msg { animation: rise 0.28s ease both; }

/* Coach avatar */
.msg.coach:not(.wide) { padding-left: 50px; position: relative; }
.msg.coach:not(.wide)::before {
  content: ""; position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 12px;
  background: var(--mark) center / 20px no-repeat, linear-gradient(135deg, #3b82f6, #6366f1);
  box-shadow: 0 4px 10px rgba(59,130,246,0.35);
}
.msg.coach + .msg.coach:not(.wide)::before { visibility: hidden; }
.coach .bubble {
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  border-radius: 18px; border-top-left-radius: 6px; padding: 12px 16px; color: #172033;
}
.user .bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-radius: 18px; border-bottom-right-radius: 6px;
  box-shadow: 0 6px 16px -4px rgba(79,70,229,0.45); padding: 11px 16px; font-weight: 500;
}
.meta { color: var(--accent); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 6px 2px; }

.choices { gap: 10px; margin-top: 12px; }
.choice, .action {
  background: #fff; border: 1.5px solid #d7e0ef; color: var(--ink); font-weight: 600; border-radius: 14px;
  padding: 11px 18px; box-shadow: var(--shadow-sm); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.choices.multi .choice, .choice { border-radius: 999px; }
@media (hover: hover) {
  .choice:not(:disabled):hover, .action:not(:disabled):hover {
    background: #f5f8ff; color: var(--accent); border-color: var(--accent); transform: translateY(-2px);
    box-shadow: 0 8px 18px -6px rgba(37,99,235,0.35);
  }
}
.choice[aria-pressed="true"] { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 14px; font-weight: 700; box-shadow: 0 6px 14px -4px rgba(79,70,229,0.5); }
.hint { color: var(--muted); }

/* Typing */
.typing { background: #fff; border: 1px solid var(--line); border-radius: 18px; border-top-left-radius: 6px; box-shadow: var(--shadow-sm); }
.typing span { background: var(--accent); }

/* Welcome screen */
.hero {
  flex-shrink: 0; width: 100%; max-width: 720px; margin: 12px auto 0; text-align: center;
  padding: 8px 8px 0; animation: rise 0.45s ease both;
}
.hero-mark {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 26px;
  background: var(--mark) center / 46px no-repeat, linear-gradient(135deg, #3b82f6, #6366f1 60%, #8b5cf6);
  box-shadow: 0 18px 40px -10px rgba(79,70,229,0.55), inset 0 1px 0 rgba(255,255,255,0.35);
}
.hero h2 {
  font-size: 2.5rem; line-height: 1.1; margin: 0 0 12px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink);
}
.hero-sub { margin: 0 auto 28px; max-width: 32em; color: var(--muted); font-size: 1.06rem; line-height: 1.55; }
.hero-points { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: left; }
.hero-points li {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 14px 14px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 3px; font-size: 0.86rem; color: var(--muted); position: relative;
}
.hero-points li strong { color: var(--ink); font-size: 0.98rem; font-weight: 700; margin-top: 40px; }
.hero-points li::before {
  content: ""; position: absolute; left: 14px; top: 14px; width: 34px; height: 34px; border-radius: 11px;
  background-position: center; background-repeat: no-repeat; background-size: 18px;
}
.p-tap::before { background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 3L5 14h6l-1 7 8-11h-6z'/%3E%3C/svg%3E"); }
.p-plan::before { background-color: var(--best); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5M4 19h16M8 15l4-4 3 3 5-6'/%3E%3C/svg%3E"); }
.p-safe::before { background-color: var(--stretch); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3C/svg%3E"); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.big { min-height: 54px; padding: 14px 28px; font-size: 1rem; border-radius: 16px; font-weight: 700; }
.hero .primary.big { box-shadow: 0 14px 30px -10px rgba(79,70,229,0.7); }
.hero .primary.big:hover { transform: translateY(-2px); }
.hero .ghost.big { border: 1.5px solid #d7e0ef; color: var(--ink); background: #fff; box-shadow: var(--shadow-sm); }
.hero .ghost.big:hover { border-color: var(--accent); color: var(--accent); }
.hero-foot { margin: 20px 0 0; font-size: 0.8rem; color: #8a94a6; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Result cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; border: 1px solid var(--line); border-radius: 20px; padding: 22px 20px 20px; background: #fff;
  box-shadow: var(--shadow-md); overflow: hidden; animation: rise 0.45s ease both;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent); }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card h3 { color: var(--ink); font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; margin: 10px 0 2px; }
.card dt { color: #8a94a6; font-size: 0.68rem; letter-spacing: 0.08em; margin-top: 14px; }
.card dd { color: #1f2a3d; font-size: 0.94rem; line-height: 1.5; }
.card dt:last-of-type { color: var(--ink); }
.card dd:last-of-type { background: #f6f8fc; border-radius: 12px; padding: 10px 12px; margin-top: 6px; font-weight: 600; }
.chip { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; padding: 4px 10px; }
.card-best::before { background: linear-gradient(90deg, #10b981, var(--best)); }
.card-best .chip:first-child { background: var(--best); }
.card-best .chip + .chip { background: var(--best-soft); color: var(--best); }
.card-best dd:last-of-type { background: var(--best-soft); }
.card-stretch::before { background: linear-gradient(90deg, #a78bfa, var(--stretch)); }
.card-stretch .chip:first-child { background: var(--stretch); }
.card-stretch .chip + .chip { background: var(--stretch-soft); color: var(--stretch); }
.card-stretch dd:last-of-type { background: var(--stretch-soft); }
.card-quick::before { background: linear-gradient(90deg, #fbbf24, var(--quick)); }
.card-quick .chip:first-child { background: var(--quick); }
.card-quick .chip + .chip { background: var(--quick-soft); color: var(--quick); }
.card-quick dd:last-of-type { background: var(--quick-soft); }

/* Composer */
footer { background: #fff; border-top: 1px solid var(--line); padding: 14px 24px 10px; box-shadow: none; }
.inner, .attach { max-width: 860px; }
#input { background: #f6f8fc; border: 1.5px solid #e2e8f3; border-radius: 16px; padding: 12px 16px; transition: border-color 0.15s, background 0.15s; }
#input:focus { background: #fff; border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px rgba(37,99,235,0.12); }
#send { border-radius: 16px; padding: 10px 22px; }
#attachBtn { border: 1.5px dashed var(--accent); color: var(--accent); background: #f5f8ff; border-radius: 12px; font-weight: 600; }
.dropzone { background: #fff; border: 2px dashed #b9c9ea; border-radius: 20px; padding: 22px 24px; box-shadow: var(--shadow-sm); }
.dropzone.over { background: #f5f8ff; border-color: var(--accent); }
.dropzone h2 { font-weight: 800; color: var(--ink); }
.note { color: #8a94a6; font-size: 0.76rem; margin-top: 8px; }

/* Narrow screens: no side panel, chat fills the screen */
@media (max-width: 1080px) {
  .journey { display: none; }
}
@media (max-width: 720px) {
  body { background: linear-gradient(180deg, #0f2f63 0px, #1b3f86 90px, var(--page) 240px); }
  header { padding: 12px 14px 10px; padding-top: max(12px, env(safe-area-inset-top)); }
  .shell { padding: 0; }
  .chat { border-radius: 20px 20px 0 0; }
  main { padding: 20px 14px; }
  footer { padding: 10px 12px 8px; }
  .progress { padding: 10px 14px; }
  .hero h2 { font-size: 1.8rem; }
  .hero-points { grid-template-columns: 1fr; }
  .hero-points li { padding-left: 60px; }
  .hero-points li strong { margin-top: 0; }
  .big { width: 100%; }
  .brand-sub { display: none; }
  .msg.coach:not(.wide) { padding-left: 0; }
  .msg.coach:not(.wide)::before { display: none; }
}
@media (min-width: 900px) { html, body { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .hero, .card, .msg, .answers li { animation: none; }
}

/* ===================================================================
   Round 2: landing screen, aurora background, ring, age tiles,
   plan header and print view.
   =================================================================== */

/* Aurora background: soft moving colour behind everything */
body { position: relative; }
body::before, body::after {
  content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(80px); opacity: 0.55; pointer-events: none;
}
body::before { width: 620px; height: 620px; left: -160px; top: -260px; background: #3b82f6; animation: drift 18s ease-in-out infinite alternate; }
body::after { width: 560px; height: 560px; right: -140px; top: -240px; background: #8b5cf6; animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.12); } }

/* Landing mode: no side panel, no progress, no composer */
body.is-welcome .journey, body.is-welcome .progress, body.is-welcome footer { display: none; }
body.is-welcome .chat {
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(248,250,255,0.97));
}
body.is-welcome main { max-width: 1200px; padding: 0; justify-content: center; }

/* Landing hero */
.hero {
  max-width: none; margin: 0; padding: 56px 56px; text-align: left;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
  min-height: 100%;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; color: var(--accent);
  background: #eef3ff; border: 1px solid #dbe5ff; padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--best); box-shadow: 0 0 0 4px rgba(5,150,105,0.18); }
.hero h2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); line-height: 1.04; letter-spacing: -0.035em; margin: 0 0 18px; }
.grad { background: linear-gradient(90deg, #2563eb, #7c3aed 55%, #db2777); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 0 0 30px; max-width: 30em; font-size: 1.1rem; }
.hero-actions { justify-content: flex-start; }
.big.go { padding-right: 52px; position: relative; }
.big.go::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s;
}
.big.go:hover::after { transform: translateX(4px); }
.big.up { padding-left: 50px; position: relative; }
.big.up::before {
  content: ""; position: absolute; left: 20px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1f44' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M12 17v-6M9 14l3-3 3 3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.trust { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.trust li { position: relative; padding-left: 26px; font-size: 0.9rem; font-weight: 600; color: #334155; }
.trust li::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: var(--best-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.hero-foot { margin-top: 14px; text-align: left; }

/* Plan preview art */
.hero-art { position: relative; min-height: 440px; display: grid; place-items: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.o1 { width: 340px; height: 340px; background: radial-gradient(circle at 30% 30%, #c7d7ff, #e9e3ff 60%, transparent 70%); }
.o2 { width: 140px; height: 140px; right: 6%; bottom: 4%; background: radial-gradient(circle at 30% 30%, #fde7c2, transparent 70%); }
.preview {
  position: relative; width: min(360px, 100%); background: rgba(255,255,255,0.9); backdrop-filter: blur(10px);
  border: 1px solid #e3e9f6; border-radius: 24px; padding: 16px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 10px; transform: rotate(-2deg); animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-10px); } }
.pv-top { display: flex; align-items: center; gap: 8px; padding: 2px 4px 6px; }
.pv-dot { width: 26px; height: 26px; border-radius: 9px; background: var(--mark) center / 15px no-repeat, linear-gradient(135deg, #3b82f6, #6366f1); }
.pv-title { font-weight: 800; color: var(--ink); flex: 1; }
.pv-tag { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: #f1f5f9; padding: 3px 8px; border-radius: 999px; }
.pv-card { border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; border-left: 4px solid; background: #fff; box-shadow: var(--shadow-sm); }
.pv-card strong { color: var(--ink); font-size: 0.98rem; }
.pv-step { font-size: 0.8rem; color: var(--muted); }
.pv-chip { align-self: flex-start; font-size: 0.64rem; font-weight: 800; color: #fff; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em; }
.pv-best { border-color: var(--best); } .pv-best .pv-chip { background: var(--best); }
.pv-stretch { border-color: var(--stretch); } .pv-stretch .pv-chip { background: var(--stretch); }
.pv-quick { border-color: var(--quick); } .pv-quick .pv-chip { background: var(--quick); }
.float {
  position: absolute; font-size: 0.76rem; font-weight: 700; color: var(--ink); background: #fff;
  border: 1px solid #e3e9f6; padding: 7px 12px; border-radius: 999px; box-shadow: var(--shadow-md); white-space: nowrap;
  animation: float2 6s ease-in-out infinite;
}
.f1 { left: 0; top: -1%; animation-delay: -1s; }
.f2 { right: 0; top: -1%; animation-delay: -3s; }
.f3 { right: -2%; bottom: 22%; animation-delay: -2s; }
.f4 { left: 0; bottom: 14%; animation-delay: -4s; }
.f5 { left: 30%; bottom: -2%; animation-delay: -5s; }
@keyframes float2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Progress ring in the side panel */
.ring-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ring {
  --p: 0; width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #eef2f8 0);
  transition: background 0.4s;
}
.ring span {
  width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-size: 0.82rem; font-weight: 800; color: var(--ink);
}
.ring-row .journey-status { margin: 0; }

/* Age answers as big tiles */
.choices.age-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 640px; }
.choices.age-grid .choice { border-radius: 16px; text-align: center; padding: 16px 10px; font-size: 1.02rem; font-weight: 800; }
.choices.age-grid .choice:nth-child(n+5) { font-weight: 600; font-size: 0.9rem; color: var(--muted); padding: 10px; }
.choices.age-grid .choice:nth-child(5) { grid-column: 1 / span 2; }
.choices.age-grid .choice:nth-child(6) { grid-column: 3 / span 2; }

/* Choice hover arrow for single choices */
.choices:not(.multi):not(.age-grid) .choice { padding-right: 20px; }

/* Plan header above the cards */
.plan-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding: 18px 20px; border-radius: 20px;
  background: linear-gradient(120deg, #0f2f63, #2563eb 60%, #7c3aed); color: #fff; box-shadow: 0 16px 34px -14px rgba(37,99,235,0.6);
  animation: rise 0.4s ease both;
}
.plan-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
.plan-head p { margin: 2px 0 0; font-size: 0.9rem; opacity: 0.85; }
.plan-head > div { flex: 1; }
.plan-badge {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; background: rgba(255,255,255,0.18)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2l3 6.5 7 .9-5.1 4.8 1.3 6.9L12 17.8 5.8 21l1.3-6.9L2 9.4l7-.9z'/%3E%3C/svg%3E") center / 24px no-repeat;
}
.plan-head .save { color: #fff; border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.12); font-weight: 700; border-radius: 12px; }
.plan-head .save:hover { background: rgba(255,255,255,0.25); }

/* Coach thinking text */
.typing::after { content: "Coach is thinking"; font-size: 0.82rem; color: var(--muted); margin-left: 8px; align-self: center; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding: 40px 32px; gap: 20px; }
  .hero-art { min-height: 360px; }
}
@media (max-width: 720px) {
  .hero { padding: 28px 18px; }
  .hero-art { display: none; }
  .hero h2 { font-size: 2.1rem; }
  .choices.age-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choices.age-grid .choice:nth-child(5) { grid-column: 1; }
  .choices.age-grid .choice:nth-child(6) { grid-column: 2; }
  .plan-head { flex-wrap: wrap; }
  .plan-head .save { width: 100%; }
  body::before, body::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .preview, .float { animation: none; }
}

/* Print: only the plan and the answers */
@media print {
  html, body { height: auto; overflow: visible; background: #fff; }
  body::before, body::after, header, footer, .progress, .msg.coach:not(.wide), .msg.user, .plan-head .save, .journey .panel:first-child, .journey .panel:nth-child(3), .privacy { display: none !important; }
  .shell { display: block; padding: 0; }
  .journey { display: block !important; width: auto; }
  .panel, .chat, .card { box-shadow: none !important; }
  .chat { border: 0; }
  main { overflow: visible; max-width: none; }
  .plan-head { background: none; color: #000; box-shadow: none; padding: 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card, .msg { animation: none !important; }
}
body.is-welcome .msg.coach:not(.wide) { align-self: center; }
