/*
 * ================================================================
 *  MOBILE.CSS — Seleksi Perangkat Desa
 *  Target: Chrome Android + Safari iOS (viewport-fit=cover)
 *  Breakpoints: 480px (phone), 600px (large phone), 767px (tablet)
 * ================================================================
 */

/* ── 1. Base reset & overflow ───────────────────────────────── */
html, body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }

/* ── 2. iOS Safari — prevent zoom on input focus ────────────── */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    input[type="time"],
    select, textarea {
        font-size: 16px !important;
        min-height: 48px;
        border-radius: 6px;
        /* iOS Safari removes inner shadow */
        -webkit-appearance: none;
        appearance: none;
    }
    button,
    a.btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 48px;
        min-width: 48px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
}

/* ── 3. Safe area (notch / Dynamic Island / home indicator) ─── */
@supports (padding: max(0px)) {
    .topbar, nav.topbar {
        padding-left:  max(16px, env(safe-area-inset-left))  !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
        padding-top:   env(safe-area-inset-top);
    }
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
    /* Ujian header fixed */
    #cat-header {
        padding-left:  max(16px, env(safe-area-inset-left))  !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
        padding-top:   env(safe-area-inset-top) !important;
    }
    /* Bottom bar ujian */
    #submit-bar, .submit-bar-wrap {
        padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    }
}

/* ── 4. Chrome Android — disable tap color flash ────────────── */
a, button, input, select, textarea, label {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-tap-highlight-color: transparent;
}

/* ── 5. WELCOME PAGE ────────────────────────────────────────── */
@media (max-width: 600px) {
    .topbar { padding: 0 14px !important; height: 56px !important; }
    .topbar-sub { display: none !important; }
    .topbar-nama {
        font-size: 11px !important; letter-spacing: 1px !important;
        max-width: 120px !important;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .topbar-nav { gap: 5px !important; }
    .btn-nav { padding: 7px 10px !important; font-size: 11.5px !important; }
    .hero { padding: 28px 16px 20px !important; }
    .hero-logo-ring { width: 120px !important; height: 120px !important; }
    .hero-logo-ring img {
        width: 68px !important;
        height: auto !important;
        max-height: 78px !important;
    }
    .hero-judul { font-size: clamp(28px, 9vw, 40px) !important; }
    .hero-sub { font-size: 13.5px !important; max-width: 100% !important; padding: 0 4px; }
    .cta-group { flex-direction: column !important; width: 100% !important; padding: 0 !important; gap: 10px !important; }
    .btn-cta { width: 100% !important; text-align: center !important; padding: 14px 20px !important; font-size: 13px !important; }
    .stats-strip { gap: 0 !important; margin-top: 28px !important; }
    .stat-item { padding: 0 12px !important; }
    .stat-val { font-size: 18px !important; }
    .stat-lbl { font-size: 9px !important; letter-spacing: 1px !important; }
    .footer-bar { padding: 12px 16px !important; flex-direction: column !important; gap: 4px !important; text-align: center !important; }
    .footer-motto { text-align: center !important; }
}
@media (max-width: 380px) {
    .topbar-nama { display: none !important; }
    .topbar-logo { width: 34px !important; height: 34px !important; }
    .btn-nav { padding: 6px 8px !important; font-size: 11px !important; }
    .hero-judul { font-size: clamp(24px, 8.5vw, 32px) !important; }
    .stat-item { padding: 0 8px !important; }
}

/* ── 6. LOGIN / REGISTER / FORGOT / RESET PASSWORD ─────────── */
@media (max-width: 768px) {
    /* Panel kiri tersembunyi — hanya panel kanan yang tampil */
    .panel-kiri { display: none !important; }
    .panel-kanan {
        width: 100% !important;
        min-height: 100vh !important;
        padding: 0 !important;
        border-left: none !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
    }
}
@media (max-width: 768px) {
    /* Mobile header branding pengganti panel kiri */
    .panel-kanan::before {
        content: '';
        display: block;
        width: 100%;
        height: 6px;
        background: linear-gradient(90deg, #0d3d24, #c9a227, #0d3d24);
        flex-shrink: 0;
    }
    /* Form wrapper padding */
    .panel-kanan > *:not(:first-child) {
        padding-left: 24px;
        padding-right: 24px;
    }
}
@media (max-width: 480px) {
    .panel-kanan {
        padding: 0 !important;
    }
    .form-header { padding: 28px 20px 0 !important; }
    .form-header-judul { font-size: 28px !important; }
    .form-header-kecil { font-size: 10px !important; }
    .form-group { margin-bottom: 14px !important; padding: 0 20px !important; }
    .form-label { font-size: 10px !important; }
    .btn-login, .btn-daftar, .btn-kirim, .btn {
        margin: 6px 20px 0 !important;
        width: calc(100% - 40px) !important;
    }
    .form-links {
        margin: 20px 20px 0 !important;
        padding-top: 16px !important;
        flex-direction: column !important;
        gap: 10px !important;
        align-items: center !important;
    }
    .form-links a { font-size: 13px !important; }
    .form-footer { margin: 20px 20px 0 !important; padding-top: 16px !important; }
    /* Alert box */
    .alert-box, .error-box {
        margin: 0 20px !important;
        width: calc(100% - 40px) !important;
    }
    /* Form divider */
    .form-divider { padding: 0 20px !important; }
    /* Arsip modal */
    .arsip-overlay { padding: 12px !important; }
    .arsip-box { border-radius: 10px !important; }
    .arsip-box-body { padding: 16px !important; }
    .arsip-table td { font-size: 12px !important; }
}
@media (max-width: 360px) {
    .form-header-judul { font-size: 24px !important; }
    .form-group { padding: 0 16px !important; }
    .btn-login, .btn-daftar, .btn-kirim, .btn {
        margin: 6px 16px 0 !important;
        width: calc(100% - 32px) !important;
    }
    .form-links, .form-footer { margin: 16px 16px 0 !important; }
}

/* ── 7. PELAMAR LAYOUT (layouts/pelamar.blade.php) ──────────── */
@media (max-width: 767px) {
    .topbar { padding: 0 14px !important; height: 56px !important; }
    .topbar-sub { display: none !important; }
    .topbar-nama { font-size: 11px !important; letter-spacing: 0.8px !important; max-width: 130px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hero-band { padding: 10px 14px !important; }
    .hero-band-text .hbt-title { font-size: 14px !important; letter-spacing: 1.5px !important; }
    .hero-band-text .hbt-sub   { font-size: 9.5px !important; letter-spacing: 1px !important; }
    .main-wrap { margin: 14px auto !important; padding: 0 12px !important; }
}
@media (max-width: 600px) {
    .topbar { padding: 8px 12px !important; flex-wrap: nowrap !important; gap: 6px !important; height: auto !important; min-height: 52px !important; }
    .topbar-brand { gap: 8px !important; }
    .topbar-logo { width: 34px !important; height: 34px !important; }
    .topbar-logo img { width: 28px !important; height: 28px !important; }
    .topbar-kanan { gap: 6px !important; flex-wrap: nowrap !important; }
    .topbar-user { display: none !important; }
    .topbar-berkas-link { padding: 6px 10px !important; font-size: 12px !important; }
    .berkas-text { display: none !important; }
    .btn-logout { padding: 6px 10px !important; font-size: 11px !important; }
    .main-wrap { margin: 10px auto !important; padding: 0 10px !important; }
}
@media (max-width: 400px) {
    .topbar-nama { display: none !important; }
    .topbar-berkas-link { padding: 5px 8px !important; }
    .btn-logout { padding: 5px 8px !important; font-size: 10.5px !important; }
}

/* ── 8. PELAMAR DASHBOARD ───────────────────────────────────── */
@media (max-width: 600px) {
    .identity-card { padding: 18px 16px !important; }
    .identity-name { font-size: 20px !important; }
    .identity-avatar { width: 52px !important; height: 52px !important; font-size: 20px !important; }
    .identity-meta { gap: 8px !important; }
    .identity-meta span { font-size: 11px !important; }
    .no-badge { font-size: 14px !important; padding: 5px 10px !important; }
    .dash-card-body { padding: 14px 14px !important; }
    .dash-card-header { padding: 10px 14px !important; }
    .dash-card-header h3 { font-size: 13px !important; }
    /* Jadwal bar */
    .jadwal-bar { padding: 12px 14px !important; gap: 10px !important; }
    .jadwal-divider { display: none !important; }
    .jadwal-info-wrap { flex-direction: column !important; gap: 8px !important; }
    /* Tombol mulai */
    .btn-mulai-ujian {
        display: block !important; width: 100% !important;
        text-align: center !important;
        padding: 14px 16px !important; font-size: 12.5px !important;
    }
    /* Info grid */
    .info-grid { grid-template-columns: repeat(2, 1fr) !important; }
    /* Score */
    .score-row { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; }
    .score-divider { display: none !important; }
    .score-row-item .sr-val { font-size: 28px !important; }
    /* Kat row */
    .kat-row { flex-direction: column !important; gap: 4px !important; padding: 8px 12px !important; }
}
@media (max-width: 400px) {
    .info-grid { grid-template-columns: 1fr !important; }
    .identity-inner { flex-direction: column !important; align-items: flex-start !important; }
}

/* ── 9. BERKAS UPLOAD ───────────────────────────────────────── */
@media (max-width: 600px) {
    .berkas-header { padding: 12px 12px !important; gap: 10px !important; }
    .berkas-body   { padding: 0 12px 12px !important; }
    .berkas-nama   { font-size: 13px !important; }
    .berkas-ket    { font-size: 11.5px !important; -webkit-line-clamp: 2; overflow: hidden; }
    .berkas-nomor  { width: 28px !important; height: 28px !important; font-size: 11px !important; flex-shrink: 0 !important; }
    .upload-area   { padding: 14px 10px !important; }
    .badge-pending, .badge-ok, .badge-rejected, .badge-empty {
        font-size: 10px !important; padding: 2px 8px !important;
    }
}
@media (max-width: 480px) {
    /* Tombol aksi berkas: stack vertikal */
    .berkas-body .flex-action,
    .berkas-body [style*="gap:8px"],
    .berkas-body [style*="gap: 8px"] {
        flex-direction: column !important; gap: 6px !important;
    }
    .berkas-body button[type="submit"],
    .berkas-body a[role="button"] {
        width: 100% !important; text-align: center !important;
    }
    .berkas-progress-wrap { width: 72px !important; }
}

/* ── 10. UJIAN — full page layout ──────────────────────────── */
@media (max-width: 768px) {
    html, body { overflow: auto !important; height: auto !important; }
    /* Header ujian */
    #cat-header {
        position: sticky !important;
        height: auto !important; min-height: 54px !important;
        padding: 8px 14px !important;
        flex-wrap: nowrap !important; gap: 8px !important;
    }
    #cat-header .hdr-peserta strong { font-size: 13px !important; max-width: 140px !important; }
    #cat-header .hdr-peserta small  { font-size: 10px !important; }
    #cat-header .hdr-info { display: none !important; }
    #cat-header .hdr-timer-wrap { padding: 5px 12px !important; }
    #cat-header #timer { font-size: 22px !important; letter-spacing: 2px !important; }
    /* Section pill bar */
    #section-progress-bar {
        position: sticky !important;
        top: 54px !important;
        padding: 5px 10px !important;
        height: auto !important; min-height: 36px !important;
    }
    /* Body: column layout */
    #cat-body {
        position: relative !important;
        top: auto !important;
        flex-direction: column !important;
        overflow-y: visible !important;
        overflow-x: hidden !important;
    }
    /* Sidebar: horizontal scrollable pill row */
    #sidebar-nav {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1.5px solid #e2e8f0 !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        padding: 8px 10px !important;
        height: auto !important;
        max-height: 120px !important;
        overflow-y: auto !important;
        gap: 4px !important;
        -webkit-overflow-scrolling: touch !important;
    }
    #sidebar-nav .sb-header { display: none !important; }
    #sidebar-legend { display: none !important; }
    /* Main soal area */
    #soal-area {
        flex: 1 !important;
        overflow-y: visible !important;
        padding: 14px 12px !important;
    }
    /* Nav number buttons */
    .btn-nav-num {
        min-width: 30px !important; height: 30px !important;
        font-size: 11px !important; border-radius: 6px !important;
    }
    /* Bottom submit bar */
    #submit-bar {
        position: sticky !important;
        bottom: 0 !important;
        padding: 10px 12px !important;
        background: #fff !important;
        border-top: 2px solid #e2e8f0 !important;
        z-index: 500 !important;
    }
    #submit-bar button {
        width: 100% !important;
        padding: 13px !important;
        font-size: 13px !important;
    }
}
@media (max-width: 480px) {
    #cat-header .hdr-peserta strong { max-width: 110px !important; font-size: 12px !important; }
    #cat-header #timer { font-size: 20px !important; letter-spacing: 1.5px !important; }
    #soal-area { padding: 10px !important; }
    /* Soal content text */
    .question-content, .soal-pertanyaan-wrap { font-size: 14px !important; }
    .question-content table, .option-content table { font-size: 12px !important; }
    .question-content td, .question-content th { padding: 4px 6px !important; }
    /* Opsi jawaban */
    .option-label { min-width: 32px !important; height: 32px !important; font-size: 13px !important; }
    /* Final review card */
    #final-review-card { padding: 20px 14px !important; }
    .fr-footer { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
    .btn-submit-final { width: 100% !important; padding: 13px !important; }
    .fr-nums { padding: 8px 10px !important; }
    .fr-btn { width: 32px !important; height: 32px !important; border-radius: 6px !important; }
    /* Custom confirm */
    #custom-confirm .cc-box { padding: 24px 18px !important; }
    #custom-confirm .cc-btns { flex-direction: column !important; }
    #custom-confirm .cc-cancel,
    #custom-confirm .cc-ok { width: 100% !important; padding: 12px !important; }
    /* Status indicator */
    #status-indicator { bottom: 70px !important; right: 10px !important; font-size: 11px !important; min-width: 140px !important; }
}

/* ── 11. UJIAN PAUSED PAGE ──────────────────────────────────── */
@media (max-width: 480px) {
    .pause-card { padding: 28px 18px !important; margin-top: 52px !important; }
    .pause-icon { font-size: 52px !important; }
    .pause-title { font-size: 20px !important; }
    .brand-name { display: none !important; }
    .brand-sub  { font-size: 9px !important; }
    .peserta-badge { padding: 8px 14px !important; font-size: 13px !important; }
}

/* ── 12. FORGOT PASSWORD ────────────────────────────────────── */
@media (max-width: 768px) {
    /* panel-kiri sudah di-hide di rule #6; tambahan untuk forgot */
    .tips-list { display: none !important; }
    .panel-kanan { width: 100% !important; padding: 36px 24px !important; border-left: none !important; }
}
@media (max-width: 480px) {
    .panel-kanan { padding: 28px 18px !important; }
    .form-header .form-header-judul { font-size: 26px !important; }
}

/* ── 13. PENGUMUMAN / TATA TERTIB ───────────────────────────── */
@media (max-width: 480px) {
    .page-header { padding: 22px 14px 18px !important; }
    .main { padding: 14px 12px 28px !important; }
    .grid { grid-template-columns: 1fr !important; gap: 10px !important; }
    .card-pengumuman, .card-tata-tertib { padding: 14px !important; }
}

/* ── 14. STATUS INDICATOR auto-save ─────────────────────────── */
@media (max-width: 480px) {
    #status-indicator {
        bottom: 72px !important; right: 8px !important;
        font-size: 10.5px !important;
        padding: 5px 10px !important;
        min-width: 130px !important;
    }
}

/* ── 15. Chrome Android — smooth scroll ─────────────────────── */
@media (max-width: 767px) {
    body { scroll-behavior: smooth; }
    .topbar, nav.topbar { scroll-padding-top: 70px; }
    /* Prevent content jumping when keyboard opens */
    .panel-kanan { position: relative; }
    body.keyboard-open .topbar { position: relative !important; }
}

/* ── 16. iOS Safari — fix position:fixed in form pages ──────── */
@supports (-webkit-touch-callout: none) {
    /* iOS only */
    .panel-kanan {
        /* Prevent rubber-band scroll on login/register */
        -webkit-overflow-scrolling: touch;
        min-height: -webkit-fill-available;
    }
    body {
        min-height: -webkit-fill-available;
    }
    /* Fix topbar sticky on iOS Safari */
    .topbar, nav.topbar {
        position: -webkit-sticky !important;
        position: sticky !important;
    }
    /* Prevent iOS from enlarging focused inputs */
    input, select, textarea {
        font-size: max(16px, 1em) !important;
    }
}

/* ── 17. Android Chrome — scrollable sidebar on ujian ───────── */
@media (max-width: 768px) {
    #sidebar-nav {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scroll-snap-type: none;
    }
    #section-progress-bar {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
}

/* ── 18. Responsive tables everywhere ───────────────────────── */
@media (max-width: 600px) {
    .table-responsive-wrap,
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    table:not(#sidebar-nav table) {
        min-width: auto;
    }
}

/* ── 19. Form card (create data diri peserta) ───────────────── */
@media (max-width: 600px) {
    .form-card-body { padding: 14px 14px !important; }
    .form-header-card { padding: 12px 14px !important; }
    .form-row-2col { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
    .form-card-body { padding: 12px !important; }
    .form-row-2col { grid-template-columns: 1fr !important; gap: 12px !important; }
}

/* ── 20. Lightbox (berkas preview) ──────────────────────────── */
@media (max-width: 480px) {
    .lightbox-prev  { left: 4px !important; }
    .lightbox-next  { right: 4px !important; }
    .lightbox-close { top: 8px !important; right: 10px !important; font-size: 26px !important; }
    #lightbox-img   { max-width: 96vw !important; }
}

/* Modern 2026 government theme, scoped to public and participant views. */
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) {
    color-scheme: light;
    --gov-ink: #102b20;
    --gov-forest: #0d3d2a;
    --gov-green: #176344;
    --gov-green-bright: #23845a;
    --gov-gold: #c7a443;
    --gov-gold-soft: #f4e8c3;
    --gov-paper: #f4f7f5;
    --gov-line: #dce6df;
    --gov-muted: #65766c;
    --gov-shadow: 0 16px 44px rgba(15, 42, 29, .09);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) {
    min-height: 100%;
    scroll-behavior: smooth;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) {
    min-width: 320px;
    color: var(--gov-ink);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) a,
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) button {
    -webkit-tap-highlight-color: transparent;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) a:focus-visible,
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) button:focus-visible {
    outline: 3px solid #d4a92c !important;
    outline-offset: 3px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) img {
    max-width: 100%;
}

/* Shared public portal navigation */
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar {
    min-height: 68px;
    height: auto;
    padding: 9px clamp(16px, 4vw, 52px);
    gap: 16px;
    background: rgba(7, 33, 23, .94);
    border-bottom: 1px solid rgba(221, 187, 101, .48);
    box-shadow: 0 8px 28px rgba(3, 19, 12, .18);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-brand,
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav,
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-kanan {
    min-width: 0;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border-color: rgba(226, 194, 119, .75);
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .16);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-logo img {
    max-width: 76%;
    max-height: 76%;
    object-fit: contain;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nama {
    color: #fff;
    font-size: 12px;
    letter-spacing: .11em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-sub {
    color: #dfc47f;
    letter-spacing: .12em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-nav,
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-berkas-link,
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-logout {
    min-height: 42px;
    border-radius: 10px;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-outline {
    border: 1px solid rgba(255, 255, 255, .22);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-outline:hover {
    color: #fff;
    border-color: rgba(226, 194, 119, .8);
    background: rgba(255, 255, 255, .08);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-emas {
    background: linear-gradient(135deg, #e0c16e, #c7a443);
    box-shadow: 0 5px 16px rgba(199, 164, 67, .18);
}

/* Landing page */
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .page {
    min-height: 100vh;
    min-height: 100svh;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero {
    width: min(100%, 1120px);
    align-self: center;
    padding: clamp(44px, 7vh, 84px) 24px clamp(36px, 6vh, 68px);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-badge {
    padding: 8px 16px;
    border-color: rgba(225, 194, 119, .42);
    background: rgba(225, 194, 119, .1);
    border-radius: 999px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-badge-text {
    letter-spacing: .14em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-logo-ring {
    width: clamp(124px, 16vw, 176px);
    height: clamp(124px, 16vw, 176px);
    border-width: 2px;
    border-color: rgba(225, 194, 119, .9);
    background: rgba(255, 255, 255, .06);
    box-shadow: 0 16px 60px rgba(0, 0, 0, .16), 0 0 70px rgba(199, 164, 67, .15);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-logo-ring img {
    width: 62%;
    height: 62%;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-kecil {
    letter-spacing: .2em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-judul {
    max-width: 900px;
    font-size: clamp(42px, 7vw, 76px);
    letter-spacing: -.025em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-sub {
    max-width: 620px;
    font-size: clamp(15px, 1.5vw, 17px);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-cta {
    min-height: 52px;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .stats-strip {
    padding: 18px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .045);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .stat-item {
    min-width: 150px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .stat-lbl {
    letter-spacing: .13em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .footer-bar {
    padding: 16px clamp(16px, 4vw, 52px);
    border-color: rgba(255, 255, 255, .1);
}

/* Public announcements and rules */
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .page-header {
    padding: clamp(36px, 6vw, 66px) 24px clamp(30px, 5vw, 54px);
    background:
        radial-gradient(ellipse at 50% 120%, rgba(199, 164, 67, .2), transparent 52%),
        linear-gradient(135deg, #08291c 0%, #0d3d2a 50%, #176344 100%);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .ph-kecil {
    letter-spacing: .17em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .ph-judul {
    font-size: clamp(32px, 5.4vw, 54px);
    letter-spacing: -.02em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .main {
    max-width: 1160px;
    padding: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 32px) 72px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
    gap: clamp(16px, 2.2vw, 26px);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .card {
    border-color: var(--gov-line);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(15, 42, 29, .07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .card:hover {
    border-color: rgba(199, 164, 67, .5);
    box-shadow: 0 18px 42px rgba(15, 42, 29, .13);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .card-img-wrap {
    background: #edf2ee;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .card-img-wrap img {
    max-height: 460px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .card-body {
    padding: 18px 20px 20px;
    border-top-width: 2px;
    border-top-color: var(--gov-gold);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .card-title {
    font-size: 20px;
    letter-spacing: -.01em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .card-ket {
    color: #53645a;
    font-size: 13px;
    line-height: 1.7;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .card-date {
    display: inline-flex;
    margin-top: 12px;
    padding: 5px 9px;
    border-radius: 7px;
    background: #f3f6f3;
    color: #63746a;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .empty-state {
    max-width: 580px;
    margin: 28px auto;
    padding: 56px 28px;
    border: 1px solid var(--gov-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--gov-shadow);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .empty-state-icon {
    color: var(--gov-green);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #lightbox {
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #lightbox-img {
    max-height: min(80vh, 900px);
    max-height: min(80dvh, 900px);
}

/* Participant portal */
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .page-bg {
    background:
        radial-gradient(ellipse at 8% 0%, rgba(35, 132, 90, .07), transparent 36%),
        var(--gov-paper);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-band {
    position: relative;
    overflow: hidden;
    padding: 24px;
    background:
        radial-gradient(ellipse at 90% 0%, rgba(199, 164, 67, .15), transparent 38%),
        linear-gradient(125deg, #0a3021, #12563b 70%, #176344);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-band::after {
    position: absolute;
    right: -54px;
    bottom: -105px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(225, 194, 119, .2);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-band-text {
    position: relative;
    z-index: 1;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-band-text .hbt-title {
    font-size: clamp(17px, 2.2vw, 22px);
    letter-spacing: .12em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-band-text .hbt-sub {
    letter-spacing: .1em;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .main-wrap {
    max-width: 1040px;
    margin: clamp(20px, 3.5vw, 38px) auto;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-card {
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid rgba(226, 194, 119, .27);
    border-radius: 20px;
    background:
        radial-gradient(ellipse at 88% 5%, rgba(199, 164, 67, .2), transparent 42%),
        linear-gradient(125deg, #092d1e 0%, #0d3d2a 48%, #176344 100%);
    box-shadow: 0 18px 42px rgba(13, 61, 42, .2);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-avatar {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .1);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-name {
    font-size: clamp(24px, 4vw, 32px);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-meta {
    row-gap: 8px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-meta strong {
    overflow-wrap: anywhere;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .no-badge {
    border-radius: 10px;
    background: rgba(199, 164, 67, .14);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .dash-card {
    border-color: var(--gov-line);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 42, 29, .055);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .dash-card-header {
    padding: 16px 22px;
    background: linear-gradient(110deg, #fff, #f5f8f5);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .dash-card-header h3 {
    font-size: 14px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .dash-card-header h3 .card-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(140deg, var(--gov-forest), var(--gov-green));
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .dash-card-body {
    padding: clamp(18px, 3vw, 26px);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .status-banner {
    border-radius: 12px;
    border-left-width: 4px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .jadwal-bar {
    border-color: var(--gov-line);
    background: linear-gradient(135deg, #f8faf8, #eef4ef);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .info-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .info-grid-item {
    border: 1px solid var(--gov-line);
    border-top: 3px solid var(--gov-green);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(15, 42, 29, .045);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-mulai-ujian {
    min-height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0d3d2a, #208054);
    box-shadow: 0 10px 24px rgba(13, 61, 42, .2);
}

/* CBT exam workspace */
body.exam-page {
    --exam-safe-top: env(safe-area-inset-top, 0px);
    background: #f1f5f2;
    overscroll-behavior: none;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #cat-header {
    background: linear-gradient(110deg, #08291c, #0d3d2a 58%, #176344);
    border-bottom-color: #c7a443;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #section-progress-bar {
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .sec-pill {
    min-height: 32px;
    border-radius: 10px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #sidebar-nav {
    background: #fbfdfb;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #sidebar-nav .sb-header {
    background: linear-gradient(135deg, #0a3021, #176344);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #content-area {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(35, 132, 90, .045), transparent 45%),
        #f1f5f2;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .question-card,
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .section-done-card,
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #final-review-card {
    border-color: #e0e9e2;
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(15, 42, 29, .08);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .option-item {
    border-width: 1.5px;
    border-color: #dfe7e1;
    border-radius: 12px;
    background: #fbfdfb;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .option-item.selected {
    border-color: #23845a;
    background: #f0f8f2;
    box-shadow: 0 0 0 3px rgba(35, 132, 90, .1);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .option-label {
    border-radius: 11px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-nav-question,
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .sb-action-btn,
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .fr-btn {
    min-height: 44px;
    border-radius: 11px;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #status-indicator {
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
}

@media (hover: hover) and (pointer: fine) {
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-cta:hover,
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-mulai-ujian:hover {
        transform: translateY(-2px);
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .option-item:hover {
        transform: translateY(-1px);
    }
}

@media (max-width: 767.98px) {
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar {
        padding-top: max(8px, env(safe-area-inset-top, 0px));
        padding-right: max(14px, env(safe-area-inset-right, 0px));
        padding-bottom: 8px;
        padding-left: max(14px, env(safe-area-inset-left, 0px));
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero {
        padding-top: 40px;
        padding-bottom: 36px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar {
        flex-wrap: wrap;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav {
        flex: 1 0 100%;
        justify-content: flex-end;
        overflow-x: auto;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav .btn-nav {
        flex: 0 0 auto;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar {
        flex-wrap: wrap;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav {
        margin-left: auto;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-badge {
        max-width: 100%;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-badge-text {
        font-size: 9px;
        letter-spacing: .08em;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-logo-wrap {
        margin-bottom: 20px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .hero-judul {
        font-size: clamp(38px, 11vw, 58px);
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .cta-group {
        width: min(100%, 420px);
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-cta {
        min-height: 48px;
        padding: 12px 22px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .stats-strip {
        width: min(100%, 460px);
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .stat-item {
        min-width: 0;
        flex: 1;
        padding: 0 10px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .footer-bar {
        padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .main-wrap {
        padding-right: max(14px, env(safe-area-inset-right, 0px));
        padding-left: max(14px, env(safe-area-inset-left, 0px));
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-inner {
        align-items: center;
        gap: 14px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-info {
        min-width: min(100%, 180px);
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-no-ujian {
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, .16);
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .no-badge {
        display: inline-flex;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .dash-card-header {
        align-items: flex-start;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .dash-card-header h3 {
        min-height: 40px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #cat-header {
        box-sizing: border-box;
        top: 0;
        height: calc(52px + var(--exam-safe-top));
        min-height: calc(52px + var(--exam-safe-top));
        padding: calc(6px + var(--exam-safe-top)) max(12px, env(safe-area-inset-right, 0px)) 6px
            max(12px, env(safe-area-inset-left, 0px));
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #section-progress-bar {
        top: calc(52px + var(--exam-safe-top));
        height: 40px;
        min-height: 40px;
        padding-right: max(12px, env(safe-area-inset-right, 0px));
        padding-left: max(12px, env(safe-area-inset-left, 0px));
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #cat-body {
        top: calc(92px + var(--exam-safe-top));
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #sidebar-nav {
        max-height: 124px;
        padding-right: max(10px, env(safe-area-inset-right, 0px));
        padding-left: max(10px, env(safe-area-inset-left, 0px));
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #sidebar-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .sb-action-btn {
        min-height: 40px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #content-area {
        padding-right: max(10px, env(safe-area-inset-right, 0px));
        padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
        padding-left: max(10px, env(safe-area-inset-left, 0px));
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .question-nav {
        flex-wrap: wrap;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .question-nav .q-nav-info,
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .question-nav > span {
        order: -1;
        flex-basis: 100%;
    }
}

@media (max-width: 480px) {
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar {
        gap: 8px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-brand {
        flex: 1 1 auto;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav {
        gap: 5px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-nav {
        padding-right: 10px;
        padding-left: 10px;
        font-size: 11px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .page-header {
        padding-right: 16px;
        padding-left: 16px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .ph-kecil {
        font-size: 9px;
        letter-spacing: .1em;
        line-height: 1.6;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .card-body {
        padding: 16px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-card {
        padding: 18px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-avatar {
        width: 54px;
        height: 54px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-meta {
        gap: 6px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .identity-meta span {
        font-size: 11px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .jadwal-bar {
        justify-content: space-around;
        gap: 12px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .info-grid {
        grid-template-columns: 1fr;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #cat-header .hdr-timer-wrap {
        padding: 4px 8px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #cat-header #timer {
        font-size: 17px;
        letter-spacing: 1px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #cat-header .hdr-info {
        font-size: 9px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .question-content {
        overflow-wrap: anywhere;
        font-size: 15px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .question-content table,
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .option-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .question-nav .btn-nav-question {
        flex: 1 1 42%;
        justify-content: center;
        padding: 9px 10px;
        font-size: 12px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .question-nav > span {
        flex-basis: 100%;
        text-align: center;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #custom-confirm .cc-box {
        width: min(100% - 28px, 460px);
        max-height: calc(100dvh - 32px);
        overflow-y: auto;
        padding: 24px 18px;
    }
}

@media (max-width: 360px) {
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav .btn-nav {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 10px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) #cat-header .hdr-peserta strong {
        max-width: 88px;
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) {
        scroll-behavior: auto;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) *,
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) *::before,
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* Refined public portal branding and navigation */
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-logo {
    flex: 0 0 auto;
    border: 1px solid rgba(226, 194, 119, .82);
    border-radius: 13px;
    background: transparent;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .2);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-logo img {
    width: 86%;
    height: 86%;
    max-width: 86%;
    max-height: 86%;
    object-fit: contain;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .12);
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-outline {
    border-color: rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .94);
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-emas {
    border-color: rgba(255, 232, 167, .82);
    background: linear-gradient(135deg, #f0d786, #c7a443);
    color: #183522;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .btn-hijau {
    border-color: rgba(119, 202, 153, .5);
    background: linear-gradient(135deg, #23734c, #145438);
    color: #fff;
}

body.landing-page .hero-logo-ring {
    background: transparent;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .22), 0 0 58px rgba(199, 164, 67, .18);
}

body.landing-page .hero-logo-ring img {
    width: 76%;
    height: auto;
    max-height: 82%;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .12));
}

/* The official background image belongs only to the public welcome page. */
body.landing-page {
    background-color: #0b2418 !important;
    background-image:
        linear-gradient(rgba(7, 26, 16, .2), rgba(7, 26, 16, .2)),
        url("/images/bg.jpg") !important;
    background-position: center, center;
    background-size: 100% 100%, cover !important;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
}

:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) img[src="/images/logo.png"],
:is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) img[src$="/images/logo.png"] {
    background: transparent !important;
}

body.participant-page .page-bg {
    background: transparent !important;
}

@media (max-width: 767.98px) {
    body.landing-page,
    body.landing-page .page {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar {
        width: 100%;
        height: auto !important;
        min-height: 0;
        flex-wrap: wrap !important;
        row-gap: 12px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-brand {
        flex: 1 0 100%;
        width: 100%;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav {
        flex: 1 0 100%;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        overflow: visible;
        padding-top: 6px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav .btn-nav {
        flex: 0 1 auto;
        min-width: 0;
        min-height: 46px;
        padding: 9px 12px;
        font-size: 11.5px;
    }

    body.landing-page .hero {
        padding-top: clamp(56px, 14vw, 72px) !important;
    }

    body.landing-page .hero-logo-ring {
        width: clamp(124px, 36vw, 148px);
        height: clamp(124px, 36vw, 148px);
    }
}

@media (max-width: 380px) {
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav {
        justify-content: center;
        gap: 4px;
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav .btn-nav {
        flex: 1 1 calc(50% - 4px);
        padding-right: 8px;
        padding-left: 8px;
        font-size: 11px;
    }

    body.landing-page .hero {
        padding-top: 60px !important;
    }
}

@media (max-width: 340px) {
    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    :is(body.landing-page, body.public-list-page, body.participant-page, body.exam-page) .topbar-nav .btn-nav {
        width: 100%;
        padding-right: 8px;
        padding-left: 8px;
        font-size: 10px;
    }
}
