/* ── Help drawer (assets/js/docs.js) ── */
.docs-drawer {
  --docs-ground: #1c1d21; --docs-surface: #25272d; --docs-ink: #e7e8ec; --docs-ink-2: #a8abb7; --docs-rule: rgba(168, 171, 183, .18);
  --docs-accent: #ff5a5f; --docs-what: #7fb2e0; --docs-how: #6fcf97; --docs-why: #f2b45c;
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 1040;
  display: flex; flex-direction: column; background: var(--docs-ground); color: var(--docs-ink);
  border-left: 1px solid var(--docs-rule); box-shadow: -12px 0 32px rgba(0, 0, 0, .35);
  font-size: 14px; line-height: 1.55;
}
.light-theme .docs-drawer {
  --docs-ground: #ffffff; --docs-surface: #f5f6f8; --docs-ink: #1d2027; --docs-ink-2: #5b6070; --docs-rule: rgba(29, 32, 39, .12);
  --docs-accent: #c8102e; --docs-what: #1f5f99; --docs-how: #1d7a4b; --docs-why: #9a5b00;
  box-shadow: -12px 0 32px rgba(0, 0, 0, .12);
}
.docs-drawer[hidden] { display: none !important; }
.docs-drawer.docs-over-modal { z-index: 1065; }
.docs-head { padding: 14px 18px 10px; border-bottom: 1px solid var(--docs-rule); display: grid; gap: 6px; }
.docs-head-row { display: flex; align-items: center; gap: 8px; }
.docs-crumb { flex: 1; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--docs-ink-2); }
.docs-title { margin: 0; font-size: 20px; font-weight: 600; color: var(--docs-ink); text-wrap: balance; }
.docs-icon-btn { background: none; border: 0; color: var(--docs-ink-2); padding: 4px 6px; border-radius: 4px; line-height: 1; }
.docs-icon-btn:hover, .docs-icon-btn:focus-visible { color: var(--docs-ink); background: var(--docs-surface); outline: none; }
.docs-search { position: relative; margin-top: 4px; }
.docs-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--docs-ink-2); font-size: 12px; }
.docs-search input { width: 100%; padding: 6px 10px 6px 30px; border-radius: 6px; border: 1px solid var(--docs-rule); background: var(--docs-surface); color: var(--docs-ink); font-size: 13px; }
.docs-search input:focus { outline: 2px solid var(--docs-accent); outline-offset: -1px; }
.docs-body { flex: 1; overflow-y: auto; padding: 14px 18px 24px; }
.docs-body:focus { outline: none; }
.docs-body p { margin: 0 0 8px; max-width: 62ch; }
.docs-body ul { margin: 0 0 8px; padding-left: 18px; }
.docs-body li { margin: 2px 0; }
.docs-body code { font-size: 12px; padding: 1px 4px; border-radius: 3px; background: var(--docs-surface); color: var(--docs-ink); }
.docs-body a { color: var(--docs-accent); }
.docs-page { display: grid; gap: 10px; margin-bottom: 18px; }
.docs-block { border-left: 3px solid var(--docs-rule); padding: 2px 0 2px 10px; }
.docs-block.docs-what { border-color: var(--docs-what); }
.docs-block.docs-how { border-color: var(--docs-how); }
.docs-block.docs-why { border-color: var(--docs-why); }
.docs-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }
.docs-what .docs-label { color: var(--docs-what); }
.docs-how .docs-label { color: var(--docs-how); }
.docs-why .docs-label { color: var(--docs-why); }
.docs-subhead { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--docs-ink-2); margin: 18px 0 8px; }
.docs-subhead span { font-weight: 400; margin-left: 4px; }
.docs-elements { display: grid; gap: 6px; }
.docs-element { background: var(--docs-surface); border: 1px solid var(--docs-rule); border-radius: 6px; }
.docs-element > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; }
.docs-element > summary::-webkit-details-marker { display: none; }
.docs-element > summary::before { content: '\25B8'; color: var(--docs-ink-2); font-size: 11px; transition: transform .15s; }
.docs-element[open] > summary::before { transform: rotate(90deg); }
.docs-element > summary:focus-visible { outline: 2px solid var(--docs-accent); outline-offset: -2px; border-radius: 6px; }
.docs-el-name { flex: 1; font-weight: 600; }
.docs-show { font-size: 12px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--docs-rule); background: transparent; color: var(--docs-accent); white-space: nowrap; }
.docs-show:disabled { color: var(--docs-ink-2); opacity: .6; cursor: default; }
.docs-el-body { padding: 2px 12px 10px 26px; display: grid; gap: 8px; }
.docs-related { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.docs-related a { text-decoration: none; }
.docs-related a:hover, .docs-related a:focus-visible { text-decoration: underline; }
.docs-foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--docs-rule); }
.docs-link { background: none; border: 0; padding: 0; color: var(--docs-accent); font-size: 13px; }
.docs-link:hover, .docs-link:focus-visible { text-decoration: underline; outline: none; }
.docs-link[hidden] { display: none; }
.docs-loading, .docs-empty { color: var(--docs-ink-2); }
@keyframes docs-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 95, .75); } 70% { box-shadow: 0 0 0 10px rgba(255, 90, 95, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); } }
.docs-highlight { outline: 2px solid #ff5a5f !important; outline-offset: 3px; border-radius: 4px; animation: docs-pulse 1.2s ease-out 2; }
@media (prefers-reduced-motion: reduce) { .docs-highlight { animation: none; } .docs-element > summary::before { transition: none; } }
@media (min-width: 1400px) { body.docs-open .main-content, body.docs-open .main-header .main-container { margin-right: 440px; } }
.docs-help-btn { background: none; border: 0; }
