/* Alur pendaftaran publik. Warna dan font berasal dari css/tokens.css. */
:root {
    color-scheme: light;
    --green: var(--brand-700);
    --green-dark: var(--brand-800);
    --accent: var(--maroon-700);
    --white: var(--surface);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--paper);
}

body {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-sans);
    background-color: var(--paper);
}

a {
    color: inherit;
}

.page-shell {
    width: min(100% - 48px, 1000px);
    margin: 0 auto;
}

.site-header {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(21, 91, 70, 0.14);
}

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

.brand-logo {
    width: 46px;
    height: 45px;
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 3px;
}

.brand-copy strong {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    font-weight: 800;
}

.brand-copy small {
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 700;
}

.back-link {
    color: var(--green);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.intro {
    max-width: 700px;
    padding: 54px 0 34px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: var(--fs-sm);
    font-weight: 800;
}

.intro h1 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: var(--fs-3xl);
    font-weight: 800;
    line-height: 1.12;
}

.intro h1 span {
    color: var(--green);
}

.intro-copy {
    max-width: 540px;
    margin: 16px 0 18px;
    color: var(--muted);
    font-size: var(--fs-base);
    line-height: 1.65;
}

.intro-meta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--green-dark);
    font-size: var(--fs-sm);
    font-weight: 700;
}

.meta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.registration-form {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    box-shadow: 0 18px 48px rgba(20, 54, 41, 0.07);
}

.form-section {
    padding: 30px 36px 34px;
    border-bottom: 1px solid var(--line);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 24px;
}

.section-number {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: #e8f1eb;
    border-radius: var(--r-xs);
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    font-weight: 800;
}

.section-heading .route-tag {
    margin: 0 0 6px;
    color: var(--maroon-700);
    font-size: var(--fs-sm);
    font-weight: 700;
}

.section-heading h2 {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-md);
    font-weight: 800;
}

.section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 22px;
}

.field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border: 0;
}

.field-wide {
    grid-column: 1 / -1;
}

.field label,
.field legend {
    color: #34443d;
    font-size: var(--fs-sm);
    font-weight: 700;
}

.field legend {
    padding: 0;
}

.required-mark {
    color: var(--accent);
}

.whatsapp-confirmation {
    display: grid;
    gap: 7px;
    margin-top: 18px;
    padding: 15px 17px;
    color: #593b21;
    background: #fff5e9;
    border-left: 4px solid var(--maroon-700);
}

.whatsapp-confirmation strong {
    color: #38291e;
    font-size: var(--fs-sm);
}

.whatsapp-confirmation p {
    margin: 0;
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.whatsapp-confirmation label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 3px;
    color: #34443d;
    font-size: var(--fs-sm);
    line-height: 1.5;
    cursor: pointer;
}

.whatsapp-confirmation input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    accent-color: var(--green);
}

.optional-mark {
    margin-left: 5px;
    color: #87928c;
    font-size: var(--fs-sm);
    font-weight: 500;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    color: var(--ink);
    background-color: #fff;
    border: 1px solid #cbd7cf;
    border-radius: var(--r-xs);
    font: inherit;
    font-size: var(--fs-sm);
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

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

.field input::placeholder {
    color: #929c96;
}

.field select:disabled {
    color: #7c8881;
    background-color: #f2f5f2;
    cursor: wait;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--green);
    outline: 3px solid rgba(21, 91, 70, 0.13);
    outline-offset: 1px;
}

.field-hint {
    margin-top: -2px;
    color: var(--muted);
    font-size: var(--fs-sm);
}

.field-hint.is-error {
    color: #9b352d;
}

.operator-note {
    margin: 17px 0 0;
    padding: 12px 14px;
    color: #52635a;
    background: #f3f7f3;
    border-left: 3px solid var(--green);
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.offer-summary {
    margin-top: 18px;
    padding: 13px 15px;
    color: #315345;
    background: #edf4ef;
    border-left: 3px solid var(--green);
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.gender-field {
    gap: 11px;
}

.radio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-option {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    cursor: pointer;
}

.radio-option input {
    width: 16px;
    min-height: 16px;
    margin: 0;
    accent-color: var(--green);
}

.radio-option span {
    font-size: var(--fs-sm);
    font-weight: 600;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 36px;
    background: #f7faf7;
}

.form-footer p {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.form-footer .submit-button {
    flex: 0 0 auto;
}

.submit-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    color: var(--white);
    background: var(--green);
    border: 0;
    border-radius: var(--r-xs);
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 140ms ease, transform 140ms ease, box-shadow 160ms ease;
}

.submit-button:hover:not(:disabled) {
    background: var(--green-dark);
    box-shadow: 0 8px 20px rgba(21, 91, 70, 0.22);
    transform: translateY(-1px);
}

.submit-button:disabled {
    background: #86948d;
    cursor: not-allowed;
}

.submit-button:active {
    transform: translateY(1px);
}

.submit-button:focus-visible,
.back-link:focus-visible,
.brand:focus-visible {
    outline: 3px solid rgba(140, 42, 40, 0.55);
    outline-offset: 3px;
}

.submit-button span {
    font-size: var(--fs-md);
    line-height: 1;
}

.error-summary {
    margin: 0 0 20px;
    padding: 17px 20px;
    color: #7b2d20;
    background: #fff3ef;
    border: 1px solid #e9b4a5;
    border-left: 4px solid var(--accent);
    border-radius: var(--r-xs);
    font-size: var(--fs-sm);
}

.error-summary strong {
    display: block;
    margin-bottom: 7px;
}

.error-summary ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
}

.site-footer {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: var(--fs-sm);
}

.site-footer a {
    color: var(--green);
    font-weight: 700;
    text-underline-offset: 3px;
}

.site-footer .admin-wa-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    color: #176b47;
    background: #eff7f1;
    border: 1px solid #cfe2d4;
    border-radius: var(--r-xs);
    font-size: var(--fs-xs);
    text-decoration: none;
    white-space: nowrap;
}

.site-footer .admin-wa-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 32px, 1000px);
    }

    .site-header {
        min-height: 74px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 16px 0;
    }

    .brand-logo {
        width: 40px;
        height: 39px;
    }

    .brand-copy strong {
        font-size: var(--fs-sm);
    }

    .brand-copy small {
        font-size: var(--fs-xs);
    }

    .back-link {
        font-size: var(--fs-sm);
    }

    .intro {
        padding: 42px 0 27px;
    }

    .intro h1 {
        font-size: var(--fs-3xl);
    }

    .intro-copy {
        font-size: var(--fs-sm);
    }

    .form-section {
        padding: 24px 20px 27px;
    }

    .field-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .field-wide {
        grid-column: auto;
    }

    .form-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .submit-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   Alur pendaftaran: registrasi awal, gerbang kode, popup konfirmasi,
   unggah dokumen, dan mikro-interaksi yang fungsional.
   ============================================================ */

.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    color: #fff;
    background: var(--green-dark);
    border-radius: 0 0 6px 6px;
    font-size: var(--fs-sm);
    font-weight: 700;
    text-decoration: none;
    transition: top 160ms ease;
}

.skip-link:focus {
    top: 0;
}

.field-index {
    display: inline-block;
    min-width: 22px;
    margin-right: 6px;
    padding: 1px 5px;
    color: var(--green);
    background: #e8f1eb;
    border-radius: var(--r-xs);
    font-size: var(--fs-xs);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    vertical-align: 1px;
}

/* --- Tata letak dua kolom dengan rel bagian kiri yang lengket --- */
.initial-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 46px;
    align-items: start;
    padding-bottom: 20px;
}

.intro-rail {
    position: sticky;
    top: 28px;
    max-width: none;
    padding: 54px 0 30px;
}

.initial-main {
    min-width: 0;
    padding-top: 30px;
}

.journey-list {
    display: grid;
    gap: 0;
    margin: 26px 0 22px;
    padding: 0;
    list-style: none;
    counter-reset: journey;
}

.journey-list li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 0 0 22px;
}

.journey-list li::before {
    content: '';
    position: absolute;
    top: 32px;
    bottom: 2px;
    left: 15px;
    width: 2px;
    background: var(--line);
}

.journey-list li:last-child {
    padding-bottom: 0;
}

.journey-list li:last-child::before {
    display: none;
}

.journey-list li > span {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: var(--white);
    border: 2px solid var(--line);
    border-radius: 50%;
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    font-weight: 800;
}

.journey-list li.is-active > span {
    color: var(--white);
    background: var(--green);
    border-color: var(--green);
    box-shadow: 0 0 0 5px rgba(21, 91, 70, 0.12);
    animation: journey-pulse 2.4s ease-in-out infinite;
}

.journey-list li div {
    display: grid;
    gap: 2px;
    padding-top: 4px;
}

.journey-list li strong {
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    font-weight: 800;
}

.journey-list li.is-active strong {
    color: var(--green);
}

.journey-list li small {
    color: var(--muted);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

@keyframes journey-pulse {
    0%, 100% { box-shadow: 0 0 0 5px rgba(21, 91, 70, 0.12); }
    50% { box-shadow: 0 0 0 9px rgba(21, 91, 70, 0.04); }
}

/* --- Penanda isian --- */
.field.is-filled input,
.field.is-filled select {
    border-color: #a9c3b3;
    background-color: #fbfdfb;
}

.field.is-valid input {
    border-color: #2f7d5c;
    background-image: linear-gradient(#2f7d5c, #2f7d5c);
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 2px 22px;
    padding-right: 26px;
}

.field.is-invalid input,
.field.is-invalid select {
    border-color: var(--accent);
    background-color: #fffaf8;
}

.field.is-invalid {
    animation: shake-field 320ms ease;
}

@keyframes shake-field {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* --- Ringkasan biaya yang muncul saat unit dipilih --- */
.offer-summary {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    padding: 14px 16px;
    color: #315345;
    background: #edf4ef;
    border-left: 3px solid var(--green);
    border-radius: 0 4px 4px 0;
    font-size: var(--fs-sm);
    line-height: 1.6;
}

/* Atribut hidden harus menang atas display: grid di atas. */
.offer-summary[hidden] {
    display: none;
}

.offer-summary strong {
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
}

.offer-summary span {
    color: #4a6156;
    font-size: var(--fs-sm);
}

.offer-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.offer-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    color: var(--green);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease;
}

.offer-list__item:hover,
.offer-list__item:focus-visible {
    border-color: var(--green);
    transform: translateY(-1px);
}

.offer-list__item > span:first-child {
    display: grid;
    gap: 5px;
}

.offer-list__item strong {
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
}

.offer-list__item small {
    color: #5e7167;
    font-size: var(--fs-sm);
}

.offer-summary.is-flash {
    animation: offer-in 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes offer-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Persetujuan data --- */
.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 22px;
    padding: 15px 17px;
    color: #34443d;
    background: #f7faf7;
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    font-size: var(--fs-sm);
    line-height: 1.6;
    cursor: pointer;
    transition: border-color 140ms ease, background-color 140ms ease;
}

.consent-check:hover {
    border-color: #b9cfc1;
    background: #f2f8f4;
}

.consent-check input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    accent-color: var(--green);
}

.submit-button.is-busy {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.submit-button.is-busy::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 720ms linear infinite;
}

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

/* --- Gerbang kode pendaftaran --- */
.gate-panel {
    max-width: 620px;
    margin: 0 auto;
    padding: 58px 0 40px;
}

.gate-panel h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--fs-3xl);
    font-weight: 700;
    line-height: 1.14;
}

.gate-panel h1 span {
    color: var(--green);
}

.gate-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
    padding: 26px 28px 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    box-shadow: 0 18px 48px rgba(20, 54, 41, 0.07);
    animation: offer-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gate-form #kode {
    font-family: var(--font-sans);
    font-size: var(--fs-lg);
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.gate-form .submit-button {
    justify-self: start;
}

.gate-panel > .submit-button {
    margin-top: 24px;
    text-decoration: none;
}

/* --- Popup konfirmasi data awal --- */
.confirm-dialog {
    width: min(100% - 32px, 520px);
    padding: 0;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: 0 30px 80px rgba(16, 55, 40, 0.28);
}

.confirm-dialog::backdrop {
    background: rgba(12, 38, 28, 0.55);
    backdrop-filter: blur(3px);
    animation: backdrop-in 220ms ease;
}

.confirm-dialog[open] {
    animation: dialog-in 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.confirm-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--line);
}

.confirm-card__head h2 {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-md);
    font-weight: 800;
}

.confirm-badge {
    flex: 0 0 auto;
    padding: 5px 10px;
    color: var(--green);
    background: #e8f1eb;
    border-radius: var(--r-xs);
    font-size: var(--fs-sm);
    font-weight: 800;
    white-space: nowrap;
}

.confirm-grid {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 6px 24px 4px;
}

.confirm-grid > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
}

.confirm-grid > div:last-child {
    border-bottom: 0;
}

.confirm-grid dt {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.confirm-grid dd {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-align: right;
}

.confirm-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    padding: 18px 24px 6px;
}

.choice-yes,
.choice-no {
    min-height: 48px;
    padding: 0 14px;
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 700;
    border-radius: var(--r-xs);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.choice-yes {
    color: #fff;
    background: var(--green);
    border: 1px solid var(--green);
}

.choice-no {
    color: var(--ink);
    background: #fff;
    border: 1px solid #c3d0c7;
}

.choice-yes:hover,
.choice-no:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(20, 54, 41, 0.14);
}

.choice-yes.is-picked {
    background: var(--green-dark);
}

.confirm-card__note {
    margin: 0;
    padding: 12px 24px 20px;
    color: var(--muted);
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.confirm-card__note.is-warning {
    color: #8a3b22;
    font-weight: 600;
}

.intro-dialog {
    width: min(100% - 32px, 620px);
    max-height: calc(100vh - 32px);
}

.intro-dialog[open] {
    display: flex;
    flex-direction: column;
}

@supports (height: 100dvh) {
    .intro-dialog {
        max-height: calc(100dvh - 32px);
    }
}

.intro-dialog .confirm-badge {
    max-width: 170px;
    white-space: normal;
    text-align: right;
}

.intro-dialog__body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 24px 0;
    color: var(--ink);
    font-size: var(--fs-sm);
    line-height: 1.7;
}

.intro-dialog__body h3 {
    margin: 22px 0 8px;
    color: var(--green-dark);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.4;
}

.intro-dialog__body h3:first-child {
    margin-top: 0;
}

.intro-dialog__body h4 {
    margin: 16px 0 5px;
    font-size: var(--fs-sm);
}

.intro-dialog__body p {
    margin: 0 0 12px;
}

.intro-dialog__body ul,
.intro-dialog__body ol {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
    padding-left: 20px;
}

.intro-dialog__section {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.intro-dialog__instruction + .intro-dialog__instruction {
    margin-top: 12px;
}

.intro-dialog__greeting {
    color: var(--green-dark);
    font-weight: 700;
    text-align: center;
}

.intro-dialog__note {
    color: var(--muted);
    font-size: var(--fs-xs);
}

.intro-dialog__body .confirm-card__note {
    padding: 2px 0 0;
    color: var(--muted);
    font-size: var(--fs-xs);
}

.intro-dialog__unit-note {
    display: grid;
    gap: 6px;
    margin: 10px 0 14px;
    padding: 12px 14px 12px 32px;
    color: var(--green-dark);
    background: #edf5ef;
    border-left: 3px solid var(--green);
    border-radius: var(--r-xs);
}

.intro-dialog__decline {
    color: #8a3b22;
    border-color: #e4b9ad;
}

.intro-dialog .confirm-card__actions {
    flex: 0 0 auto;
}

.intro-dialog [data-final-intro-continue] {
    grid-column: 1 / -1;
}

.intro-dialog [data-final-intro-warning] {
    grid-column: 1 / -1;
}

.intro-dialog form {
    display: none;
}

.materials-stage {
    display: grid;
    gap: 18px;
    margin: 26px 0;
}

.materials-stage[hidden] {
    display: none;
}

.materials-stage__heading {
    padding: 8px 2px;
}

.materials-stage__heading h2 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--fs-2xl);
    line-height: 1.2;
}

.materials-stage__heading > p:last-child {
    max-width: 68ch;
    color: var(--muted);
    font-size: var(--fs-sm);
}

.participant-material {
    padding: 20px;
    background: #fff;
    border: 1px solid #dce5df;
    border-radius: var(--r-lg);
    box-shadow: 0 8px 24px rgba(17, 53, 41, 0.06);
}

.participant-material h3 {
    margin: 0 0 12px;
    color: #174b3a;
    font-family: var(--font-sans);
    font-size: var(--fs-md);
}

.participant-material__content {
    margin: 12px 0;
    color: #33443d;
    font-size: var(--fs-sm);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.participant-material__content > :first-child {
    margin-top: 0;
}

.participant-material__pdf {
    display: block;
    width: 100%;
    height: min(68vh, 650px);
    margin-top: 14px;
    border: 1px solid #dce5df;
    border-radius: var(--r-sm);
    background: #f5f7f5;
}

.participant-material__mobile-pdf {
    display: none;
}

.participant-material__pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.participant-material__pdf-toolbar button {
    min-width: 42px;
    min-height: 42px;
    padding: 8px 12px;
    color: #163b2d;
    background: #fff;
    border: 1px solid #cbd9d1;
    border-radius: var(--r-sm);
    font-size: var(--fs-base);
    font-weight: 700;
}

.participant-material__pdf-toolbar button:disabled {
    opacity: .5;
}

.participant-material__pdf-toolbar [data-pdf-page] {
    min-width: 105px;
    color: #33443d;
    font-size: var(--fs-sm);
    text-align: center;
}

.participant-material__pdf-status {
    margin: 12px 0;
    color: #52645b;
    font-size: var(--fs-sm);
    text-align: center;
}

.participant-material__pdf-canvas-wrap {
    max-height: 72vh;
    margin-top: 10px;
    overflow: auto;
    border: 1px solid #dce5df;
    border-radius: var(--r-sm);
    background: #eef2ef;
    -webkit-overflow-scrolling: touch;
}

.participant-material__pdf-canvas-wrap[hidden],
.participant-material__pdf-status[hidden],
.participant-material__pdf-fallback[hidden] {
    display: none;
}

.participant-material__pdf-canvas-wrap canvas {
    display: block;
    max-width: none;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 2px 10px rgb(0 0 0 / 12%);
}

.participant-material__pdf-fallback {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 9px 14px;
    color: var(--brand-700);
    border: 1px solid var(--brand-700);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
    font-weight: 700;
    text-decoration: none;
}

.participant-material__image {
    display: block;
    max-width: 100%;
    max-height: 680px;
    margin: 14px auto 0;
    object-fit: contain;
}

.participant-material__download {
    display: inline-block;
    margin-top: 14px;
    color: var(--brand-700);
    font-size: var(--fs-sm);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.participant-material__missing,
.materials-stage__notice {
    padding: 12px 14px;
    color: #744916;
    background: #fff8e8;
    border: 1px solid #f0d9a6;
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
}

.materials-read-confirm {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: #f1f8f4;
    border: 1px solid #d5e8da;
    border-radius: var(--r-sm);
    color: #244d3a;
    font-size: var(--fs-sm);
    font-weight: 700;
}

.materials-read-confirm input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--brand-700);
}

.materials-next {
    justify-self: start;
}

.materials-next:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.questionnaire-section {
    display: grid;
    gap: 16px;
}

.participant-question {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dce5df;
    border-radius: var(--r-sm);
}

.participant-question legend {
    max-width: 100%;
    padding: 0 6px;
    color: #244d3a;
    font-size: var(--fs-sm);
    font-weight: 700;
    white-space: normal;
}

.participant-question textarea {
    width: 100%;
    min-height: 92px;
    padding: 11px;
    border: 1px solid #ccd8d0;
    border-radius: var(--r-sm);
    font: inherit;
    resize: vertical;
}

.participant-question__choices {
    display: grid;
    gap: 8px;
    padding-top: 6px;
}

.participant-question__choices label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 11px;
    background: #f7f9f7;
    border: 1px solid #e3e9e4;
    border-radius: var(--r-sm);
    color: #34443d;
    cursor: pointer;
}

.participant-question__choices input {
    margin: 2px 0 0;
    accent-color: var(--brand-700);
}

.participant-question.is-invalid {
    border-color: #bd4538;
    box-shadow: 0 0 0 3px rgba(189, 69, 56, 0.12);
}

.confirm-dialog.is-confirmed .confirm-badge {
    color: #fff;
    background: var(--green);
}

/* Isian di bawah popup hanya muncul setelah konfirmasi. */
#formulir-terbuka {
    animation: offer-in 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#formulir-terbuka[hidden] {
    display: none;
}

.form-stage-intro {
    margin: 26px 0 16px;
    padding: 18px 20px;
    background: #edf5ef;
    border: 1px solid #d7e6db;
    border-radius: var(--r-md);
}

.form-stage-intro .eyebrow {
    margin: 0 0 6px;
    color: var(--brand-700);
    font-size: var(--fs-sm);
    font-weight: 800;
    letter-spacing: .08em;
}

.form-stage-intro h2 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--fs-2xl);
    line-height: 1.25;
}

.form-stage-intro p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: var(--fs-sm);
    line-height: 1.55;
}

/* --- Unggah dokumen --- */
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.document-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 17px 17px;
    background: #fbfdfb;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(20, 54, 41, 0.09);
}

.document-card.has-file {
    border-color: #9dc0ac;
    background: #f4faf6;
}

.document-card.is-invalid {
    border-color: var(--accent);
    background: #fffaf8;
}

.document-card.is-missing {
    border-style: dashed;
    background: #fff;
}

.document-card__head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: var(--fs-sm);
}

.document-card__head strong {
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    font-weight: 800;
}

.document-card__hint {
    margin: 0;
    color: var(--muted);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.document-card__done {
    margin: 0;
    color: #2f6a4d;
    font-size: var(--fs-sm);
    font-weight: 600;
    word-break: break-word;
}

.document-card__done.is-missing {
    color: #8a6a3c;
    font-weight: 500;
}

.file-drop {
    display: grid;
    gap: 3px;
    margin-top: 4px;
    padding: 13px 14px;
    background: #fff;
    border: 1.5px dashed #c3d0c7;
    border-radius: var(--r-xs);
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.file-drop:hover {
    border-color: var(--green);
    background: #f4faf6;
}

.file-drop input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.file-drop:focus-within {
    outline: 3px solid rgba(21, 91, 70, 0.16);
    outline-offset: 2px;
}

.file-drop__label {
    color: var(--green);
    font-size: var(--fs-sm);
    font-weight: 800;
}

.file-drop__name {
    color: var(--muted);
    font-size: var(--fs-xs);
    line-height: 1.45;
    word-break: break-word;
}

.file-drop__name.is-invalid {
    color: #8a3b22;
    font-weight: 600;
}

.document-card.has-file .file-drop {
    border-style: solid;
    border-color: #9dc0ac;
}

@media (max-width: 900px) {
    .initial-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .intro-rail {
        position: static;
        padding: 42px 0 20px;
    }

    .initial-main {
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .participant-material {
        padding: 16px;
    }

    .participant-material__mobile-pdf {
        display: block;
    }

    .participant-material__pdf {
        display: none;
    }

    .gate-panel {
        padding: 40px 0 30px;
    }

    .gate-panel h1 {
        font-size: var(--fs-2xl);
    }

    .gate-form {
        padding: 20px 18px 22px;
    }

    .gate-form .submit-button {
        width: 100%;
    }

    .confirm-card__actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .confirm-grid > div {
        flex-direction: column;
        gap: 3px;
    }

    .confirm-grid dd {
        text-align: left;
    }

    .document-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .consent-check {
        margin-top: 0;
    }
}

/* ============================================================
   PPolish visual: progres pengisian dan munculnya bagian saat
   digulir. Semua dinonaktifkan untuk pengguna yang meminta
   reduced motion.
   ============================================================ */

/* Cincin progres di rel kiri, dekat judul. */
.progress-ring {
    display: grid;
    gap: 8px;
    margin: 0 0 24px;
    padding: 14px 16px 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}

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

.progress-ring__label {
    color: var(--muted);
    font-size: var(--fs-sm);
    font-weight: 700;
}

.progress-ring__count {
    color: var(--green);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.progress-ring__track {
    height: 5px;
    overflow: hidden;
    background: #e2ece5;
    border-radius: var(--r-pill);
}

.progress-ring__bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--green), #3f8f6d);
    border-radius: var(--r-pill);
    transition: width 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Munculnya bagian formulir ketika masuk viewport. */
.will-reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1), transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.will-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Fokus keyboard pada pilihan konfirmasi agar mudah dinavigasi. */
.choice-yes:focus-visible,
.choice-no:focus-visible {
    outline: 3px solid rgba(140, 42, 40, 0.5);
    outline-offset: 3px;
}

/* Konten yang baru saja dibuka diberi penekanan singkat. */
#formulir-terbuka.is-revealed > .registration-form {
    animation: offer-in 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (max-width: 900px) {
    .progress-ring {
        margin-bottom: 18px;
    }
}

/* ============================================================
   Formulir lengkap bertahap + simpan draf otomatis
   ============================================================ */
.form-section[hidden],
.field[hidden],
.field-subheading[hidden],
.document-card__done[hidden] {
    display: none;
}

.draft-restored {
    margin: 10px 0 0;
    padding: 9px 12px;
    color: var(--success-fg);
    background: var(--success-bg);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.form-steps {
    display: flex;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0 0 4px;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: thin;
}

.form-steps li {
    flex: 1 0 auto;
}

.form-steps button {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 8px;
    color: var(--muted);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.form-steps__number {
    flex: 0 0 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: var(--brand-100);
    border-radius: 50%;
    font-size: var(--fs-xs);
}

.form-steps button.is-done .form-steps__number {
    color: var(--white);
    background: var(--brand-600);
}

.form-steps button[aria-current="step"] {
    color: var(--ink);
    border-color: var(--green);
    box-shadow: inset 0 -3px 0 var(--green);
}

.form-steps button[aria-current="step"] .form-steps__number {
    color: var(--white);
    background: var(--green);
}

.form-steps button:focus-visible,
.step-button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.field-subheading {
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px dashed var(--line-strong);
}

.field-subheading h3 {
    margin: 0;
    color: var(--green-dark);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    font-weight: 800;
}

.field-subheading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.questionnaire-group-title {
    margin: 10px 0 0;
    color: var(--green-dark);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    font-weight: 800;
}

.step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.step-button {
    min-height: 48px;
    padding: 0 16px;
    color: var(--green-dark);
    background: var(--white);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-xs);
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 700;
    cursor: pointer;
}

.step-button:hover {
    background: var(--brand-50);
}

.draft-status {
    flex: 1 1 auto;
    color: var(--faint);
    font-size: var(--fs-xs);
    text-align: center;
}

.draft-status[data-state="saved"] {
    color: var(--success-fg);
}

.draft-status[data-state="error"] {
    color: var(--danger-fg);
    font-weight: 600;
}

.form-section .form-footer {
    margin: 26px -36px 0;
}

@media (max-width: 640px) {
    .form-steps__label {
        display: none;
    }

    .form-steps button[aria-current="step"] .form-steps__label {
        display: inline;
    }

    .step-actions {
        flex-wrap: wrap;
    }

    .draft-status {
        order: -1;
        flex-basis: 100%;
    }

    .step-actions .submit-button,
    .step-button {
        flex: 1 1 0;
        width: auto;
    }

    .form-section .form-footer {
        margin: 22px -20px 0;
    }
}

.field-warning {
    padding: 7px 10px;
    color: var(--warning-fg);
    background: var(--warning-bg);
    border-radius: var(--r-sm);
    font-size: var(--fs-xs);
    line-height: 1.45;
}

.field-error {
    color: var(--danger-fg);
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1.4;
}

.participant-question .field-error,
.document-card .field-error {
    display: block;
    margin-top: 8px;
}

.field-image {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--white);
}

.contact-notice {
    margin: 0 0 20px;
    padding: 13px 16px;
    color: var(--warning-fg);
    background: var(--warning-bg);
    border-left: 3px solid currentColor;
    border-radius: 0 4px 4px 0;
    font-size: var(--fs-sm);
    line-height: 1.6;
}

.contact-notice a {
    color: inherit;
    font-weight: 700;
    white-space: nowrap;
}

/* Isian yang belum sesuai: garis merah tegas agar mudah ditemukan */
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
    border-color: #d0342c;
    border-width: 2px;
    background-color: #fff7f6;
    box-shadow: 0 0 0 3px rgba(208, 52, 44, 0.14);
}

.field.is-invalid label {
    color: #b42a22;
}

.document-card.is-invalid,
.participant-question.is-invalid {
    border-color: #d0342c;
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(208, 52, 44, 0.14);
}

.consent-check.is-invalid {
    border-color: #d0342c;
    background: #fff7f6;
    box-shadow: 0 0 0 3px rgba(208, 52, 44, 0.14);
}

.consent-check.is-invalid {
    flex-wrap: wrap;
}

.consent-check .field-error {
    flex-basis: 100%;
    margin-left: 29px;
}

.error-summary p {
    margin: 0 0 8px;
}

.error-summary a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.error-summary a:hover {
    color: #d0342c;
}

/* ============================================================
   Registrasi awal (daftar.php) bergaya portal: header putih,
   pita hero hijau dengan langkah pendaftaran, kolom bantuan di
   kiri, kartu formulir di kanan. Hanya berlaku pada body.page-daftar
   sehingga formulir lengkap (formulir.php) tidak terpengaruh.
   ============================================================ */

body.page-daftar {
    --d-green-950: #0b2a21;
    --d-green-900: #0f3a2d;
    --d-green-800: #144a3a;
    --d-green-700: #1a5c48;
    --d-green-600: #1e6e55;
    --d-green-100: #e3f0e9;
    --d-green-50: #f2f8f4;
    --d-gold: #c9a24b;
    --d-gold-soft: #f4ead2;
    --d-gold-ink: #6b5214;
    --d-ink: #26332e;
    --d-text: #56635d;
    --d-muted: #66726d;
    --d-line: #e3e8e4;
    --d-input-line: #c4cec8;
    --d-focus: 0 0 0 3px rgba(30, 110, 85, 0.25);
    color: var(--d-ink);
    background: #f6f8f6;
    font-size: 1rem;
    line-height: 1.5;
}

body.page-daftar {
    --d-gutter: max(16px, calc((100% - 1200px) / 2));
}

/* Kontainer penuh; header dan hero selebar layar, isi tetap 1200px. */
body.page-daftar .page-shell {
    width: 100%;
}

/* Header putih selebar layar */
body.page-daftar .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 76px;
    gap: 16px;
    padding-inline: var(--d-gutter);
    background: #fff;
    border-bottom: 1px solid var(--d-line);
    box-shadow: 0 4px 16px rgba(15, 58, 45, 0.05);
}

body.page-daftar .brand {
    margin-right: auto;
}

body.page-daftar .brand-copy strong {
    font-size: 1rem;
    font-weight: 700;
}

body.page-daftar .brand-copy small {
    color: var(--d-muted);
    font-weight: 600;
}

.daftar-year {
    display: none;
}

body.page-daftar .daftar-year {
    display: inline-flex;
    padding: 6px 14px;
    color: var(--d-gold-ink);
    background: var(--d-gold-soft);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

body.page-daftar .back-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 18px;
    color: var(--d-green-600);
    border: 1.5px solid var(--d-green-600);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    text-transform: uppercase;
}

body.page-daftar .back-link:hover {
    color: #fff;
    background: var(--d-green-600);
}

/* Tata letak: hero di atas, lalu dua kolom */
body.page-daftar .initial-layout {
    display: block;
    padding-bottom: 48px;
}

/* Pita hero hijau selebar layar */
body.page-daftar .intro-rail {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 40px;
    max-width: none;
    overflow: hidden;
    padding: clamp(36px, 5vw, 56px) var(--d-gutter);
    color: #fff;
    background:
        radial-gradient(520px 260px at 100% 0%, rgba(201, 162, 75, 0.18), transparent 70%),
        linear-gradient(135deg, var(--d-green-700) 0%, var(--d-green-950) 100%);
    isolation: isolate;
}

body.page-daftar .intro-rail::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -120px;
    bottom: -180px;
    width: 420px;
    height: 420px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

body.page-daftar .intro-rail .eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f0d79a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.page-daftar .intro-rail .eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    background: var(--d-gold);
}

body.page-daftar .intro h1 {
    color: #fff;
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
    font-weight: 600;
    line-height: 1.25;
}

body.page-daftar .intro h1 span {
    color: #f0d79a;
}

body.page-daftar .intro-copy {
    max-width: 52ch;
    color: rgba(255, 255, 255, 0.85);
}

.daftar-chips {
    display: none;
}

body.page-daftar .daftar-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

body.page-daftar .daftar-chips li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

body.page-daftar .daftar-chips li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--d-gold);
    border-radius: 50%;
}

/* Langkah pendaftaran: kartu transparan di sisi kanan hero */
body.page-daftar .journey-list {
    margin: 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
}

body.page-daftar .journey-list li::before {
    background: rgba(255, 255, 255, 0.22);
}

body.page-daftar .journey-list li > span {
    color: #fff;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.45);
}

body.page-daftar .journey-list li.is-active > span {
    color: var(--d-green-900);
    background: #f0d79a;
    border-color: #f0d79a;
    box-shadow: 0 0 0 4px rgba(240, 215, 154, 0.25);
}

body.page-daftar .journey-list li strong,
body.page-daftar .journey-list li.is-active strong {
    color: #fff;
}

body.page-daftar .journey-list li small {
    color: rgba(255, 255, 255, 0.72);
}

/* Isi: kolom bantuan + kartu formulir */
.daftar-body,
.daftar-aside {
    display: contents;
}

body.page-daftar .daftar-body {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    margin-top: 32px;
    padding-inline: var(--d-gutter);
}

body.page-daftar .daftar-aside {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 16px;
}

body.page-daftar .initial-main {
    padding-top: 0;
}

body.page-daftar .progress-ring {
    margin: 0;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--d-line);
    border-radius: 12px;
    box-shadow: 0 0 4px rgba(15, 58, 45, 0.08);
}

body.page-daftar .progress-ring__count {
    color: var(--d-green-600);
}

body.page-daftar .progress-ring__bar {
    background: linear-gradient(90deg, var(--d-green-600), #4e9f82);
}

body.page-daftar .intro-meta {
    padding: 0 4px;
    color: var(--d-text);
    font-size: 0.8125rem;
    font-weight: 600;
}

body.page-daftar .meta-dot {
    background: var(--d-gold);
}

.daftar-card {
    display: none;
}

body.page-daftar .daftar-card {
    display: block;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--d-line);
    border-radius: 12px;
    box-shadow: 0 0 4px rgba(15, 58, 45, 0.08);
}

body.page-daftar .daftar-card h2 {
    margin: 0 0 12px;
    color: var(--d-ink);
    font-size: 0.9375rem;
    font-weight: 700;
}

body.page-daftar .daftar-checklist {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--d-text);
    font-size: 0.875rem;
}

body.page-daftar .daftar-checklist li {
    display: flex;
    gap: 10px;
}

body.page-daftar .daftar-checklist li::before {
    content: "";
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 1px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231a5c48' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 10.5 3 3 6-7'/%3E%3C/svg%3E") center / 12px no-repeat,
        var(--d-green-100);
    border-radius: 50%;
}

body.page-daftar .daftar-card--help {
    background: var(--d-gold-soft);
    border-color: rgba(201, 162, 75, 0.4);
}

body.page-daftar .daftar-card--help p {
    margin: 0;
    color: var(--d-text);
    font-size: 0.8125rem;
    line-height: 1.55;
}

body.page-daftar .daftar-help-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 16px;
    color: #fff;
    background: var(--d-green-600);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

body.page-daftar .daftar-help-link:hover {
    background: var(--d-green-800);
}

/* Kartu formulir */
body.page-daftar .registration-form,
body.page-daftar .initial-main > .form-section {
    background: #fff;
    border: 1px solid var(--d-line);
    border-radius: 12px;
    box-shadow: 0 0 4px rgba(15, 58, 45, 0.08), 0 18px 40px -20px rgba(15, 58, 45, 0.2);
}

body.page-daftar .form-section {
    padding: clamp(22px, 3vw, 32px);
}

body.page-daftar .section-heading h2 {
    color: var(--d-ink);
    font-size: clamp(1.25rem, 1rem + 0.8vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
}

body.page-daftar .section-heading p {
    color: var(--d-text);
}

body.page-daftar .route-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8c2a28;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.page-daftar .route-tag::before {
    content: "";
    width: 20px;
    height: 2px;
    background: var(--d-gold);
}

body.page-daftar .section-number {
    color: var(--d-green-800);
    background: var(--d-gold-soft);
    border: 0;
    border-radius: 50%;
}

body.page-daftar .contact-notice {
    position: relative;
    padding: 14px 16px 14px 48px;
    color: var(--d-gold-ink);
    background: var(--d-gold-soft);
    border: 0;
    border-radius: 10px;
}

body.page-daftar .contact-notice::before {
    content: "!";
    position: absolute;
    top: 14px;
    left: 16px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--d-gold);
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 700;
}

body.page-daftar .contact-notice a {
    color: var(--d-green-700);
    font-weight: 700;
}

body.page-daftar .field label {
    color: var(--d-ink);
    font-size: 0.875rem;
    font-weight: 600;
}

body.page-daftar .required-mark {
    color: #b3261e;
}

body.page-daftar .field input,
body.page-daftar .field select {
    min-height: 48px;
    padding: 11px 14px;
    color: var(--d-ink);
    background-color: #fff;
    border: 1px solid var(--d-input-line);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

body.page-daftar .field input:hover,
body.page-daftar .field select:hover {
    border-color: #9fb0a7;
}

body.page-daftar .field input:focus,
body.page-daftar .field select:focus {
    border-color: var(--d-green-600);
    outline: none;
    box-shadow: var(--d-focus);
}

body.page-daftar .field-hint {
    color: var(--d-muted);
}

body.page-daftar .consent-check {
    background: var(--d-green-50);
    border: 1px solid var(--d-green-100);
    border-radius: 10px;
}

body.page-daftar .consent-check input {
    accent-color: var(--d-green-600);
}

body.page-daftar .form-footer {
    background: var(--d-green-50);
    border-top: 1px solid var(--d-line);
}

body.page-daftar .form-footer p {
    color: var(--d-text);
}

body.page-daftar .submit-button {
    min-height: 48px;
    padding: 12px 28px;
    color: #fff;
    background: var(--d-green-600);
    border: 0;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 8px 20px -8px rgba(30, 110, 85, 0.6);
}

body.page-daftar .submit-button:hover:not(:disabled) {
    background: var(--d-green-800);
}

body.page-daftar .submit-button:focus-visible,
body.page-daftar .back-link:focus-visible,
body.page-daftar .daftar-help-link:focus-visible {
    outline: none;
    box-shadow: var(--d-focus);
}

body.page-daftar .error-summary {
    border-radius: 10px;
}

body.page-daftar .site-footer {
    margin: 0 var(--d-gutter);
    color: var(--d-muted);
    border-top: 1px solid var(--d-line);
}

@media (max-width: 960px) {
    body.page-daftar .intro-rail {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    body.page-daftar .daftar-body {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Di layar sempit progres tampil di atas formulir, kartu bantuan di bawahnya. */
    body.page-daftar .daftar-aside {
        display: contents;
    }

    body.page-daftar .progress-ring,
    body.page-daftar .intro-meta {
        order: -1;
    }

    body.page-daftar .daftar-body {
        gap: 16px;
    }

    body.page-daftar .daftar-card {
        order: 2;
    }
}

@media (max-width: 640px) {
    body.page-daftar .site-header {
        min-height: 64px;
    }

    body.page-daftar .daftar-year {
        display: none;
    }

    body.page-daftar .brand-copy small {
        display: none;
    }

    body.page-daftar .brand-logo {
        width: 40px;
        height: 39px;
    }

    body.page-daftar .back-link {
        min-height: 36px;
        padding: 6px 14px;
        font-size: 0.6875rem;
        white-space: nowrap;
    }

    body.page-daftar .submit-button {
        width: 100%;
    }
}

/* Formulir kode internal berada di dalam kartu bagian: tampil rata, tanpa kartu kedua. */
body.page-daftar .form-section .registration-form {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

body.page-daftar .form-section .registration-form .form-footer {
    margin: 24px calc(-1 * clamp(22px, 3vw, 32px)) calc(-1 * clamp(22px, 3vw, 32px));
    border-radius: 0 0 12px 12px;
}

/* Progres hanya berarti bila formulir data sudah tampil. */
body.page-daftar .daftar-body:not(:has(#form-utama)) .progress-ring {
    display: none;
}

/* ---------- Tipografi selaras situs publik (skala yang sama) ---------- */
body.page-daftar {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.page-daftar .intro h1 {
    font-size: clamp(1.625rem, 1.1rem + 1.6vw, 2.25rem);
    line-height: 1.3;
    text-wrap: balance;
}

body.page-daftar .intro-copy {
    font-size: 1rem;
    line-height: 1.6;
}

body.page-daftar .daftar-card h2 {
    font-size: 1rem;
    font-weight: 600;
}

body.page-daftar .section-heading h2 {
    text-wrap: balance;
}

body.page-daftar .journey-list li strong {
    font-weight: 600;
}

/* ---------- Interaksi halus ---------- */
body.page-daftar .field label {
    transition: color 150ms ease;
}

body.page-daftar .field:focus-within label {
    color: var(--d-green-700);
}

body.page-daftar .progress-ring__bar {
    transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-daftar .submit-button,
body.page-daftar .back-link,
body.page-daftar .daftar-help-link {
    transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body.page-daftar .submit-button span {
    display: inline-block;
    transition: transform 180ms ease;
}

body.page-daftar .submit-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -10px rgba(30, 110, 85, 0.65);
}

body.page-daftar .submit-button:hover:not(:disabled) span {
    transform: translateX(4px);
}

body.page-daftar .submit-button:active:not(:disabled) {
    transform: translateY(0);
}

body.page-daftar .daftar-card,
body.page-daftar .progress-ring {
    transition: box-shadow 220ms ease, transform 220ms ease;
}

body.page-daftar .daftar-card:hover {
    box-shadow: 0 8px 22px -10px rgba(15, 58, 45, 0.25);
}

/* ---------- Animasi masuk: ringan, hanya opacity dan transform ---------- */
@keyframes daftar-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes daftar-slide {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes daftar-glow {
    0%, 100% { box-shadow: 0 0 0 4px rgba(240, 215, 154, 0.25); }
    50% { box-shadow: 0 0 0 8px rgba(240, 215, 154, 0.08); }
}

@keyframes daftar-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-24px, -16px, 0) scale(1.06); }
}

@media (prefers-reduced-motion: no-preference) {
    body.page-daftar .daftar-hero__copy > * {
        animation: daftar-rise 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    body.page-daftar .daftar-hero__copy > :nth-child(2) { animation-delay: 70ms; }
    body.page-daftar .daftar-hero__copy > :nth-child(3) { animation-delay: 140ms; }
    body.page-daftar .daftar-hero__copy > :nth-child(4) { animation-delay: 210ms; }

    body.page-daftar .journey-list {
        animation: daftar-slide 700ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    /* Tahap aktif berdenyut lembut agar posisi pengguna mudah dikenali. */
    body.page-daftar .journey-list li.is-active > span {
        animation: daftar-glow 2.8s ease-in-out 900ms infinite;
    }

    body.page-daftar .intro-rail::after {
        animation: daftar-drift 14s ease-in-out infinite alternate;
    }

    body.page-daftar .daftar-aside > * {
        animation: daftar-rise 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    body.page-daftar .daftar-aside > :nth-child(1) { animation-delay: 260ms; }
    body.page-daftar .daftar-aside > :nth-child(2) { animation-delay: 320ms; }
    body.page-daftar .daftar-aside > :nth-child(3) { animation-delay: 380ms; }
    body.page-daftar .daftar-aside > :nth-child(4) { animation-delay: 440ms; }

    body.page-daftar .initial-main > .registration-form,
    body.page-daftar .initial-main > .form-section,
    body.page-daftar .initial-main > .error-summary {
        animation: daftar-rise 620ms 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    /* Bagian di dalam kartu sudah muncul bersama kartunya. */
    body.page-daftar .registration-form .will-reveal {
        opacity: 1;
        transform: none;
    }
}
