/* =====================================================================
   SIPUS-SURVEI :: Gaya portal publik
   ---------------------------------------------------------------------
   Ditulis mobile first. Semua ukuran dasar diatur untuk layar 360px,
   lalu diperlebar lewat media query. Target sentuh minimal 46px karena
   sebagian besar pemustaka mengisi survei sambil berdiri di lorong rak
   atau di meja sirkulasi.
   ===================================================================== */

/* ------------------------------ Token ------------------------------ */
:root {
    --brand:        #0F5B8E;
    --brand-dark:   #0B4A73;
    --brand-light:  #E7F0F7;
    --accent:       #E8A317;

    --ink:          #16202B;
    --ink-soft:     #4A5765;
    --ink-faint:    #7C8794;

    --bg:           #F4F6F9;
    --surface:      #FFFFFF;
    --line:         #E2E7ED;
    --line-strong:  #CBD3DC;

    --ok:           #15803D;
    --ok-bg:        #E8F6EC;
    --warn:         #B45309;
    --warn-bg:      #FEF3E2;
    --danger:       #DC2626;
    --danger-bg:    #FDECEC;
    --info:         #0369A1;
    --info-bg:      #E6F2FA;

    --radius:       14px;
    --radius-sm:    10px;
    --radius-lg:    20px;

    --shadow-sm:    0 1px 2px rgba(15, 35, 60, .06);
    --shadow:       0 2px 10px rgba(15, 35, 60, .07);
    --shadow-lg:    0 8px 28px rgba(15, 35, 60, .12);

    --tap:          46px;
    --wrap:         640px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.28; font-weight: 700; }
h1 { font-size: 1.5rem; letter-spacing: -.015em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.03rem; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

img, svg { max-width: 100%; height: auto; }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.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;
}

/* Atribut hidden bawaan peramban hanya mengatur display:none lewat
   stylesheet UA, sehingga aturan penulis seperti .btn { display:
   inline-flex } mengalahkannya. Tanpa baris ini, tombol yang
   disembunyikan JavaScript (mis. Kembali dan Kirim pada layar pertama
   survei) tetap terlihat semua. */
[hidden] { display: none !important; }

/* ------------------------------ Tata letak -------------------------- */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 16px;
}
.wrap-wide { max-width: 940px; }

.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 10px; }
.stack-lg > * + * { margin-top: 26px; }

/* ------------------------------ Header ------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 8px 16px;
    max-width: var(--wrap);
    margin: 0 auto;
}
.wrap-wide ~ * .site-header__inner { max-width: 940px; }

.site-header__logo {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: 0 0 38px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-weight: 700; font-size: .82rem;
    overflow: hidden;
}
.site-header__logo img { width: 100%; height: 100%; object-fit: contain; }

.site-header__text { min-width: 0; flex: 1; }
.site-header__title {
    display: block;
    font-weight: 700; font-size: .95rem; line-height: 1.25;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-header__sub {
    display: block;
    font-size: .74rem; color: var(--ink-faint);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.site-header__back {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex: 0 0 38px;
    margin-left: -6px;
    border-radius: 10px;
    color: var(--ink-soft);
    text-decoration: none;
}
.site-header__back:hover { background: var(--bg); }

/* Bilah kemajuan pengisian survei */
.progress {
    height: 4px;
    background: var(--line);
    overflow: hidden;
}
.progress__bar {
    height: 100%;
    width: 0;
    background: var(--brand);
    border-radius: 0 3px 3px 0;
    transition: width .28s ease;
}

/* ------------------------------- Hero ------------------------------- */
.hero {
    padding: 26px 0 30px;
    background:
        radial-gradient(120% 110% at 12% 0%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 55%),
        linear-gradient(158deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
}
.hero h1 { color: #fff; font-size: 1.42rem; margin-bottom: 8px; }
.hero p  { color: rgba(255,255,255,.9); font-size: .95rem; margin: 0; }

.hero__eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    font-size: .72rem; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase;
}

/* ------------------------------ Kartu ------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}
.card--flush { padding: 0; overflow: hidden; }
.card__head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}
.card__body { padding: 18px; }

/* Kartu layanan di beranda: satu kolom di ponsel, dua di layar lebar */
.services { display: grid; gap: 12px; }

.service {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    min-height: 78px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--svc, var(--brand));
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.service:active { transform: scale(.985); }
@media (hover: hover) {
    .service:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
}

.service__icon {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; flex: 0 0 44px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--svc, var(--brand)) 12%, white);
    color: var(--svc, var(--brand));
}
.service__icon svg { width: 22px; height: 22px; }

.service__body { min-width: 0; flex: 1; }
.service__title {
    display: block;
    font-weight: 650; font-size: 1rem; color: var(--ink);
    margin-bottom: 2px;
}
.service__desc {
    display: block;
    font-size: .84rem; color: var(--ink-soft); line-height: 1.45;
}
.service__meta {
    display: inline-block;
    margin-top: 6px;
    font-size: .74rem; font-weight: 600;
    color: var(--svc, var(--brand));
}
.service__chev { color: var(--line-strong); flex: 0 0 auto; }

/* --------------------------- Papan statistik ------------------------ */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.stat {
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-align: center;
}
.stat__num {
    display: block;
    font-size: 1.5rem; font-weight: 700;
    color: var(--brand); line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.stat__label {
    display: block;
    font-size: .76rem; color: var(--ink-soft); margin-top: 2px;
}

/* ------------------------------ Bagian ------------------------------ */
.section-title {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px;
    margin: 26px 0 12px;
}
.section-title h2 { margin: 0; font-size: 1.05rem; }
.section-title a { font-size: .82rem; font-weight: 600; text-decoration: none; }

/* ------------------------------ Formulir ---------------------------- */
.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }

.label {
    display: block;
    font-weight: 620;
    font-size: .95rem;
    line-height: 1.45;
    margin-bottom: 8px;
    color: var(--ink);
}
.label .req { color: var(--danger); margin-left: 2px; }

.hint {
    display: block;
    font-size: .81rem;
    color: var(--ink-soft);
    margin: -4px 0 8px;
}

.input, .select, .textarea {
    display: block;
    width: 100%;
    min-height: var(--tap);
    padding: 11px 13px;
    /* 16px mencegah iOS memperbesar layar saat kolom difokuskan */
    font-size: 16px;
    font-family: inherit;
    line-height: 1.45;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    transition: border-color .14s ease, box-shadow .14s ease;
    -webkit-appearance: none;
    appearance: none;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 91, 142, .13);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); }

.textarea { min-height: 110px; resize: vertical; }

.select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234A5765' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
}

.input.is-error, .select.is-error, .textarea.is-error {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.error-text {
    display: block;
    margin-top: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--danger);
}

/* Kolom umpan bot: tersembunyi dari mata dan dari pembaca layar */
.honeypot {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0;
    height: 0;
    width: 0;
}

/* --------------------- Pilihan radio & kotak centang ---------------- */
.choices { display: grid; gap: 8px; }

.choice {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: var(--tap);
    padding: 12px 14px;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}
.choice:active { background: var(--bg); }

.choice input {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}

.choice__mark {
    position: relative;
    flex: 0 0 22px;
    width: 22px; height: 22px;
    margin-top: 1px;
    border: 2px solid var(--line-strong);
    background: #fff;
    transition: border-color .12s ease, background .12s ease;
}
.choice--radio .choice__mark { border-radius: 50%; }
.choice--check .choice__mark { border-radius: 6px; }

.choice__mark::after {
    content: "";
    position: absolute;
    opacity: 0;
    transition: opacity .12s ease;
}
.choice--radio .choice__mark::after {
    inset: 3px;
    border-radius: 50%;
    background: var(--brand);
}
.choice--check .choice__mark::after {
    left: 6px; top: 2px;
    width: 5px; height: 10px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.choice__text { font-size: .94rem; line-height: 1.45; }

.choice input:checked ~ .choice__mark { border-color: var(--brand); }
.choice--check input:checked ~ .choice__mark { background: var(--brand); }
.choice input:checked ~ .choice__mark::after { opacity: 1; }
.choice:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-light);
}
.choice input:focus-visible ~ .choice__mark {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.choice__other {
    margin-top: 8px;
}

/* ---------------------------- Skala 1 - 5 --------------------------- */
.scale { margin-top: 4px; }

.scale__row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.scale__row--4 { grid-template-columns: repeat(4, 1fr); }
.scale__row--6 { grid-template-columns: repeat(6, 1fr); }
.scale__row--7 { grid-template-columns: repeat(7, 1fr); }

.scale__item { position: relative; }
.scale__item input {
    position: absolute; opacity: 0; width: 0; height: 0;
}

.scale__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 58px;
    padding: 8px 2px;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: transform .1s ease, border-color .12s ease, background .12s ease;
}
.scale__btn:active { transform: scale(.95); }

.scale__num {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}
.scale__tick {
    font-size: .58rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: .02em;
    /* Label pendek di bawah angka; disembunyikan pada layar sangat kecil */
    display: none;
}

.scale__item input:checked + .scale__btn {
    background: var(--sc, var(--brand));
    border-color: var(--sc, var(--brand));
    box-shadow: var(--shadow);
}
.scale__item input:checked + .scale__btn .scale__num,
.scale__item input:checked + .scale__btn .scale__tick { color: #fff; }

.scale__item input:focus-visible + .scale__btn {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Gradasi merah ke hijau supaya arah skala langsung terbaca */
.scale__item:nth-child(1) { --sc: #DC2626; }
.scale__item:nth-child(2) { --sc: #EA7317; }
.scale__item:nth-child(3) { --sc: #CA9A04; }
.scale__item:nth-child(4) { --sc: #4D9A2A; }
.scale__item:nth-child(5) { --sc: #15803D; }

.scale__legend {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
    font-size: .74rem;
    color: var(--ink-faint);
}
.scale__legend span:last-child { text-align: right; }

.scale__chosen {
    margin-top: 8px;
    font-size: .82rem;
    font-weight: 620;
    color: var(--brand);
    min-height: 1.2em;
}

@media (min-width: 400px) {
    .scale__tick { display: block; }
    .scale__btn { min-height: 66px; }
}

/* ---------------------------- Bagian survei ------------------------- */
.survey-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.survey-section + .survey-section { margin-top: 16px; }

.survey-section__head {
    padding: 16px 18px;
    background: linear-gradient(180deg, var(--brand-light) 0%, rgba(231,240,247,.35) 100%);
    border-bottom: 1px solid var(--line);
}
.survey-section__step {
    display: inline-block;
    margin-bottom: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: .68rem; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase;
}
.survey-section__head h2 { margin: 0 0 4px; font-size: 1.08rem; color: var(--brand-dark); }
.survey-section__desc { margin: 0; font-size: .86rem; color: var(--ink-soft); line-height: 1.55; }

.survey-section__hint {
    display: block;
    margin-top: 10px;
    padding: 9px 12px;
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    font-size: .8rem;
    color: var(--ink-soft);
}

.survey-section__body { padding: 18px; }

.question { padding-bottom: 20px; }
.question + .question {
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.question:last-child { padding-bottom: 0; }

.question__code {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 6px;
    border-radius: 5px;
    background: var(--bg);
    color: var(--ink-faint);
    font-size: .68rem; font-weight: 700;
    font-variant-numeric: tabular-nums;
    vertical-align: 2px;
}

/* --------------------------- Layar bertahap ------------------------- */
/* Bagian survei ditampilkan satu per satu di ponsel. Tanpa JavaScript,
   semua bagian tetap terlihat -- formulir harus tetap bisa diisi. */
.js .survey-step { display: none; }
.js .survey-step.is-active { display: block; animation: stepIn .22s ease; }

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

@media (prefers-reduced-motion: reduce) {
    .js .survey-step.is-active { animation: none; }
    html { scroll-behavior: auto; }
    * { transition-duration: .01ms !important; }
}

/* --------------------------------- Tombol -------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tap);
    padding: 12px 20px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 640;
    line-height: 1.2;
    color: #fff;
    background: var(--brand);
    border: 1.5px solid var(--brand);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background .14s ease, transform .1s ease, box-shadow .14s ease;
    -webkit-appearance: none;
    appearance: none;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn--block { display: flex; width: 100%; }
.btn--lg { min-height: 52px; font-size: 1rem; padding: 14px 24px; }

.btn--ghost {
    background: var(--surface);
    color: var(--brand);
    border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--bg); color: var(--brand-dark); border-color: var(--brand); }

.btn--soft {
    background: var(--brand-light);
    color: var(--brand-dark);
    border-color: transparent;
}
.btn--soft:hover { background: #D7E6F1; color: var(--brand-dark); }

.btn--accent { background: var(--accent); border-color: var(--accent); color: #3B2A05; }
.btn--accent:hover { background: #D2900F; border-color: #D2900F; color: #3B2A05; }

.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* Bilah navigasi survei yang menempel di bawah layar */
.stepnav {
    position: sticky;
    bottom: 0;
    z-index: 30;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    margin: 16px -16px 0;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
}
.stepnav .btn { flex: 1; }
.stepnav__count {
    flex: 0 0 auto;
    font-size: .8rem;
    font-weight: 620;
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ------------------------------- Notis ------------------------------ */
.notice {
    display: flex;
    gap: 11px;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: .88rem;
    line-height: 1.5;
}
.notice svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
.notice p { margin: 0; }
.notice p + p { margin-top: .4em; }

.notice--success { background: var(--ok-bg);     border-color: #BFE3CB; color: #14532D; }
.notice--error   { background: var(--danger-bg); border-color: #F5C6C6; color: #7F1D1D; }
.notice--warning { background: var(--warn-bg);   border-color: #F3DCB4; color: #78350F; }
.notice--info    { background: var(--info-bg);   border-color: #C3E0F2; color: #0C4A6E; }

/* ------------------------------ Lencana ----------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 640;
    line-height: 1.5;
    white-space: nowrap;
}
.badge-slate { background: #EEF1F5; color: #47535F; }
.badge-green { background: var(--ok-bg);     color: #14532D; }
.badge-amber { background: var(--warn-bg);   color: #78350F; }
.badge-red   { background: var(--danger-bg); color: #7F1D1D; }
.badge-blue  { background: var(--info-bg);   color: #0C4A6E; }

/* --------------------------- Halaman selesai ------------------------ */
.done {
    text-align: center;
    padding: 34px 20px 30px;
}
.done__icon {
    display: flex; align-items: center; justify-content: center;
    width: 76px; height: 76px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--ok-bg);
    color: var(--ok);
    animation: pop .42s cubic-bezier(.22, 1.2, .4, 1);
}
.done__icon svg { width: 38px; height: 38px; }
.done h1 { font-size: 1.42rem; margin-bottom: 10px; }
.done p { color: var(--ink-soft); font-size: .95rem; }

@keyframes pop {
    0%   { transform: scale(.55); opacity: 0; }
    60%  { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); }
}

.ticket {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin: 18px 0;
    padding: 14px 26px;
    background: var(--surface);
    border: 2px dashed var(--line-strong);
    border-radius: var(--radius);
}
.ticket__label {
    font-size: .72rem;
    font-weight: 640;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ticket__code {
    font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--brand-dark);
}

/* ------------------------------ Linimasa ---------------------------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: "";
    position: absolute;
    left: 9px; top: 8px; bottom: 8px;
    width: 2px;
    background: var(--line);
}

.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
    content: "";
    position: absolute;
    left: -24px; top: 5px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--surface);
    border: 2.5px solid var(--line-strong);
}
.tl-item.is-done::before  { background: var(--ok);    border-color: var(--ok); }
.tl-item.is-active::before {
    background: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(15, 91, 142, .16);
}
.tl-item__title { font-weight: 640; font-size: .93rem; }
.tl-item__meta  { font-size: .8rem; color: var(--ink-faint); }

/* ------------------------------- Kutipan ---------------------------- */
.voice {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.voice__head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-bottom: 8px;
}
.voice__msg { font-size: .92rem; color: var(--ink); margin: 0; }
.voice__reply {
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--brand-light);
    border-left: 3px solid var(--brand);
    border-radius: 0 8px 8px 0;
    font-size: .88rem;
}
.voice__reply strong { display: block; font-size: .76rem; color: var(--brand-dark); margin-bottom: 3px; }

/* ------------------------------- Footer ----------------------------- */
.site-footer {
    margin-top: 36px;
    padding: 24px 0 30px;
    padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--line);
    font-size: .84rem;
    color: var(--ink-soft);
}
.site-footer a { color: var(--ink-soft); }
.site-footer__links {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    margin-bottom: 14px;
}
.site-footer__meta { font-size: .78rem; color: var(--ink-faint); }

/* ------------------------------ Bantu ------------------------------- */
.text-center { text-align: center; }
.text-muted  { color: var(--ink-soft); }
.text-small  { font-size: .84rem; }
.text-xs     { font-size: .76rem; }
.mt-0  { margin-top: 0 !important; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mb-0  { margin-bottom: 0 !important; }
.hidden { display: none !important; }

.divider {
    height: 1px;
    background: var(--line);
    margin: 20px 0;
    border: 0;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------ Tablet+ ----------------------------- */
@media (min-width: 640px) {
    body { font-size: 16.5px; }
    h1 { font-size: 1.75rem; }
    .wrap { padding: 0 24px; }
    .hero { padding: 40px 0 44px; }
    .hero h1 { font-size: 1.85rem; }
    .services { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .stat-strip { grid-template-columns: repeat(4, 1fr); }
    .card, .survey-section__body, .card__body { padding: 22px; }
    .stepnav { margin-left: -24px; margin-right: -24px; }
    .scale__row { gap: 8px; }
    .scale__btn { min-height: 72px; }
    .btn-row .btn { flex: 0 1 auto; min-width: 150px; }
}

@media (min-width: 900px) {
    .hero { padding: 52px 0 56px; }
    .services { gap: 16px; }
}

/* ------------------------------ Cetak ------------------------------- */
@media print {
    .site-header, .site-footer, .stepnav, .btn { display: none !important; }
    body { background: #fff; font-size: 11pt; }
    .card, .survey-section { box-shadow: none; border-color: #ccc; break-inside: avoid; }
    .js .survey-step { display: block !important; }
}

/* ---------------------------- Mode gelap ---------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        --ink:         #E8EDF2;
        --ink-soft:    #A8B4C0;
        --ink-faint:   #7B8794;
        --bg:          #10161D;
        --surface:     #182029;
        --line:        #28323D;
        --line-strong: #3A4653;
        --brand-light: #16303F;
        --ok-bg:       #12291B;
        --warn-bg:     #2B2110;
        --danger-bg:   #2C1618;
        --info-bg:     #10283A;
        --shadow-sm:   0 1px 2px rgba(0, 0, 0, .3);
        --shadow:      0 2px 10px rgba(0, 0, 0, .35);
        --shadow-lg:   0 8px 28px rgba(0, 0, 0, .45);
    }
    .input, .select, .textarea, .choice, .scale__btn { background: #131B23; }
    .choice__mark { background: #131B23; }
    .btn--ghost, .btn--soft { background: #1E2833; }
    .stepnav { background: rgba(24, 32, 41, .96); }
    .survey-section__head {
        background: linear-gradient(180deg, #16303F 0%, rgba(22, 48, 63, .35) 100%);
    }
    .survey-section__head h2 { color: #8FC4E4; }
    .badge-slate { background: #232E3A; color: #C4CEDA; }
    .select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A8B4C0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    }
}

/* --------------------- Kontras tinggi / aksesibilitas --------------- */
@media (prefers-contrast: more) {
    .input, .select, .textarea, .choice, .scale__btn { border-width: 2px; }
    .hint, .text-muted { color: var(--ink); }
}
