/* ==========================================================================
   docs.css — panduan integrasi publik (https://auth.sassly.ai/docs). Gaya dokumentasi Onix: netral terang, padat, rapi.
   Semua nilai dari tokens.css (tema .site-body).
   ========================================================================== */

.docs-body { background: var(--page); }
.docs-top {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
}
.docs-top-inner { display: flex; align-items: center; gap: 14px; width: min(1180px, 100% - 32px); height: 56px; margin: 0 auto; }
.docs-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -.2px; }
.docs-brand:hover { color: var(--ink); }
.docs-brand img { width: 28px; height: 28px; border-radius: 7px; box-shadow: var(--sh-1); }
.docs-brand span { font-weight: 500; color: var(--ink-3); }
.docs-top-links { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: var(--fs-md); }
.docs-top-links a { color: var(--ink-2); }

.docs-hero { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 40px 0 24px; display: grid; gap: 12px; }
.docs-hero h1 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.8px; line-height: 1.15; text-wrap: balance; max-width: 22ch; }
.docs-hero p { max-width: 68ch; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.docs-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.docs-facts li { padding: 3px 10px; border-radius: var(--r-chip); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.docs-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; width: min(1180px, 100% - 32px); margin: 0 auto; padding-bottom: 80px; }
.toc { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; padding: 4px 0; }
.toc p { margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.toc ol { display: grid; gap: 1px; margin: 0 0 14px; padding: 0; list-style: none; }
.toc a { display: block; padding: 4px 10px; border-left: 2px solid var(--line); font-size: var(--fs-md); color: var(--ink-2); line-height: 1.4; }
.toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
.toc a.is-active { color: var(--primary); font-weight: 600; border-left-color: var(--orange); }

.prose { min-width: 0; max-width: 820px; font-size: 14.5px; line-height: 1.7; color: var(--ink); }
.prose > section { padding-top: 8px; margin-bottom: 36px; scroll-margin-top: 72px; }
.prose h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; padding-top: 10px; font-size: 21px; letter-spacing: -.4px; border-top: 1px solid var(--line); }
.prose > section:first-child h2 { border-top: 0; padding-top: 0; }
.prose h2 .step { flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; background: var(--primary); color: #FFFFFF; font-size: 13px; font-weight: 600; letter-spacing: 0; transform: translateY(-2px); }
.prose h3 { margin: 22px 0 8px; font-size: 16px; letter-spacing: -.2px; }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 20px; list-style: revert; }
.prose li { margin: 3px 0; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(35, 61, 77, .35); }
.prose a:hover { text-decoration-color: currentColor; }
.prose :not(pre) > code { padding: 1px 5px; border-radius: 4px; background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--line-soft); font-size: .86em; overflow-wrap: anywhere; }
.prose strong { font-weight: 600; }

.code { position: relative; margin: 0 0 14px; }
/* Kode harus terbaca persis (tanpa ligatur JetBrains Mono: != -> === tidak berubah jadi simbol). */
.prose code, .prose pre { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
.code pre {
    margin: 0; padding: 14px 16px; overflow-x: auto; border-radius: var(--r-lg);
    background: #172A35; color: #E6EDF1; box-shadow: var(--sh-2);
    font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; tab-size: 4;
}
.code-label { position: absolute; left: 14px; top: -9px; padding: 0 7px; border-radius: 4px; background: var(--orange); color: #2A1406; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 18px; }
.code-label + pre { padding-top: 20px; }
.code-copy {
    position: absolute; right: 8px; top: 8px; height: 24px; padding: 0 9px; border: 0; border-radius: 6px;
    background: rgba(255, 255, 255, .1); color: #E6EDF1; font-size: 11.5px; cursor: pointer;
}
.code-copy:hover { background: rgba(255, 255, 255, .18); }

.table-scroll { overflow-x: auto; margin: 0 0 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.55; }
.prose th, .prose td { padding: 8px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line-soft); }
.prose thead th { border-top: 0; background: var(--surface-sub); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.prose td:first-child { white-space: nowrap; }
.prose td code { white-space: nowrap; }
.prose td.wrap code, .prose td.wrap { white-space: normal; }

.callout { display: flex; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--st-info-bg); box-shadow: inset 0 0 0 1px var(--st-info-ln); font-size: 14px; color: var(--ink); }
.callout .icon { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--st-info); }
.callout.is-warn { background: var(--st-warm-bg); box-shadow: inset 0 0 0 1px var(--st-warm-ln); }
.callout.is-warn .icon { color: var(--st-warm); }
.callout p { margin: 0; }

.flow { display: grid; gap: 0; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: flow; }
.flow li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 0 0 14px; counter-increment: flow; }
.flow li::before { content: counter(flow); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 12.5px; font-weight: 600; color: var(--primary); }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: 2px; width: 1px; background: var(--line); }
.flow b { display: block; font-weight: 600; }
.flow span { color: var(--ink-2); }

.checklist { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 9px; align-items: flex-start; }
.checklist .icon { flex: none; width: 15px; height: 15px; margin-top: 4px; color: var(--st-cool); }

.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.downloads a { display: flex; align-items: flex-start; gap: 10px; height: 100%; padding: 10px 12px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); color: var(--ink); text-decoration: none; }
.downloads a:hover { box-shadow: var(--sh-2); color: var(--ink); }
.downloads .icon { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--primary); }
.downloads b { display: block; font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; overflow-wrap: anywhere; }
.downloads span { display: block; font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.45; }

.docs-foot { border-top: 1px solid var(--line); padding: 20px 0 40px; font-size: var(--fs-sm); color: var(--ink-3); }
.docs-foot div { width: min(1180px, 100% - 32px); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 18px; }

@media (max-width: 900px) {
    .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .toc { position: static; max-height: none; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); }
    .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .downloads { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .docs-top-links .hide-sm, .docs-brand span { display: none; }
    .toc ol { grid-template-columns: minmax(0, 1fr); }
    .prose { font-size: 14px; }
    .prose td:first-child, .prose td code { white-space: normal; overflow-wrap: anywhere; }
}
