/* ==========================================================================
   City Courier — Studi Pendahuluan (formulir penelitian)
   Halaman publik dengan gaya tersendiri agar tidak mengganggu admin panel.
   ========================================================================== */

:root {
    --blue: #0095FC;
    --blue-deep: #0084E0;
    --blue-ink: #0B4F7C;
    --orange: #FF5A00;
    --ink: #111827;
    --ink-soft: #1B2B3E;
    --muted: #6B7A8F;
    --muted-light: #93A2B4;
    --line: #E4EBF3;
    --line-soft: #EDF2F8;
    --bg: #F8FAFC;
    --white: #fff;
    --danger: #B42318;
    --radius: 14px;
    --radius-lg: 18px;
    --shadow-card: 0 1px 2px rgba(17, 24, 39, .04);
    --shadow-nav: 0 14px 34px -22px rgba(15, 23, 42, .5);
    --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 380px at 50% -160px, rgba(0, 149, 252, .14), rgba(0, 149, 252, 0) 72%),
        linear-gradient(180deg, #F5FAFF 0%, var(--bg) 430px);
    background-repeat: no-repeat;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea {
    font: inherit;
    color: inherit;
}

h1, h2, h3, p, ul, ol, dl, dd {
    margin: 0;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: top .18s ease;
}

.skip-link:focus {
    top: 12px;
}

/* ── Top bar ─────────────────────────────────────────────────────────── */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(228, 235, 243, .9);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 12px 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand img {
    height: 30px;
    width: auto;
    max-width: 152px;
    object-fit: contain;
}

.brand-sep {
    width: 1px;
    height: 20px;
    background: var(--line);
}

.brand-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #728094;
}

.topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border: 1px solid #D5EDFF;
    border-radius: 999px;
    background: #EFF8FF;
    color: #0F5C8C;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 0, .13);
}

/* ── Layout ──────────────────────────────────────────────────────────── */

.shell {
    max-width: 848px;
    margin: 0 auto;
    padding: 34px 22px 60px;
}

.masthead {
    padding: 10px 0 24px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #46789C;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
}

.page-title {
    max-width: 30ch;
    margin-bottom: 14px;
    font-family: var(--font-display);
    font-size: clamp(25px, 3.5vw, 35px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.022em;
    color: #0E1726;
}

.lede {
    max-width: 62ch;
    color: #55637A;
    font-size: 14.5px;
    line-height: 1.72;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding: 0;
    list-style: none;
}

.meta li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    color: #5A6B80;
    font-size: 11.5px;
    font-weight: 500;
}

.meta-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--blue);
    opacity: .55;
}

/* ── Intro ───────────────────────────────────────────────────────────── */

.intro {
    position: relative;
    margin-bottom: 18px;
    padding: 20px 22px 20px 24px;
    border: 1px solid #D9ECFB;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #F8FCFF 0%, #F1F9FF 100%);
    overflow: hidden;
}

.intro::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--blue), #7ACBFF);
}

.intro-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.intro-head h2 {
    color: #2C6F9E;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.intro-toggle {
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: none;
    color: var(--blue-deep);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.intro-toggle:hover {
    border-color: #CBE8FB;
    background: #EAF6FF;
}

.intro-body p {
    max-width: 68ch;
    margin-bottom: 11px;
    color: #43526A;
    font-size: 13.3px;
    line-height: 1.78;
}

.intro-body p:last-child {
    margin-bottom: 0;
}

.intro-body strong {
    color: #16243A;
    font-weight: 600;
}

/* ── Progress ────────────────────────────────────────────────────────── */

.progress {
    margin-bottom: 16px;
    padding: 15px 18px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.progress-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.progress-label {
    color: #8494A8;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.progress-count {
    color: #5A6B80;
    font-size: 11.5px;
}

.progress-count strong {
    color: #0E1726;
    font-weight: 700;
}

.progress-bar {
    height: 5px;
    margin: 10px 0 13px;
    border-radius: 999px;
    background: #EDF2F8;
    overflow: hidden;
}

.progress-fill {
    display: block;
    width: 20%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #34A9FF, var(--blue));
    transition: width .36s cubic-bezier(.2, .7, .3, 1);
}

.steps-rail {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}

.steps-rail::-webkit-scrollbar {
    display: none;
}

.steps-rail li {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    color: #98A6B8;
    font-size: 11px;
    transition: color .18s ease;
}

.rail-dot {
    display: grid;
    place-items: center;
    flex: none;
    width: 20px;
    height: 20px;
    border: 1.5px solid #DDE6EF;
    border-radius: 50%;
    background: #fff;
    color: #93A3B6;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.rail-label {
    white-space: nowrap;
}

.steps-rail li.is-current {
    color: #0E1726;
    font-weight: 600;
}

.steps-rail li.is-current .rail-dot {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 149, 252, .13);
}

.steps-rail li.is-done .rail-dot {
    border-color: #BFE4FF;
    background: #E8F5FF;
    color: #0079CE;
}

/* ── Step header ─────────────────────────────────────────────────────── */

.step {
    animation: stepIn .22s ease both;
    scroll-margin-top: 92px;
}

@keyframes stepIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

.step-head {
    margin: 24px 4px 14px;
    outline: none;
}

.step-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #8797AA;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.step-kicker::before {
    content: "";
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: var(--orange);
}

.step-title {
    margin-bottom: 5px;
    color: #0E1726;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.012em;
}

.step-desc {
    max-width: 62ch;
    color: #6B7A8F;
    font-size: 12.8px;
    line-height: 1.65;
}

/* ── Question cards ──────────────────────────────────────────────────── */

.questions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.q {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.q:hover {
    border-color: #D3E3F1;
}

.q:focus-within {
    border-color: rgba(0, 149, 252, .45);
    box-shadow: 0 0 0 4px rgba(0, 149, 252, .07);
}

.q-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.q-no {
    flex: none;
    min-width: 27px;
    margin-top: 1px;
    padding: 6px 5px;
    border: 1px solid #E7F0F7;
    border-radius: 8px;
    background: #F3F8FC;
    color: #8AA0B5;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.q:focus-within .q-no {
    border-color: #CDEAFF;
    background: #EFF9FF;
    color: #0079CE;
}

.q-title {
    color: #182538;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.48;
}

.q-req {
    margin-left: 3px;
    color: var(--orange);
    font-weight: 700;
}

.q-help {
    margin-top: 3px;
    color: #8494A8;
    font-size: 11.8px;
    line-height: 1.55;
}

.q-body {
    margin-top: 14px;
    padding-left: 39px;
}

/* ── Options ─────────────────────────────────────────────────────────── */

.options {
    display: grid;
    gap: 7px;
}

.option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 10px 13px;
    border: 1px solid #E7EEF6;
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.option:hover {
    border-color: #CFE3F3;
    background: #F9FCFF;
}

.option input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.option-mark {
    position: relative;
    flex: none;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    border: 1.5px solid #B9C8D8;
    background: #fff;
    transition: background .16s ease, border-color .16s ease;
}

.options--radio .option-mark {
    border-radius: 50%;
}

.options--checkbox .option-mark {
    border-radius: 5px;
}

.options--radio .option-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 7px;
    height: 7px;
    margin: auto;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transition: opacity .14s ease;
}

.options--checkbox .option-mark::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 5px;
    width: 5px;
    height: 9px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(42deg) scale(.8);
    opacity: 0;
    transition: opacity .14s ease, transform .14s ease;
}

.option:has(input:checked),
.option.is-checked {
    border-color: rgba(0, 149, 252, .5);
    background: #F4FAFF;
    box-shadow: inset 0 0 0 1px rgba(0, 149, 252, .26);
}

.option:has(input:checked) .option-mark,
.option.is-checked .option-mark {
    border-color: var(--blue);
    background: var(--blue);
}

.option:has(input:checked) .option-mark::after,
.option.is-checked .option-mark::after {
    opacity: 1;
}

.options--checkbox .option:has(input:checked) .option-mark::after,
.options--checkbox .option.is-checked .option-mark::after {
    transform: rotate(42deg) scale(1);
}

.option:has(input:checked) .option-text,
.option.is-checked .option-text {
    color: var(--blue-ink);
    font-weight: 600;
}

.option input:focus-visible + .option-mark {
    box-shadow: 0 0 0 3px rgba(0, 149, 252, .3);
}

.option-text {
    color: #35465C;
    font-size: 13.2px;
    line-height: 1.5;
    transition: color .16s ease;
}

/* ── Other / free-text input ─────────────────────────────────────────── */

.other-field {
    margin-top: 8px;
    padding: 11px 13px;
    border: 1px dashed #C9E2F4;
    border-radius: 11px;
    background: #F8FCFF;
}

.other-label,
.field-label {
    display: block;
    margin-bottom: 6px;
    color: #4C7A99;
    font-size: 11.5px;
    font-weight: 600;
}

.text-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D5E6F4;
    border-radius: 9px;
    background: #fff;
    color: #16243A;
    font-size: 13.2px;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.text-input::placeholder {
    color: #A9B6C5;
}

.text-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 149, 252, .14);
}

/* ── Linear scale ────────────────────────────────────────────────────── */

.scale-cells {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
}

.scale-cell {
    position: relative;
    display: grid;
    place-items: center;
    height: 43px;
    border: 1px solid #E7EEF6;
    border-radius: 10px;
    background: #fff;
    color: #516478;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.scale-cell:hover {
    border-color: #C9E1F4;
    background: #F9FCFF;
}

.scale-cell input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.scale-cell:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
    box-shadow: 0 5px 14px -6px rgba(0, 149, 252, .7);
}

.scale-cell:has(input:focus-visible) {
    outline: 2px solid rgba(0, 149, 252, .45);
    outline-offset: 2px;
}

.scale-legend {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 7px;
    color: #94A3B6;
    font-size: 10.8px;
}

/* ── Textarea ────────────────────────────────────────────────────────── */

.textarea-wrap {
    position: relative;
}

.textarea {
    display: block;
    width: 100%;
    min-height: 100px;
    padding: 12px 13px 27px;
    border: 1px solid #E1EAF3;
    border-radius: 11px;
    background: #fff;
    color: #16243A;
    font-size: 13.2px;
    line-height: 1.65;
    resize: vertical;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.textarea::placeholder {
    color: #A9B6C5;
}

.textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 149, 252, .12);
}

.char-count {
    position: absolute;
    right: 11px;
    bottom: 8px;
    color: #A3B1C0;
    font-family: var(--font-mono);
    font-size: 10px;
    pointer-events: none;
}

/* ── Errors ──────────────────────────────────────────────────────────── */

.q.has-error {
    border-color: #F0C2C2;
    background: #FFFDFD;
}

.q.has-error .q-no {
    border-color: #FADBDB;
    background: #FEF2F2;
    color: #C0392B;
}

.q.has-error .option {
    border-color: #F3D6D5;
}

.q-error {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 11px 0 0 39px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.q-error::before {
    content: "!";
    display: grid;
    place-items: center;
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    border-radius: 50%;
    background: #D92D20;
    color: #fff;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
}

.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #F3C7C4;
    border-radius: 12px;
    background: #FFF7F6;
    color: #8E1F17;
    font-size: 12.5px;
    line-height: 1.6;
    outline: none;
}

.form-alert::before {
    content: "!";
    display: grid;
    place-items: center;
    flex: none;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    border-radius: 50%;
    background: #D92D20;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.form-alert ul {
    padding-left: 15px;
}

.form-alert li + li {
    margin-top: 3px;
}

/* ── Inline notes ────────────────────────────────────────────────────── */

.inline-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    padding: 13px 15px;
    border: 1px solid #E6EEF7;
    border-radius: 12px;
    background: #F9FBFE;
}

.inline-note-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 1px solid #BEDDF3;
    border-radius: 50%;
    background: #EFF8FF;
    color: #2476A8;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
}

.inline-note p {
    color: #61748B;
    font-size: 12px;
    line-height: 1.6;
}

/* ── Review ──────────────────────────────────────────────────────────── */

.review-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-group {
    padding: 17px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.review-group-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line-soft);
}

.review-index {
    padding: 4px 5px;
    border: 1px solid #D8EEFF;
    border-radius: 6px;
    background: #EFF9FF;
    color: #0079CE;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1;
}

.review-title {
    flex: 1;
    color: #182538;
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 700;
}

.review-edit {
    padding: 4px 7px;
    border: 1px none;
    border-radius: 6px;
    background: none;
    color: var(--blue-deep);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s ease;
}

.review-edit:hover {
    background: #EFF9FF;
}

.review-row {
    display: grid;
    grid-template-columns: minmax(0, 236px) minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line-soft);
}

.review-row:last-child {
    padding-bottom: 2px;
    border-bottom: none;
}

.review-label {
    color: #7C8CA0;
    font-size: 11.5px;
    line-height: 1.55;
}

.review-value {
    margin: 0;
    color: var(--ink-soft);
    font-size: 12.5px;
    line-height: 1.62;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.review-value.is-empty {
    color: #A5B2C1;
    font-style: italic;
}

.review-notes {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.review-notes li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid #EAF0F7;
    border-radius: 10px;
    background: #F8FAFD;
    color: #63768C;
    font-size: 11.8px;
    line-height: 1.55;
}

.review-notes li::before {
    content: "i";
    display: grid;
    place-items: center;
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    border: 1px solid #CFE4F3;
    border-radius: 50%;
    color: #3D86B4;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
}

.review-consent {
    max-width: 66ch;
    margin: 12px 2px 0;
    color: #8C9AAC;
    font-size: 11.5px;
    line-height: 1.65;
}

/* ── Navigation ──────────────────────────────────────────────────────── */

.form-nav {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-nav);
}

.nav-meta {
    flex: 1;
    color: #8A9AAD;
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-align: center;
}

.nav-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 12.8px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease, box-shadow .16s ease;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn--ghost {
    border-color: #E2EAF3;
    background: #fff;
    color: #475A6E;
}

.btn--ghost:hover {
    border-color: #CFDDEA;
    background: #F7FAFD;
    color: var(--ink-soft);
}

.btn--primary {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
    box-shadow: 0 9px 20px -12px rgba(0, 149, 252, .95);
}

.btn--primary:hover {
    border-color: var(--blue-deep);
    background: var(--blue-deep);
    transform: translateY(-1px);
}

.btn--primary:active {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: 2px solid rgba(0, 149, 252, .5);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: .68;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.btn.is-loading .btn-spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Footer & misc ───────────────────────────────────────────────────── */

.form-foot {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding: 0 4px;
    color: #93A2B4;
    font-size: 11.2px;
    line-height: 1.65;
}

.form-foot svg {
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    color: #7FB7DA;
}

.site-foot {
    border-top: 1px solid #E8EEF5;
    background: #fff;
    color: #8B99AA;
    font-size: 11px;
}

.site-foot-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 22px;
}

.noscript {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #F3D9AE;
    border-radius: 12px;
    background: #FFFBF3;
    color: #8A5B14;
    font-size: 12.5px;
    line-height: 1.6;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Thank-you page ──────────────────────────────────────────────────── */

.thanks-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.thanks-wrap {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 56px;
}

.thanks-card {
    position: relative;
    width: 100%;
    max-width: 560px;
    padding: 38px 34px 30px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 60px -40px rgba(15, 23, 42, .45);
    text-align: center;
    overflow: hidden;
    animation: thanksIn .4s cubic-bezier(.2, .7, .3, 1) both;
}

@keyframes thanksIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

.thanks-card::before {
    content: "";
    position: absolute;
    top: -90px;
    left: 50%;
    width: 320px;
    height: 200px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(0, 149, 252, .16), transparent);
    pointer-events: none;
}

.thanks-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #EAF7FF;
    border: 1px solid #CFEBFF;
}

.thanks-icon::after {
    content: "";
    position: absolute;
    inset: -9px;
    border: 1px solid rgba(0, 149, 252, .14);
    border-radius: 50%;
    animation: pulseRing 2.6s ease-out infinite;
}

@keyframes pulseRing {
    0%   { opacity: .8; transform: scale(.94); }
    70%  { opacity: 0;  transform: scale(1.12); }
    100% { opacity: 0;  transform: scale(1.12); }
}

.thanks-icon svg {
    width: 34px;
    height: 34px;
}

.thanks-icon path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: drawCheck .55s .25s ease forwards;
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.thanks-eyebrow {
    margin-bottom: 10px;
    color: #3D86B4;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.thanks-title {
    margin-bottom: 12px;
    color: #0E1726;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.thanks-text {
    margin: 0 auto 6px;
    max-width: 44ch;
    color: #55637A;
    font-size: 13.5px;
    line-height: 1.78;
}

.thanks-ref {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 22px 0 6px;
    padding: 7px 12px;
    border: 1px solid #E4EDF6;
    border-radius: 999px;
    background: #F8FBFE;
    color: #63768C;
    font-size: 11px;
}

.thanks-ref strong {
    color: #1B2B3E;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .03em;
}

.thanks-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
}

.thanks-note {
    margin-top: 20px;
    color: #9AA8B8;
    font-size: 11px;
    line-height: 1.65;
}

.thanks-wrap + .site-foot {
    margin-top: auto;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 680px) {
    .shell {
        padding: 24px 14px 44px;
    }

    .topbar-inner {
        padding: 10px 14px;
    }

    .brand-label,
    .brand-sep {
        display: none;
    }

    .brand img {
        height: 26px;
        max-width: 132px;
    }

    .topbar-chip {
        padding: 5px 9px;
        font-size: 10px;
    }

    .masthead {
        padding: 8px 0 18px;
    }

    .page-title {
        max-width: none;
        font-size: clamp(23px, 6vw, 29px);
    }

    .lede {
        font-size: 13.5px;
    }

    .meta {
        margin-top: 14px;
        gap: 6px;
    }

    .meta li {
        padding: 5px 9px;
        font-size: 10.5px;
    }

    .intro {
        padding: 17px 16px 17px 19px;
    }

    .intro-body p {
        font-size: 12.8px;
        line-height: 1.72;
    }

    .progress {
        padding: 13px 14px 12px;
    }

    .steps-rail {
        justify-content: space-between;
        gap: 0;
    }

    .rail-label {
        display: none;
    }

    .rail-dot {
        width: 22px;
        height: 22px;
    }

    .step {
        scroll-margin-top: 80px;
    }

    .step-head {
        margin: 20px 2px 12px;
    }

    .step-title {
        font-size: 18px;
    }

    .q {
        padding: 15px 14px;
    }

    .q-head {
        gap: 10px;
    }

    .q-title {
        font-size: 13.5px;
    }

    .q-no {
        min-width: 25px;
        font-size: 10px;
    }

    .q-body {
        margin-top: 12px;
        padding-left: 0;
    }

    .q-error {
        margin-left: 0;
    }

    .option {
        padding: 10px 12px;
    }

    .option-text {
        font-size: 12.8px;
    }

    .scale-cell {
        height: 42px;
    }

    .scale-legend {
        font-size: 10px;
    }

    .form-nav {
        bottom: 8px;
        gap: 8px;
        padding: 8px;
    }

    .nav-meta {
        display: none;
    }

    #btn-back {
        flex: 1;
    }

    .nav-actions {
        flex: 1;
        margin-left: 0;
    }

    .nav-actions .btn {
        width: 100%;
    }

    .btn {
        padding: 10px 14px;
        font-size: 12.5px;
    }

    .review-group {
        padding: 14px;
    }

    .review-row {
        grid-template-columns: 1fr;
        gap: 3px;
        padding: 9px 0;
    }

    .review-label {
        font-size: 11px;
    }

    .thanks-wrap {
        padding: 24px 14px 40px;
    }

    .thanks-card {
        padding: 30px 20px 24px;
        border-radius: 18px;
    }

    .thanks-title {
        font-size: 21px;
    }

    .site-foot-inner {
        flex-direction: column;
        padding: 14px;
        gap: 4px;
    }
}

@media (max-width: 380px) {
    .page-title {
        font-size: 22px;
    }

    .q-no {
        display: none;
    }

    .scale-legend {
        flex-direction: column;
        gap: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
