/* CrowBots docs */

:root {
  --bg: #0C0D11;
  --bg-raised: #101217;
  --surface: #15171E;
  --surface-2: #1C1F28;
  --surface-3: #252935;
  --border: #23262F;
  --border-strong: #343846;
  --text: #EDEEF2;
  --text-2: #C9CDD8;
  --muted: #A3A8B5;
  --accent: #6C5CE7;
  --accent-hover: #7B6CF0;
  --accent-text: #B3AAFF;
  --accent-soft: #2B2550;
  --heading: #fff;
  --on-accent: #fff;
  --lead: #B4B8C4;
  --border-hover: #4A4F60;
  --header-bg: rgba(12, 13, 17, 0.92);
  --link-hover: #D4CEFF;
  --link-underline: rgba(179, 170, 255, .4);
  --code-text: #E6E2FF;
  --success: #8FE3B0;
  --placeholder: #80869A;
  --note-bg: #1B1A33;
  --note-text: #D4CEFF;
  --tip-bg: #12271C;
  --tip-text: #A9EBC4;
  --warn-bg: #2B2210;
  --warn-text: #F5D38A;
  --danger-bg: #2E1416;
  --danger-text: #FFB4B4;
  --mark-bg: rgba(242, 181, 68, .25);
  --mark-text: #FFE2A8;
  --shadow: rgba(0, 0, 0, .5);
  --shadow-strong: rgba(0, 0, 0, .6);
  --backdrop: rgba(5, 6, 9, .7);
  --flag-ring: rgba(255, 255, 255, .18);
  --toast-bg: var(--surface-3);
  --toast-text: #fff;
  --btn-light-bg: #fff;
  --btn-light-text: #14161A;
  --btn-light-hover: #E9E6FF;
  --radius: 12px;
  --radius-lg: 18px;
  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --header: 112px;
  color-scheme: dark;
}

/* the light theme */
:root[data-theme="light"] {
  --bg: #F6F6F9;
  --bg-raised: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #EFEFF4;
  --surface-3: #E4E4EC;
  --border: #E2E3EA;
  --border-strong: #CBCDD7;
  --border-hover: #A9ADBB;
  --text: #1B1D24;
  --text-2: #3B3F4C;
  --muted: #5F6474;
  --heading: #0E1016;
  --lead: #4C5162;
  --accent-hover: #5B4BD8;
  --accent-text: #5140CF;
  --accent-soft: #ECE9FF;
  --header-bg: rgba(255, 255, 255, 0.92);
  --link-hover: #3A2BB0;
  --link-underline: rgba(81, 64, 207, .35);
  --code-text: #3E2FAE;
  --success: #1E8A4C;
  --placeholder: #7A8092;
  --note-bg: #EEEBFF;
  --note-text: #3A2F8F;
  --tip-bg: #E5F5EB;
  --tip-text: #1C5E37;
  --warn-bg: #FFF3D9;
  --warn-text: #6E4A00;
  --danger-bg: #FDE9E9;
  --danger-text: #8E1C1C;
  --mark-bg: rgba(242, 181, 68, .35);
  --mark-text: #4D3300;
  --shadow: rgba(20, 22, 40, .14);
  --shadow-strong: rgba(20, 22, 40, .2);
  --backdrop: rgba(20, 22, 40, .35);
  --flag-ring: rgba(0, 0, 0, .15);
  --toast-bg: #1B1D24;
  --btn-light-bg: var(--accent);
  --btn-light-text: #fff;
  --btn-light-hover: var(--accent-hover);
  color-scheme: light;
}
/* the sections' colours are made for a dark page: darker as text on a light one */
:root[data-theme="light"] .tag, :root[data-theme="light"] .bot-count, :root[data-theme="light"] .bot-icon {
  color: color-mix(in srgb, var(--c) 55%, #000);
}
:root[data-theme="light"] .brand img { border-radius: 50%; box-shadow: 0 0 0 1px var(--border-strong); }
/* the verification page's Discord form is dark by design; its title sits on the page itself */
:root[data-theme="light"] .dvf .dvf-form-title { color: var(--heading); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; }
code, kbd, pre { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: var(--heading); }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }
kbd { font-size: 12px; padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: 5px; color: var(--muted); background: var(--bg); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-discord { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-discord:hover { background: var(--surface-3); color: var(--text); }
.btn-light { background: var(--btn-light-bg); color: var(--btn-light-text); }
.btn-light:hover { background: var(--btn-light-hover); color: var(--btn-light-text); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.bar { max-width: 1440px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); margin-right: auto; }
.brand:hover { color: var(--heading); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; color: var(--heading); }
.brand-pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-strong); }
.header-search {
  display: flex; align-items: center; gap: 10px; flex: 0 1 360px; height: 42px; padding: 0 10px 0 14px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface);
  color: var(--muted); font: inherit; font-size: 15px; cursor: pointer;
}
.header-search:hover { border-color: var(--border-hover); color: var(--text-2); }
.header-search-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn, .search-btn { display: none; }

.tabs { border-top: 1px solid var(--border); }
.tabs-inner { max-width: 1440px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab {
  display: flex; align-items: center; gap: 8px; height: 47px; padding: 0 14px; white-space: nowrap;
  color: var(--muted); font-weight: 500; font-size: 15px;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--heading); font-weight: 700; box-shadow: inset 0 -3px 0 var(--c); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent-text)); flex: none; }

/* ---- docs layout ---- */
.docs-layout {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 272px minmax(0, 1fr) 240px; align-items: start;
}
.docs-layout.no-toc { grid-template-columns: 272px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: var(--header); max-height: calc(100vh - var(--header)); overflow-y: auto;
  padding: 24px 12px 40px 20px; border-right: 1px solid var(--border); scrollbar-width: thin;
}
.docs-main { min-width: 0; padding: 28px 48px 80px; }
.docs-main > * { max-width: 780px; }
.toc { position: sticky; top: var(--header); max-height: calc(100vh - var(--header)); overflow-y: auto; padding: 32px 24px 40px 8px; font-size: 14px; }

.nav-tree { display: flex; flex-direction: column; gap: 6px; }
.nav-group > summary {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  list-style: none; cursor: pointer; font-weight: 700; color: var(--text);
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--surface); }
.nav-group-title { flex: 1; }
.nav-caret { flex: none; color: var(--muted); transition: transform .15s; transform: rotate(-90deg); }
.nav-group[open] > summary .nav-caret, .nav-sub[open] > summary .nav-caret { transform: none; }
/* a page with sub-pages: its link, and the arrow that folds them */
.nav-sub > summary { display: flex; align-items: center; list-style: none; cursor: pointer; border-radius: 8px; }
.nav-sub > summary .nav-link { flex: 1; }
.nav-sub > summary .nav-caret { box-sizing: content-box; padding: 9px 8px; border-radius: 8px; }
.nav-sub > summary .nav-caret:hover { background: var(--surface); color: var(--text); }
.nav-group ul { list-style: none; margin: 2px 0 8px; padding: 0 0 0 14px; border-left: 1px solid var(--border); margin-left: 14px; }
.nav-link { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-size: 15px; line-height: 1.35; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.is-active { background: var(--accent-soft); color: var(--heading); font-weight: 600; }
.nav-overview { color: var(--muted); font-size: 14px; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.page-title { margin: 14px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 42px; line-height: 1.1; letter-spacing: -0.025em; color: var(--heading); }
.lead { margin: 14px 0 0; font-size: 19px; line-height: 1.55; color: var(--lead); }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.page-meta span { display: inline-flex; align-items: center; gap: 6px; }
.eyebrow { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }

.toc-title { display: block; margin-bottom: 10px; font-weight: 700; color: var(--text); }
.toc ol, .toc-inline ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--muted); line-height: 1.35; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--heading); background: var(--surface-2); }
.toc-l3 a { padding-left: 22px; font-size: 13px; }
.toc-inline { display: none; margin-top: 20px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.toc-inline summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; font-weight: 600; cursor: pointer; list-style: none; }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline ol { padding: 0 8px 10px; }
.toc-inline a { display: block; padding: 8px 10px; color: var(--text-2); border-radius: 8px; }
.toc-inline .toc-l3 a { padding-left: 24px; font-size: 15px; }

/* ---- page content ---- */
.prose { margin-top: 32px; font-size: 17px; line-height: 1.7; color: var(--text-2); overflow-wrap: break-word; }
.prose::after { content: ''; display: block; clear: both; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2 {
  clear: both; margin: 52px 0 14px; font-family: var(--font-display); font-weight: 700;
  font-size: 29px; line-height: 1.2; letter-spacing: -0.015em; color: var(--heading);
}
.prose h3 { margin: 34px 0 10px; font-size: 21px; line-height: 1.3; color: var(--heading); }
.prose h4 { margin: 24px 0 8px; font-size: 18px; color: var(--heading); }
.prose p { margin: 0 0 16px; }
.prose .cmd-meta { font-size: 14px; color: var(--muted); }
.prose strong { color: var(--text); }
.prose a { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--link-underline); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
/* beside a floated screenshot, boxes and lists take the space left instead of running under it */
.prose blockquote, .prose .admonition, .prose pre, .prose .table-wrap, .prose ul, .prose ol { display: flow-root; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted); }
.prose hr { clear: both; border: 0; border-top: 1px solid var(--border-strong); margin: 40px 0; }
.prose :not(pre) > code {
  font-size: 0.88em; padding: 0.12em 0.42em; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--code-text);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.prose pre {
  position: relative; margin: 0 0 18px; padding: 14px 56px 14px 18px; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-size: 15px; line-height: 1.6; color: var(--heading);
}
.prose pre code { font-size: inherit; }
.prose a > code { color: var(--accent-text); border-color: var(--link-underline); }
.prose a:hover > code { border-color: currentColor; }
.prose h2 > code, .prose h3 > code { font-size: 0.78em; }
.copy-btn {
  position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.copy-btn:hover { background: var(--surface-2); color: var(--heading); }
.copy-btn.is-done { color: var(--success); }
.prose img {
  display: block; height: auto; margin: 8px 0 18px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: #1E1F22; cursor: zoom-in;
}
.prose img.droite, .prose img.right { float: right; width: min(44%, 380px); margin: 6px 0 18px 28px; }
.prose img.gauche, .prose img.left { float: left; width: min(44%, 380px); margin: 6px 28px 18px 0; }
.prose img.petite { width: min(60%, 320px); }
.prose blockquote {
  margin: 0 0 18px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--note-bg); color: var(--note-text);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.table-wrap { margin: 0 0 20px; overflow-x: auto; border: 1px solid var(--border-strong); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface); color: var(--text); }
.prose tr:last-child td { border-bottom: 0; }

.prose .anchor-link {
  margin-left: 8px; padding: 0 4px; border-radius: 6px; color: var(--muted); font-weight: 400;
  text-decoration: none !important; opacity: 0; transition: opacity .1s;
}
.prose h2:hover > .anchor-link, .prose h3:hover > .anchor-link, .prose .anchor-link:focus-visible { opacity: 1; }
.prose .anchor-link:hover { color: var(--text); }

/* callouts: !!! info / astuce / attention / danger / note / exemple */
.admonition { position: relative; margin: 0 0 18px; padding: 14px 18px 14px 50px; border-radius: var(--radius); background: var(--note-bg); color: var(--note-text); }
.admonition::before {
  content: ''; position: absolute; left: 18px; top: 17px; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat;
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8h.01M11 12h1v5h1'/%3E%3C/svg%3E");
}
.admonition > p:last-child { margin-bottom: 0; }
.admonition-title { margin: 0 0 4px !important; font-weight: 700; color: var(--heading); }
.admonition strong, .admonition a { color: var(--heading); }
.admonition.astuce, .admonition.conseil, .admonition.tip { background: var(--tip-bg); color: var(--tip-text); }
.admonition.astuce::before, .admonition.conseil::before, .admonition.tip::before {
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0 0 12 3z'/%3E%3C/svg%3E");
}
.admonition.attention, .admonition.important, .admonition.warning { background: var(--warn-bg); color: var(--warn-text); }
.admonition.attention::before, .admonition.important::before, .admonition.warning::before, .admonition.danger::before {
  --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9.5 17h-19z'/%3E%3Cpath d='M12 10v4M12 17.5h.01'/%3E%3C/svg%3E");
}
.admonition.danger { background: var(--danger-bg); color: var(--danger-text); }
.admonition.note, .admonition.exemple { background: var(--surface-2); color: var(--text-2); }

.help-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 48px; padding: 20px 22px;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border);
}
.help-box div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.help-box span { color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.pager-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border-strong); color: var(--text); }
.pager-link:hover { background: var(--surface); color: var(--text); }
.pager-link span { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.pager-next { text-align: right; align-items: flex-end; }

/* ---- home ---- */
.hero { border-bottom: 1px solid var(--border); background: var(--bg-raised); }
.hero-inner { max-width: 1240px; margin: 0 auto; padding: 72px 24px 60px; }
.hero h1 { margin: 14px 0 0; max-width: 860px; font-family: var(--font-display); font-weight: 800; font-size: 60px; line-height: 1.03; letter-spacing: -0.03em; color: var(--heading); }
.hero .lead { max-width: 680px; font-size: 20px; }
.hero-discover { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 17px; font-weight: 600; }
.hero-discover:hover { text-decoration: underline; }
.hero-search { position: relative; max-width: 720px; margin-top: 28px; }
.hero-field {
  display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 8px 0 18px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--muted);
}
.hero-field:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 3px rgba(108, 92, 231, .35); }
.hero-field input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 17px;
}
.hero-field input::placeholder { color: var(--placeholder); }
.hero-results:empty { display: none; }
.hero-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 10; max-height: 440px; overflow-y: auto;
  padding: 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border-strong);
  box-shadow: 0 24px 48px var(--shadow);
}
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.chips-label { color: var(--muted); font-size: 15px; margin-right: 2px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-size: 15px; }
.chip:hover { color: var(--heading); border-color: var(--border-hover); }

.home { max-width: 1240px; margin: 0 auto; padding: 0 24px 88px; }
.home-block { padding-top: 64px; }
.home-block h2, .sub-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 32px; letter-spacing: -0.02em; color: var(--heading); }
.block-lead { margin: 8px 0 0; color: var(--muted); font-size: 17px; }
.bot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 24px; }
.bot-card {
  display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: border-color .15s, transform .15s;
}
.bot-card:hover { color: var(--text); border-color: color-mix(in srgb, var(--c) 60%, var(--border)); transform: translateY(-2px); }
.bot-card-head { display: flex; align-items: center; gap: 14px; }
.bot-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent);
}
.bot-icon-lg { width: 64px; height: 64px; border-radius: 18px; }
.bot-card-name { display: flex; flex-direction: column; }
.bot-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--heading); }
.bot-prefix { font-size: 14px; color: var(--muted); }
.bot-prefix code, .section-prefix code { font-size: 13px; padding: 0 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--heading); }
.bot-desc { color: var(--text-2); }
.bot-count { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--c); }

.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.step { display: flex; gap: 16px; height: 100%; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.step:hover { color: var(--text); border-color: var(--border-strong); }
.step-n { flex: none; font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--accent-text); }
.step-body { display: flex; flex-direction: column; gap: 4px; }
.step-body strong { color: var(--heading); font-size: 17px; }
.step-body span { color: var(--muted); font-size: 15px; }

.home-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.link-list { list-style: none; margin: 20px 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.link-list li + li { border-top: 1px solid var(--border); }
.link-list a { display: flex; align-items: center; gap: 12px; padding: 15px 18px; color: var(--text); }
.link-list a:hover { background: var(--surface); color: var(--text); }
.link-title { flex: 1; font-weight: 600; }
.link-date { font-size: 14px; color: var(--muted); }
.link-list .icon { color: var(--muted); }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); white-space: nowrap; }
.help-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 58px; padding: 26px;
  border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--note-text);
}
.help-card h2 { font-size: 24px !important; }
.help-card p { margin: 0 0 6px; }

/* ---- section page ---- */
.section-head { display: flex; gap: 20px; align-items: flex-start; margin-top: 14px; }
.section-head .page-title { margin-top: 0; }
.section-prefix { margin: 12px 0 0; color: var(--muted); }
.guide-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; max-width: 980px !important; }
.guide-card { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.guide-card:hover { color: var(--text); border-color: color-mix(in srgb, var(--c) 55%, var(--border)); }
.guide-card strong { color: var(--heading); font-size: 17px; line-height: 1.35; }
.guide-desc { color: var(--text-2); font-size: 15px; }
.guide-meta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.guide-group { margin-top: 44px; }
.guide-group h2 { margin: 0; font-family: var(--font-display); font-size: 23px; color: var(--heading); }
.guide-group h2 a { color: inherit; }
.guide-group h2 a:hover { color: var(--accent); }
.guide-group-lead { margin: 6px 0 0; color: var(--text-2); max-width: 760px; }
.guide-group .guide-grid { margin-top: 18px; }
.empty-state { display: flex; gap: 14px; align-items: center; margin-top: 32px; padding: 24px; border-radius: var(--radius-lg); border: 1px dashed var(--border-strong); color: var(--text-2); }
.empty-state p { margin: 0; }

/* ---- search ---- */
.narrow { max-width: 820px; margin: 0 auto; padding: 40px 24px 88px; }
.narrow .hero-search { max-width: none; }
.result-count { color: var(--muted); margin: 24px 0 8px; }
.result-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.result { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 10px; color: var(--text); }
.result:hover, .result.is-active { background: var(--surface-3); color: var(--text); }
.narrow .result { background: var(--surface); border: 1px solid var(--border); padding: 16px 18px; }
.narrow .result:hover { border-color: var(--border-strong); }
.result-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.result-head strong { color: var(--heading); }
.result-heading { font-size: 14px; color: var(--accent-text); }
.result-heading::before { content: '# '; color: var(--muted); }
.result-snippet { font-size: 14px; color: var(--muted); line-height: 1.5; }
.result-more { font-size: 14px; font-weight: 600; color: var(--accent-text); }
.result-snippet mark, mark { background: var(--mark-bg); color: var(--mark-text); border-radius: 3px; padding: 0 1px; }
.sub-title { margin-top: 36px !important; margin-bottom: 14px !important; font-size: 24px !important; }
.error-list li { margin: 8px 0; }

.search-dialog {
  width: min(680px, calc(100% - 32px)); max-height: min(640px, 80vh); margin: 10vh auto auto; padding: 0;
  border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface-2); color: var(--text);
  box-shadow: 0 32px 80px var(--shadow-strong); overflow: hidden;
}
.search-dialog[open] { display: flex; flex-direction: column; }
.search-dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(2px); }
.search-form { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--border-strong); color: var(--muted); }
.search-form input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 18px; }
.search-dialog .search-results { flex: 1; overflow-y: auto; padding: 6px; }
.search-dialog .search-results:empty { display: none; }
.search-empty { padding: 16px 18px 20px; }
.search-empty[hidden] { display: none; }
.search-empty .chips { margin-top: 10px; }
.search-hint { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.search-none { padding: 18px; color: var(--muted); }
.search-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--border-strong); font-size: 13px; color: var(--muted); }

/* ---- drawer, lightbox, toast ---- */
.drawer {
  margin: 0; width: min(340px, 88vw); height: 100%; max-height: none; padding: 0 0 20px;
  border: 0; border-right: 1px solid var(--border-strong); background: var(--bg-raised); color: var(--text);
}
.drawer[open] { display: flex; flex-direction: column; }
.drawer::backdrop { background: var(--backdrop); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 8px 0 18px; border-bottom: 1px solid var(--border); }
.drawer-search {
  display: flex; align-items: center; gap: 10px; margin: 14px 14px 6px; height: 48px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--muted); font: inherit; font-size: 16px; cursor: pointer;
}
.drawer .nav-tree { padding: 8px 10px; overflow-y: auto; flex: 1; }
.drawer .nav-link { padding: 11px 12px; font-size: 16px; }
.drawer .nav-group summary { padding: 12px; }
.drawer-discord { margin: 8px 14px 0; }

/* ---- languages ---- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 600; font-size: 15px; white-space: nowrap;
}
.lang-switch:hover { background: var(--surface-2); color: var(--heading); }
.flag { flex: none; border-radius: 3px; box-shadow: 0 0 0 1px var(--flag-ring); }
.lang-code { display: none; }
.drawer-lang { margin: 14px 14px 0; }

/* ---- theme ---- */
.theme-switch {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 15px;
}
.theme-switch:hover { background: var(--surface-2); color: var(--heading); }
:root[data-theme="light"] .theme-sun, :root:not([data-theme="light"]) .theme-moon { display: none; }
.untranslated {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text-2); font-size: 15px;
}
.untranslated .icon { flex: none; margin-top: 2px; }

.lightbox { max-width: 96vw; max-height: 94vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(5, 6, 9, .88); }
.lightbox img { display: block; max-width: 96vw; max-height: 90vh; width: auto; height: auto; border-radius: 12px; cursor: zoom-out; }
.lightbox-close { position: fixed; top: 14px; right: 14px; background: var(--surface-2); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 10px; background: var(--toast-bg); color: var(--toast-text); font-weight: 600; transition: opacity .15s, transform .15s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-raised); }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 40px 24px 48px; display: flex; flex-wrap: wrap; gap: 28px 64px; font-size: 15px; }
.footer-brand { flex: 1 1 260px; }
.footer-brand p { margin: 8px 0 0; max-width: 320px; color: var(--muted); }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { color: var(--text-2); }
.site-footer nav a:hover { color: var(--heading); }
.footer-title { font-weight: 700; color: var(--heading); }

/* ---- responsive ---- */
@media (max-width: 1200px) {
  .docs-layout { grid-template-columns: 248px minmax(0, 1fr); }
  .toc { display: none; }
  .toc-inline { display: block; }
  .docs-main { padding: 28px 36px 72px; }
}
@media (max-width: 900px) {
  :root { --header: 64px; }
  .tabs, .sidebar, .header-search { display: none; }
  .menu-btn, .search-btn { display: inline-flex; }
  .bar { gap: 4px; padding: 0 8px; }
  .brand { margin-right: auto; }
  .btn-discord span { display: none; }
  .bar .btn-discord { width: 44px; padding: 0; }
  .bar .lang-switch { gap: 6px; padding: 0 8px; }
  .bar .lang-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bar .lang-code { display: inline; font-size: 14px; }
  .docs-layout, .docs-layout.no-toc { display: block; }
  .docs-main { padding: 20px 18px 64px; }
  .page-title { font-size: 32px; }
  .lead { font-size: 18px; }
  .prose { font-size: 17px; }
  .prose h1, .prose h2 { font-size: 25px; margin-top: 44px; }
  .prose h3 { font-size: 20px; }
  .prose img.droite, .prose img.gauche, .prose img.right, .prose img.left, .prose img.petite { float: none; width: 100%; margin: 8px 0 18px; }
  .hero-inner { padding: 40px 18px 36px; }
  .hero h1 { font-size: 38px; }
  .hero .lead { font-size: 18px; }
  .hero-field { height: 56px; padding-left: 14px; }
  .hero-field .btn { display: none; }
  .home { padding: 0 18px 64px; }
  .home-block { padding-top: 48px; }
  .home-block h2 { font-size: 26px; }
  .home-split { grid-template-columns: 1fr; }
  .help-card { margin-top: 0; }
  .link-date { display: none; }
  .pager { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; gap: 14px; }
  .narrow { padding: 28px 18px 64px; }
  .search-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border-radius: 0; border: 0; }
  .search-foot { display: none; }
  .prose .anchor-link { opacity: .6; }
}
@media (max-width: 420px) {
  .brand-pill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
