/* ==========================================================================
   EduSmart — gaya tampilan (di atas Bootstrap 5)
   --accent diatur per halaman sesuai warna mata pelajaran.
   ========================================================================== */
:root {
    --accent: #1565c0;
    --brand-blue: #1565c0;   /* warna logo EduSmart */
    --brand-green: #2e9b3a;
    --brand-yellow: #f9b215;
    --ink: #1e2533;
    --muted: #6b7280;
    --surface: #f5f6f8;
    --line: #e5e7eb;
    --benar: #15803d;
    --salah: #b91c1c;
    --radius: 1rem;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--surface);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1; }
a { color: var(--accent); }
.text-accent { color: var(--accent) !important; }
.border, .border-bottom, .border-top { border-color: var(--line) !important; }

/* ---- Navbar ------------------------------------------------------------- */
.app-nav { backdrop-filter: saturate(1.4) blur(6px); }
.brand-logo { height: 48px; width: auto; display: block; }
.main-menu .nav-link { font-weight: 600; color: var(--muted); border-radius: .6rem; padding: .4rem .75rem !important; }
.main-menu .nav-link:hover { color: var(--brand-blue); background: var(--surface); }
.main-menu .nav-link.active { color: var(--brand-blue); background: color-mix(in srgb, var(--brand-blue) 10%, #fff); }
.app-footer a { color: var(--ink); text-decoration: none; font-weight: 500; }
.app-footer a:hover { color: var(--brand-blue); }
@media (max-width: 575.98px) { .brand-logo { height: 38px; } }

/* ---- Halaman Tentang ---------------------------------------------------- */
.about-hero {
    background: linear-gradient(135deg, #e8f1fc 0%, #ffffff 55%, #eaf7e6 100%);
    border: 1px solid var(--line); border-radius: 1.5rem;
}
.about-hero .about-logo { max-width: 360px; width: 100%; height: auto; }
.about-swoosh { width: 72px; height: 5px; border-radius: 5px; background: var(--brand-yellow); }
.about-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.visi-card { background: var(--brand-blue); color: #fff; border-radius: var(--radius); }
.visi-card .bi { color: var(--brand-yellow); }
.misi-list { counter-reset: misi; list-style: none; padding: 0; margin: 0; }
.misi-list li {
    counter-increment: misi; position: relative; padding: .7rem 0 .7rem 3rem;
    border-bottom: 1px dashed var(--line);
}
.misi-list li:last-child { border-bottom: 0; }
.misi-list li::before {
    content: counter(misi); position: absolute; left: 0; top: .6rem;
    width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
    background: color-mix(in srgb, var(--brand-green) 14%, #fff); color: var(--brand-green); font-weight: 800;
}
.founder-card {
    background: linear-gradient(135deg, var(--brand-green) 0%, #1f7a34 100%);
    color: #fff; border-radius: 1.25rem;
}
.founder-card .quote-mark { font-size: 3rem; line-height: 1; color: var(--brand-yellow); }
.closing-tag { font-weight: 800; letter-spacing: -.01em; }
.closing-tag .biru { color: var(--brand-blue); }
.closing-tag .hijau { color: var(--brand-green); }

/* ---- Tombol aksen -------------------------------------------------------- */
.btn-accent {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: color-mix(in srgb, var(--accent) 85%, #000);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--accent) 85%, #000);
    --bs-btn-active-bg: color-mix(in srgb, var(--accent) 75%, #000);
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: var(--accent);
    --bs-btn-disabled-border-color: var(--accent);
    --bs-btn-disabled-color: #fff;
    font-weight: 600;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero h1 { letter-spacing: -.02em; }
.steps li {
    display: flex; align-items: center; gap: .75rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: .85rem 1rem; margin-bottom: .6rem; font-weight: 500;
}
.steps li span {
    width: 28px; height: 28px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: .85rem; font-weight: 700;
    background: var(--accent); color: #fff;
}

/* ---- Kartu pilihan -------------------------------------------------------- */
.choice-card {
    --c: var(--accent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    position: relative;
    overflow: hidden;
}
.choice-card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c);
}
.choice-card:hover, .choice-card:focus-visible {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--c) 45%, var(--line));
    box-shadow: 0 12px 28px -14px color-mix(in srgb, var(--c) 60%, transparent);
    color: var(--ink);
}
.choice-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center; font-size: 1.5rem;
    background: color-mix(in srgb, var(--c) 12%, #fff);
    color: var(--c);
}
.choice-icon-lg { width: 64px; height: 64px; font-size: 1.9rem; border-radius: 18px; }
.choice-go { font-weight: 600; font-size: .9rem; color: var(--c); }
.choice-card:hover .choice-go i { transform: translateX(3px); }
.choice-go i { display: inline-block; transition: transform .15s ease; }

/* ---- Kepala halaman ------------------------------------------------------ */
.page-head-icon {
    width: 48px; height: 48px; border-radius: 14px; flex: none;
    display: grid; place-items: center; font-size: 1.4rem;
    background: var(--accent); color: #fff;
}
.page-kicker { color: var(--accent); letter-spacing: .04em; }
.breadcrumb a { text-decoration: none; }

/* ---- Modul materi -------------------------------------------------------- */
.toc { top: 84px; }
.toc-group + .toc-group { margin-top: .75rem; }
.toc-kelas { font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: .25rem; }
.toc-link {
    display: block; padding: .45rem .6rem; border-radius: .6rem;
    color: var(--ink); text-decoration: none; font-size: .92rem;
}
.toc-link:hover { background: var(--surface); color: var(--ink); }
.toc-link.active { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); font-weight: 600; }
.materi-body { font-size: 1.02rem; line-height: 1.8; }
.materi-body h3 { font-size: 1.25rem; font-weight: 700; margin-top: 1.75rem; }
.materi-body h4 { font-size: 1.08rem; font-weight: 700; margin-top: 1.25rem; }
.materi-body blockquote {
    border-left: 4px solid var(--accent); background: var(--surface);
    padding: .75rem 1rem; border-radius: 0 .6rem .6rem 0;
}
.materi-body table { font-size: .95rem; }

/* ---- Level --------------------------------------------------------------- */
.level-card { border: 1px solid var(--line); border-radius: var(--radius); }
.level-num {
    display: inline-block; padding: .25rem .65rem; border-radius: .5rem;
    font-weight: 700; font-size: .85rem;
}

/* ---- Kuis ---------------------------------------------------------------- */
.soal-card { transition: border-color .15s ease; scroll-margin-top: 90px; }
.soal-card.terjawab { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)) !important; }
.soal-no { font-weight: 700; color: var(--accent); }
.soal-teks { font-size: 1.05rem; line-height: 1.7; }
.opsi-list { display: grid; gap: .55rem; }
.opsi {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .7rem .85rem; border: 1px solid var(--line); border-radius: .8rem;
    cursor: pointer; background: #fff; transition: all .12s ease;
}
.opsi:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, #fff); }
.opsi-huruf {
    width: 30px; height: 30px; border-radius: 8px; flex: none;
    display: grid; place-items: center; font-weight: 700; font-size: .9rem;
    background: var(--surface); color: var(--ink);
}
.opsi-teks { padding-top: .2rem; }
.btn-check:checked + .opsi {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, #fff);
    box-shadow: 0 0 0 1px var(--accent) inset;
}
.btn-check:checked + .opsi .opsi-huruf { background: var(--accent); color: #fff; }
.btn-check:focus-visible + .opsi { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); }

.quiz-panel { top: 84px; }
.progress-bar { background: var(--accent); }
.nav-soal { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: .4rem; }
.nav-soal-item {
    height: 38px; border-radius: .6rem; border: 1px solid var(--line);
    display: grid; place-items: center; font-size: .85rem; font-weight: 600;
    text-decoration: none; color: var(--muted); background: #fff;
}
.nav-soal-item.done { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- Hasil --------------------------------------------------------------- */
.skor-ring {
    width: 150px; height: 150px; border-radius: 50%;
    background: conic-gradient(var(--accent) var(--deg), var(--line) 0);
    display: grid; place-items: center;
}
.skor-ring > div {
    width: 118px; height: 118px; border-radius: 50%; background: #fff;
    display: grid; place-content: center; text-align: center;
}
.skor-angka { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.stat { border-radius: .8rem; padding: .6rem .25rem; }
.stat-n { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.stat-benar { background: #dcfce7; color: var(--benar); }
.stat-salah { background: #fee2e2; color: var(--salah); }
.stat-kosong { background: #f3f4f6; color: var(--muted); }

.pembahasan-card.status-benar { border-left: 4px solid var(--benar) !important; }
.pembahasan-card.status-salah { border-left: 4px solid var(--salah) !important; }
.pembahasan-card.status-kosong { border-left: 4px solid #9ca3af !important; }
.opsi-hasil li {
    display: flex; align-items: flex-start; gap: .5rem;
    padding: .45rem .7rem; border-radius: .6rem; margin-bottom: .3rem;
}
.opsi-hasil li i { margin-top: .15rem; }
.opsi-hasil li.kunci { background: #dcfce7; color: #14532d; font-weight: 600; }
.opsi-hasil li.pilihan-salah { background: #fee2e2; color: #7f1d1d; }
.opsi-hasil li.pilihan-salah > span:not(.badge) { text-decoration: line-through; text-decoration-thickness: 1px; }
.pembahasan { background: var(--surface); border-radius: .8rem; padding: .85rem 1rem; }

/* ---- Admin --------------------------------------------------------------- */
.admin-table td { vertical-align: middle; }
.admin-table .teks-soal { max-width: 460px; }

@media (max-width: 575.98px) {
    .soal-card, .pembahasan-card { padding: 1.1rem !important; }
    .skor-ring { width: 130px; height: 130px; }
    .skor-ring > div { width: 102px; height: 102px; }
}

@media print {
    .app-nav, footer, .breadcrumb, .btn, .btn-group, form { display: none !important; }
    body { background: #fff; }
}

/* ---- Member area ------------------------------------------------------- */
.auth-wrap { max-width: 460px; }
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; padding: .6rem 1rem;
}
.btn-google:hover { background: var(--surface); border-color: #cbd5e1; color: var(--ink); }
.atau { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; }
.atau::before, .atau::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.avatar { object-fit: cover; flex: none; }
.avatar-inisial {
    display: inline-grid; place-items: center; font-weight: 700;
    background: color-mix(in srgb, var(--brand-blue) 14%, #fff); color: var(--brand-blue);
}
.main-menu .dropdown-toggle::after { margin-left: .1rem; }
.gate-note { font-size: .8rem; color: var(--muted); }

/* ---- Gambar modul ------------------------------------------------------ */
.materi-sampul { width: 100%; max-height: 360px; object-fit: cover; border-radius: .9rem; display: block; background: var(--surface); }
.materi-body figure { margin: 1.5rem auto; text-align: center; }
.materi-body figure img, .materi-body img { max-width: 100%; height: auto; border-radius: .7rem; border: 1px solid var(--line); background: #fff; }
.materi-body figcaption { font-size: .88rem; color: var(--muted); margin-top: .5rem; }
.persetujuan legend { font-size: .95rem; }

/* ---- Dasbor & grafik (v2.4) ---------------------------------------------- */
.stat-tile{background:#fff;border:1px solid rgba(11,11,11,.08);border-radius:1rem;padding:1rem 1.1rem;height:100%;transition:box-shadow .15s,transform .15s}
a.stat-tile:hover{box-shadow:0 6px 20px rgba(21,101,192,.10);transform:translateY(-1px)}
.stat-label{font-size:.8rem;color:#52514e;display:flex;align-items:center;gap:.4rem}
.stat-label .bi{color:#1565c0}
.stat-value{font-size:1.9rem;font-weight:700;line-height:1.15;margin-top:.25rem;color:#1e2533}
.stat-value small{font-size:.9rem;font-weight:500;color:#898781;margin-left:.15rem}
.stat-delta{font-size:.78rem;font-weight:600;margin-top:.2rem;display:flex;align-items:center;gap:.25rem;flex-wrap:wrap}
.stat-delta span{font-weight:400;color:#898781}
.stat-delta.naik{color:#006300}.stat-delta.turun{color:#d03b3b}.stat-delta.datar{color:#52514e}
.grafik-kartu{background:#fff;border:1px solid rgba(11,11,11,.08);border-radius:1rem;padding:1.1rem 1.25rem 1rem}
.grafik-kartu header{margin-bottom:.75rem}
.grafik-kartu h2{font-size:1rem;font-weight:700;margin:0;color:#1e2533}
.grafik-kartu header p{font-size:.8rem;color:#898781;margin:.15rem 0 0}
.grafik-kanvas{position:relative}
.grafik-tabel{margin-top:.6rem;font-size:.8rem}
.grafik-tabel summary{color:#52514e;cursor:pointer;width:max-content}
.grafik-tabel table{font-variant-numeric:tabular-nums;margin-top:.4rem}
.share-bar{display:flex;gap:2px;height:14px;border-radius:7px;overflow:hidden;margin:.5rem 0 1rem}
.share-bar span{min-width:4px}
.share-legend li{display:flex;align-items:center;gap:.5rem;font-size:.85rem;padding:.35rem 0;border-bottom:1px solid #f1f0ec}
.share-legend li:last-child{border-bottom:0}
.share-legend i{width:10px;height:10px;border-radius:3px;flex:none}
.share-legend span{flex:1;color:#52514e}
.share-legend strong{color:#1e2533;font-variant-numeric:tabular-nums}
.share-legend em{font-style:normal;color:#898781;font-size:.75rem;min-width:2.5rem;text-align:right;font-variant-numeric:tabular-nums}
.heat-table td,.heat-table th{border-color:#f1f0ec}
.heat-table th{font-size:.78rem;color:#52514e;font-weight:600}
.heat-cell{display:inline-flex;align-items:center;justify-content:center;gap:.2rem;min-width:4.4rem;padding:.2rem .45rem;border-radius:.5rem;font-size:.8rem;font-weight:600;font-variant-numeric:tabular-nums;color:#1e2533}
.heat-cell .bi{font-size:.85rem}
.heat-cell.cukup{background:rgba(12,163,12,.12)}.heat-cell.cukup .bi{color:#0a7d0a}
.heat-cell.kurang{background:rgba(250,178,25,.22)}.heat-cell.kurang .bi{color:#8a5a00}
.heat-cell.kosong{background:rgba(208,59,59,.14)}.heat-cell.kosong .bi{color:#d03b3b}
.heat-legend{display:flex;gap:.9rem;font-size:.78rem;color:#52514e;align-items:center;flex-wrap:wrap}
.heat-legend li{display:flex;align-items:center;gap:.35rem}
.heat-legend .heat-cell{min-width:0;padding:.1rem .3rem}

/* ---- Editor visual modul ------------------------------------------------- */
.editor-wrap{border:1px solid #dee2e6;border-radius:.75rem;background:#fff;overflow:hidden}
.editor-atas{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;padding:.5rem;border-bottom:1px solid #eceae4;background:#f8f9fa;position:sticky;top:0;z-index:2}
.editor-alat{display:flex;flex-wrap:wrap;gap:.25rem;align-items:center}
.editor-alat .btn{border:1px solid transparent;color:#1e2533;padding:.2rem .5rem;line-height:1.3}
.editor-alat .btn:hover{background:#e9ecef}
.editor-alat .btn.aktif{background:#dbe7f7;border-color:#b9cff0;color:#1565c0}
.editor-alat .form-select{width:auto;min-width:7.5rem}
.editor-alat .sep{width:1px;height:1.4rem;background:#dee2e6;margin:0 .2rem}
.editor-visual{min-height:380px;max-height:70vh;overflow:auto;padding:1.25rem 1.5rem;outline:0;cursor:text}
.editor-visual:focus{box-shadow:inset 0 0 0 2px rgba(21,101,192,.18)}
.editor-visual.is-invalid{box-shadow:inset 0 0 0 2px rgba(208,59,59,.45)}
.editor-visual table{border-collapse:collapse;width:100%}
.editor-visual th,.editor-visual td{border:1px solid #d0d5dd;padding:.35rem .5rem;min-width:3rem}
.editor-visual img{max-width:100%;height:auto}
.editor-wrap textarea{border:0;border-radius:0;min-height:380px}
.editor-wrap textarea:focus{box-shadow:none}

/* ==== Beranda (landing tamu) ============================================== */
main { overflow-x: clip; }
.lp-bleed { margin-inline: calc(50% - 50vw); }
.lp-hero {
    --garis: #d7e5f7; --margin: #f3a5b3;
    margin-top: -1.5rem; padding: 3rem 0 3.5rem;
    background-color: #fff;
    /* halaman buku tulis: garis biru + garis pinggir merah muda */
    background-image: repeating-linear-gradient(180deg, transparent 0 31px, var(--garis) 31px 32px);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.lp-hero > .container { position: relative; }
.lp-hero > .container::before { content: ''; position: absolute; left: 0; top: -6rem; bottom: -6rem; width: 2px; background: var(--margin); }
@media (min-width: 1200px) { .lp-hero > .container::before { left: -1.25rem; } }
@media (min-width: 768px) { .lp-hero { margin-top: -3rem; padding: 4.5rem 0 5rem; } }
.lp-judul { text-wrap: balance; font-size: clamp(2.3rem, 5.6vw, 3.9rem); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; color: var(--ink); margin-bottom: 1.1rem; }
.lp-lead { font-size: 1.15rem; line-height: 1.6; color: #475063; max-width: 34rem; margin-bottom: 1.25rem; }
.lp-tantangan {
    font-family: 'Caveat', 'Segoe Print', cursive; font-weight: 700; font-size: clamp(1.75rem, 3.4vw, 2.3rem);
    line-height: 1.1; color: var(--brand-blue); transform: rotate(-2deg); transform-origin: left; margin: 0;
}
.lp-janji { font-size: .9rem; color: var(--muted); margin: .9rem 0 0; }

/* Lembar soal contoh */
.lp-lembar {
    position: relative; background: #fff; border-radius: 6px; padding: 1.6rem 1.5rem 1.25rem;
    box-shadow: 0 1px 0 rgba(30,37,51,.06), 0 18px 40px -18px rgba(21,101,192,.35), 0 2px 6px rgba(30,37,51,.06);
    transform: rotate(1.2deg); max-width: 540px; margin-inline: auto;
}
.lp-selotip { position: absolute; top: -14px; left: 50%; width: 110px; height: 28px; transform: translateX(-50%) rotate(-3deg);
    background: rgba(249,178,21,.55); border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.lp-coret { position: absolute; right: -6px; top: -42px; font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.6rem;
    color: #d94560; transform: rotate(6deg); pointer-events: none; }
.lp-coret::after { content: ''; position: absolute; right: 30px; top: 30px; width: 34px; height: 26px;
    border-right: 2.5px solid #d94560; border-bottom: 2.5px solid #d94560; border-radius: 0 0 16px 0; transform: rotate(20deg); }
@media (max-width: 575.98px) { .lp-coret { right: 4px; top: -38px; font-size: 1.35rem; } }
.lp-tab { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.lp-tab button { --c: var(--accent); border: 1.5px solid var(--line); background: #fff; color: #475063; font-size: .82rem; font-weight: 600;
    padding: .3rem .75rem; border-radius: 999px; transition: background .15s, color .15s, border-color .15s; }
.lp-tab button:hover { border-color: var(--c); color: var(--c); }
.lp-tab button.aktif { background: var(--c); border-color: var(--c); color: #fff; }
.lp-soal-meta { display: flex; gap: .6rem; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: .4rem; }
.lp-lv { background: var(--brand-green); color: #fff; font-weight: 700; border-radius: 6px; padding: .05rem .45rem; }
.lp-tanya { font-size: 1.08rem; font-weight: 600; line-height: 1.5; color: var(--ink); min-height: 3.2em; margin-bottom: .9rem; }
.lp-opsi { display: grid; gap: .5rem; position: relative; }
.lp-opsi button { display: flex; align-items: center; gap: .75rem; text-align: left; width: 100%; background: #fff;
    border: 1.5px solid var(--line); border-radius: 12px; padding: .55rem .75rem; font-weight: 500; color: var(--ink);
    transition: border-color .15s, background .15s; }
.lp-opsi button b { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #eef3fb; color: var(--brand-blue); font-size: .85rem; }
.lp-opsi button:hover:not(:disabled) { border-color: var(--brand-blue); background: #f7faff; }
.lp-opsi button:focus-visible { outline: 3px solid rgba(21,101,192,.35); outline-offset: 2px; }
.lp-opsi button:disabled { cursor: default; opacity: 1; }
.lp-opsi button.benar { border-color: var(--benar); background: #effaf2; }
.lp-opsi button.benar b { background: var(--benar); color: #fff; }
.lp-opsi button.salah { border-color: var(--salah); background: #fdf1f1; }
.lp-opsi button.salah b { background: var(--salah); color: #fff; }
.lp-opsi button.goyang { animation: lp-goyang .4s; }
@keyframes lp-goyang { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.lp-hasil { margin-top: 1rem; padding-top: 1rem; border-top: 1.5px dashed var(--line); position: relative; }
.lp-stempel { display: inline-block; margin: 0 0 .6rem .2rem; font-family: 'Caveat', cursive; font-weight: 700; font-size: 2.1rem;
    padding: 0 .6rem; border: 3px solid currentColor; border-radius: 10px; transform: rotate(-8deg); background: #fff; }
.lp-stempel.benar { color: var(--benar); } .lp-stempel.salah { color: var(--salah); }
.lp-stempel.cap { animation: lp-cap .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes lp-cap { from { transform: rotate(-8deg) scale(2.2); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.lp-bahas { font-size: .92rem; color: #475063; margin: 0 0 .6rem; }
.lp-catatan { font-size: .78rem; color: var(--muted); margin: .9rem 0 0; }

/* Tangga level */
.lp-tangga-wrap { padding: 3.5rem 0 1rem; }
.lp-h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-bottom: .75rem; }
.lp-tangga { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; align-items: end; list-style: none; padding: 0; margin: 0; height: 230px; }
.lp-tangga li { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.lp-anak-tangga { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding-top: .6rem;
    height: calc(22% + var(--n) * 14%); border-radius: 12px 12px 4px 4px; color: #fff;
    background: color-mix(in srgb, var(--brand-blue) calc(45% + var(--n) * 11%), var(--brand-green));
    transform-origin: bottom; }
.lp-anak-tangga strong { font-size: 1.5rem; line-height: 1; font-weight: 800; }
.lp-anak-tangga small { font-size: .75rem; opacity: .9; }
.lp-tangga-label { font-size: .8rem; color: #475063; text-align: center; margin-top: .45rem; line-height: 1.25; }
.lp-tangga-label b { display: block; color: var(--ink); }
.js .lp-tangga:not(.tampil) .lp-anak-tangga { transform: scaleY(0); }
.lp-tangga.tampil .lp-anak-tangga { transition: transform .6s cubic-bezier(.3,1.3,.5,1) calc(var(--n) * 90ms); }
@media (max-width: 575.98px) { .lp-tangga { height: 190px; gap: .35rem; } .lp-anak-tangga strong { font-size: 1.15rem; } }

.lp-mapel { padding-top: 2.5rem; }
.lp-alasan { padding: 3.5rem 0 1rem; }
.lp-alasan h3 { font-size: 1.05rem; font-weight: 700; margin: .7rem 0 .35rem; }
.lp-alasan p { color: #475063; margin: 0; }
.lp-ikon { --c: var(--accent); font-size: 1.6rem; color: var(--c); display: inline-grid; place-items: center; width: 48px; height: 48px;
    border-radius: 14px; background: color-mix(in srgb, var(--c) 14%, #fff); }
.lp-alasan .lp-angka { margin-top: 2rem; font-size: 1rem; color: #475063; }
.lp-angka strong { color: var(--ink); font-size: 1.25rem; }
.lp-ortu { margin: 2.5rem 0 3.5rem; padding: 2rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.lp-ortu-list li { display: flex; align-items: flex-start; gap: .6rem; padding: .4rem 0; color: #34405a; }
.lp-ortu-list .bi { color: var(--brand-green); margin-top: .1rem; }
.lp-penutup { margin-bottom: -1.5rem; padding: 3.5rem 0; text-align: center; color: #fff; background: #0f3d7a;
    background-image: repeating-linear-gradient(180deg, transparent 0 31px, rgba(255,255,255,.06) 31px 32px); }
@media (min-width: 768px) { .lp-penutup { margin-bottom: -3rem; padding: 4.5rem 0; } }
.lp-penutup h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; }
.lp-penutup p { max-width: 36rem; margin: .5rem auto 1.75rem; color: rgba(255,255,255,.82); font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
    .lp-tangga.tampil .lp-anak-tangga, .lp-opsi button, .lp-stempel.cap, .lp-opsi button.goyang { transition: none !important; animation: none !important; }
    .js .lp-tangga:not(.tampil) .lp-anak-tangga { transform: none; }
}

/* ==== Coba Soal =========================================================== */
.coba-wrap { max-width: 760px; margin-inline: auto; }
.coba-kepala h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; text-wrap: balance; margin-bottom: .4rem; }
.coba-kepala > p { color: #475063; margin-bottom: .8rem; }
.coba-mode { display: flex; gap: .55rem; align-items: flex-start; font-size: .88rem; background: #fff8e6; border: 1px solid #f6dc9a; color: #5b4400;
    border-radius: 12px; padding: .6rem .8rem; }
.coba-mode .bi { margin-top: .1rem; }
.coba-pilih { display: grid; gap: .55rem; margin: 1.25rem 0 1rem; }
.coba-chip-grup { display: flex; flex-wrap: wrap; gap: .4rem; }
.coba-chip { --c: var(--brand-blue); display: inline-flex; align-items: center; gap: .4rem; border: 1.5px solid var(--line); background: #fff;
    border-radius: 999px; padding: .4rem .9rem; font-weight: 600; font-size: .9rem; color: #34405a; transition: background .15s, border-color .15s, color .15s; }
.coba-chip .bi { color: var(--c); }
.coba-chip:hover:not(:disabled) { border-color: var(--c); }
.coba-chip.aktif { background: var(--c); border-color: var(--c); color: #fff; }
.coba-chip.aktif .bi { color: #fff; }
.coba-chip.kecil { padding: .25rem .8rem; font-size: .82rem; --c: #34405a; }
.coba-chip:disabled { opacity: 1; }
.coba-chip:focus-visible { outline: 3px solid rgba(21,101,192,.35); outline-offset: 2px; }
.coba-skor { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .9rem; color: #475063; margin-bottom: .75rem; }
.coba-skor .bi { margin-right: .3rem; color: var(--brand-blue); }
.coba-skor .bi-fire { color: #e8590c; }
.coba-skor b { color: var(--ink); font-variant-numeric: tabular-nums; }
.coba-gembok { color: #8a6d1d; }
.coba-gembok .bi { color: #8a6d1d !important; }
.coba-kartu { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem 1.4rem 1.2rem;
    box-shadow: 0 14px 34px -22px rgba(21,101,192,.45); transition: opacity .2s; }
.coba-kartu.memuat { opacity: .55; }
.coba-kartu.masuk { animation: coba-masuk .35s ease-out; }
@keyframes coba-masuk { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.coba-meta { display: flex; gap: .6rem; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: .5rem; }
.coba-tanya { font-size: 1.1rem; font-weight: 600; line-height: 1.55; white-space: pre-line; margin-bottom: 1rem; color: var(--ink); }
.coba-hasil { margin-top: 1rem; padding-top: 1rem; border-top: 1.5px dashed var(--line); }
.coba-bahas { white-space: pre-line; color: #475063; font-size: .95rem; }
.coba-ajak { margin-top: 1rem; border-radius: 16px; padding: 1.2rem 1.3rem; background: #0f3d7a; color: #fff;
    background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(255,255,255,.07) 27px 28px); animation: coba-masuk .35s ease-out; }
.coba-ajak p { margin-bottom: .8rem; color: rgba(255,255,255,.85); }
.coba-ajak .coba-ajak-tulis { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.9rem; line-height: 1.1; color: var(--brand-yellow); margin-bottom: .35rem; }
.coba-ajak .btn-outline-secondary { color: #fff; border-color: rgba(255,255,255,.5); }
.coba-ajak .btn-outline-secondary:hover { background: rgba(255,255,255,.12); color: #fff; }
@media (prefers-reduced-motion: reduce) { .coba-kartu.masuk, .coba-ajak { animation: none; } }
.daftar-materi li { padding: .4rem 0; border-bottom: 1px solid #f1f0ec; }
.daftar-materi li:last-child { border-bottom: 0; }
.daftar-materi a { font-weight: 600; text-decoration: none; }
.daftar-materi span { display: block; font-size: .82rem; color: var(--muted); }

/* ==== Tugas (siswa) ======================================================= */
.tugas-wrap { max-width: 760px; }
.tugas-petunjuk { background: #f7f9fc; border-left: 4px solid var(--accent); border-radius: 8px; padding: .8rem 1rem; color: #34405a; }
.tugas-fakta li { display: flex; gap: .7rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid #f1f0ec; color: #34405a; }
.tugas-fakta li:last-child { border-bottom: 0; }
.tugas-fakta .bi { color: var(--accent); font-size: 1.15rem; width: 1.4rem; text-align: center; }
.tugas-bacaan { background: #fff8e6; border: 1px solid #f6dc9a; border-radius: 14px; padding: .8rem 1rem; color: #5b4400; }
.tugas-bacaan .bi { font-size: 1.6rem; }
.tugas-bacaan small { display: block; color: #8a6d1d; }
.tugas-timer { display: flex; align-items: baseline; gap: .5rem; font-weight: 800; font-size: 1.9rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.tugas-timer .bi { color: var(--accent); font-size: 1.4rem; }
.tugas-timer small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.tugas-timer.mepet { color: var(--salah); }

/* ==== Dasbor Guru Mitra =================================================== */
.guru-saldo { display: inline-flex; align-items: center; gap: .4rem; background: #fff8e6; border: 1px solid #f6dc9a; color: #5b4400; font-weight: 700; border-radius: 999px; padding: .35rem .9rem; }
.guru-nav { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.guru-nav a { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; padding: .5rem .9rem; border-radius: 12px; border: 1px solid var(--line);
    background: #fff; color: #34405a; font-weight: 600; font-size: .92rem; text-decoration: none; }
.guru-nav a:hover { border-color: var(--accent); color: var(--accent); }
.guru-nav a.aktif { background: var(--ink); border-color: var(--ink); color: #fff; }
.kuota-kartu { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.1rem; height: 100%; }
.kuota-kartu .angka { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.kuota-kartu .bar { height: 8px; border-radius: 4px; background: #eef3fb; overflow: hidden; margin-top: .5rem; }
.kuota-kartu .bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.salin-link { display: flex; gap: .4rem; }
.salin-link input { font-family: ui-monospace, monospace; font-size: .9rem; }
.pilih-soal { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.pilih-soal label { display: flex; gap: .6rem; padding: .55rem .75rem; border-bottom: 1px solid #f1f0ec; cursor: pointer; font-size: .9rem; }
.pilih-soal label:last-child { border-bottom: 0; }
.pilih-soal label:hover { background: #f7faff; }
.pilih-soal small { color: var(--muted); display: block; }
.paket-kredit { border: 2px solid var(--line); border-radius: 1rem; padding: 1.2rem; height: 100%; background: #fff; cursor: pointer; display: block; }
.paket-kredit:has(input:checked) { border-color: var(--accent); box-shadow: 0 10px 30px -18px rgba(21,101,192,.6); }
.paket-kredit .harga { font-size: 1.5rem; font-weight: 800; }
.guru-manfaat li { display: flex; gap: .75rem; padding: .5rem 0; color: #34405a; }
.guru-manfaat .bi { color: var(--accent); font-size: 1.3rem; }
.pilih-soal { list-style: none; margin: 0; padding: 0; }
.pilih-soal.terpilih { counter-reset: no; max-height: 380px; }
.pilih-soal.terpilih:empty, .pilih-soal.hasil:empty { border: 0; }
.pilih-soal > li { padding: .55rem .75rem; border-bottom: 1px solid #f1f0ec; font-size: .9rem; }
.pilih-soal > li:last-child { border-bottom: 0; }
.pilih-soal.terpilih > li { counter-increment: no; }
.pilih-soal.terpilih > li::before { content: counter(no) "."; font-weight: 700; color: var(--muted); min-width: 1.6rem; }
.pilih-soal.hasil > li:hover { background: #f7faff; }
.tugas-kartu { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.1rem; transition: border-color .15s, box-shadow .15s; }
.tugas-kartu:hover { border-color: var(--accent); box-shadow: 0 10px 30px -20px rgba(21,101,192,.7); }
.kode-tugas { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: .12em; background: var(--surface); border: 1px dashed #c8cdd6; border-radius: 6px; padding: .05rem .45rem; color: var(--ink); }
.bagikan-tugas { background: linear-gradient(135deg, #eef5ff, #fffaf0); border: 1px solid #d6e4f7; }
.qr-tugas { width: 132px; height: 132px; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--line); }
.qr-tugas svg, .qr-bayar svg { width: 100%; height: 100%; display: block; }
.qr-bayar { width: 240px; max-width: 100%; aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; object-fit: contain; }
.rekening { white-space: normal; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.kuota-kartu.saldo { background: #fff8e6; border-color: #f6dc9a; }
.lp-guru { background: #fff; border: 1px solid var(--line); border-radius: 1.5rem; padding: 1.5rem; }
@media (min-width: 992px) { .lp-guru { padding: 2.5rem; } }
/* ==== Mode ujian (kunci layar) ============================================ */
.ujian-tirai { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, .96); color: #fff; display: flex; align-items: center; justify-content: center; padding: 1.5rem; text-align: center; }
.ujian-tirai[hidden] { display: none; }
.ujian-kotak { max-width: 460px; }
.ujian-kotak .bi-shield-lock { color: var(--brand-yellow); }
.ujian-kotak .js-ujian-hitung { color: #fcd34d; }
body.ujian-terkunci main { filter: blur(14px); pointer-events: none; }
body.ujian-aktif #form-kuis, body.ujian-aktif .quiz-panel { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.ujian-aktif:fullscreen, html:fullscreen body.ujian-aktif { overflow-y: auto; }
html:fullscreen { overflow-y: auto; background: var(--surface); }
.ujian-tanda { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 3.5rem 4rem; padding: 2rem 1rem; opacity: .07; transform: rotate(-18deg) scale(1.3); }
.ujian-tanda span { font-weight: 800; font-size: 1.1rem; white-space: nowrap; color: #000; }
.mode-ujian-set { background: #f7f9fc; border: 1px dashed #c8d3e6; }
@media print { body.ujian-aktif main { display: none !important; } }
