/* KAFA Pintar — gaya utama */
:root {
  --bg: #fffaf2;
  --surface: #ffffff;
  --surface-2: #f6f1e7;
  --ink: #1d2b3a;
  --ink-2: #4b5b6b;
  --ink-3: #7b8794;
  --line: #ece4d6;
  --green: #0e9f6e;
  --green-d: #087a54;
  --green-l: #e3f6ee;
  --orange: #f08a24;
  --orange-l: #fff0df;
  --gold: #f6b93b;
  --blue: #2d7ff9;
  --blue-l: #e7f0ff;
  --purple: #8b5cf6;
  --purple-l: #f1ebff;
  --red: #e5484d;
  --red-l: #fdecec;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(29, 43, 58, .06), 0 8px 24px rgba(29, 43, 58, .07);
  --shadow-lg: 0 20px 50px rgba(29, 43, 58, .14);
  --font: 'Nunito', 'Noto Naskh Arabic', system-ui, -apple-system, sans-serif;
  --display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --arab: 'Amiri', 'Noto Naskh Arabic', serif;
  --jawi: 'Noto Naskh Arabic', 'Amiri', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--green-d); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.center { text-align: center; }
.arab { font-family: var(--arab); direction: rtl; font-size: 1.6rem; line-height: 2.2; }
.jawi { font-family: var(--jawi); direction: rtl; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

/* ───── Butang ───── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: 800 1rem var(--font); padding: 12px 22px; border-radius: 999px; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-d); }
.btn-primary:hover { background: #0cb17a; }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 4px 0 #c96d12; }
.btn-orange:hover { background: #f79a3c; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-d); }
.btn-danger { background: var(--red-l); color: var(--red); }
.btn-lg { padding: 16px 30px; font-size: 1.1rem; }
.btn-sm { padding: 8px 14px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ───── Navigasi ───── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 250, 242, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .container { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.35rem var(--display); }
.brand-mark { width: 40px; height: 40px; display: block; border-radius: 10px; box-shadow: 0 3px 0 var(--green-d); }
.brand small { display: block; font: 600 .7rem var(--font); color: var(--ink-3); margin-top: -4px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 10px; }
.nav-links a:not(.btn):hover, .nav-links a.active { background: var(--surface-2); color: var(--ink); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; font-size: 1.6rem; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
}

/* ───── Kad & panel ───── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-flat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.page { padding: 32px 0 80px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800; background: var(--surface-2); color: var(--ink-2); }
.pill-green { background: var(--green-l); color: var(--green-d); }
.pill-orange { background: var(--orange-l); color: #b8620f; }
.pill-red { background: var(--red-l); color: var(--red); }
.pill-blue { background: var(--blue-l); color: var(--blue); }
.alert { padding: 14px 18px; border-radius: 14px; margin-bottom: 20px; font-weight: 700; }
.alert-success { background: var(--green-l); color: var(--green-d); }
.alert-error { background: var(--red-l); color: var(--red); }

/* ───── Borang ───── */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; font-size: .92rem; }
.input, select.input { width: 100%; padding: 13px 16px; border: 2px solid var(--line); border-radius: 14px; font: 600 1rem var(--font); background: #fff; color: var(--ink); transition: border-color .15s; }
.input:focus { outline: none; border-color: var(--green); }
.error-text { color: var(--red); font-size: .85rem; font-weight: 700; margin-top: 4px; }
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 460px; }

/* ───── Statistik ───── */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat .label { font-size: .82rem; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font: 800 1.9rem var(--display); margin-top: 2px; }
.stat .sub { font-size: .85rem; color: var(--ink-3); }

/* ───── Bar & progres ───── */
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #34d399); border-radius: 999px; transition: width .6s ease; }
.bar.orange > span { background: linear-gradient(90deg, var(--orange), var(--gold)); }
.bar.red > span { background: var(--red); }
.stars { color: var(--gold); letter-spacing: 2px; }
.stars .off { color: #e2dccf; }

/* ───── Jadual ───── */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 10px 12px; border-bottom: 2px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

/* ───── Carta mini ───── */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.chart .col i { display: block; width: 100%; max-width: 26px; background: var(--green); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.chart .col small { font-size: .62rem; color: var(--ink-3); white-space: nowrap; }
.chart.orange .col i { background: var(--orange); }
.chart.blue .col i { background: var(--blue); }

/* ═════════════ LANDING PAGE ═════════════ */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; background: radial-gradient(1200px 500px at 80% -10%, #d9f5e8 0%, transparent 60%), radial-gradient(800px 400px at -10% 110%, #ffe6cc 0%, transparent 60%); }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.7rem); }
.hero h1 .hl { color: var(--green); position: relative; white-space: nowrap; }
.hero h1 .hl::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 12px; background: var(--gold); opacity: .35; border-radius: 6px; z-index: -1; }
.hero .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 560px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 18px; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 700; color: var(--ink-2); font-size: .95rem; }
.hero-trust span::before { content: '✓ '; color: var(--green); font-weight: 900; }
.hero-visual { position: relative; }
.phone { background: #1d2b3a; border-radius: 36px; padding: 12px; box-shadow: var(--shadow-lg); max-width: 360px; margin: 0 auto; transform: rotate(2deg); }
.phone-screen { background: var(--bg); border-radius: 26px; padding: 18px; min-height: 480px; }
.float-chip { position: absolute; background: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-lg); font-weight: 800; font-size: .9rem; display: flex; align-items: center; gap: 8px; animation: bob 4s ease-in-out infinite; }
.float-chip.a { top: 30px; left: -10px; } .float-chip.b { bottom: 70px; right: -14px; animation-delay: 1.5s; } .float-chip.c { bottom: 10px; left: 10px; animation-delay: .8s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } .float-chip.a { left: 0; } .float-chip.b { right: 0; } }

.section { padding: 80px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--ink-2); font-size: 1.1rem; }
.eyebrow { display: inline-block; font-weight: 900; color: var(--orange); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; margin-bottom: 10px; }

.pain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pain .card { text-align: center; }
.pain .emoji { font-size: 2.6rem; }
@media (max-width: 760px) { .pain { grid-template-columns: 1fr; } }

.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .ic { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; }
.feature h3 { font-size: 1.2rem; margin-bottom: 4px; }
.feature p { color: var(--ink-2); margin: 0; }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; padding-top: 30px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -18px; left: 24px; width: 44px; height: 44px; border-radius: 50%; background: var(--orange); color: #fff; font: 800 1.3rem var(--display); display: grid; place-items: center; box-shadow: 0 4px 0 #c96d12; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 36px; } }

.demo-box { max-width: 680px; margin: 0 auto; }
.syllabus { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.syllabus .yr { text-align: center; padding: 18px 8px; border-radius: 16px; background: #fff; border: 2px solid var(--line); }
.syllabus .yr.ready { border-color: var(--green); background: var(--green-l); }
.syllabus .yr b { font: 800 1.6rem var(--display); display: block; }
@media (max-width: 760px) { .syllabus { grid-template-columns: repeat(3, 1fr); } }

.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 24px; justify-content: center; }
.price-card { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 24px; padding: 32px; text-align: center; }
.price-card.best { border-color: var(--green); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.price-card .ribbon { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--orange); color: #fff; font-weight: 900; font-size: .8rem; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.price { font: 800 3.4rem var(--display); line-height: 1; margin: 12px 0 4px; }
.price small { font-size: 1rem; color: var(--ink-3); font-family: var(--font); }
.price-card ul { list-style: none; padding: 0; margin: 20px 0 24px; text-align: left; }
.price-card li { padding: 7px 0 7px 28px; position: relative; }
.price-card li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 900; }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } .price-card.best { transform: none; } }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin-bottom: 12px; }
.faq summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 1.4rem; color: var(--green); line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); }

.cta-band { background: linear-gradient(135deg, var(--green) 0%, #11845c 100%); color: #fff; border-radius: 28px; padding: 48px; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.cta-band p { opacity: .92; font-size: 1.1rem; }
.cta-band .btn-orange { box-shadow: 0 4px 0 #b05c0a; }

.footer { padding: 40px 0 100px; color: var(--ink-3); font-size: .9rem; border-top: 1px solid var(--line); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: var(--green-d); }
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); }
.prose h2 { font-size: 1.25rem; margin-top: 1.6em; }
.prose h2:first-of-type { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); }
.policy-meta { font-size: .88rem; color: var(--ink-3); }
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: none; }
@media (max-width: 760px) { .sticky-cta { display: flex; } }

/* ═════════════ BELAJAR ═════════════ */
.kid-bar { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px 18px; box-shadow: var(--shadow); margin-bottom: 24px; flex-wrap: wrap; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--orange-l); display: grid; place-items: center; font-size: 1.8rem; flex: none; }
.kid-stats { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.kid-stat { background: var(--surface-2); border-radius: 12px; padding: 6px 12px; font-weight: 800; font-size: .92rem; }

.subject-card { display: block; text-decoration: none; color: inherit; border-radius: 22px; padding: 22px; background: #fff; border: 2px solid var(--line); transition: transform .15s, box-shadow .15s, border-color .15s; position: relative; overflow: hidden; }
.subject-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--c, var(--green)); }
.subject-card .big { font-size: 2.6rem; }
.subject-card .jawi-t { position: absolute; right: 18px; top: 14px; font-family: var(--jawi); font-size: 1.6rem; color: var(--c); opacity: .5; }
.subject-card.locked { opacity: .65; }
.year-block { margin-bottom: 36px; }
.year-block h2 { display: flex; align-items: center; gap: 12px; }

.lesson-path { display: grid; gap: 14px; }
.lesson-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: #fff; border: 2px solid var(--line); border-radius: 20px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.lesson-item:hover { border-color: var(--c, var(--green)); transform: translateX(3px); }
.lesson-item .num { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; font-size: 1.6rem; flex: none; }
.lesson-item.done .num { background: var(--green-l); }
.lesson-item.locked { opacity: .55; }
.lesson-item .jawi { font-size: 1.05rem; color: var(--ink-3); }

/* Tab pelajaran */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px; background: var(--surface-2); border-radius: 18px; margin-bottom: 24px; position: sticky; top: 76px; z-index: 20; }
.tab { flex: 1; border: 0; background: transparent; padding: 12px 14px; border-radius: 14px; font: 800 .95rem var(--font); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.tab .tick { color: var(--green); }

/* Nota */
.note-sec { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
.note-sec h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.note-sec ol, .note-sec ul { margin: 0; padding-left: 22px; }
.note-sec li { margin-bottom: 8px; }
.note-def { border-left: 6px solid var(--blue); background: linear-gradient(90deg, var(--blue-l), #fff 50%); }
.note-def p { font-size: 1.15rem; font-weight: 700; white-space: pre-line; }
.note-dalil { border: 2px solid #f3c6d2; background: #fff9fb; }
.note-dalil .arab { text-align: center; color: #3b1d2a; background: #fff; border-radius: 14px; padding: 12px 16px; border: 1px dashed #f3c6d2; white-space: pre-line; }
.note-dalil .ref { text-align: center; font-weight: 800; color: #b23a5e; margin: 8px 0; }
.note-dalil .maksud { font-style: italic; color: var(--ink-2); }
.note-bad { border-left: 6px solid var(--red); }
.note-good { border-left: 6px solid var(--green); }
.note-tahukah { background: var(--purple-l); border: 0; }
.note-amalkan { background: #fff6dc; border: 0; }
.note-quote { background: var(--orange); color: #fff; text-align: center; font: 700 1.3rem var(--display); white-space: pre-line; }
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.group { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; }
.group h4 { font-size: 1.05rem; }
.group ul { padding-left: 18px; font-size: .95rem; }
.story p { font-size: 1.05rem; }
.tip-box { background: linear-gradient(135deg, #fff1d6, #ffe4c2); border-radius: 20px; padding: 20px 22px; margin-bottom: 16px; }
.tip-box h3 { color: #a5520a; }
.tip-box li { margin-bottom: 6px; font-weight: 700; }
.hafaz-badge { font-size: .72rem; background: #b23a5e; color: #fff; padding: 2px 8px; border-radius: 999px; }

/* Kosa kata & dialog (Bahasa Arab) */
.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.vocab { background: var(--blue-l); border-radius: 14px; padding: 12px 14px; text-align: center; border-bottom: 3px solid #c9dcff; }
.vocab-ar { font: 700 1.45rem/1.9 var(--arab); color: #0f2e66; }
.vocab-ms { font-weight: 800; font-size: .92rem; color: var(--ink-2); }
.dialog { display: grid; gap: 10px; }
.bubble { max-width: 88%; background: var(--green-l); border-radius: 18px 18px 18px 4px; padding: 10px 16px; justify-self: start; }
.bubble.alt { background: var(--orange-l); border-radius: 18px 18px 4px 18px; justify-self: end; }
.bubble .who { font-size: .75rem; font-weight: 900; color: var(--ink-3); text-transform: uppercase; }
.bubble-ar { font: 700 1.3rem/1.9 var(--arab); }
.bubble-ms { font-size: .92rem; color: var(--ink-2); font-weight: 600; }
.opt span, .q-text, .tile { unicode-bidi: plaintext; }

/* Kad imbas */
.flash-wrap { perspective: 1200px; max-width: 560px; margin: 0 auto; }
.flash { position: relative; height: 320px; cursor: pointer; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3, 1.4, .5, 1); }
.flash.flipped { transform: rotateY(180deg); }
.flash-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 26px; padding: 28px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; box-shadow: var(--shadow-lg); overflow: auto; }
.flash-front { background: linear-gradient(135deg, var(--c, var(--green)), #1d2b3a 160%); color: #fff; }
.flash-front .q { font: 800 1.5rem var(--display); }
.flash-back { background: #fff; transform: rotateY(180deg); border: 3px solid var(--c, var(--green)); align-items: stretch; text-align: left; justify-content: flex-start; }
.flash-back ul, .flash-back ol { margin: 0; padding-left: 20px; }
.flash-nav { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Kuiz */
.quiz-card { max-width: 680px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.quiz-top .bar { flex: 1; height: 14px; }
.q-text { font: 800 1.35rem var(--display); margin: 8px 0 20px; }
.q-type { font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--orange); }
.options { display: grid; gap: 12px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 16px 18px; border: 2px solid var(--line); border-bottom-width: 4px; background: #fff; border-radius: 16px; font: 700 1.05rem var(--font); color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s, transform .1s; }
.opt:hover:not([disabled]) { border-color: var(--blue); background: var(--blue-l); }
.opt .key { flex: none; width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--line); display: grid; place-items: center; font-size: .9rem; color: var(--ink-3); }
.opt.correct { border-color: var(--green); background: var(--green-l); }
.opt.correct .key { background: var(--green); color: #fff; border-color: var(--green); }
.opt.wrong { border-color: var(--red); background: var(--red-l); animation: shake .35s; }
.opt.wrong .key { background: var(--red); color: #fff; border-color: var(--red); }
.opt[disabled] { cursor: default; }
.tf-opts { grid-template-columns: 1fr 1fr; }
.tf-opts .opt { justify-content: center; font-size: 1.2rem; padding: 22px; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.opt.selected { border-color: var(--blue); background: var(--blue-l); }
.opt.selected .key { background: var(--blue); color: #fff; border-color: var(--blue); }
.qnav { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 16px; }
.qdot { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: 800 .85rem var(--font); color: var(--ink-3); cursor: pointer; padding: 0; }
.qdot.done { background: var(--blue-l); border-color: var(--blue); color: var(--blue); }
.qdot.current { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; }
.quiz-nav .btn[disabled] { opacity: .45; cursor: default; }
.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(20, 30, 40, .55); display: flex; align-items: center; justify-content: center; padding: 16px; animation: modalFade .15s; }
.modal-card { background: var(--bg); border-radius: 22px; width: 100%; min-width: 0; max-width: 640px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); animation: modalPop .2s; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); font: 800 1.1rem var(--display); }
.modal-close { width: 38px; height: 38px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-size: 1rem; cursor: pointer; color: var(--ink-2); flex: none; }
.modal-close:hover { border-color: var(--ink-3); }
.modal-body { padding: 16px 20px; overflow-y: auto; text-align: left; }
.modal-body .note-sec { margin-bottom: 0; }
.modal-foot { padding: 12px 20px 18px; border-top: 1px solid var(--line); }
@keyframes modalFade { from { opacity: 0; } }
@keyframes modalPop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (max-width: 560px) { .modal-backdrop { align-items: flex-end; padding: 0; } .modal-card { border-radius: 22px 22px 0 0; max-height: 88vh; } }
.review-list { display: grid; gap: 10px; text-align: left; }
.review-item { border: 2px solid var(--line); border-left-width: 6px; border-radius: 14px; padding: 12px 14px; background: #fff; }
.review-item.ok { border-left-color: var(--green); }
.review-item.no { border-left-color: var(--red); background: #fffafa; }
.review-head { font-weight: 700; margin-bottom: 4px; }
.review-mark { margin-right: 4px; }
.q-inline { unicode-bidi: plaintext; }
.feedback { margin-top: 18px; padding: 16px 18px; border-radius: 16px; font-weight: 700; display: flex; gap: 12px; align-items: flex-start; }
.feedback.ok { background: var(--green-l); color: var(--green-d); }
.feedback.no { background: var(--red-l); color: #a52a2e; }
.feedback .big { font-size: 1.8rem; line-height: 1; }
.result { text-align: center; padding: 20px 0; }
.result .grade { font: 800 6rem var(--display); line-height: 1; }
.result .stars-big { font-size: 3rem; letter-spacing: 6px; }
.timer { font: 800 1rem var(--display); background: var(--surface-2); padding: 6px 12px; border-radius: 10px; }

/* Padankan */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 760px; margin: 0 auto; }
.match-col { display: grid; gap: 10px; align-content: start; }
.tile { padding: 14px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: #fff; font: 700 .98rem var(--font); cursor: pointer; text-align: center; min-height: 58px; color: var(--ink); transition: all .15s; }
.tile:hover { border-color: var(--blue); }
.tile.sel { border-color: var(--blue); background: var(--blue-l); }
.tile.done { border-color: var(--green); background: var(--green-l); color: var(--green-d); pointer-events: none; opacity: .75; }
.tile.bad { border-color: var(--red); background: var(--red-l); animation: shake .35s; }

/* Konfeti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 800; z-index: 210; box-shadow: var(--shadow-lg); animation: pop .3s; }
@keyframes pop { from { transform: translate(-50%, 20px); opacity: 0; } }

/* Admin */
.admin-nav { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-nav a { padding: 9px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 800; }
.admin-nav a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .9rem; }

/* Bayaran demo */
.gateway { max-width: 480px; margin: 40px auto; }
.gateway-head { background: #1d2b3a; color: #fff; padding: 18px 24px; border-radius: 20px 20px 0 0; display: flex; justify-content: space-between; align-items: center; }
.bank-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bank { border: 2px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; font-weight: 800; font-size: .8rem; cursor: pointer; background: #fff; }
.bank.sel { border-color: var(--blue); background: var(--blue-l); }

/* Pilih tahun langganan */
.year-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.year-opt { position: relative; }
.year-opt input { position: absolute; opacity: 0; }
.year-opt label { display: block; text-align: center; padding: 18px 10px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; cursor: pointer; background: #fff; font-weight: 800; }
.year-opt label b { display: block; font: 800 1.8rem var(--display); }
.year-opt input:checked + label { border-color: var(--green); background: var(--green-l); }
.year-opt.owned label { opacity: .7; }
@media (max-width: 520px) { .year-pick { grid-template-columns: repeat(2, 1fr); } }

@media print { .nav, .footer, .btn, .tabs { display: none !important; } body { background: #fff; } }
