/* Creative Microblading intake — palette lifted from the logo:
   teal→navy gradient band, feather grey, letter-spaced serif. Mobile-first, large type. */
:root {
  --navy: #0b2a5b;
  --ink: #12213d;
  --teal: #2bbfbf;
  --teal-deep: #138f94;
  --mist: #eaf6f6;
  --paper: #ffffff;
  --grey: #b5b5b5;
  --line: #cfdee1;
  --field: #7a8ca3;
  --mute: #4f5f76;
  --err: #b3261e;
  --err-bg: #fdecea;
  --band: linear-gradient(90deg, #2bbfbf 0%, #0b2a5b 100%);
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 19px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Layout ───────────────────────────── */
.shell { min-height: 100dvh; display: block; }
.brand-panel { display: none; }
.stage { max-width: 640px; margin: 0 auto; padding: 0 20px calc(140px + env(safe-area-inset-bottom)); }
.top { display: flex; justify-content: center; padding: calc(22px + env(safe-area-inset-top)) 0 14px; }
.top-logo { width: 148px; height: auto; }

/* The logo's own gradient banner, reused as the progress indicator. */
.band {
  position: sticky; top: 0; z-index: 20; margin: 0 -20px 8px; height: 60px;
  background: linear-gradient(90deg, #14909a 0%, #0b2a5b 100%); overflow: hidden;
}
/* progress = a bright line along the bottom edge; the text above stays on the dark gradient */
.band-fill { position: absolute; left: 0; bottom: 0; height: 6px; width: 0; background: #fff; border-radius: 0 6px 6px 0; box-shadow: 0 0 14px rgba(255,255,255,.7); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.band-text { position: relative; height: 100%; padding: 0 20px 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; text-shadow: 0 1px 2px rgba(7,28,64,.5); }
.band-text span { font: 700 16px var(--sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.band-text b { font: 700 25px/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; text-align: right; }

/* ── Type ─────────────────────────────── */
h1, h2, h3 { font-family: var(--serif); color: var(--navy); margin: 0; font-weight: 700; }
h1 { font-size: 44px; line-height: 1.02; letter-spacing: .01em; }
h2 { font-size: 36px; line-height: 1.08; letter-spacing: .01em; }
h3 { font-size: 26px; line-height: 1.15; }
h2:focus, #view:focus { outline: none; }
.eyebrow { font: 700 15px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #0d6f74; margin: 0 0 8px; }
.lede { font-size: 20px; color: var(--mute); margin: 12px 0 0; }
.step-head { margin: 22px 0 22px; }

/* ── Welcome ──────────────────────────── */
.welcome { padding-top: 10px; }
.welcome h1 { margin-bottom: 14px; }
.checklist { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: #fff; border: 2px solid var(--line); border-radius: var(--r); font-size: 19px; }
.checklist i { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--band); color: #fff; display: grid; place-items: center; font: 700 17px var(--sans); font-style: normal; }
.fine { font-size: 17px; color: var(--mute); margin-top: 22px; }
.fine a { color: var(--navy); font-weight: 600; }

/* ── Fields ───────────────────────────── */
.field { margin: 0 0 22px; }
.field > label, .field > .lbl, legend.lbl { display: block; font: 700 19px/1.3 var(--sans); color: var(--navy); margin: 0 0 9px; padding: 0; }
.hint { display: block; font-weight: 400; font-size: 17px; color: var(--mute); margin-top: 3px; }
.input {
  width: 100%; min-height: 62px; padding: 14px 18px; font: 500 20px/1.3 var(--sans); color: var(--ink);
  background: #fff; border: 2px solid var(--field); border-radius: 14px; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #8b99ab; font-weight: 400; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 5px rgba(43,191,191,.25); }
textarea.input { min-height: 120px; resize: vertical; }
input[type=date].input { display: block; text-align: left; min-width: 0; }
.row2 { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
.row2 .field { min-width: 0; }
.is-err .input { border-color: var(--err); background: var(--err-bg); }
.msg { display: none; margin: 9px 0 0; font: 600 17px/1.35 var(--sans); color: var(--err); }
.msg:not(:empty) { display: block; }
.msg::before { content: '! '; font-weight: 800; }

/* ── Yes / No ─────────────────────────── */
.yn { margin: 0 0 26px; padding: 0; border: 0; min-width: 0; }
.yn .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: grid; place-items: center; min-height: 64px; border: 2px solid var(--field); border-radius: 14px; background: #fff;
  font: 700 22px var(--sans); color: var(--navy); cursor: pointer; transition: all .15s; -webkit-tap-highlight-color: transparent;
}
.seg input:focus-visible + label { box-shadow: 0 0 0 5px rgba(43,191,191,.35); border-color: var(--teal); }
.seg input:checked + label { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg input[value=no]:checked + label { background: var(--teal-deep); border-color: var(--teal-deep); }
.seg.seg-photo label { min-height: 78px; padding: 10px 14px; text-align: center; font-size: 20px; line-height: 1.25; }
.seg.seg-photo input[value=yes]:checked + label { background: var(--teal-deep); border-color: var(--teal-deep); }
.seg.seg-photo input[value=no]:checked + label { background: var(--navy); border-color: var(--navy); }
.reveal { margin-top: 14px; animation: rise .25s ease both; }
.is-err .seg label { border-color: var(--err); }

/* ── Check cards ──────────────────────── */
.check { display: flex; gap: 16px; align-items: flex-start; padding: 18px; background: #fff; border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; margin: 0 0 12px; font-size: 19px; line-height: 1.45; -webkit-tap-highlight-color: transparent; transition: border-color .15s, background .15s; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.box { flex: none; width: 34px; height: 34px; border: 2.5px solid var(--field); border-radius: 10px; background: #fff; display: grid; place-items: center; transition: all .15s; margin-top: 1px; }
.box svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 3.4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .25s ease .05s; }
.check input:checked ~ .box { background: var(--band); border-color: var(--navy); }
.check input:checked ~ .box svg { stroke-dashoffset: 0; }
.check:has(input:checked) { border-color: var(--teal); background: var(--mist); }
.check input:focus-visible ~ .box { box-shadow: 0 0 0 5px rgba(43,191,191,.4); }
.is-err.check, .is-err > .check { border-color: var(--err); background: var(--err-bg); }

/* ── Reading blocks ───────────────────── */
.read { background: #fff; border: 2px solid var(--line); border-radius: var(--r); padding: 22px 20px; margin: 0 0 22px; }
.read h3 { margin-bottom: 10px; }
.read p { margin: 0 0 14px; font-size: 19px; line-height: 1.6; }
.read p:last-child { margin-bottom: 0; }
.risks { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.risks li { background: #fff; border: 2px solid var(--line); border-left: 6px solid var(--teal); border-radius: 14px; padding: 16px 18px; font-size: 19px; line-height: 1.55; }
.risks b { display: block; font: 700 22px var(--serif); color: var(--navy); letter-spacing: .03em; margin-bottom: 3px; }
.stmts { counter-reset: s; list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.stmts li { counter-increment: s; position: relative; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 16px 18px 16px 62px; font-size: 19px; line-height: 1.55; }
.stmts li::before { content: counter(s); position: absolute; left: 16px; top: 15px; width: 32px; height: 32px; border-radius: 50%; background: var(--band); color: #fff; font: 700 17px/32px var(--sans); text-align: center; }
.ack { margin: 0 0 22px; padding: 20px; background: var(--mist); border-radius: var(--r); font-size: 19px; }
.ack p { margin: 0 0 12px; } .ack p:last-child { margin: 0; }
.initials { width: 150px; text-align: center; text-transform: uppercase; letter-spacing: .3em; font-weight: 700; font-size: 26px; }

/* ── Signature ────────────────────────── */
.sigwrap { position: relative; background: #fff; border: 2.5px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sigwrap.is-err { border-color: var(--err); background: var(--err-bg); }
.sigwrap.live { border-color: var(--teal); box-shadow: 0 0 0 5px rgba(43,191,191,.22); }
.sigwrap canvas { display: block; width: 100%; height: 250px; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; font: 600 28px var(--serif); letter-spacing: .14em; text-transform: uppercase; color: #9fb3bd; transition: opacity .2s; }
.sigwrap.has .sig-hint { opacity: 0; }
.sig-x { position: absolute; left: 20px; bottom: 54px; font: 700 34px var(--serif); color: var(--teal-deep); pointer-events: none; }
.sig-line { position: absolute; left: 18px; right: 18px; bottom: 50px; border-bottom: 2px dashed var(--grey); pointer-events: none; }
.sig-clear { position: absolute; right: 12px; top: 12px; min-height: 48px; padding: 0 18px; border: 2px solid var(--line); background: #fff; border-radius: 12px; font: 700 17px var(--sans); color: var(--navy); cursor: pointer; }
.datechip { display: inline-flex; gap: 10px; align-items: baseline; margin: 16px 0 24px; padding: 12px 18px; background: var(--mist); border-radius: 14px; font-size: 19px; }
.datechip b { font-weight: 700; color: var(--navy); }

/* ── Bottom bar + buttons ─────────────── */
.bar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; gap: 12px; justify-content: center; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.bar > * { max-width: 300px; }
.btn { min-height: 62px; padding: 0 28px; border-radius: 16px; font: 700 21px var(--sans); border: 2px solid transparent; cursor: pointer; letter-spacing: .01em; transition: transform .1s, box-shadow .2s, opacity .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 5px rgba(43,191,191,.45); }
.btn.primary { flex: 1 1 auto; color: #fff; background: var(--band); box-shadow: 0 8px 22px -8px rgba(11,42,91,.55); text-shadow: 0 1px 1px rgba(7,28,64,.35); }
.btn.ghost { flex: 0 0 auto; background: #fff; color: var(--navy); border-color: var(--line); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn.block { width: 100%; margin-top: 26px; min-height: 68px; font-size: 22px; }
.bar.single .ghost { display: none; }
.bar.single .primary { max-width: 640px; }

/* ── Success ──────────────────────────── */
.done { text-align: center; padding-top: 18px; }
.done svg { width: 100%; max-width: 360px; height: auto; margin: 0 auto 6px; display: block; }
.done h1 { margin: 6px 0 12px; }
.done .lede { max-width: 30ch; margin-inline: auto; }
.ref { display: inline-block; margin-top: 22px; padding: 10px 18px; border-radius: 999px; background: var(--mist); color: var(--navy); font: 700 16px var(--sans); letter-spacing: .1em; }
.warn { margin-top: 20px; padding: 16px 18px; border-radius: 14px; background: #fff7e0; border: 2px solid #f0d58a; font-size: 18px; text-align: left; }

.err-banner { margin: 0 0 20px; padding: 16px 18px; border-radius: 14px; background: var(--err-bg); border: 2px solid var(--err); color: var(--err); font: 600 18px/1.4 var(--sans); }

/* ── Motion ───────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.enter { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.enter > * { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.enter > *:nth-child(2) { animation-delay: .05s; } .enter > *:nth-child(3) { animation-delay: .1s; }
.enter > *:nth-child(4) { animation-delay: .15s; } .enter > *:nth-child(5) { animation-delay: .2s; }
.feather path { fill: none; stroke-linecap: round; }
.feather.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .feather path { stroke-dashoffset: 0 !important; } }

/* Narrow phones: keep two-up rows from squeezing the inputs */
@media (max-width: 400px) { .row2 { grid-template-columns: 1fr; } h1 { font-size: 40px; } h2 { font-size: 33px; } .band-text b { font-size: 22px; letter-spacing: .08em; } }

/* ── Desktop / tablet: brand panel beside the form ── */
@media (min-width: 960px) {
  body { font-size: 18px; }
  .shell { display: grid; grid-template-columns: minmax(380px, 42%) 1fr; }
  .brand-panel { display: block; position: sticky; top: 0; height: 100dvh; background: radial-gradient(120% 90% at 20% 0%, #1d8f9a 0%, #0b2a5b 62%, #071b3d 100%); color: #fff; overflow: hidden; }
  .brand-inner { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px; gap: 34px; }
  .logo-card { background: #fff; border-radius: 28px; padding: 26px 30px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); }
  .logo-card img { width: min(300px, 100%); height: auto; }
  .brand-line { font: 600 38px/1.12 var(--serif); letter-spacing: .02em; text-align: center; margin: 0; color: #e8fbfb; }
  .brand-feather { width: min(340px, 100%); opacity: .75; }
  .top { display: none; }
  .stage { max-width: none; width: 100%; padding: 56px 56px 150px; }
  .stage > * { max-width: 620px; margin-inline: auto; }
  .band { margin: 0 auto 14px; border-radius: 14px; top: 20px; }
  .band-text { padding: 0 22px; }
  .bar { left: 42%; }
  .bar.single .primary { max-width: 620px; }
  .input, .check, .stmts li, .read p, .risks li { font-size: 18px; }
  .input { min-height: 56px; }
}
@media (min-width: 1500px) { .shell { grid-template-columns: 40% 1fr; } .bar { left: 40%; } }

/* `hidden` must always win over component display rules (e.g. .bar { display:flex }) */
[hidden] { display: none !important; }
.top-logo, .logo-card img, .login img { mix-blend-mode: multiply; }

/* ── One-question-per-screen layout ───── */
.q { font: 700 40px/1.08 var(--serif); color: var(--navy); margin: 22px 0 30px; letter-spacing: .005em; }
.q-long { font-size: 33px; }
.seg.big { gap: 14px; }
.seg.big label { min-height: 112px; border-radius: 24px; font-size: 36px; border-width: 3px; }
.reveal .lbl { display: block; font: 700 19px var(--sans); color: var(--navy); margin: 0 0 9px; }
.top, .top-logo { transition: all .3s ease; }
body.inner .top { padding-bottom: 8px; padding-top: calc(12px + env(safe-area-inset-bottom, 0px) * 0); }
body.inner .top-logo { width: 84px; }
.step-head h2 { font-size: 38px; }
@media (max-width: 400px) { .q { font-size: 36px; } .q-long { font-size: 30px; } .step-head h2 { font-size: 34px; } }
@media (min-width: 960px) { .q { font-size: 44px; } .q-long { font-size: 36px; } .seg.big label { min-height: 100px; } body.inner .top-logo { width: 84px; } }
.seg.big { display: grid; grid-template-columns: 1fr; gap: 16px; }
.read p { font-size: 20px; }
body.inner .step-head { margin: 14px 0 16px; }
.step-head h2 { font-size: 34px; }
.stmts li, .risks li { font-size: 19px; }

legend.q { padding: 0; float: left; width: 100%; } legend.q + * { clear: both; }
fieldset.yn { border: 0; padding: 0; min-width: 0; }

/* ── Compact Yes/No rows (several questions per screen) ── */
fieldset.yn.row { margin: 0 0 8px; padding: 0 0 22px; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
fieldset.yn.row:last-of-type { border-bottom: 0; }
legend.ql { float: left; width: 100%; padding: 0; margin: 0 0 12px; font: 700 21px/1.3 var(--sans); color: var(--navy); }
legend.ql + * { clear: both; }
legend.ql .hint { display: block; font-weight: 400; font-size: 17px; margin-top: 3px; }
.seg.compact { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg.compact label { min-height: 66px; border-radius: 16px; font-size: 26px; }
.reveal .input { margin-top: 2px; }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12'%3E%3Cpath d='M2 2l8 8 8-8' fill='none' stroke='%230b2a5b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 48px; }
