/* The intake wizard: the drawing panel on the left, one question on the right,
   progress along the top. Collapses to a short band above the question on phones. */
.wz { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 42%) minmax(0, 1fr); }

/* Left: the teal panel and its self-drawing sheet */
.wz-art { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: space-between;
  gap: 24px; padding: 30px clamp(24px, 3.5vw, 52px) 40px; color: #fff; overflow: hidden;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(60, 100, 99, .55), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
    var(--teal);
  background-size: auto, 24px 24px, 24px 24px, auto; }
.wz-logo img { height: 20px; width: auto; filter: brightness(0) invert(1); }
.wz-art-sheet { flex: 1; display: grid; place-items: center; min-height: 0; }
.wz-art-sheet svg { max-height: 100%; }
.wz-art-caption { border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 18px; max-width: 460px; }
.wz-art-step { margin: 0 0 6px; font: 600 12px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--sand); }
.wz-art-line { margin: 0; font: 500 20px/1.35 var(--head); color: #fff; letter-spacing: -.01em; }

/* Right: progress, the question, the buttons */
.wz-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-height: 100vh; padding: 28px clamp(20px, 5vw, 80px) 28px; }
.wz-top { display: grid; gap: 14px; }
.wz-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; margin: 0;
  font: 500 13px/1 var(--head); color: var(--muted); }
.wz-steps li { display: flex; align-items: center; gap: 8px; transition: color .3s; }
.wz-steps span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line); font-size: 10.5px; letter-spacing: .04em; background: var(--surface); transition: all .3s var(--ease); }
.wz-steps .is-here { color: var(--ink); }
.wz-steps .is-here span { border-color: var(--teal); color: var(--teal); box-shadow: 0 0 0 3px var(--green-bg); }
.wz-steps .is-done span { background: var(--teal); border-color: var(--teal); color: transparent; position: relative; }
.wz-steps .is-done span::after { content: ""; position: absolute; width: 8px; height: 4px; border: solid #fff;
  border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg) translate(1px, -1px); }
.wz-meter { display: flex; align-items: center; gap: 16px; }
.wz-bar { flex: 1; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.wz-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-2), var(--teal));
  border-radius: 4px; transition: width .6s var(--ease); }
.wz-percent { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; min-width: 112px; text-align: right; }
.wz-percent b { font: 700 18px/1 var(--head); color: var(--teal); font-variant-numeric: tabular-nums; }

.wz-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; padding: clamp(28px, 6vh, 64px) 0; }
.wz-card { grid-area: 1 / 1; max-width: 640px; width: 100%; }
.enter-forward { animation: wz-in-up .45s var(--ease) both; }
.enter-back { animation: wz-in-down .45s var(--ease) both; }
.leave-forward { animation: wz-out-up .25s ease both; pointer-events: none; }
.leave-back { animation: wz-out-down .25s ease both; pointer-events: none; }
@keyframes wz-in-up { from { opacity: 0; transform: translateY(28px); } }
@keyframes wz-in-down { from { opacity: 0; transform: translateY(-28px); } }
@keyframes wz-out-up { to { opacity: 0; transform: translateY(-24px); } }
@keyframes wz-out-down { to { opacity: 0; transform: translateY(24px); } }

.wz-count { margin: 0 0 14px; font: 600 12px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--teal-2); }
.wz-count span { color: var(--sage); }
.wz-question { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; margin: 0 0 12px; text-wrap: balance; }
.wz-help { margin: 0 0 8px; color: var(--muted); font-size: 16px; max-width: 540px; }
.wz-input { margin-top: 28px; }
.wz-error { min-height: 22px; margin: 14px 0 0; font-size: 14px; }
.wz-error.is-error { color: var(--red); }
.wz-error.is-warning { color: var(--amber); }
.wz-error.is-info { color: var(--teal-2); }
.wz-resend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.wz-dev { font: 500 12.5px/1.4 var(--head); color: var(--amber); }
.link { background: none; border: 0; padding: 0; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.wz-nav { display: flex; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.wz-next { margin-left: auto; min-width: 150px; }
.wz-next.is-busy { opacity: .7; pointer-events: none; }
.wz-next.is-busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; animation: wz-spin .7s linear infinite; }
@keyframes wz-spin { to { transform: rotate(360deg); } }
.wz-hint { font-size: 13px; color: var(--muted); margin-left: auto; }
.wz-hint + .wz-next { margin-left: 0; }
.wz-hint kbd { font: 600 11.5px/1 var(--head); background: var(--surface); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 4px; padding: 3px 6px; color: var(--ink); }

/* Inputs */
.in-line { width: 100%; border: 0; border-bottom: 1.5px solid var(--line); background: transparent; padding: 10px 0 12px;
  font: 500 clamp(22px, 2.4vw, 28px)/1.3 var(--head); color: var(--ink); border-radius: 0; transition: border-color .25s; }
.in-line::placeholder { color: #B7BCB9; }
.in-line:focus { outline: none; border-bottom-color: var(--teal); }

.in-code { position: relative; display: inline-flex; gap: 10px; }
.in-code-input { position: absolute; inset: 0; width: 100%; opacity: 0; border: 0; font-size: 16px; caret-color: transparent; }
.in-code-box { display: grid; place-items: center; width: 58px; height: 68px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); font: 600 28px/1 var(--head); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.in-code-box.is-active { border-color: var(--teal); box-shadow: 0 0 0 4px var(--green-bg); }
.in-code-box.is-active:empty::after { content: ""; width: 2px; height: 28px; background: var(--teal); animation: wz-blink 1s steps(1) infinite; }
@keyframes wz-blink { 50% { opacity: 0; } }

.in-choices { display: grid; gap: 10px; max-width: 560px; }
.in-choice { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px;
  transition: border-color .2s, background .2s, transform .15s var(--ease); }
.in-choice:hover { border-color: var(--sage); }
.in-choice:active { transform: scale(.995); }
.in-choice.is-on { border-color: var(--teal); background: #F2F6F5; }
.in-key { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid var(--line); font: 600 12px/1 var(--head); color: var(--muted); background: var(--bg); }
.in-choice.is-on .in-key { background: var(--teal); border-color: var(--teal); color: #fff; }
.in-choice-text { flex: 1; display: flex; flex-direction: column; }
.in-choice-text b { font: 600 16px/1.3 var(--head); }
.in-choice-text small { color: var(--muted); font-size: 13.5px; }
.in-tick { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; position: relative; }
.in-choice.is-on .in-tick { border-color: var(--teal); background: var(--teal); }
.in-choice.is-on .in-tick::after { content: ""; position: absolute; left: 5px; top: 3px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.in-other, .in-note { display: none; }
.in-other.is-shown { display: block; margin-top: 4px; font-size: 20px; }
.in-note.is-shown { display: block; margin: 4px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--amber-bg);
  color: var(--amber); font-size: 14px; }

.in-file { display: grid; gap: 12px; max-width: 560px; }
.in-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 20px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--sage); border-radius: 12px; background: var(--surface); transition: all .2s var(--ease); }
.in-drop:hover, .in-drop.is-over { border-color: var(--teal); background: #F2F6F5; }
.in-drop.is-over { transform: scale(1.01); }
.in-drop svg { width: 40px; height: 40px; fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.in-drop b { font: 600 16px/1.3 var(--head); }
.in-drop span { font-size: 13.5px; color: var(--muted); }
.in-file.has-file .in-drop { display: none; }
.in-chosen:empty { display: none; }
.in-chosen { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface);
  border: 1.5px solid var(--teal); animation: wz-in-up .35s var(--ease) both; }
.in-chosen svg { width: 28px; height: 28px; fill: var(--green-bg); stroke: var(--teal); stroke-width: 1.4; }
.in-chosen span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.in-chosen b { font: 600 15px/1.3 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-chosen small { color: var(--muted); }
.in-remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13.5px; text-decoration: underline; }
.in-skip { justify-self: start; background: none; border: 0; padding: 4px 0; color: var(--teal); cursor: pointer;
  font: 500 14.5px/1 var(--head); text-decoration: underline; text-underline-offset: 4px; }

/* Pick several: square ticks, and a name box under options that ask for one */
.in-multi-row { display: grid; gap: 6px; }
.in-tick.is-square { border-radius: 5px; }
.in-choice.is-on .in-tick.is-square::after { left: 5px; top: 2px; }
.is-multi .in-other.is-shown { margin: 0 0 4px 56px; width: calc(100% - 56px); font-size: 18px; padding: 6px 0 8px; }

/* Several files on one screen: the drawing large, the optional ones compact */
.in-files { display: grid; gap: 10px; max-width: 560px; }
.in-file.is-compact .in-drop { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; padding: 14px 16px; }
.in-file.is-compact .in-drop svg { width: 26px; height: 26px; margin: 0; flex: none; }
.in-file.is-compact .in-drop b { font-size: 14.5px; }
.in-file.is-compact .in-drop span { font-size: 12.5px; }
.in-file.is-compact .in-drop > b + span { margin-left: auto; }
.in-chosen em { font: 600 10.5px/1.2 var(--head); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-2); }

.in-consent { display: grid; gap: 10px; max-width: 580px; }
.in-check { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; padding: 16px; border-radius: 10px;
  background: var(--surface); border: 1.5px solid var(--line); font-size: 15.5px; transition: border-color .2s; }
.in-check:hover { border-color: var(--sage); }
.in-check input { position: absolute; opacity: 0; }
.in-box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--sage); margin-top: 1px;
  position: relative; transition: all .2s; }
.in-check input:checked + .in-box { background: var(--teal); border-color: var(--teal); }
.in-check input:checked + .in-box::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.in-check input:focus-visible + .in-box { outline: 2px solid var(--teal-2); outline-offset: 2px; }
.in-check em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 4px; }
.in-legal { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.in-agree { font-size: 14px; padding: 14px 16px; margin-top: 4px; }

@media (max-width: 900px) {
  .wz { grid-template-columns: 1fr; }
  .wz-art { position: relative; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap;
    gap: 12px 20px; padding: 18px 16px 18px; }
  .wz-art-sheet { order: 3; flex: 1 1 100%; max-height: 160px; }
  .wz-art-sheet svg { max-height: 160px; width: auto; }
  .wz-art-caption { display: none; }
  .wz-main { min-height: auto; padding: 20px 16px 24px; }
  .wz-stage { align-items: start; }
  .wz-hint { display: none; }
  /* Keep Back / Continue in reach above the phone keyboard. */
  .wz-nav { position: sticky; bottom: 0; z-index: 4; background: var(--bg); margin: 0 -16px; padding: 12px 16px; }
  .in-code-box { width: calc((100vw - 32px - 50px) / 6); max-width: 54px; height: 60px; }
}
