/* =====================================================================
   Playwright Academy: design tokens & komponen
   Satu aksen (hijau), satu identitas dengan playground. Font Geist + Geist Mono
   dan ikon Phosphor disimpan lokal di /playground/assets (tanpa request ke luar).
   Aturan sudut: pill untuk tombol, navigasi, dan chip; 12px untuk input;
   20px untuk kartu dan panel (24px untuk panel besar).
   Kaca hanya untuk navigasi atas, hero, dan ringkasan. Daftar tetap polos.
   ===================================================================== */
@import url("../playground/assets/fonts.659a7ba3b8.css");
@import url("../playground/assets/icons.32d4bf4041.css");
:root {
  /* Warna (terang) */
  --bg: #f5f6f3;
  --surface: #fcfcfa;
  --surface-2: #eef0eb;
  --ink: #1b1f24;
  --ink-2: #3a4049;
  --muted: #5a616d;
  --line: #dde0d8;
  --line-strong: #c9cdc3;
  --brand: #18794e;
  --brand-strong: #11603d;
  --brand-soft: #e2f0e8;
  --on-brand: #fcfcfa;
  --warn-ink: #7a4d00;
  --warn-soft: #faf0d9;
  --danger-ink: #a3261c;
  --danger-soft: #fae8e5;
  --focus: #18794e;
  --glass-fill: rgb(255 255 255 / .72);
  --glass-stroke: rgb(255 255 255 / .9);
  --glass-edge: rgb(27 31 36 / .08);
  --glass-hi: rgb(255 255 255 / .8);
  --glow: rgb(24 121 78 / .08);

  --scroll-shadow: rgb(20 40 30 / .28);

  /* Kode (terang) */
  --code-bg: #f0f2ec;
  --code-head: #e7eae3;
  --code-ink: #1f2328;
  --code-line: #dadfd5;
  --code-muted: #5c6370;
  --tok-kw: #a01f78;
  --tok-str: #1d6a2a;
  --tok-com: #626a78;
  --tok-num: #8a4800;
  --tok-fn: #1b58b0;
  --tok-dec: #6c3cb0;
  --tok-key: #1b58b0;

  /* Huruf */
  --font-ui: "Geist", "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-read: "Geist", "Segoe UI Variable Text", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --t-xs: 12.5px;
  --t-sm: 14px;
  --t-md: 15.5px;
  --t-body: 17.5px;
  --t-lg: 20px;
  --t-xl: 25px;
  --t-2xl: 34px;
  --t-3xl: 46px;

  /* Jarak */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  /* Sudut */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Tata letak */
  --topbar: 84px; /* pil 60px + jarak atas 12px + jarak bawah 12px */
  --sidebar: 288px;
  --measure: 740px;
  --toc: 220px;
  --shadow: 0 1px 2px rgb(27 58 42 / .06), 0 16px 40px -18px rgb(27 58 42 / .28);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --surface: #181b1f; --surface-2: #20242a; --ink: #e9ebee; --ink-2: #c6cad1; --muted: #9ba2ae;
    --line: #2c3139; --line-strong: #3a414b; --brand: #4cc38a; --brand-strong: #74d8a6; --brand-soft: #173022; --on-brand: #0e1712;
    --warn-ink: #f2c46a; --warn-soft: #30270f; --danger-ink: #ff9b90; --danger-soft: #371b18; --focus: #74d8a6;
    --glass-fill: rgb(24 27 31 / .72); --glass-stroke: rgb(255 255 255 / .09); --glass-edge: rgb(255 255 255 / .18); --glass-hi: rgb(255 255 255 / .08); --glow: rgb(76 195 138 / .12);
    --scroll-shadow: rgb(255 255 255 / .16); --code-bg: #0e1013; --code-head: #15181c; --code-ink: #e4e7ec; --code-line: #262a31; --code-muted: #9aa3b5;
    --tok-kw: #ff7ab2; --tok-str: #a5e075; --tok-com: #8a93a3; --tok-num: #f8c555; --tok-fn: #78c2ff; --tok-dec: #d4a6ff; --tok-key: #78c2ff;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 18px 44px -16px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1114; --surface: #181b1f; --surface-2: #20242a; --ink: #e9ebee; --ink-2: #c6cad1; --muted: #9ba2ae;
  --line: #2c3139; --line-strong: #3a414b; --brand: #4cc38a; --brand-strong: #74d8a6; --brand-soft: #173022; --on-brand: #0e1712;
  --warn-ink: #f2c46a; --warn-soft: #30270f; --danger-ink: #ff9b90; --danger-soft: #371b18; --focus: #74d8a6;
  --glass-fill: rgb(24 27 31 / .72); --glass-stroke: rgb(255 255 255 / .09); --glass-edge: rgb(255 255 255 / .18); --glass-hi: rgb(255 255 255 / .08); --glow: rgb(76 195 138 / .12);
  --scroll-shadow: rgb(255 255 255 / .16); --code-bg: #0e1013; --code-head: #15181c; --code-ink: #e4e7ec; --code-line: #262a31; --code-muted: #9aa3b5;
  --tok-kw: #ff7ab2; --tok-str: #a5e075; --tok-com: #8a93a3; --tok-num: #f8c555; --tok-fn: #78c2ff; --tok-dec: #d4a6ff; --tok-key: #78c2ff;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 18px 44px -16px rgb(0 0 0 / .6);
  color-scheme: dark;
}

/* ---------- Dasar ---------- */
* { box-sizing: border-box; }
/* Satu-satunya jarak untuk semua lompatan ke bagian (judul, fase, langkah, latihan): topbar + 24px.
   Jangan tambah scroll-margin-top di elemen, nanti jaraknya dihitung dua kali. */
html { scroll-padding-top: calc(var(--topbar) + var(--s5)); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: radial-gradient(1200px 520px at 18% -120px, var(--glow), transparent 70%), var(--bg); background-attachment: fixed; color: var(--ink); font-family: var(--font-ui); font-size: var(--t-md); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.ph { font-size: 1.1em; vertical-align: -.14em; flex: none; }
a { color: var(--brand-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
/* #content menerima fokus lewat skrip setelah pindah halaman (untuk pembaca layar), bukan elemen interaktif:
   tanpa garis fokus, supaya tidak muncul garis hijau di bawah navigasi. */
main#content:focus, main#content:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: var(--s2); background: var(--ink); color: var(--bg); padding: var(--s2) var(--s3); z-index: 100; border-radius: var(--r); }
.skip:focus { left: var(--s2); }
.kbd { font-family: var(--mono); font-size: 11.5px; line-height: 1; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r-sm); padding: 3px 6px; background: var(--surface); color: var(--muted); }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 12px; z-index: 30; height: 60px; margin: 12px 16px; display: flex; align-items: center; gap: var(--s2); padding: 0 8px; border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--glass-hi), transparent 45%), var(--glass-fill); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-stroke); box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow); }
@media (prefers-reduced-transparency: reduce) { .topbar { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 620; font-size: 15.5px; letter-spacing: -.01em; white-space: nowrap; padding: 4px 14px 4px 4px; border-radius: var(--r-pill); background: var(--surface-2); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: 18px; }
.brand-mark .ph { vertical-align: 0; }
.icon-btn { border: 1px solid var(--line); background: var(--surface-2); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex: none; color: var(--ink); font-size: 17px; }
.icon-btn:hover { border-color: var(--brand); color: var(--ink); }
.icon-btn .ph { vertical-align: 0; }
.search-slot { flex: 1; display: flex; justify-content: center; min-width: 0; }
.search-slot .search { width: min(420px, 100%); }
.menu-btn { display: none; }
#theme-btn .i-sun { display: none; }
#theme-btn .ph { font-size: 17px; }
:root[data-theme="dark"] #theme-btn .i-sun { display: block; }
:root[data-theme="dark"] #theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) #theme-btn .i-moon { display: none; }
}
.progress-pill { --p: 0%; margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.progress-pill:hover { color: var(--ink); background: var(--surface-2); }
.progress-ring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--brand) var(--p), var(--line) 0); -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px); mask: radial-gradient(circle, transparent 5px, #000 5.5px); flex: none; }
.search-slot + .progress-pill { margin-left: 0; }
.progress-track { width: 110px; height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.progress-fill { display: block; height: 100%; width: 0; background: var(--brand); border-radius: var(--r-pill); transition: width .5s ease; }

/* Signature: tombol bahasa */
.lang-switch { display: flex; background: var(--surface-2); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.lang-switch button { border: 1px solid transparent; background: transparent; padding: 6px 14px; border-radius: var(--r-pill); cursor: pointer; font-weight: 600; font-size: var(--t-sm); color: var(--muted); white-space: nowrap; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--line); }
.ts-short { display: none; }

/* Bilah progress baca (hanya di halaman modul, digerakkan oleh scroll-timeline CSS) */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--brand); transform-origin: 0 50%; transform: scaleX(0); z-index: 31; pointer-events: none; display: none; }
@supports (animation-timeline: scroll()) {
  body.is-module .read-progress { display: block; animation: read-grow linear both; animation-timeline: scroll(root block); }
}
@keyframes read-grow { to { transform: scaleX(1); } }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
main { min-width: 0; padding: var(--s6) clamp(var(--s4), 4vw, var(--s7)) var(--s8); }
.page { max-width: var(--measure); margin: 0 auto; }
.loading { color: var(--muted); padding: var(--s7); }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto; overscroll-behavior: contain; padding: var(--s2) var(--s3) var(--s7) var(--s4); scrollbar-width: thin; }
.search { position: relative; }
.search > .ph { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 40px; padding: 8px 40px 8px 38px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-sm); }
.sidebar .search { margin-bottom: var(--s3); }
.search input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.search-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.nav-top { display: grid; gap: 1px; margin: var(--s3) 0 var(--s2); }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-pill); color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); font-weight: 500; line-height: 1.35; position: relative; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
.nav-link .ico { width: 22px; text-align: center; flex: none; font-size: 17px; color: var(--muted); }
.nav-link.active .ico { color: var(--brand-strong); }
.nav-link .grow { flex: 1; }
.nav-link > .ph { color: var(--muted); font-size: 14px; }
.nav-link .num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 600; background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.nav-link.active .num { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-strong); }
.nav-link.done .num { background: var(--brand); color: var(--on-brand); box-shadow: none; font-size: 0; }
.nav-link.done .num::before { content: "✓"; font-size: 12.5px; }
.phase-title { margin: var(--s5) 12px var(--s2); font-size: 13px; color: var(--ink); font-weight: 650; }
.phase-title [data-phase-count] { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted); }
.phase-title .row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.phase-bar { display: block; height: 3px; margin-top: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.phase-bar span { display: block; height: 100%; background: var(--brand); width: 0; transition: width .4s ease; }
.nav-link[hidden], .phase-group[hidden], .nav-empty[hidden] { display: none; }
.nav-empty { padding: var(--s3) 10px; font-size: var(--t-sm); color: var(--muted); line-height: 1.5; }
.scrim { display: none; }

@media (max-width: 1023px) {
  .shell { grid-template-columns: 1fr; }
  .menu-btn { display: grid; }
  .sidebar { position: fixed; left: 0; top: var(--topbar); z-index: 25; width: min(320px, 88vw); transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); visibility: hidden; background: var(--bg); border-radius: 0 var(--r-lg) 0 0; padding-top: var(--s4); }
  .sidebar.open { transform: none; visibility: visible; }
  .scrim:not([hidden]) { display: block; position: fixed; inset: var(--topbar) 0 0 0; background: rgba(10, 12, 14, .4); z-index: 20; }
  .search-slot { display: none; }
}
@media (max-width: 640px) {
  .topbar { gap: 6px; margin: 12px 12px; padding: 0 8px; }
  .brand-name, .progress-pill { display: none; }
  .brand { padding: 4px; }
  .topbar .lang-switch { margin-left: auto; }
  .lang-switch button { padding: 6px 11px; font-family: var(--mono); font-size: 12.5px; }
  .ts-long { display: none; }
  .ts-short { display: inline; }
  main { padding-top: var(--s4); }
}

/* ---------- Tipografi materi ---------- */
.prose { font-family: var(--font-read); font-size: 17px; line-height: 1.72; color: var(--ink-2); }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--font-ui); color: var(--ink); }
.page h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.12; letter-spacing: -.035em; margin: var(--s2) 0 var(--s3); font-weight: 620; color: var(--ink); }
.prose h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.025em; margin: var(--s8) 0 var(--s3); font-weight: 620; }
.prose h3 { font-size: var(--t-lg); line-height: 1.3; margin: var(--s6) 0 var(--s2); font-weight: 620; letter-spacing: -.01em; }
.prose h4 { font-size: 17px; margin: var(--s5) 0 var(--s2); }
.prose p { margin: var(--s3) 0; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--s7) 0; }
.prose blockquote { margin: var(--s4) 0; padding: 2px var(--s4); border-left: 3px solid var(--brand); color: var(--ink-2); }
.prose :not(pre) > code { font-family: var(--mono); font-size: .84em; background: var(--surface-2); padding: .12em .4em; border-radius: var(--r-sm); color: var(--ink); overflow-wrap: anywhere; }
.prose a code { color: inherit; }

/* Tabel */
.table-wrap { overflow-x: auto; margin: var(--s5) 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-md); line-height: 1.5; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; }
.prose td { border-top: 1px solid var(--line); }
.prose th { background: var(--surface-2); font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; color: var(--ink); white-space: nowrap; }
.prose td code { white-space: normal; overflow-wrap: break-word; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Isyarat geser: bayangan tipis di tepi yang masih punya isi tersembunyi. Lapisan penutup ikut bergulir
   (local) dan menutup bayangan saat sudah mentok, jadi bayangan hanya muncul kalau memang bisa digeser. */
.table-wrap, .code-block pre {
  --edge: var(--surface);
  background:
    linear-gradient(to right, var(--edge) 40%, transparent) left center / 36px 100% no-repeat local,
    linear-gradient(to left, var(--edge) 40%, transparent) right center / 36px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--scroll-shadow), transparent) left center / 18px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--scroll-shadow), transparent) right center / 18px 100% no-repeat scroll,
    var(--edge);
}
.code-block pre { --edge: var(--code-bg); }

/* Tabel rujukan dua bahasa: hanya bahasa pilihan yang tampil (lihat markdown.js) */
.lang-note { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; margin: var(--s5) 0 calc(-1 * var(--s3)); padding: 5px 12px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-strong); font-family: var(--font-ui); font-size: 13px; font-weight: 500; line-height: 1.4; }
.lang-note .ph { flex: none; }
@media (min-width: 1280px) {
  body.is-cheat .page { max-width: 1100px; }
  body.is-cheat .prose [data-lang-col] { display: table-cell; }
  body.is-cheat .lang-note { display: none; }
}

/* Di ponsel, tabel 3 kolom atau lebih tampil sebagai kartu per baris */
@media (max-width: 640px) {
  .table-wrap:has(> table.stack) { overflow: visible; border: 0; border-radius: 0; background: none; }
  .prose table.stack, .prose table.stack tbody, .prose table.stack tr, .prose table.stack td { display: block; }
  .prose table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .prose table.stack tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); }
  .prose table.stack tr + tr { margin-top: var(--s2); }
  .prose table.stack td { border: 0; padding: 3px 0; }
  .prose td code { overflow-wrap: anywhere; }
  .prose table.stack td::before { content: attr(data-label); display: block; font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: var(--muted); }
  .prose table.stack td:first-child { font-weight: 600; color: var(--ink); padding-bottom: var(--s1); }
  .prose table.stack td:first-child::before, .prose table.stack td[data-label=""]::before { display: none; }
  .prose table.stack.num td:first-child { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-right: var(--s2); padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-2); font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
  .prose table.stack.num td:nth-child(2) { display: inline; font-weight: 600; }
  .prose table.stack.num td:nth-child(2)::before { display: none; }
  .prose table.stack.num td:nth-child(3) { margin-top: var(--s2); }
}

/* ---------- Header modul ---------- */
.mod-hero { padding-bottom: var(--s5); }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); font-size: 13px; font-weight: 500; color: var(--muted); }
.crumbs .crumb-phase { color: var(--brand-strong); font-weight: 600; }
.crumbs span + span::before { content: "›"; margin-right: var(--s3); color: var(--line-strong); }
.mod-hero h1 { display: flex; gap: .3em; align-items: baseline; }
.mod-hero .lede { margin: 0; font-family: var(--font-read); font-size: var(--t-lg); line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-weight: 600; line-height: 1.4; }
.chip.done { background: var(--brand-soft); color: var(--brand-strong); }

.docs-links { margin: var(--s4) 0 0; font-size: var(--t-sm); color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- Tata letak modul + daftar isi ---------- */
.doc { display: grid; grid-template-columns: minmax(0, var(--measure)); justify-content: center; gap: var(--s7); }
.doc > * { min-width: 0; }
.doc > .page { margin: 0; }   /* margin auto membuat item grid tidak meregang → melebar mengikuti isi */
.toc { display: none; }
@media (min-width: 1280px) {
  .doc { grid-template-columns: minmax(0, var(--measure)) var(--toc); }
  .toc { display: block; position: sticky; top: calc(var(--topbar) + var(--s6)); align-self: start; max-height: calc(100vh - var(--topbar) - var(--s7)); overflow-y: auto; scrollbar-width: thin; }
  .toc-mobile { display: none; }
}
.toc-title { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 800; color: var(--muted); margin: 0 0 var(--s2) var(--s3); }
.toc ol, .toc-mobile ol { list-style: none; margin: 0; padding: 0; }
.toc a, .toc-mobile a { display: block; padding: 5px var(--s3); border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: 13.5px; line-height: 1.4; }
.toc a:hover, .toc-mobile a:hover { color: var(--ink); border-left-color: var(--muted); }
.toc a.active { color: var(--brand-strong); border-left-color: var(--brand); font-weight: 700; }
.toc-mobile { margin-top: var(--s5); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.toc-mobile summary { cursor: pointer; padding: var(--s3) var(--s4); font-weight: 700; font-size: var(--t-sm); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease; margin-top: -4px; }
.toc-mobile[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.toc-mobile ol { padding: 0 var(--s4) var(--s3); }

/* ---------- Callout ---------- */
.callout { margin: var(--s5) 0; padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--surface-2); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-family: var(--font-ui); font-weight: 650; font-size: var(--t-sm); margin-bottom: var(--s1); color: var(--ink); display: flex; align-items: center; gap: 8px; }
.callout-title .ph { font-size: 17px; color: var(--brand-strong); }
.callout.warn .callout-title .ph { color: var(--warn-ink); }
.callout.danger .callout-title .ph { color: var(--danger-ink); }
.callout.warn { background: var(--warn-soft); }
.callout.warn .callout-title { color: var(--warn-ink); }
.callout.danger { background: var(--danger-soft); }
.callout.danger .callout-title { color: var(--danger-ink); }
details.callout { background: var(--surface); border: 1px solid var(--line); padding: 0; }
details.callout > summary { cursor: pointer; padding: var(--s3) var(--s5); font-family: var(--font-ui); font-size: var(--t-md); list-style: none; display: flex; align-items: center; gap: var(--s2); }
details.callout > summary::-webkit-details-marker { display: none; }
details.callout > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .2s ease; flex: none; }
details.callout[open] > summary::before { transform: rotate(45deg); }
details.callout[open] > summary { border-bottom: 1px solid var(--line); }
details.callout > :not(summary) { margin-left: var(--s5); margin-right: var(--s5); }
details.callout > :last-child { margin-bottom: var(--s4); }

/* ---------- Blok kode ---------- */
.code-block { margin: var(--s5) 0; border-radius: 16px; background: var(--code-bg); border: 1px solid var(--code-line); overflow: hidden; font-family: var(--font-ui); }
.code-head { display: flex; align-items: center; gap: var(--s1); padding: 0 var(--s2) 0 var(--s2); background: var(--code-head); border-bottom: 1px solid var(--code-line); min-height: 42px; }
.code-tab { border: 0; background: transparent; color: var(--code-muted); padding: 10px 10px 9px; font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.code-tab:hover { color: var(--code-ink); }
.code-tab[aria-selected="true"] { color: var(--code-ink); border-bottom-color: var(--brand); }
span.code-tab { cursor: default; }
.code-title { color: var(--code-muted); font-size: 12.5px; font-family: var(--mono); padding: 0 var(--s2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.code-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex: none; }
.code-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--code-line); background: var(--code-bg); color: var(--code-ink); font-size: 12px; padding: 5px 12px; border-radius: var(--r-pill); cursor: pointer; font-weight: 600; }
.code-btn:hover { border-color: var(--brand); }
.code-btn svg { width: 13px; height: 13px; }
.code-pane { display: none; }
.code-pane[data-pane="all"],
body[data-lang="py"] .code-pane[data-pane="py"],
body[data-lang="ts"] .code-pane[data-pane="ts"] { display: block; }
body[data-lang="py"] [data-only="ts"],
body[data-lang="ts"] [data-only="py"] { display: none; }
body:not([data-os="win"]) [data-os-only="win"],
body:not([data-os="mac"]) [data-os-only="mac"],
body:not([data-os="linux"]) [data-os-only="linux"] { display: none; }
.code-block:not(:has(.code-pane[data-pane="py"])) .code-pane[data-pane="ts"],
.code-block:not(:has(.code-pane[data-pane="ts"])) .code-pane[data-pane="py"] { display: block; }
.code-block pre { margin: 0; padding: var(--s4) var(--s4) var(--s4); overflow-x: auto; font-family: var(--mono); font-size: 13.6px; line-height: 1.7; color: var(--code-ink); tab-size: 4; scrollbar-width: thin; }
.code-block pre code { font-family: inherit; }
.tok-kw { color: var(--tok-kw); }
.tok-str { color: var(--tok-str); }
.tok-com { color: var(--tok-com); font-style: italic; }
.tok-num { color: var(--tok-num); }
.tok-fn { color: var(--tok-fn); }
.tok-dec { color: var(--tok-dec); }
.tok-key { color: var(--tok-key); }
.code-run { display: flex; gap: 10px; align-items: center; padding: 9px var(--s4); border-top: 1px solid var(--code-line); background: var(--code-head); color: var(--code-muted); font-family: var(--mono); font-size: 12.8px; overflow-x: auto; white-space: nowrap; }
.code-run::before { content: attr(data-label); font-family: var(--font-ui); font-size: 11.5px; font-weight: 800; color: var(--brand); flex: none; }
.code-run code { color: var(--code-ink); }
.file-badge { margin-left: var(--s1); font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-strong); white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 640px) {
  .code-block { margin-left: calc(-1 * var(--s2)); margin-right: calc(-1 * var(--s2)); }
  .code-block pre { font-size: 12.8px; padding: var(--s3); }
  .code-title, .file-badge { display: none; }
}

/* ---------- Misi ---------- */
.mission { margin: var(--s6) 0; border-radius: var(--r-lg); padding: var(--s5); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mission h3 { margin-top: 0; display: flex; align-items: center; gap: var(--s2); }
.mission h3 .ph, .lab-head h3 .ph { color: var(--brand-strong); margin-right: 8px; }
.mission .mission-count { margin-left: auto; font-size: var(--t-xs); font-weight: 800; color: var(--muted); font-family: var(--font-ui); }
.mission ul.tasks { list-style: none; padding: 0; margin: var(--s2) 0 0; display: grid; gap: 2px; }
.mission ul.tasks li { margin: 0; }
.mission .task { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s2) var(--s2); border-radius: var(--r); cursor: pointer; color: var(--ink-2); line-height: 1.55; }
.mission .task:hover { background: var(--surface-2); }
.mission .task input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; cursor: pointer; }
.mission .task.checked span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }

/* ---------- Kuis ---------- */

/* ---------- Tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand); padding: 11px 20px; border-radius: var(--r-pill); font-weight: 600; cursor: pointer; text-decoration: none; font-size: var(--t-md); line-height: 1.2; font-family: var(--font-ui); transition: background .16s ease, transform .08s ease; }
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--brand); color: var(--ink); }
.btn.small { padding: 7px 12px; font-size: 13.5px; }
.btn.done { background: var(--brand-soft); color: var(--brand-strong); border-color: var(--brand-soft); }
.btn.done:hover { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }

/* ---------- Footer modul ---------- */
.mod-foot { margin-top: var(--s7); display: grid; gap: var(--s4); font-family: var(--font-ui); }
.complete-box { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.complete-box p { margin: 0; color: var(--muted); font-size: var(--t-sm); }
.complete-box strong { display: block; color: var(--ink); font-size: var(--t-md); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.pager a { padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; background: var(--surface); color: var(--ink); font-weight: 600; line-height: 1.4; }
.pager a:hover { border-color: var(--brand); color: var(--ink); }
.pager small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--t-xs); font-weight: 600; margin-bottom: 2px; }
.pager .next small { justify-content: flex-end; }
.pager .next { text-align: right; grid-column: 2; }
.pager-hint { text-align: center; font-size: var(--t-xs); color: var(--muted); margin: 0; }
@media (max-width: 640px) {
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .pager-hint { display: none; }
}

/* ---------- Beranda (P11 v2 + 11b): hero dua kolom dengan contoh kode, jalur satu baris, silabus empat kolom ---------- */
.page.home { max-width: 1120px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: var(--s7); align-items: center; padding: var(--s6) 0 var(--s2); }
/* Di bawah 1320px (sidebar ikut memakan lebar) kode turun ke bawah teks */
@media (max-width: 1320px) { .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s6); } .hero-side { max-width: 640px; } }
.hero h1 { font-size: clamp(34px, 4.4vw, 50px); line-height: 1.06; letter-spacing: -.04em; margin: var(--s3) 0 var(--s3); max-width: 15ch; text-wrap: balance; }
.hero .lede { font-family: var(--font-read); font-size: 18px; line-height: 1.55; max-width: 46ch; color: var(--ink-2); margin: 0 0 var(--s5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }
.hero-link { font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 650; color: var(--brand-strong); }
.hero-meta { margin: var(--s4) 0 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .hero { padding-top: 0; } .hero-actions .btn { flex: 1 1 100%; justify-content: center; } }

/* Contoh kode di hero: warna sama dengan blok kode tutorial (ikut tema), satu bahasa tampil sesuai pilihan */
.hero-side { margin: 0; min-width: 0; }
.hero-code { border-radius: 16px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--code-line); box-shadow: 0 24px 48px -30px rgb(0 0 0 / .5); font-family: var(--mono); color: var(--code-ink); }
.hc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; background: var(--code-head); border-bottom: 1px solid var(--code-line); font-size: 12.5px; }
.hc-file { display: inline-flex; align-items: center; gap: 8px; }
.hc-file .ph { color: var(--code-muted); }
.hc-dots { display: inline-flex; gap: 6px; }
.hc-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--code-line); }
.hero-code pre { margin: 0; padding: 18px 14px; font-size: 13px; line-height: 1.75; overflow-x: auto; scrollbar-width: thin; }
.hero-code .ln { display: inline-block; width: 1.2em; margin-right: 12px; text-align: right; color: var(--code-muted); opacity: .7; user-select: none; }
.hc-run { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; background: var(--code-head); border-top: 1px solid var(--code-line); font-size: 11.5px; color: var(--code-muted); }
.hc-run code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: inherit; }
.hc-pass { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--brand-strong); font-weight: 700; }
.hero-side figcaption { margin-top: var(--s3); font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .hc-more { display: none; } .hero-code pre { font-size: 12px; padding: 14px 12px; } }

/* Jalur belajar: lima tahap satu baris disambung garis tipis. Di ponsel disembunyikan (urutan fase di silabus sudah cukup). */
.jalur { margin-top: var(--s7); font-family: var(--font-ui); }
.jalur-t { display: block; font-size: var(--t-sm); font-weight: 650; color: var(--ink-2); margin-bottom: var(--s3); }
.jalur ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.jalur li { display: flex; align-items: center; flex: 1 1 0; min-width: 0; }
.jalur li:last-child { flex: 0 0 auto; }
.jalur li:not(:last-child)::after { content: ""; flex: 1 1 auto; height: 1px; margin: 0 var(--s3); background: var(--line); }
.jl-step { display: inline-flex; align-items: center; gap: var(--s2); padding: 4px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; text-decoration: none; border-radius: var(--r); }
.jl-step:hover { color: var(--ink); }
.jl-no { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); font-family: var(--mono); font-size: 12px; font-weight: 700; }
.jl-no .ph { font-size: 14px; vertical-align: 0; }
.jalur .now .jl-step, .jalur .done .jl-step { color: var(--ink); font-weight: 650; }
.jalur .now .jl-no, .jalur .done .jl-no { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
@media (max-width: 760px) { .jalur { display: none; } }

/* Silabus ringkas */
.silabus { margin-top: var(--s7); font-family: var(--font-ui); }
.silabus-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); }
.silabus-head h2 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -.02em; }
.silabus-head span { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.prep-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); margin-bottom: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none; }
.prep-row:hover { border-color: var(--line-strong); color: var(--ink); }
.prep-row > .ph { color: var(--brand); }
.prep-s { flex: 1 1 auto; color: var(--muted); font-size: var(--t-sm); }
.prep-row .fm-no { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }
/* Empat kolom fase sama lebar dan sama tinggi */
.fase-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 1100px) { .fase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .fase-grid { grid-template-columns: 1fr; } .prep-s { display: none; } }
.fase { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.fase-no { font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-strong); }
.fase h3 { margin: 2px 0 0; font-size: 18px; font-weight: 650; }
.fase-meta { margin: 2px 0 var(--s3); font-size: 13px; color: var(--muted); }
.fase-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.fm { display: flex; align-items: center; gap: var(--s3); padding: 8px 10px; border-radius: var(--r); color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.fm:hover { background: var(--surface-2); color: var(--ink); }
.fm-no { flex: none; min-width: 20px; font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.fm-no .ph { color: var(--brand); font-size: 15px; vertical-align: -2px; }
.fm-t { flex: 1 1 auto; min-width: 0; }
.fm-min { flex: none; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.fm.next { background: var(--brand-soft); color: var(--ink); font-weight: 650; }
.fm.next .fm-no { color: var(--brand-strong); }
.fm.done .fm-t { color: var(--muted); }

/* Playground satu baris */
.pg-row { display: flex; align-items: center; gap: var(--s4); margin-top: var(--s6); padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none; font-family: var(--font-ui); }
.pg-row:hover { border-color: var(--line-strong); color: var(--ink); }
.pg-row > .ph { font-size: 22px; color: var(--brand); flex: none; }
.pg-t { flex: 1 1 auto; display: grid; gap: 2px; }
.pg-t span { font-size: var(--t-sm); color: var(--muted); }
.pg-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: 600; }
@media (max-width: 640px) { .pg-row { flex-wrap: wrap; } .pg-btn { width: 100%; justify-content: center; } }

/* ---------- Locator Lab ---------- */
.lab { margin: var(--s6) 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; font-family: var(--font-ui); font-size: var(--t-md); }
.lab-head { padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.lab-head h3 { margin: 0; font-size: var(--t-lg); }
.lab-body { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .lab-body { grid-template-columns: 1fr; } }
.lab-preview { padding: var(--s4); border-right: 1px solid var(--line); background: var(--bg); }
@media (max-width: 760px) { .lab-preview { border-right: 0; border-bottom: 1px solid var(--line); } }
/* Pratinjau sengaja berwarna terang di dua tema: ini "aplikasi" yang dites */
.lab-preview .demo { background: #fcfcfa; color: #1d2433; border-radius: var(--r); padding: var(--s4); border: 1px solid #dfe3ee; font-size: 14px; line-height: 1.5; font-family: system-ui, "Segoe UI", sans-serif; }
.lab-preview .demo h4 { margin: 0 0 var(--s2); font-size: 16px; color: #1d2433; }
.lab-preview .demo label { display: block; font-weight: 600; font-size: 13px; margin: 6px 0 2px; color: #1d2433; }
.lab-preview .demo label.lab-check { display: flex; gap: 6px; align-items: center; font-weight: 400; } /* pengganti style inline (CSP tanpa unsafe-inline) */
.lab-preview .demo input[type=text], .lab-preview .demo input[type=password] { width: 100%; padding: 6px 8px; border: 1px solid #cfd5e3; border-radius: var(--r-sm); font: inherit; background: #fcfcfa; color: #1d2433; }
.lab-preview .demo button { font: inherit; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: var(--r-sm); border: 1px solid #2f6fed; background: #2f6fed; color: #fcfcfa; margin-top: 6px; cursor: default; }
.lab-preview .demo button.sec { background: #fcfcfa; color: #2f6fed; }
.lab-preview .demo .cards-demo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s3); }
.lab-preview .demo article { border: 1px solid #dfe3ee; border-radius: var(--r-sm); padding: var(--s2); }
.lab-preview .demo article h5 { margin: 0; font-size: 14px; color: #1d2433; }
.lab-preview .demo a { color: #2f6fed; }
.lab-preview .demo .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lab-hit { outline: 3px solid #e0542f !important; outline-offset: 2px; border-radius: 4px; position: relative; }
.lab-hit::after { content: attr(data-hit); position: absolute; top: -11px; right: -11px; background: #e0542f; color: #fcfcfa; font-size: 10px; font-weight: 800; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-ui); z-index: 2; }
.lab-side { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.lab-label { font-size: var(--t-sm); font-weight: 700; color: var(--ink); }
.lab-input { width: 100%; font-family: var(--mono); font-size: 13.5px; padding: 10px 12px; border-radius: var(--r); border: 1.5px solid var(--code-line); background: var(--code-bg); color: var(--code-ink); }
.lab-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.lab-result { padding: 10px 12px; border-radius: var(--r); font-size: var(--t-sm); background: var(--surface-2); color: var(--ink-2); min-height: 44px; line-height: 1.5; }
.lab-result.ok { background: var(--brand-soft); color: var(--ink); }
.lab-result.warn { background: var(--warn-soft); color: var(--ink); }
.lab-result.bad { background: var(--danger-soft); color: var(--ink); }
.lab-result code, .lab-translate code { font-family: var(--mono); font-size: .9em; background: var(--surface); padding: .1em .35em; border-radius: var(--r-sm); overflow-wrap: anywhere; }
.lab-translate { font-size: 13px; color: var(--muted); line-height: 1.5; }
.lab-challenges { display: grid; gap: 6px; }
.chal { text-align: left; border: 1px solid var(--line); background: var(--bg); padding: 8px 10px; border-radius: var(--r); cursor: pointer; font-size: var(--t-sm); color: var(--ink-2); display: flex; gap: var(--s2); align-items: flex-start; line-height: 1.4; }
.chal:hover { border-color: var(--muted); }
.chal.active { border-color: var(--brand); background: var(--surface); color: var(--ink); }
.chal .star { filter: grayscale(1); opacity: .45; }
.chal.solved .star { filter: none; opacity: 1; }
.lab-hint { font-size: 13px; color: var(--muted); }

/* ---------- Diagram kecil ---------- */
/* Diagram alur: selalu satu garis lurus. Desktop = satu baris (tidak pernah turun ke baris
   baru), HP = satu kolom dari atas ke bawah. Teks di dalam node yang menyesuaikan lebar. */
.flow { display: flex; flex-wrap: nowrap; align-items: stretch; gap: var(--s2); margin: var(--s5) 0; font-family: var(--font-ui); }
.flow .node { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-weight: 700; font-size: var(--t-sm); color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.flow .node small { font-weight: 500; color: var(--muted); }
.flow .node.hl { border-color: var(--brand); background: var(--brand-soft); }
.flow .arrow { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); min-width: 28px; }
.flow .arrow b { font-size: 18px; line-height: 1; }
.flow .arrow small { font-size: 11px; font-weight: 700; white-space: nowrap; }
@media (max-width: 640px) {
  .flow { flex-direction: column; }
  .flow .node { flex: none; }
  .flow .arrow { flex-direction: row; gap: var(--s2); min-height: 24px; }
  .flow .arrow b { transform: rotate(90deg); }
}
.pyramid { display: grid; gap: 6px; justify-items: center; margin: var(--s5) 0; font-family: var(--font-ui); }
.pyramid div { text-align: center; padding: 10px; border-radius: var(--r); font-weight: 700; font-size: var(--t-sm); color: var(--ink); line-height: 1.4; }
.pyramid small { display: block; font-weight: 500; color: var(--muted); }
.pyramid .p1 { width: 44%; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pyramid .p2 { width: 68%; background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface-2)); }
.pyramid .p3 { width: 92%; background: var(--brand-soft); }
@media (max-width: 560px) { .pyramid .p1 { width: 70%; } .pyramid .p2 { width: 85%; } .pyramid .p3 { width: 100%; } }

/* ---------- Lain-lain ---------- */
.to-top { position: fixed; right: var(--s5); bottom: var(--s5); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; font-size: 18px; cursor: pointer; box-shadow: var(--shadow); z-index: 40; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
.to-top:hover { border-color: var(--brand); color: var(--ink); }
/* visibility ikut disembunyikan supaya tombol tidak bisa di-Tab / dibaca screen reader saat tak terlihat */
.to-top[hidden] { display: grid; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.toast { position: fixed; left: 50%; bottom: var(--s5); transform: translateX(-50%) translateY(16px); background: var(--ink); color: var(--bg); padding: 11px 20px; border-radius: var(--r-pill); font-weight: 600; font-size: var(--t-sm); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 60; box-shadow: var(--shadow); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Latihan ringkas (U2): tugas, lalu satu baris hasil + jawaban + centang ---------- */
.latihan { margin: var(--s5) 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.latihan-head { display: flex; align-items: baseline; gap: var(--s3); padding: var(--s4) var(--s5) 0; flex-wrap: wrap; }
.latihan-head h3 { margin: 0; font-size: var(--t-md); line-height: 1.35; }
.latihan-no { font-family: var(--mono); font-size: var(--t-xs); font-weight: 600; color: var(--brand-strong); background: var(--brand-soft); padding: 2px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.latihan-brief { padding: var(--s2) var(--s5) 0; }
.latihan-brief > :first-child { margin-top: 0; }
.latihan-brief > :last-child { margin-bottom: 0; }
.latihan-brief p, .latihan-brief li { font-size: var(--t-md); }
.latihan-brief ol, .latihan-brief ul { margin: var(--s2) 0; }
.latihan-foot { display: flex; align-items: center; gap: var(--s2) var(--s4); flex-wrap: wrap; padding: var(--s3) var(--s5) var(--s4); font-family: var(--font-ui); }
.latihan-hasil { margin: 0 auto 0 0; display: inline-flex; align-items: baseline; gap: 8px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--t-sm); color: var(--ink-2); line-height: 1.45; }
.latihan-hasil > span { font-weight: 700; color: var(--ink); }
.la-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; background: none; border: 0; color: var(--brand-strong); font: 700 var(--t-sm)/1.2 var(--font-ui); cursor: pointer; border-radius: var(--r-sm); }
.la-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }
.la-toggle .ph { transition: transform .15s ease; }
.la-toggle[aria-expanded="true"] .ph { transform: rotate(90deg); }
.latihan-done { display: inline-flex; align-items: center; gap: var(--s2); padding: 6px 0; font-weight: 600; font-size: var(--t-sm); color: var(--ink-2); cursor: pointer; }
.latihan-done input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.latihan-answer { margin: 0 var(--s5) var(--s4); padding: var(--s3) var(--s4); border: 1px dashed var(--line); border-radius: var(--r); background: var(--bg); }
.latihan-answer > :first-child { margin-top: 0; }
.latihan-answer > :last-child { margin-bottom: 0; }
.latihan.tried { border-color: var(--brand); }
.latihan.tried .latihan-done { color: var(--brand-strong); }
@media (max-width: 640px), (pointer: coarse) {
  .la-toggle, .latihan-done { min-height: 44px; }
}

/* ---------- Lebih jauh (U3) dan studi kasus (U4): bagian yang dilipat ---------- */
details.lebih, details.kasus { margin: var(--s5) 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
details.lebih > summary, details.kasus > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); min-height: 52px; font-family: var(--font-ui); }
details.lebih > summary::-webkit-details-marker, details.kasus > summary::-webkit-details-marker { display: none; }
details.lebih > summary::after, details.kasus > summary::after { content: ""; flex: none; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s ease; }
details.lebih[open] > summary::after, details.kasus[open] > summary::after { transform: rotate(-135deg); }
details.lebih[open] > summary, details.kasus[open] > summary { border-bottom: 1px solid var(--line); }
details.lebih > summary > .ph { font-size: 19px; color: var(--muted); flex: none; }
.lb-text { display: grid; gap: 1px; }
.lb-text b { font-size: var(--t-sm); color: var(--ink); }
.lb-text small { font-size: var(--t-xs); color: var(--muted); }
.lb-body, .ks-body { padding: var(--s2) var(--s5) var(--s4); }
.lb-body > :first-child, .ks-body > :first-child { margin-top: var(--s3); }
.lb-body > :last-child, .ks-body > :last-child { margin-bottom: 0; }
.ks-title { font-weight: 700; font-size: var(--t-md); color: var(--ink); }
.ks-codes { margin-left: auto; font-family: var(--mono); font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }
details.kasus > summary::after { margin-left: 0; }
details.kasus + details.kasus { margin-top: calc(-1 * var(--s5) + var(--s2)); }
@media (max-width: 640px) {
  details.kasus > summary { flex-wrap: wrap; row-gap: 2px; }
  .ks-codes { margin-left: 0; order: 3; flex-basis: 100%; }
  details.kasus > summary::after { margin-left: auto; }
}

.code-title small { font-weight: 600; color: var(--code-muted); margin-left: 6px; }

/* ---------- Kartu kaca (kredit) ---------- */
.glass { background: linear-gradient(180deg, var(--glass-hi), transparent 45%), var(--glass-fill); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); border: 1px solid var(--glass-stroke); box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow); }
@media (prefers-reduced-transparency: reduce) { .glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ---------- Kredit dan donasi ---------- */
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.avatar.lg { width: 52px; height: 52px; font-size: 17px; }
.credit { margin-top: var(--s7); padding: var(--s6); border-radius: 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: var(--s6); }
.credit .cr-head { display: flex; align-items: center; gap: 14px; margin-bottom: var(--s3); }
.credit .cr-by { font-size: 13px; color: var(--muted); }
.credit h2 { margin: 0; font-size: 21px; font-weight: 620; letter-spacing: -.02em; }
.credit .cr-who p { margin: 0 0 var(--s4); color: var(--ink-2); font-size: 15px; line-height: 1.6; max-width: 56ch; }
.cr-links { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-links a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.cr-links a:hover { background: var(--surface-2); color: var(--ink); }
.cr-donate { display: flex; gap: var(--s4); align-items: center; padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.cr-donate .qr { width: 148px; height: 148px; padding: 6px; border-radius: 16px; background: #fff; flex: none; }
.cr-donate .qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.cr-donate h3 { margin: 0 0 4px; font-size: 16px; font-weight: 620; display: flex; align-items: center; gap: 8px; }
.cr-donate h3 .ph { color: var(--brand); }
.cr-donate p { margin: 0 0 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.cr-donate .cr-qn { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink); }
.cr-save { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.cr-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding-top: var(--s4); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (max-width: 960px) { .credit { grid-template-columns: 1fr; padding: var(--s5); } }
@media (max-width: 520px) { .cr-donate { flex-direction: column; text-align: center; } .cr-donate h3 { justify-content: center; } }

.site-foot { margin-left: var(--sidebar); padding: 0 clamp(var(--s4), 4vw, var(--s7)) var(--s5); }
.site-foot .foot-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-top: var(--s4); border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.site-foot .who { display: inline-flex; align-items: center; gap: 10px; }
.site-foot .who .avatar { width: 28px; height: 28px; font-size: 10.5px; }
.site-foot .who a { color: var(--ink); font-weight: 600; }
.site-foot .links { display: inline-flex; align-items: center; gap: 8px; }
.site-foot .ico-link { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 16px; }
.site-foot .ico-link:hover { background: var(--surface-2); color: var(--ink); }
.site-foot .ico-link .ph { vertical-align: 0; }
body.is-home .site-foot { display: none; }
@media (max-width: 1023px) { .site-foot { margin-left: 0; } }
.donate-btn { display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer; background: var(--brand-soft); color: var(--brand-strong); border-radius: var(--r-pill); padding: 8px 14px; font: inherit; font-size: 13.5px; font-weight: 600; }
.donate-btn:hover { background: var(--brand); color: var(--on-brand); }

/* Dialog donasi (dibuat app.js saat tombol ditekan) */
.modal-backdrop { position: fixed; inset: 0; background: rgb(8 10 12 / .55); display: grid; place-items: center; padding: 16px; z-index: 80; }
.modal { border-radius: var(--r-xl); width: min(400px, 100%); padding: 24px; background: linear-gradient(180deg, var(--glass-hi), transparent 45%), var(--glass-fill); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); border: 1px solid var(--glass-stroke); box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow); }
.donate { text-align: center; display: grid; justify-items: center; gap: 12px; }
.donate .d-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; }
.donate .d-head h2 { margin: 0; font-size: 17px; font-weight: 620; display: inline-flex; align-items: center; gap: 8px; }
.donate .d-head h2 .ph { color: var(--brand); }
.donate .d-close { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.donate .qr { width: 240px; height: 240px; padding: 10px; border-radius: var(--r-lg); background: #fff; }
.donate .qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.donate .who-qr { font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--ink); margin: 0; }
.donate p { font-size: 13.5px; margin: 0; color: var(--ink-2); }
.donate .btn { width: 100%; }
.donate .thanks { font-size: 12.5px; color: var(--muted); }

/* Ikon di teks materi ({ico:nama}), misalnya legenda kotak di beranda */
.md-ico { color: var(--brand-strong); margin-right: 4px; font-size: 1.05em; }

/* ---------- Persiapan (PS1 sampai PS6): langkah yang bisa dicentang ---------- */
.setup-progress { display: flex; align-items: center; gap: var(--s3); margin: var(--s5) 0 var(--s3); font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.sp-bar { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.sp-bar > span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s ease; }
details.langkah { margin: var(--s3) 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
details.langkah[open] { border-color: var(--brand); }
details.langkah > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); min-height: 60px; font-family: var(--font-ui); }
details.langkah > summary::-webkit-details-marker { display: none; }
details.langkah > summary::after { content: ""; flex: none; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s ease; }
details.langkah[open] > summary::after { transform: rotate(-135deg); }
.lk-no { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 12.5px; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--muted); }
details.langkah.done .lk-no { background: var(--brand); color: var(--on-brand); box-shadow: none; font-size: 0; }
details.langkah.done .lk-no::before { content: "\2713"; font-size: 13px; }
.lk-text { display: grid; gap: 1px; }
.lk-text b { font-size: var(--t-md); color: var(--ink); }
.lk-text small { font-size: var(--t-xs); color: var(--muted); }
.lk-body { padding: 0 var(--s5) var(--s4); }
.lk-body > :first-child { margin-top: var(--s2); }
.lk-done { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; margin-top: var(--s3); font-family: var(--font-ui); font-weight: 650; font-size: var(--t-sm); color: var(--ink); cursor: pointer; }
.lk-done input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.lk-body td:last-child code { white-space: nowrap; }
.prose p.ok-line { display: flex; gap: var(--s2); align-items: flex-start; color: var(--ink-2); }
.prose p.ok-line > .ph { flex: none; margin-top: 4px; color: var(--brand); }
details.gagal { margin: var(--s3) 0; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
details.gagal > summary { cursor: pointer; list-style: none; padding: var(--s3) var(--s4); min-height: 44px; display: flex; align-items: center; gap: var(--s2); font-family: var(--font-ui); font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
details.gagal > summary::-webkit-details-marker { display: none; }
details.gagal > summary::before { content: "\25B8"; color: var(--muted); transition: transform .15s ease; }
details.gagal[open] > summary::before { transform: rotate(90deg); }
.gg-body { padding: 0 var(--s4) var(--s3); }
.gg-body > :first-child { margin-top: 0; }
.gg-body > :last-child { margin-bottom: 0; }
.setup-finish { margin: var(--s6) 0; padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: var(--brand-soft); font-family: var(--font-ui); }
.setup-finish.done { background: var(--surface); border: 1px solid var(--line); }
.sf-status { margin: 0 0 var(--s3); font-size: var(--t-md); color: var(--ink); }
.sf-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
@media (max-width: 640px) { .sf-actions .btn { flex: 1 1 auto; min-height: 44px; } }

/* ---------- Cheatsheet (CS1): navigasi lompat yang menempel ---------- */
.jump { position: sticky; top: calc(var(--topbar) + 8px); z-index: 5; display: flex; gap: 4px; flex-wrap: wrap; margin: var(--s5) 0; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); font-family: var(--font-ui); }
.jump a { padding: 6px 12px; border-radius: var(--r-pill); color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); font-weight: 600; }
.jump a:hover { background: var(--surface-2); color: var(--ink); }
.jump a.active { background: var(--brand-soft); color: var(--brand-strong); }
@media (max-width: 640px) { .jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .jump a { white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; } }

/* ---------- Persiapan: pilih bahasa dan laptop ---------- */
.prose .pilih { margin: var(--s5) 0; padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); font-family: var(--font-ui); }
.prose .pilih h2 { margin: 0 0 var(--s3); font-size: var(--t-md); }
.pilih-grup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (max-width: 560px) { .pilih-grup { grid-template-columns: 1fr; } }
.pilih-opsi { display: flex; gap: var(--s3); align-items: flex-start; min-height: 92px; padding: var(--s3) var(--s4); text-align: left; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; font: inherit; }
.pilih-opsi[aria-pressed="true"] { background: var(--brand-soft); border: 1.5px solid var(--brand); }
.pilih-opsi > span:last-child { display: grid; gap: 4px; }
.pilih-opsi strong { font-size: var(--t-md); }
.pilih-opsi small { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.4; }
.pilih-opsi code { justify-self: start; font-size: 12px; color: var(--muted); background: none; padding: 0; }
.po-radio { flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--bg); }
.pilih-opsi[aria-pressed="true"] .po-radio { border-color: var(--brand); background: radial-gradient(circle, var(--on-brand) 0 28%, var(--brand) 32%); }

/* ---------- Akhir modul: yang sudah dipelajari + latihan di playground (pengganti kuis) ---------- */
.wrap-up { margin: var(--s7) 0 0; display: grid; gap: var(--s4); font-family: var(--font-ui); }
.wrap-up h2 { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); font-size: var(--t-lg); border: 0; padding: 0; }
.wrap-up h2 .ph { color: var(--brand-strong); }
.wu-learned { padding: var(--s4) var(--s5); background: var(--brand-soft); border-radius: var(--r-lg); }
.wu-learned ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wu-learned li { position: relative; padding-left: 30px; font-family: var(--font-read); font-size: 16.5px; color: var(--ink-2); line-height: 1.5; }
.wu-learned li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-family: var(--font-ui); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.wu-practice { padding: var(--s4) var(--s5) var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.wu-practice > p { margin: 0 0 var(--s4); color: var(--muted); font-size: var(--t-sm); }
/* Kartu dalam satu grid selalu sama tinggi, judul dan deskripsi sejajar */
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-rows: 1fr; gap: var(--s3); }
.pk-card { display: grid; grid-template-rows: auto 1fr; gap: 4px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink-2); text-decoration: none; }
.pk-card:hover { border-color: var(--brand); color: var(--ink-2); }
.pk-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pk-name { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-weight: 650; color: var(--ink); }
.pk-name .ph { color: var(--muted); flex: none; }
.pk-desc { font-size: var(--t-sm); line-height: 1.5; }

/* ---------- Sidebar: lampiran di bawah fase ---------- */
.nav-appendix { margin-top: var(--s4); padding-top: var(--s2); border-top: 1px solid var(--line); }
.nav-appendix .phase-title { color: var(--muted); }

/* ---------- Arti setiap baris (N11): penjelasan rinci di bawah kode, terlipat ---------- */
details.baris { margin: calc(-1 * var(--s2)) 0 var(--s5); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-family: var(--font-ui); }
details.baris > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s4); font-size: var(--t-sm); font-weight: 650; color: var(--ink); }
details.baris > summary::-webkit-details-marker { display: none; }
details.baris > summary .ph { color: var(--brand-strong); font-size: 17px; }
details.baris > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s ease; }
details.baris[open] > summary::after { transform: rotate(-135deg); }
details.baris[open] > summary { border-bottom: 1px solid var(--line); }
.br-list { margin: 0; padding: var(--s2) var(--s4) var(--s3); display: grid; }
.br-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s1) var(--s4); padding: var(--s2) 0; }
.br-row + .br-row { border-top: 1px dashed var(--line); }
.br-row dt { margin: 0; min-width: 0; }
.br-row dt code { white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.br-row dd { margin: 0; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.55; }
.br-row dd:only-child { grid-column: 1 / -1; }
@media (max-width: 640px) { .br-row { grid-template-columns: 1fr; } }
.callout.qa { background: var(--surface-2); border-left: 3px solid var(--brand); }

/* ---------- Persiapan: pilih bahasa dan laptop di dua blok bertumpuk ---------- */
.prose .pilih { display: grid; gap: var(--s5); }
.pilih-blok > h2 { display: flex; align-items: center; gap: var(--s2); }
.pilih-blok > h2 .ph { color: var(--brand-strong); }
.pilih-blok > p { margin: 0 0 var(--s3); font-size: var(--t-sm); color: var(--ink-2); }
.pilih-grup.tiga { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pilih-grup.tiga .pilih-opsi { min-height: 72px; }
@media (max-width: 560px) { .pilih-grup.tiga { grid-template-columns: 1fr; } }

/* ---------- Screenshot bertahap (misalnya codegen di Modul 8) ---------- */
.prose .shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--s4); margin: var(--s4) 0 var(--s5); }
@media (max-width: 720px) { .prose .shots { grid-template-columns: 1fr; } }
.prose .shot { margin: 0; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.prose .shot img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); }
.prose .shot figcaption { padding: var(--s3) var(--s4) var(--s4); font-family: var(--font-ui); font-size: var(--t-sm); line-height: 1.55; color: var(--ink-2); }
.prose .shot figcaption b { display: block; margin-bottom: 4px; color: var(--ink); font-size: var(--t-md); }

/* ---------- Persiapan: nomor langkah 1 sampai 3 dan kartu alat (desain P10) ---------- */
.pb-no { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand); color: var(--on-brand); font-family: var(--mono); font-size: 13px; font-weight: 700; }
.prose .alat { margin: var(--s5) 0; padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.prose .alat > h2 { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font-size: var(--t-md); }
.prose .alat > p { margin: 0 0 var(--s4); font-size: var(--t-sm); color: var(--ink-2); }
/* Tiga kartu sama lebar dan sama tinggi; kotak cek selalu di dasar kartu */
.alat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--s3); }
@media (max-width: 1100px) { .alat-grid { grid-template-columns: 1fr; grid-auto-rows: auto; } }
.alat-kartu { display: flex; flex-direction: column; min-width: 0; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); font-family: var(--font-ui); }
.alat-kartu[hidden] { display: none; }
.prose .alat-kartu h3 { margin: 0; font-size: var(--t-md); }
.prose .alat-kartu .alat-situs { font-family: var(--mono); font-size: 12.5px; margin-bottom: var(--s3); }
.alat-kartu ol { list-style: none; counter-reset: lk; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s2); }
.prose .alat-kartu li { counter-increment: lk; position: relative; padding-left: 30px; margin: 0; font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2); }
.prose .alat-kartu li::before { content: counter(lk); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.alat-cek { margin-top: auto; border-radius: var(--r); background: var(--surface-2); overflow: hidden; }
.alat-cek > span { display: block; padding: 6px var(--s3) 0; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.prose .alat-cek pre { margin: 0; padding: 4px var(--s3) var(--s3); background: none; border: 0; font-size: 12.5px; }
.alat-cek code { display: block; white-space: pre-wrap; }

/* ---------- Halaman 404 (404.html, tanpa sidebar) ---------- */
.is-404 { min-height: 100vh; display: flex; flex-direction: column; }
.is-404 .site-foot { margin-left: 0; }
.nf { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: var(--s8) clamp(var(--s4), 4vw, var(--s7)); display: flex; flex-direction: column; justify-content: center; font-family: var(--font-ui); }
.nf-code { margin: 0; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .16em; color: var(--brand-strong); }
.nf h1 { margin: var(--s3) 0; font-size: clamp(32px, 5vw, 48px); line-height: 1.1; letter-spacing: -.035em; }
.nf-lede { margin: 0 0 var(--s5); max-width: 46ch; font-family: var(--font-read); font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.nf-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
