/* =====================================================================
   Playwright Academy — design tokens & komponen
   Satu aksen (hijau), satu sistem sudut (6 / 10 / 16 px, pill hanya untuk
   chip & progress), warna status hanya untuk peringatan dan bahaya.
   ===================================================================== */
:root {
  /* Warna (terang) */
  --bg: #f5f6f3;
  --surface: #fcfcfa;
  --surface-2: #eef0eb;
  --ink: #1b1f24;
  --ink-2: #3a4049;
  --muted: #5a616d;
  --line: #dde0d8;
  --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;

  /* 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: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-read: "Atkinson Hyperlegible", "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "JetBrains 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: 6px;
  --r: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Tata letak */
  --topbar: 60px;
  --sidebar: 288px;
  --measure: 740px;
  --toc: 220px;
  --shadow: 0 1px 2px rgba(27, 31, 36, .05), 0 4px 16px rgba(27, 31, 36, .05);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111316; --surface: #181b1f; --surface-2: #20242a; --ink: #e9ebee; --ink-2: #c6cad1; --muted: #9ba2ae;
    --line: #2c3139; --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;
    --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 rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111316; --surface: #181b1f; --surface-2: #20242a; --ink: #e9ebee; --ink-2: #c6cad1; --muted: #9ba2ae;
  --line: #2c3139; --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;
  --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 rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ---------- Dasar ---------- */
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar) + var(--s5)); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: var(--t-md); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-strong); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
main:focus:not(: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: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 17px; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand b { color: var(--brand); font-weight: 800; }
.brand-mark { font-size: 22px; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); width: 38px; height: 38px; border-radius: var(--r); cursor: pointer; display: grid; place-items: center; flex: none; color: var(--ink-2); }
.icon-btn:hover { border-color: var(--brand); color: var(--ink); }
.menu-btn { display: none; }
#theme-btn .i-sun { display: none; }
: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 { margin-left: auto; display: flex; align-items: center; gap: var(--s2); font-size: var(--t-xs); font-weight: 700; color: var(--muted); text-decoration: none; padding: 6px 8px; border-radius: var(--r); }
.progress-pill:hover { color: var(--ink); background: var(--surface-2); }
.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: 1px solid var(--line); border-radius: var(--r); padding: 3px; gap: 2px; }
.lang-switch button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 700; 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); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.ts-short { display: none; }

/* Bilah progress baca (hanya di halaman modul, digerakkan oleh scroll-timeline CSS) */
.read-progress { position: fixed; top: var(--topbar); 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; border-right: 1px solid var(--line); padding: var(--s4) var(--s3) var(--s7); background: var(--bg); scrollbar-width: thin; }
.search { position: relative; }
.search input { width: 100%; padding: 9px 36px 9px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-sm); }
.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: 7px 10px; border-radius: var(--r); 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(--ink); font-weight: 700; }
.nav-link .ico { width: 24px; text-align: center; flex: none; font-size: 15px; }
.nav-link .num { flex: none; width: 24px; height: 24px; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.nav-link.active .num { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand); }
.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) 10px var(--s2); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.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; }
  .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; }
  .progress-track { width: 64px; }
}
@media (max-width: 640px) {
  .topbar { gap: var(--s2); padding: 0 var(--s3); }
  .brand-name, .progress-pill { display: none; }
  .topbar .lang-switch { margin-left: auto; }
  .lang-switch button { padding: 6px 10px; }
  main { padding-top: var(--s5); }
}
@media (max-width: 380px) {
  .ts-long { display: none; }
  .ts-short { display: inline; }
}

/* ---------- Tipografi materi ---------- */
.prose { font-family: var(--font-read); font-size: var(--t-body); line-height: 1.7; 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, var(--t-2xl)); line-height: 1.15; letter-spacing: -.02em; margin: var(--s2) 0 var(--s3); font-weight: 800; color: var(--ink); }
.prose h2 { font-size: var(--t-xl); line-height: 1.25; letter-spacing: -.01em; margin: var(--s8) 0 var(--s3); font-weight: 800; scroll-margin-top: calc(var(--topbar) + var(--s5)); }
.prose h3 { font-size: var(--t-lg); line-height: 1.3; margin: var(--s6) 0 var(--s2); font-weight: 700; }
.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: 700; color: var(--ink); white-space: nowrap; }
.prose td code { white-space: nowrap; overflow-wrap: normal; }

/* ---------- Header modul ---------- */
.mod-hero { padding-bottom: var(--s5); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); font-size: var(--t-xs); letter-spacing: .06em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.crumbs .crumb-phase { color: var(--brand); }
.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); }
.goals { margin-top: var(--s5); padding: var(--s4) var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.goals-title { font-size: var(--t-sm); font-weight: 800; color: var(--ink); margin-bottom: var(--s2); }
.goals ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.goals li { display: flex; gap: 10px; align-items: flex-start; font-family: var(--font-read); font-size: 16.5px; color: var(--ink-2); line-height: 1.5; }
.goals li::before { content: "✓"; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-family: var(--font-ui); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }

.docs-links { margin: var(--s4) 0 0; font-size: var(--t-sm); color: var(--muted); }
.stepper { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
@media (max-width: 640px) { .stepper { grid-template-columns: 1fr 1fr; } }
.stepper a { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; font-size: var(--t-sm); font-weight: 700; line-height: 1.35; height: 100%; }
.stepper a:hover { border-color: var(--brand); color: var(--ink); }
.stepper small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stepper .step-no { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--surface-2); color: var(--muted); margin-top: 1px; }
.stepper a.done { border-color: var(--brand-soft); background: var(--brand-soft); }
.stepper a.done .step-no { background: var(--brand); color: var(--on-brand); font-size: 0; }
.stepper a.done .step-no::before { content: "✓"; font-size: 12px; }
.stepper a.done small { color: var(--brand-strong); }

/* ---------- 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); 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: 800; font-size: var(--t-sm); margin-bottom: var(--s1); color: var(--ink); }
.callout.tip { background: var(--brand-soft); }
.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); }
.callout.story { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); }
.callout.pro { background: var(--surface); border: 1px dashed var(--line); }
.callout.pro ul { margin: var(--s2) 0 0; padding-left: 1.2em; }
.callout.pro li { margin: var(--s2) 0; }
.callout.story .callout-title { color: var(--brand-strong); }
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: var(--r); 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: 700; 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: 4px 10px; border-radius: var(--r-sm); cursor: pointer; font-weight: 700; }
.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; }
.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: 800; letter-spacing: .04em; padding: 2px 8px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-strong); white-space: nowrap; flex: none; }
@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 .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 ---------- */
.quiz { margin: var(--s7) 0 var(--s6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; font-family: var(--font-ui); }
.quiz-head { padding: var(--s4) var(--s5); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.quiz-head h3 { margin: 0; font-size: var(--t-lg); }
.quiz-score { font-weight: 800; color: var(--brand-strong); font-size: var(--t-sm); background: var(--brand-soft); padding: 3px 10px; border-radius: var(--r-pill); }
.quiz-best { font-size: var(--t-xs); color: var(--muted); font-weight: 700; margin-left: var(--s2); }
.q { padding: var(--s5); }
.q + .q { border-top: 1px solid var(--line); }
.q-text { font-weight: 700; color: var(--ink); margin-bottom: var(--s3); font-size: var(--t-md); line-height: 1.5; }
.opts { display: grid; gap: var(--s2); }
.opt { text-align: left; border: 1.5px solid var(--line); background: var(--bg); border-radius: var(--r); padding: 10px 14px; cursor: pointer; color: var(--ink-2); font-size: var(--t-md); line-height: 1.45; display: flex; gap: var(--s3); align-items: flex-start; font-family: var(--font-read); }
.opt:hover:not(:disabled) { border-color: var(--brand); color: var(--ink); }
.opt .letter { font-family: var(--font-ui); font-weight: 800; color: var(--muted); flex: none; width: 22px; height: 22px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-2); font-size: 12px; }
.opt.correct { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.opt.correct .letter { background: var(--brand); color: var(--on-brand); }
.opt.wrong { border-color: var(--danger-ink); background: var(--danger-soft); color: var(--ink); }
.opt.wrong .letter { background: var(--danger-ink); color: var(--surface); }
.opt:disabled { cursor: default; }
.explain { margin-top: var(--s3); font-family: var(--font-read); font-size: var(--t-md); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--surface-2); color: var(--ink-2); line-height: 1.55; }
.quiz-foot { padding: var(--s3) var(--s5); display: flex; justify-content: space-between; align-items: center; gap: var(--s3); border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.quiz-result { font-size: var(--t-sm); font-weight: 700; color: var(--ink-2); }

/* ---------- Tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); border: 1.5px solid var(--brand); background: var(--brand); color: var(--on-brand); padding: 11px 18px; border-radius: var(--r); font-weight: 700; cursor: pointer; text-decoration: none; font-size: var(--t-md); line-height: 1.2; font-family: var(--font-ui); }
.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); }
.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); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; background: var(--surface); color: var(--ink); font-weight: 700; line-height: 1.4; }
.pager a:hover { border-color: var(--brand); color: var(--ink); }
.pager small { display: block; color: var(--muted); font-size: var(--t-xs); font-weight: 700; margin-bottom: 2px; }
.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; }
}
.recap { margin-top: var(--s6); padding: var(--s4) var(--s5); background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); }
.recap h3 { margin-top: 0; }

/* ---------- Beranda ---------- */
.hero { padding: var(--s5) 0 var(--s6); border-bottom: 1px solid var(--line); }
.eyebrow { font-size: var(--t-xs); letter-spacing: .07em; text-transform: uppercase; font-weight: 800; color: var(--brand); }
.hero h1 { font-size: clamp(32px, 5vw, 44px); margin-top: var(--s2); text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { font-family: var(--font-read); font-size: var(--t-lg); line-height: 1.55; max-width: 46ch; color: var(--ink-2); margin: 0 0 var(--s5); }
.hero-lang { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s5); font-size: var(--t-sm); font-weight: 700; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.hero-meta { margin: var(--s5) 0 0; font-size: var(--t-sm); color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px var(--s4); }
.hero-meta span { white-space: nowrap; }
.hero-progress { margin-top: var(--s5); display: grid; gap: 6px; max-width: 420px; }
.hero-progress .bar { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.hero-progress .bar span { display: block; height: 100%; background: var(--brand); border-radius: var(--r-pill); }
.hero-progress small { font-size: var(--t-sm); color: var(--muted); font-weight: 600; }
@media (max-width: 640px) {
  .hero { padding-top: 0; }
  .hero-actions .btn { flex: 1 1 auto; }
}

.home-section { margin-top: var(--s7); }
.home-section > h2 { font-size: var(--t-xl); margin: 0 0 var(--s2); font-weight: 800; letter-spacing: -.01em; }
.home-section > p.sub { margin: 0 0 var(--s4); color: var(--muted); font-family: var(--font-read); font-size: 16.5px; }
.steps { counter-reset: s; display: grid; gap: var(--s3); margin: var(--s4) 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { display: flex; gap: var(--s3); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.step::before { counter-increment: s; content: counter(s); flex: none; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; font-weight: 800; font-size: var(--t-sm); }
.step p { margin: 0; font-family: var(--font-read); font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.step b { color: var(--ink); }

/* Silabus sebagai daftar berurutan */
.phase { margin-top: var(--s6); }
.phase-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.phase-head h3 { margin: 0; font-size: var(--t-lg); font-weight: 800; }
.phase-head p { margin: 2px 0 0; color: var(--muted); font-family: var(--font-read); font-size: 15.5px; }
.phase-count { font-size: var(--t-xs); font-weight: 800; color: var(--muted); white-space: nowrap; }
.mlist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.mlist li + li { border-top: 1px solid var(--line); }
.mrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s3) var(--s4); text-decoration: none; color: var(--ink); }
.mrow:hover { background: var(--surface-2); color: var(--ink); }
.mrow .n { width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; font-weight: 800; font-size: var(--t-sm); background: var(--surface-2); color: var(--muted); }
.mrow.done .n { background: var(--brand); color: var(--on-brand); }
.mrow.next .n { box-shadow: inset 0 0 0 2px var(--brand); color: var(--brand); background: var(--surface); }
.mrow .t { font-weight: 700; line-height: 1.35; }
.mrow .s { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-sm); font-family: var(--font-read); margin-top: 2px; line-height: 1.45; }
.mrow .meta { font-size: var(--t-xs); color: var(--muted); font-weight: 700; text-align: right; white-space: nowrap; }
.mrow .meta b { display: block; color: var(--brand-strong); }
@media (max-width: 560px) {
  .mrow { grid-template-columns: 30px minmax(0, 1fr); gap: var(--s3); }
  .mrow .n { width: 30px; height: 30px; }
  .mrow .meta { grid-column: 2; text-align: left; }
  .mrow .meta b { display: inline; margin-right: 6px; }
}

/* ---------- 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 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; 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: 10px 18px; border-radius: var(--r); font-weight: 700; 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: brief jelas, jawaban tertutup, centang "sudah dicoba" ---------- */
.latihan { margin: var(--s5) 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: calc(var(--topbar) + var(--s4)); }
.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-lg); line-height: 1.3; }
.latihan-no { font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 800; color: var(--brand-strong); background: var(--brand-soft); padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.latihan-brief { padding: var(--s2) var(--s5) var(--s3); }
.latihan-brief > :first-child { margin-top: var(--s2); }
.latihan-brief ol, .latihan-brief ul { margin: var(--s2) 0; }
.latihan-answer { margin: 0 var(--s5) var(--s4); border: 1px dashed var(--line); border-radius: var(--r); background: var(--bg); }
.latihan-answer > summary { cursor: pointer; padding: var(--s3) var(--s4); display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; font-family: var(--font-ui); list-style: none; }
.latihan-answer > summary::-webkit-details-marker { display: none; }
.latihan-answer > summary::before { content: "▸"; color: var(--muted); transition: transform .15s ease; display: inline-block; }
.latihan-answer[open] > summary::before { transform: rotate(90deg); }
.latihan-answer .la-title { font-weight: 800; color: var(--ink); }
.latihan-answer .la-hint { font-size: var(--t-xs); color: var(--muted); }
.latihan-answer .la-body { padding: 0 var(--s4) var(--s3); }
.latihan-answer .la-body > :first-child { margin-top: 0; }
.latihan-done { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); border-top: 1px solid var(--line); background: var(--surface-2); font-family: var(--font-ui); font-weight: 700; 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.tried { border-color: var(--brand); }
.latihan.tried .latihan-done { background: var(--brand-soft); color: var(--brand-strong); }
.code-title small { font-weight: 600; color: var(--code-muted); margin-left: 6px; }

/* ---------- Kuis: brief di bagian atas ---------- */
.quiz-brief { margin: 0; padding: var(--s3) var(--s5); background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- Kunci fase ---------- */
.review-banner { display: flex; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); flex-wrap: wrap; padding: var(--s4) var(--s5); margin: 0 0 var(--s5); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--r); background: var(--surface); font-family: var(--font-ui); }
.review-banner p { margin: 4px 0 0; font-size: var(--t-sm); color: var(--ink-2); max-width: 70ch; }
.phase-lock { display: inline-block; margin-top: var(--s2); font-family: var(--font-ui); font-size: var(--t-xs); font-weight: 800; padding: 3px 10px; border-radius: var(--r-pill); }
.phase-lock.locked { background: var(--warn-soft); color: var(--warn-ink); }
.phase-lock.open { background: var(--brand-soft); color: var(--brand-strong); }
.phase.is-locked .mlist { opacity: .6; }
.phase-group.locked .nav-link[data-id] { color: var(--muted); }
.phase-group.locked .phase-title > .row > span:first-child::after { content: " 🔒"; }
.locked-page .lock-list { list-style: none; padding: 0; display: grid; gap: var(--s2); }
.locked-page .lock-list li { display: grid; gap: 2px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.locked-page .lock-list span { font-size: var(--t-sm); color: var(--muted); }
