:root {
  --latar: #0E1110;
  --latar-tengah: #14231B;
  --latar-tepi: #090B0A;
  --panel: #171C1A;
  --panel-2: #1F2623;
  --garis: #2A332F;
  --garis-terang: #36413C;
  --putih: #F4F7F5;
  --abu: #9AA59F;
  --hijau: #3BE477;
  --hijau-muda: #8DF2B0;
  --hijau-redup: rgba(59, 228, 119, 0.12);
  --merah: #FF5A5F;
  --radius: 16px;
  --judul: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --isi: "Inter", "Segoe UI", system-ui, sans-serif;
  --tinggi-nav-bawah: 64px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--latar-tepi); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--putih);
  font: 500 15px/1.6 var(--isi);
  background:
    linear-gradient(rgba(59, 228, 119, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(59, 228, 119, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(ellipse 90% 60% at 50% -10%, var(--latar-tengah) 0%, var(--latar) 60%, var(--latar-tepi) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body.ada-nav { padding-bottom: calc(var(--tinggi-nav-bawah) + env(safe-area-inset-bottom, 0px)); }

h1, h2, h3 { font-family: var(--judul); font-weight: 800; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.015em; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
p { margin: 0 0 12px; }
a { color: var(--hijau); }
.redup { color: var(--abu); }
.hijau { color: var(--hijau); }
.label-kecil { font: 700 11px/1.3 var(--isi); letter-spacing: 0.14em; color: var(--hijau-muda); margin: 0 0 8px; text-transform: uppercase; }
.lebar-baca { max-width: 640px; }
.judul-bagian { margin: 30px 0 14px; font-size: 19px; }

.atas {
  position: sticky; top: 0; z-index: 30;
  background: rgba(9, 11, 10, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--garis);
  padding-top: env(safe-area-inset-top, 0px);
}
.atas-isi { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 11px 16px; }
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; margin-right: auto; }
.logo-kotak {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--hijau); color: var(--latar); font: 900 16px/1 var(--judul);
  box-shadow: 0 0 22px rgba(59, 228, 119, 0.35);
}
.logo-teks { display: flex; flex-direction: column; min-width: 0; }
.logo-kecil { font: 700 9.5px/1.2 var(--isi); letter-spacing: 0.16em; color: var(--hijau-muda); }
.logo-judul { font: 800 14px/1.3 var(--judul); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-atas { display: none; gap: 4px; }
.nav-atas a { padding: 8px 14px; border-radius: 10px; color: var(--abu); text-decoration: none; font-weight: 700; font-size: 14px; }
.nav-atas a:hover { color: var(--putih); background: var(--panel); }
.nav-atas a.aktif { color: var(--putih); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--hijau); }

main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 16px 40px; }

.kartu { background: linear-gradient(180deg, var(--panel) 0%, #141917 100%); border: 1px solid var(--garis); border-radius: var(--radius); padding: 18px; }

.tombol {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: 700 15px/1 var(--isi); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tombol:active { transform: scale(0.98); }
.tombol:disabled { opacity: 0.55; cursor: not-allowed; }
.tombol-utama { background: var(--hijau); color: var(--latar); box-shadow: 0 6px 24px rgba(59, 228, 119, 0.25); }
.tombol-utama:hover:not(:disabled) { background: #5aee8f; }
.tombol-garis { background: var(--panel-2); color: var(--putih); border-color: var(--garis-terang); }
.tombol-garis:hover { border-color: var(--hijau); }
.tombol-hantu { background: transparent; color: var(--putih); border-color: var(--garis); }
.tombol-hantu:hover { border-color: var(--hijau); color: var(--hijau); }
.tombol-kecil { min-height: 38px; padding: 0 14px; font-size: 14px; }
.tombol-penuh { width: 100%; }
.tombol-selesai { background: var(--hijau-redup); color: var(--hijau); border-color: rgba(59, 228, 119, 0.5); box-shadow: none; }
:focus-visible { outline: 2px solid var(--hijau); outline-offset: 2px; }

.muat { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 90px 0; color: var(--abu); }
.pemutar { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--garis-terang); border-top-color: var(--hijau); animation: putar 0.8s linear infinite; }
@keyframes putar { to { transform: rotate(360deg); } }

.login { display: grid; gap: 22px; align-items: center; min-height: calc(100vh - 140px); }
.judul-besar { font-size: 32px; font-weight: 900; line-height: 1.1; letter-spacing: -0.025em; }
.login-lead { font-size: 15.5px; max-width: 520px; }
.poin { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.poin li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.poin-ikon {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--hijau-redup); border: 1px solid rgba(59, 228, 119, 0.35); color: var(--hijau); font: 800 14px/1 var(--judul);
}
.login-kartu { padding: 24px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(59, 228, 119, 0.06); }
.login-kartu h2 { font-size: 22px; }
.label-isian { display: block; font-weight: 700; font-size: 13px; margin: 6px 0 6px; }
input[type="email"] {
  width: 100%; min-height: 52px; padding: 0 15px; margin-bottom: 12px;
  border-radius: 12px; border: 1px solid var(--garis-terang); background: var(--latar-tepi); color: var(--putih);
  font: 500 16px var(--isi);
}
input[type="email"]::placeholder { color: #66716b; }
input[type="email"]:focus { border-color: var(--hijau); outline: none; box-shadow: 0 0 0 3px rgba(59, 228, 119, 0.18); }
.catatan { margin: 16px 0 0; font-size: 13px; color: var(--abu); }
.pesan { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; border: 1px solid; line-height: 1.5; }
.pesan-salah { background: rgba(255, 90, 95, 0.1); border-color: rgba(255, 90, 95, 0.45); color: #ffc7c9; }
.pesan-info { background: var(--hijau-redup); border-color: rgba(59, 228, 119, 0.4); color: var(--hijau-muda); }

.beranda-atas { display: grid; gap: 14px; }
.sambut { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; }
.sambut h1 { font-size: 24px; margin-bottom: 6px; }
.sambut p:last-child { margin: 0; font-size: 14px; }
.cincin { position: relative; flex: none; width: 96px; height: 96px; }
.cincin svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cincin circle { fill: none; stroke-width: 10; }
.cincin-alas { stroke: var(--latar-tepi); }
.cincin-isi { stroke: var(--hijau); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset 0.6s ease; filter: drop-shadow(0 0 6px rgba(59, 228, 119, 0.5)); }
.cincin-angka { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.cincin-angka strong { font: 900 22px/1 var(--judul); }
.cincin-angka small { font-size: 11px; color: var(--abu); margin-top: 3px; }

.lanjut { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 12px; color: inherit; text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.lanjut:hover { border-color: var(--hijau); }
.lanjut-gambar { position: relative; display: block; width: 132px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--latar-tepi); border: 1px solid var(--garis); }
.lanjut:has(.lanjut-gambar[hidden]) { grid-template-columns: 1fr; }
.lanjut-gambar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lanjut-putar { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; font-size: 15px; color: var(--latar); text-indent: 3px; }
.lanjut-putar::before { content: ""; position: absolute; z-index: -1; width: 40px; height: 40px; border-radius: 50%; background: var(--hijau); box-shadow: 0 0 20px rgba(59, 228, 119, 0.6); }
.lanjut-teks { display: flex; flex-direction: column; min-width: 0; }
.lanjut-teks .label-kecil { margin-bottom: 4px; }
.lanjut-judul { font: 800 15.5px/1.3 var(--judul); margin-bottom: 4px; }
.lanjut-teks .redup { font-size: 13px; }

.tahap { margin-bottom: 18px; }
.tahap-kepala { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.tahap-nomor { flex: none; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--garis-terang); font: 800 13px/1 var(--judul); color: var(--hijau-muda); }
.tahap-nama { flex: 1; min-width: 0; }
.tahap-nama h3 { font-size: 15.5px; margin: 0 0 5px; }
.tahap-batang { height: 4px; border-radius: 99px; background: var(--latar-tepi); overflow: hidden; }
.tahap-batang span { display: block; height: 100%; background: var(--hijau); border-radius: 99px; }
.tahap-angka { font-size: 12.5px; color: var(--abu); white-space: nowrap; }
.daftar-isi { display: grid; gap: 8px; }

.item {
  display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px;
  width: 100%; padding: 11px 12px; text-align: left; color: inherit; text-decoration: none;
  background: var(--panel); border: 1px solid var(--garis); border-radius: 13px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
a.item:hover { border-color: var(--hijau); background: var(--panel-2); }
.item-kode {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 11px;
  background: var(--panel-2); border: 1px solid var(--garis); font: 800 14px/1 var(--judul); color: var(--hijau-muda);
}
.item-teks { min-width: 0; }
.item-judul { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--abu); margin-top: 3px; }
.lencana { display: inline-block; padding: 2px 8px; border-radius: 99px; font: 700 10.5px/1.5 var(--isi); letter-spacing: 0.05em; text-transform: uppercase; }
.lencana-segera { background: var(--panel-2); color: var(--abu); border: 1px solid var(--garis-terang); }
.lencana-baru { background: var(--hijau-redup); color: var(--hijau); border: 1px solid rgba(59, 228, 119, 0.35); }
.item-tanda {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--garis-terang); font: 900 13px/1 var(--isi); color: transparent;
}
.item.selesai .item-tanda { background: var(--hijau); border-color: var(--hijau); color: var(--latar); }
.item.selesai .item-kode { background: var(--hijau-redup); border-color: rgba(59, 228, 119, 0.4); }
.item.segera { background: rgba(23, 28, 26, 0.6); }
.item.segera .item-kode { color: var(--abu); }
.item.segera .item-judul { color: #c9d1cc; }
.item.segera .item-tanda { border-style: dashed; }
.item.aktif { border-color: var(--hijau); box-shadow: inset 3px 0 0 var(--hijau); }

.pelajaran { display: grid; gap: 24px; }
.kembali { display: inline-block; margin-bottom: 12px; font-weight: 700; font-size: 14px; text-decoration: none; }
.bingkai-video {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--garis);
  box-shadow: 0 0 0 1px rgba(59, 228, 119, 0.12), 0 18px 50px rgba(0, 0, 0, 0.55);
  margin-bottom: 18px;
}
.bingkai-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-segera {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center;
  background:
    linear-gradient(rgba(59, 228, 119, 0.06) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, rgba(59, 228, 119, 0.06) 1px, transparent 1px) 0 0 / 26px 26px,
    radial-gradient(circle at 50% 40%, #183022, #0b0e0d 70%);
}
.video-segera strong { font: 800 18px/1.3 var(--judul); }
.video-segera span { color: var(--abu); font-size: 14px; max-width: 360px; }
.pelajaran h1 { font-size: 23px; }
.pel-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 16px; font-size: 14px; color: var(--abu); }
.pil { display: inline-block; padding: 4px 11px; border-radius: 99px; background: var(--hijau); color: var(--latar); font: 800 12px/1.3 var(--isi); letter-spacing: 0.03em; }
.meta-item.ok { color: var(--hijau); font-weight: 700; }
.aksi { display: grid; gap: 10px; margin: 0 0 18px; }
.aksi .tombol { width: 100%; }
.pel-kartu-kartu { display: grid; gap: 12px; }
.blok { padding: 18px; }
.blok h2 { font-size: 16px; margin-bottom: 10px; }
.blok p:last-child { margin-bottom: 0; }
.blok-tujuan { border-color: rgba(59, 228, 119, 0.35); background: linear-gradient(180deg, rgba(59, 228, 119, 0.08), rgba(23, 28, 26, 0.9)); }
.blok-tujuan p { font-weight: 600; }
.daftar-bab { margin: 0; padding: 0; list-style: none; counter-reset: bab; display: grid; gap: 2px; }
.daftar-bab li { counter-increment: bab; display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--garis); font-size: 14.5px; }
.daftar-bab li:last-child { border-bottom: 0; }
.daftar-bab li::before { content: counter(bab, decimal-leading-zero); flex: none; font: 800 12px/1.9 var(--judul); color: var(--hijau-muda); }
.daftar-tugas { margin: 0; padding: 0; list-style: none; counter-reset: tugas; display: grid; gap: 10px; }
.daftar-tugas li { counter-increment: tugas; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; }
.daftar-tugas li::before {
  content: counter(tugas); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: var(--hijau-redup); border: 1px solid rgba(59, 228, 119, 0.4); color: var(--hijau); font: 800 12px/1 var(--judul);
}
.blok-pdf { margin-bottom: 12px; }
.pdf-kepala { display: grid; gap: 12px; margin-bottom: 12px; }
.pdf-kepala p { margin: 0; font-size: 14px; }
.pdf-tombol { display: flex; gap: 8px; flex-wrap: wrap; }
.pdf-tombol .tombol { flex: 1 1 auto; }
.pdf-bingkai { position: relative; display: none; height: 72vh; min-height: 480px; border-radius: 12px; overflow: hidden; border: 1px solid var(--garis); background: #2a2a2e; }
.pdf-bingkai iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cap-air { position: absolute; inset: 0; pointer-events: none; overflow: hidden; display: grid; grid-template-columns: repeat(2, 1fr); align-content: space-around; justify-items: center; }
.cap-air span { transform: rotate(-24deg); font: 700 15px/1 var(--isi); color: rgba(14, 17, 16, 0.13); white-space: nowrap; padding: 40px 0; user-select: none; }
.blok-pdf .catatan { margin-top: 10px; }
.geser { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--garis); padding-top: 16px; margin-top: 20px; }
#tautan-berikut-2 { margin-left: auto; }
.samping-kepala { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 13px; }
.daftar.daftar-ringkas .daftar-isi { grid-template-columns: 1fr; gap: 6px; }
.daftar-ringkas .tahap { margin-bottom: 14px; }
.daftar-ringkas .tahap-kepala { margin-bottom: 8px; }
.daftar-ringkas .tahap-nomor { min-width: 28px; height: 28px; font-size: 11.5px; }
.daftar-ringkas .tahap-nama h3 { font-size: 13.5px; }
.daftar-ringkas .item { grid-template-columns: 36px 1fr auto; padding: 8px 10px; gap: 10px; border-radius: 11px; }
.daftar-ringkas .item-kode { width: 36px; height: 36px; font-size: 12px; border-radius: 9px; }
.daftar-ringkas .item-judul { font-size: 13.5px; }
.daftar-ringkas .item-tanda { width: 22px; height: 22px; font-size: 11px; }

.starter { display: grid; gap: 14px; margin-top: 18px; padding: 20px; border-color: rgba(59, 228, 119, 0.35); background: linear-gradient(135deg, rgba(59, 228, 119, 0.1), rgba(23, 28, 26, 0.95) 55%); }
.starter h2 { font-size: 20px; margin-bottom: 6px; }
.starter ul { margin: 0; padding-left: 18px; color: var(--abu); font-size: 14px; display: grid; gap: 4px; }
.berkas { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--garis); border-radius: 13px; }
.berkas-judul { font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.berkas-meta { display: block; font-size: 12.5px; color: var(--abu); margin-top: 2px; }

.faq { display: grid; gap: 8px; margin: 18px 0 22px; }
.faq details { background: var(--panel); border: 1px solid var(--garis); border-radius: 13px; padding: 0 16px; }
.faq details[open] { border-color: var(--garis-terang); }
.faq summary { cursor: pointer; list-style: none; padding: 15px 28px 15px 0; font-weight: 700; font-size: 15px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 800 20px/1 var(--judul); color: var(--hijau); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: #c9d1cc; font-size: 14.5px; padding-bottom: 14px; margin: 0; }
.kontak { display: grid; gap: 4px; }
.kontak .tombol { justify-self: start; margin-top: 6px; }

.nav-bawah {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tinggi-nav-bawah) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(9, 11, 10, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--garis);
}
.nav-bawah a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--abu); text-decoration: none; font-size: 11.5px; font-weight: 700; }
.nav-bawah svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-bawah a.aktif { color: var(--hijau); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tinggi-nav-bawah) + 14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--hijau); color: var(--putih); font-size: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55); z-index: 40;
}

@media (min-width: 560px) {
  .aksi { display: flex; flex-wrap: wrap; }
  .aksi .tombol { width: auto; }
}

@media (min-width: 760px) {
  main { padding: 30px 24px 60px; }
  h1 { font-size: 30px; }
  .judul-besar { font-size: 44px; }
  .beranda-atas { grid-template-columns: 1.1fr 1fr; align-items: stretch; }
  .sambut { padding: 24px; }
  .sambut h1 { font-size: 28px; }
  .cincin { width: 112px; height: 112px; }
  .lanjut { padding: 14px; }
  .lanjut-gambar { width: 180px; }
  .starter { grid-template-columns: 1fr auto; align-items: center; padding: 26px; }
  .daftar .daftar-isi { grid-template-columns: 1fr 1fr; }
  .pel-kartu-kartu { grid-template-columns: 1fr 1fr; }
  .pdf-kepala { grid-template-columns: 1fr auto; align-items: center; }
  .pdf-tombol .tombol { flex: 0 0 auto; }
  .pdf-bingkai { display: block; }
  #blok-ringkasan { grid-column: 1 / -1; }
}

@media (min-width: 1000px) {
  body.ada-nav { padding-bottom: 0; }
  .nav-bawah { display: none; }
  .nav-atas { display: flex; }
  .toast { bottom: 24px; }
  .login { grid-template-columns: 1.15fr 420px; gap: 56px; padding: 20px 8px; }
  .login-kartu { padding: 30px 28px; }
  .pelajaran { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 28px; }
  .pelajaran-samping { position: sticky; top: 86px; max-height: calc(100vh - 104px); overflow-y: auto; padding: 16px; background: rgba(17, 21, 19, 0.85); border: 1px solid var(--garis); border-radius: var(--radius); }
  .pelajaran h1 { font-size: 28px; }
  .daftar .daftar-isi { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 999px) {
  .pelajaran-samping { display: none; }
  .login { align-items: start; min-height: 0; }
  .login-kartu { order: -1; }
  .login-hero .judul-besar { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
