/* MSD — design tokens and components.
   Values come from design_handoff_msd_site/README.md; treat that as the source
   of truth when changing anything in :root. */

/* ── Fonts ───────────────────────────────────────────────────────────────────
   Self-hosted rather than loaded from the Google Fonts CDN: the site carries a
   German-style imprint, and a third-party font request would transmit visitor
   IP addresses without consent. Drop the .woff2 files into static/fonts/. */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-latin-ext.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Special Elite';
  src: url('/static/fonts/SpecialElite-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Special Elite';
  src: url('/static/fonts/SpecialElite-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
/* Noto Sans is used only inside the Discord mock messages. It is the open
   (SIL OFL 1.1, see NotoSans-OFL.txt) font in Discord's own fallback stack;
   Discord's gg sans is proprietary and not licensed for third-party use. */
@font-face {
  font-family: 'Noto Sans';
  src: url('/static/fonts/NotoSans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans';
  src: url('/static/fonts/NotoSans-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #101410;
  --bg-deep: #0b0d0c;
  --surface: #131813;

  --text: #F4F5F2;
  --text-muted: #F4F5F299;
  --text-dim: #F4F5F280;
  --text-nav: #F4F5F2B8;

  --accent: #DEFF00;
  --accent-hover: #eeff66;
  --accent-soft: #DEFF0014;
  --accent-border: #DEFF0073;

  --gem: linear-gradient(135deg, #DEFF00, #A7F838, #71F26F, #3AEBA6, #1FE8C2);
  --gem-90: linear-gradient(90deg, #DEFF00, #71F26F, #1FE8C2);

  --border: #F4F5F21F;
  --border-strong: #F4F5F229;
  --border-faint: #F4F5F212;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Special Elite', Georgia, serif;
  --discord: 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --danger: #ff8a8a;
  --warn: #ffb86b;
  --live: #ff5d5d;

  --wrap: 1280px;
  --pad: 32px;
  --header-h: 72px;
  --header-h-scrolled: 60px;

  --r-sm: 5px;
  --r-md: 8px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --ease-nav: cubic-bezier(.65, 0, .35, 1);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--mono);
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img, svg { max-width: 100%; }
svg { display: block; }

code {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: .92em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
  width: 100%;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 16px;
  font: 600 13px var(--mono);
}
.skip-link:focus { left: 12px; top: 12px; }

.eyebrow {
  font: 600 13px var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: height .3s var(--ease), background .3s ease, border-color .3s ease;
}
.site-header[data-scrolled='true'] {
  height: var(--header-h-scrolled);
  background: rgba(16, 20, 16, .85);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  flex: none;
}
.logo-word {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text);
  letter-spacing: .5px;
}
.logo:hover .logo-word { color: var(--accent); }
.logo svg.spin { animation: logo-spin .7s var(--ease-bounce); }
@keyframes logo-spin { to { transform: rotate(360deg); } }

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  font: 13px var(--mono);
  color: var(--text-nav);
  padding: 4px 0;
  transition: color .2s ease;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] { color: var(--accent); }

.nav-underline {
  position: absolute;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  transition: left .3s var(--ease-nav), width .3s var(--ease-nav), opacity .2s ease;
  opacity: 0;
  pointer-events: none;
}
.nav-underline[data-visible='true'] { opacity: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: none;
}
.header-actions .text-link {
  font: 13px var(--mono);
  color: var(--text-nav);
  white-space: nowrap;
}

/* ── Mobile menu (below 900px) ─────────────────────────────────────────────
   A native <details>: the summary is the toggle, the panel drops down under
   the fixed header and opens smoothly where ::details-content is supported. */
.mnav { display: none; }
.mnav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font: 600 13px var(--mono);
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: border-color .2s ease, color .2s ease;
}
.mnav-toggle::-webkit-details-marker { display: none; }
.mnav-toggle:hover { border-color: var(--accent-border); color: var(--accent); }
.mnav-toggle svg { transition: transform .35s var(--ease); }
.mnav[open] .mnav-toggle { border-color: var(--accent-border); color: var(--accent); }
.mnav[open] .mnav-toggle svg { transform: rotate(180deg); }
.mnav-close-label, .mnav[open] .mnav-open-label { display: none; }
.mnav[open] .mnav-close-label { display: inline; }
.mnav-panel {
  position: absolute;
  inset: 100% 0 auto 0;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  padding: 8px var(--pad) 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .45);
}
.mnav-panel ul { list-style: none; }
.mnav-panel li + li { border-top: 1px solid var(--border-faint); }
.mnav-panel ul a {
  display: flex;
  align-items: center;
  min-height: 56px;
  font: 600 20px var(--mono);
  color: var(--text);
}
.mnav-panel ul a[aria-current='page'] { color: var(--accent); }
.mnav-account {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  font: 14px var(--mono);
  color: var(--text-muted);
}
.mnav::details-content {
  display: block;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .3s ease, transform .35s var(--ease), content-visibility .35s allow-discrete;
}
.mnav[open]::details-content { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .mnav::details-content, .mnav-toggle svg { transition: none; }
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-sm);
  font: 600 14px var(--mono);
  padding: 12px 20px;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s var(--ease);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
}
.btn-primary:hover { color: var(--bg); }
/* Diagonal light sweep on hover. */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
  transition: left .55s var(--ease);
}
.btn-primary:hover::after { left: 120%; }

.btn-ghost {
  border-color: rgba(244, 245, 242, .25);
  color: rgba(244, 245, 242, .8);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg { padding: 15px 26px; font-size: 15px; }

.btn[aria-disabled='true'] {
  opacity: .45;
  pointer-events: none;
}

/* Magnetic CTAs are nudged by JS via --mx/--my. */
.magnetic { transform: translate(var(--mx, 0px), var(--my, 0px)); }

/* ── Custom cursor ─────────────────────────────────────────────────────────── */
.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
  will-change: transform;
}
.cursor-ring {
  width: 26px; height: 26px;
  margin: -13px 0 0 -13px;
  border: 1px solid var(--accent-border);
  border-radius: 50%;
}
.cursor-dot {
  width: 5px; height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--accent);
  border-radius: 50%;
}
body[data-cursor='on'] .cursor-ring,
body[data-cursor='on'] .cursor-dot { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  body[data-cursor='on'] { cursor: none; }
  body[data-cursor='on'] a,
  body[data-cursor='on'] button { cursor: none; }
}

/* ── Reveal on scroll ──────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(6px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ── Keyword hover (.kw) ───────────────────────────────────────────────────── */
.kw {
  position: relative;
  display: inline-block;
  transition: color .25s ease, transform .25s var(--ease);
}
.kw::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -.08em;
  height: 3px;
  background-image: var(--gem-90);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.kw:hover {
  color: var(--accent);
  transform: translateY(-2px);
}
.kw:hover::after { transform: scaleX(1); }

/* ── Sections ──────────────────────────────────────────────────────────────── */
.section {
  min-height: calc(100vh - var(--header-h));
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 96px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
h2.section-title {
  font: 700 clamp(32px, 3.6vw, 50px)/1.15 var(--mono);
  letter-spacing: -1px;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  --hero-fs: clamp(44px, 6.6vw, 92px);
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-h) + 48px);
}
.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .25;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(222, 255, 0, .18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(222, 255, 0, .18) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, #000 20%, transparent 75%);
}

/* A brighter copy of the same grid, revealed only in a disc around the
   cursor. Identical background-size and origin to .hero-grid, so the two
   sets of lines coincide exactly and the effect reads as the existing grid
   lighting up rather than a second grid fading in.

   --gx/--gy are written by site.js through GSAP's quickTo, which emits bare
   numbers rather than lengths (it has no way to infer a unit for a custom
   property), so they are multiplied into px here — the same pattern
   .feat-card's cursor spotlight uses. */
.hero-grid-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
  background-image:
    linear-gradient(to right, rgba(222, 255, 0, .85) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(222, 255, 0, .85) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle 190px at calc(var(--gx, 50) * 1px) calc(var(--gy, 50) * 1px),
    #000 0%, rgba(0, 0, 0, .5) 45%, transparent 72%);
  mask-image: radial-gradient(circle 190px at calc(var(--gx, 50) * 1px) calc(var(--gy, 50) * 1px),
    #000 0%, rgba(0, 0, 0, .5) 45%, transparent 72%);
}
.hero[data-glow='on'] .hero-grid-glow { opacity: 1; }
.hero .wrap { position: relative; }

.pill {
  display: inline-block;
  border: 1px solid var(--accent-border);
  color: var(--accent);
  border-radius: 100px;
  padding: 7px 15px;
  font: 600 13px var(--mono);
  letter-spacing: 1.5px;
}

.hero-title {
  margin: 28px 0 22px;
  font: 800 var(--hero-fs)/1.05 var(--mono);
  letter-spacing: -2px;
}
.hero-title .line { display: block; min-height: 1.05em; }

@keyframes blink { 50% { opacity: 0; } }

.hero-body {
  max-width: calc(var(--hero-chars, 11) * (0.6 * var(--hero-fs) - 2px));
  font: 17px/1.75 var(--mono);
  color: var(--text-muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: var(--text-dim);
  animation: bob 1.8s var(--ease-bounce) infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ── Module cards ──────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  /* Gives GSAP's rotationX/rotationY tilt on .feat-card somewhere to project
     into — without it the rotation reads as a flat skew instead of depth. */
  perspective: 1100px;
}

.feat-card {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
  transform: translateZ(0); /* own compositing layer for the JS-driven tilt */
}
.feat-card:hover {
  background: var(--surface);
  border-image: var(--gem) 1;
}
/* Cursor-follow spotlight, positioned by site.js via --spot-x/--spot-y. Sits
   on ::after so it never collides with a future ::before on this element. */
.feat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  /* --spot-x/--spot-y are written by GSAP's quickTo as bare numbers (0–100),
     not percentages — quickTo has no way to know to append a unit onto a
     custom property, since it isn't a real CSS property with an inferrable
     one. calc(...* 1%) turns that plain number into a valid gradient
     position instead of an invalid, silently-dropped declaration. */
  background: radial-gradient(circle 240px at calc(var(--spot-x, 50) * 1%) calc(var(--spot-y, 50) * 1%), rgba(222, 255, 0, .12), transparent 70%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.feat-card:hover::after { opacity: 1; }
.feat-icon {
  color: var(--accent);
  transition: color .25s ease, transform .35s var(--ease-bounce);
}
.feat-card:hover .feat-icon { transform: translateY(-3px); }

.feat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.feat-arrow {
  color: var(--accent);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity .3s ease, transform .35s var(--ease-bounce);
}
.feat-card:hover .feat-arrow {
  opacity: 1;
  transform: none;
}
.feat-card h3 { font: 700 22px var(--mono); }
.feat-card:hover h3 {
  background-image: var(--gem-90);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.feat-card p { font: 16px/1.7 var(--mono); color: var(--text-muted); }

/* ── Mock Discord messages ────────────────────────────────────────────────── */
/* What MSD really posts, measured from its Components V2 cards in Discord's
   dark theme (Nov 2026): Discord's own sizes, spacing and greys, with MSD's
   accent bar. Set in Noto Sans, the open font in Discord's own fallback
   stack: Discord's gg sans is proprietary and not licensed for use outside
   Discord. Colours are Discord's, so they live here rather than as tokens. */
.dc {
  --dc-bg: #1A1A1E;
  --dc-text: #F3F3F4;
  --dc-head: #FCFCFC;
  --dc-muted: #9D9DA4;
  --dc-sub: #BEBFC3;
  --dc-link: #78AFF4;
  --dc-fill: rgba(151, 151, 159, .12);
  --dc-line: rgba(151, 151, 159, .2);
  --blurple: #5865F2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--dc-bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
  font-family: var(--discord);
}
.dc + .dc { margin-top: 20px; }
.dc p, .dc h3, .dc h4 { margin: 0; }

.dm {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  padding: 4px 16px;
}
/* A second message from the same author in a row drops the header. */
.dm-follow { padding-top: 0; }
.dm-body { min-width: 0; }
.dm-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.dm-channel {
  font: 600 14px/1.2 var(--discord);
  color: var(--dc-muted);
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--dc-line);
  margin-bottom: 8px;
}
.dm-channel::before { content: '#'; margin-right: 6px; font-weight: 400; }
.dm-thread::before { content: '\21B3'; }
/* "Only you can see this": a faint blurple wash and a 2px blurple edge. */
.dm-ephemeral {
  margin-top: 6px;
  padding-block: 6px;
  background: rgba(88, 101, 242, .05);
  box-shadow: inset 2px 0 var(--blurple);
}

.dm-head { display: flex; align-items: center; gap: 4px; font: 500 16px/22px var(--discord); }
.dm-head b { font-weight: 500; color: var(--dc-head); }
.dm-bot {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 15px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--blurple);
  color: #FFF;
  font: 500 10px/15px var(--discord);
}
.dm-head time { margin-left: 4px; font: 12px var(--discord); color: var(--dc-muted); }
.dm-text { font: 16px/22px var(--discord); color: var(--dc-text); }
.mention {
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 500;
  color: #BCCBFF;
  background: rgba(88, 101, 242, .3);
}

/* The Components V2 container: 16px padding, 8px between parts, a 4px
   accent bar, and the bot's colour for the kind of event. */
.dm-card {
  --card-accent: #DEFF00;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 600px;
  margin-top: 4px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--dc-fill);
  border-radius: 8px;
  background: var(--dc-fill);
}
.dm-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent);
}
.dm-h2 { font: 700 20px/27.5px var(--discord); color: var(--dc-head); }
.dm-h3 { font: 700 16px/22px var(--discord); color: var(--dc-head); }
.dm-md { font: 14px/19.25px var(--discord); color: var(--dc-text); }
.dm-md .dm-h3 { margin-top: 8px; }
.dm-md .dm-h3:first-child { margin: 0 0 8px; }
.dm-md b { font-weight: 700; }
.dm-sub { font: 12px/16.5px var(--discord); color: var(--dc-sub); }
.dm-sub b { font-weight: 700; }
.dm-gap { margin-top: 19px; }
/* A spacing-only separator: the container gap on both sides is the space. */
.dm-space { height: 0; }
.dm-sep { border-bottom: 1px solid var(--dc-line); }
.dm-link { color: var(--dc-link); }
.dm-ts { padding: 0 2px; border-radius: 3px; background: rgba(151, 151, 159, .16); }
.dm-eph { display: flex; align-items: center; gap: 4px; margin-top: 4px; font: 12px/16px var(--discord); color: var(--dc-muted); }

.dm-media {
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  background:
    radial-gradient(120% 90% at 20% 15%, rgba(145, 70, 255, .55), transparent 60%),
    radial-gradient(90% 80% at 85% 90%, rgba(222, 255, 0, .18), transparent 60%),
    #241B33;
}

.dm-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 3px 11px;
  border: 1px solid rgba(151, 151, 159, .04);
  border-radius: 8px;
  background: var(--dc-fill);
  color: #FBFBFB;
  font: 500 14px/18px var(--discord);
}
.dm-btn-primary { background: var(--blurple); border-color: transparent; color: #FFF; }
.dm-btn-danger { background: #D22D39; border-color: transparent; color: #FFF; }

/* XP bar fills from zero when its section reveals. */
.dm-xp {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: rgba(244, 245, 242, .1);
  overflow: hidden;
}
.dm-xp i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 4px;
  background-image: var(--gem-90);
  transition: width 1.3s var(--ease) .3s;
}
.is-visible .dm-xp i { width: var(--v); }

/* Rank card. */
.dm-rank {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(222, 255, 0, .08), rgba(31, 232, 194, .06));
  border: 1px solid var(--border);
  max-width: 460px;
}
.dm-rank-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--gem); opacity: .85; }
.dm-rank-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font: 14px var(--discord); }
.dm-rank-top b { color: var(--text); font-size: 15px; font-weight: 600; }
.dm-rank-top span { color: var(--accent); font-weight: 700; }
.dm-rank-sub { display: flex; justify-content: space-between; margin-top: 6px; font: 12px var(--discord); color: var(--text-muted); }

/* ── Split layout ───────────────────────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
  max-width: var(--wrap);
  margin: 0 auto;
  width: 100%;
}
.panel-title {
  margin: 12px 0 14px;
  font: 700 clamp(32px, 3.6vw, 46px)/1.15 var(--mono);
  letter-spacing: -1px;
}
.panel-body {
  font: 17px/1.75 var(--mono);
  color: var(--text-muted);
  max-width: 480px;
}

/* ── Terminal panel ────────────────────────────────────────────────────────── */
.terminal {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-deep);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.terminal-bar i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(244, 245, 242, .2);
}
.terminal-bar span {
  margin-left: 8px;
  font: 12px var(--mono);
  color: var(--text-dim);
}
.cmd-row {
  display: grid;
  grid-template-columns: 20px 150px 1fr;
  gap: 14px;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-faint);
}
.cmd-row:last-child { border-bottom: 0; }
.cmd-icon { color: var(--text-dim); transition: color .2s ease; }
.cmd-name { font: 600 15px var(--mono); color: var(--accent); }
.cmd-desc {
  font: 15px var(--mono);
  color: rgba(244, 245, 242, .55);
  transition: transform .2s ease, color .2s ease;
}
.cmd-row:hover .cmd-icon { color: var(--accent); }
.cmd-row:hover .cmd-desc { transform: translateX(4px); color: var(--text); }
.copyable { cursor: pointer; position: relative; }
.copy-tip {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translate(-50%, 0);
  background: var(--accent);
  color: var(--bg);
  font: 700 11px var(--mono);
  letter-spacing: .5px;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}

.block-cursor {
  display: inline-block;
  width: 8px; height: 15px;
  margin-left: 4px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}

/* ── Stat grid ─────────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.stat {
  background: var(--bg);
  padding: 22px 22px 26px;
}
.stat-value {
  font: 800 clamp(26px, 2.8vw, 36px) var(--mono);
  color: var(--accent);
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.stat-bar {
  height: 2px;
  width: 0;
  margin-bottom: 14px;
  background-image: var(--gem-90);
  transition: width 1s var(--ease) var(--reveal-delay, 0s);
}
.is-visible .stat-bar, .stat.is-visible .stat-bar { width: 46%; }
.stat-title { font: 600 16px var(--mono); margin-bottom: 8px; }
.stat-desc { font: 14px/1.65 var(--mono); color: rgba(244, 245, 242, .55); }

/* ── Config preview panel ──────────────────────────────────────────────────── */
.config-panel {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-deep);
  overflow: hidden;
}
.config-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.config-panel-head strong { font: 600 13px var(--mono); }
.config-panel-head span { font: 11px var(--mono); color: var(--text-dim); letter-spacing: 1px; }
.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-faint);
}
.config-row:last-child { border-bottom: 0; }
.config-row strong { font: 600 15px var(--mono); display: block; }
.config-row small { font: 12.5px var(--mono); color: var(--text-muted); }
.toggle {
  width: 42px; height: 23px;
  border-radius: 12px;
  background: rgba(244, 245, 242, .16);
  position: relative;
  flex: none;
  transition: background .45s var(--ease);
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--text);
  transition: transform .45s var(--ease), background .45s ease;
}
.is-visible .toggle[data-on='true'] { background: var(--accent); }
.is-visible .toggle[data-on='true']::after {
  transform: translateX(19px);
  background: var(--bg);
}

.stat-source { margin-top: 14px; font: 12.5px/1.6 var(--mono); color: var(--text-dim); max-width: 620px; }

/* ── Plan cards ────────────────────────────────────────────────────────────── */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  perspective: 1400px;
}
.plan {
  position: relative;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform .4s var(--ease-bounce), border-color .25s ease;
}
/* Fallback lift for touch/no-JS visitors. On a fine-pointer, JS takes over
   this same transform (adding tilt) the instant the pointer enters — see
   cardTilt() in site.js — so this rule never visibly fires there on its own. */
.plan:hover { transform: translateY(-6px); }
.plan:not(.plan-hi):hover { border-image: var(--gem) 1; }
/* A real element, not a pseudo-element: ::before already carries .plan-hi's
   rotating arc and ::after already carries the divider line below, and this
   needs to layer independently of both rather than fight either for the slot. */
.plan-spotlight {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  /* See the comment on .feat-card::after — same calc(...* 1%) reasoning. */
  background: radial-gradient(circle 260px at calc(var(--spot-x, 50) * 1%) calc(var(--spot-y, 50) * 1%), rgba(222, 255, 0, .10), transparent 70%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.plan:hover .plan-spotlight { opacity: 1; }

/* A visible divider in the gutter between cards, on top of each card's own
   (faint) border — the grid gap alone read as too little separation. */
.plan:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 8%;
  bottom: 8%;
  right: -21px;
  width: 1px;
  background: var(--border-strong);
}

/* The free tier gets a rotating gem arc sweeping behind its border. */
.plan-hi { background: var(--bg-deep); }
.plan-hi::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--arc, 0deg),
    transparent 0deg, transparent 250deg,
    #DEFF00 290deg, #71F26F 320deg, #1FE8C2 345deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: arc 5s linear infinite;
  pointer-events: none;
}
@property --arc {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes arc { to { --arc: 360deg; } }

.plan-head { display: flex; flex-direction: column; gap: 6px; }
.plan-name { font: 700 13px var(--mono); letter-spacing: 2px; color: var(--accent); }
.plan-tag { font: 12px var(--mono); letter-spacing: 1px; color: var(--text-dim); }
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.plan-price b { font: 800 44px var(--mono); letter-spacing: -1px; }
.plan-price span { font: 14px var(--mono); color: var(--text-dim); }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plan li {
  display: flex;
  gap: 10px;
  font: 14px/1.5 var(--mono);
  color: var(--text-muted);
}
.plan li::before { content: '›'; color: var(--accent); }
.plan .btn { margin-top: auto; }

.plan-badge {
  position: absolute;
  top: 0; right: 36px;
  background: var(--accent);
  color: var(--bg);
  font: 700 11px var(--mono);
  letter-spacing: .5px;
  padding: 5px 10px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}

/* ── FAQ ───────────────────────────────────────────────────────────────────
   One answer open at a time (<details name="faq">). Answers open and close
   smoothly: ::details-content animates its grid rows 0fr → 1fr, and
   content-visibility is transitioned discretely so closing animates too
   (Chromium, Safari 18.4+, Firefox 143+; older engines open instantly). */
.faq-section { align-items: flex-start; padding: 128px 0 96px; }
/* Centred like the final CTA below it, so the close of the page reads as one column. */
.faq-section .section-head { justify-content: center; text-align: center; }
.faq { max-width: 920px; margin-inline: auto; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 4px;
  cursor: pointer;
  list-style: none;
  font: 600 18px/1.4 var(--mono);
  transition: color .25s ease, padding .35s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); padding-left: 10px; }
.faq details[open] summary { color: var(--accent); }
.faq .chev {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-muted);
  transition: transform .45s var(--ease), color .25s ease, border-color .25s ease;
}
.faq details[open] .chev { transform: rotate(180deg); color: var(--accent); border-color: var(--accent-border); }
.faq details::details-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease), content-visibility .5s allow-discrete;
}
.faq details[open]::details-content { grid-template-rows: 1fr; }
.faq-a { min-height: 0; overflow: hidden; }
.faq-a p {
  max-width: 70ch;
  padding: 0 4px 26px;
  font: 15.5px/1.8 var(--mono);
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .4s ease .05s, transform .5s var(--ease);
}
.faq details[open] .faq-a p { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .faq details::details-content, .faq-a p, .faq .chev, .faq summary { transition: none; }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 12px var(--mono);
  color: var(--text-dim);
}
.footer-brand b {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
}
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-links a {
  font: 12px var(--mono);
  color: var(--text-dim);
  background-image: var(--gem-90);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size .3s var(--ease), color .2s ease;
}
.footer-links a:hover { background-size: 100% 1px; }
.footer-note { font: 12px var(--mono); color: var(--text-dim); }

/* ── Interior page shell ───────────────────────────────────────────────────── */
.page { padding-top: var(--header-h); }
/* Block padding only: the shorthand used to zero .wrap's side padding, so
   page heads sat wider than everything below them. */
.page-head { padding-block: 84px 48px; }
.page-head h1 {
  margin: 14px 0 12px;
  font: 800 clamp(32px, 4vw, 48px)/1.15 var(--mono);
  letter-spacing: -1.5px;
}
.page-head h1:first-child { margin-top: 0; }
.page-head p { font: 16px/1.6 var(--mono); color: var(--text-muted); max-width: 620px; }

/* ── Pricing page ──────────────────────────────────────────────────────────── */
.compare {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.compare-row {
  display: grid;
  grid-template-columns: 1fr 110px 110px 110px;
  align-items: stretch;
  border-bottom: 1px solid var(--border-faint);
  transition: background .15s ease;
}
.compare-row:last-child { border-bottom: 0; }
.compare-row > * {
  display: flex;
  align-items: center;
  padding: 16px 18px;
}
.compare-row > :first-child { padding-left: 24px; }
.compare-row > :last-child { padding-right: 24px; }
.compare-head {
  background: var(--bg-deep);
  border-bottom-color: var(--border);
  font: 12px var(--mono);
  color: var(--text-dim);
  letter-spacing: 1px;
}
.compare-row:not(.compare-head):hover { background: rgba(244, 245, 242, .03); }
.compare-row > :nth-child(2),
.compare-row > :nth-child(3),
.compare-row > :nth-child(4) {
  justify-content: center;
  text-align: center;
  border-left: 1px solid var(--border-faint);
}
.compare-row > :nth-child(3) { color: var(--accent); }
.compare-head > :nth-child(3) { color: var(--accent); }
.compare-group { margin-bottom: 36px; }
.compare-group:last-child { margin-bottom: 0; }
.compare-group-title {
  font: 700 13px var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.fn-ref { font-size: 11px; line-height: 0; margin-left: 3px; }
.fn-ref a {
  color: var(--accent);
  text-decoration: none;
  padding: 2px;
}
.fn-ref a:hover { text-decoration: underline; }

.fn-list {
  list-style: decimal;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fn-list li {
  font: 13px/1.7 var(--mono);
  color: var(--text-muted);
  scroll-margin-top: 100px;
}
.fn-list li::marker { color: var(--text-dim); }
.fn-list li:target { color: var(--text); }
.fn-list a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 4px;
}
.fn-list .fn-back {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 6px;
}
.fn-list .fn-back:hover { color: var(--accent); }

.fine-print {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-deep);
  padding: 28px 32px;
}
.fine-print h2 {
  font: 700 12px var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.fine-print ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
}
.fine-print li {
  position: relative;
  padding-left: 20px;
  font: 13px/1.7 var(--mono);
  color: var(--text-muted);
}
.fine-print li::before { content: '›'; position: absolute; left: 0; color: var(--accent); }

/* ── Docs ──────────────────────────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
}
.docs-side {
  padding: 48px 0;
  border-right: 1px solid var(--border);
}
.docs-side-inner {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.docs-group-title {
  font: 12px var(--mono);
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.docs-group a {
  display: block;
  font: 13px var(--mono);
  color: rgba(244, 245, 242, .55);
  padding: 5px 0;
  transition: color .15s ease;
}
.docs-group a:hover { color: var(--text); }
.docs-group a[aria-current='page'] { color: var(--accent); }

.docs-body { padding: 48px 0 96px; max-width: 760px; }
.docs-body h1 {
  margin: 12px 0 16px;
  font: 800 clamp(30px, 3.6vw, 40px)/1.2 var(--mono);
  letter-spacing: -1px;
}
.prose h2 { margin: 40px 0 14px; font: 700 24px/1.3 var(--mono); }
.prose h3 { margin: 30px 0 10px; font: 700 18px/1.3 var(--mono); }
.prose p, .prose li { font: 15px/1.75 var(--mono); color: rgba(244, 245, 242, .65); }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent); }
.prose pre {
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 24px;
}
.prose pre code { background: none; padding: 0; color: var(--text); }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.prose th, .prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-faint);
  font: 13px var(--mono);
}
.prose th { background: var(--bg-deep); color: var(--text-dim); letter-spacing: 1px; font-weight: 400; }
.prose td:first-child code { white-space: nowrap; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* ── Legal pages ───────────────────────────────────────────────────────────── */
.legal-body { max-width: 760px; padding-bottom: 96px; }
.legal-block { margin-bottom: 32px; }
.legal-block h2 { font: 700 16px var(--mono); margin-bottom: 10px; }
.legal-block p, .legal-block li { font: 14px/1.8 var(--mono); color: var(--text-muted); }
.legal-block ul { padding-left: 20px; }
.legal-block li::marker { color: var(--accent); }

.notice {
  border: 1px solid var(--accent-border);
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 12px 16px;
  font: 12px/1.6 var(--mono);
  letter-spacing: .5px;
  margin-bottom: 32px;
}

/* ── Error page ────────────────────────────────────────────────────────────── */
.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 96px var(--pad);
}
.error-code {
  font: 800 clamp(64px, 12vw, 140px) var(--mono);
  color: var(--accent);
  letter-spacing: -4px;
  line-height: 1;
}

/* ── Login ─────────────────────────────────────────────────────────────────── */
.login-shell {
  min-height: calc(100vh - var(--header-h));
  padding-top: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 64px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  margin: 0 var(--pad);
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: var(--accent);
}
.login-copy { text-align: center; color: var(--text); }
.login-copy h1 { font: 700 22px var(--mono); margin-bottom: 8px; }
.login-copy p { font: 14px/1.6 var(--mono); color: var(--text-muted); }
.btn-discord {
  width: 100%;
  box-sizing: border-box;
  background: #5865F2;
  color: #fff;
  font: 700 14px var(--mono);
  padding: 13px 20px;
  transition: background .15s ease;
}
.btn-discord:hover { background: #4752c4; color: #fff; }
.login-terms {
  margin: 8px 0 0;
  font: 11px/1.6 var(--mono);
  color: var(--text-dim);
  text-align: center;
}
.login-terms a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
.login-terms a:hover { color: var(--accent); }
.login-notice {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font: 13px/1.6 var(--mono);
  color: var(--text-muted);
  text-align: left;
}
.login-notice-failed { border-color: var(--accent-border); }

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.dash-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.dash-header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-user { display: flex; align-items: center; gap: 12px; }
.dash-user-avatar { border-radius: 50%; display: block; }
.dash-user-name { font: 13px var(--mono); color: var(--text); }
.dash-logout {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: 13px var(--mono);
}

.dash-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
}
.dash-sidebar { padding: 40px 0; border-right: 1px solid var(--border); }
.dash-modules { display: flex; flex-direction: column; gap: 2px; }
.dash-mod-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font: 14px var(--mono);
  color: var(--text-muted);
  transition: background .15s ease, color .15s ease;
}
.dash-mod-link:hover { background: rgba(244, 245, 242, .05); }
.dash-mod-active { color: var(--accent); background: var(--accent-soft); }
.dash-mod-active:hover { background: var(--accent-soft); }

.dash-main { padding: 40px 32px 96px; }
.dash-notice {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-deep);
  font: 13px/1.6 var(--mono);
  color: var(--text-dim);
}
.dash-main-head { margin-bottom: 32px; }
.dash-main-head h1 { font: 800 30px var(--mono); color: var(--text); }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 40px;
}
.dash-stat { background: var(--bg-deep); padding: 24px; }
.dash-stat-label { font: 12px var(--mono); color: var(--text-dim); letter-spacing: 1px; margin-bottom: 10px; }
.dash-stat-value { font: 700 28px var(--mono); color: var(--text); }

.dash-settings { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.dash-settings-gap { margin-top: 32px; }
.dash-settings-head {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
  font: 12px var(--mono);
  color: var(--text-dim);
  letter-spacing: 1px;
}
.dash-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-faint);
}
.dash-setting-row:last-child { border-bottom: 0; }
.dash-setting-label { font: 600 14px var(--mono); color: var(--text); margin-bottom: 4px; }
.dash-setting-desc { font: 13px var(--mono); color: var(--text-muted); }

.dash-toggle {
  flex: none;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: rgba(244, 245, 242, .18);
  position: relative;
  display: inline-block;
}
.dash-toggle-on { background: var(--accent); }
.dash-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text);
  transition: transform .15s ease;
}
.dash-toggle-on .dash-toggle-knob { background: var(--bg); transform: translateX(18px); }

/* ── Dashboard: guild picker ───────────────────────────────────────────────── */
/* Top and bottom only: the side padding is .wrap's gutter. */
.dash-picker { padding-top: 48px; padding-bottom: 96px; }
.dash-sub { font: 14px/1.6 var(--mono); color: var(--text-muted); margin-top: 6px; }
.dash-refresh { font: 13px/1.6 var(--mono); color: var(--text-dim); margin-top: 10px; }
.dash-refresh a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.dash-refresh a:hover { color: var(--accent); }
.dash-main-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.dash-readonly {
  font: 600 11px var(--mono);
  letter-spacing: 1.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 5px 9px;
  white-space: nowrap;
}
.dash-premium { color: var(--accent); }

.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.guild-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-deep);
  color: var(--text);
  transition: border-color .2s ease, transform .2s var(--ease);
}
.guild-card:hover {
  border-color: var(--accent-border);
  color: var(--text);
  transform: translateY(-2px);
}
.guild-card-unknown { opacity: .62; }
.guild-card-unknown:hover { opacity: 1; }
.guild-icon { border-radius: 12px; flex: none; display: block; width: 48px; height: 48px; }
.guild-icon-text {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 15px var(--mono);
}
.guild-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.guild-name {
  font: 600 14px var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guild-role { font: 12px var(--mono); color: var(--text-dim); }

.dash-empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 40px 32px;
  margin-top: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.dash-empty p { font: 14px/1.7 var(--mono); color: var(--text-muted); max-width: 460px; }
.dash-empty-row { padding: 18px 24px; font: 13px var(--mono); color: var(--text-dim); }

.dash-back {
  display: inline-block;
  font: 12px var(--mono);
  color: var(--text-dim);
  padding: 0 12px 18px;
}
.dash-back:hover { color: var(--accent); }
.dash-mod-soon {
  margin-left: auto;
  font: 11px var(--mono);
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.dash-notice-warn { border-color: var(--accent-border); color: var(--text-muted); }

/* ── Dashboard: live settings + activity ───────────────────────────────────── */
.dash-setting-state { display: flex; align-items: center; gap: 14px; flex: none; }
.dash-setting-detail { font: 12px var(--mono); color: var(--text-dim); }

.dash-action-row {
  display: grid;
  grid-template-columns: 78px 170px 1fr 84px 52px;
  gap: 12px;
  align-items: center;
  padding: 13px 24px;
  border-bottom: 1px solid var(--border-faint);
  font: 13px var(--mono);
}
.dash-action-row:last-child { border-bottom: 0; }
.dash-action-kind {
  font: 600 11px var(--mono);
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 6px;
  text-align: center;
}
.dash-action-ban, .dash-action-kick { color: #ff8a8a; border-color: rgba(255, 138, 138, .35); }
.dash-action-warn, .dash-action-timeout { color: var(--accent); border-color: var(--accent-border); }
.dash-action-status { font-size: 12px; color: var(--text-dim); }
/* Pending is the one state that asks a moderator for something. */
.dash-status-pending { color: var(--accent); }
.dash-action-target { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-action-reason {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-action-when { color: var(--text-dim); text-align: right; font-size: 12px; }

/* ── Dashboard: settings forms ─────────────────────────────────────────────── */
.dash-side-label {
  margin: 28px 12px 8px;
  font: 600 11px var(--mono);
  letter-spacing: 1.5px;
  color: var(--text-dim);
}
.set-eyebrow { margin-bottom: 10px; font-size: 11px; letter-spacing: 1.5px; }
.set-main .dash-sub { max-width: 60ch; }
/* Room for the Save bar, so it never covers the last field. */
.has-savebar .set-main { padding-bottom: 160px; }

.set-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-deep);
  font: 13px/1.6 var(--mono);
}
.set-notice p { max-width: 70ch; }
.set-notice-ok { border-color: var(--accent-border); color: var(--text); }
.set-notice-warn { border-color: rgba(255, 184, 107, .45); color: var(--text-muted); }
.set-notice a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

.set-row .dash-setting-desc { max-width: 52ch; line-height: 1.55; }
.set-control { flex: none; }
.set-error { margin-top: 8px; font: 12px/1.5 var(--mono); color: var(--danger); }
.set-error:empty { display: none; }

.set-select,
.set-input,
.set-textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background-color: var(--bg-deep);
  color: var(--text);
  transition: border-color .15s ease;
}
.set-select:hover,
.set-input:hover,
.set-textarea:hover { border-color: rgba(244, 245, 242, .32); }
.set-select:focus-visible,
.set-input:focus-visible,
.set-textarea:focus-visible { border-color: var(--accent-border); }
.set-row-invalid .set-select,
.set-row-invalid .set-input,
.set-row-invalid .set-textarea { border-color: rgba(255, 138, 138, .6); }

.set-select {
  appearance: none;
  width: 280px;
  max-width: 100%;
  padding: 10px 36px 10px 12px;
  font: 13px var(--mono);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23F4F5F2' stroke-opacity='.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  text-overflow: ellipsis;
}
.set-select option,
.set-select optgroup { background: var(--bg-deep); color: var(--text); }

.set-number { display: flex; align-items: center; gap: 10px; }
.set-input {
  width: 92px;
  padding: 10px 12px;
  font: 600 14px var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.set-unit { font: 13px var(--mono); color: var(--text-muted); }

/* A real checkbox under the overview's toggle, so it keeps keyboard and
   screen-reader behaviour for free. */
.set-switch { position: relative; display: inline-flex; cursor: pointer; }
.set-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.set-switch .dash-toggle { transition: background .15s ease; }
.set-switch input:checked + .dash-toggle { background: var(--accent); }
.set-switch input:checked + .dash-toggle .dash-toggle-knob { background: var(--bg); transform: translateX(18px); }
.set-switch input:focus-visible + .dash-toggle { outline: 2px solid var(--accent); outline-offset: 3px; }

.set-editor { display: grid; gap: 12px; padding: 20px 24px; }
.set-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.set-chips-label {
  margin-right: 4px;
  font: 600 11px var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.set-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-muted);
  font: 12px var(--mono);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.set-chip code { font: 600 12px var(--mono); color: var(--accent); }
.set-chip:hover { border-color: var(--accent-border); color: var(--text); }
.set-chip:active { transform: translateY(1px); }
.set-textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 14px 16px;
  font: 14px/1.6 var(--mono);
}
.set-editor-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.set-editor-foot .set-error { margin-top: 0; }
.set-count {
  margin-left: auto;
  font: 12px var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  white-space: nowrap;
}
.set-count.is-over { color: var(--danger); }

.set-preview { padding: 20px 24px 24px; border-top: 1px solid var(--border-faint); }
.set-preview-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font: 600 11px var(--mono);
  letter-spacing: 1.5px;
  color: var(--text-dim);
}
.set-preview-note { font-weight: 400; font-size: 12px; letter-spacing: 0; }
.set-dc { margin-top: 14px; box-shadow: none; }
.set-preview-text { overflow-wrap: anywhere; min-height: 22px; }
.set-preview-text code {
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(151, 151, 159, .16);
  font: 13px var(--mono);
}

/* Off screen until there is something to save; the transform keeps the
   slide on the compositor. */
.set-savebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  border-top: 1px solid var(--accent-border);
  background: rgba(11, 13, 12, .94);
  backdrop-filter: blur(10px);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .35s var(--ease), visibility 0s linear .35s;
}
.set-savebar.is-up {
  transform: none;
  visibility: visible;
  transition: transform .35s var(--ease), visibility 0s;
}
.set-savebar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 14px;
}
.set-savebar-text { font: 13px var(--mono); color: var(--text); }
.set-savebar-actions { display: flex; gap: 10px; }
.set-savebar .btn { padding: 10px 18px; }
.set-savebar.is-nudged { animation: set-nudge .42s var(--ease); }
.set-savebar.is-nudged .set-savebar-text { color: var(--accent); }
@keyframes set-nudge {
  20% { transform: translateX(-8px); }
  45% { transform: translateX(7px); }
  70% { transform: translateX(-4px); }
  100% { transform: none; }
}

/* ── Homepage: the bot count ────────────────────────────────────────────────
   "5 bots to run" rolls to "1", and each job's "own bot" is struck through
   and becomes MSD. The resting styles are the end state, so no-JS and reduced
   motion show it directly. The figure is also a .reveal: until the observer
   marks it .is-visible it holds the "before" state, then the keyframes play
   once. Time-based, not scroll-linked, so every browser plays it the same. */
.stack-hero {
  --hero-fs: clamp(44px, 5.6vw, 84px);
  padding-top: var(--header-h);
  border-bottom: 1px solid var(--border);
}
.stack-pin {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 48px 0 96px;
}
.stack-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 64px;
  align-items: center;
}
.stack-hero .hero-title { margin: 0 0 24px; }
.stack-hero .hero-body { max-width: 52ch; }

/* Numbered badge shared by the count, the job index, and the job titles. */
.stack-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px; height: 26px;
  border-radius: var(--r-sm);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font: 700 13px var(--mono);
}

.tally { margin: 0; }
.tally-panel {
  padding: 26px 26px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-deep);
}
.tally-count {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.tally-digits {
  display: inline-grid;
  overflow: hidden;
  height: 1em;
  font: 800 clamp(76px, 9vw, 128px)/1 var(--mono);
  letter-spacing: -4px;
  color: var(--accent);
}
.tally-digits > span { grid-area: 1 / 1; }
.tally-5 { transform: translateY(-105%); }
.tally-unit { display: grid; padding-bottom: .7em; font: 600 15px/1.3 var(--mono); color: var(--text-muted); }
.tally-unit > span { grid-area: 1 / 1; }
.tally-u5 { opacity: 0; }

.tally-list { list-style: none; margin: 8px 0 0; }
.tally-list li + li { border-top: 1px solid var(--border-faint); }
.tally-list a {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  color: var(--text);
  font: 600 15px var(--mono);
}
.tally-list a:hover { color: var(--text); }
.tally-list a:hover .tally-job { color: var(--accent); }
.tally-job { transition: color .2s ease; }
.tally-meta { display: grid; justify-items: end; font: 12.5px var(--mono); }
.tally-meta > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; }
.tally-own { position: relative; color: var(--text-muted); opacity: 0; }
.tally-own i {
  position: absolute;
  left: -2px; right: -2px; top: 50%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.tally-in { color: var(--accent); font-weight: 700; }

@keyframes tally-roll-out { from { transform: translateY(0); } to { transform: translateY(-105%); } }
@keyframes tally-roll-in { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes tally-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tally-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes tally-strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Before the figure is revealed: five bots. */
.tally.reveal:not(.is-visible) .tally-5 { transform: none; }
.tally.reveal:not(.is-visible) .tally-1 { transform: translateY(105%); }
.tally.reveal:not(.is-visible) .tally-u5,
.tally.reveal:not(.is-visible) .tally-own { opacity: 1; }
.tally.reveal:not(.is-visible) .tally-u1,
.tally.reveal:not(.is-visible) .tally-in { opacity: 0; }

/* Revealed: strike each "own bot", then roll the count. */
.tally.is-visible .tally-own i {
  animation: tally-strike .3s var(--ease) both;
  animation-delay: calc(.75s + var(--i) * .16s);
}
.tally.is-visible .tally-own {
  animation: tally-fade-out .3s ease both;
  animation-delay: calc(1.05s + var(--i) * .16s);
}
.tally.is-visible .tally-in {
  animation: tally-fade-in .3s ease both;
  animation-delay: calc(1.1s + var(--i) * .16s);
}
.tally.is-visible .tally-5 { animation: tally-roll-out .5s var(--ease) both; animation-delay: 1.9s; }
.tally.is-visible .tally-1 { animation: tally-roll-in .5s var(--ease) both; animation-delay: 1.9s; }
.tally.is-visible .tally-u5 { animation: tally-fade-out .3s ease both; animation-delay: 1.9s; }
.tally.is-visible .tally-u1 { animation: tally-fade-in .3s ease both; animation-delay: 2s; }

@media (prefers-reduced-motion: reduce) {
  .tally .tally-5, .tally .tally-1, .tally .tally-u5, .tally .tally-u1,
  .tally .tally-own, .tally .tally-own i, .tally .tally-in { animation: none !important; }
  .tally .tally-5 { transform: translateY(-105%) !important; }
  .tally .tally-1 { transform: none !important; }
  .tally .tally-u5, .tally .tally-own { opacity: 0 !important; }
  .tally .tally-u1, .tally .tally-in { opacity: 1 !important; }
}

/* ── Homepage: the five jobs, as a horizontal rail ─────────────────────────
   Base: a native swipe row with scroll snapping, which works in every browser
   with no JS. Enhanced (scroll timelines, motion allowed, desktop): the
   section pins for 2 viewports of scroll while the track pans sideways, and
   the panel crossing the middle comes into focus. */
@keyframes rail-pan { to { transform: translateX(calc(-100% + 100cqw)); } }
@keyframes rail-focus {
  0%, 100% { opacity: .2; transform: scale(.96); }
  35%, 65% { opacity: 1; transform: none; }
}

.rail { position: relative; border-bottom: 1px solid var(--border); }
.rail-pin { container-type: inline-size; }
/* --rail-inset lines the first panel up with the page container on wide
   screens and keeps a generous margin below that. */
.rail-track {
  --rail-w: min(72cqw, 1180px);
  --rail-inset: max(clamp(var(--pad), 7cqw, 128px), calc((100cqw - var(--wrap)) / 2 + var(--pad)));
  display: flex;
  gap: clamp(64px, 11cqw, 180px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 72px var(--pad) 64px var(--rail-inset);
  scroll-padding-inline: var(--rail-inset);
  overscroll-behavior-x: contain;
  scrollbar-color: var(--accent-border) transparent;
}
.rail-panel {
  position: relative;
  flex: none;
  width: var(--rail-w);
  scroll-snap-align: start;
  scroll-margin-top: var(--header-h);
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: center;
  padding-top: 40px;
}
.rail-num {
  position: absolute;
  top: -.18em;
  left: -.04em;
  font: 800 clamp(140px, 16vw, 240px)/1 var(--mono);
  letter-spacing: -8px;
  /* JetBrains Mono is variable, so its glyphs keep overlapping contours and a
     plain stroke traces them (the loops inside 3 and 5). Stroking first and
     filling with the page colour on top hides the inner half of the stroke
     and every overlap, leaving a clean 3px outer outline. The stroke is
     opaque so overlaps can't double its alpha. */
  color: var(--bg);
  -webkit-text-stroke: 6px color-mix(in srgb, var(--accent) 32%, var(--bg));
  paint-order: stroke fill;
  pointer-events: none;
  user-select: none;
}
.rail-copy { position: relative; padding-top: 72px; }
.job-title {
  margin-bottom: 16px;
  font: 700 clamp(26px, 2.5vw, 34px)/1.2 var(--mono);
  letter-spacing: -1px;
  text-wrap: balance;
}
.job-body { font: 16px/1.75 var(--mono); color: var(--text-muted); max-width: 46ch; }
.job-usual { margin-top: 14px; font: 13px/1.6 var(--mono); color: var(--text-muted); }
.job-proof { min-width: 0; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 901px) {
    .rail { height: calc(100vh + 200vh); view-timeline: --rail block; }
    .rail-pin {
      position: sticky;
      top: var(--header-h);
      height: calc(100vh - var(--header-h));
      display: flex;
      align-items: center;
      overflow: hidden;
    }
    .rail-track {
      overflow: visible;
      width: max-content;
      /* Lets the last panel travel all the way to the left inset. */
      padding-right: calc(100cqw - var(--rail-w) - var(--rail-inset));
      animation: rail-pan linear both;
      animation-timeline: --rail;
      animation-range: contain 0% contain 100%;
    }
    .rail-panel {
      animation: rail-focus linear both;
      animation-timeline: --rail;
      animation-range: contain calc(var(--i) * 25% - 25%) contain calc(var(--i) * 25% + 25%);
    }
  }
}

/* ── Homepage: bands (rest of the install, import, the promise) ────────── */
.band { padding: 112px 0; border-bottom: 1px solid var(--border); }
.band-deep { background: var(--bg-deep); }
.band-body { margin-top: 18px; max-width: 52ch; }

.import-list { margin: 30px 0 0; border-top: 1px solid var(--border); }
.import-list > div {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-faint);
}
.import-list dt { display: flex; align-items: center; gap: 10px; font: 600 15px var(--mono); color: var(--text); }
.import-list dt svg { color: var(--accent); flex: none; }
.import-list dd { margin: 0; font: 14px/1.6 var(--mono); color: var(--text-muted); }
.fine { margin-top: 22px; font: 12px/1.6 var(--mono); color: var(--text-muted); max-width: 62ch; }

.access-panel .config-row small { color: var(--text-muted); }
.role-pill {
  flex: none;
  font: 600 13px var(--discord);
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.final-cta { text-align: center; padding: 80px 0 8px; }
.stats-line { margin-top: 24px; font: 13px var(--mono); color: var(--text-muted); }
.stats-line b { color: var(--accent); }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --pad: 20px; }
  .card-grid, .plan-grid, .split { grid-template-columns: 1fr; }
  .plan-grid { gap: 24px; }
  .plan:not(:last-child)::after { display: none; }
  .split { gap: 32px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-layout { grid-template-columns: 1fr; gap: 0; }
  .docs-side { border-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
  .docs-side-inner { position: static; }
  .stack-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .stack-pin { padding: 32px 0 80px; }
  .tally-panel { padding: 20px 18px 12px; }
  .rail-track { --rail-w: 88vw; }
  .rail-panel { grid-template-columns: 1fr; gap: 24px; }
  .rail-num { font-size: 120px; }
  .rail-copy { padding-top: 64px; }
  .band { padding: 80px 0; }
  .import-list > div { grid-template-columns: 1fr; gap: 4px; }
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { border-right: 0; border-bottom: 1px solid var(--border); padding: 24px 0; }
  .dash-modules { flex-direction: row; flex-wrap: wrap; }
  .dash-mod-soon { display: none; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-main { padding: 32px 0 64px; }
  .guild-grid { grid-template-columns: 1fr; }
  /* The case list drops the reason column rather than crushing five columns
     into a phone width; kind, subject, status and age identify an entry. */
  .dash-action-row { grid-template-columns: 70px 1fr auto 46px; padding: 12px 16px; }
  .dash-action-reason { display: none; }
  /* A channel name next to the copy would squeeze it to a few words a line, so
     the value drops under the copy once both no longer fit. */
  .dash-setting-row { flex-wrap: wrap; padding: 16px; }
  .dash-setting-row > :first-child { flex: 1 1 200px; }
  .dash-setting-state { margin-left: auto; }
  .set-control { flex: 1 1 100%; }
  .set-row .set-control:has(.set-switch) { flex: none; margin-left: auto; }
  .set-select { width: 100%; }
  .set-editor, .set-preview { padding-inline: 16px; }
  .dash-side-label { margin-top: 18px; }
  .set-savebar-inner { flex-wrap: wrap; }
  .set-savebar-actions { flex: 1 1 100%; }
  .set-savebar-actions .btn { flex: 1; }
  .site-nav { display: none; }
  .mnav { display: block; }
  .header-actions { gap: 10px; }
  .header-account { display: none; }
  .compare-row { grid-template-columns: 1fr 60px 60px 60px; font-size: 12px; }
  .compare-row > * { padding: 12px 6px; }
  .compare-row > :first-child { padding-left: 10px; }
  .compare-row > :last-child { padding-right: 10px; }
  .footer-right { align-items: flex-start; }
}

/* Narrow phones: the header row (logo, CTA, Menu) has to fit in 360px. */
@media (max-width: 480px) {
  .header-actions { gap: 8px; }
  .header-actions .btn-primary { padding: 10px 12px; font-size: 13px; }
  .header-actions .btn-primary svg { display: none; }
  .mnav-toggle { padding: 10px; }
  /* Discord's own phone layout: a smaller avatar and tighter gutters. */
  .dm { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding-inline: 10px; }
  .dm-avatar { width: 32px; height: 32px; }
  .dm-channel { padding-inline: 10px; }
  .dm-card { padding: 12px 12px 12px 14px; }
}
@media (max-width: 380px) {
  /* The logo link keeps its accessible name; only the wordmark text goes. */
  .site-header .logo-word { display: none; }
}

/* ── Reduced motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  .cursor-ring, .cursor-dot { display: none; }
  body[data-cursor='on'] { cursor: auto; }
  .dm-xp i { width: var(--v); }
  /* The shake is gone with motion off; the bar's edge flashes instead. */
  .set-savebar.is-nudged { box-shadow: inset 0 2px var(--accent); }
}
