/* ============================================================
   ModMailBot — shared styles for all pages.
   External (not inline) so the CSP stays  style-src 'self'  with no
   'unsafe-inline'. No JS. Only same-origin assets (self-hosted Satoshi
   + /botlogo.png). Light + dark themes via prefers-color-scheme.
   ============================================================ */

/* ---- Self-hosted brand font (Satoshi, Achentos) ---- */
/* Typeface: Satoshi — © 2017–2021 Indian Type Foundry (ITF), used under the ITF Free Font License
   (see /fonts/License/FFL.txt). Self-hosted woff2, served same-origin (font-src 'self'). */
@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-900.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ---- Design tokens ---- */
:root {
  --sans: "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-2: #fbfbfd;
  --ink: #111317;
  --text: #363b45;
  --text-strong: #1f232b;
  --muted: #525863;
  --line: #ebecf0;
  --line-2: #e8e9ee;

  --accent: #4752c4;          /* text accent / links / eyebrow bars (AA on white) */
  --accent-strong: #3a429f;   /* hover */
  --accent-solid: #4752c4;    /* button & badge fill, always paired with #fff */
  --accent-solid-hover: #3a429f;
  --accent-tint: #eef0fe;     /* icon chips */
  --green: #15803c;
  --red: #c1121f;             /* before/after "without" marker */

  --panel-bg: #ffffff;        /* discord demo — light theme by default */
  --panel-border: #e3e5e8;
  --panel-name: #060607;
  --panel-title: #060607;
  --panel-body: #313338;
  --panel-time: #5c5e66;
  --shadow-card: 0 1px 3px rgba(20, 22, 35, .08);
  --shadow-lift: 0 12px 40px -12px rgba(20, 22, 35, .22);
  --radius: 16px;
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161719;
    --surface: #1f2024;
    --surface-2: #1b1c1f;
    --ink: #f3f4f6;
    --text: #d3d6dd;
    --text-strong: #eceef2;
    --muted: #a6acb8;
    --line: #2b2d33;
    --line-2: #33363d;

    --accent: #b5acff;
    --accent-strong: #ccc4ff;
    --accent-solid: #5a4fe0;
    --accent-solid-hover: #4b41cc;
    --accent-tint: #262a4a;
    --green: #54d07f;
    --red: #fb7185;

    --panel-bg: #1e1f22;        /* discord demo — dark theme */
    --panel-border: #383b43;
    --panel-name: #f2f3f5;
    --panel-title: #f2f3f5;
    --panel-body: #e3e5e8;
    --panel-time: #b5bac1;

    --shadow-card: 0 1px 3px rgba(0, 0, 0, .5);
    --shadow-lift: 0 12px 40px -12px rgba(0, 0, 0, .5);
  }
}

/* ---- Reset / base ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
table { border-collapse: collapse; }
em { font-style: italic; }

code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--accent-tint);
  color: var(--accent);
  padding: .12em .4em;
  border-radius: 5px;
  white-space: nowrap;
}

/* Permission chips: guide bot-permissions table */
.perm { display: inline-block; background: var(--accent-tint); color: var(--accent); font-weight: 500; font-size: .9em; padding: .2em .55em; border-radius: 6px; }

/* ---- Accessibility helpers ---- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: color-mix(in srgb, var(--text-strong) 8%, var(--bg)); color: var(--text-strong);
  border: 1px solid color-mix(in srgb, var(--text-strong) 24%, transparent);
  padding: 11px 18px; border-radius: 8px; font-weight: 700; transition: top .15s ease;
}
.skip-link:focus { top: 16px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}

/* ---- Layout ---- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { max-width: var(--maxw); margin: 0 auto; padding: 96px 32px 0; }
.section--narrow { max-width: 980px; }
.section--xnarrow { max-width: 760px; }

/* ---- Eyebrow label (bar · TEXT · bar) ---- */
.eyebrow {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow::before, .eyebrow::after {
  content: ""; width: 26px; height: 2px; background: var(--accent); flex: none;
}
.eyebrow--left { justify-content: flex-start; }
.eyebrow--left::after { display: none; }

.section-head { text-align: center; margin-bottom: 48px; }
.section-title {
  font-weight: 900; font-size: 38px; letter-spacing: -.025em;
  color: var(--ink); margin-top: 14px; line-height: 1.08;
}
.section-intro {
  font-size: 17px; color: var(--text); max-width: 540px;
  margin: 14px auto 0; line-height: 1.55;
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-weight: 700; font-size: 18px; letter-spacing: .01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { font-size: 15px; font-weight: 500; color: var(--text); }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a[aria-current="page"]:not(.btn) { color: var(--ink); font-weight: 700; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 24px; border-radius: 12px;
  font-weight: 700; font-size: 16px; font-family: var(--sans);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { flex: none; }
.btn--sm { padding: 10px 18px; font-size: 15px; border-radius: 10px; }
.btn--primary { background: var(--accent-solid); color: #fff; box-shadow: 0 8px 22px rgba(71, 82, 196, .28); }
.btn--primary:hover { background: var(--accent-solid-hover); }
.btn--secondary { background: color-mix(in srgb, var(--text-strong) 8%, var(--bg)); color: var(--text-strong); border-color: color-mix(in srgb, var(--text-strong) 24%, transparent); }
.btn--secondary:hover { background: color-mix(in srgb, var(--text-strong) 14%, var(--bg)); border-color: color-mix(in srgb, var(--text-strong) 34%, transparent); }
.btn--light { background: #fff; color: #1f232b; }
.btn--light:hover { background: #eef0f5; }
.btn--ghost { background: rgba(255, 255, 255, .10); color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn--ghost:hover { background: rgba(255, 255, 255, .18); }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--surface-2) 0%, var(--bg) 60%); }
.hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 72px 32px 0; text-align: center; }
.hero-glow {
  position: absolute; top: 60px; left: 50%; transform: translateX(-50%);
  width: 720px; height: 360px; z-index: 0; filter: blur(10px); pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(88, 101, 242, .14), rgba(88, 101, 242, 0) 70%);
}
.hero h1 {
  font-weight: 900; font-size: 58px; line-height: 1.04; letter-spacing: -.03em;
  color: var(--ink); margin: 22px auto 0; max-width: 820px;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub { font-size: 19px; line-height: 1.55; color: var(--text); max-width: 620px; margin: 22px auto 0; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.hero-note { font-size: 15px; color: #3f4550; margin-top: 18px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .hero-note { color: var(--text-strong); } }
.hero-caption { font-size: 15px; color: #474d57; max-width: 560px; margin: 20px auto 0; line-height: 1.55; font-weight: 500; }
@media (prefers-color-scheme: dark) { .hero-caption { color: var(--muted); } }

/* ---- Discord demo panel ---- */
.panel-wrap { margin-top: 48px; display: inline-block; max-width: 680px; width: 100%; }
.panel {
  background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 26px 28px; text-align: left; box-shadow: var(--shadow-lift);
}
.panel-row { display: flex; gap: 16px; align-items: flex-start; }
.panel-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; }
.panel-main { min-width: 0; flex: 1; }
.panel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-name { color: var(--panel-name); font-weight: 700; font-size: 16px; }
.panel-badge { background: #5865f2; color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; letter-spacing: .02em; }
.panel-time { color: var(--panel-time); font-size: 12.5px; font-weight: 500; }
.panel-title { color: var(--panel-title); font-weight: 700; font-size: 17px; margin-top: 8px; }
.panel-body { color: var(--panel-body); font-size: 15.5px; line-height: 1.55; margin-top: 10px; font-weight: 500; }
.panel-btns { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.pbtn { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-size: 14.5px; font-weight: 600; padding: 9px 16px; border-radius: 8px; }
.pbtn--security { background: #d83c3e; }
.pbtn--bug { background: #5865f2; }
.pbtn--feature { background: #248045; }

/* ---- How it works (steps) ---- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.step { background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px 20px; }
.step-num { display: flex; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-tint); color: var(--accent); font-weight: 700; align-items: center; justify-content: center; font-size: 15px; }
.step h3 { font-weight: 700; font-size: 16.5px; color: var(--ink); margin-top: 16px; }
.step p { font-size: 14.5px; line-height: 1.55; color: #474d57; margin-top: 8px; font-weight: 500; }
@media (prefers-color-scheme: dark) { .step p { color: var(--text); } }

/* ---- Features ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 28px; background: var(--bg); }
.feature-icon { display: flex; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-tint); align-items: center; justify-content: center; }
.feature-icon svg { stroke: var(--accent); }
.feature h3 { font-weight: 700; font-size: 18px; color: var(--ink); margin-top: 18px; }
.feature p { font-size: 14.5px; line-height: 1.6; color: var(--text); margin-top: 9px; font-weight: 500; }

/* ---- Comparison table ---- */
.compare-card { border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.compare-table { width: 100%; font-size: 15px; }
.compare-table thead tr { background: var(--surface); }
.compare-table th, .compare-table td { padding: 15px 24px; }
.compare-table thead th { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; }
.compare-table thead th.col-us { text-align: center; font-weight: 900; font-size: 16px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.compare-table thead th.col-them { text-align: center; font-weight: 600; font-size: 15px; text-transform: none; letter-spacing: 0; }
.compare-table tbody tr { border-top: 1px solid var(--line); }
.compare-table tbody th { text-align: left; font-weight: 500; color: var(--text-strong); }
.compare-table td { text-align: center; color: var(--muted); }
.compare-table td.us { color: var(--ink); font-weight: 900; }
.compare-table .check { color: var(--green); font-weight: 900; font-size: 17px; }

/* ---- FAQ ---- */
.faq { display: flex; flex-direction: column; gap: 14px; }
.faq-item { border: 1px solid var(--line-2); border-radius: 13px; padding: 18px 22px; background: var(--bg); }
.faq-item summary { font-weight: 700; font-size: 16.5px; color: var(--ink); cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--muted); font-weight: 700; margin-left: 12px; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { font-size: 15px; line-height: 1.6; color: var(--text); margin-top: 10px; }
.faq-more { text-align: center; margin-top: 26px; font-size: 15px; color: var(--text); }
.faq-more a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: .14em; }
.faq-more a:hover { color: var(--accent-strong); }

/* ---- CTA band ---- */
.cta-band { background: #14161b; border-radius: 22px; padding: 60px; text-align: center; position: relative; overflow: hidden; }
@media (prefers-color-scheme: dark) { .cta-band { border: 1px solid var(--line-2); } }
.cta-band .glow { position: absolute; top: -100px; right: -60px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(88, 101, 242, .30), transparent 70%); }
.cta-band .inner { position: relative; }
.cta-band .eyebrow { color: #a79eff; }
.cta-band .eyebrow::before, .cta-band .eyebrow::after { background: #7d70ec; }
.cta-band h2 { font-weight: 900; font-size: 36px; letter-spacing: -.025em; color: #fff; margin-top: 14px; }
.cta-band p { font-size: 17px; color: #c4c7d4; max-width: 480px; margin: 14px auto 0; line-height: 1.55; }
.cta-actions { display: flex; gap: 14px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

/* ---- Footer ---- */
.site-footer { max-width: var(--maxw); margin: 64px auto 0; padding: 48px 32px 56px; border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 32px; }
.footer-brand { max-width: 360px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 14.5px; line-height: 1.6; color: #474d57; font-weight: 500; margin-top: 10px; }
@media (prefers-color-scheme: dark) { .footer-brand p { color: var(--muted); } }
.footer-brand a { color: var(--accent); font-weight: 600; }
.footer-cols { display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col .h { font-weight: 700; color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.footer-col a { color: #474d57; font-size: 14px; font-weight: 500; }
@media (prefers-color-scheme: dark) { .footer-col a { color: var(--muted); } }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: #474d57; font-weight: 500; }
@media (prefers-color-scheme: dark) { .footer-bottom { color: var(--muted); } }

/* ============================================================
   Document pages (guide + legal): a comfortable reading column
   ============================================================ */
.doc-hero { background: linear-gradient(180deg, var(--surface-2), var(--bg)); border-bottom: 1px solid var(--line); }
.doc-hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 56px 32px; }
.doc-hero h1 { font-weight: 900; font-size: 46px; letter-spacing: -.03em; color: var(--ink); margin-top: 14px; line-height: 1.05; }
.doc-hero p { font-size: 18px; line-height: 1.55; color: var(--text); max-width: 620px; margin-top: 14px; }

.guide-layout { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 88px; padding-top: 48px; }
.toc ul { list-style: none; border-left: 2px solid var(--line); padding-left: 18px; display: flex; flex-direction: column; gap: 12px; }
.toc .toc-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
.toc a { font-size: 14.5px; color: var(--text); font-weight: 500; }
.toc a:hover { color: var(--accent); }

.doc { padding: 48px 0 0; max-width: 760px; min-width: 0; }
.doc-section { scroll-margin-top: 88px; }
.doc-section + .doc-section { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.doc h2 { font-weight: 900; font-size: 30px; letter-spacing: -.02em; color: var(--ink); }
.doc h3 { font-weight: 700; font-size: 18px; color: var(--ink); margin-top: 30px; }
.doc p { font-size: 16.5px; line-height: 1.65; color: var(--text); margin-top: 14px; text-wrap: pretty; }
.doc ul, .doc ol { margin-top: 16px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.doc ul li { font-size: 16px; line-height: 1.65; color: var(--text); padding-left: 22px; position: relative; text-wrap: pretty; }
.doc ul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.doc ol { counter-reset: step; }
.doc ol li { position: relative; padding-left: 42px; min-height: 26px; font-size: 16px; line-height: 1.65; color: var(--text); text-wrap: pretty; }
.doc ol li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 7px; background: var(--accent-tint); color: var(--accent); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.doc p a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: .14em; }
.doc p a:hover { color: var(--accent-strong); }
.doc strong { font-weight: 700; color: var(--text-strong); }

/* two-column option cards in setup */
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }

/* "Why you need it" — before/after columns */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ba-col { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 26px 28px; background: var(--bg); }
.ba-col h3 { font-weight: 700; font-size: 17px; color: var(--ink); }
.ba-list { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.ba-list li { position: relative; padding-left: 28px; font-size: 14.5px; line-height: 1.5; color: var(--text); font-weight: 500; }
.ba-list li::before { position: absolute; left: 0; top: -1px; font-weight: 700; font-size: 15px; }
.ba-list--bad li::before { content: "✕"; color: var(--red); }
.ba-list--good li::before { content: "✓"; color: var(--green); }
.opt-card { border: 1px solid var(--line-2); border-radius: 14px; padding: 24px; }
.opt-card h3 { margin-top: 0; font-size: 17px; }
.opt-card h3 .t { color: var(--muted); font-weight: 500; font-size: 14px; }
.opt-card p { font-size: 14.5px; line-height: 1.6; color: var(--text); margin-top: 10px; }

/* data tables inside docs */
.table-label { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 28px; }
.table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--line-2); border-radius: 14px; }
.data-table { width: 100%; font-size: 14.5px; min-width: 520px; }
.data-table caption { text-align: left; color: var(--muted); font-size: .9em; padding: 0 0 .4rem; }
.data-table thead tr { background: var(--surface); }
.data-table th, .data-table td { text-align: left; padding: 13px 18px; vertical-align: top; }
.data-table thead th { font-weight: 700; color: var(--ink); }
.data-table tbody tr { border-top: 1px solid var(--line); }
.data-table td { color: var(--text); line-height: 1.5; }
.data-table code { white-space: nowrap; }

/* callout */
.callout { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; border-radius: 12px; padding: 16px 18px; }
.callout svg { flex: none; margin-top: 1px; }
.callout p { margin-top: 0; font-size: 15px; line-height: 1.6; }
.callout--warn { background: #fef6e7; border: 1px solid #f4e3b8; }
.callout--warn svg { stroke: #9a6a00; }
.callout--warn p { color: #6b4e00; }
@media (prefers-color-scheme: dark) {
  .callout--warn { background: #2e2613; border-color: #514015; }
  .callout--warn svg { stroke: #e3b54d; }
  .callout--warn p { color: #e7c478; }
}

.doc-foot { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.doc-foot a.back { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); font-size: 15px; }
.doc-foot .links { display: flex; gap: 20px; font-size: 14px; color: var(--muted); }
.doc-foot .links a:hover { color: var(--accent); }
.doc-copy { font-size: 13px; color: var(--muted); margin-top: 24px; }

/* ---- Legal pages: simple centered reading column ---- */
.legal { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.legal-body { padding: 16px 0 0; }
.legal-body h2 { font-weight: 900; font-size: 24px; letter-spacing: -.02em; color: var(--ink); margin-top: 36px; }
.legal-body p { font-size: 16.5px; line-height: 1.7; color: var(--text); margin-top: 14px; }
.legal-body a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: .14em; }
.legal-body a:hover { color: var(--accent-strong); }
.legal-body strong { font-weight: 700; color: var(--text-strong); }
.legal-body .data-table { min-width: 0; }
.legal-body .table-wrap { margin-top: 20px; }
.legal-lead { font-size: 17px !important; color: var(--muted) !important; margin-top: 16px !important; }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { gap: 18px; }
  .nav-links a[href*="#"] { display: none; }
  .guide-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .hero h1 { font-size: 42px; }
  .section-title { font-size: 30px; }
  .doc-hero h1 { font-size: 34px; }
  .cards-2, .ba { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .container, .section, .nav, .hero-inner, .doc-hero-inner, .site-footer, .guide-layout, .legal { padding-left: 20px; padding-right: 20px; }
  .nav { gap: 14px; }
  .nav-links a:not(.btn) { display: none; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .cta-band, .panel { padding: 32px 22px; }
  .footer-cols { gap: 40px; }
  .compare-table th, .compare-table td { padding: 13px 14px; }
  .compare-table { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}


/* ============================================================
   v2 additions — homepage redesign (hero grid + media rows).
   Appended so guide/legal pages are untouched.
   ============================================================ */

/* ---- Hero: two-column, product visual above the fold ---- */
.hero-inner--grid { text-align: left; padding-bottom: 72px; }
.hero-grid {
  display: grid; grid-template-columns: 1.04fr .96fr;
  gap: 64px; align-items: center;
}
.hero-grid h1 { margin: 22px 0 0; max-width: none; font-size: 52px; }
.hero-grid .hero-sub { margin: 22px 0 0; max-width: 560px; }
.hero-grid .hero-actions { justify-content: flex-start; }
.hero-grid .hero-note { margin-top: 18px; }
.hero-demo { min-width: 0; }
.hero-demo .panel-wrap { margin-top: 0; }
.hero-grid .hero-caption { margin: 18px 0 0; max-width: none; }

/* ---- How it works: alternating media rows with real product boards ---- */
.mrows { display: flex; flex-direction: column; gap: 72px; }
.mrow {
  display: grid; grid-template-columns: 7fr 5fr;
  gap: 56px; align-items: center;
}
.mrow--flip { grid-template-columns: 5fr 7fr; }
.mrow-copy .kicker {
  font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.mrow-copy h3 {
  font-weight: 900; font-size: 26px; letter-spacing: -.02em;
  line-height: 1.15; color: var(--ink); margin-top: 12px;
}
.mrow-copy p:not(.kicker) {
  font-size: 16px; line-height: 1.65; color: var(--text);
  margin-top: 12px; font-weight: 500; text-wrap: pretty;
}
.shot {
  border: 1px solid var(--line-2); border-radius: var(--radius);
  overflow: hidden; background: #161719; box-shadow: var(--shadow-lift);
  min-width: 0;
}
.shot img { display: block; width: 100%; height: auto; }

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-grid h1 { font-size: 44px; }
  .mrow, .mrow--flip { grid-template-columns: 1fr; gap: 22px; }
  .mrow--flip .mrow-copy { order: 2; }
  .mrows { gap: 56px; }
}
@media (max-width: 620px) {
  .hero-grid h1 { font-size: 34px; }
  .mrow-copy h3 { font-size: 22px; }
}

/* privacy grid: 4 cards, 2x2 */
.features--2 { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin: 0 auto; }
@media (max-width: 620px) { .features--2 { grid-template-columns: 1fr; } }

/* a11y: anchor targets clear the sticky header (WCAG 2.4.11 focus not obscured) */
.section[id] { scroll-margin-top: 84px; }
main[tabindex="-1"] { outline: none; }

/* ============================================================
   v3 additions — theme-adaptive Discord demos in "How it works"
   (replace the static board images; render in light AND dark
   via the same token approach as the hero panel).
   ============================================================ */
:root {
  --dc-embed: #f2f3f5;
  --dc-line: #e3e5e8;
  --dc-muted: #4e535d;
  --dc-input: #ebedef;
  --dc-mention-bg: #e8eafd;
  --dc-mention-ink: #3f4bc0;
  --dc-mention2-bg: #dff3e7;
  --dc-mention2-ink: #116a33;
}
@media (prefers-color-scheme: dark) {
  :root {
    --dc-embed: #2b2d31;
    --dc-line: #3a3d46;
    --dc-muted: #b5bac1;
    --dc-input: #383a40;
    --dc-mention-bg: rgba(88, 101, 242, .32);
    --dc-mention-ink: #c9cdfb;
    --dc-mention2-bg: rgba(36, 128, 70, .30);
    --dc-mention2-ink: #4fd07d;
  }
}

.demo-fig { min-width: 0; }
.demo {
  background: var(--panel-bg); border: 1px solid var(--panel-border);
  border-radius: 14px; box-shadow: var(--shadow-lift);
  padding: 20px 22px; text-align: left; position: relative;
}
.demo-stack { display: flex; flex-direction: column; min-width: 0; }
.demo-stack .demo:first-child { margin-right: 44px; z-index: 1; }
.demo-stack .demo + .demo { margin: -16px 0 0 auto; width: calc(100% - 44px); max-width: 520px; z-index: 2; }
.demo-msg { display: flex; gap: 14px; align-items: flex-start; }
.demo-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; }
.demo-main { flex: 1; min-width: 0; }
.demo .panel-body { margin-top: 8px; }
.demo-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pbtn--sm { padding: 7px 13px; font-size: 13.5px; border-radius: 7px; gap: 6px; white-space: nowrap; }

.demo-chan-head {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--dc-line);
  color: var(--panel-name); font-weight: 700; font-size: 15.5px;
}
.demo-chan-head svg, .demo-composer svg { stroke: var(--dc-muted); flex: none; }

.mention {
  background: var(--dc-mention-bg); color: var(--dc-mention-ink);
  border-radius: 4px; padding: 0 4px; font-weight: 600; white-space: nowrap;
}
.mention--role { background: var(--dc-mention2-bg); color: var(--dc-mention2-ink); }
.demo-chip { background: var(--dc-embed); border-radius: 4px; padding: 0 5px; font-weight: 600; }

.demo-embed {
  margin-top: 10px; background: var(--dc-embed); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; max-width: 440px;
}
.demo-embed-title { display: block; font-weight: 800; font-size: 15px; color: var(--panel-name); }
.demo-embed .qa { display: flex; flex-direction: column; gap: 2px; }
.demo-embed .qa b { font-weight: 700; font-size: 13.5px; color: var(--panel-name); }
.demo-embed .qa span { font-size: 13.5px; color: var(--dc-muted); line-height: 1.45; }

.demo-composer {
  display: flex; align-items: center; gap: 10px; margin-top: 18px;
  background: var(--dc-input); border-radius: 10px; padding: 11px 14px;
  color: var(--dc-muted); font-size: 14px; font-weight: 500;
}

.demo-file {
  margin-top: 10px; display: flex; align-items: center; gap: 12px;
  background: var(--dc-embed); border: 1px solid var(--dc-line);
  border-radius: 10px; padding: 12px 16px; max-width: 440px;
}
.demo-file svg { stroke: var(--accent); flex: none; }
.demo-file-main { min-width: 0; }
.demo-file-main b { display: block; font-size: 14.5px; color: var(--accent); font-weight: 700; word-break: break-all; line-height: 1.3; }
.demo-file-main span { display: block; font-size: 12.5px; color: var(--dc-muted); margin-top: 2px; }

.demo--modal { max-width: 470px; }
.demo-modal-title { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 17px; color: var(--panel-name); }
.demo-x { color: var(--dc-muted); font-weight: 700; font-size: 14px; }
.demo-label {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--dc-muted); margin: 14px 0 6px;
}
.demo-label .req { color: var(--red); } /* theme-aware: #c1121f light / #fb7185 dark — AA on both panel backgrounds (#d83c3e was 3.6:1 on the dark panel) */
.demo-input {
  background: var(--dc-input); border-radius: 8px; padding: 10px 12px;
  font-size: 14px; color: var(--panel-body); font-weight: 500;
}
.demo-modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 20px; margin-top: 18px; }
.demo-cancel { font-size: 14px; font-weight: 600; color: var(--dc-muted); }
.demo-submit { background: #5865f2; color: #fff; font-weight: 700; font-size: 14px; padding: 10px 22px; border-radius: 8px; }

@media (max-width: 620px) {
  .demo-stack .demo:first-child { margin-right: 10px; }
  .demo-stack .demo + .demo { width: calc(100% - 10px); }
  .demo { padding: 16px; }
}
