/* Voinly public site chrome (Nov 2026 redesign, docs/REDESIGN.md).
   Owner: the site agent. Loaded by public_layout.html after app.css and r2.css, so equal-specificity rules here win.
   Scope: the floating pill header (.site-nav / .nav-*), the mobile nav sheet, the 4-column footer, and the
   shared look of the public pages (docs, FAQ, commands, status, legal) that public_layout draws.
   Use the tokens of app.css (:root) only; no new colours outside the token table of docs/REDESIGN.md.
   Spacing stays on the 4px scale (the A-44 audit reads this file too). */

/* ------------------------------------------------------------------ page canvas */
/* Anchored sections land below the floating header (12px gap + 60px pill + breathing room). */
html:has(> body.public) { scroll-padding-top: 96px; }
body.public { background: var(--clr-canvas); }

/* ------------------------------------------------------------------ header: the floating pill */
/* The header box is a transparent sticky strip; the pill inside it (.inner) carries the glass. The strip
   ignores the pointer so the 12px gap above the pill never blocks the page under it. */
.site-nav { position: sticky; top: 0; z-index: 40; padding: 12px 24px 0; background: transparent; border-bottom: 0; pointer-events: none; }
.site-nav.scrolled { border-color: transparent; }
.site-nav > * { pointer-events: auto; }
.site-nav .inner {
  position: relative; max-width: 1152px; height: 60px; margin: 0 auto; padding: 0 8px 0 20px; gap: 24px;
  border-radius: var(--radius-full); border: 1px solid var(--border-default);
  background: var(--nav-glass); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-float);
  transition: background-color 200ms var(--ease-smooth), border-color 200ms var(--ease-smooth);
}
.site-nav.scrolled .inner { background: rgba(12, 13, 16, 0.86); border-color: var(--border-hover); }
.site-nav .brand { font-family: var(--font-ui); font-size: 18px; font-weight: 800; letter-spacing: -0.03em; gap: 12px; flex-shrink: 0; }
.site-nav .brand-mark { width: 28px; height: 28px; }

/* Links sit in the middle of the pill as quiet pills of their own. */
.site-nav .links { flex: 1; justify-content: center; gap: 4px; }
.site-nav .links a {
  height: 36px; padding: 0 12px; border-radius: var(--radius-full);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: color 150ms var(--ease-smooth), background-color 150ms var(--ease-smooth);
}
.site-nav .links a:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.site-nav .links a[aria-current="page"] { color: var(--text-primary); background: rgba(255, 255, 255, 0.07); }

.site-nav .nav-actions { gap: 8px; }
.site-nav .nav-actions .btn { height: 40px; padding: 0 16px; border-radius: var(--radius-full); font-size: 14px; gap: 8px; }
.site-nav .nav-actions .btn-primary { height: 40px; }
/* "Log in" is a quiet pill with the Discord mark; "Add to Discord" is the one Discord-coloured action. */
.site-nav .nav-login { --btn-bg: rgba(255, 255, 255, 0.04); --btn-fg: var(--text-primary); --btn-bd: var(--border-default); }
.site-nav .nav-login:hover { --btn-bg: rgba(255, 255, 255, 0.08); --btn-bd: var(--border-hover); }
.site-nav .nav-add { --btn-bg: var(--clr-discord); --btn-fg: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 24px -10px rgba(88, 101, 242, 0.7); }
.site-nav .nav-add:hover { --btn-bg: #4752c4; }
.site-nav .nav-user-btn { height: 40px; padding: 4px 8px 4px 4px; border: 1px solid var(--border-default); background: rgba(255, 255, 255, 0.04); }
.site-nav .nav-user-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-hover); }
.site-nav .nav-user-btn .avatar { width: 30px; height: 30px; }
.site-nav .nav-user-menu { top: calc(100% + 12px); border-radius: var(--radius-lg); background: var(--clr-surface-2); border: 1px solid var(--border-default); box-shadow: var(--shadow-float); }
.site-nav .nav-burger { border-radius: var(--radius-full); }

/* The phone menu: a floating card under the pill, the same glass family. */
@media (max-width: 900px) {
  .site-nav .nav-sheet {
    position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; max-width: 1152px; margin: 0 auto;
    padding: 8px; border: 1px solid var(--border-default); border-radius: var(--radius-xl);
    background: rgba(17, 18, 22, 0.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: var(--shadow-float); max-height: calc(100vh - 96px); overflow-y: auto;
  }
  .site-nav .nav-sheet a { min-height: 48px; padding: 0 12px; border-radius: var(--radius-md); color: var(--text-secondary); font-weight: 500; }
  .site-nav .nav-sheet a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }
  .site-nav .nav-sheet .nav-sheet-actions { padding: 12px 4px 4px; margin-top: 8px; border-top: 1px solid var(--border-subtle); }
  .site-nav .nav-sheet .nav-sheet-actions .btn { height: 48px; border-radius: var(--radius-md); }
  .site-nav .nav-sheet .nav-sheet-actions .btn-primary[href$="/invite"] { --btn-bg: var(--clr-discord); }
  .site-nav .nav-sheet .nav-sheet-actions .btn .icon { color: inherit; }
  .site-nav .nav-burger { width: 44px; height: 44px; }
  .site-nav .inner { padding: 0 8px 0 16px; }
  .site-nav .nav-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  .site-nav { padding: 8px 12px 0; }
  .site-nav .inner { height: 60px; padding: 0 8px 0 16px; gap: 8px; }
  .site-nav .nav-sheet { left: 12px; right: 12px; }
  .site-nav .nav-actions .btn { height: 44px; padding: 0 16px; }
  .site-nav .nav-user-btn { height: 44px; }
}
@media (max-width: 360px) {
  .site-nav { padding: 8px 8px 0; }
  .site-nav .inner { padding: 0 4px 0 12px; }
  .site-nav .brand { gap: 8px; font-size: 17px; }
  .site-nav .nav-actions { gap: 4px; }
  .site-nav .nav-actions .nav-add { padding: 0 12px; }
  .site-nav .nav-sheet { left: 8px; right: 8px; }
}
@media (max-width: 340px) {
  .site-nav .nav-actions .nav-add > .icon { display: none; }
}
@media (hover: none) { .site-nav .nav-sheet a:hover { background: none; color: var(--text-secondary); } }

/* ------------------------------------------------------------------ footer: four columns on a lighter band */
.site-foot { margin-top: 96px; border-top: 1px solid var(--border-subtle); background: var(--clr-surface-1); }
.site-foot .wrap {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start;
  max-width: 1200px; padding: 64px 24px 32px;
}
.site-foot .foot-brand { display: grid; gap: 16px; justify-items: start; }
.site-foot .brand { font-family: var(--font-ui); font-size: 18px; font-weight: 800; letter-spacing: -0.03em; gap: 12px; }
.site-foot .brand-mark { width: 28px; height: 28px; }
.site-foot .foot-blurb { margin: 0; max-width: 40ch; color: var(--text-tertiary); font-size: 14px; line-height: 22px; }
.site-foot .foot-social {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-subtle); color: var(--text-secondary);
}
.site-foot .foot-social:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.09); text-decoration: none; }
.site-foot .foot-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; align-items: start; }
.site-foot .foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.site-foot .foot-h { margin: 0 0 4px; color: var(--text-primary); font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0; }
.site-foot .foot-col a { color: var(--text-tertiary); font-size: 14px; line-height: 20px; transition: color 150ms var(--ease-smooth); }
.site-foot .foot-col a:hover { color: var(--text-primary); text-decoration: none; }
.site-foot .foot-base {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 24px; border-top: 1px solid var(--border-subtle);
}
.site-foot .foot-base .small { color: var(--text-tertiary); font-size: 13px; }
@media (max-width: 900px) {
  .site-foot .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 48px 24px 32px; }
}
@media (max-width: 1023px) {
  /* r2.css gives every footer link a 44px target here; the column keeps them tight but tappable. */
  .site-foot .foot-col { gap: 0; }
  .site-foot .foot-h { margin-bottom: 4px; }
}
@media (max-width: 640px) {
  .site-foot { margin-top: 64px; }
  .site-foot .wrap { padding: 40px 16px 32px; }
  /* SEO-8: four columns (Features, Product, Resources, Company) fold to two on a phone. */
  .site-foot .foot-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; row-gap: 24px; }
}

/* ------------------------------------------------------------------ public page backdrop */
/* The site pages (docs, FAQ, status, changelog, support, invite permissions) set ``main_class`` to
   ``site-main``: a soft glow at the top and two faint framing lines on the 1152px column, the width of the
   header pill (.site-nav .inner), so the lines meet the pill's edges the way they do on the landing. Both are
   absolutely placed behind the content, so they never move a box. */
.public-main.site-main { position: relative; isolation: isolate; }
.public-main.site-main::before {
  content: ""; position: absolute; z-index: -1; inset: -96px 0 auto; height: 720px; pointer-events: none;
  background:
    radial-gradient(44% 56% at 50% 0%, rgba(0, 132, 255, 0.20) 0%, rgba(0, 132, 255, 0) 70%),
    radial-gradient(28% 40% at 30% 4%, rgba(107, 88, 238, 0.14) 0%, rgba(107, 88, 238, 0) 70%),
    radial-gradient(28% 40% at 72% 4%, rgba(67, 224, 168, 0.07) 0%, rgba(67, 224, 168, 0) 70%);
}
.public-main.site-main::after {
  content: ""; position: absolute; z-index: -1; top: -96px; bottom: 0; left: 0; right: 0; margin: 0 auto;
  width: min(1152px, 100% - 48px); pointer-events: none;
  border-left: 1px solid var(--border-hairline); border-right: 1px solid var(--border-hairline);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 60%, transparent 100%);
}
@media (max-width: 640px) { .public-main.site-main::after { display: none; } }

/* ------------------------------------------------------------------ the shared page hero */
.servers-page.site-doc { max-width: 1152px; padding: 0 24px 32px; }
.site-doc .site-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 80px 0 56px; }
.site-eyebrow {
  /* One eyebrow across the public site: the landing's plain blue uppercase label (landing.css .lp .eyebrow). */
  display: block; margin: 0 0 16px; padding: 0; border: 0; background: none;
  color: var(--sky); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
}
.site-doc .site-hero h1 {
  margin: 0; max-width: 18ch; font-size: 56px; line-height: 60px; font-weight: 800; letter-spacing: var(--tracking-tighter);
  color: var(--text-primary); text-wrap: balance;
}
.site-doc .site-hero .site-lede { margin: 20px auto 0; max-width: 58ch; color: var(--text-tertiary); font-size: 18px; line-height: 28px; text-wrap: pretty; }
.site-doc .site-hero .site-lede a, .site-doc .faq a, .site-doc .release a, .site-doc p a { color: var(--sky); }
@media (max-width: 640px) {
  .servers-page.site-doc { padding: 0 16px 24px; }
  .site-doc .site-hero { padding: 48px 0 40px; }
  .site-doc .site-hero h1 { font-size: 40px; line-height: 44px; }
  .site-doc .site-hero .site-lede { font-size: 16px; line-height: 26px; }
}

/* The reading column under the hero: one 760px column, or the table of contents beside it. */
.servers-page.site-doc:not(.has-toc) { max-width: 808px; }
.site-doc.has-toc { display: grid; grid-template-columns: 200px minmax(0, 760px); column-gap: 56px; justify-content: center; align-items: start; }
.site-doc.has-toc > * { grid-column: 2; }
.site-doc.has-toc > .site-hero { grid-column: 1 / -1; }
.site-doc.has-toc > .site-toc {
  grid-column: 1; grid-row: 2 / span 60; position: sticky; top: 96px; align-self: start;
  flex-direction: column; flex-wrap: nowrap; gap: 4px; margin: 0;
}
.site-toc-label { margin: 0 0 8px; padding: 0 12px; color: var(--text-tertiary); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; }
.site-doc.has-toc > .site-toc a {
  min-height: 32px; padding: 4px 12px; border: 0; border-radius: var(--radius-md); background: transparent;
  color: var(--text-tertiary); font-size: 14px; line-height: 20px; font-weight: 500;
}
.site-doc.has-toc > .site-toc a:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
@media (max-width: 900px) {
  .servers-page.site-doc.has-toc { display: block; max-width: 808px; }
  .site-doc.has-toc > .site-toc {
    position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 0 0 24px; padding-bottom: 4px;
    scrollbar-width: none;
  }
  .site-doc.has-toc > .site-toc::-webkit-scrollbar { display: none; }
  .site-toc-label { display: none; }
  .site-doc.has-toc > .site-toc a {
    flex-shrink: 0; min-height: 36px; padding: 0 12px; white-space: nowrap;
    border: 1px solid var(--border-default); border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.03); color: var(--text-secondary);
  }
}
@media (max-width: 640px) {
  .site-doc.has-toc > .site-toc { margin: 0 -16px 24px; padding: 0 16px 4px; width: auto; }
}
@media (pointer: coarse) { .site-doc.has-toc > .site-toc a { min-height: 44px; } }

/* ------------------------------------------------------------------ cards: FAQ answers, docs steps, help */
.site-doc .faq {
  display: grid; gap: 12px; margin: 0 0 12px; padding: 28px 32px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-xl);
  background: var(--grad-card), var(--clr-surface-1); box-shadow: var(--shadow-card);
  color: var(--text-secondary); font-size: 15px; line-height: 24px; scroll-margin-top: 96px;
}
.site-doc .faq h2 { margin: 0 0 4px; color: var(--text-primary); font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.015em; gap: 12px; }
.site-doc .faq strong { color: var(--text-primary); font-weight: 600; }
.site-doc .faq code, .site-doc .doc-mods code {
  padding: 0 8px; border-radius: 6px; background: var(--clr-surface-3); border: 1px solid var(--border-subtle);
  color: var(--text-primary); font-size: 13px;
}
.site-doc .faq ul, .site-doc .faq ol { gap: 8px; }
.site-doc .faq li::marker { color: var(--text-tertiary); }
.site-doc .step-n {
  width: 32px; height: 32px; border-radius: var(--radius-md);
  background: rgba(0, 132, 255, 0.12); border: 1px solid rgba(0, 132, 255, 0.28); color: var(--sky);
  font-size: 14px; font-weight: 700;
}
.site-doc .faq:target { border-color: rgba(0, 132, 255, 0.4); }
@media (max-width: 640px) {
  .site-doc .faq { padding: 20px; }
  .site-doc .faq h2 { font-size: 18px; line-height: 26px; }
}

/* R9 PUB search: the Docs and FAQ search box (partials/site_search.html) above the first card. */
.site-doc .site-search { margin: 0 0 16px; }
.site-doc .site-search .nav-search { margin: 0; }
.site-doc .site-search input { height: 44px; font-size: 15px; }
.site-doc .site-search-empty { margin: 0 0 12px; }
.site-doc .site-search-empty a { color: var(--sky); }
.site-doc .site-search-empty .btn { margin-top: 14px; }

/* Docs: the module reference, one group per heading, a grid of small module cards. */
.site-doc .doc-group { padding: 40px 0 0; scroll-margin-top: 96px; }
.site-doc .doc-group h3 {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 0; border-bottom: 0;
  color: var(--text-primary); font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.015em;
}
.site-doc .doc-group h3::after { content: ""; flex: 1; height: 1px; background: var(--border-subtle); }
.site-doc .doc-mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.site-doc .doc-mods > li {
  grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 16px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); background: var(--clr-card-bg); box-shadow: var(--shadow-card);
  transition: border-color 150ms var(--ease-smooth), background-color 150ms var(--ease-smooth);
}
.site-doc .doc-mods > li:hover { border-color: var(--border-default); background: var(--clr-card-hover); }
.site-doc .doc-mods .feat-sticker { width: 28px; height: 28px; }
.site-doc .doc-mods b { color: var(--text-primary); font-weight: 600; }
.site-doc .doc-mods p { color: var(--text-tertiary); font-size: 14px; line-height: 20px; }
.site-doc .doc-mods p.muted.small { font-size: 13px; line-height: 20px; }
.site-doc .doc-mods code { padding: 0 4px; border: 0; background: rgba(255, 255, 255, 0.06); font-size: 12px; }
@media (max-width: 640px) { .site-doc .doc-mods { grid-template-columns: minmax(0, 1fr); } }

/* Support: the option list as a grid of cards with an icon tile. */
.site-doc .support-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: none; margin: 0 0 32px; }
.site-doc .support-links a {
  align-items: flex-start; gap: 16px; height: 100%; padding: 20px; border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle); background: var(--grad-card), var(--clr-surface-1); box-shadow: var(--shadow-card);
  color: var(--text-primary); font-size: 16px; line-height: 24px; font-weight: 600;
  transition: border-color 150ms var(--ease-smooth), transform 150ms var(--ease-smooth);
}
.site-doc .support-links a:hover { border-color: var(--border-hover); background: var(--grad-card), var(--clr-surface-2); }
.site-doc .support-links .icon {
  box-sizing: content-box; width: 20px; height: 20px; padding: 8px; border-radius: var(--radius-md);
  background: rgba(0, 132, 255, 0.12); border: 1px solid rgba(0, 132, 255, 0.24); color: var(--sky);
}
.site-doc .support-links small { margin-top: 4px; color: var(--text-tertiary); font-size: 14px; line-height: 20px; }
.site-doc .support-person h2, .site-doc .support-self { margin: 0 0 8px; font-size: 20px; line-height: 28px; letter-spacing: -0.015em; }
.site-doc .support-person > p { color: var(--text-tertiary); margin-bottom: 16px; }
@media (max-width: 640px) { .site-doc .support-links { grid-template-columns: minmax(0, 1fr); } }

/* Status: the service rows in one card, a live dot for "up". */
.site-doc .status-list {
  margin: 0 0 16px; border-radius: var(--radius-xl); border: 1px solid var(--border-subtle);
  background: var(--grad-card), var(--clr-surface-1); box-shadow: var(--shadow-card); overflow: hidden;
}
.site-doc .status-row { grid-template-columns: 12px minmax(0, 1fr) auto; gap: 16px; padding: 20px 24px; }
.site-doc .status-row + .status-row { border-top: 1px solid var(--border-subtle); }
.site-doc .status-row b { font-size: 16px; line-height: 24px; font-weight: 600; }
.site-doc .status-row .muted.small { display: block; margin-top: 4px; color: var(--text-tertiary); }
.site-doc .status-row .badge { height: 28px; padding: 0 12px; border-radius: var(--radius-full); font-weight: 600; }
.site-doc .status-dot.up { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16); }
@media (prefers-reduced-motion: no-preference) {
  .site-doc .status-dot.up { animation: site-live 2400ms var(--ease-smooth) infinite; }
}
@keyframes site-live {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.04); }
}
.site-doc > .muted.small, .site-doc > p.text-2 { color: var(--text-tertiary); }
.site-doc > p.text-2 { margin-top: 24px; font-size: 15px; line-height: 24px; }
.site-doc .site-cta { margin: 24px 0 32px; }
@media (max-width: 640px) { .site-doc .status-row { padding: 16px; gap: 12px; } }

/* Changelog: a timeline; the date on the left, each release in a card on the line. */
.site-doc .releases { position: relative; }
.site-doc .release { grid-template-columns: 136px minmax(0, 1fr); gap: 40px; padding: 0 0 24px; border-top: 0; position: relative; scroll-margin-top: 96px; }
.site-doc .release::before { content: ""; position: absolute; top: 0; bottom: 0; left: 155px; width: 1px; background: var(--border-subtle); }
.site-doc .release:first-child::before { top: 28px; }
.site-doc .release:last-child::before { bottom: auto; height: 28px; }
.site-doc .release::after {
  content: ""; position: absolute; top: 24px; left: 151px; width: 9px; height: 9px; border-radius: var(--radius-full);
  background: var(--clr-canvas); border: 1px solid var(--sky); box-shadow: 0 0 0 4px var(--clr-canvas);
}
.site-doc .release:first-child::after { background: var(--sky); box-shadow: 0 0 0 4px rgba(95, 184, 255, 0.16); }
.site-doc .release time { padding-top: 20px; text-align: right; color: var(--text-tertiary); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.site-doc .release > div {
  padding: 20px 24px 24px; border-radius: var(--radius-xl); border: 1px solid var(--border-subtle);
  background: var(--grad-card), var(--clr-surface-1); box-shadow: var(--shadow-card);
}
.site-doc .release h2 { margin: 0 0 12px; font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -0.01em; }
.site-doc .release ul { color: var(--text-secondary); font-size: 15px; line-height: 24px; }
.site-doc .release li::marker { color: var(--text-tertiary); }
@media (max-width: 640px) {
  .site-doc .release { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .site-doc .release::before, .site-doc .release::after { display: none; }
  .site-doc .release time { padding-top: 0; text-align: left; }
  .site-doc .release > div { padding: 16px 20px 20px; }
}

/* Invite permissions: the groups as cards. */
.site-doc .perm-group { margin: 0 0 24px; }
.site-doc .perm-group h2 { margin: 0 0 12px; color: var(--text-primary); font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -0.01em; }
.site-doc .perm-list { border-radius: var(--radius-xl); background: var(--grad-card), var(--clr-surface-1); box-shadow: var(--shadow-card); overflow: hidden; }
.site-doc .perm-list li { gap: 12px; padding: 16px 20px; }
.site-doc .perm-list li + li { border-top-color: var(--border-subtle); }
.site-doc .perm-list .perm-ic { color: var(--sky); }
.site-doc .perm-list .perm-why { color: var(--text-tertiary); font-size: 14px; line-height: 20px; }
.site-doc.invite-perms .site-hero + .site-cta { justify-content: center; margin-top: -24px; margin-bottom: 48px; }
.site-doc .site-cta .btn-lg { border-radius: 12px; padding: 0 24px; }
/* "Continue to Discord" is the Add to Discord step, so it takes the Discord colour (white on #5865f2 is 4.6:1). */
.site-doc.invite-perms .site-cta .btn-primary { --btn-bg: var(--clr-discord); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 24px -10px rgba(88, 101, 242, 0.7); }
.site-doc.invite-perms .site-cta .btn-primary:hover { --btn-bg: #4752c4; }
.site-doc .info-note { border-radius: var(--radius-lg); }

/* ------------------------------------------------------------------ commands, legal, error pages */
/* The sticky search bar of /commands sticks at top: 76px (commands.html), under the floating pill. Once the page
   has scrolled (the header's own ``scrolled`` class), the header strip paints solid canvas from the top of the
   window down to the bar, behind the pill, so no table row shows in the 12px gap above the pill, around its
   rounded ends or in the 4px between the pill and the bar. It is drawn only on that page and only once
   scrolled, so the hero glow at the top of the page stays; absolutely placed, it moves no box (the
   page-change skeleton holds). Its sides sit on the pill's own edges, inside the framing lines. */
body.public:has(.cmd-bar) .site-nav.scrolled::before {
  content: ""; position: absolute; z-index: -1; top: 0; height: 76px; pointer-events: none;
  left: max(12px, calc(50% - 575px)); right: max(12px, calc(50% - 575px)); background: var(--clr-canvas);
}
/* Their own page heads are bigger and tighter, in the same family as the site hero. */
.cmd-page .servers-head h1, .legal-page > h1 { font-size: 48px; line-height: 52px; font-weight: 800; letter-spacing: var(--tracking-tighter); }
.cmd-page .servers-head p { color: var(--text-tertiary); font-size: 16px; line-height: 24px; }
.cmd-page .servers-head p code { padding: 0 4px; border-radius: 6px; background: var(--clr-surface-3); border: 1px solid var(--border-subtle); color: var(--text-primary); }
.cmd-page .board-head h2 { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.015em; }
.cmd-page .table-wrap { border-radius: var(--radius-xl); border-color: var(--border-subtle); background: var(--grad-card), var(--clr-surface-1); box-shadow: var(--shadow-card); }
/* The command chip keeps app.css's box (font size and padding are what the drawn table rows are measured on). */
.cmd-page table.data td.cmd-name code { border-color: var(--border-subtle); color: var(--text-primary); }
.cmd-page table.data tbody tr { transition: background-color 120ms var(--ease-smooth); }
.cmd-page table.data tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
@media (max-width: 640px) {
  .cmd-page .servers-head h1, .legal-page > h1 { font-size: 36px; line-height: 40px; }
}

/* Error and log out pages: a quiet card in the middle of the canvas, the code drawn in the brand gradient. */
.error-page { position: relative; isolation: isolate; }
.error-page::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(40% 40% at 50% 40%, rgba(0, 132, 255, 0.12) 0%, rgba(107, 88, 238, 0.06) 50%, transparent 80%);
}
.error-page .code {
  font-family: var(--font-ui); font-size: 96px; font-weight: 800; letter-spacing: -0.05em;
  background: var(--grad-text-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-page h1 { font-size: 36px; line-height: 42px; font-weight: 800; letter-spacing: var(--tracking-tighter); }
.error-page p { color: var(--text-tertiary); font-size: 16px; line-height: 24px; }

/* Terms and privacy: the contents list in a card of two columns, each part under a hairline. */
.legal-page [data-sk-region="body"] > ol {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 32px; margin: 8px 0 16px; padding: 20px 24px 20px 48px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); background: var(--grad-card), var(--clr-surface-1); box-shadow: var(--shadow-card);
}
.legal-page [data-sk-region="body"] > ol a { color: var(--text-secondary); }
.legal-page [data-sk-region="body"] > ol a:hover { color: var(--text-primary); }
.legal-page [data-sk-region="body"] > ol li::marker { color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.legal-page section { padding-top: 24px; border-top: 1px solid var(--border-subtle); scroll-margin-top: 96px; }
.legal-page section h2 { margin-top: 0; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.015em; }
.legal-page section a, .legal-page [data-sk-region="body"] > p a { color: var(--sky); }
@media (max-width: 640px) {
  .legal-page [data-sk-region="body"] > ol { grid-template-columns: minmax(0, 1fr); padding: 16px 20px 16px 40px; }
}

/* R12 PUB: the "can't give a role" answer on /support, and its picture of Discord's role list. The picture is plain
   boxes in the site's own tokens: two short lists side by side, one stacked under the other on a phone. */
.site-doc [data-search-top]:empty { display: none; }
.site-doc [data-search-top] { margin: 0 0 16px; }
.site-doc .role-screenshot { margin: 16px 0; }
.site-doc .role-screenshot-open { display: block; max-width: 887px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.site-doc .role-screenshot img { display: block; width: 100%; height: auto; border-radius: inherit; }
.site-doc .role-screenshot figcaption { margin-top: 8px; color: var(--text-tertiary); font-size: 13px; line-height: 20px; }
.site-doc .role-art { margin: 16px 0; }
.site-doc .role-art-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.site-doc .role-art-list { padding: 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--clr-surface-dark); }
.site-doc .role-art-tag { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-primary); }
.site-doc .role-art-list.is-bad .role-art-tag .icon { color: var(--clr-danger-text); }
.site-doc .role-art-list.is-good .role-art-tag .icon { color: var(--clr-success); }
.site-doc .faq .role-art-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-doc .role-art-list li { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--clr-card-bg); color: var(--text-primary); font-size: 14px; line-height: 20px; }
.site-doc .role-art-list li small { margin-left: auto; color: var(--text-tertiary); font-size: 12px; line-height: 16px; text-align: right; }
.site-doc .role-art-list li.is-bot { border-color: var(--clr-primary); }
.site-doc .role-art-list.is-bad li.is-bot { border-style: dashed; }
.site-doc .role-art-dot { flex: none; width: 12px; height: 12px; border-radius: var(--radius-full); background: var(--text-tertiary); }
.site-doc .role-art-dot.is-admin { background: var(--clr-warning); }
.site-doc .role-art-dot.is-member { background: var(--clr-success); }
.site-doc .role-art-dot.is-bot { background: var(--clr-primary); }
.site-doc .role-art figcaption { margin-top: 8px; color: var(--text-tertiary); font-size: 13px; line-height: 20px; }
@media (max-width: 640px) { .site-doc .role-art-cols { grid-template-columns: minmax(0, 1fr); } }
