/* Docs — same black & white as the site; mint only for "ok". */

.nav.is-page { border-bottom-color: var(--line); background: rgb(10 10 10 / .92); }

/* ---------- docs home ---------- */

.doc-home { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 104px); }
.doc-home-head { max-width: 680px; margin-bottom: 48px; }
.doc-kicker { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--mute); }
.doc-home-head h1 { margin: 0 0 14px; font-size: clamp(32px, 4.4vw, 52px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
.doc-home-head > p { margin: 0 0 26px; font-size: 17px; color: var(--mute); }
.doc-group { margin-bottom: 40px; }
.doc-group h2 { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.doc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }   /* three across: the nine panel guides fill whole rows */
.doc-card {
  position: relative; display: grid; align-content: start; gap: 6px; padding: 20px 20px 22px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background-color .2s, transform .15s;
}
.doc-card:hover { border-color: var(--line-2); background: var(--surface-2); }
.doc-card:active { transform: scale(.99); }
.doc-card-ico { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 8px; border-radius: 10px; background: #1a1a1a; border: 1px solid var(--line-2); color: #fff; font-size: 15px; }
.doc-card b { font-size: 16.5px; font-weight: 600; color: #fff; }
.doc-card > span:not(.doc-card-ico) { font-size: 14.5px; line-height: 1.5; color: var(--mute); }
.doc-card-go { position: absolute; top: 22px; right: 20px; font-size: 13px; color: var(--mute-2); transition: transform .2s, color .2s; }
.doc-card:hover .doc-card-go { color: #fff; transform: translateX(3px); }
.doc-none { color: var(--mute); }
.doc-none a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.doc-search { position: relative; display: block; }
.doc-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--mute-2); pointer-events: none; }
.doc-search input {
  width: 100%; height: 40px; padding: 0 12px 0 36px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; transition: border-color .15s;
}
.doc-search input:focus { outline: none; border-color: #fff; }
.doc-search-big { max-width: 440px; }
.doc-search-big input { height: 48px; font-size: 15.5px; border-radius: 12px; }

/* ---------- article layout: sidebar · article · on this page ---------- */

.doc-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr) 200px; gap: 48px; align-items: start; padding-top: 36px; padding-bottom: 88px; }
.doc-side, .doc-toc { position: sticky; top: calc(var(--nav-h) + 24px); max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; scrollbar-width: thin; }
.doc-side nav { margin-top: 18px; }
.doc-side-group { margin-bottom: 18px; }
.doc-side-group p { margin: 0 0 6px 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute-2); }
.doc-side a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 14.5px; color: var(--mute); transition: color .15s, background-color .15s; }
.doc-side a i { width: 16px; text-align: center; font-size: 13px; color: var(--mute-2); transition: color .15s; }
.doc-side a:hover { color: var(--text); background: var(--surface); }
.doc-side a:hover i { color: var(--text); }
.doc-side a.is-on { color: #fff; background: var(--surface-2); font-weight: 550; }
.doc-side a.is-on i { color: #fff; }

.doc { min-width: 0; max-width: 760px; }
.doc-menu-btn { display: none; }
.doc-crumb { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13.5px; color: var(--mute); }
.doc-crumb a:hover { color: #fff; }
.doc-crumb i { font-size: 9px; color: var(--mute-2); }
.doc h1 { margin: 0 0 12px; font-size: clamp(30px, 3.6vw, 42px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.doc-lead { margin: 0 0 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--mute); }

.doc-body { font-size: 16px; line-height: 1.7; color: rgb(237 237 237 / .88); }
.doc-body h2 { margin: 44px 0 12px; font-size: 23px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; color: #fff; scroll-margin-top: calc(var(--nav-h) + 20px); }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p { margin: 0 0 16px; }
.doc-body ul, .doc-body ol { margin: 0 0 18px; padding-left: 22px; }
.doc-body li { margin-bottom: 7px; }
.doc-body li::marker { color: var(--mute-2); }
.doc-body b { color: #fff; font-weight: 600; }
.doc-body a { color: #fff; text-decoration: underline; text-decoration-color: rgb(255 255 255 / .3); text-underline-offset: 3px; transition: text-decoration-color .15s; }
.doc-body a:hover { text-decoration-color: #fff; }
.doc-body code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--mono); font-size: .86em; color: #fff; }

/* a button or menu item of the panel */
.ui {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 7px; vertical-align: 1px;
  background: #161616; border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 550; color: #fff; white-space: nowrap;
}
.ui i { font-size: 11px; color: rgb(255 255 255 / .6); }

/* status chips, same colours as the panel */
.st-chip { display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; background: rgb(139 149 161 / .14); color: #b4bcc6; white-space: nowrap; }
.st-chip.ok     { background: rgb(60 207 145 / .14); color: var(--mint); }
.st-chip.warn   { background: rgb(245 165 36 / .14); color: var(--amber); }
.st-chip.bad    { background: rgb(240 82 82 / .14); color: #ff8080; }
.st-chip.paused { background: rgb(167 139 250 / .15); color: #c4b5fd; }
.st-chip.self   { background: rgb(90 169 255 / .14); color: #8cc4ff; }
.st-chip.unused { background: rgb(139 149 161 / .14); color: #b4bcc6; }

.doc-note { display: flex; gap: 14px; margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.doc-note > i { margin-top: 4px; font-size: 14px; color: var(--mute); }
.doc-note > div { min-width: 0; }
.doc-note.tip > i { color: var(--mint); }
.doc-note.warn { border-color: rgb(245 165 36 / .25); }
.doc-note.warn > i { color: var(--amber); }

.doc-table { margin: 0 0 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.doc-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.doc-table th { padding: 11px 14px; text-align: left; background: var(--surface); font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); border-bottom: 1px solid var(--line); white-space: nowrap; }
.doc-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td:first-child { color: #fff; }

.doc-code { margin: 0 0 22px; border-radius: 12px; border: 1px solid var(--line); background: #0d0d0d; overflow: hidden; }
.doc-code-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.doc-code-bar span { font-size: 12.5px; font-weight: 600; color: var(--mute); }
.doc-copy { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 0; border-radius: 7px; background: none; color: var(--mute); font: inherit; font-size: 12.5px; cursor: pointer; transition: color .15s, background-color .15s; }
.doc-copy:hover { color: #fff; background: rgb(255 255 255 / .06); }
.doc-copy.is-done { color: var(--mint); }
.doc-code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; color: #e4e4e4; tab-size: 4; }
.doc-code pre code { padding: 0; border: 0; background: none; font-size: inherit; color: inherit; }
.doc-code .c-com { color: #6f6f6f; font-style: italic; }
.doc-code .c-str { color: #9fe0c0; }
.doc-code .c-kw { color: #fff; font-weight: 500; }

.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.doc-pager a { display: grid; gap: 4px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); transition: border-color .2s, background-color .2s; }
.doc-pager a:hover { border-color: var(--line-2); background: var(--surface); }
.doc-pager .next { text-align: right; grid-column: 2; }
.doc-pager small { font-size: 13px; color: var(--mute); }
.doc-pager b { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.doc-pager .next b { justify-content: flex-end; }
.doc-pager b i { font-size: 12px; color: var(--mute); }
.doc-help { margin-top: 28px; font-size: 14.5px; color: var(--mute); }
.doc-help a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.doc-toc p { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute-2); }
.doc-toc nav { display: grid; gap: 2px; border-left: 1px solid var(--line); }
.doc-toc a { margin-left: -1px; padding: 5px 0 5px 14px; border-left: 1px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--mute); transition: color .15s, border-color .15s; }
.doc-toc a:hover { color: var(--text); }
.doc-toc a.is-on { color: #fff; border-left-color: #fff; }

/* ---------- smaller screens ---------- */

@media (max-width: 1200px) {
  .doc-shell { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .doc-toc { display: none; }
}
@media (max-width: 900px) {
  .doc-shell { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .doc-side {
    position: fixed; z-index: 60; top: var(--nav-h); left: 0; bottom: 0; width: min(300px, 86vw); max-height: none; padding: 18px 16px;
    background: var(--bg); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .25s ease; visibility: hidden;
  }
  .doc-side.is-open { transform: none; visibility: visible; }
  .doc-menu-btn {
    display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 8px 14px; border-radius: 10px;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer;
  }
  .doc-pager { grid-template-columns: 1fr; }
  .doc-pager .next { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .doc-side { transition: none; } }
