/* ═══════════════════════════════════════════════════════════════════════════
   RustyWorks Docs — shared stylesheet                     /docs/docs.css
   Used by every page in /docs/. Built on the site's own tokens from
   /style.css (--bg --panel --line --text --text-dim --rust --rust-2 --ember),
   so dark, light and the seasonal themes all carry over with no extra work.
   Page markup lives in the generated HTML; the sidebar, breadcrumb, pager and
   "On this page" are drawn by /docs/docs.js from /docs/docs-nav.js.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --doc-rail: 276px;
  --doc-aside: 208px;
  --doc-gap: 44px;
  --doc-discord: #7d88f5;
  --doc-discord-bg: rgba(88,101,242,.12);
  --doc-tip: #48c98a;
  --doc-warn: #e8a23a;
  --doc-stop: #e5604f;
  --doc-info: #5aa9e6;
  --doc-hover: var(--hover-tint, rgba(255,255,255,.04));
}
html[data-theme="light"] {
  --doc-discord: #4752c4;
  --doc-discord-bg: rgba(88,101,242,.10);
  --doc-tip: #15803d;
  --doc-warn: #b45309;
  --doc-stop: #b91c1c;
  --doc-info: #1d4ed8;
}

/* ── Shell ────────────────────────────────────────────────────────────── */
.doc-shell {
  display: grid;
  grid-template-columns: var(--doc-rail) minmax(0, 1fr) var(--doc-aside);
  gap: var(--doc-gap);
  align-items: start;
}
.doc-main { min-width: 0; }
/* The site stylesheet styles a bare <nav> as the header bar; undo that inside docs */
:where(.doc-shell) nav { display: block; height: auto; justify-content: normal; align-items: normal; }

/* ── Left rail (guide navigation) ─────────────────────────────────────── */
.doc-rail {
  position: sticky; top: 88px;
  max-height: calc(100vh - 104px);
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.doc-rail-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; padding: 14px 12px 16px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.doc-rail-scroll::-webkit-scrollbar { width: 5px; }
.doc-rail-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }

.doc-search {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; margin-bottom: 16px;
  transition: border-color .18s, box-shadow .18s;
}
.doc-search:focus-within { border-color: var(--rust); box-shadow: 0 0 0 3px rgba(207,106,46,.14); }
.doc-search svg { width: 16px; height: 16px; flex: none; color: var(--text-dim); }
.doc-search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0;
  color: var(--text); font: inherit; font-size: .92rem;
}
.doc-search input::placeholder { color: var(--text-dim); }
.doc-search input::-webkit-search-cancel-button { filter: grayscale(1) opacity(.6); }
.doc-search kbd {
  flex: none; font: 600 .7rem/1 'Chakra Petch', sans-serif; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px;
}
.doc-rail-label {
  font: 600 .72rem/1 'Oswald', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); margin: 2px 4px 10px;
}
.doc-search-empty { display: none; margin: 14px 6px 4px; font-size: .9rem; color: var(--text-dim); }
.doc-rail.no-hits .doc-search-empty { display: block; }

.rail-group { margin-bottom: 4px; }
.rail-group-btn {
  width: 100%; display: flex; align-items: center; gap: 9px;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--text); font: 600 .93rem/1.2 'Chakra Petch', sans-serif;
  padding: 8px 8px; border-radius: 9px;
  transition: background .15s;
}
.rail-group-btn:hover { background: var(--doc-hover); }
.rail-group-btn:focus-visible { outline: 2px solid var(--rust); outline-offset: 1px; }
.rail-ico { width: 22px; text-align: center; flex: none; font-size: 1rem; }
.rail-count {
  margin-left: auto; font: 600 .68rem/1 'Chakra Petch', sans-serif;
  color: var(--text-dim); background: var(--doc-hover);
  border: 1px solid var(--line); border-radius: 20px; padding: 3px 7px;
}
.rail-chev {
  width: 10px; height: 10px; flex: none; color: var(--text-dim);
  transition: transform .18s;
}
.rail-group.open > .rail-group-btn .rail-chev { transform: rotate(90deg); }
.rail-list { display: none; margin: 2px 0 8px 19px; padding-left: 10px; border-left: 1px solid var(--line); }
.rail-group.open > .rail-list { display: block; }
.rail-link {
  display: block; padding: 6px 10px; margin: 1px 0; border-radius: 8px;
  font-size: .9rem; line-height: 1.35; color: var(--text-dim);
  text-decoration: none; transition: background .15s, color .15s;
}
.rail-link:hover { background: var(--doc-hover); color: var(--ember); }
.rail-link.active {
  background: rgba(207,106,46,.13); color: var(--ember); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--rust);
}
.rail-link.sub { margin-left: 12px; font-size: .86rem; }
.rail-link mark { background: rgba(244,162,89,.28); color: inherit; border-radius: 3px; padding: 0 1px; }
.rail-link small { display: block; font-size: .76rem; color: var(--text-dim); opacity: .85; margin-top: 2px; }
.rail-solo { margin-bottom: 8px; }
.rail-solo .rail-link { padding-left: 12px; color: var(--text); font-weight: 600; }
.rail-hub { display: flex; align-items: center; gap: 8px; }
.rail-hub .rail-ico { width: 20px; }

/* ── Header of a page ─────────────────────────────────────────────────── */
.doc-drawer-btn {
  display: none; align-items: center; gap: 9px; margin-bottom: 16px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 14px; cursor: pointer;
  font: 600 .9rem/1 'Chakra Petch', sans-serif;
}
.doc-drawer-btn:hover { border-color: var(--rust); color: var(--ember); }
.doc-drawer-btn svg { width: 16px; height: 16px; }

.doc-crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: .85rem; color: var(--text-dim); margin-bottom: 18px;
}
.doc-crumb a { color: var(--text-dim); text-decoration: none; }
.doc-crumb a:hover { color: var(--ember); }
.doc-crumb .sep { opacity: .5; }
.doc-crumb [aria-current] { color: var(--text); }

.doc-head { margin-bottom: 30px; }
.doc-kicker {
  font: 600 .78rem/1 'Oswald', sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rust-2); margin-bottom: 12px;
}
.doc-head h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.1rem); line-height: 1.06;
  color: var(--text); margin-bottom: 14px; text-wrap: balance;
}
.doc-lede {
  font-size: 1.12rem; line-height: 1.65; color: var(--text-dim);
  max-width: 62ch; margin-bottom: 22px;
}
.doc-lede code, .doc-lede .doc-cmd { font-size: .92em; }

.doc-strip {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  overflow: hidden; margin: 0;
}
.doc-strip-item { flex: 1 1 150px; padding: 12px 18px; border-right: 1px solid var(--line); }
.doc-strip-item:last-child { border-right: 0; }
.doc-strip dt {
  font: 600 .68rem/1 'Oswald', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 7px;
}
.doc-strip dd { margin: 0; font-weight: 600; color: var(--text); font-size: .98rem; }
.doc-strip dd.accent { color: var(--ember); }
@media (max-width: 640px) {
  .doc-strip-item { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .doc-strip-item:last-child { border-bottom: 0; }
}

/* Reading progress: a hairline under the site header */
.doc-progress { position: fixed; left: 0; right: 0; top: 68px; height: 2px; z-index: 40; pointer-events: none; }
.doc-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--rust), var(--ember));
  transition: width .08s linear;
}

/* ── Right rail (On this page) ────────────────────────────────────────── */
.doc-aside { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: none; }
.doc-aside::-webkit-scrollbar { display: none; }
.doc-aside-label {
  font: 600 .72rem/1 'Oswald', sans-serif; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 12px;
}
.doc-aside nav { border-left: 1px solid var(--line); }
.doc-aside a, .doc-toc-inline a {
  position: relative; display: block; padding: 5px 0 5px 14px;
  font-size: .86rem; line-height: 1.4; color: var(--text-dim); text-decoration: none;
  transition: color .15s;
}
.doc-aside a:hover, .doc-toc-inline a:hover { color: var(--text); }
.doc-aside a.sub { padding-left: 28px; font-size: .8rem; }
.doc-aside a.active { color: var(--ember); font-weight: 600; }
.doc-aside a.active::before {
  content: ''; position: absolute; left: -1px; top: 4px; bottom: 4px; width: 2px;
  background: var(--rust); border-radius: 2px;
}

.doc-toc-inline { display: none; margin-bottom: 26px; }
.doc-toc-inline details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.doc-toc-inline summary {
  cursor: pointer; padding: 12px 16px; font: 600 .92rem/1 'Chakra Petch', sans-serif; color: var(--text);
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.doc-toc-inline summary::-webkit-details-marker { display: none; }
.doc-toc-inline summary::after { content: '+'; color: var(--text-dim); font-size: 1.1rem; }
.doc-toc-inline details[open] summary::after { content: '–'; }
.doc-toc-inline .toc-list { padding: 2px 16px 12px; }
.doc-toc-inline a { padding-left: 0; }
.doc-toc-inline a.sub { padding-left: 14px; }

/* ── Article body ─────────────────────────────────────────────────────── */
.doc-article { min-width: 0; }
.doc-body { color: var(--text); font-size: 1.02rem; line-height: 1.72; }
.doc-body > :first-child { margin-top: 0; }
.doc-body h2 {
  position: relative; font-size: 1.65rem; line-height: 1.2; color: var(--text);
  margin: 56px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
  scroll-margin-top: 92px;
}
.doc-body h3 {
  font-family: 'Chakra Petch', sans-serif; text-transform: none; letter-spacing: 0;
  font-size: 1.2rem; font-weight: 600; color: var(--text);
  margin: 34px 0 10px; scroll-margin-top: 92px;
}
.doc-body h4 {
  font-family: 'Chakra Petch', sans-serif; text-transform: none; letter-spacing: 0;
  font-size: 1rem; font-weight: 600; color: var(--ember); margin: 24px 0 8px;
}
.doc-body .anchor {
  position: absolute; left: -22px; top: 0; bottom: 0; display: flex; align-items: center;
  width: 20px; color: var(--text-dim); opacity: 0; text-decoration: none; font-size: .9rem;
  transition: opacity .15s;
}
.doc-body h3 .anchor { bottom: auto; top: 3px; }
.doc-body h2:hover .anchor, .doc-body h3:hover .anchor, .doc-body .anchor:focus { opacity: .8; }
.doc-body p { color: var(--text-dim); margin: 0 0 18px; max-width: 74ch; }
.doc-body p strong, .doc-body li strong, .doc-body td strong { color: var(--text); font-weight: 600; }
.doc-body ul, .doc-body ol { margin: 0 0 20px; padding-left: 22px; color: var(--text-dim); max-width: 74ch; }
.doc-body li { margin: 0 0 7px; padding-left: 2px; }
.doc-body li::marker { color: var(--rust); }
.doc-body li > ul, .doc-body li > ol { margin: 8px 0 4px; }
.doc-body a:not(.btn):not(.anchor):not(.doc-card) {
  color: var(--ember); text-decoration: underline;
  text-decoration-color: rgba(244,162,89,.35); text-underline-offset: 4px;
  transition: text-decoration-color .15s;
}
.doc-body a:not(.btn):not(.anchor):not(.doc-card):hover { text-decoration-color: var(--ember); }
.doc-body code, .doc-lede code, .doc-note code {
  font-family: 'Chakra Petch', monospace; font-size: .88em;
  background: var(--doc-hover); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px; color: var(--ember); white-space: nowrap;
}
.doc-body code.long { white-space: normal; }
.doc-cmd {
  font-family: 'Chakra Petch', monospace; font-weight: 600; font-size: .9em;
  color: var(--ember); background: rgba(207,106,46,.1);
  border: 1px solid rgba(207,106,46,.25); padding: 1px 7px; border-radius: 6px;
  white-space: nowrap;
}
.doc-body kbd {
  font: 600 .8em 'Chakra Petch', sans-serif; padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--panel); color: var(--text);
}
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* Ordered lists are steps: a numbered rail */
.doc-body ol.doc-steps {
  list-style: none; counter-reset: step; padding-left: 0; margin: 22px 0 26px; max-width: none;
  position: relative;
}
.doc-body ol.doc-steps > li {
  counter-increment: step; position: relative; padding: 0 0 22px 52px; margin: 0;
  max-width: 74ch;
}
.doc-body ol.doc-steps > li:last-child { padding-bottom: 0; }
.doc-body ol.doc-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--rust); color: var(--ember);
  font: 600 .95rem/1 'Oswald', sans-serif; z-index: 1;
  box-shadow: 0 0 12px rgba(207,106,46,.25);
}
.doc-body ol.doc-steps > li::after {
  content: ''; position: absolute; left: 15px; top: 32px; bottom: 2px; width: 2px;
  background: var(--line);
}
.doc-body ol.doc-steps > li:last-child::after { display: none; }
.doc-body ol.doc-steps > li > p:first-child { color: var(--text); }
.doc-body ol.doc-steps > li > p { margin-bottom: 10px; }

/* Tables */
.doc-table-wrap {
  overflow-x: auto; margin: 22px 0 28px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.doc-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .94rem; }
.doc-table th {
  text-align: left; padding: 11px 16px; white-space: nowrap;
  font: 600 .72rem/1 'Oswald', sans-serif; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); background: var(--panel-2, var(--panel));
  border-bottom: 1px solid var(--line);
}
.doc-table td {
  padding: 12px 16px; vertical-align: top; color: var(--text-dim);
  border-bottom: 1px solid var(--line); line-height: 1.6;
}
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td:first-child { color: var(--text); font-weight: 600; min-width: 150px; }
.doc-table td:first-child .doc-cmd, .doc-table td:first-child code { font-weight: 600; }
.doc-table tbody tr:hover td { background: var(--doc-hover); }
.doc-table td p { margin: 0 0 6px; color: inherit; }
.doc-table td p:last-child { margin: 0; }
.doc-table.compact td, .doc-table.compact th { padding: 8px 14px; }

/* Phones: every table row becomes a small card, so nothing needs sideways scrolling */
@media (max-width: 640px) {
  .doc-table-wrap { overflow: visible; background: none; border: 0; }
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table td { display: block; min-width: 0; width: 100%; }
  .doc-table thead { display: none; }
  .doc-table tr {
    margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--panel); overflow: hidden;
  }
  .doc-table td { border-bottom: 0; padding: 4px 16px; min-width: 0; }
  .doc-table td:first-child {
    min-width: 0; padding: 12px 16px 6px; font-size: 1rem;
    background: var(--panel-2, var(--panel)); border-bottom: 1px solid var(--line); margin-bottom: 6px;
  }
  .doc-table td:last-child { padding-bottom: 12px; }
  .doc-table td:not(:first-child)::before {
    content: attr(data-label); display: block; margin-bottom: 1px;
    font: 600 .68rem/1.4 'Oswald', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); opacity: .8;
  }
  .doc-table td:not(:first-child):empty { display: none; }
  .doc-table tbody tr:hover td { background: none; }
  .doc-table td:first-child:hover { background: var(--panel-2, var(--panel)); }
}

/* Notes */
.doc-note {
  --c: var(--doc-info);
  position: relative; margin: 24px 0; padding: 16px 20px 16px 52px;
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  border-left: 3px solid var(--c);
  background: color-mix(in srgb, var(--c) 8%, transparent);
  border-radius: 12px; max-width: 78ch;
}
.doc-note::before {
  content: 'i'; position: absolute; left: 17px; top: 16px;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--c); color: var(--c); font: 700 .8rem/1 'Chakra Petch', sans-serif;
}
.doc-note.tip  { --c: var(--doc-tip); }
.doc-note.tip::before { content: '✓'; }
.doc-note.warn { --c: var(--doc-warn); }
.doc-note.warn::before { content: '!'; }
.doc-note.stop { --c: var(--doc-stop); }
.doc-note.stop::before { content: '×'; font-size: 1rem; }
.doc-note > b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.doc-note p, .doc-note li { color: var(--text-dim); font-size: .96rem; margin-bottom: 8px; }
.doc-note > :last-child { margin-bottom: 0; }
.doc-note ul { margin-bottom: 0; }

/* Two routes: Discord / Website */
.doc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 30px; }
.doc-where {
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 6px; background: var(--panel);
  min-width: 0;
}
.doc-where-tag {
  display: inline-block; margin-bottom: 12px; padding: 4px 11px; border-radius: 6px;
  font: 600 .7rem/1 'Oswald', sans-serif; letter-spacing: .1em; text-transform: uppercase;
}
.doc-where.web { border-top: 3px solid var(--rust); }
.doc-where.web .doc-where-tag { background: rgba(207,106,46,.14); color: var(--ember); }
.doc-where.discord { border-top: 3px solid #5865f2; }
.doc-where.discord .doc-where-tag { background: var(--doc-discord-bg); color: var(--doc-discord); }
.doc-where p, .doc-where li { font-size: .95rem; }
.doc-where ul { padding-left: 18px; }
@media (max-width: 760px) { .doc-split { grid-template-columns: 1fr; } }

/* Optional screenshots */
.doc-body figure { margin: 24px 0; }
.doc-body figure img {
  width: 100%; border-radius: 10px; border: 1px solid var(--line);
  box-shadow: 0 6px 20px var(--shadow-soft, rgba(0,0,0,.3));
}
.doc-body figcaption { margin-top: 8px; font-size: .86rem; color: var(--text-dim); }

/* Link cards (used on the All Guides page) */
.doc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 18px 0 34px; }
.doc-card {
  display: block; text-decoration: none; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  transition: border-color .15s, transform .15s;
}
.doc-card:hover { border-color: var(--rust); transform: translateY(-2px); }
.doc-card b { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; font-size: .98rem; margin-bottom: 4px; }
.doc-card span { display: block; color: var(--text-dim); font-size: .86rem; line-height: 1.5; }
.doc-card.hidden { display: none; }
.doc-group-head { display: flex; align-items: center; gap: 12px; margin: 38px 0 4px; }
.doc-group-head h2 { margin: 0; padding: 0; border: 0; font-size: 1.35rem; }
.doc-group-head p { margin: 0; font-size: .92rem; }
.doc-hub-search { margin: 6px 0 4px; max-width: 520px; }

/* ── Pager + help ─────────────────────────────────────────────────────── */
.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 56px 0 0; }
.doc-pager:empty { display: none; }
.doc-pager a {
  display: block; padding: 16px 18px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  transition: border-color .15s, transform .15s;
}
.doc-pager a:hover { border-color: var(--rust); transform: translateY(-2px); }
.doc-pager small {
  display: block; font: 600 .68rem/1 'Oswald', sans-serif; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 7px;
}
.doc-pager b { color: var(--text); font-weight: 600; }
.doc-pager .next { text-align: right; grid-column: 2; }
.doc-pager .prev { grid-column: 1; }
@media (max-width: 560px) { .doc-pager { grid-template-columns: 1fr; } .doc-pager .next, .doc-pager .prev { grid-column: 1; text-align: left; } }

.doc-help {
  margin-top: 44px; padding: 30px 32px; border-radius: 16px;
  border: 1px solid rgba(207,106,46,.28);
  background: linear-gradient(160deg, rgba(207,106,46,.09), transparent 70%), var(--panel);
}
.doc-help-title { font: 600 1.25rem/1.2 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .5px; color: var(--text); margin-bottom: 8px; }
.doc-help p { color: var(--text-dim); margin: 0 0 18px; max-width: 60ch; }
.doc-help-links { display: flex; flex-wrap: wrap; gap: 10px; }
.doc-help-links a {
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); background: var(--bg); font-weight: 600; font-size: .9rem; text-decoration: none;
  transition: border-color .15s, color .15s;
}
.doc-help-links a:hover { border-color: var(--rust); color: var(--ember); }
.doc-updated { margin: 28px 0 0; font-size: .82rem; color: var(--text-dim); }

/* ── Titled steps (::: steps): the numbered rail with a heading and any content per step ── */
.doc-body ol.doc-steps-titled > li { max-width: 820px; padding-bottom: 30px; }
.doc-body ol.doc-steps-titled > li > h3,
.doc-body ol.doc-steps-titled > li > h4 {
  margin: 3px 0 8px; padding: 0; border: 0; font: 600 1.08rem/1.35 'Chakra Petch', sans-serif; color: var(--text);
}
.doc-body ol.doc-steps-titled > li > h3 .anchor { display: none; }
.doc-body ol.doc-steps-titled > li > p, .doc-body ol.doc-steps-titled > li > ul, .doc-body ol.doc-steps-titled > li > ol { margin-bottom: 12px; }
.doc-body ol.doc-steps-titled > li > :last-child { margin-bottom: 0; }
.doc-body ol.doc-steps-titled figure { margin: 14px 0 4px; max-width: 760px; }
.doc-body ol.doc-sublist { margin: 0 0 12px; padding-left: 22px; }
.doc-body ol.doc-sublist > li { margin-bottom: 6px; color: var(--text-dim); }

/* ── A Discord message as the bot posts it (::: msg) ── */
.doc-msg {
  display: flex; gap: 14px; align-items: flex-start; max-width: 640px; margin: 16px 0 6px;
  padding: 14px 16px; background: #313338; border: 1px solid rgba(255,255,255,.07); border-radius: 10px;
}
.doc-msg-av { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #1e1f22; }
.doc-msg-av img { display: block; width: 100%; height: 100%; object-fit: cover; }
.doc-msg-main { min-width: 0; flex: 1; }
.doc-msg-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 3px; }
.doc-msg-name { color: #f2f3f5; font-weight: 600; }
.doc-msg-bot { background: #5865f2; color: #fff; font: 700 .62rem/1 sans-serif; padding: 3px 5px; border-radius: 4px; letter-spacing: .02em; }
.doc-msg-time { color: #949ba4; font-size: .75rem; }
.doc-body .doc-msg-body { color: #dbdee1; font-size: .94rem; line-height: 1.5; }
.doc-body .doc-msg-body p { color: inherit; font-size: inherit; margin: 0 0 .7em; max-width: none; }
.doc-body .doc-msg-body p:last-child { margin-bottom: 0; }
.doc-body .doc-msg-body strong { color: #fff; }
.doc-body .doc-msg-body a { color: #00a8fc; }
.doc-body .doc-msg-body.ok, .doc-body .doc-msg-body.ok p { color: #43b581; }

/* ── Tabs (:::::: tabs): choose one version; all panels show without JavaScript ── */
.doc-tabs { margin: 22px 0 30px; }
.doc-tablist {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
}
.doc-tab {
  appearance: none; border: 0; background: none; cursor: pointer; padding: 9px 20px; border-radius: 9px;
  color: var(--text-dim); font: 600 .92rem 'Chakra Petch', sans-serif; transition: color .15s, background .15s;
}
.doc-tab:hover { color: var(--text); }
.doc-tab[aria-selected="true"] { background: rgba(207,106,46,.16); color: var(--ember); box-shadow: inset 0 0 0 1px rgba(207,106,46,.45); }
.doc-tab:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.doc-tab-label { margin: 22px 0 8px; font: 600 .72rem/1 'Oswald', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--ember); }
.doc-tabs.is-js .doc-tab-label { display: none; }
.doc-tabs.is-js .doc-tabpanel[hidden] { display: none; }
.doc-tabpanel > :first-child { margin-top: 0; }
.doc-tabpanel > h3:first-of-type { margin-top: 4px; }
@media (max-width: 560px) { .doc-tablist { display: flex; } .doc-tab { flex: 1 1 auto; padding: 9px 12px; } }
@media (prefers-reduced-motion: reduce) { .doc-tab { transition: none; } }

/* ── Drawer + responsive ──────────────────────────────────────────────── */
.doc-scrim { display: none; }
@media (max-width: 1180px) {
  .doc-shell { grid-template-columns: var(--doc-rail) minmax(0, 1fr); }
  .doc-aside { display: none; }
  .doc-toc-inline { display: block; }
}
@media (max-width: 900px) {
  .doc-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .doc-drawer-btn { display: inline-flex; }
  .doc-rail {
    position: fixed; z-index: 90; top: 0; left: 0; bottom: 0;
    width: min(86vw, 340px); max-height: none; border-radius: 0 16px 16px 0;
    transform: translateX(-102%); transition: transform .22s ease;
    box-shadow: 18px 0 50px rgba(0,0,0,.45);
  }
  body.doc-drawer-open .doc-rail { transform: none; }
  body.doc-drawer-open { overflow: hidden; }
  body.doc-drawer-open .doc-scrim {
    display: block; position: fixed; inset: 0; z-index: 80; background: var(--overlay, rgba(0,0,0,.55));
  }
  .doc-rail-scroll { padding-top: 18px; }
  .doc-body .anchor { display: none; }
  .doc-body h2 { font-size: 1.45rem; }
  .doc-progress { top: 68px; }
}
@media (prefers-reduced-motion: reduce) {
  .doc-rail, .doc-card, .doc-pager a, .doc-progress span { transition: none; }
  .doc-card:hover, .doc-pager a:hover { transform: none; }
}
@media print {
  .doc-rail, .doc-aside, .doc-drawer-btn, .doc-progress, .doc-pager, .doc-help, header, footer { display: none !important; }
  .doc-shell { display: block; }
}
