/* intake.vanpraag.ai — the house style, narrowed to one column and a thumb.
 *
 * Same tokens as vanpraag.ai: cream ground, one gold accent, warm ink. The
 * display face is Fraunces (as on the marketing site) and everything you
 * actually operate is Assistant, so the question reads like a letter and the
 * buttons read like software.
 *
 * Two rules that shaped the rest:
 *   1. A tap target is never under 56px tall. This is used one-handed, outdoors.
 *   2. The chosen answer must be obvious at arm's length in daylight — hence a
 *      gold fill and a solid mark, not a tinted border.
 */

@font-face {
  font-family: "Assistant";
  src: url("fonts/assistant-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Assistant";
  src: url("fonts/assistant-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "Assistant";
  src: url("fonts/assistant-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  font-weight: 300 900; font-display: swap;
}

:root {
  --cream:      #faf6ec;
  --panel:      #f5edd9;
  --card:       #fffdf7;
  --ink:        #211c13;
  --ink-soft:   #6a6250;
  --gold:       #b8891f;
  --gold-deep:  #8a6a2f;
  --gold-bright:#d6a85e;
  --line:       rgba(184,137,31,.30);
  --line-soft:  rgba(184,137,31,.16);
  --brick:      #a6603f;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Assistant", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --col: 34rem;
  --shadow: 0 1px 2px rgba(33,28,19,.04), 0 18px 40px -28px rgba(33,28,19,.35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* The progress rail sits above everything and is the only chrome on the page. */
.rail {
  position: fixed; inset: 0 0 auto 0; height: 3px;
  background: var(--line-soft); z-index: 40;
}
.rail i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
  transition: width .35s cubic-bezier(.2,.7,.3,1);
}

main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem
           max(1.25rem, env(safe-area-inset-bottom));
}
.pad { width: 100%; max-width: var(--col); margin: 0 auto; }

/* ---------------------------------------------------------------- screens */

.screen {
  width: 100%; max-width: var(--col); margin: 0 auto;
  display: flex; flex-direction: column; flex: 1 1 auto;
}
.screen > .body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.screen.top > .body { justify-content: flex-start; }

@media (prefers-reduced-motion: no-preference) {
  .enter { animation: rise .34s cubic-bezier(.2,.7,.3,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}

/* ------------------------------------------------------------------ marks */

.bh {
  font-family: var(--sans); font-weight: 400;
  font-size: .8rem; color: var(--ink-soft);
  text-align: center; letter-spacing: .04em;
  margin: 0 0 1.5rem;
}
.mark { display: block; width: 62px; height: auto; margin: 0 auto 1.25rem; }
.mark.big { width: 96px; }

.eyebrow {
  font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 .6rem;
}
.eyebrow .of { color: var(--ink-soft); letter-spacing: .1em; }

h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 7vw, 2.35rem);
  line-height: 1.16;
  letter-spacing: -.015em;
  margin: 0 0 .75rem;
  text-wrap: balance;
}
h1 .quiet { color: var(--ink-soft); }

h2 {
  font-family: var(--display); font-weight: 600;
  font-size: 1.25rem; line-height: 1.25; margin: 0 0 .4rem;
}

.rule {
  width: 68px; height: 3px; border-radius: 2px; border: 0; margin: 0 0 1.35rem;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
}
.rule.center { margin-left: auto; margin-right: auto; }

.help { color: var(--ink-soft); font-weight: 400; margin: 0 0 1.4rem; font-size: 1rem; }
.help strong { font-weight: 800; color: var(--ink); }
.center { text-align: center; }

/* ----------------------------------------------------------------- options */

.options { display: flex; flex-direction: column; gap: .6rem; margin: 0 0 1rem; }

.opt {
  display: flex; align-items: center; gap: .85rem;
  width: 100%; min-height: 58px; padding: .85rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .12s, box-shadow .16s;
}
.opt:hover { border-color: var(--gold-bright); }
.opt:active { transform: scale(.988); }
.opt:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.opt .box {
  flex: 0 0 auto; width: 24px; height: 24px;
  border: 1.5px solid var(--line); border-radius: 50%;
  display: grid; place-items: center;
  transition: border-color .16s, background .16s;
}
.opt.square .box { border-radius: 7px; }
.opt .box svg { width: 14px; height: 14px; opacity: 0; transform: scale(.6); transition: .18s; }

.opt .txt { display: flex; flex-direction: column; gap: .1rem; }
.opt .lab { font-weight: 600; }
.opt .sub { font-size: .85rem; font-weight: 400; color: var(--ink-soft); }
.opt .key { display: none; }
/* Only where there is a keyboard to press: shown from 40rem up, on a device that
   can hover. On a phone the digit is noise beside every option. */
@media (hover: hover) and (min-width: 40rem) {
  .opt .key {
    display: block; margin-left: auto; font-size: .72rem; font-weight: 600;
    color: var(--ink-soft); opacity: .55; padding-left: .5rem;
  }
}

.opt.on {
  background: linear-gradient(180deg, #fdf4e2, #faeed6);
  border-color: var(--gold);
  box-shadow: 0 1px 0 rgba(184,137,31,.18), 0 10px 22px -18px rgba(138,106,47,.55);
}
.opt.on .box { background: var(--gold); border-color: var(--gold); }
.opt.on .box svg { opacity: 1; transform: none; }
.opt.on .lab { font-weight: 800; }

/* The inline "and which one?" field that a few options open up. */
.other {
  margin: -.2rem 0 .6rem; padding: 0 0 0 3.35rem;
  display: none;
}
.other.show { display: block; }

/* -------------------------------------------------------------- text input */

input[type="text"], textarea {
  width: 100%; padding: .85rem 1rem;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-weight: 600;
}
input[type="text"]:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,137,31,.14);
}
textarea { min-height: 8rem; resize: vertical; font-weight: 400; line-height: 1.55; }
::placeholder { color: #a49a83; font-weight: 400; }

.code-field {
  font-family: var(--sans); font-size: 1.5rem; font-weight: 800;
  letter-spacing: .18em; text-align: center; text-transform: uppercase;
  padding: 1rem .75rem;
}

/* ---------------------------------------------------------------- buttons */

.actions {
  display: flex; align-items: center; gap: .75rem;
  padding-top: 1.1rem; margin-top: auto;
}
.actions .spacer { flex: 1 1 auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 54px; padding: 0 1.5rem;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 800; cursor: pointer;
  transition: transform .12s, box-shadow .16s, background .16s, color .16s;
}
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.btn.gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #fffdf7;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 14px 26px -18px rgba(138,106,47,.9);
}
.btn.gold:hover { background: linear-gradient(180deg, #dcb26c, #c1901f); }
.btn.gold[disabled] { opacity: .45; box-shadow: none; cursor: default; }

.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--gold-bright); }

.btn.plain {
  background: none; border: 0; color: var(--ink-soft); padding: 0 .25rem;
  min-height: 44px; font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--line); text-underline-offset: 4px;
}
.btn.plain:hover { color: var(--gold-deep); }

.btn.wide { width: 100%; }

.btn.wa {
  background: var(--card); border-color: var(--line); color: var(--ink);
}
.btn.wa:hover { border-color: var(--gold-bright); }
.btn.wa svg { width: 20px; height: 20px; flex: 0 0 auto; }

/* ------------------------------------------------------------------ panels */

.panel {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: 14px; padding: 1rem 1.1rem; margin: 0 0 1rem;
}
.panel.quiet { background: var(--card); }
.panel h3 {
  font-family: var(--sans); font-size: .95rem; font-weight: 800;
  margin: 0 0 .25rem;
}
.panel p { margin: 0; font-size: .92rem; font-weight: 400; color: var(--ink-soft); }
.panel .how {
  margin-top: .5rem; font-size: .85rem; font-weight: 600; color: var(--gold-deep);
  background: #fffdf7; border: 1px dashed var(--line); border-radius: 10px;
  padding: .5rem .65rem;
}

.drop {
  border: 1.5px dashed var(--line); border-radius: 14px;
  background: var(--card); padding: 1.35rem 1rem; text-align: center;
  margin: 0 0 .85rem; cursor: pointer;
  transition: border-color .16s, background .16s;
}
.drop:hover, .drop.over { border-color: var(--gold); background: #fdf6e6; }
.drop .lab { font-weight: 800; }
.drop .sub { font-size: .85rem; font-weight: 400; color: var(--ink-soft); }

.filelist { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.filelist li {
  display: flex; align-items: center; gap: .6rem;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: .55rem .75rem; font-size: .9rem;
}
.filelist .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-bright); flex: 0 0 auto; }
.filelist .sz { margin-left: auto; color: var(--ink-soft); font-weight: 400; font-size: .8rem; }

/* ------------------------------------------------------------------ review */

.review { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.review li {
  border-bottom: 1px solid var(--line-soft);
  padding: .85rem 0; display: flex; gap: 1rem; align-items: flex-start;
}
.review .q { font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 .15rem; }
.review .a { font-weight: 800; margin: 0; }
.review .a.empty { color: var(--brick); font-weight: 600; }
.review .edit { flex: 0 0 auto; }

/* ------------------------------------------------------------------ status */

.status {
  position: fixed; left: 50%; transform: translateX(-50%);
  /* Clear of the action row: a toast that lands between Previous and Next reads
     as a third button. */
  bottom: calc(max(.9rem, env(safe-area-inset-bottom)) + 4.6rem);
  background: rgba(33,28,19,.92); color: #faf6ec;
  font-size: .8rem; font-weight: 600; padding: .45rem .9rem; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50;
}
.status.show { opacity: 1; }
.status.bad { background: var(--brick); }

.err { color: var(--brick); font-weight: 600; margin: .6rem 0 0; min-height: 1.4rem; }

.foot {
  margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line-soft);
  font-size: .78rem; font-weight: 400; color: var(--ink-soft); text-align: center;
}

.tick {
  width: 74px; height: 74px; margin: 0 auto 1.25rem;
  border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 18px 34px -22px rgba(138,106,47,.9);
}
.tick svg { width: 34px; height: 34px; }

@media (min-width: 40rem) {
  html, body { font-size: 18px; }
  main { padding: 2.5rem 1.5rem; }
  /* The mark carries the letterhead on a wide screen; at 62px it read as an afterthought. */
  .mark { width: 84px; }
  .mark.big { width: 118px; }
}
