:root {
  --bg: #f6f7f9; --panel: #ffffff; --ink: #172026; --muted: #5d6b73; --line: #e3e8ec;
  --soft: #eef2f5; --accent: #0f7c8c; --warn-bg: #fff7e6; --warn-line: #f2c46d; --warn-ink: #7a4b00;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --role: var(--accent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1418; --panel: #161d22; --ink: #e8eef2; --muted: #9aa8b1; --line: #26313a;
    --soft: #1d262d; --warn-bg: #2a2212; --warn-line: #7a5a1a; --warn-ink: #f3d49a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --bg: #0f1418; --panel: #161d22; --ink: #e8eef2; --muted: #9aa8b1; --line: #26313a;
  --soft: #1d262d; --warn-bg: #2a2212; --warn-line: #7a5a1a; --warn-ink: #f3d49a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.65 "Plus Jakarta Sans", system-ui, sans-serif; }
a { color: var(--role); }
img { max-width: 100%; }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1280px; margin: 0 auto; height: 64px; padding: 0 16px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand .mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #0b3d91, #0f7c8c 55%, #e0700c); }
.brand b { display: block; font-size: 15px; line-height: 1.1; }
.brand small { display: block; font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a:hover { background: var(--soft); color: var(--ink); }
.tabs a.on { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; width: 40px; height: 40px; color: var(--ink); }

/* layout halaman peran */
.wrap { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; padding: 0 16px; }
.toc { position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow-y: auto; padding: 24px 0; }
.search { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; width: 100%; }
#toc { margin-top: 14px; display: flex; flex-direction: column; }
.toc-g { margin: 16px 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
#toc a { padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; border-left: 2px solid transparent; }
#toc a:hover { background: var(--soft); }
#toc a.on { color: var(--role); background: color-mix(in srgb, var(--role) 10%, transparent); font-weight: 600; }
#toc a.hide, .toc-g.hide { display: none; }
.pdf { margin-top: 20px; display: flex; align-items: center; gap: 8px; justify-content: center; padding: 10px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 14px;
  background: var(--role); color: #fff; }
main { min-width: 0; padding: 28px 0 60px; }
.hero-role { padding: 8px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--role) 12%, transparent); color: var(--role); }
.hero-role h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; margin: 14px 0 6px; letter-spacing: -.01em; }
.tagline { font-size: 18px; color: var(--muted); margin: 0 0 10px; }
.sec { padding: 26px 0 14px; border-bottom: 1px solid var(--line); }
.sec.hide { display: none; }
.sec h2 { font-size: 23px; margin: 0 0 10px; letter-spacing: -.01em; }
.lead { color: var(--ink); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0; }
.steps li { counter-increment: s; position: relative; padding: 2px 0 12px 44px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--role); color: #fff; }
.tips { padding-left: 20px; margin: 12px 0; }
.tips li { margin: 6px 0; }
.tips li::marker { color: var(--role); }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); border-radius: 12px; padding: 12px 16px; margin: 14px 0; }
.warn b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.warn p { margin: 4px 0 0; }
figure { margin: 18px 0 22px; }
figure img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--panel); cursor: zoom-in; }
figcaption { margin-top: 8px; font-size: 13.5px; color: var(--muted); text-align: center; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); }
.nores { padding: 30px 0; color: var(--muted); }
.foot { padding: 28px 0; color: var(--muted); font-size: 13.5px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(8, 12, 16, .86); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1500px, 100%); max-height: 100%; border-radius: 10px; }

/* beranda */
.home-main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hero { padding: 54px 0 20px; text-align: center; }
.hero h1 { font-size: clamp(34px, 6vw, 52px); margin: 0; letter-spacing: -.02em;
  background: linear-gradient(90deg, #0b3d91, #0f7c8c 50%, #e0700c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero > p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 12px auto 30px; }
.rcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: left; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 4px; border-top: 4px solid var(--c); transition: transform .15s; }
.rcard:hover { transform: translateY(-3px); }
.ri { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); margin-bottom: 8px; }
.rcard b { font-size: 18px; }
.rcard small { color: var(--c); font-weight: 600; }
.rcard p { color: var(--muted); font-size: 14px; margin: 6px 0 12px; flex: 1; }
.go { color: var(--c); font-weight: 700; font-size: 14px; }
.block { padding: 36px 0 6px; }
.block h2 { font-size: 24px; margin: 0 0 6px; }
.muted { color: var(--muted); margin-top: 0; }
.apps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 16px; }
.app { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; border-left: 4px solid var(--c); }
.app b { font-size: 17px; color: var(--c); }
.app small { display: block; font-weight: 600; font-size: 12.5px; }
.app p { font-size: 13.5px; color: var(--muted); margin: 8px 0; }
.app span { font-size: 12.5px; font-weight: 600; }
.tbl { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--soft); }
tr:last-child td { border-bottom: 0; }

@media (max-width: 980px) {
  .rcards { grid-template-columns: repeat(2, 1fr); }
  .apps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .tabs { display: none; }
  .menu-btn { display: grid; place-items: center; }
  .wrap { display: block; }
  .toc { position: fixed; inset: 64px 0 0 0; height: auto; background: var(--bg); z-index: 15; padding: 16px; display: none; }
  body.toc-open .toc { display: block; }
  body.home .menu-btn { display: none; }
}
@media (max-width: 560px) {
  .rcards, .apps { grid-template-columns: 1fr; }
  body { font-size: 15px; }
}

/* cetak / PDF */
@media print {
  .top, .toc, .lightbox, .pdf { display: none !important; }
  .wrap { display: block; max-width: none; padding: 0; }
  main { padding: 0; }
  body { background: #fff; color: #111; font-size: 11.5pt; }
  .sec { break-inside: auto; border: 0; padding-top: 12px; }
  .sec h2 { break-after: avoid; }
  figure { break-inside: avoid; }
  figure img { box-shadow: none; max-height: 125mm; width: auto; margin: 0 auto; }
  .faq details { break-inside: avoid; }
  .faq details > p { display: block; }
  a { color: inherit; text-decoration: none; }
  @page { size: A4; margin: 16mm 14mm; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero h1 { background: linear-gradient(90deg, #7fb5ff, #4fd1c5 50%, #ffb366); -webkit-background-clip: text; background-clip: text; }
}
:root[data-theme="dark"] .hero h1 { background: linear-gradient(90deg, #7fb5ff, #4fd1c5 50%, #ffb366); -webkit-background-clip: text; background-clip: text; }
