/* =====================================================================
   Marin: Documentation, Privacy & Terms centers
   Builds on site.css (same palette, fonts, nav, footer, light theme).
   Breakpoints match site.css (640 / 820) plus the docs layout steps:
   1200 (right-hand TOC collapses inline) and 1024 (sidebar -> drawer).
   ===================================================================== */

:root { --docs-side-w: 264px; --docs-toc-w: 224px; --docs-subbar-h: 52px; --docs-radius: 16px; --code-bg: rgba(255,255,255,0.045); --hover-bg: rgba(255,255,255,0.05); }
html[data-theme="light"] { --code-bg: rgba(28,21,48,0.05); --hover-bg: rgba(28,21,48,0.05); }

/* ---------- a11y helpers ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 300; padding: 10px 16px; border-radius: 10px; background: var(--pink); color: #fff; font-weight: 700; text-decoration: none; transform: translateY(-160%); transition: transform 0.2s ease; }
.skip-link:focus { transform: translateY(0); }
.docs-page:focus { outline: none; }
.kbd-hint, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--code-bg); color: var(--muted); line-height: 1.4; white-space: nowrap; }
.lang-switch { width: auto; padding: 0 13px; font-size: 12px; font-weight: 800; letter-spacing: 0.3px; text-decoration: none; }
.docs-main :where(a) { color: var(--pink-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.docs-main :where(a:hover) { color: var(--pink); }
html[data-theme="light"] .docs-main :where(a) { color: #c2185b; }
html[data-theme="light"] .docs-main :where(a:hover) { color: var(--purple); }
.docs-main code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; padding: 1px 6px; border-radius: 6px; background: var(--code-bg); border: 1px solid var(--border); color: var(--pink-soft); overflow-wrap: anywhere; }
html[data-theme="light"] .docs-main code { color: #a3175a; }

/* ---------- sub-bar (tablet / phone) ---------- */
.docs-subbar { display: none; }
@media (max-width: 1024px) {
  .docs-subbar { display: flex; align-items: center; gap: 10px; position: sticky; top: var(--nav-h); z-index: 90; height: var(--docs-subbar-h); padding: 0 16px; background: rgba(11,7,19,0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
  html[data-theme="light"] .docs-subbar { background: rgba(255,255,255,0.9); }
}
.docs-subbar-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text); font: 700 13px 'Quicksand', sans-serif; cursor: pointer; flex-shrink: 0; }
.docs-subbar-btn svg { width: 16px; height: 16px; }
.docs-subbar-btn:hover { border-color: var(--pink); }
.docs-subbar-title { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
@media (max-width: 420px) { .docs-subbar-btn span:not(.kbd-hint) { display: none; } .docs-subbar-btn { width: 38px; padding: 0; justify-content: center; } .docs-subbar-btn .kbd-hint { display: none; } }

/* ---------- shell ---------- */
.docs-page { min-height: 70vh; }
.docs-shell { display: grid; grid-template-columns: var(--docs-side-w) minmax(0, 1fr) var(--docs-toc-w); gap: 44px; max-width: 1440px; margin: 0 auto; padding: 36px 28px 72px; align-items: start; }
.docs-shell--notoc { grid-template-columns: var(--docs-side-w) minmax(0, 1fr); }
.docs-main { min-width: 0; max-width: 860px; width: 100%; }
.docs-shell--notoc .docs-main { max-width: 980px; }
.docs-side { position: sticky; top: calc(var(--nav-h) + 24px); max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.docs-side-head { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; }
.docs-side-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: 600 13.5px 'Quicksand', sans-serif; cursor: pointer; text-align: left; min-width: 0; }
.docs-side-search span:not(.kbd-hint) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docs-side-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.docs-side-search:hover { border-color: var(--pink); color: var(--text); }
.docs-side-close { display: none; }
.docs-scrim { display: none; }
.docs-toc { position: sticky; top: calc(var(--nav-h) + 28px); max-height: calc(100vh - var(--nav-h) - 56px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; font-size: 13.5px; }
.docs-toc-title { font-weight: 800; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.docs-toc-top { display: inline-block; margin-top: 14px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.docs-toc-top:hover { color: var(--text); }
.toc-list { list-style: none; border-left: 1px solid var(--border); }
.toc-list a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; transition: color 0.15s ease, border-color 0.15s ease; }
.toc-list a:hover { color: var(--text); }
.toc-list a.is-active { color: var(--text); border-left-color: var(--pink); font-weight: 700; }
.toc-l3 a { padding-left: 26px; font-size: 13px; }
.docs-toc-inline { display: none; margin: 0 0 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.docs-toc-inline summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.docs-toc-inline summary::-webkit-details-marker { display: none; }
.docs-toc-inline summary::after { content: "\25BE"; color: var(--pink-soft); transition: transform 0.2s ease; }
.docs-toc-inline[open] summary::after { transform: rotate(180deg); }
.docs-toc-inline .toc-list { margin: 0 16px 14px; max-height: 50vh; overflow-y: auto; }

@media (max-width: 1200px) {
  .docs-shell { grid-template-columns: var(--docs-side-w) minmax(0, 1fr); gap: 36px; }
  .docs-toc { display: none; }
  .docs-toc-inline { display: block; }
}
@media (max-width: 1024px) {
  .docs-shell, .docs-shell--notoc { grid-template-columns: minmax(0, 1fr); padding: 22px 20px 64px; gap: 0; }
  .docs-main, .docs-shell--notoc .docs-main { max-width: 820px; margin: 0 auto; }
  .docs-side { position: fixed; top: var(--nav-h); left: 0; bottom: 0; width: min(330px, 88vw); max-height: none; z-index: 120; background: var(--bg); border-right: 1px solid var(--border); padding: 16px 16px calc(40px + env(safe-area-inset-bottom)); transform: translateX(-102%); visibility: hidden; transition: transform 0.28s cubic-bezier(0.16,1,0.3,1), visibility 0s linear 0.28s; box-shadow: 20px 0 50px rgba(0,0,0,0.35); }
  body.docs-drawer-open .docs-side { transform: none; visibility: visible; transition: transform 0.28s cubic-bezier(0.16,1,0.3,1); }
  body.docs-drawer-open .docs-page { z-index: 95; }
  .docs-side-close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; flex-shrink: 0; }
  .docs-scrim { display: block; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 110; background: rgba(5,3,10,0.6); }
  .docs-scrim[hidden] { display: none; }
  body.docs-drawer-open { overflow: hidden; }
}
@media (max-width: 640px) { .docs-shell, .docs-shell--notoc { padding: 18px 16px 56px; } }

/* scroll targets clear the fixed nav (+ sub-bar when present) */
.docs-main [id] { scroll-margin-top: calc(var(--nav-h) + 20px); }
@media (max-width: 1024px) { .docs-main [id] { scroll-margin-top: calc(var(--nav-h) + var(--docs-subbar-h) + 16px); } }

/* ---------- sidebar nav ---------- */
.side-nav { display: flex; flex-direction: column; gap: 18px; font-size: 14px; }
.side-title, .side-group > summary { font-weight: 800; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.side-group > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 2px 0; min-height: 28px; }
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary::after { content: "\25B8"; color: var(--pink-soft); transition: transform 0.2s ease; font-size: 12px; }
.side-group[open] > summary::after { transform: rotate(90deg); }
.side-nav ul { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.side-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; color: var(--text); opacity: 0.82; text-decoration: none; font-weight: 600; line-height: 1.35; transition: background 0.15s ease, opacity 0.15s ease; }
.side-nav a > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.side-nav a:hover { background: var(--hover-bg); opacity: 1; }
.side-nav a.is-current { opacity: 1; background: linear-gradient(90deg, rgba(255,95,162,0.16), rgba(162,89,255,0.08)); box-shadow: inset 2px 0 0 var(--pink); }
.side-nav a svg { width: 13px; height: 13px; opacity: 0.6; flex-shrink: 0; }
.side-count { font-size: 11px; font-weight: 800; color: var(--muted); background: var(--code-bg); border: 1px solid var(--border); padding: 0 7px; border-radius: 999px; }
.side-badge { font-size: 10px; font-weight: 800; letter-spacing: 0.4px; color: #ffd98a; background: rgba(254,231,92,0.1); border: 1px solid rgba(254,231,92,0.28); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
html[data-theme="light"] .side-badge { color: #8a6100; background: rgba(254,200,40,0.14); }

/* ---------- breadcrumbs ---------- */
.docs-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.docs-crumbs li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.docs-crumbs li + li::before { content: "/"; opacity: 0.5; }
.docs-crumbs a { color: var(--muted) !important; text-decoration: none; }
.docs-crumbs a:hover { color: var(--text) !important; }
.crumb-current { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }

/* ---------- headings & prose ---------- */
.docs-head { margin-bottom: 28px; }
.docs-head .eyebrow { margin-bottom: 12px; }
.docs-h1 { font-family: 'Baloo 2', sans-serif; font-size: clamp(30px, 4.2vw, 44px); line-height: 1.12; font-weight: 800; letter-spacing: -0.3px; overflow-wrap: anywhere; }
.docs-main .cmd-h1 code { font-size: 0.86em; padding: 2px 12px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,95,162,0.14), rgba(162,89,255,0.14)); border-color: rgba(255,95,162,0.3); color: var(--text); }
.docs-lead { color: var(--muted); font-size: 17px; margin-top: 12px; max-width: 68ch; }
.docs-note { color: var(--muted); font-size: 13.5px; margin: 10px 0; }
.docs-h2 { position: relative; font-family: 'Baloo 2', sans-serif; font-size: clamp(22px, 2.6vw, 27px); line-height: 1.25; font-weight: 800; margin: 44px 0 14px; overflow-wrap: anywhere; }
.legal-h3, .docs-prose h3 { font-size: 17px; font-weight: 800; margin: 26px 0 8px; }
.docs-main .anchor { position: absolute; left: -22px; top: 0; padding-right: 6px; color: var(--pink-soft); text-decoration: none; opacity: 0; transition: opacity 0.15s ease; font-weight: 700; }
.docs-h2:hover .anchor, .docs-main .anchor:focus-visible, .dc-title:hover .anchor { opacity: 1; }
@media (max-width: 1024px) { .docs-main .anchor { display: none; } }
.docs-prose p, .legal-body p, .docs-sec > p { margin: 10px 0; line-height: 1.72; }
.docs-prose, .legal-body { font-size: 15.5px; }
.docs-ul { margin: 10px 0 14px 1.2em; display: flex; flex-direction: column; gap: 6px; line-height: 1.65; }
.docs-ul li::marker { color: var(--pink); }
ol.steps { list-style: none; counter-reset: s; margin: 14px 0; display: flex; flex-direction: column; gap: 12px; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 44px; line-height: 1.65; min-height: 30px; }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 800 14px 'Baloo 2', sans-serif; color: #fff; background: linear-gradient(135deg, var(--pink), var(--purple)); box-shadow: 0 0 14px rgba(255,95,162,0.3); }
.syn-label { font-size: 12px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px !important; }

/* ---------- callouts ---------- */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid; margin: 16px 0; font-size: 14.5px; line-height: 1.6; }
.callout > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; }
.callout > div { min-width: 0; }
.callout p { margin: 0 0 6px !important; }
.callout p:last-child { margin-bottom: 0 !important; }
.callout-info { background: rgba(88,101,242,0.08); border-color: rgba(88,101,242,0.3); }
.callout-info > svg { color: #8f99ff; }
.callout-tip { background: rgba(87,242,135,0.07); border-color: rgba(87,242,135,0.26); }
.callout-tip > svg { color: var(--green); }
.callout-warn { background: rgba(254,231,92,0.07); border-color: rgba(254,231,92,0.3); }
.callout-warn > svg { color: var(--yellow); }
html[data-theme="light"] .callout-warn > svg { color: #b58900; }
html[data-theme="light"] .callout-tip > svg { color: #1e9e52; }
html[data-theme="light"] .callout-info > svg { color: var(--blue); }

/* ---------- buttons ---------- */
.btn-soft, .btn-primary-soft { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 999px; font: 700 14px 'Quicksand', sans-serif; text-decoration: none !important; cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease; }
.btn-soft { border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text) !important; }
.btn-soft:hover { border-color: var(--pink); transform: translateY(-1px); }
.btn-soft svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary-soft { border: none; background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff !important; box-shadow: 0 8px 22px rgba(255,95,162,0.3); }
.btn-primary-soft:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-primary-soft:disabled, .btn-soft:disabled { opacity: 0.55; cursor: default; transform: none; }
.docs-main .btn-discord { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 12px 22px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 10px 26px rgba(88,101,242,0.35); }
.docs-main .btn-discord:hover { filter: brightness(1.08); color: #fff; }
.link-btn { background: none; border: none; color: var(--pink-soft); font: 700 13.5px 'Quicksand', sans-serif; cursor: pointer; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
html[data-theme="light"] .link-btn { color: #c2185b; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
html[data-theme="light"] .btn-soft { background: rgba(28,21,48,0.04); }

/* ---------- badges & pills ---------- */
.cmd-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.3px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--code-bg); color: var(--muted); white-space: nowrap; }
.b-slash { color: #a9b1ff; border-color: rgba(88,101,242,0.4); background: rgba(88,101,242,0.1); }
.b-prefix { color: var(--pink-soft); border-color: rgba(255,95,162,0.35); background: rgba(255,95,162,0.08); }
.b-premium { color: #ffd98a; border-color: rgba(254,231,92,0.35); background: rgba(254,231,92,0.09); white-space: normal; }
.b-owner { color: #ff9a9c; border-color: rgba(237,66,69,0.4); background: rgba(237,66,69,0.1); }
.b-free { color: #8ff5b0; border-color: rgba(87,242,135,0.35); background: rgba(87,242,135,0.08); }
html[data-theme="light"] .b-slash { color: #3f4ad1; }
html[data-theme="light"] .b-prefix { color: #b0145a; }
html[data-theme="light"] .b-premium { color: #8a6100; }
html[data-theme="light"] .b-owner { color: #b3261e; }
html[data-theme="light"] .b-free { color: #1a7f45; }
.acc-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(162,89,255,0.12); border: 1px solid rgba(162,89,255,0.3); color: var(--text); white-space: normal; line-height: 1.4; }
.acc-everyone { background: rgba(87,242,135,0.09); border-color: rgba(87,242,135,0.3); }
.acc-botOwner { background: rgba(237,66,69,0.1); border-color: rgba(237,66,69,0.35); }
.acc-guildOwner, .acc-secManager { background: rgba(255,95,162,0.1); border-color: rgba(255,95,162,0.3); }

/* ---------- code rows ---------- */
.code-row { display: flex; align-items: stretch; margin: 8px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--code-bg); overflow: hidden; }
.docs-main .code-line { flex: 1; min-width: 0; display: block; padding: 11px 14px; border: none; background: none; border-radius: 0; font-size: 14px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.copy-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border: none; border-left: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--muted); font: 700 12.5px 'Quicksand', sans-serif; cursor: pointer; flex-shrink: 0; min-width: 44px; min-height: 42px; }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn:hover { color: var(--text); background: rgba(255,95,162,0.1); }
.copy-btn.is-done { color: var(--green); }
html[data-theme="light"] .copy-btn { background: rgba(28,21,48,0.03); }
html[data-theme="light"] .copy-btn.is-done { color: #1a7f45; }
@media (max-width: 480px) { .copy-btn span { display: none; } }

/* ---------- tables (turn into cards on phones) ---------- */
.table-wrap { width: 100%; overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.docs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.docs-table th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); white-space: nowrap; }
.docs-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.55; }
.docs-table tr:last-child td { border-bottom: none; }
.docs-table td code { white-space: nowrap; }
.docs-table tr[hidden] { display: none !important; }
html[data-theme="light"] .docs-table th { background: rgba(28,21,48,0.02); }
.arg-extra { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.req { color: var(--pink-soft); font-weight: 700; }
@media (max-width: 640px) {
  .table-wrap { border: none; background: none; overflow: visible; }
  .docs-table, .docs-table tbody, .docs-table tr, .docs-table td { display: block; width: 100%; }
  .docs-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .docs-table tr { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin-bottom: 10px; padding: 6px 0; }
  .docs-table td { border: none; padding: 7px 14px; display: grid; grid-template-columns: minmax(84px, 32%) minmax(0, 1fr); gap: 10px; }
  .docs-table td::before { content: attr(data-label); font-size: 11.5px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
  .docs-table td > * { min-width: 0; }
  .docs-table td code { white-space: normal; }
}

/* ---------- module icons (generated set, tinted with the brand gradient) ---------- */
.mi { display: inline-block; flex-shrink: 0; width: 26px; height: 26px; background: linear-gradient(140deg, var(--pink) 10%, #c86bff 90%); -webkit-mask: var(--mi) center / contain no-repeat; mask: var(--mi) center / contain no-repeat; }
.mi-xs { width: 17px; height: 17px; }
.mi-sm { width: 22px; height: 22px; }
.mi-tile { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(145deg, rgba(255,95,162,0.13), rgba(162,89,255,0.1)); border: 1px solid rgba(255,95,162,0.22); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }
.mi-tile .mi { width: 28px; height: 28px; }
.mi-tile-lg { width: 68px; height: 68px; border-radius: 20px; }
.mi-tile-lg .mi { width: 40px; height: 40px; }
html[data-theme="light"] .mi { background: linear-gradient(140deg, #e0156f 10%, #8a3fe0 90%); }
html[data-theme="light"] .mi-tile { background: linear-gradient(145deg, rgba(255,95,162,0.1), rgba(162,89,255,0.08)); border-color: rgba(224,21,111,0.2); }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: 0.4px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; line-height: 1.3; }
.pill-xs { font-size: 10px; padding: 2px 7px; }
.pill-premium { color: #ffd98a; background: rgba(254,215,92,0.1); border: 1px solid rgba(254,215,92,0.32); }
html[data-theme="light"] .pill-premium { color: #8a6100; background: rgba(254,215,92,0.2); border-color: rgba(181,137,0,0.35); }
.acc { display: inline-block; font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.4; }
.acc-lg { font-size: 15px; padding: 5px 12px; border-radius: 999px; background: rgba(162,89,255,0.12); border: 1px solid rgba(162,89,255,0.3); }
.side-nav a .side-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.side-nav a .mi { opacity: 0.9; }
.side-nav a > span.mi:first-child { flex: 0 0 17px; }
.side-nav a > .side-label { flex: 1 1 auto; overflow-wrap: normal; word-break: normal; }
.eyebrow-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; }

/* ---------- docs home ---------- */
.dh-hero { text-align: center; padding: 26px 0 8px; margin-bottom: 18px; animation: loadFadeIn 0.7s cubic-bezier(0.16,1,0.3,1) both; }
.dh-mark { width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 50%; padding: 5px; background: conic-gradient(from 200deg, var(--pink), var(--purple), var(--pink)); box-shadow: 0 0 0 8px rgba(255,95,162,0.07), 0 18px 50px rgba(255,95,162,0.28); animation: bob 5s ease-in-out infinite; }
.dh-mark img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--bg); }
.dh-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: clamp(34px, 5.4vw, 54px); line-height: 1.05; letter-spacing: -0.5px; background: linear-gradient(135deg, var(--text) 30%, var(--pink-soft) 75%, #c9a4ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.dh-lead { max-width: 60ch; margin: 14px auto 0; color: var(--muted); font-size: 17.5px; line-height: 1.6; }
.dh-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.nf-head .dh-actions { justify-content: flex-start; }
.sec-lead { color: var(--muted); margin: -4px 0 16px !important; }
.lc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.link-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--docs-radius); border: 1px solid var(--border); background: var(--surface); text-decoration: none !important; color: var(--text) !important; transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease; }
.link-card:hover { border-color: rgba(255,95,162,0.55); transform: translateY(-2px); background: linear-gradient(145deg, rgba(255,95,162,0.06), rgba(162,89,255,0.04)), var(--surface); }
.link-card > svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; transition: transform 0.2s ease, color 0.2s ease; }
.link-card:hover > svg { transform: translateX(3px); color: var(--pink-soft); }
.lc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.lc-title { font-weight: 800; font-size: 16px; }
.lc-text { color: var(--muted); font-size: 14px; line-height: 1.5; }
.mc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mod-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--docs-radius); border: 1px solid var(--border); background: var(--surface); text-decoration: none !important; color: var(--text) !important; transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.mod-card:hover { border-color: rgba(255,95,162,0.5); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,0.25); }
.mc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mc-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 19px; line-height: 1.2; }
.mc-text { color: var(--muted); font-size: 14.5px; line-height: 1.6; flex: 1; }
.docs-main .mc-text code { font-size: 0.86em; }
.mc-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--pink-soft); }
.mc-more svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
.mod-card:hover .mc-more svg { transform: translateX(3px); }
html[data-theme="light"] .mc-more { color: #c2185b; }
.help-list { list-style: none; border: 1px solid var(--border); border-radius: var(--docs-radius); background: var(--surface); overflow: hidden; }
.help-list li + li { border-top: 1px solid var(--border); }
.help-list a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 18px; text-decoration: none !important; color: var(--text) !important; transition: background 0.15s ease; }
.help-list a:hover { background: var(--hover-bg); }
.hl-title { font-weight: 800; display: inline-flex; align-items: center; gap: 6px; min-width: 190px; }
.hl-title svg { width: 12px; height: 12px; opacity: 0.6; }
.hl-text { color: var(--muted); font-size: 14.5px; flex: 1; min-width: 200px; }
@media (max-width: 720px) { .lc-grid, .mc-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- filter bar & empty state (commands, faq) ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 8px; }
.f-text { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.f-text:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,95,162,0.15); }
.f-text svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.f-text input { flex: 1; min-width: 0; border: none; background: none; outline: none; color: var(--text); font: 600 15px 'Quicksand', sans-serif; }
.f-text input::placeholder { color: var(--muted); opacity: 0.85; }
.filter-count { font-size: 13px; color: var(--muted); font-weight: 700; min-height: 1em; }
.empty-state { text-align: center; padding: 34px 20px; margin: 16px 0; border: 1px dashed var(--border); border-radius: var(--docs-radius); color: var(--muted); }
.empty-t { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 20px; color: var(--text); margin-bottom: 4px; }
[hidden] { display: none !important; }

/* ---------- command tables ---------- */
.ci-h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ci-more { margin-left: auto; font: 700 13.5px 'Quicksand', sans-serif; display: inline-flex; align-items: center; gap: 4px; text-decoration: none !important; }
.ci-more svg { width: 14px; height: 14px; }
.ct td:first-child { width: 32%; }
.ct td:last-child { width: 24%; }
.ct-cmd { display: inline-flex; flex-wrap: wrap; gap: 5px; text-decoration: none !important; }
.docs-main .ct-cmd code { color: var(--pink-soft); transition: border-color 0.15s ease; }
.docs-main .ct-cmd:hover code { border-color: var(--pink); }
.docs-main code.alt { opacity: 0.7; }
.st td:first-child { width: 36%; }
.at td:first-child { width: 22%; }

/* ---------- command page ---------- */
.cmd-head .eyebrow-link { margin-bottom: 12px; }
.docs-main .cmd-h1 { display: flex; flex-wrap: wrap; gap: 10px; }
.syn-note { font-size: 13.5px; color: var(--muted); margin: 8px 0 !important; }
.perm-box { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--docs-radius); background: var(--surface); }
.perm-box p { margin: 6px 0; line-height: 1.6; }
.perm-level { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 0 !important; }
.perm-resp { color: var(--muted); font-size: 14px; }
.arg-type { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.example { padding: 14px; border: 1px solid var(--border); border-radius: var(--docs-radius); background: var(--surface); margin: 12px 0; }
.example .code-row { margin-top: 0; }
.example-sm { padding: 10px 12px; }
.ex-note { font-size: 14px; color: var(--muted); margin: 6px 2px 10px !important; }
.example-sm .ex-note { margin-bottom: 2px !important; }
.err-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.err-list li { padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(237,66,69,0.28); background: rgba(237,66,69,0.06); font-size: 14px; line-height: 1.55; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rel-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); text-decoration: none !important; color: var(--text) !important; transition: border-color 0.15s ease, transform 0.15s ease; }
.rel-card:hover { border-color: var(--pink); transform: translateY(-1px); }
.rel-card span { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* ---------- module page ---------- */
.mod-head { display: flex; gap: 20px; align-items: flex-start; }
.mod-head .eyebrow { margin-bottom: 8px; }
@media (max-width: 560px) { .mod-head { flex-direction: column; gap: 14px; } }
.setup-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.setup-item { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.setup-item summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; font-weight: 700; list-style: none; min-height: 48px; }
.setup-item summary::-webkit-details-marker { display: none; }
.setup-item summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s ease; }
.setup-item[open] summary::after { transform: rotate(225deg); }
.setup-body { padding: 0 16px 12px 48px; }
.setup-body p { margin: 6px 0; line-height: 1.6; }

/* ---------- faq / troubleshooting ---------- */
.faq-item { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin: 8px 0; transition: border-color 0.2s ease; }
.faq-item[open] { border-color: rgba(255,95,162,0.4); }
.faq-item summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; font-weight: 700; list-style: none; min-height: 50px; line-height: 1.45; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary > span:first-child { flex: 1; }
.faq-chev svg { width: 16px; height: 16px; color: var(--muted); transition: transform 0.2s ease; }
.faq-item[open] .faq-chev svg { transform: rotate(90deg); color: var(--pink-soft); }
.faq-a { padding: 0 16px 14px; color: var(--text); opacity: 0.92; line-height: 1.7; }
.faq-a p { margin: 0; }
.trouble ol.steps { margin-top: 8px; }

/* ---------- prev / next ---------- */
.docs-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
.pn-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); text-decoration: none !important; color: var(--text) !important; transition: border-color 0.15s ease, transform 0.15s ease; min-width: 0; }
.pn-card:hover { border-color: var(--pink); transform: translateY(-1px); }
.pn-next { text-align: right; align-items: flex-end; }
.pn-dir { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.pn-dir svg { width: 14px; height: 14px; }
.pn-label { font-weight: 800; overflow-wrap: anywhere; }
@media (max-width: 480px) { .docs-pn { grid-template-columns: 1fr; } .pn-next { text-align: left; align-items: flex-start; } }

/* ---------- Discord-style preview (always Discord's dark palette) ---------- */
.discord-preview { margin: 6px 0 0; }
.dp-msg { padding: 14px; border-radius: 14px; background: #2b2d31; color: #dbdee1; border: 1px solid rgba(255,255,255,0.06); font-family: 'Quicksand', sans-serif; }
.dp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.dp-avatar img { width: 32px; height: 32px; border-radius: 50%; display: block; background: linear-gradient(135deg, var(--purple), var(--pink)); object-fit: cover; }
.dp-name { font-weight: 700; color: #f2f3f5; }
.dp-bot { font-size: 10px; font-weight: 800; background: var(--blue); color: #fff; padding: 1px 5px; border-radius: 4px; }
.dp-time { font-size: 11.5px; color: #949ba4; }
.dp-text { font-size: 14.5px; line-height: 1.5; padding-left: 40px; overflow-wrap: anywhere; }
.docs-main .dp-msg code { background: #1e1f22; border-color: #1e1f22; color: #dbdee1; }
.docs-main .dp-msg a { color: #00a8fc; }
.dp-embed { margin: 6px 0 0 40px; padding: 10px 14px 12px; border-radius: 6px; background: #232428; border-left: 4px solid var(--dp-color, var(--pink)); max-width: 460px; }
.dp-etitle { font-weight: 800; color: #f2f3f5; margin-bottom: 6px; overflow-wrap: anywhere; }
.dp-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 14px; }
.dp-field { min-width: 0; }
.dp-fname { font-size: 12.5px; font-weight: 800; color: #f2f3f5; }
.dp-fval { font-size: 13.5px; color: #dbdee1; overflow-wrap: anywhere; }
.dp-foot { font-size: 11.5px; color: #949ba4; margin-top: 8px; }
.discord-preview figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
@media (max-width: 480px) { .dp-text { padding-left: 0; } .dp-embed { margin-left: 0; } }


/* ---------- command palette ---------- */
.cmdk { position: fixed; inset: 0; z-index: 250; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.cmdk[hidden] { display: none; }
.cmdk-scrim { position: absolute; inset: 0; background: rgba(5,3,10,0.66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
html[data-theme="light"] .cmdk-scrim { background: rgba(28,21,48,0.35); }
.cmdk-panel { position: relative; width: min(660px, 100%); max-height: min(72vh, 620px); display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--border); background: var(--surface-solid); box-shadow: 0 30px 80px rgba(0,0,0,0.5); overflow: hidden; animation: cmdkIn 0.18s cubic-bezier(0.16,1,0.3,1); }
html[data-theme="light"] .cmdk-panel { box-shadow: 0 30px 80px rgba(28,21,48,0.25); }
@keyframes cmdkIn { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
.cmdk-head { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--border); }
.cmdk-head > svg { width: 18px; height: 18px; color: var(--pink-soft); flex-shrink: 0; }
.cmdk-input { flex: 1; min-width: 0; height: 58px; border: none; background: none; color: var(--text); font: 600 16px 'Quicksand', sans-serif; outline: none; }
.cmdk-input::-webkit-search-cancel-button { display: none; }
.cmdk-esc { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--code-bg); color: var(--muted); font: 700 12px 'Quicksand', sans-serif; cursor: pointer; flex-shrink: 0; }
.cmdk-list { list-style: none; overflow-y: auto; padding: 8px; overscroll-behavior: contain; flex: 1; }
.cmdk-group { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.cmdk-item a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; }
.cmdk-item[aria-selected="true"] a { background: linear-gradient(90deg, rgba(255,95,162,0.16), rgba(162,89,255,0.1)); box-shadow: inset 2px 0 0 var(--pink); }
.cmdk-t { font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }
.cmdk-s { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-t mark { background: none; color: var(--pink-soft); font-weight: 800; }
html[data-theme="light"] .cmdk-t mark { color: #c2185b; }
.cmdk-empty { padding: 26px; text-align: center; color: var(--muted); }
.cmdk-empty[hidden] { display: none; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.cmdk-foot kbd { margin-right: 3px; }
@media (max-width: 640px) {
  .cmdk { padding: 0; align-items: stretch; }
  .cmdk-panel { width: 100%; max-height: none; height: 100%; border-radius: 0; border: none; padding-top: env(safe-area-inset-top); }
  .cmdk-foot { display: none; }
}

/* ---------- toast & reading progress ---------- */
.docs-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 260; padding: 10px 18px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border); box-shadow: 0 12px 30px rgba(0,0,0,0.35); font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; max-width: calc(100vw - 32px); text-align: center; }
.docs-toast.show { opacity: 1; transform: translate(-50%, 0); }
.read-progress { position: fixed; top: var(--nav-h); left: 0; right: 0; height: 3px; z-index: 101; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--pink), var(--purple)); }
@media (max-width: 1024px) { .read-progress { top: calc(var(--nav-h) + var(--docs-subbar-h) - 3px); } }

/* Dashboard shortcut: docs pages have no sticky "Add" bar, so on phones the
   button drops to the corner and shrinks to its icon to keep text readable. */
@media (max-width: 640px) {
  .docs-body { padding-bottom: 0; }
  .docs-body .dash-fab { bottom: calc(16px + env(safe-area-inset-bottom)); right: 14px; padding: 13px; }
  .docs-body .dash-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  body.docs-drawer-open .dash-fab { display: none; }
}


/* ---------- legal documents (privacy & terms) ---------- */
.lg-hero { position: relative; padding: 8px 0 26px; margin-bottom: 26px; border-bottom: 1px solid var(--border); animation: loadFadeIn 0.6s cubic-bezier(0.16,1,0.3,1) both; }
.lg-hero .docs-h1 { font-size: clamp(34px, 5vw, 52px); }
.lg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.lg-meta-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--pink); opacity: 0.7; }
.lg-short { position: relative; padding: 20px 22px 18px; border-radius: 18px; border: 1px solid rgba(255,95,162,0.28); background: linear-gradient(145deg, rgba(255,95,162,0.08), rgba(162,89,255,0.06)); margin-bottom: 26px; overflow: hidden; }
.lg-short::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--pink), var(--purple)); }
.lg-short-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.lg-short ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lg-short li { position: relative; padding-left: 20px; line-height: 1.6; font-size: 15px; }
.lg-short li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px rgba(255,95,162,0.6); }
.lg-tools { position: sticky; top: calc(var(--nav-h) + 12px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 20px; }
@media (max-width: 1024px) { .lg-tools { top: calc(var(--nav-h) + var(--docs-subbar-h) + 8px); } }
@media (max-width: 640px) { .lg-tools { position: static; margin: 0 0 16px; } }
.docs-legal .docs-main [id] { scroll-margin-top: calc(var(--nav-h) + 84px); }
@media (max-width: 1024px) { .docs-legal .docs-main [id] { scroll-margin-top: calc(var(--nav-h) + var(--docs-subbar-h) + 76px); } }
@media (max-width: 640px) { .docs-legal .docs-main [id] { scroll-margin-top: calc(var(--nav-h) + var(--docs-subbar-h) + 16px); } }
.lg-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-alt); box-shadow: 0 10px 28px rgba(0,0,0,0.35); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
html[data-theme="light"] .lg-search { background: #fff; box-shadow: 0 8px 22px rgba(28,21,48,0.08); }
.lg-search:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,95,162,0.15); }
.lg-search svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.lg-search input { flex: 1; min-width: 0; border: none; background: none; outline: none; color: var(--text); font: 600 15px 'Quicksand', sans-serif; }
.lg-search input::placeholder { color: var(--muted); opacity: 0.85; }
.lg-count { font-size: 13px; font-weight: 700; color: var(--muted); padding: 6px 12px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); }
.lg-count:empty { display: none; }
.lg-index-mobile { display: none; margin: 0 0 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.lg-index-mobile summary { cursor: pointer; padding: 12px 16px; font-weight: 800; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.lg-index-mobile summary::-webkit-details-marker { display: none; }
.lg-index-mobile summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s ease; }
.lg-index-mobile[open] summary::after { transform: rotate(225deg); }
.lg-index-mobile .lg-index { margin: 0 12px 12px; border-left: none; }
@media (max-width: 1024px) { .lg-index-mobile { display: block; } }
.lg-index { list-style: none; }
.lg-index a { display: flex !important; gap: 10px; align-items: baseline; text-align: left; }
.side-nav .lg-index a > span.lg-index-n { flex: 0 0 22px; }
.lg-index a > span:last-child { flex: 1; min-width: 0; }
.lg-index-n { flex: 0 0 22px; font: 800 12px 'Baloo 2', sans-serif; color: var(--pink-soft); font-variant-numeric: tabular-nums; }
.lg-side-index .toc-list { border-left: none; }
.lg-side-index .toc-list a { padding: 6px 10px; margin: 0; border-left: none; border-radius: 10px; }
.lg-side-index .toc-list a.is-active { background: linear-gradient(90deg, rgba(255,95,162,0.14), rgba(162,89,255,0.06)); }
.lg-sec { margin: 0 0 34px; }
.lg-h2 { display: flex; align-items: center; gap: 14px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: clamp(22px, 2.8vw, 28px); line-height: 1.2; margin: 44px 0 16px; }
.lg-sec:first-child .lg-h2 { margin-top: 8px; }
.lg-num { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 14px; font-size: 17px; color: #fff; background: linear-gradient(135deg, var(--pink), var(--purple)); box-shadow: 0 8px 22px rgba(255,95,162,0.28); font-variant-numeric: tabular-nums; }
.lg-art { position: relative; padding: 18px 20px; margin: 10px 0; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.lg-art:target, .lg-art.is-flash { border-color: rgba(255,95,162,0.65); box-shadow: 0 0 0 4px rgba(255,95,162,0.12); }
.lg-art-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.docs-main .lg-art-n { font: 800 12.5px 'Quicksand', sans-serif; letter-spacing: 0.3px; color: var(--pink-soft); text-decoration: none; padding: 2px 8px; border-radius: 8px; background: rgba(255,95,162,0.1); white-space: nowrap; }
html[data-theme="light"] .docs-main .lg-art-n { color: #c2185b; }
.lg-h3 { flex: 1; min-width: 0; font-size: 17px; font-weight: 800; line-height: 1.35; }
.lg-copy { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); font: 700 12.5px 'Quicksand', sans-serif; cursor: pointer; opacity: 0; transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.lg-copy svg { width: 14px; height: 14px; }
.lg-art:hover .lg-copy, .lg-copy:focus-visible { opacity: 1; }
.lg-copy:hover { border-color: var(--border); color: var(--text); }
@media (hover: none) { .lg-copy { opacity: 1; } .lg-copy span { display: none; } }
.lg-body { font-size: 15.5px; line-height: 1.72; }
.lg-body p { margin: 8px 0; }
.lg-body > :first-child { margin-top: 0; }
.lg-body > :last-child { margin-bottom: 0; }
.lg-ul { margin: 8px 0 10px; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lg-ul li { position: relative; padding-left: 18px; }
.lg-ul li::before { content: ""; position: absolute; left: 3px; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); }
.lg-body .table-wrap { margin: 12px 0; }
.lg-body .callout { margin: 12px 0; }
.lg-art mark { background: rgba(255,95,162,0.28); color: inherit; border-radius: 3px; padding: 0 1px; }
.lg-empty { text-align: center; padding: 38px 20px; border: 1px dashed var(--border); border-radius: 18px; color: var(--muted); margin: 10px 0 30px; }
.lg-empty-t { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 22px; color: var(--text); margin-bottom: 4px; }
.lg-cta { margin: 48px 0 10px; padding: 28px 26px; border-radius: 22px; text-align: center; border: 1px solid rgba(255,95,162,0.3); background: radial-gradient(120% 140% at 50% 0%, rgba(255,95,162,0.16), rgba(162,89,255,0.08) 55%, transparent 100%), var(--surface); }
.lg-cta-t { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: clamp(22px, 3vw, 28px); line-height: 1.2; }
.lg-cta p { color: var(--muted); max-width: 56ch; margin: 8px auto 0; line-height: 1.6; }
.lg-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
@media (max-width: 640px) {
  .lg-art { padding: 16px; }
  .lg-num { width: 38px; height: 38px; font-size: 15px; border-radius: 12px; }
  .lg-short { padding: 18px 16px 16px 20px; }
  .lg-cta { padding: 24px 16px; }
  .lg-cta-actions a { flex: 1 1 100%; justify-content: center; }
}

/* ---------- privacy requests ---------- */
.req-user { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; margin: 20px 0 0; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.req-signin { margin-top: 10px; padding: 20px; border-radius: var(--docs-radius); border: 1px solid var(--border); background: var(--surface); }
.req-signin .docs-h2 { margin-top: 0; }
.req-form { display: flex; flex-direction: column; gap: 18px; }
.req-form fieldset { border: none; min-width: 0; }
.req-form legend, .req-field > label { font-weight: 800; font-size: 14.5px; margin-bottom: 8px; display: block; }
.req-types-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 8px; }
.req-types-pick legend { grid-column: 1 / -1; }
.req-type-opt { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 12px 42px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; min-width: 0; }
.req-type-opt input { position: absolute; left: 14px; top: 15px; accent-color: var(--pink); width: 17px; height: 17px; }
.req-type-opt.is-on, .req-type-opt:has(input:checked) { border-color: var(--pink); background: rgba(255,95,162,0.08); }
.rt-title { font-weight: 800; font-size: 14.5px; }
.rt-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.radio-inline { display: inline-flex; align-items: center; gap: 8px; margin-right: 18px; min-height: 40px; font-weight: 600; cursor: pointer; }
.radio-inline input, .req-confirm input { accent-color: var(--pink); width: 18px; height: 18px; }
.req-guild { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; max-width: 380px; }
.req-guild[hidden] { display: none; }
.req-guild label { font-weight: 700; font-size: 13.5px; }
.req-form input[type="text"], .req-form input:not([type]), .req-form textarea, .req-reply textarea { width: 100%; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-solid); color: var(--text); padding: 10px 12px; font: 600 15px 'Quicksand', sans-serif; }
.req-form textarea, .req-reply textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.req-form [aria-invalid="true"] { border-color: var(--red) !important; }
.docs-main .field-help { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.docs-main .field-err { font-size: 13px; color: #ff8a8c; font-weight: 700; margin: 4px 0 0; }
.field-err[hidden] { display: none; }
html[data-theme="light"] .docs-main .field-err { color: #b3261e; }
.req-opt { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.req-confirm { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 14.5px; cursor: pointer; line-height: 1.45; }
.req-confirm input { margin-top: 1px; flex-shrink: 0; }
.req-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.docs-main .req-limits { font-size: 12.5px; color: var(--muted); margin: 0; }
.docs-main .req-status-msg { font-weight: 700; margin: 0; }
.req-status-msg.is-ok { color: var(--green); }
.req-status-msg.is-err { color: #ff8a8c; }
.req-status-msg:empty { display: none; }
html[data-theme="light"] .req-status-msg.is-ok { color: #1a7f45; }
html[data-theme="light"] .req-status-msg.is-err { color: #b3261e; }
.req-list { display: flex; flex-direction: column; gap: 12px; }
.req-card { padding: 16px; border-radius: var(--docs-radius); border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.req-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.docs-main .req-type { font-weight: 800; font-size: 15.5px; margin: 0; }
.docs-main .req-ref { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; overflow-wrap: anywhere; }
.req-status { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.st-received, .st-in_review { color: #a9b1ff; border-color: rgba(88,101,242,0.4); background: rgba(88,101,242,0.1); }
.st-needs_info { color: #ffd98a; border-color: rgba(254,231,92,0.4); background: rgba(254,231,92,0.08); }
.st-completed { color: #8ff5b0; border-color: rgba(87,242,135,0.4); background: rgba(87,242,135,0.08); }
.st-rejected { color: #ff9a9c; border-color: rgba(237,66,69,0.4); background: rgba(237,66,69,0.08); }
.st-withdrawn { color: var(--muted); }
html[data-theme="light"] .st-received, html[data-theme="light"] .st-in_review { color: #3f4ad1; }
html[data-theme="light"] .st-needs_info { color: #8a6100; }
html[data-theme="light"] .st-completed { color: #1a7f45; }
html[data-theme="light"] .st-rejected { color: #b3261e; }
.req-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 10px 0; font-size: 13.5px; }
.req-meta dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.docs-main .req-details { white-space: pre-wrap; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--code-bg); margin: 8px 0; overflow-wrap: anywhere; }
.req-export { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); margin: 8px 0; }
.req-timeline { margin: 8px 0; }
.req-timeline summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--pink-soft); min-height: 32px; display: flex; align-items: center; }
html[data-theme="light"] .req-timeline summary { color: #c2185b; }
.req-timeline ol { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0 4px; padding-left: 14px; border-left: 2px solid var(--border); }
.req-timeline li { font-size: 13px; }
.req-timeline time, .req-by { color: var(--muted); }
.docs-main .req-timeline p { margin: 4px 0 0; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.req-reply { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.req-reply label { font-weight: 700; font-size: 13.5px; }
.req-reply button { align-self: flex-start; }

/* ---------- print (legal documents and any docs page) ---------- */
@media print {
  @page { margin: 18mm 16mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body { padding: 0 !important; font-size: 11pt; }
  .nav, .docs-subbar, .docs-side, .docs-toc, .docs-toc-inline, .docs-scrim, .footer, .cmdk, .docs-toast, .read-progress, .bg-glow, .dash-fab, .docs-pn, .skip-link, .copy-btn, .anchor, .req-form, .req-withdraw, .req-reply, .tab-list,
  .filter-bar, .empty-state, .lg-tools, .lg-copy, .lg-cta, .lg-index-mobile, .lg-empty, .dh-actions, .docs-search-open { display: none !important; }
  .page { padding-top: 0 !important; }
  .docs-shell, .docs-shell--notoc { display: block !important; padding: 0 !important; max-width: none !important; }
  .docs-main { max-width: none !important; }
  .docs-main *, .docs-main *::before, .docs-main *::after { background: transparent !important; box-shadow: none !important; color: #000 !important; -webkit-text-fill-color: #000 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .lg-art, .docs-table tr, .callout, .faq-item, .lg-short { border: 1px solid #999 !important; break-inside: avoid; }
  .lg-sec[hidden], .lg-art[hidden], .faq-item[hidden], .faq-cat[hidden], .ci-mod[hidden] { display: block !important; }
  .docs-table tr[hidden] { display: table-row !important; }
  .faq-item .faq-a { display: block !important; }
  .table-wrap { border: 1px solid #999 !important; overflow: visible !important; }
  .docs-h2, .lg-h2 { break-after: avoid; margin-top: 22px; }
  .lg-num { border: 1px solid #000 !important; }
  a { text-decoration: underline !important; }
  .lg-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  mark { background: none !important; }
}

/* Keyboard shortcut hints mean nothing on touch-only devices. */
@media (hover: none) and (pointer: coarse) { .kbd-hint { display: none; } }
.td-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.td-chips a { text-decoration: none; }
/* The native "clear" cross on search inputs is blue in Chromium; Escape clears instead. */
.docs-main input[type="search"]::-webkit-search-cancel-button, .cmdk input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
