/* The entry questionnaire (js/intake/wizard.js), drawn in the bare full-height frame: a top band
   (back · section and progress · close or sign-out), the question, the answers anchored low where
   the thumb is, and one button. Tokens only; motion is transform and opacity, under 300 ms. */
.iw{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px}
.iw-top{flex:none;display:grid;grid-template-columns:40px minmax(0,1fr) 40px;align-items:center;gap:8px}
/* the back arrow keeps its place when there is nothing to go back to, so the bar does not jump */
.iw-top .icon-btn:disabled{visibility:hidden}
.iw-prog{min-width:0;display:flex;flex-direction:column;align-items:center;gap:7px}
.iw-sec{font-size:.8125rem;font-weight:600;color:var(--ink-2)}
.iw-sec small{font-size:.72rem;font-weight:500;color:var(--ink-3);margin-inline-start:4px}
.iw-bar{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:5px;width:min(100%,260px)}
.iw-bar span{height:4px;border-radius:999px;background:var(--line-2);overflow:hidden}
.iw-bar i{display:block;height:100%;border-radius:999px;background:var(--accent);transform-origin:right center;transform:scaleX(var(--f,0));transition:transform 240ms var(--ease-out)}
[dir="ltr"] .iw-bar i{transform-origin:left center}

.iw-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;display:flex;flex-direction:column;gap:12px;padding-block:10px 4px}
.iw-body::-webkit-scrollbar{display:none}
.iw-body > *{flex:none}
.iw-body > .iw-step{flex:1 0 auto;display:flex;flex-direction:column;gap:12px}
.iw-q{font-size:1.625rem;text-align:center;padding-inline:4px}
.iw-q:focus{outline:none}
.iw-sub{text-align:center;font-size:.9rem;color:var(--ink-3);max-width:38ch;margin-inline:auto}
.iw-step > .empty{margin-block:auto}

/* ---------- choices ---------- */
.iw-answers{margin-top:auto;padding-top:12px;display:flex;flex-direction:column;gap:10px}
.iw-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;min-height:58px;padding:12px 16px;border-radius:16px;background:var(--tile);text-align:start;transition:transform 120ms var(--ease-out),background-color 160ms ease}
.iw-card:active{transform:scale(.985)}
.iw-lbl{min-width:0;display:flex;flex-direction:column;gap:2px}
.iw-card b{font-size:1rem;font-weight:600}
.iw-card small{font-size:.8125rem;color:var(--ink-3)}
.iw-tick{width:24px;height:24px;flex:none;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 0 0 1.8px var(--line-2);color:transparent;transition:background-color 160ms ease,color 160ms ease}
.iw-card[data-kind="multi"] .iw-tick{border-radius:8px}
.iw-tick svg{width:14px;height:14px}
.iw-card[aria-pressed="true"]{background:var(--wash)}
.iw-card[aria-pressed="true"] .iw-tick{background:var(--accent);box-shadow:none;color:var(--on-accent)}
/* yes / no: two tall cards side by side */
.iw-yn{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.iw-yn .iw-card{grid-template-columns:minmax(0,1fr);justify-items:center;gap:10px;min-height:136px;padding:18px 12px;text-align:center}
.iw-yn .iw-card b{font-size:1.0625rem}
.iw-yn .iw-tick{width:46px;height:46px;box-shadow:none;background:var(--tile-2);color:var(--ink-2)}
.iw-yn .iw-tick svg{width:20px;height:20px}
.iw-quote{margin:0;background:var(--tile);border-radius:var(--r);padding:20px 18px;text-align:center;font-size:1.0625rem;line-height:1.55}

/* ---------- the body figure ---------- */
.iw-fig{background:var(--tile);border-radius:var(--r);padding:10px}
.iw-fig .bf-svg{width:auto;height:auto;max-width:100%;max-height:42vh;margin:0 auto}
.iw-picked{text-align:center}
.iw-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.iw-chips .chip{min-height:40px;padding-inline:16px}

/* ---------- numbers, the date, free text ---------- */
.iw-num{margin-top:auto;padding-top:12px;display:flex;align-items:baseline;justify-content:center;gap:10px}
.iw-num-in{width:8ch;max-width:62%;border:0;border-bottom:2px solid var(--line-2);border-radius:0;background:transparent;padding:4px 0;font:inherit;font-size:3rem;font-weight:800;line-height:1.1;text-align:center;direction:ltr;color:var(--ink);font-variant-numeric:tabular-nums}
.iw-num-in:focus{outline:none;border-bottom-color:var(--accent)}
.iw-num-in[aria-invalid="true"]{border-bottom-color:var(--danger)}
.iw-num-in::placeholder{color:var(--line-2)}
.iw-unit{font-size:1.125rem;font-weight:600;color:var(--ink-3)}
.iw-stp{margin-top:auto;padding-top:12px;display:flex;flex-direction:column;align-items:center;gap:8px}
.iw-stp .stp{width:100%;max-width:340px;grid-template-columns:64px minmax(0,1fr) 64px;background:var(--tile);border-radius:16px}
.iw-stp .stp button{height:68px;font-size:1.75rem}
.iw-stp .stp input{height:68px;font-size:2.25rem;font-weight:800}
.iw-stp .stp input::placeholder{color:var(--line-2)}
.iw-err{text-align:center}
.iw-date{margin-top:auto;padding-top:12px}
.iw-date .input{text-align:center;font-size:1.25rem;min-height:58px}
.iw-text{margin-top:auto;min-height:120px}

/* ---------- the consents ---------- */
.iw-consent{margin-top:auto;padding-top:12px;display:flex;flex-direction:column;gap:12px}
.iw-consent .sub{text-align:center}
.iw-check{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;background:var(--tile);border-radius:16px;padding:14px 16px;font-size:.94rem;line-height:1.45;cursor:pointer}
.iw-box{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;box-shadow:inset 0 0 0 1.8px var(--line-2);color:transparent;transition:background-color 160ms ease,color 160ms ease}
.iw-box svg{width:16px;height:16px}
.iw-box[aria-checked="true"]{background:var(--accent);box-shadow:none;color:var(--on-accent)}
.iw-check a{font-weight:600}

/* ---------- notes and the foot ---------- */
.iw-note{display:flex;align-items:flex-start;gap:10px;background:var(--wash);border-radius:14px;padding:12px 14px;font-size:.875rem;color:var(--ink)}
.iw-note > svg{width:18px;height:18px;flex:none;margin-top:2px;color:var(--secondary-text)}
.iw-note b{display:block;font-weight:600}
.iw-note small{display:block;font-size:.8125rem;color:var(--ink-2)}
.iw-foot{flex:none;display:flex;flex-direction:column;gap:10px;padding-top:2px}
.iw-foot #iwHint:empty{display:none}

@media (hover: hover) and (pointer: fine){
  .iw-card:not([aria-pressed="true"]):hover{background:var(--tile-2)}
  .iw-check:hover .iw-box:not([aria-checked="true"]){box-shadow:inset 0 0 0 1.8px var(--secondary)}
}
@media (prefers-reduced-motion: reduce){
  .iw-card:active{transform:none}
  .iw-bar i,.iw-tick,.iw-box{transition:none}
}
