@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/figtree-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #1b1b1b;
  --surface: #242424;
  --surface-hover: #2c2c2c;
  --line: #333333;
  --line-strong: #444444;
  --text: #f2f2f2;
  --text-2: #a5a5a5;
  --text-3: #8f8f8f; /* kontras ≥ 4,5:1 di --bg dan --surface (WCAG AA) */
  --accent: #f4d03f;
  --page-max: 1040px;
  --reading-max: 760px;
  --gutter: clamp(20px, 5vw, 40px); /* sama dengan src/site.css supaya header tidak bergeser antarhalaman */
  color-scheme: dark;
}
html {
  scrollbar-gutter: stable; /* halaman pendek tetap menyisakan ruang scrollbar, jadi header tidak bergeser */
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background-color: var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-size-adjust: from-font;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }

.wrap { max-width: var(--page-max); margin: 0 auto; padding-inline: var(--gutter); }
.prose-wrap { max-width: var(--reading-max); margin: 0 auto; padding-inline: var(--gutter); }

/* Header seragam dengan shell aplikasi */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { white-space: nowrap; font-weight: 600; color: inherit; text-decoration: none; margin-right: auto; font-size: 1rem; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { white-space: nowrap; color: var(--text-2); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: #fff; }

.chat-btn {
  background: #f2f2f2;
  color: #101010;
  text-decoration: none;
  border-radius: 10px; /* ukuran sama dengan Button sm Astryx di halaman React */
  padding: 0 12px;
  font-size: 0.875rem;
  font-weight: 500;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.chat-btn:hover { background: #fff; }

.menu-btn {
  display: none; font: inherit; font-size: 0.875rem; cursor: pointer;
  height: 32px; padding-inline: 12px;
  color: #fff; background: transparent;
  border: 1px solid #3a3a3a; border-radius: 8px;
}
.menu-btn:hover { border-color: var(--accent); }
.mobile-nav { display: none; }

/* Tombol ID/EN: ukuran sama dengan .menu-btn */
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; min-width: 40px; padding-inline: 10px;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  border: 1px solid #3a3a3a; border-radius: 8px;
}
.lang-switch:hover { color: #fff; border-color: var(--accent); }
@media (max-width: 900px), (pointer: coarse) { .lang-switch { height: 44px; min-width: 44px; } }
/* Layar sangat sempit: tombol bahasa pindah ke menu seluler supaya Chat dan Menu tidak terjepit */
.lang-menu { display: none; }
@media (max-width: 380px) {
  .lang-switch { display: none; }
  .lang-menu { display: block; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-block; }
  .site-header .wrap { gap: 12px; }
  .mobile-nav:not([hidden]) {
    display: grid; padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-top: 1px solid var(--line);
  }
  .mobile-nav a { padding: 12px 0; color: #fff; text-decoration: none; border-bottom: 1px solid var(--line); }
  .mobile-nav a[aria-current='page'] { color: var(--accent); }
}

main { padding-block: 40px 64px; }
h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 8px 0 12px; text-wrap: balance; }
h2 { font-size: 1.5rem; line-height: 1.3; font-weight: 600; margin: 40px 0 12px; text-wrap: balance; }
.lead { color: var(--text-2); font-size: 1.125rem; }
.crumb, .meta { color: var(--text-2); font-size: 0.9375rem; margin: 0; }
.crumb a { color: var(--text-2); text-decoration: none; }
.crumb a:hover { color: #fff; }

/* Kategori Nav Pills */
.category-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-block: 24px 20px;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.cat-pill:hover {
  border-color: var(--line-strong);
  color: #fff;
}
.cat-pill.active {
  background: #f2f2f2;
  color: #101010;
  border-color: #f2f2f2;
}

/* Kotak Pencarian Artikel */
.search-box {
  margin-bottom: 28px;
  position: relative;
}
.search-input {
  width: 100%;
  max-width: 520px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
}
.search-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Grid Artikel */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
  height: 100%;
}
.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.article-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.8125rem;
}
.article-cat-badge {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.article-time {
  color: var(--text-3);
}
.article-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
  color: #fff;
}
.article-desc {
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}
.article-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: auto;
}

/* Pagination Bar */
.pagination {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.page-btn:hover {
  border-color: var(--line-strong);
  color: #fff;
}
.page-btn.active {
  background: #f2f2f2;
  color: #101010;
  border-color: #f2f2f2;
  font-weight: 600;
}
.page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Detail Artikel */
.prose p, .prose li { color: #dcdcdc; }
/* Panjang baris enak dibaca (< 80 karakter); tabel dan gambar tetap selebar kolom */
.prose-wrap p, .prose-wrap li { max-width: 56ch; }
.tool-list li { max-width: none; }
::placeholder { color: var(--text-2); opacity: 1; }
.dg-vars .dg-muted { color: var(--text-2); }
/* Kotak sorotan selebar kolom teks supaya sejajar satu sama lain */
.prose-wrap .tldr, .prose-wrap .data-box, .prose-wrap .cta, .prose-wrap .tool-banner, .prose-wrap .essay-note { max-width: 62ch; }
.prose-wrap .data-box p, .prose-wrap .cta p { max-width: none; }
p, li { text-wrap: pretty; }
h3 { text-wrap: balance; }
.prose h3 { margin: 32px 0 8px; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li + li { margin-top: 6px; }
.prose strong { color: #fff; }
.prose pre {
  background: #111;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  overflow-x: auto;
  font-size: 0.9rem;
  color: #e0e0e0;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.prose :not(pre) > code {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  color: #f4d03f;
}
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.975rem; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text-2); font-weight: 500; }
.prose em { font-style: normal; background: var(--surface); padding: 0 6px; border-radius: 4px; }

/* Tulisan pribadi: kutipan, pemisah, tabel yang bisa digeser, catatan asal tulisan */
.prose blockquote { margin: 24px 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--line-strong); }
.prose blockquote p { color: var(--text-2); margin: 0; }
.prose blockquote p + p { margin-top: 10px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.table-scroll { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 8px; }
.table-scroll table { margin: 0; min-width: 560px; }
.table-scroll tbody tr:last-child td { border-bottom: 0; }
.article-thumb { display: block; width: calc(100% + 48px); max-width: none; height: auto; margin: -24px -24px 18px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px 12px 0 0; background: var(--surface-hover); }
.essay-figure { margin: 24px 0 8px; }
.essay-figure img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--surface); }
.essay-figure--wide img { aspect-ratio: 3 / 2; object-fit: cover; max-height: 480px; }
.essay-figure--portrait { max-width: 380px; }
.essay-figure--ilustrasi img { aspect-ratio: 1400 / 788; object-fit: contain; border: 1px solid var(--line); }
.essay-figure figcaption { margin-top: 10px; color: var(--text-3); font-size: 0.8125rem; line-height: 1.5; }
.essay-figure figcaption a { color: var(--text-2); }
.essay-note { margin-top: 48px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 0.9375rem; }
.essay-note p { margin: 0 0 10px; color: var(--text-2); }
.essay-note p:last-child { margin-bottom: 0; }

.tldr { margin: 20px 0 8px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: #e6e6e6; }
.tldr strong { color: #fff; }

.cta { margin-top: 48px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.cta h2 { margin-top: 0; }
.cta p { color: var(--text-2); }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border: 1px solid #3a3a3a; border-radius: 8px; color: var(--text); text-decoration: none; margin: 4px 8px 4px 0; }
.btn.primary { background: #f2f2f2; color: #101010; border-color: #f2f2f2; }
.related ul { padding-left: 1.2em; }
.related li { margin: 6px 0; }

/* Tool banner callout */
.tool-banner {
  margin-top: 36px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.tool-banner-copy strong { color: #fff; font-size: 1.05rem; display: block; margin-bottom: 4px; }
.tool-banner-copy p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 28px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer p { margin: 0; color: var(--text-2); font-size: 0.875rem; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Floating WhatsApp Button (Mobile) */
.fab-wa {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  background: #25d366;
  color: #05260f;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fab-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  color: #05260f;
}
.fab-dot {
  width: 8px;
  height: 8px;
  background: #05260f;
  border-radius: 50%;
  display: inline-block;
}
/* Ruang di bawah footer supaya tombol WhatsApp tidak menutupi tautan terakhir */
@media (max-width: 899px) {
  .site-footer { padding-bottom: 84px; }
}
@media (min-width: 900px) {
  .fab-wa { display: none; }
}

/* /alat/: kalkulator, tabel statistik panjang, daftar alat */
.tool { margin: 28px 0; padding: 20px 24px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tool h2 { margin: 0 0 16px; font-size: 1.25rem; }
.tool-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.tool label { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 0.9375rem; }
.tool label[hidden] { display: none; }
.tool input, .tool select {
  min-height: 44px; padding: 8px 12px; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; width: 100%;
}
.tool input:focus-visible, .tool select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.tool-out { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-2); font-variant-numeric: tabular-nums; }
.tool-out .big { color: var(--text); font-size: 1.75rem; font-weight: 600; line-height: 1.2; }
.tool-out .verdict { color: var(--text); font-weight: 500; padding-left: 12px; border-left: 3px solid var(--line-strong); }
.tool-out .verdict.ok { border-left-color: var(--accent); }
.data-table { max-height: 70vh; overflow: auto; }
.data-table table { min-width: 0; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.data-table caption { caption-side: top; text-align: left; padding: 12px 14px; color: var(--text-2); font-size: 0.875rem; }
.data-table thead th { position: sticky; background: var(--surface); z-index: 1; text-align: right; }
.data-table thead tr:first-child th { top: 0; }
.data-table thead tr:nth-child(2) th { top: 41px; }
.data-table th, .data-table td { padding: 8px 14px; text-align: right; white-space: nowrap; }
.data-table tbody th { color: var(--text-2); font-weight: 500; }
.data-table thead th[scope='row'], .data-table thead tr:only-child th:first-child, .data-table tbody th { text-align: left; }
.data-table tbody tr { scroll-margin-top: 96px; }
.data-table tbody tr:hover { background: var(--surface-hover); }
.data-table tbody tr:target { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.data-table tbody tr:target th { color: var(--text); }
.note { color: var(--text-3) !important; font-size: 0.875rem; }
.tool-list { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 12px; }
.tool-list a { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; }
.tool-list a:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.tool-list strong { font-size: 1.0625rem; }
.tool-list span { color: var(--text-2); font-size: 0.9375rem; }
/* Kartu bergambar di /alat/: ilustrasi garis dari src/playground-art.js, gaya sama dengan kartu /playground/ */
.tool-list:has(.tool-art) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.tool-list a:has(.tool-art) { display: grid; grid-template-rows: auto 1fr; gap: 0; padding: 0; overflow: hidden; height: 100%; transition: border-color 0.15s ease; }
.tool-list a:has(.tool-art):hover, .tool-list a:has(.tool-art):focus-visible { border-color: var(--text); background: var(--surface); }
.tool-list .tool-art { display: grid; place-items: center; padding: 20px 20px 16px; background: #1f1f1f; border-bottom: 1px solid var(--line); }
.tool-list .tool-isi { display: grid; gap: 6px; align-content: start; padding: 16px 20px 20px; color: var(--text); font-size: 1rem; }
.tool-list .tool-isi span { line-height: 1.5; text-wrap: pretty; }
.pg-art { width: 100%; max-width: 200px; height: auto; aspect-ratio: 160 / 96; color: rgba(242, 242, 242, 0.92); overflow: visible; }
.pg-art * { stroke-width: 1.75px; vector-effect: non-scaling-stroke; }
.pg-art .mu { stroke: rgba(242, 242, 242, 0.38); }
.pg-art .ds { stroke-dasharray: 4 4; }
.pg-art .ac { stroke: var(--accent); }
.pg-art .fa { fill: var(--accent); stroke: none; }
.pg-art .fl { fill: rgba(242, 242, 242, 0.92); stroke: none; }
.pg-art .fm { fill: rgba(242, 242, 242, 0.3); stroke: none; }
.pg-art .mv { transition: transform 0.25s ease; }
.tool-list a:hover .pg-art .mv, .tool-list a:focus-visible .pg-art .mv { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .tool-list a:hover .pg-art .mv, .tool-list a:focus-visible .pg-art .mv { transform: none; } .tool-list a { transition: none; } }
@media (max-width: 640px) {
  .tool-list a:has(.tool-art) { grid-template-rows: none; grid-template-columns: 104px minmax(0, 1fr); }
  .tool-list .tool-art { padding: 12px; border-bottom: 0; border-right: 1px solid var(--line); }
  .tool-list .tool-isi { padding: 14px 16px; }
}
.tool-wide { grid-column: 1 / -1; margin-bottom: 12px; }
.tool textarea {
  min-height: 180px; padding: 10px 12px; font: 0.9375rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; width: 100%; resize: vertical; tab-size: 6;
}
.tool textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.tool-row .btn { margin: 0; font: inherit; font-size: 0.9375rem; background: transparent; cursor: pointer; }
.tool-row .btn.primary { background: #f2f2f2; }
.tool-row .btn:disabled { opacity: 0.6; cursor: progress; }
.file-btn { position: relative; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.vr-out { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.vr-out h3 { margin: 28px 0 4px; font-size: 1.0625rem; }
.vr-out .table-scroll table { min-width: 0; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.vr-out .table-scroll th { white-space: normal; min-width: 7ch; }
.vr-sum { color: var(--text-2); }
.vr-sum strong { color: var(--text); }

/* Output SPSS dan kotak data latihan di panduan */
.spss-out { margin: 20px 0 24px; }
.spss-out figcaption { color: var(--text); font-weight: 600; font-size: 0.9375rem; margin-bottom: 8px; }
.spss-out .table-scroll { margin: 0; }
.spss-out table { min-width: 0; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.spss-out th, .spss-out td { white-space: nowrap; }
.spss-out thead th { white-space: normal; min-width: 8ch; vertical-align: bottom; }
.spss-out tbody th { color: var(--text); font-weight: 500; }
.spss-foot { margin: 8px 0 0; color: var(--text-3) !important; font-size: 0.8125rem; }
.data-box { margin: 24px 0; padding: 18px 20px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 12px; }
.data-box p { margin: 0 0 10px; }
.data-box p:last-child { margin-bottom: 0; }
.data-box .btn { margin: 0 8px 4px 0; min-height: 40px; padding: 8px 16px; }
.data-dl p:last-child { margin-bottom: 0; }
.data-dl .btn { margin: 0 8px 8px 0; }
.spss-out th, .spss-out td { padding: 8px 10px; }
.spss-out table { font-size: 0.875rem; }

/* /alat/generator-data-spss/ */
.visually-hidden { position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; white-space: nowrap; }
.dg { accent-color: var(--accent); }
.dg fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.dg legend { padding: 0; margin-bottom: 12px; color: var(--text); font-weight: 500; }
.dg-kasus { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px !important; }
.dg-kasus legend { grid-column: 1 / -1; }
.dg .dg-card { position: relative; display: flex; flex-direction: row; gap: 12px; align-items: flex-start; padding: 16px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.dg .dg-card:hover { background: var(--surface-hover); }
.dg .dg-card:has(input:checked) { border-color: var(--accent); }
.dg .dg-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.dg .dg-card input { width: 18px; height: 18px; min-height: 0; margin: 4px 0 0; padding: 0; flex: none; }
.dg-card > span { display: flex; flex-direction: column; gap: 4px; line-height: 1.4; }
.dg-card strong { color: var(--text); font-weight: 500; }
.dg-card > span > span { color: var(--text-2); font-size: 0.875rem; }
.dg-group { margin-top: 28px !important; padding-top: 20px !important; border-top: 1px solid var(--line) !important; }
.dg-help { margin: 8px 0 0; color: var(--text-3); font-size: 0.875rem; line-height: 1.5; }
.dg .dg-check { flex-direction: row; align-items: center; gap: 10px; margin-top: 12px; color: var(--text-2); cursor: pointer; line-height: 1.4; }
.dg .dg-check input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: none; }
.dg-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 16px; margin-bottom: 16px; }
.dg-checks .dg-check { margin-top: 8px; }
/* visually-hidden (position absolute) di dalam tabel harus terpotong oleh wadah geser, bukan oleh halaman */
.dg .table-scroll { position: relative; }
.dg .dg-vars-wrap { border: 0; border-radius: 0; } /* tabel di dalam panel alat: tanpa bingkai kedua */
.dg-vars-wrap { margin: 0 0 12px; }
.dg-vars-wrap table.dg-vars { min-width: 600px; margin: 0; font-size: 0.9375rem; }
.dg-vars th { padding: 8px 6px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.dg-vars td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dg-vars tbody tr:last-child td { border-bottom: 0; }
.dg .dg-vars input, .dg .dg-vars select { min-height: 40px; padding: 6px 10px; font-size: 0.9375rem; }
.dg .dg-vars .dg-nama { width: 8ch; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dg .dg-vars .dg-label { min-width: 14ch; }
.dg .dg-vars select { width: auto; min-width: 7ch; }
.dg .dg-vars .dg-rx { min-width: 26ch; }
.dg-vars tr[data-peran='y'] td, .dg-vars tr[data-peran='z'] td { background: color-mix(in srgb, var(--text) 3%, transparent); }
.dg-col-z { display: none; }
.dg.dg-med .dg-col-z { display: table-cell; }
.dg-del { min-height: 36px; padding: 4px 12px; font: inherit; font-size: 0.875rem; color: var(--text-2); background: transparent; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
.dg-del:hover { color: var(--text); border-color: var(--text-3); }
.dg-del:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dg-muted { color: var(--text-3); font-size: 0.875rem; }
.dg .dg-vars [aria-invalid='true'], .dg input[aria-invalid='true'] { border-color: #e07a6a; }
.dg-adv { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.dg-adv summary { cursor: pointer; color: var(--text-2); width: fit-content; }
.dg-adv summary:hover { color: var(--text); }
.dg-adv summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.dg-adv[open] summary { margin-bottom: 16px; }
.dg-submit { margin: 24px 0 0; }
.dg-out:empty { display: none; }
.dg-out { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.dg-out h3 { margin: 28px 0 8px; font-size: 1.0625rem; }
.dg-sum { margin: 0 0 16px; color: var(--text-2); }
.dg-sum strong { color: var(--text); font-weight: 500; }
.dg-err { margin: 0; padding-left: 12px; border-left: 3px solid #e07a6a; color: var(--text); }
.dg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dg-actions .btn { margin: 0; font: inherit; font-size: 0.9375rem; background: transparent; cursor: pointer; }
.dg-actions .btn.primary { background: #f2f2f2; color: #101010; }
.dg-actions .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dg-code { color: var(--text-2); font-size: 0.9375rem; }
.dg-code code { margin-left: 6px; padding: 4px 8px; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; font-size: 0.875rem; letter-spacing: 0.04em; }
.dg-copy { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.dg-tip { color: var(--text-2); font-size: 0.875rem; }
.dg-cek, .dg-dv, .dg-vv { margin: 0 !important; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.dg-cek { min-width: 640px; }
.dg-cek th[scope='row'] { font-weight: 400; color: var(--text); }
.dg-cek td:last-child { white-space: nowrap; }
.dg-cek .dg-grp th { padding-top: 16px; color: var(--text-2); font-weight: 500; font-size: 0.875rem; border-bottom: 1px solid var(--line-strong); }
.dg-cek tr.is-ok td:last-child { color: var(--text); }
.dg-cek tr.is-ok td:last-child::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.dg-cek tr.is-miss td:last-child { color: #f0a090; }
.dg-cek tr.is-miss td:last-child::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; border: 2px solid #e07a6a; vertical-align: 0; box-sizing: border-box; }
.dg-dv-wrap { max-height: 420px; overflow: auto; }
.dg-dv-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dg-dv { width: auto !important; min-width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem !important; }
.dg-dv th, .dg-dv td { padding: 6px 12px !important; text-align: right !important; white-space: nowrap; border-bottom: 1px solid var(--line); border-right: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.dg-dv thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); color: var(--text-2); font-weight: 500; }
.dg-dv tbody th { position: sticky; left: 0; background: var(--surface); color: var(--text-3); font-weight: 400; }
.dg-dv thead th:first-child { left: 0; z-index: 2; }
.dg-miss { color: var(--text-3); }
.dg-vv { min-width: 640px; }
.dg-vv th[scope='row'] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 400; font-size: 0.875rem; }
.dg-vv td:last-child { color: var(--text-2); font-size: 0.875rem; }
/* Alat ini butuh ruang lebih dari kolom baca: melebar ke samping di layar lebar */
@media (min-width: 1000px) {
  .tool.dg { margin-inline: -72px; }
}
@media (max-width: 560px) {
  .tool.dg { padding: 16px; }
  .dg-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* Transisi antarhalaman (View Transitions lintas dokumen): header diam, isi berganti halus.
   Browser tanpa dukungan (mis. Firefox) pindah halaman seperti biasa. Harus sama di src/site.css dan public/artikel.css. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }

/* Area sentuh minimal 44px di HP dan layar sentuh (WCAG 2.5.5), sama dengan header halaman React.
   Diletakkan di akhir berkas supaya menimpa ukuran bawaan komponen di atas. */
.brand { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 900px), (pointer: coarse) {
  .chat-btn, .menu-btn { height: 44px; }
  .site-footer a { display: inline-block; padding-block: 12px; position: relative; }
  /* Tautan pendek (mis. "X") diperlebar ke 44px tanpa menggeser teks di sekitarnya */
  .site-footer a::after { content: ''; position: absolute; inset: 0 min(0px, calc((100% - 44px) / 2)); }
}
@media (pointer: coarse) {
  .cat-pill, .page-btn { min-height: 44px; }
  .page-btn { min-width: 44px; }
  .dg input:not([type='checkbox']), .dg select, .dg .dg-vars select { min-height: 44px; }
  .dg-del { min-height: 44px; }
  .dg .dg-check { min-height: 44px; margin-top: 4px; }
  .dg-adv summary { min-height: 44px; display: flex; align-items: center; }
}
