/* Guided profile prototypes. Same paper and ink as the site; one question owns the screen. */
@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/static/fonts/onest-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --paper: #FBFAE5; --sheet: #FFFEF6; --ink: #032859; --muted: #4F5F7C; --rule: #D9D6BD; --soft: #EFEDD3;
  --display: "Fraunces", Georgia, serif; --text: "Onest", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 20px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
a { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.top { position: fixed; inset: 0 0 auto; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(20px, env(safe-area-inset-right)) 18px max(20px, env(safe-area-inset-left)); background: var(--paper); }
.brand { font-family: var(--display); font-size: 1.15rem; text-decoration: none; }
.top-right { display: flex; gap: 20px; align-items: center; font-size: .9rem; color: var(--muted); }
.top-right a { color: var(--muted); }
.track { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--soft); z-index: 6; }
.track span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .35s ease; }
.iconbtn { background: none; border: 1px solid var(--rule); width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.iconbtn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ---------------------------------------------------------------- one at a time */
.stage { position: relative; min-height: 100%; display: grid; align-items: center;
  padding: 96px max(20px, env(safe-area-inset-right)) 64px max(20px, env(safe-area-inset-left)); }
.q { grid-area: 1 / 1; width: 100%; max-width: 760px; margin: 0 auto; }
.q-n { margin: 0 0 14px; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.q-prompt { font-family: var(--display); font-weight: 400; font-size: clamp(2.3rem, 8vw, 3.8rem); line-height: 1.06; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.q-hint { margin: 12px 0 0; color: var(--muted); font-size: 1.1rem; }
.answer { margin-top: 28px; }
.choices { display: grid; gap: 10px; max-width: 600px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px; font-size: 1.15rem; background: var(--sheet); border: 1px solid var(--rule); transition: border-color .12s, background .12s; }
.choice:hover { border-color: var(--ink); }
.choice .key { flex: none; width: 24px; height: 24px; display: grid; place-items: center; font-size: .75rem; border: 1px solid var(--rule); color: var(--muted); }
.choice.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choice.on .key { border-color: var(--paper); color: var(--paper); }
.fieldbox { position: relative; max-width: 640px; }
.field { width: 100%; font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink);
  padding: 8px 56px 10px 0; font-size: 1.8rem; resize: none; }
.field::placeholder { color: #9AA3B5; }
.field:focus { outline: none; border-bottom-width: 2px; }
.mic { position: absolute; right: 0; bottom: 10px; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--rule); cursor: pointer; }
.mic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.mic.on { background: var(--ink); color: var(--paper); border-color: var(--ink); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px rgba(3, 40, 89, .12); } }
.mic-status { min-height: 1.4em; margin: 8px 0 0; font-size: .85rem; color: var(--muted); }
.row { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.ok { background: var(--ink); color: var(--paper); border: 0; padding: 12px 28px; font-size: 1.1rem; cursor: pointer; font-weight: 500; }
.ok:disabled { opacity: .4; cursor: default; }
.skip { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.kbd { font-size: .8rem; color: var(--muted); }
@media (hover: none) { .kbd, .choice .key { display: none; } }

.in-up { animation: inUp .32s ease both; } .in-down { animation: inDown .32s ease both; }
.out-up { animation: outUp .24s ease both; pointer-events: none; } .out-down { animation: outDown .24s ease both; pointer-events: none; }
@keyframes inUp { from { opacity: 0; transform: translateY(28px); } }
@keyframes inDown { from { opacity: 0; transform: translateY(-28px); } }
@keyframes outUp { to { opacity: 0; transform: translateY(-28px); } }
@keyframes outDown { to { opacity: 0; transform: translateY(28px); } }

/* ---------------------------------------------------------------- the mini CV */
.cv { margin-top: 28px; max-width: 560px; background: var(--sheet); border: 1px solid var(--rule); padding: 22px 24px; }
.cv-name { font-family: var(--display); font-size: 1.6rem; margin: 0; }
.cv-line { margin: 2px 0 0; color: var(--muted); }
.meter { height: 3px; background: var(--soft); margin: 18px 0 6px; }
.meter span { display: block; height: 100%; background: var(--ink); }
.meter-label { margin: 0 0 12px; font-size: .85rem; color: var(--muted); }
.cv-facts { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px 16px; margin: 0; font-size: .95rem; }
.cv-facts dt { color: var(--muted); }
.cv-facts dd { margin: 0; min-width: 0; }
.add { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); }
@media (max-width: 520px) { .cv-facts { grid-template-columns: 1fr; gap: 0; } .cv-facts dd { margin-bottom: 10px; } }

/* ---------------------------------------------------------------- conversation */
.chat { max-width: 640px; margin: 0 auto; padding: 88px max(20px, env(safe-area-inset-right)) 40px max(20px, env(safe-area-inset-left)); }
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; animation: inUp .28s ease both; }
.msg.them { align-self: flex-start; font-family: var(--display); font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.15; padding-left: 0; }
.msg.me { align-self: flex-end; font-size: 1.1rem; background: var(--ink); color: var(--paper); border: 0; text-align: left; cursor: pointer; }
.msg.me:hover { opacity: .9; }
.msg.me.skipped { background: transparent; color: var(--muted); border: 1px dashed var(--rule); }
.msg.card { max-width: 100%; padding: 0; align-self: stretch; }
.msg.card .cv { margin-top: 4px; }
.typing { display: flex; gap: 5px; padding: 18px 0; }
.typing span { width: 6px; height: 6px; background: var(--muted); border-radius: 50%; animation: dot 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .2; } }
.dock { margin-top: 18px; padding-bottom: 24px; }
.dock .answer { margin-top: 0; }
.dock .choices { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); max-width: none; }
.dock .field { font-size: 1.5rem; }
.chat { max-width: 720px; }

/* ---------------------------------------------------------------- index */
.pick { max-width: 640px; margin: 0 auto; padding: 120px 20px 60px; }
.pick h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 5vw, 2.8rem); margin: 0; }
.pick p { color: var(--muted); }
.pick ul { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--rule); }
.pick li { border-bottom: 1px solid var(--rule); }
.pick li a { display: block; padding: 20px 0; text-decoration: none; }
.pick li strong { font-family: var(--display); font-weight: 400; font-size: 1.4rem; display: block; }
.pick li span { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- what's next */
.next { margin-top: 28px; max-width: 600px; }
.next-title { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0 0 10px; }
.next-list { list-style: none; counter-reset: n; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.next-list li { counter-increment: n; display: grid; grid-template-columns: 2.2em 1fr; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.next-list li::before { content: counter(n); grid-row: span 2; font-family: var(--display); color: var(--muted); }
.next-list strong { font-weight: 500; }
.next-list span { color: var(--muted); }

/* ---------------------------------------------------------------- welcome before the intake */
.welcome .lead { font-size: 1.25rem; color: var(--muted); margin: 16px 0 0; max-width: 32em; }
.welcome-facts { list-style: none; padding: 0; margin: 32px 0 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); max-width: 640px; }
.welcome-facts li { padding: 14px 16px 14px 0; display: grid; gap: 2px; }
.welcome-facts strong { font-family: var(--display); font-weight: 400; font-size: 1.3rem; }
.welcome-facts span { color: var(--muted); font-size: .95rem; }
.welcome .ok { font-size: 1.2rem; padding: 14px 36px; }
.small-note { margin-top: 20px; font-size: .9rem; color: var(--muted); }
@media (max-width: 560px) { .welcome-facts { grid-template-columns: 1fr; } .welcome-facts li { border-bottom: 1px solid var(--rule); } }
