/* ============================================================
   SPtLDV Lab — style.css
   Tema: ruang kelas digital futuristik (glassmorphism, gradien biru/ungu/cyan)
   Bagian: 1 Token · 2 Dasar · 3 Kerangka · 4 Komponen · 5 Halaman
           6 Materi/Visual · 7 Simulator · 8 Kuis · 9 Evaluasi · 10 Sertifikat
           11 Responsif · 12 Aksesibilitas & cetak
   ============================================================ */

/* ---------- 1. TOKEN ---------- */
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('assets/fonts/inter-latin-wght-normal.woff2') format('woff2-variations'), url('assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 100 900; font-display: swap; src: url('assets/fonts/outfit-latin-wght-normal.woff2') format('woff2-variations'), url('assets/fonts/outfit-latin-wght-normal.woff2') format('woff2'); }

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-d: 'Outfit', 'Inter', system-ui, sans-serif;
  --r: 16px; --r-sm: 10px; --r-lg: 22px;
  --side-w: 282px;
  --ease: cubic-bezier(.22, .8, .28, 1);
  --ok: #34d399; --bad: #f87171; --warn: #fbbf24; --info: #38bdf8;
  --accent: #6366f1; --accent-2: #22d3ee; --accent-3: #a78bfa;
  --grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 52%, #a855f7 100%);
  --grad-soft: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(99, 102, 241, .16) 55%, rgba(168, 85, 247, .16));
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070b1f; --bg-2: #0d1431;
  --surface: rgba(255, 255, 255, .055); --surface-2: rgba(255, 255, 255, .09); --surface-solid: #111a3d;
  --border: rgba(255, 255, 255, .11); --border-2: rgba(255, 255, 255, .2);
  --text: #e9edff; --muted: #9aa5cf; --faint: #6e7aa6;
  --shadow: 0 10px 40px rgba(2, 6, 30, .55);
  --glow: 0 0 0 1px rgba(99, 102, 241, .35), 0 8px 32px rgba(99, 102, 241, .28);
  --inp-bg: rgba(5, 9, 28, .6);
  --graph-bg: #0a1130; --graph-grid: rgba(148, 163, 184, .13); --graph-grid-major: rgba(148, 163, 184, .30); --graph-axis: #9fb0d8; --graph-text: #cdd6f6;
  --code-bg: rgba(99, 102, 241, .16);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1ff; --bg-2: #e3e8ff;
  --surface: rgba(255, 255, 255, .72); --surface-2: rgba(255, 255, 255, .95); --surface-solid: #ffffff;
  --border: rgba(40, 52, 120, .13); --border-2: rgba(40, 52, 120, .26);
  --text: #141a3d; --muted: #4c577f; --faint: #7380a8;
  --ok: #059669; --bad: #dc2626; --warn: #b45309; --info: #0284c7;
  --accent: #4f46e5; --accent-2: #0891b2; --accent-3: #7c3aed;
  --shadow: 0 10px 34px rgba(40, 52, 120, .13);
  --glow: 0 0 0 1px rgba(79, 70, 229, .3), 0 8px 28px rgba(79, 70, 229, .2);
  --inp-bg: rgba(255, 255, 255, .95);
  --graph-bg: #ffffff; --graph-grid: rgba(71, 85, 130, .12); --graph-grid-major: rgba(71, 85, 130, .28); --graph-axis: #47557f; --graph-text: #263057;
  --code-bg: rgba(79, 70, 229, .1);
}

/* ---------- 2. DASAR ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.62; color: var(--text); background: var(--bg); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { font-family: var(--font-d); line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 2.3vw, 1.6rem); font-weight: 650; }
h3 { font-size: 1.18rem; font-weight: 650; }
h4 { font-size: 1.02rem; font-weight: 650; margin-top: 1.4em; }
h5 { font-size: .9rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1em 0 .4em; }
p { margin: 0 0 .9em; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, canvas { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: .3em; }
code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .88em; background: var(--code-bg); padding: .12em .45em; border-radius: 6px; }
b, strong { font-weight: 650; }
small { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.4em 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hint { color: var(--muted); font-size: .9rem; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 70ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--accent-2); margin: 0 0 .4em; }
.ok-text { color: var(--ok); font-weight: 600; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.hide-sm { display: inline-flex; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* Latar bergerak */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 700px at 10% -10%, rgba(99, 102, 241, .18), transparent 60%), radial-gradient(900px 600px at 100% 10%, rgba(34, 211, 238, .12), transparent 60%), var(--bg); }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; animation: float 22s ease-in-out infinite; }
.orb.o1 { width: 420px; height: 420px; left: -80px; top: 20%; background: #4f46e5; }
.orb.o2 { width: 360px; height: 360px; right: -60px; top: 55%; background: #06b6d4; animation-delay: -8s; }
.orb.o3 { width: 300px; height: 300px; left: 45%; bottom: -120px; background: #9333ea; animation-delay: -14s; }
html[data-theme="light"] .orb { opacity: .22; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.08); } }

/* ---------- 3. KERANGKA ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; z-index: 60; inset: 0 auto 0 0; width: var(--side-w); display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem .9rem; background: var(--surface); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); border-right: 1px solid var(--border); overflow-y: auto; transition: transform .35s var(--ease); }
html[data-theme="dark"] .sidebar { background: rgba(8, 13, 38, .72); }
.brand { display: flex; align-items: center; gap: .75rem; padding: .3rem .5rem .6rem; }
.brand-logo { width: 42px; height: 42px; filter: drop-shadow(0 4px 14px rgba(99, 102, 241, .55)); }
.brand b { display: block; font-family: var(--font-d); font-size: 1.12rem; }
.brand small { font-size: .74rem; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: .7rem; padding: .56rem .7rem; border-radius: 12px; color: var(--muted); font-weight: 520; font-size: .94rem; position: relative; transition: background .2s, color .2s, transform .2s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; transform: translateX(2px); }
.nav-item.active { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .45); }
.nav-item.active::before { content: ''; position: absolute; left: -.9rem; top: 22%; bottom: 22%; width: 4px; border-radius: 4px; background: var(--grad); }
.nav-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface); flex: none; }
.nav-item.active .nav-ic { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(99, 102, 241, .5); }
.nav-lb { flex: 1; line-height: 1.25; }
.nav-badge { font-size: .7rem; font-weight: 700; color: var(--muted); }
.nav-badge:empty { display: none; }
.nav-badge.done { color: var(--ok); }
.side-user { padding: .8rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.side-top { display: flex; align-items: center; gap: .65rem; margin-bottom: .6rem; }
.side-top b { display: block; font-size: .92rem; line-height: 1.2; }
.side-top small { font-size: .74rem; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: var(--font-d); font-weight: 700; flex: none; }
.side-pct { display: block; margin-top: .35rem; font-size: .74rem; }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(3, 6, 20, .6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.content { flex: 1; min-width: 0; margin-left: var(--side-w); display: flex; flex-direction: column; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .6rem; padding: .7rem clamp(.9rem, 2.5vw, 2rem); background: var(--surface); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--border); }
html[data-theme="dark"] .topbar { background: rgba(7, 11, 31, .7); }
.page-title { margin: 0; font-size: 1.1rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#btn-menu { display: none; }
.chips-top { display: flex; gap: .4rem; }
.chip-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .75rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--surface); border: 1px solid var(--border); color: var(--text); white-space: nowrap; }
button.chip-tag { cursor: pointer; transition: all .2s; }
button.chip-tag:hover { border-color: var(--accent); }
button.chip-tag.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 16px rgba(99, 102, 241, .45); }
button.chip-tag.active small { color: rgba(255, 255, 255, .85); }
#chip-xp .ic { color: var(--warn); } #chip-level .ic { color: var(--accent-3); } #chip-streak .ic { color: #fb923c; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.main, main.view { flex: 1; padding: clamp(1rem, 2.6vw, 2.2rem); width: 100%; max-width: 1280px; margin: 0 auto; outline: none; opacity: 0; transform: translateY(8px); }
main.view.enter { opacity: 1; transform: none; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.foot { padding: 1.2rem; text-align: center; font-size: .8rem; color: var(--faint); }

/* ---------- 4. KOMPONEN ---------- */
.card, .glass { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: clamp(1rem, 2vw, 1.5rem); margin-bottom: 1.1rem; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.card-hover { transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: rgba(99, 102, 241, .5); text-decoration: none; }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; }
.card > :last-child { margin-bottom: 0; }
.page-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.4rem; }
.page-head h1 { margin: 0 0 .25em; }
.page-head .lead { margin: 0; }
.ph-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 8px 26px rgba(99, 102, 241, .5); flex: none; }
.ph-ic .ic { width: 26px; height: 26px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; }
.sec-head h2, .sec-head h3 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.link { font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.back { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: .9rem; color: var(--muted); font-weight: 550; font-size: .92rem; }
.back:hover { color: var(--text); text-decoration: none; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.1rem; margin-bottom: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 > .card, .grid-3 > .card, .grid-4 > .card { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; align-items: start; margin-bottom: 1.1rem; }
.two-col > .card { margin-bottom: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1rem; }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .62rem 1.15rem; border-radius: 12px; border: 1px solid transparent; font-weight: 620; font-size: .94rem; line-height: 1.2; text-decoration: none; transition: transform .2s var(--ease), box-shadow .25s, background .2s, border-color .2s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(99, 102, 241, .45); }
.btn-primary:hover { box-shadow: 0 8px 28px rgba(99, 102, 241, .65); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); }
.btn-danger { background: linear-gradient(135deg, #f43f5e, #dc2626); color: #fff; box-shadow: 0 6px 20px rgba(244, 63, 94, .4); }
.btn-sm { padding: .42rem .8rem; font-size: .84rem; border-radius: 10px; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1.02rem; border-radius: 14px; }
.btn:disabled:hover { transform: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: all .2s; flex: none; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--accent); }
.icon-btn.danger:hover { color: var(--bad); border-color: var(--bad); }
.icon-btn .ic { width: 1.1rem; height: 1.1rem; }

/* Pil, bar, ring */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 650; background: rgba(99, 102, 241, .18); color: var(--accent-3); border: 1px solid rgba(99, 102, 241, .35); }
html[data-theme="light"] .pill { color: var(--accent); }
.pill.ok { background: rgba(52, 211, 153, .15); color: var(--ok); border-color: rgba(52, 211, 153, .4); }
.pill.bad { background: rgba(248, 113, 113, .15); color: var(--bad); border-color: rgba(248, 113, 113, .4); }
.pill.mute { background: var(--surface); color: var(--muted); border-color: var(--border); }
.pill.xp { background: rgba(251, 191, 36, .14); color: var(--warn); border-color: rgba(251, 191, 36, .4); }
.pill .ic { width: .95em; height: .95em; }
.bar { height: 9px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--grad); transition: width .8s var(--ease); box-shadow: 0 0 14px rgba(99, 102, 241, .6); }
.bar.bar-xp > i { background: linear-gradient(90deg, #fbbf24, #f472b6, #a855f7); }
.bar.bar-ok > i { background: linear-gradient(90deg, #10b981, #34d399); box-shadow: 0 0 12px rgba(52, 211, 153, .5); }
.bar.bar-bad > i { background: linear-gradient(90deg, #f43f5e, #fb923c); box-shadow: 0 0 12px rgba(248, 113, 113, .5); }
.ring { width: 150px; height: 150px; }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.ring-fg { fill: none; stroke: url(#rg); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); filter: drop-shadow(0 0 6px rgba(99, 102, 241, .7)); }
.ring-t { font-family: var(--font-d); font-size: 26px; font-weight: 700; fill: var(--text); }
.ring-s { font-size: 10px; fill: var(--muted); }

/* Form */
.lbl { display: block; font-size: .84rem; font-weight: 600; color: var(--muted); margin: .7rem 0 .3rem; }
.inp, select.inp, textarea.inp { width: 100%; padding: .6rem .85rem; border-radius: 11px; background: var(--inp-bg); border: 1px solid var(--border-2); color: var(--text); transition: border-color .2s, box-shadow .2s; }
.inp:focus, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, .35); }
textarea.area, .area { resize: vertical; min-height: 110px; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem !important; }
select option { background: var(--surface-solid); color: var(--text); }
input[type=number], input[type=text] { color: var(--text); }
input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
input[type=checkbox] { accent-color: var(--accent); width: 1.1em; height: 1.1em; }
.inline-form { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; margin: .8rem 0; }
.inline-form label { display: flex; flex-direction: column; gap: .25rem; font-size: .84rem; font-weight: 600; color: var(--muted); }
.inline-form input { width: 110px; padding: .55rem .7rem; border-radius: 10px; background: var(--inp-bg); border: 1px solid var(--border-2); color: var(--text); }
.toggle { display: flex; align-items: center; gap: .55rem; margin: .7rem 0; cursor: pointer; font-size: .92rem; }

/* Toast */
.toasts { position: fixed; z-index: 200; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; pointer-events: none; max-width: calc(100vw - 2rem); }
.toast { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: .9rem; font-weight: 550; transform: translateX(30px); opacity: 0; transition: all .35s var(--ease); pointer-events: auto; }
.toast.show { transform: none; opacity: 1; }
.toast .ic { width: 1.2rem; height: 1.2rem; }
.toast.xp { border-color: rgba(251, 191, 36, .6); } .toast.xp .ic { color: var(--warn); }
.toast.level { border-color: rgba(168, 85, 247, .7); background: linear-gradient(135deg, var(--surface-solid), rgba(168, 85, 247, .25)); } .toast.level .ic { color: var(--accent-3); }
.toast.badge { border-color: rgba(52, 211, 153, .65); background: linear-gradient(135deg, var(--surface-solid), rgba(52, 211, 153, .2)); } .toast.badge .ic { color: var(--ok); }
.toast.warn { border-color: rgba(251, 191, 36, .6); } .toast.warn .ic { color: var(--warn); }
.toast.ok { border-color: rgba(52, 211, 153, .6); } .toast.ok .ic { color: var(--ok); }
.toast.info .ic { color: var(--info); }

/* Modal */
#modal-root { position: relative; z-index: 150; }
.modal-wrap { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 1rem; background: rgba(3, 6, 22, .65); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.modal-wrap.show { opacity: 1; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--surface-solid); border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--shadow), var(--glow); transform: translateY(14px) scale(.97); transition: transform .3s var(--ease); }
.modal-wrap.show .modal { transform: none; }
.modal-title { margin-bottom: .7rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.pf-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }

/* Tabel */
.tbl-wrap { overflow-x: auto; margin: .6rem 0 1rem; border-radius: 12px; border: 1px solid var(--border); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.compact th, .tbl.compact td { padding: .45rem .65rem; font-size: .88rem; }
.tbl tr.rok td { background: rgba(52, 211, 153, .08); }
.tbl tr.rbad td { background: rgba(248, 113, 113, .06); }
.tbl tr.hl td { background: rgba(99, 102, 241, .22); }
.tbl tr[data-r] { cursor: pointer; }
.tbl .why { color: var(--muted); font-size: .84rem; }

/* Callout, formula, verdict */
.callout { padding: .9rem 1.1rem; border-radius: 13px; border: 1px solid var(--border); border-left: 4px solid var(--info); background: rgba(56, 189, 248, .08); margin: 1rem 0; }
.callout.warn { border-left-color: var(--warn); background: rgba(251, 191, 36, .09); }
.callout.tip, .callout.ok { border-left-color: var(--ok); background: rgba(52, 211, 153, .09); }
.callout.info { border-left-color: var(--info); }
.callout > :last-child { margin-bottom: 0; }
.formula-box { padding: 1rem 1.2rem; border-radius: 14px; background: var(--grad-soft); border: 1px solid rgba(99, 102, 241, .4); text-align: center; margin: 1rem 0; overflow-x: auto; }
.verdict { padding: .75rem 1rem; border-radius: 12px; margin: .8rem 0; border: 1px solid var(--border); background: var(--surface); }
.verdict.ok { background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .5); }
.verdict.bad { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .5); }
.verdict.warn { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .5); }
.verdict:empty { display: none; }
.chk-list { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.chk-list li { position: relative; padding: .5rem .8rem .5rem 2.1rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); margin-bottom: .4rem; font-size: .93rem; }
.chk-list li::before { content: '•'; position: absolute; left: .8rem; color: var(--muted); font-weight: 800; }
.chk-list li.okc { border-color: rgba(52, 211, 153, .45); }
.chk-list li.okc::before { content: '✓'; color: var(--ok); }
.chk-list li.badc { border-color: rgba(248, 113, 113, .4); }
.chk-list li.badc::before { content: '✗'; color: var(--bad); }
.tick { font-weight: 700; margin-left: .3rem; }
.okc .tick { color: var(--ok); } .badc .tick { color: var(--bad); }
.warn-line { color: var(--warn); font-size: .84rem; margin: .4rem 0 0; }

/* Akordeon & detail */
details.soal-d, details.acc, details.guide { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin: .6rem 0; }
details > summary { cursor: pointer; padding: .7rem 1rem; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .5rem; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: '＋'; margin-left: auto; color: var(--accent-2); font-weight: 800; }
details[open] > summary::after { content: '－'; }
.soal-a, details.guide > :not(summary) { padding: 0 1rem 1rem; }
details.guide.card { padding: 0; }
details.guide ol { padding-left: 2.2rem; }

/* ---------- 5. HALAMAN ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: center; padding: clamp(1.3rem, 3vw, 2.2rem); position: relative; overflow: hidden; background: linear-gradient(135deg, rgba(34, 211, 238, .14), rgba(99, 102, 241, .22) 55%, rgba(168, 85, 247, .2)); }
.hero::after { content: ''; position: absolute; width: 360px; height: 360px; right: -80px; top: -120px; background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 65%); pointer-events: none; }
.hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.hero-r { display: grid; justify-items: center; gap: .6rem; text-align: center; }
.xp-line { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; font-size: .88rem; color: var(--muted); }
.xp-line .bar { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.1rem; }
.stat { display: flex; align-items: center; gap: .9rem; margin-bottom: 0; padding: 1rem 1.1rem; }
.stat-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid rgba(99, 102, 241, .4); color: var(--accent-2); flex: none; }
.stat-v { font-family: var(--font-d); font-size: 1.55rem; font-weight: 700; line-height: 1.1; }
.stat-v small { font-size: .9rem; color: var(--muted); }
.stat-l { font-size: .8rem; color: var(--muted); }
.stat-s { font-size: .74rem; color: var(--faint); }

.mcard { display: flex; flex-direction: column; gap: .35rem; position: relative; --accent-c: var(--accent-2); }
.mcard h3 { margin: .3rem 0 .1rem; }
.mcard p { color: var(--muted); font-size: .92rem; flex: 1; margin-bottom: .5rem; }
.mcard-top { display: flex; justify-content: space-between; align-items: center; }
.mcard-no { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-family: var(--font-d); font-weight: 700; font-size: 1.1rem; background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(99, 102, 241, .45); }
.mcard.is-done { border-color: rgba(52, 211, 153, .5); }
.mcard.is-done .mcard-no { background: linear-gradient(135deg, #10b981, #34d399); }
.mcard-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; font-size: .84rem; color: var(--muted); }
.mcard-foot span { display: inline-flex; align-items: center; gap: .3rem; }
.mcard-foot .go { color: var(--accent-2); font-weight: 650; }
.mcard:hover .go .ic { transform: translateX(4px); }
.go .ic { transition: transform .2s; }

.missions, .checklist { display: flex; flex-direction: column; gap: .55rem; }
.mission { display: flex; gap: .8rem; align-items: center; padding: .7rem .9rem; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); }
.mission.done { border-color: rgba(52, 211, 153, .5); background: rgba(52, 211, 153, .08); }
.m-chk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-2); flex: none; color: transparent; }
.mission.done .m-chk { background: var(--ok); border-color: var(--ok); color: #fff; }
.m-body { flex: 1; font-size: .92rem; }
.m-body small { display: block; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: .92rem; margin: 0; min-width: 0; }
.checklist li.done { border-color: rgba(52, 211, 153, .45); }
.checklist li a { color: var(--text); overflow-wrap: anywhere; }
.checklist a, .checklist > div { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 10px; color: var(--text); font-size: .92rem; background: var(--surface); border: 1px solid var(--border); }
.checklist a:hover { border-color: var(--accent); text-decoration: none; }
.checklist .done { border-color: rgba(52, 211, 153, .45); }
.checklist .ic { color: var(--muted); } .checklist .done .ic { color: var(--ok); }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .8rem; }
.badges-big { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; padding: .9rem .6rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); transition: transform .3s var(--ease); }
.badge.got:hover { transform: translateY(-4px) rotate(-1deg); }
.badge-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 0 22px var(--bc, rgba(99, 102, 241, .6)); background: var(--bc, var(--accent)); }
.badge-ic .ic { width: 26px; height: 26px; }
.badge b { font-size: .86rem; line-height: 1.2; }
.badge small { font-size: .72rem; }
.badge.locked { opacity: .5; filter: grayscale(1); }
.badge.locked .badge-ic { background: var(--surface-2); box-shadow: none; color: var(--muted); }
.badge.big { padding: 1.2rem .9rem; }
.badge.big .badge-ic { width: 72px; height: 72px; }
.badge.big .badge-ic .ic { width: 34px; height: 34px; }

.locked-box { display: flex; gap: 1rem; align-items: center; color: var(--muted); }
.locked-box > .ic { width: 2.2rem; height: 2.2rem; flex: none; color: var(--faint); }
.locked-box h3 { margin-bottom: .2rem; color: var(--text); }
.locked-box p { margin: 0; }

/* Peta konsep */
.map { display: flex; flex-direction: column; align-items: center; gap: 0; }
.map-root { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.6rem; margin-bottom: 0; border-radius: 18px; background: var(--grad); color: #fff; font-family: var(--font-d); font-size: 1.1rem; text-align: left; box-shadow: 0 10px 34px rgba(99, 102, 241, .55); border: 0; }
.map-root small { display: block; color: rgba(255, 255, 255, .8); font-family: var(--font); font-size: .78rem; }
.map-root-ic { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.map-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.map-card.is-done { border-color: rgba(52, 211, 153, .5); }
.map-stem { width: 3px; height: 28px; background: linear-gradient(var(--accent), var(--accent-2)); }
.map-branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; width: 100%; position: relative; padding-top: 1.1rem; }
.map-branches::before { content: ''; position: absolute; top: 0; left: 16.6%; right: 16.6%; height: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3)); border-radius: 3px; }
.map-card { position: relative; display: block; padding: 1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); transition: all .3s var(--ease); color: var(--text); }
.map-card::before { content: ''; position: absolute; left: 50%; top: -1.1rem; width: 3px; height: 1.1rem; background: var(--accent); }
.map-card:hover { transform: translateY(-4px); box-shadow: var(--glow); text-decoration: none; border-color: var(--accent); }
.map-card h4 { margin: 0 0 .3rem; font-size: .98rem; display: flex; align-items: center; gap: .5rem; }
.map-card p { font-size: .84rem; color: var(--muted); margin: 0; }
.flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin: 1rem 0; }
.flow-step { padding: .55rem .9rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-2); font-weight: 600; font-size: .88rem; text-align: center; }
.flow-arrow { color: var(--accent-2); font-weight: 800; }
.mini-link { font-size: .8rem; font-weight: 600; display: inline-flex; gap: .25rem; margin-top: .4rem; }

/* Apersepsi */
.apers { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.apers-ctrl .sl { margin-top: .6rem; }
.apers-graph { min-width: 0; }
.ap-out { margin-top: .8rem; }
.ap-line { padding: .45rem .7rem; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); margin-bottom: .35rem; font-size: .9rem; }
.ap-verdict { margin-top: .6rem; }
.pem { padding: 1rem 1.2rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: .8rem; }
.pem h4 { margin-top: 0; }

/* Refleksi */
.refl { padding: 1.1rem 1.2rem; }
.refl h4 { margin-top: 0; }
.refl-meta { font-size: .8rem; color: var(--muted); margin-top: .3rem; display: flex; justify-content: space-between; }

/* Dashboard kecil */
.cat-ex { background: linear-gradient(135deg, rgba(251, 191, 36, .22), rgba(244, 114, 182, .18)); color: #fbbf24; border-color: rgba(251, 191, 36, .6); }
.cat-vg { background: rgba(52, 211, 153, .16); color: var(--ok); border-color: rgba(52, 211, 153, .5); }
.cat-g { background: rgba(56, 189, 248, .16); color: var(--info); border-color: rgba(56, 189, 248, .5); }
.cat-ni { background: rgba(248, 113, 113, .16); color: var(--bad); border-color: rgba(248, 113, 113, .5); }
html[data-theme="light"] .cat-ex { color: #b45309; }
.pf-row { align-items: center; }

/* ---------- 6. MATERI & VISUALISASI ---------- */
.mat-head { display: flex; gap: 1.2rem; align-items: center; --accent-c: var(--accent); background: linear-gradient(135deg, rgba(34, 211, 238, .1), rgba(99, 102, 241, .18)); }
.mat-no { width: 70px; height: 70px; border-radius: 22px; display: grid; place-items: center; font-family: var(--font-d); font-weight: 800; font-size: 2rem; background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(99, 102, 241, .55); flex: none; }
.mat-no .ic { width: 32px; height: 32px; }
.mat-info h1 { margin-bottom: .3em; }
.mat-info .lead { margin-bottom: .5rem; }
.mat-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .86rem; color: var(--muted); }
.mat-meta span { display: inline-flex; align-items: center; gap: .3rem; }
#mat-prog, #k-st { color: var(--ok); font-weight: 650; }
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding: .3rem; margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; scrollbar-width: thin; }
.tab { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border-radius: 12px; background: transparent; border: 0; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; position: relative; transition: all .2s; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(99, 102, 241, .5); }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; position: absolute; top: 6px; right: 6px; }
.tab.seen:not(.active) .tab-dot { background: var(--ok); }
.tabs.sm { margin-bottom: .8rem; }
.tabs.sm .tab { padding: .45rem .75rem; font-size: .84rem; }
.pane { min-height: 260px; }
.pane.enter { animation: paneIn .45s var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tab-nav { display: flex; justify-content: space-between; gap: .7rem; margin: 1rem 0 0; }
.prose { line-height: 1.75; }
.prose h4:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .45em; }
ol.steps { list-style: none; counter-reset: st; padding: 0; margin: .8rem 0; }
ol.steps > li { counter-increment: st; position: relative; padding: .7rem .9rem .7rem 3.1rem; margin-bottom: .55rem; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); }
ol.steps > li::before { content: counter(st); position: absolute; left: .75rem; top: .65rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff; background: var(--grad); }
.mistakes { list-style: none; padding: 0; }
.mistakes li { padding: .8rem 1rem; border-radius: 13px; background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .35); margin-bottom: .6rem; }
.soal { margin-bottom: 1rem; }
.soal-q { display: flex; gap: .8rem; align-items: flex-start; }
.soal-no { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem; background: var(--grad); color: #fff; }

.viz h3 { margin-top: 0; }
.viz-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; margin: .8rem 0; }
.viz-side { min-width: 0; }
.viz-box { padding: 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin: .7rem 0; }
.stepper-dots, .stepper-dots-wrap .stepper-dots { display: flex; gap: .4rem; margin: .5rem 0; }
.stepper-dots i, .wiz-steps i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-2); transition: all .25s; }
.stepper-dots i.on, .wiz-steps i.on { background: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); transform: scale(1.25); }
.stepper-dots i.past, .wiz-steps i.past { background: var(--ok); border-color: var(--ok); }
.wiz-steps { display: flex; gap: .4rem; flex-wrap: wrap; margin: .6rem 0; }
.wz { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-2); color: var(--muted); font-weight: 700; font-size: .85rem; padding: 0 .5rem; }
.wz.on { background: var(--grad); border-color: transparent; color: #fff; }
.wz.past { border-color: var(--ok); color: var(--ok); }
.mini-steps { font-size: .9rem; }
.mini-steps li { padding: .3rem 0; }
.sl { display: flex; flex-direction: column; gap: .15rem; font-size: .88rem; font-weight: 600; color: var(--muted); }
.sl b { color: var(--accent-2); }

/* Grafik */
.graph-box { position: relative; width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-2); background: var(--graph-bg); box-shadow: inset 0 0 40px rgba(99, 102, 241, .06); }
.graph-wrap { position: relative; width: 100%; touch-action: none; line-height: 0; }
.graph-wrap canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.graph-tools { position: absolute; z-index: 3; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; }
.gt { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(10, 17, 48, .78); color: #e9edff; border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px); transition: all .2s; padding: 0; }
html[data-theme="light"] .gt { background: rgba(255, 255, 255, .92); color: #141a3d; border-color: rgba(40, 52, 120, .3); }
.gt:hover { border-color: var(--accent-2); transform: scale(1.08); }
.gt.on { background: var(--grad); color: #fff; border-color: transparent; }
.gt .ic { width: 16px; height: 16px; }
.graph-card { padding: .8rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .78rem; color: var(--muted); margin-top: .6rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.lg { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--accent-2); }
.lg.dash { border-top-style: dashed; }
.lg.fill { height: 12px; border: 0; background: repeating-linear-gradient(45deg, rgba(99, 102, 241, .6) 0 2px, transparent 2px 5px); border-radius: 3px; }
.lg.pt { width: 10px; height: 10px; border: 2px solid #fff; background: var(--accent-3); border-radius: 50%; }

/* ---------- 7. SIMULATOR ---------- */
.sim { display: grid; grid-template-columns: minmax(310px, 380px) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.sim-left, .sim-right { min-width: 0; display: flex; flex-direction: column; }
.sim-left .card, .sim-right .card { margin-bottom: 1rem; }
.sim-right { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow-y: auto; scrollbar-width: thin; }
.sim-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.ineq-list { display: flex; flex-direction: column; gap: .7rem; }
.ineq { padding: .75rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, box-shadow .2s; }
.ineq.active { border-color: var(--accent); box-shadow: var(--glow); }
.ineq.is-hidden { opacity: .55; }
.ineq-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.ineq-head > b { flex: 1; font-size: .95rem; }
.ineq-title { flex: 1; text-align: left; background: none; border: 0; padding: .2rem 0; color: var(--text); font-size: .95rem; }
.ineq-head .icon-btn { width: 32px; height: 32px; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 10px currentColor; }
.ineq-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.ineq-inputs label { display: flex; flex-direction: column; gap: .2rem; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ineq-inputs input, .ineq-inputs select { width: 100%; padding: .42rem .5rem; border-radius: 9px; background: var(--inp-bg); border: 1px solid var(--border-2); color: var(--text); min-width: 0; font-size: .92rem; text-align: center; }
.ineq-inputs select { padding-right: 1.4rem !important; background-position: calc(100% - 13px) 55%, calc(100% - 8px) 55%; }
.ineq-sl { margin-top: .6rem; display: grid; gap: .1rem; }
.sim-panel h4:first-child { margin-top: 0; }
.wi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: .8rem 0; }
.wi-btn { display: flex; align-items: center; gap: .7rem; padding: .75rem .9rem; border-radius: 13px; text-align: left; background: var(--surface); border: 1px solid var(--border-2); color: var(--text); font-size: .88rem; transition: all .25s var(--ease); }
.wi-btn:hover { border-color: var(--accent); background: var(--grad-soft); transform: translateY(-2px); }
.wi-btn .ic { width: 1.5rem; height: 1.5rem; color: var(--accent-2); flex: none; }
.wi-card { padding: 1rem; border-radius: 14px; background: var(--grad-soft); border: 1px solid rgba(99, 102, 241, .45); animation: paneIn .4s var(--ease); }
.wi-card h4 { margin-top: 0; }
.wi-ba { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: .6rem 0; }
.wi-ba > div:not(.ar) { padding: .5rem .8rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; }
.wi-ba small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.wi-ba .ar { font-size: 1.4rem; color: var(--accent-2); font-weight: 800; }
.wi-exp { padding-left: 1.2em; font-size: .92rem; }
.wi-exp li { margin-bottom: .55em; }

/* ---------- 8. KUIS ---------- */
.q-text { font-size: 1.04rem; font-weight: 500; margin-bottom: 1rem; line-height: 1.7; }
.q-block { margin-bottom: 1.3rem; }
.q-num { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); margin-bottom: .4rem; }
.q-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.q-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.q.locked { opacity: .98; }
.opts { display: grid; gap: .6rem; }
.opts.tf, .opts.row { grid-template-columns: repeat(2, 1fr); }
.opts.row { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.opt { display: flex; align-items: center; gap: .8rem; padding: .75rem .95rem; border-radius: 13px; text-align: left; background: var(--surface); border: 1.5px solid var(--border-2); color: var(--text); transition: all .22s var(--ease); }
.opt:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-2); transform: translateX(3px); }
.opt-l { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; font-weight: 750; font-size: .85rem; background: var(--surface-2); border: 1px solid var(--border-2); transition: all .22s; }
.opt-t { flex: 1; line-height: 1.5; }
.opt.sel { border-color: var(--accent); background: var(--grad-soft); box-shadow: 0 0 0 3px rgba(99, 102, 241, .25); }
.opt.sel .opt-l { background: var(--grad); color: #fff; border-color: transparent; }
.q.locked .opt { pointer-events: none; }
.opt.correct { border-color: var(--ok); background: rgba(52, 211, 153, .14); box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }
.opt.correct .opt-l { background: var(--ok); color: #fff; border-color: transparent; }
.opt.wrong { border-color: var(--bad); background: rgba(248, 113, 113, .13); }
.opt.wrong .opt-l { background: var(--bad); color: #fff; border-color: transparent; }
.short .inp { max-width: 360px; font-size: 1.05rem; }
.inp.ok { border-color: var(--ok); background: rgba(52, 211, 153, .12); }
.inp.bad { border-color: var(--bad); background: rgba(248, 113, 113, .12); }
.chks { display: grid; gap: .5rem; }
.chk { display: flex; align-items: flex-start; gap: .7rem; padding: .65rem .9rem; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--border-2); cursor: pointer; transition: all .2s; }
.chk:hover { border-color: var(--accent); }
.chk input { margin-top: .25rem; flex: none; }
.chk.correct { border-color: var(--ok); background: rgba(52, 211, 153, .13); }
.chk.wrong { border-color: var(--bad); background: rgba(248, 113, 113, .12); }
.region-graph { margin-bottom: .9rem; max-width: 520px; }

/* Drag & drop */
.dnd { display: grid; gap: .9rem; }
.dnd-bank { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 54px; padding: .7rem; border-radius: 13px; border: 2px dashed var(--border-2); background: var(--surface); }
.dnd-bank:empty::after { content: 'Semua pernyataan sudah ditempatkan'; color: var(--faint); font-size: .85rem; }
.dnd-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .7rem; }
.dnd-zone { border-radius: 13px; border: 2px dashed var(--border-2); background: var(--surface); padding: .6rem; transition: all .2s; cursor: pointer; }
.dnd-zone h5 { margin: 0 0 .4rem; text-align: center; color: var(--accent-2); }
.dnd-zone.over { border-color: var(--accent-2); background: var(--grad-soft); transform: scale(1.02); }
.dnd-drop { display: flex; flex-direction: column; gap: .4rem; min-height: 50px; }
.chip { display: inline-block; padding: .5rem .8rem; border-radius: 11px; background: var(--surface-2); border: 1.5px solid var(--border-2); font-size: .9rem; cursor: grab; user-select: none; transition: all .2s; line-height: 1.45; }
.chip:hover { border-color: var(--accent); }
.chip.picked { border-color: var(--accent-2); background: var(--grad-soft); box-shadow: 0 0 0 3px rgba(34, 211, 238, .3); }
.chip.dragging { opacity: .4; }
.chip.ok { border-color: var(--ok); background: rgba(52, 211, 153, .15); cursor: default; }
.chip.bad { border-color: var(--bad); background: rgba(248, 113, 113, .14); cursor: default; }
.dnd-order { list-style: none; padding: 0; display: grid; gap: .5rem; counter-reset: ord; }
.ord { counter-increment: ord; display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--border-2); cursor: grab; transition: all .2s; margin: 0; }
.ord::before { content: counter(ord); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: .8rem; flex: none; }
.ord.dragging { opacity: .4; transform: scale(.98); }
.grip { color: var(--faint); letter-spacing: -3px; }
.ord-t { flex: 1; font-size: .93rem; }
.ord-btns { display: flex; gap: .25rem; }
.ord-btns button { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); font-size: .7rem; }
.ord-btns button:hover:not(:disabled) { border-color: var(--accent); }
.ord.ok { border-color: var(--ok); background: rgba(52, 211, 153, .12); }
.ord.bad { border-color: var(--bad); background: rgba(248, 113, 113, .1); }

/* Umpan balik */
.fb { border-radius: 14px; padding: 1rem 1.1rem; margin-top: 1rem; border: 1px solid var(--border-2); background: var(--surface); animation: paneIn .4s var(--ease); }
.fb.ok { border-color: rgba(52, 211, 153, .6); background: rgba(52, 211, 153, .09); }
.fb.bad { border-color: rgba(248, 113, 113, .6); background: rgba(248, 113, 113, .08); }
.fb.part { border-color: rgba(251, 191, 36, .6); background: rgba(251, 191, 36, .08); }
.fb-head { display: flex; align-items: center; gap: .6rem; font-size: 1.02rem; }
.fb-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--muted); }
.fb.ok .fb-ic { background: var(--ok); } .fb.bad .fb-ic { background: var(--bad); } .fb.part .fb-ic { background: var(--warn); }
.fb-score { margin-left: auto; font-weight: 700; font-size: .88rem; padding: .15rem .65rem; border-radius: 999px; background: var(--surface-2); }
.fb-sec { margin-top: .8rem; }
.fb-sec h5 { margin: 0 0 .3rem; }
.fb-key { margin-top: .7rem; padding: .6rem .8rem; border-radius: 10px; background: var(--surface-2); font-size: .92rem; }
.fb-key ul, .fb-key ol { margin: .3rem 0 0; }
.fb-formula { padding: .6rem; border-radius: 10px; background: var(--grad-soft); text-align: center; overflow-x: auto; }
.essay-panel { margin-top: 1rem; padding: 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-2); }
.model { padding: .8rem 1rem; border-radius: 11px; background: var(--surface-2); border-left: 4px solid var(--accent-2); }
.rub-total { margin-top: .7rem; font-weight: 600; }
.pts { color: var(--warn); }
.qs-sel { color: var(--accent-2); }

/* Latihan: navigasi soal */
.pr-wrap { grid-template-columns: minmax(0, 1fr) 270px; }
.pr-nav { position: sticky; top: 76px; }
.pr-nav h4 { margin-top: 0; }
.qnav { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: .4rem; }
.qn { display: inline-grid; place-items: center; height: 36px; min-width: 36px; border-radius: 10px; background: var(--surface); border: 1.5px solid var(--border-2); color: var(--text); font-weight: 650; font-size: .84rem; padding: 0; transition: all .2s; }
button.qn:hover { border-color: var(--accent); }
.qn.cur { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.qn.ok, .qn.done { background: rgba(52, 211, 153, .2); border-color: var(--ok); color: var(--ok); }
.qn.part { background: rgba(251, 191, 36, .18); border-color: var(--warn); color: var(--warn); }
.qn.bad { background: rgba(248, 113, 113, .18); border-color: var(--bad); color: var(--bad); }
.qn.es { border-style: dashed; }
.qlegend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .9rem; font-size: .76rem; color: var(--muted); }
.qlegend span { display: inline-flex; align-items: center; gap: .35rem; }
.qlegend .qn { height: 14px; min-width: 14px; width: 14px; border-radius: 4px; }

/* ---------- 9. STUDI KASUS, TANTANGAN, EVALUASI ---------- */
.ct-prog { margin-top: 1rem; display: grid; gap: .4rem; }
.ct-stage { border-left: 4px solid var(--accent); }
.ct-stage.is-done { border-left-color: var(--ok); }
.ct-head { display: flex; gap: .9rem; align-items: center; margin-bottom: .9rem; }
.ct-head h3 { margin: 0; font-size: 1rem; font-weight: 550; color: var(--muted); }
.ct-no { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: var(--font-d); font-weight: 700; flex: none; }
.ct-no.ok { background: var(--ok); }

.ev-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; top: 64px; z-index: 20; padding: .7rem 1rem; }
.ev-bar .hint { margin-left: .4rem; }
.ev-timer { font-family: var(--font-d); font-weight: 700; font-size: 1.35rem; padding: .25rem .9rem; border-radius: 12px; background: var(--grad-soft); border: 1px solid rgba(99, 102, 241, .45); font-variant-numeric: tabular-nums; }
.ev-timer.low { color: var(--bad); border-color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(248, 113, 113, .25); } }
.eval-hero { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; background: var(--grad-soft); }
.score-big { width: 150px; height: 150px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--surface-solid); border: 6px solid transparent; background-image: linear-gradient(var(--surface-solid), var(--surface-solid)), var(--grad); background-origin: border-box; background-clip: padding-box, border-box; box-shadow: 0 0 40px rgba(99, 102, 241, .5); flex: none; }
.score-big span { font-family: var(--font-d); font-size: 3.2rem; font-weight: 800; line-height: 1; }
.score-big small { font-size: .85rem; }
.topic-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 48px; gap: .8rem; align-items: center; margin-bottom: .8rem; font-size: .9rem; }
.topic-lb { line-height: 1.3; }
.topic-pct { font-weight: 700; text-align: right; }
.topic-pct.ok { color: var(--ok); } .topic-pct.bad { color: var(--bad); }
details.rev { border: 1px solid var(--border); border-radius: 12px; margin: .5rem 0; background: var(--surface); }
details.rev.ok { border-left: 4px solid var(--ok); } details.rev.bad { border-left: 4px solid var(--bad); } details.rev.part { border-left: 4px solid var(--warn); }
details.rev > summary { gap: .8rem; font-weight: 500; }
details.rev > summary::after { display: none; }
.rev-q { flex: 1; font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rev-s { font-weight: 700; font-size: .85rem; color: var(--muted); }
.rev-body { padding: 0 1rem 1rem; }

/* ---------- 10. SERTIFIKAT ---------- */
.cert-wrap { overflow-x: auto; padding-bottom: .5rem; }
.cert { min-width: 640px; aspect-ratio: 1.414 / 1; padding: 14px; border-radius: 20px; background: var(--grad); box-shadow: 0 20px 60px rgba(99, 102, 241, .45); }
.cert-in { height: 100%; border-radius: 12px; padding: 2.2rem 2.6rem; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .5rem; background: radial-gradient(900px 400px at 50% -10%, rgba(99, 102, 241, .22), transparent 70%), #0a1130; color: #e9edff; border: 2px solid rgba(255, 255, 255, .35); position: relative; }
.cert-kick { letter-spacing: .3em; text-transform: uppercase; font-size: .78rem; color: #22d3ee; font-weight: 700; }
.cert-title { font-family: var(--font-d); font-size: clamp(1.8rem, 4vw, 2.9rem); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0; }
.cert-sub { color: #9aa5cf; margin: 0; }
.cert-name { font-family: var(--font-d); font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 700; border-bottom: 2px solid rgba(255, 255, 255, .3); padding: 0 1.5rem .2rem; margin: .3rem 0; }
.cert-text { max-width: 60ch; color: #cdd6f6; font-size: .95rem; margin: 0; }
.cert-meta { display: flex; gap: 1.6rem; flex-wrap: wrap; justify-content: center; font-size: .82rem; color: #9aa5cf; margin-top: .6rem; }
.cert-meta b { display: block; color: #fff; font-size: 1rem; }
.cert-brand { position: absolute; bottom: .9rem; font-size: .7rem; letter-spacing: .2em; color: #6e7aa6; text-transform: uppercase; }

/* ---------- 11. RESPONSIF ---------- */
@media (max-width: 1100px) {
  .sim { grid-template-columns: 1fr; }
  .sim-right { position: static; max-height: none; overflow: visible; order: -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pr-wrap { grid-template-columns: minmax(0, 1fr); }
  .pr-nav { position: static; order: -1; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-102%); box-shadow: var(--shadow); width: min(86vw, 310px); }
  body.side-open .sidebar { transform: none; }
  body.side-open .scrim { opacity: 1; pointer-events: auto; }
  .content { margin-left: 0; }
  #btn-menu { display: inline-grid; }
  .hero, .apers, .two-col, .viz-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .map-branches { grid-template-columns: 1fr; }
  .map-branches::before, .map-card::before { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .stat { padding: .7rem; gap: .6rem; } .stat-ic { width: 38px; height: 38px; } .stat-v { font-size: 1.25rem; }
  .hide-sm { display: none; }
  .chip-tag { padding: .28rem .55rem; font-size: .76rem; }
  .page-title { font-size: .98rem; }
  .page-head { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .mat-head { flex-direction: column; align-items: flex-start; }
  .mat-no { width: 56px; height: 56px; font-size: 1.5rem; border-radius: 18px; }
  .wi-grid, .opts.tf { grid-template-columns: 1fr; }
  .ineq-inputs { grid-template-columns: repeat(2, 1fr); }
  .tab span { display: none; } .tab.active span { display: inline; }
  .tab-nav .btn { flex: 1; }
  .ev-bar { flex-wrap: wrap; top: 56px; }
  .eval-hero { justify-content: center; text-align: center; }
  .topic-row { grid-template-columns: 1fr 44px; } .topic-row .bar { grid-column: 1 / -1; order: 3; }
  .toasts { left: 1rem; right: 1rem; align-items: stretch; }
  .modal { padding: 1.1rem; }
  .cert { min-width: 560px; }
}

/* ---------- 12. AKSESIBILITAS, GERAK, CETAK ---------- */
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.btn:focus-visible, .tab:focus-visible, .opt:focus-visible { outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; }
@media print {
  body.printing-cert > *:not(.app), body.printing-cert .bg-fx, body.printing-cert .sidebar, body.printing-cert .topbar, body.printing-cert .foot, body.printing-cert .scrim, body.printing-cert .toasts { display: none !important; }
  body.printing-cert .content { margin: 0 !important; }
  body.printing-cert main > *:not(.cert-wrap) { display: none !important; }
  body.printing-cert main { padding: 0; max-width: none; opacity: 1; transform: none; }
  body.printing-cert .cert-wrap { overflow: visible; }
  body.printing-cert .cert { width: 100%; min-width: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4 landscape; margin: 8mm; }
}

/* Tambahan kecil */
[hidden] { display: none !important; }
.hero-l { min-width: 0; }
.xp-l { white-space: nowrap; } .xp-r { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ring-cap { font-size: .84rem; color: var(--muted); }
.acc { padding: .4rem; }
.acc-body { padding: 0 1rem 1rem; }
.tp { border-left: 4px solid var(--accent); }
.tp.is-done { border-left-color: var(--ok); }
.tp-top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.tp-top .mcard-no { width: auto; padding: 0 .8rem; font-size: .9rem; }
.tp-t { font-weight: 600; font-size: 1.02rem; }
.pem-item { padding: .9rem 1rem; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); margin-bottom: .7rem; }
.pem-a { margin-top: .7rem; padding: .7rem .9rem; border-radius: 10px; background: rgba(52, 211, 153, .1); border-left: 4px solid var(--ok); }
.prereq-sum:empty { display: none; }
.prereq-sum { margin-top: 1rem; }
.wz-html { margin: .5rem 0; }
.essay-slot:empty, .fb-slot:empty { display: none; }
.stats:has(> :nth-child(6)) { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .stats:has(> :nth-child(6)) { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .graph-tools { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 16px); top: 6px; right: 6px; }
  .gt { width: 28px; height: 28px; }
  #chip-level { display: none; }
  .sim-right { order: -1; }
}

@media (max-width: 640px) { .tbl { display: block; overflow-x: auto; max-width: 100%; } .tbl tr { display: table-row; } .locked-box { flex-direction: column; align-items: flex-start; } }
.locked-box > div { min-width: 0; flex: 1; }
.checklist .m-chk { width: 24px; height: 24px; }
.checklist li.done .m-chk { background: var(--ok); border-color: var(--ok); color: #fff; }
.m-chk .ic { width: 14px; height: 14px; }
.badge > div:not(.badge-ic) { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.badge b, .badge small { display: block; }
.badge.big .pill { margin-top: .3rem; }
