/* Public survey form */

.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--forest); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }

body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

/* ---------- top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { height: 52px; width: auto; }
.topbar-tag { font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: .01em; padding-inline-start: 14px; border-inline-start: 1px solid var(--line); }

.app { flex: 1; width: 100%; outline: none; }
.state-msg { max-width: 640px; margin: 80px auto; padding: 0 20px; display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--ink-2); }

.site-footer { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 28px 20px 36px; font-size: 13px; color: var(--ink-3); }

/* ---------- hero (intro) */
.hero { position: relative; overflow: hidden; background: var(--forest); color: #fff; isolation: isolate; }
.hero-mark { position: absolute; z-index: -1; width: 560px; max-width: none; inset-inline-end: -150px; top: -70px; opacity: .07; pointer-events: none; }
.hero-inner { max-width: 880px; margin: 0 auto; padding: 56px 20px 64px; }
.eyebrow { color: var(--gold); font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4.6vw, 44px); line-height: 1.35; margin-top: 14px; max-width: 18ch; }
.hero-rule { width: 64px; height: 2px; background: var(--gold); margin: 24px 0 20px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; color: rgba(255, 255, 255, .82); font-size: 15px; }
.hero-meta span { display: inline-flex; align-items: baseline; gap: 6px; }
.hero-meta strong { font-family: var(--font-num); font-weight: 600; color: #fff; font-size: 17px; }

.intro { max-width: 880px; margin: -32px auto 0; padding: 0 20px; position: relative; }
.intro-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 32px; display: grid; gap: 28px; }
.consent-quote { position: relative; padding-inline-start: 20px; border-inline-start: 2px solid var(--gold); font-size: 17px; line-height: 1.95; color: var(--ink); }
.prepare { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.prepare-title { font-size: 15px; font-weight: 700; color: var(--ink-2); grid-column: 1 / -1; }
.prepare-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.prepare-item .ico { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: var(--forest-tint); color: var(--forest); }
.draft-note { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--forest-tint); color: var(--forest); font-size: 14px; font-weight: 600; }
.intro-actions { display: grid; gap: 18px; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 24px; }
.intro-actions .btn { justify-self: start; min-width: 200px; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-3); }
.privacy-note svg { flex: none; margin-top: 4px; }

/* ---------- checkbox line (consent / declaration) */
.check-line { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 600; line-height: 1.8; }
.check-line input { position: absolute; opacity: 0; pointer-events: none; }
.check-line .mark { flex: none; margin-top: 4px; }

/* ---------- wizard layout */
.wizard { max-width: 1120px; margin: 0 auto; padding: 32px 20px 24px; display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 980px) { .wizard { grid-template-columns: 260px minmax(0, 1fr); gap: 48px; padding-top: 44px; } }

.stepper { display: none; }
@media (min-width: 980px) {
  .stepper { display: block; position: sticky; top: 104px; align-self: start; }
}
.stepper-title { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-bottom: 14px; }
.stepper ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.stepper li { position: relative; }
.stepper li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 22px; top: 44px; bottom: -10px; width: 1px; background: var(--line-strong); }
.stepper li.done:not(:last-child)::after { background: var(--forest); }
.step-link { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 8px; border: 0; background: none; text-align: start; border-radius: var(--radius-sm); cursor: default; color: var(--ink-3); }
.step-link[data-nav='true'] { cursor: pointer; }
.step-link[data-nav='true']:hover { background: var(--surface); }
.step-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-num); font-weight: 600; font-size: 13px; border: 1px solid var(--line-strong); background: var(--page); color: var(--ink-3); }
.step-name { font-size: 14px; font-weight: 600; line-height: 1.6; padding-top: 2px; }
.stepper li.current .step-dot { background: var(--forest); border-color: var(--forest); color: #fff; }
.stepper li.current .step-name { color: var(--ink); font-weight: 700; }
.stepper li.done .step-dot { background: var(--forest-tint); border-color: var(--forest); color: var(--forest); }
.stepper li.done .step-name { color: var(--ink-2); }

.mobile-progress { display: grid; gap: 10px; }
@media (min-width: 980px) { .mobile-progress { display: none; } }
.mp-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.mp-bar { display: grid; grid-auto-flow: column; gap: 4px; }
.mp-bar span { height: 4px; border-radius: 2px; background: var(--line); }
.mp-bar span.on { background: var(--forest); }

.step-head { margin-bottom: 24px; }
.step-kicker { font-family: var(--font-num); font-size: 13px; font-weight: 600; color: var(--gold-ink); letter-spacing: .06em; }
.step-head h2 { font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 32px); margin-top: 6px; outline: none; }
.step-head p { margin-top: 8px; color: var(--ink-2); max-width: 60ch; }

.questions { display: grid; gap: 16px; }

/* ---------- question card */
.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-1); transition: border-color .2s ease; scroll-margin-top: 110px; }
.q-card.has-error { border-color: #e9b4ad; }
.q-card fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-card legend { padding: 0; width: 100%; }
.q-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.q-num { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 6px; font-family: var(--font-num); font-weight: 600; font-size: 13px; color: var(--gold-ink); margin-top: 1px; }
.q-text { display: grid; gap: 4px; }
.q-label { font-size: 17px; font-weight: 700; line-height: 1.75; color: var(--ink); }
.q-hint { font-size: 14px; color: var(--ink-3); }
.q-body { padding-inline-start: 48px; }
@media (max-width: 560px) { .q-body { padding-inline-start: 0; } .q-card { padding: 18px; } }

.field-hint { margin-top: 6px; font-size: 13px; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.date-row { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 10px; max-width: 520px; }
.date-row .select { padding-inline-start: 10px; padding-inline-end: 28px; background-position: left 10px center; }
@media (max-width: 979px) { .step-kicker { display: none; } }
.age-pill { display: inline-flex; gap: 6px; align-items: baseline; margin-top: 12px; padding: 4px 12px; border-radius: 999px; background: var(--forest-tint); color: var(--forest); font-size: 14px; font-weight: 600; }
.age-pill .num { font-weight: 600; }
.counter { margin-top: 6px; font-size: 12px; color: var(--ink-3); text-align: end; font-family: var(--font-num); }

/* ---------- choices (radio / checkbox) */
.choices { display: grid; gap: 10px; }
.choices.cols-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; min-height: 52px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer; line-height: 1.7; transition: border-color .15s ease, background-color .15s ease; }
.choice:hover { border-color: var(--ink-3); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--forest); background: var(--forest-tint); }
.choice:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.choice-text { padding-top: 1px; }

.mark { width: 20px; height: 20px; flex: none; margin-top: 3px; border: 1.5px solid var(--ink-3); background: var(--surface); display: grid; place-items: center; transition: all .15s ease; }
.mark.radio { border-radius: 50%; }
.mark.box { border-radius: 4px; }
input:checked + .mark { border-color: var(--forest); background: var(--forest); }
input:checked + .mark.radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
input:checked + .mark.box::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check-line input:focus-visible + .mark { box-shadow: var(--focus-ring); }

/* ---------- yes / no */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 360px; }
.segmented .choice { justify-content: center; align-items: center; font-weight: 700; }
.details { margin-top: 16px; }

/* ---------- scale */
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 480px; }
.scale-opt { position: relative; }
.scale-opt input { position: absolute; opacity: 0; pointer-events: none; }
.scale-opt span { display: grid; place-items: center; height: 52px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-family: var(--font-num); font-weight: 600; font-size: 18px; cursor: pointer; transition: all .15s ease; }
.scale-opt span:hover { border-color: var(--ink-3); }
.scale-opt input:checked + span { background: var(--forest); border-color: var(--forest); color: #fff; }
.scale-opt input:focus-visible + span { box-shadow: var(--focus-ring); }
.scale-ends { display: flex; justify-content: space-between; max-width: 480px; margin-top: 8px; font-size: 13px; color: var(--ink-3); font-weight: 600; }

/* ---------- file upload */
.drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 18px; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.drop:hover, .drop.dragover { border-color: var(--forest); background: var(--forest-tint); }
.drop:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--forest); }
.drop-title { font-weight: 700; color: var(--ink); }
.drop-title u { color: var(--forest); text-decoration-thickness: 1px; }
.drop-sub { font-size: 13px; color: var(--ink-3); }
.drop.full { display: none; }
.file-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.file-thumb { flex: none; width: 44px; height: 44px; border-radius: 6px; background: var(--forest-tint); color: var(--forest); display: grid; place-items: center; font-family: var(--font-num); font-size: 11px; font-weight: 600; overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-meta { flex: 1; min-width: 0; display: grid; }
.file-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 12px; color: var(--ink-3); font-family: var(--font-num); }

/* ---------- declaration & nav */
.declaration { background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--gold); border-radius: var(--radius); padding: 20px 24px; }
.alert { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--error-tint); color: var(--error); font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.wizard-nav .btn-primary { min-width: 160px; }
.wizard-nav .spacer { flex: 1; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- submit overlay */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(248, 246, 240, .86); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; }
.overlay-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 28px; display: grid; gap: 14px; text-align: center; }
.overlay-card strong { font-size: 17px; }
.upload-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--forest); border-radius: 3px; transition: width .2s ease; }
.overlay-card .num { color: var(--ink-3); font-size: 14px; }

/* ---------- result screens */
.result { max-width: 640px; margin: 64px auto; padding: 0 20px; text-align: center; display: grid; justify-items: center; gap: 16px; }
.result-mark { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: #fff; margin-bottom: 8px; }
.result-mark.muted { background: var(--cream); color: var(--gold-ink); }
.code404 { font-size: 22px; font-weight: 600; }
.result h1 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 34px); outline: none; }
.result p { color: var(--ink-2); max-width: 52ch; }
.ref-box { margin-top: 12px; display: grid; gap: 4px; padding: 18px 36px; border: 1px solid var(--gold); border-radius: var(--radius); background: var(--surface); }
.ref-box span { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.ref-box strong { font-family: var(--font-num); font-size: 28px; font-weight: 600; letter-spacing: .04em; color: var(--forest); direction: ltr; }

@media (max-width: 560px) {
  .brand img { height: 44px; }
  .topbar-tag { display: none; }
  .hero-inner { padding: 40px 20px 56px; }
  .intro-card { padding: 22px 18px; }
  .intro-actions .btn { width: 100%; }
  .wizard-nav .btn { flex: 1; min-width: 0; }
  .date-row { grid-template-columns: 1fr 1.5fr 1.2fr; gap: 8px; }
}
