/* TerjemahBuku: halaman dokumentasi (docs.html).
 * Layout dua kolom: sidebar navigasi sticky di desktop,
 * berubah jadi laci off-canvas dengan tombol hamburger di mobile.
 * Tetap di design system ink&paper: satu aksen emas, tanpa emoji. */

body.docs { max-width: none; }

.docs-topbar {
  display: flex; align-items: center; gap: 12px;
  min-height: 68px; max-height: 80px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 15;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
}
.docs-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--accent); text-decoration: none;
}
.docs-brand span {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.25rem; letter-spacing: -0.02em;
}
.docs-title { margin-left: auto; color: var(--muted); font-size: 0.9rem; }
.docs-hamburger { display: none; }

.docs-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 40px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 90px;
  align-items: start;
}

/* ---------- sidebar ---------- */
.docs-nav {
  position: sticky; top: 100px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 10px;
  max-height: calc(100dvh - 130px);
  overflow-y: auto;
}
.docs-nav h2 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-family: var(--sans); font-weight: 600;
  margin: 10px 10px 6px; padding: 0;
}
.docs-nav ol { list-style: none; margin: 0; padding: 0; counter-reset: doc; }
.docs-nav a {
  position: relative;
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-ctl);
  color: var(--muted); text-decoration: none; font-size: 0.9rem;
  transition: background 0.18s var(--ease-out), color 0.18s var(--ease-out);
}
.docs-nav a:hover { background: var(--surface2); color: var(--ink); }
.docs-nav a.active {
  background: var(--surface2); color: var(--ink); font-weight: 600;
}
.docs-nav a.active::before {
  content: '';
  position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 3px; background: var(--accent);
}

/* ---------- konten ---------- */
.docs-main { min-width: 0; }
.docs-main > section { scroll-margin-top: 96px; }
.docs-main h1 { font-size: 2rem; margin: 0.2em 0 0.4em; }
.docs-main h2 {
  font-size: 1.35rem; margin: 2.2em 0 0.7em;
  padding-top: 1.2em; border-top: 1px solid var(--line);
}
.docs-main h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.6em; }
.docs-main p { max-width: 68ch; }
.docs-main li { margin: 6px 0; }
.docs-main ol.steps { margin: 14px 0; }

.doc-callout {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  border-radius: var(--radius-card);
  padding: 14px 18px; margin: 16px 0; font-size: 0.93rem;
}
.doc-callout strong { color: var(--accent); }
.doc-callout p { margin: 6px 0; }

.doc-warn {
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border-radius: var(--radius-card);
  padding: 14px 18px; margin: 16px 0; font-size: 0.93rem;
}
.doc-warn p { margin: 6px 0; }

.doc-key {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}
.doc-file { color: var(--accent); font-weight: 600; }

/* tabel troubleshooting */
.doc-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.93rem; }
.doc-table th, .doc-table td {
  text-align: left; vertical-align: top;
  padding: 11px 12px; border-bottom: 1px solid var(--line);
}
.doc-table th {
  color: var(--muted); font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* FAQ accordion */
.doc-faq { margin: 14px 0; }
.doc-faq details {
  border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--surface); margin: 10px 0; overflow: hidden;
}
.doc-faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 600;
  font-family: var(--serif); font-size: 1.02rem;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.doc-faq summary::-webkit-details-marker { display: none; }
.doc-faq summary:hover { color: var(--accent); }
.doc-faq summary .doc-chev { color: var(--accent); flex: none; transition: transform 0.2s var(--ease-out); }
.doc-faq details[open] summary .doc-chev { transform: rotate(180deg); }
.doc-faq .doc-a { padding: 0 18px 18px; color: var(--ink); }
.doc-faq .doc-a p { margin: 8px 0; font-size: 0.94rem; }

.docs-backtop {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 28px;
}

/* ---------- mobile: sidebar jadi laci ---------- */
.docs-scrim {
  position: fixed; inset: 0; z-index: 18;
  background: rgba(10, 8, 5, 0.6);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}
.docs-scrim.show { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .docs-hamburger { display: inline-flex; }
  .docs-title { display: none; }
  .docs-nav {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 20;
    width: min(300px, 84vw);
    border-radius: 0; border-top: 0; border-bottom: 0; border-left: 0;
    max-height: none; padding-top: 18px;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease-out);
  }
  body.docs-nav-open .docs-nav { transform: none; }
  .docs-main h1 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .docs-nav, .docs-scrim, .doc-faq summary .doc-chev { transition: none; }
}
