/* ── Mewvo front site ─────────────────────────────────────────────────────
   Served at /site.css (hashed). No inline styles anywhere (CSP style-src 'self'), no web
   fonts, no gradients, glows or blur. Dark gray and white only (owner, 2026-11-01): the same
   look whatever the device's colour scheme, so the two token blocks below hold the same
   values. Main buttons are white with dark text (--brand / --on-brand), links and focus are
   white (--accent). No brand colour: colour only for status (--ok, --warn, --bad) and inside
   the Discord mock-ups (--dc-*).
   Colour pairs are checked by tests/siteContrast.test.js (AA: 4.5:1 text, 3:1 UI marks):
   change a token here, run that test.
   Type: headlines heavy (800), body 16px, small print 12 to 14px in the muted gray.
   Spacing 4 8 12 16 24 32 48 64 96 · radius 6 8 12 14. */

:root {
    color-scheme: dark;
    --bg: #1e1f22;
    --bg-alt: #25262a;
    --raised: #2b2c31;
    --raised-strong: #34353b;
    --text: #ffffff;
    --text-muted: #b8bac0;
    --border: #3a3b40;
    --border-control: #55575d;
    --border-strong: #8b8d94;
    --accent: #ffffff;
    --accent-hover: #d2d3d7;
    --accent-soft: #34353b;
    --ink: #ffffff;
    --ink-hover: #dcdde0;
    --on-ink: #1e1f22;
    --brand-soft: #34353b;
    --on-brand: #1e1f22;
    --brand-hover: #dcdde0;
    --brand: #ffffff;
    --ok: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
    --shadow-mock: none;
    /* Discord mock-ups (dark Discord, like the page) */
    --dc-bg: #313338;
    --dc-text: #dbdee1;
    --dc-head: #f2f3f5;
    --dc-muted: #a9aeb6;
    --dc-link: #00a8fc;
    --dc-embed: #2b2d31;
    --dc-code: #1e1f22;
    --dc-input: #1e1f22;
    --dc-mention: #c9cdfb;
    --dc-mention-bg: #3c4270;
    --dc-primary: #4752c4;
    --dc-danger: #c93035;
    --dc-success: #1f7a43;
    --dc-grey: #4e5058;
    --dc-on-button: #ffffff;
    --dc-avatar: #ededed;
    --dc-on-avatar: #111111;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* The same values on purpose: the site is dark gray in both schemes. */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #1e1f22;
        --bg-alt: #25262a;
        --raised: #2b2c31;
        --raised-strong: #34353b;
        --text: #ffffff;
        --text-muted: #b8bac0;
        --border: #3a3b40;
        --border-control: #55575d;
        --border-strong: #8b8d94;
        --accent: #ffffff;
        --accent-hover: #d2d3d7;
        --accent-soft: #34353b;
        --ink: #ffffff;
        --ink-hover: #dcdde0;
        --on-ink: #1e1f22;
        --brand-soft: #34353b;
        --on-brand: #1e1f22;
        --brand-hover: #dcdde0;
        --brand: #ffffff;
        --ok: #4ade80;
        --warn: #fbbf24;
        --bad: #f87171;
        --shadow-mock: none;
        /* Discord mock-ups (dark Discord, like the page) */
        --dc-bg: #313338;
        --dc-text: #dbdee1;
        --dc-head: #f2f3f5;
        --dc-muted: #a9aeb6;
        --dc-link: #00a8fc;
        --dc-embed: #2b2d31;
        --dc-code: #1e1f22;
        --dc-input: #1e1f22;
        --dc-mention: #c9cdfb;
        --dc-mention-bg: #3c4270;
        --dc-primary: #4752c4;
        --dc-danger: #c93035;
        --dc-success: #1f7a43;
        --dc-grey: #4e5058;
        --dc-on-button: #ffffff;
        --dc-avatar: #ededed;
        --dc-on-avatar: #111111;
    }
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
    background: var(--bg); color: var(--text);
    font: 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    display: flex; flex-direction: column; min-height: 100vh;
    overflow-wrap: break-word;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* Headlines heavy and large; inner pages a step smaller than the home hero. */
h1, h2, h3 { color: var(--text); font-weight: 800; }
h1 { font-size: clamp(2.6rem, 5.4vw, 3.6rem); line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 20px; }
.page h1 { font-size: clamp(2.25rem, 4.4vw, 3rem); line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 8px; }
p { margin: 0 0 16px; }
code { font-family: var(--mono); font-size: 0.875em; padding: 1px 5px; border-radius: 5px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); }
kbd { font-family: var(--mono); font-size: 12px; line-height: 1; display: inline-block; padding: 5px 7px 4px; border: 1px solid var(--border-control); border-bottom-width: 2px; border-radius: 6px; background: var(--raised); color: var(--text); white-space: nowrap; }
strong { font-weight: 700; }
.muted { color: var(--text-muted); }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: 12px; top: -64px; z-index: 10; padding: 8px 12px; background: var(--ink); color: var(--on-ink); border-radius: 6px; }
.skip:focus { top: 8px; color: var(--on-ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Top bar ── */
.topbar { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 8px 32px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; color: var(--text); text-decoration: none; min-height: 44px; }
.brand:hover { color: var(--text); }
.logo { flex: none; border-radius: 7px; }
.dc-avatar .logo { width: 100%; height: 100%; border-radius: 50%; }
.topnav { flex: 1 1 auto; min-width: 0; }
.topnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.topnav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: 6px; font-size: 15px; font-weight: 600; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.topnav a:hover { color: var(--text); background: var(--raised); }
.topnav a[aria-current="page"] { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.topbar-actions { display: flex; gap: 8px; margin-left: auto; }

/* ── Buttons: white fill with dark text for the main action, outlined for the rest ── */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 8px;
    background: var(--brand); color: var(--on-brand); border: 1px solid var(--brand); font: inherit; font-size: 15px; font-weight: 700; text-decoration: none;
    transition: background-color 120ms ease, border-color 120ms ease;
    /* Long translated labels wrap inside the button (centred, balanced lines) instead of leaving it. */
    padding-top: 8px; padding-bottom: 8px; line-height: 1.25; text-align: center; text-wrap: balance; overflow-wrap: break-word; }
.button:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--on-brand); }
.button-quiet { background: transparent; color: var(--text); border-color: var(--border-strong); }
.button-quiet:hover { background: var(--raised); color: var(--text); border-color: var(--text); }
.button-disabled, .button-disabled:hover { background: var(--bg-alt); color: var(--text-muted); border: 1px dashed var(--border-control); cursor: not-allowed; }
button.button { cursor: pointer; }

/* ── Shared text bits ── */
.lead { font-size: 19px; line-height: 1.55; color: var(--text-muted); max-width: 640px; }
.note { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.more { font-weight: 700; }
.more::after { content: " →"; }
.more:hover { text-decoration: underline; }
.tag { display: inline-block; font-size: 12px; line-height: 20px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--border-control); color: var(--text-muted); white-space: nowrap; }
.planned { font-size: 0.85em; font-weight: 400; color: var(--text-muted); white-space: nowrap; }

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-muted); margin: 24px 0; }

/* ── Home: hero ── */
.hero { padding: 48px 0 40px; }
.hero-grid { display: block; max-width: 760px; }
.hero-visual { margin-top: 32px; max-width: 560px; }
.hero h1 { max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 16px; }
.hero .note { margin-top: 8px; }


/* ── Home: numbered sections ── */
.block { padding: 64px 0; border-top: 1px solid var(--border); }
.wrap.narrow { max-width: 760px; }
.narrow h2 { margin-top: 56px; }
.narrow h2:first-child { margin-top: 0; }
.ref-intro { color: var(--text-muted); margin: -8px 0 20px; }
.split { display: block; }
.split > * + * { margin-top: 16px; }

.split-copy p { color: var(--text-muted); }
.split-copy .more { color: var(--accent); }
.split-visual { min-width: 0; }


.per { font-weight: 400; font-size: 13px; color: var(--text-muted); margin-left: 2px; }


/* ── Mock-ups (Discord DMs, forms, panels) ── */
.mock { margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--dc-bg); box-shadow: var(--shadow-mock); }
.mock-bar { display: flex; align-items: center; min-height: 36px; padding: 0 14px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.mock-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-caption { font-size: 13px; color: var(--text-muted); padding: 12px 14px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.dc { padding: 18px 18px 20px; color: var(--dc-text); font-size: 15px; line-height: 1.45; }
.dc p { margin: 0; }
.dc strong { color: var(--dc-head); font-weight: 700; }
.dc-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
.dc-msg + .dc-msg { margin-top: 16px; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--dc-avatar); color: var(--dc-on-avatar); }
.dc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-bottom: 2px; }
.dc-name { font-weight: 600; color: var(--dc-head); }
.dc-app { font-size: 10px; font-weight: 700; line-height: 15px; padding: 0 4px; border-radius: 3px; background: var(--dc-primary); color: var(--dc-on-button); }
.dc-time { font-size: 12px; color: var(--dc-muted); }
.dc-link { color: var(--dc-link); overflow-wrap: anywhere; }
.dc-stamp { background: var(--dc-code); border-radius: 3px; padding: 0 2px; }
.dc .dc-code { font-size: 13px; background: var(--dc-code); border: 0; color: var(--dc-text); padding: 1px 4px; border-radius: 4px; }
.dc-mention { background: var(--dc-mention-bg); color: var(--dc-mention); border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-embed { margin-top: 4px; max-width: 520px; padding: 10px 14px 12px; background: var(--dc-embed); border-left: 4px solid var(--dc-primary); border-radius: 4px; font-size: 14px; }
.dc-btn { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--dc-on-button); }
.dc-btn-primary { background: var(--dc-primary); }
.dc-btn-link { color: var(--dc-text); background: transparent; }
.dc-modal { padding: 22px 20px 18px; }
.dc-modal-title { font-size: 20px; font-weight: 700; color: var(--dc-head); margin-bottom: 18px !important; letter-spacing: -0.01em; }
.dc-field { margin-bottom: 16px; }
.dc-field-label { font-size: 14px; font-weight: 600; color: var(--dc-head); }
.dc-req { color: var(--dc-danger); }
.dc-sub { font-size: 12px; color: var(--dc-muted); }
.dc-field-help { font-size: 13px; color: var(--dc-muted); margin-bottom: 8px !important; }
.dc-input { min-height: 40px; padding: 9px 12px; border-radius: 8px; background: var(--dc-input); font-size: 15px; }
.dc-input-tall { min-height: 84px; }
.dc-input-empty { color: var(--dc-muted); }
.dc-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px !important; }

/* The warning ladder (not Discord: a plain diagram) */
.mock-ladder { background: var(--raised); }
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder-step { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px 16px; align-items: baseline; padding: 16px 18px; border-top: 1px solid var(--border); position: relative; }
.ladder-step:first-child { border-top: 0; }
.ladder-key { font-size: 13px; color: var(--text-muted); }
.ladder-what { font-weight: 500; }
.ladder-result { font-size: 14px; color: var(--text-muted); text-align: right; }
.ladder-step.is-ban::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; background: var(--accent); border-radius: 0 2px 2px 0; }
.ladder-step.is-ban .ladder-result { color: var(--text); font-weight: 600; }

/* Real dashboard screenshots */
.shot { margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-alt); box-shadow: var(--shadow-mock); }
.shot img { display: block; width: 100%; height: auto; }
.shot .mock-caption { border-top: 1px solid var(--border); }

/* ── Inner pages ── */
.page { padding-top: 40px; padding-bottom: 64px; }
.page-head { margin-bottom: 56px; }
.page-head-split { display: block; }
.page-head-split h1 { margin-bottom: 12px; }
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.6rem); letter-spacing: -0.015em; margin: 48px 0 12px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose figure { margin: 32px 0; }
.block-tight { margin-top: 96px; }
.block-tight > h2 { margin-bottom: 24px; }

/* Features: a sticky index next to the reference */
.with-index { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; }
.index { position: sticky; top: 88px; }
.index ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.index a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent; font-size: 14px; color: var(--text-muted); text-decoration: none; }
.index a:hover { color: var(--text); border-left-color: var(--text); }
.ref-group { margin-bottom: 80px; scroll-margin-top: 88px; }
.ref-group:last-child { margin-bottom: 0; }
.ref-list { margin: 0 0 16px; }
.ref-list > div { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 4px 32px; padding: 16px 0; border-top: 1px solid var(--border); }
.ref-list > div:last-child { border-bottom: 1px solid var(--border); }
.ref-list dt { font-weight: 700; font-size: 16px; }
.ref-list dd { margin: 0; color: var(--text-muted); font-size: 15px; max-width: 64ch; }

/* Older plan grid (kept: tests/site.test.js checks the selector); plan perks on checkout. */
.plans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.plan-perks { list-style: none; margin: 20px 0 0; padding: 0; font-size: 14px; }
.plan-perks li { padding: 9px 0; border-top: 1px solid var(--border); }
.plans-note { margin-top: 16px; }

.compare-wrap { margin-top: 0; }
.compare { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 12px 16px; border-top: 1px solid var(--border); text-align: center; vertical-align: top; }
.compare thead th { border-top: 0; font-weight: 800; font-size: 15px; }
.compare thead th:first-child, .compare tbody th { text-align: left; font-weight: 400; }
.compare tbody th { color: var(--text); }
.compare .compare-group th { font-size: 14px; font-weight: 600; color: var(--text); background: var(--bg-alt); padding-top: 10px; padding-bottom: 10px; }
.compare td { font-variant-numeric: tabular-nums; }
.compare .yes { color: var(--text); font-weight: 700; }
.compare .no { color: var(--text-muted); }

.qa { margin: 0; }
.qa > div { padding: 20px 0; border-top: 1px solid var(--border); }
.qa > div:last-child { border-bottom: 1px solid var(--border); }
.qa dt { font-weight: 600; }
.qa dd { margin: 6px 0 0; color: var(--text-muted); }

/* FAQ */
.faq-group { margin-top: 48px; max-width: 820px; }
.faq-group h2 { font-size: clamp(1.4rem, 2.4vw, 1.6rem); margin-bottom: 8px; }
.faq-group:first-of-type { margin-top: 0; }
.faq { border-top: 1px solid var(--border); }
.faq:last-child { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 20px 0; font-weight: 700; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-weight: 400; color: var(--text-muted); }
.faq[open] summary::after { content: "−"; }
.faq summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.faq-answer { padding: 0 0 20px; color: var(--text-muted); max-width: 680px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* Docs */
.guide-list { list-style: none; margin: 0; padding: 0; max-width: 820px; border-top: 1px solid var(--border); }
.guide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 24px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.guide:hover { color: var(--text); }
.guide:hover .guide-title { text-decoration: underline; text-underline-offset: 4px; }
.guide-title { display: block; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.015em; }
.guide-summary { display: block; color: var(--text-muted); margin-top: 4px; }
.doc { max-width: 760px; }
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.crumbs a { color: var(--text-muted); }
.doc-head { margin-bottom: 40px; }
.doc-body > h2:first-child { margin-top: 0; }
.steps-list { list-style: none; counter-reset: step; margin: 16px 0 24px; padding: 0; }
.steps-list li { counter-increment: step; position: relative; padding: 12px 0 12px 44px; border-top: 1px solid var(--border); margin: 0; }
.steps-list li:last-child { border-bottom: 1px solid var(--border); }
.steps-list li::before { content: counter(step); position: absolute; left: 0; top: 12px; font-size: 15px; font-weight: 800; color: var(--text); }
.doc-next { margin-top: 64px; }
.doc-next a { display: block; padding: 20px 24px; border: 1px solid var(--border); border-radius: 12px; font-size: 18px; font-weight: 700; color: var(--text); text-decoration: none; }
.doc-next a:hover { border-color: var(--border-strong); }
.doc-next-label { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); margin-bottom: 4px; }

/* Rules: numbered like the docs steps; each rule is a link target (#rule-3) from the DMs */
.rules { max-width: 760px; }
.rules > .note:first-child { margin-top: -24px; }
.rules-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.rule { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 24px; padding: 24px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 88px; }
.rule:target { background: var(--accent-soft); box-shadow: -16px 0 0 var(--accent-soft), 16px 0 0 var(--accent-soft); }
.rule-num { font-size: 13px; line-height: 28px; color: var(--accent); text-decoration: none; }
.rule-num:hover { text-decoration: underline; }
.rule-title { font-size: 20px; font-weight: 800; line-height: 28px; letter-spacing: -0.015em; margin: 0; overflow-wrap: anywhere; }
.rule-text { color: var(--text-muted); margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.rule-consequence { margin: 8px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.rule-consequence-label { font-weight: 700; }
.rules-appeal { margin-top: 32px; }

/* Commands */
.jump ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--border-control); border-radius: 6px; color: var(--text); text-decoration: none; font-size: 14px; }
.jump a:hover { background: var(--bg-alt); }
.cmd-group { scroll-margin-top: 88px; margin-top: 56px; }
.cmd-group h2 { font-size: clamp(1.4rem, 2.4vw, 1.6rem); letter-spacing: -0.015em; margin-bottom: 12px; }
/* Command explorer (pages/commands.js): the filter form, "who" links, one card per command.
   Cards that do not match carry `hidden` (server-side filter; static/site.js filters live). */
.cmd-filter { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: end; margin: 0 0 16px; }
.cmd-filter p { margin: 0; }
.cmd-filter-actions { grid-column: 1 / -1; }
.form-field select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-alt); color: var(--text); font: 16px/1.5 var(--sans); }
.cmd-filter input { border-color: var(--border-strong); }
.form-field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cmd-filter input::placeholder { color: var(--text-muted); opacity: 1; }
.cmd-who ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cmd-who a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--border-control); border-radius: 6px; color: var(--text); text-decoration: none; font-size: 14px; }
.cmd-who a:hover { background: var(--bg-alt); }
.cmd-who a[aria-current] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.cmd-count { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; }
.cmd-empty { margin: 24px 0; padding: 16px; border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--text); }
.cmd-cards { display: grid; gap: 12px; }
.cmd-card { scroll-margin-top: 88px; min-width: 0; padding: 16px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); }
.cmd-card:target { border-color: var(--accent); }
.cmd-name { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 17px; overflow-wrap: anywhere; }
.cmd-name code { min-width: 0; overflow-wrap: anywhere; }
.cmd-anchor { flex: none; color: var(--text-muted); text-decoration: none; font-weight: 400; }
.cmd-anchor:hover { color: var(--text); }
.cmd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.tag-strong { color: var(--text); border-color: var(--border-strong); }
.cmd-desc { margin: 0; color: var(--text-muted); font-size: 15px; max-width: 72ch; }
.cmd-options-wrap { margin-top: 12px; background: var(--bg-alt); border-radius: 8px; }
.cmd-options { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmd-options caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cmd-options th, .cmd-options td { text-align: left; vertical-align: top; padding: 8px 12px; border-top: 1px solid var(--border); }
.cmd-options thead th { border-top: 0; color: var(--text-muted); font-weight: 600; font-size: 13px; }
.cmd-options tbody th { font-weight: 400; white-space: nowrap; }
.cmd-options td:last-child { color: var(--text-muted); min-width: 180px; }
.cmd-choices { display: block; margin-top: 2px; font-size: 13px; }
.cmd-example { margin: 12px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.cmd-label { color: var(--text-muted); margin-right: 4px; }
.cmd-page { margin: 8px 0 0; font-size: 14px; color: var(--text-muted); }
.cmd-card[hidden], .cmd-group[hidden], .cmd-empty[hidden], .jump li[hidden] { display: none; }

/* Leaderboard: a plain table, numbers right-aligned; scrolls sideways inside its box on phones. */
.legal-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.legal-table caption { text-align: left; padding: 12px 16px; color: var(--text-muted); font-size: 13px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-top: 1px solid var(--border); }
.legal-table thead th { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.legal-table tbody th { font-weight: 600; width: 34%; }
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); }
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th, .board td { padding: 11px 18px; text-align: left; border-top: 1px solid var(--border); }
.board thead th { border-top: 0; font-size: 13px; font-weight: 500; color: var(--text-muted); background: var(--bg-alt); }
.board .num { text-align: right; white-space: nowrap; }
.board th:first-child, .board td:first-child { width: 88px; }
.board th:nth-child(3), .board td:nth-child(3) { width: 120px; }
.board th:nth-child(4), .board td:nth-child(4) { width: 160px; }
.board thead th:not(:nth-child(2)) { text-align: right; }
.board tbody tr:nth-child(-n+3) td:first-child { color: var(--accent); font-weight: 600; }
.board-name { overflow-wrap: anywhere; font-weight: 500; }
/* The server cat above the leaderboard: image left, words right; stacks on phones. */
.cat-card { display: flex; align-items: center; gap: 24px; padding: 16px 24px 16px 16px; margin-bottom: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); }
.cat-card img { flex: none; width: 128px; height: 128px; }
.cat-card h2 { font-size: 22px; letter-spacing: -0.015em; margin: 0 0 4px; overflow-wrap: anywhere; }
.cat-card p { margin: 0; color: var(--text-muted); }
.cat-meta { margin-top: 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
.cat-bar { display: block; width: 100%; max-width: 320px; height: 8px; margin-top: 12px; accent-color: var(--accent); }
@media (max-width: 560px) { .cat-card { flex-direction: column; align-items: flex-start; padding: 16px; } }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.pager-current { color: var(--text-muted); font-size: 14px; }
.notice { max-width: 720px; padding: 14px 16px; margin-top: 24px; background: var(--bg-alt); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: 8px; }
.notice-bad { border-left-color: var(--bad); }
.legal-summary { margin: 0 0 32px; }
.legal-summary h2 { margin-top: 0; }
.legal-summary .legal-binding { margin-bottom: 0; font-weight: 600; }

/* Transparency report: a row of totals, then plain tables; numbers right-aligned, totals in the footer row. */
.tr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 64px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--border); gap: 1px; }
.tr-stats > div { padding: 20px 22px; background: var(--raised); }
.tr-stats dt { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.tr-stats dd { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tr-stats .tr-small { font-size: 18px; font-weight: 600; letter-spacing: 0; }
.tr-section + .tr-section { margin-top: 64px; }
.tr-section > h2 { margin-bottom: 8px; }
.tr-section > p { color: var(--text-muted); max-width: 720px; }
.report { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.report th, .report td { padding: 11px 16px; text-align: right; border-top: 1px solid var(--border); white-space: nowrap; }
.report thead th { border-top: 0; font-size: 13px; font-weight: 500; color: var(--text-muted); background: var(--bg-alt); vertical-align: bottom; white-space: normal; }
.report th[scope="row"], .report thead th:first-child { text-align: left; font-weight: 500; }
.report .sub { color: var(--text-muted); }
.report .masked { color: var(--text-muted); font-size: 13px; }
.report tfoot th, .report tfoot td { border-top: 2px solid var(--border-strong); font-weight: 650; background: var(--bg-alt); }
.report tfoot .masked { font-weight: 500; }

/* Status: the word carries the meaning; the dot only repeats it. */
.status { display: inline-flex; align-items: center; gap: 12px; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 16px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border-strong); }
.status-online .status-dot { background: var(--ok); }
.status-starting .status-dot { background: var(--warn); }
.status-degraded .status-dot { background: var(--bad); }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); padding: 64px 0 32px; background: var(--bg); }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 650; }
.footer-text { font-size: 14px; color: var(--text-muted); max-width: 300px; }
.footer-nav { display: block; }
.footer-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li a { display: inline-block; padding: 4px 0; font-size: 14px; color: var(--text); text-decoration: none; }
.footer li a:hover { color: var(--accent); text-decoration: underline; }
.footer li a[aria-current="page"] { color: var(--accent); }
.footer-legal { margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }

/* ── My record (/me) ── */
.record-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.record-head form { margin: 0; }
.record-summary { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.feature { background: var(--raised); padding: 20px; }
.feature p { margin: 0; color: var(--text-muted); }
.record-summary h2, .record-summary h3 { font-size: 14px; font-weight: 600; color: var(--text-muted); margin: 0 0 8px; }
.record-big { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--text) !important; margin: 0 0 8px !important; }
.record-active { margin: 0; padding-left: 20px; }
.record h2 { font-size: 22px; letter-spacing: -0.015em; margin-top: 48px; }
/* The card labels inside the summary stay small (the rule above is for the section titles). */
.record .record-summary h2, .record .record-summary h3 { font-size: 14px; margin: 0 0 8px; }
.record .test-banner { margin-top: 24px; }
.record-server .table-wrap { margin-top: 16px; }
.record-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.record-table th, .record-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-top: 1px solid var(--border); }
.record-table thead th { border-top: 0; color: var(--text-muted); font-weight: 600; white-space: nowrap; background: var(--bg-alt); }
.record-table td:nth-child(3) { min-width: 200px; overflow-wrap: anywhere; }
/* Web appeals: a case code never breaks inside (it is typed or compared as a whole). */
.appeal-table code { white-space: nowrap; }
.record .note { margin-top: 24px; }

/* ── Subscriptions (test checkout, billing.js): pricing buttons, checkout, receipt, redeem ── */
.plan-actions { display: grid; gap: 8px; }
.plan-actions-yearly { display: none; }
.test-banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0 0 32px; padding: 12px 16px; border: 1px solid var(--border); border-left: 3px solid var(--warn); border-radius: 8px; background: var(--bg-alt); font-size: 14px; color: var(--text-muted); }
.flash, .error { margin: 0 0 24px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--raised); color: var(--text); font-size: 15px; }
.flash { border-left: 3px solid var(--ok); }
.error { border-left: 3px solid var(--bad); }
.back-link { display: inline-block; margin-bottom: 16px; font-size: 14px; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 48px; align-items: start; }
.seg-group { margin-bottom: 28px; }
.seg-label { font-size: 12px; color: var(--text-muted); margin: 0 0 10px; }
.seg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.seg a { display: flex; flex-direction: column; gap: 2px; min-height: 56px; padding: 10px 14px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--raised); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; }
.seg a:hover { border-color: var(--border-strong); color: var(--text); }
.seg a small { font-weight: 400; font-size: 13px; color: var(--text-muted); }
.seg a[aria-current="true"] { border: 2px solid var(--accent); padding: 9px 13px; }
.checkout-plan h2 { font-size: 18px; margin: 8px 0 0; }
.summary { position: sticky; top: 88px; padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); }
.summary h2 { font-size: 18px; margin: 0 0 16px; }
.summary .note { margin: 12px 0; }
.summary form { margin: 0; }
.summary-rows { margin: 0 0 8px; }
.summary-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 15px; }
.summary-rows dt { color: var(--text-muted); }
.summary-rows dd { margin: 0; text-align: right; }
.summary-total { font-weight: 650; font-size: 18px !important; }
.summary-total dt { color: var(--text) !important; }
.summary-approx { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.summary-pay { width: 100%; min-height: 48px; font-size: 15px; }
.receipt { max-width: 520px; margin: 32px 0; }
.key-box { margin: 24px 0; padding: 20px 24px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--bg-alt); }
.key-box .note { margin: 8px 0 0; overflow-wrap: anywhere; }
.key-big { margin: 0; font-size: clamp(20px, 4vw, 28px); font-weight: 650; letter-spacing: 0.04em; }
.key-big code, .key-code { font-family: var(--mono); user-select: all; }
.key-code { white-space: nowrap; }
.key-link { user-select: all; }
.record-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.record-links form { margin: 0; }
.redeem-form label { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.redeem-row { display: flex; flex-wrap: wrap; gap: 8px; }
.redeem-row input { flex: 1 1 220px; min-height: 40px; padding: 0 12px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--bg); color: var(--text); font: 15px var(--mono); text-transform: uppercase; }
.redeem-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.redeem-row input::placeholder { color: var(--text-muted); text-transform: none; }
.redeem-form + .note { margin-top: 16px; }
.gift-fields { display: grid; gap: 6px; margin: 4px 0 16px; }
.gift-fields label { font-size: 14px; color: var(--text-muted); }
.gift-fields input, .gift-fields textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); }
.gift-fields input { min-height: 40px; }
.gift-fields textarea { resize: vertical; }
.gift-fields input:focus-visible, .gift-fields textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* EU checkout: required consent boxes, the test note next to the pay button, the seller facts. */
.consent { display: grid; gap: 10px; margin: 4px 0 16px; padding: 0; border: 0; }
.consent-box { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.consent-box input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.test-pay-note { display: inline-block; margin-top: 8px; }
.checkout-seller { margin-top: 32px; }
.withdraw-list { display: grid; gap: 12px; padding-left: 0; list-style: none; }
.withdraw-list .button { margin-top: 6px; }
.model-form p { margin: 0 0 6px; }
.gift-message { margin: 12px 0 0; padding: 8px 0 8px 14px; border-left: 3px solid var(--border-strong); color: var(--text); white-space: pre-line; font-size: 16px; }
.summary-upgrade { color: var(--text) !important; }

/* ── Smaller screens ── */
@media (max-width: 1000px) {
    .hero-grid, .split, .page-head-split, .with-index { grid-template-columns: minmax(0, 1fr); }
    .hero-grid { gap: 48px; }
    .split { gap: 40px; }
    .index { position: static; }
    .index ol { display: flex; flex-wrap: wrap; gap: 4px 16px; border-left: 0; }
    .index a { padding: 4px 0; margin: 0; border: 0; }
    .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .checkout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .summary { position: static; }
}
@media (max-width: 760px) {
    .wrap { padding: 0 16px; }
    .topbar { position: static; }
    .topbar-inner { flex-wrap: wrap; gap: 0 16px; padding-top: 8px; }
    .topnav { order: 3; flex-basis: 100%; margin: 0 -8px; padding-bottom: 4px; }
    .topnav ul { flex-wrap: wrap; }
    .topnav a { padding: 0 8px; min-height: 36px; }
    .topbar-actions .button { min-height: 36px; padding: 0 12px; }
    .hero { padding: 48px 0 56px; }
    .block { padding: 72px 0; }
    .page { padding-top: 48px; padding-bottom: 64px; }
    .page-head { margin-bottom: 40px; }
    .lead { font-size: 17px; }
    .ref-list > div, .cmd-filter { grid-template-columns: minmax(0, 1fr); }
    .plans { grid-template-columns: minmax(0, 1fr); }
    .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guide { grid-template-columns: minmax(0, 1fr); }
    .rule { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; }
    .rule-title { font-size: 18px; }
    .ladder-step { grid-template-columns: 80px minmax(0, 1fr); }
    .ladder-result { grid-column: 2; text-align: left; }
    .dc { padding: 14px 12px 16px; font-size: 14px; }
    .dc-msg { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
    .dc-avatar { width: 32px; height: 32px; }
    .faq summary { font-size: 16px; }
    .board th, .board td { padding: 10px 12px; width: auto !important; }
    .tr-stats { grid-template-columns: minmax(0, 1fr); }
    .report th, .report td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Q&A lists (pricing, transparency). */
.qa > div { padding: 12px 0; border-top: 1px solid var(--border); }
.qa dt { font-weight: 700; margin-bottom: 4px; }
.qa dd { margin: 0; color: var(--text-muted); }

/* Mewvo account pages (/me/signup, /me/link, /me/account …): one narrow column in the middle,
   labels above fields, buttons on the fields' left edge, sections split by a plain line. */
.account { max-width: 480px; margin: 0 auto; }
.account h1 { font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.1; margin-bottom: 28px; }
.account h1 + .lead { margin-top: -12px; }
.account .lead { font-size: 17px; margin-bottom: 28px; }
.account h2 { font-size: 20px; letter-spacing: -0.01em; margin: 0 0 16px; }
.account-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.account-settings .account-section:first-of-type { margin-top: 32px; padding-top: 0; border-top: 0; }
.account-section > p { color: var(--text-muted); }
.account-foot { margin: 20px 0 0; }
.account-links { list-style: none; margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 15px; color: var(--text-muted); }
.account-steps { padding-left: 20px; margin: 0 0 24px; color: var(--text-muted); }
.account-steps li { margin-bottom: 8px; }
.account-steps code { overflow-wrap: anywhere; }
.account-facts { margin: 0 0 20px; }
.account-facts > div { padding: 12px 0; }
.account-facts > div:last-child { border-bottom: 1px solid var(--border); }
.account-facts dd { overflow-wrap: anywhere; }
.form-stack { display: grid; gap: 20px; max-width: 480px; margin: 0; }
.form-field { display: grid; gap: 6px; }
.form-field label { font-size: 14px; font-weight: 700; color: var(--text); }
.form-field input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--bg-alt); color: var(--text); font: 15px/1.5 var(--sans); }
.form-field input:hover { border-color: var(--border-strong); }
.form-field input:focus-visible, .form-check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-field textarea { width: 100%; min-height: 96px; padding: 8px 12px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--bg-alt); color: var(--text); font: 16px/1.5 var(--sans); resize: vertical; }
.form-field textarea:hover { border-color: var(--border-strong); }
.form-field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* A radio group (web appeal "Did you do it?"): the legend reads like a field label. */
.form-choice { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.form-choice legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: var(--text); }
.form-choice .form-check { min-height: 44px; align-items: center; }
.form-choice .form-check input { margin: 0; }
.form-hint { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.form-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.form-check input { flex: none; width: 16px; height: 16px; margin: 4px 0 0; accent-color: var(--brand); }
.form-stack p, .form-stack .form-field { margin: 0; }
.form-stack .form-actions { margin-top: 4px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; }
.form-actions form { margin: 0; }
.form-actions > a:not(.button) { margin-left: 8px; font-size: 15px; }
.button-danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.button-danger:hover { background: var(--raised); color: var(--bad); border-color: var(--bad); }
.account .flash, .account .error { margin-bottom: 28px; }
/* The 1-letter names: a grid of square tiles; the radio itself is hidden, the tile shows it. */
.letter-grid { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
/* The section heading already says it; the legend stays for screen readers only. */
.letter-grid legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-actions + .note { margin: 16px 0 0; }
/* 26 letters + 10 digits: 9 across (4 rows), 6 across on phones (6 rows). */
.letter-tiles { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 520px) { .letter-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.letter-choice { position: relative; display: block; cursor: pointer; }
.letter-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.letter-choice span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px solid var(--border-control); border-radius: 8px; background: var(--bg-alt); font: 700 18px/1 var(--mono); color: var(--text); }
.letter-choice:hover span { border-color: var(--border-strong); background: var(--raised); }
.letter-choice input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.letter-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.letter-decline { margin: 12px 0 0; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.recovery-codes code { display: block; padding: 8px 12px; font: 16px var(--mono); text-align: center; }

/* ── Product look (2026-11-01): wider hero, bands, cards, plan row, footer columns ── */

.topbar { background: var(--bg); }
.topnav a[aria-current="page"] { color: var(--text); text-decoration: none; background: var(--raised); }
.topbar-actions .button { min-height: 38px; padding: 0 14px; font-size: 14px; }

.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; max-width: 1180px; }
.hero h1 { max-width: 620px; margin-bottom: 20px; }
.hero .lead { font-size: 20px; max-width: 560px; }
.hero-visual { margin: 0; max-width: none; }
.hero-actions { align-items: center; margin: 32px 0 16px; }
.hero-more { margin: 0 0 8px; font-size: 15px; color: var(--text-muted); }
.hero-more a { font-weight: 700; }
.install-note { margin: 0 0 8px; font-size: 14px; color: var(--text-muted); }

.band { padding: 80px 0; background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band + .block { border-top: 0; }
.band-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 64px; align-items: end; margin-bottom: 40px; }
.band-head h2 { margin: 0; }
.band-head p { margin: 0; color: var(--text-muted); max-width: 620px; }
.shot { margin: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--raised); box-shadow: var(--shadow-mock); }
.shot img { display: block; width: 100%; }

.block { padding: 88px 0; }
.split-2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; }
.split-2 .split-copy p { color: var(--text-muted); max-width: 520px; }
.split-2 .split-copy h2 { margin-bottom: 20px; }

/* Trust card panels */
.card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--raised); }
.card h3 { font-size: 1.2rem; margin: 0 0 8px; }
.card p { margin: 0 0 16px; color: var(--text-muted); font-size: 15px; }

/* Home "What it does": two columns of plain items split by thin lines, no boxes. */
.what-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; border-bottom: 1px solid var(--border); }
.what-grid li { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding: 24px 0; border-top: 1px solid var(--border); }
.what-grid h3 { font-size: 1.1rem; margin: 0; }
.what-grid p { grid-column: 2; margin: 0; color: var(--text-muted); font-size: 15px; max-width: 60ch; }
.what-grid a { grid-column: 2; margin-top: 6px; font-size: 15px; font-weight: 700; }

.block-last { border-top: 1px solid var(--border); padding: 64px 0 72px; }
.help-row h2 { margin-bottom: 12px; }
.help-row p { margin: 0; color: var(--text-muted); max-width: 60ch; }

/* Tables sit in a raised box that scrolls sideways on phones. */
.table-wrap { border: 1px solid var(--border); border-radius: 14px; background: var(--raised); overflow-x: auto; }
/* site.js adds .can-scroll while a table has more columns to the right: a stronger right edge. */
.table-wrap.can-scroll { border-right-color: var(--border-strong); }

/* Footer: brand line, then link columns. */
.footer { padding: 56px 0 32px; background: var(--bg-alt); border-top: 1px solid var(--border); }
.footer-top { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 64px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 800; font-size: 18px; color: var(--text); }
.footer-text { font-size: 13px; line-height: 1.55; color: var(--text-muted); max-width: 320px; margin: 0; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.footer-title { font-size: 14px; font-weight: 800; color: var(--text); margin: 0 0 10px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.footer-links a { display: inline-block; padding: 3px 0; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
.footer-legal { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }

@media (max-width: 1000px) {
    .hero-grid, .split-2, .band-head, .footer-top { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .band-head { gap: 12px; }
    .what-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    /* One row: brand + button, then the menu as a row that scrolls sideways (no wrapping). */
    .topnav { margin: 0 -16px; padding: 0 8px 6px; overflow-x: auto; scrollbar-width: none; }
    .topnav::-webkit-scrollbar { display: none; }
    .topnav ul { flex-wrap: nowrap; }
    .hero { padding: 40px 0 56px; }
    .hero .lead { font-size: 17px; }
    .band, .block { padding: 56px 0; }
    .band-head { margin-bottom: 28px; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .what-grid li { grid-template-columns: minmax(0, 1fr); padding: 20px 0; }
    .what-grid p, .what-grid a { grid-column: 1; }
    .account-section { margin-top: 32px; padding-top: 28px; }
}

/* Member top bar: Log in / Sign up, or the logged-in name with a menu (details, no script). */
.account-menu { position: relative; }
.account-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px 0 6px; border: 1px solid var(--border-control); border-radius: 8px;
    background: var(--raised); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; white-space: nowrap; }
.account-chip::-webkit-details-marker { display: none; }
.account-chip::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: translateY(-2px) rotate(45deg); }
.account-chip:hover { border-color: var(--border-strong); }
.account-chip .logo { width: 26px; height: 26px; border-radius: 6px; }
.account-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.account-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 6; min-width: 210px; padding: 6px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--raised); box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.25); display: grid; }
.account-pop a, .account-pop button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--text);
    font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.account-pop a:hover, .account-pop button:hover { background: var(--bg-alt); color: var(--text); }
.account-pop form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--border); }

/* Language picker: a menu in the top bar (details, no script), a plain list in the footer. */
.lang-menu { position: relative; }
.lang-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px; border: 1px solid var(--border-control); border-radius: 8px;
    background: none; color: var(--text); font-size: 14px; cursor: pointer; list-style: none; white-space: nowrap; }
.lang-chip::-webkit-details-marker { display: none; }
.lang-chip::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: translateY(-2px) rotate(45deg); }
.lang-chip:hover { border-color: var(--border-strong); }
.lang-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 6; min-width: 200px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--border); border-radius: 12px;
    background: var(--raised); box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.25); }
.lang-pop a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); font-size: 14px; text-decoration: none; }
.lang-pop a:hover { background: var(--bg-alt); color: var(--text); }
.lang-pop a[aria-current], .footer-langs a[aria-current] { font-weight: 700; }
.footer-langs ul { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 32px 0 0; padding: 0; list-style: none; font-size: 13px; }
.footer-langs a { color: var(--text-muted); }
.footer-langs a[aria-current] { color: var(--text); }
.lang-suggest { border-bottom: 1px solid var(--border); background: var(--bg-alt); font-size: 14px; }
.lang-suggest p { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 10px 0; }
.lang-suggest-dismiss { color: var(--text-muted); }
.lang-note { margin-bottom: 0; }
@media (max-width: 760px) {
    .topbar-actions { gap: 6px; }
    .topbar-actions .button { padding: 0 10px; }
    .account-name { max-width: 96px; }
}

/* Trust card (/trust): header with the server cat, four stat tiles, two panels. */
.trust-head { display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; margin-bottom: 40px; }
.trust-head h1 { margin-bottom: 12px; overflow-wrap: anywhere; }
.trust-head .lead { margin: 0; }
.trust-cat { flex: none; margin: 0; display: grid; justify-items: center; gap: 8px; padding: 16px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--raised); text-align: center; }
.trust-cat img { width: 128px; height: 128px; }
.trust-cat figcaption { font-size: 14px; color: var(--text-muted); max-width: 160px; overflow-wrap: anywhere; }
.trust-cat figcaption strong, .trust-cat figcaption span { display: block; }
.trust-cat figcaption strong { color: var(--text); font-size: 16px; }
.trust-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 16px; }
.trust-tile { display: flex; flex-direction: column; padding: 20px 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--raised); }
.trust-tile dt { font-size: 14px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.trust-tile dd { margin: 0; }
.trust-tile .trust-note { margin-top: 8px; font-size: 14px; color: var(--text-muted); }
.trust-value { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--text); }
.trust-value.trust-none { font-size: 18px; font-weight: 600; letter-spacing: 0; color: var(--text-muted); }
.trust-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.trust-panel h2 { font-size: 20px; margin: 0 0 12px; }
.trust-list { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 8px; }
.trust-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.trust-facts > div { padding: 10px 0; border-top: 1px solid var(--border); }
.trust-facts dt { font-size: 14px; color: var(--text-muted); }
.trust-facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.trust-rules { margin: 0 0 12px; padding-left: 24px; display: grid; gap: 6px; }
.trust-panel .note { margin: 0; }
.trust-foot { margin-top: 32px; }
@media (max-width: 1000px) {
    .trust-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trust-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .trust-head { flex-direction: column; align-items: flex-start; }
    .trust-cat { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; padding: 12px 16px; }
    .trust-cat img { width: 72px; height: 72px; }
    .trust-tiles, .trust-facts { grid-template-columns: minmax(0, 1fr); }
}

/* Plan cards (/pricing, and compact on the home page): side by side, stacked on phones.
   Pro (featured in plans.js) gets a white border and a lighter surface, never a colour. */
.pricing .page-head { max-width: 760px; }
.plan-cards { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan-card { display: flex; flex-direction: column; min-width: 0; padding: 28px 24px 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--raised); }
.plan-card.is-featured { border: 2px solid var(--brand); padding: 27px 23px 23px; background: var(--raised-strong); }
.plan-card-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 16px; }
.plan-card-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0; }
.plan-card-amount { font-size: clamp(2.4rem, 3.6vw, 3rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.plan-card-per { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.plan-card-year { font-size: 13px; color: var(--text-muted); margin: 10px 0 16px; }
/* Polish / Brazilian cards: the real charge under the approximate local amount (pages/pricing.js). */
.plan-card-pay { font-size: 15px; font-weight: 650; color: var(--text); margin: 8px 0 0; }
.plan-card-pay + .plan-card-year { margin-top: 4px; }
.plan-card-for { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 20px; }
.plan-card-perks { list-style: none; flex: 1 0 auto; margin: 0 0 24px; padding: 0; font-size: 15px; }
.plan-card-perks li { padding: 10px 0; border-top: 1px solid var(--border); }
.plan-card.is-featured .plan-card-perks li { border-top-color: var(--border-control); }
.plan-card-actions { display: grid; gap: 8px; }
.plan-card-actions .button { width: 100%; }
.plan-card-gift { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); text-align: center; }
.plan-card-actions .install-note { margin: 4px 0 0; font-size: 13px; text-align: center; }
.plans-note { margin-top: 16px; }
.plan-cards-compact .plan-card { padding: 22px 22px 20px; }
.plan-cards-compact .plan-card.is-featured { padding: 21px 21px 19px; }
.plan-cards-compact .plan-card-name { font-size: 1.25rem; margin-bottom: 12px; }
.plan-cards-compact .plan-card-amount { font-size: 2.25rem; }
.plan-cards-compact .plan-card-for { flex: 1 0 auto; margin: 0; font-size: 15px; font-weight: 400; color: var(--text-muted); }
.pricing-section { margin-top: 80px; }
.pricing-section > h2 { margin-bottom: 20px; }
.pricing-faq { max-width: 760px; }
@media (max-width: 1100px) {
    .plan-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .plan-cards { grid-template-columns: minmax(0, 1fr); }
    .pricing-section { margin-top: 56px; }
}

/* ── Every language (2026-11-05): long translated words and labels ──
   Checked in a browser for all pages × 8 languages × 360–1280px by scripts/site-layout-check.js;
   the key rules are guarded by tests/siteLayoutCss.test.js. */

/* Top bar. shell.js picks when the menu moves to its own row below the brand from the label
   lengths: .topbar-stack-1000 / -1180 / -all. Phones (≤ 760px) always use two rows and keep the
   picker (short code) and one button with its short label. */
.brand, .topbar-actions { flex: none; }
.topbar-actions { align-items: center; }
.topbar-actions .button, .lang-chip, .account-chip { white-space: nowrap; }
.label-short, .lang-chip-short { display: none; }
.topbar-actions .topbar-wide { display: none; }
@media (min-width: 1181px) { .topbar-actions .topbar-wide { display: inline-flex; } }
@media (max-width: 1180px) {
    .lang-chip-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .lang-chip-short { display: inline; font-weight: 600; }
}
.topbar-stack-all .topbar-inner { flex-wrap: wrap; row-gap: 0; padding-top: 8px; }
.topbar-stack-all .topnav { order: 3; flex-basis: 100%; margin: 0 -10px; padding-bottom: 6px; }
.topbar-stack-all .topnav ul { flex-wrap: wrap; }
@media (max-width: 1180px) {
    .topbar-stack-1180 .topbar-inner { flex-wrap: wrap; row-gap: 0; padding-top: 8px; }
    .topbar-stack-1180 .topnav { order: 3; flex-basis: 100%; margin: 0 -10px; padding-bottom: 6px; }
    .topbar-stack-1180 .topnav ul { flex-wrap: wrap; }
}
@media (max-width: 1000px) {
    .topbar-stack-1000 .topbar-inner { flex-wrap: wrap; row-gap: 0; padding-top: 8px; }
    .topbar-stack-1000 .topnav { order: 3; flex-basis: 100%; margin: 0 -10px; padding-bottom: 6px; }
    .topbar-stack-1000 .topnav ul { flex-wrap: wrap; }
}
/* Tablets: a slightly tighter menu so the longest translations stay on one line. */
@media (min-width: 761px) and (max-width: 1000px) { .topbar .topnav a { padding: 0 8px; font-size: 14px; } }
@media (max-width: 760px) {
    /* Phones: the menu is one row that scrolls sideways (as before), whatever the stack class. */
    .topbar .topbar-inner { flex-wrap: wrap; gap: 0 16px; padding-top: 8px; }
    .topbar .topnav { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 8px 6px; overflow-x: auto; scrollbar-width: none; }
    .topbar .topnav ul { flex-wrap: nowrap; }
    .topbar-actions .topbar-more { display: none; }
    .topbar-actions .label-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .topbar-actions .label-short { display: inline; }
    /* The picker's menu opens under the right edge of the bar, never off the screen. */
    .topbar-actions { position: relative; }
    .topbar-actions .lang-menu { position: static; }
}

/* Long compound words (German, Polish, Russian …): hyphenate headings, labels and table cells in
   the translated pages, and let narrow boxes break a word that still does not fit. English keeps
   its look. */
html:not([lang="en"]) :is(h1, h2, h3, .guide-title, .plan-card-name, th, td, dt, .footer-links a, .button, .seg a, .form-field label) { hyphens: auto; hyphenate-limit-chars: 12 5 5; }
.footer-links a, .tag, .summary-rows dt, .summary-rows dd, .seg a, .form-field label, .consent-box label, .ref-list dt, .record-table td, .account-facts dt { overflow-wrap: anywhere; }
.tag { white-space: normal; max-width: 100%; }
.test-pay-note { white-space: normal; }
.consent, .form-stack, .form-field { min-width: 0; }
.ladder-step { grid-template-columns: 96px minmax(0, 1fr) fit-content(45%); }
@media (max-width: 760px) { .ladder-step { grid-template-columns: 80px minmax(0, 1fr); } }

/* ── Phones and touch screens (2026-11-07) ──
   Checked with a touch-phone emulation at 320–414px and 740×360 by scripts/site-layout-check.js
   (tap targets, field text size, fixed bars); the key rules are guarded by tests/siteLayoutCss.test.js. */

/* Mobile browsers: 100vh is the tallest viewport (toolbars hidden); dvh is the visible one. */
body { min-height: 100dvh; }

/* Form fields at 16px: iOS Safari zooms the whole page into any field with smaller text. */
.form-field input, .redeem-row input, .gift-fields input, .gift-fields textarea, .withdraw-name { font-size: 16px; }
.redeem-row input, .gift-fields input { min-height: 44px; }
.withdraw-name { width: 100%; max-width: 480px; min-height: 44px; margin-top: 6px; padding: 8px 12px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--bg-alt); color: var(--text); font-family: var(--sans); }
.withdraw-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* The top bar stays in place on short screens (phones held sideways): two sticky rows would take a
   quarter of the screen. Without a sticky bar, in-page links need no room above their target. */
@media (max-height: 500px) {
    .topbar { position: static; }
}
@media (max-width: 760px), (max-height: 500px) {
    html { scroll-padding-top: 16px; }
    .ref-group, .rule, .cmd-group, .cmd-card { scroll-margin-top: 16px; }
}

/* Tap targets at least 44px high on phones and touch screens (Apple HIG, WCAG 2.5.5). Links that sit
   on their own get the height as padding; where that would move the layout, a negative margin of the
   same size keeps everything where it was. */
@media (max-width: 760px), (pointer: coarse) {
    .topnav a, .topbar-actions .button, .lang-chip, .account-chip { min-height: 44px; }
    .lang-pop a, .account-pop a, .account-pop button { display: flex; align-items: center; min-height: 44px; }
    .footer-links { gap: 0; }
    .footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
    .footer-langs ul { gap: 0 16px; }
    .footer-langs a { display: inline-flex; align-items: center; min-height: 44px; }
    .jump a { min-height: 44px; }
    .cmd-who a { min-height: 44px; }
    .cmd-anchor { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -12px 0; }
    .index a { display: inline-flex; align-items: center; min-height: 44px; }
    .what-grid a { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; margin-top: -4px; margin-bottom: -10px; }
    .trust-rules a, .back-link, .crumbs a, .account-links a, .form-actions > a:not(.button) { display: inline-block; padding: 12px 0; margin-top: -12px; margin-bottom: -12px; }
    .back-link { margin-bottom: 4px; }
    .rule-num { display: inline-block; padding: 8px 0; margin: -8px 0; }
    /* A link alone in a paragraph, note or table cell: a taller hit area, same layout (vertical padding
       on an inline box does not move the lines). */
    p > a:only-child:not(.button), .note > a:only-child, td > a:only-child { padding: 14px 0; }
    /* Account tables scroll sideways inside their box instead of squeezing a column to one letter. */
    .record-table { min-width: 640px; }
    .record-table td { overflow-wrap: normal; }
    .record-table a { white-space: nowrap; }
    .lang-suggest p { padding: 0; }
    .lang-suggest a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Very narrow phones (320px): brand, picker and one button still fit on one row. The account chip
   keeps the avatar; the name stays for screen readers. */
@media (max-width: 374px) {
    .topbar .topbar-inner { column-gap: 8px; }
    .topbar-actions { gap: 4px; }
    .topbar-actions .button { padding: 0 8px; }
    .account-chip .account-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Plan comparison on phones: the feature names stay on screen while the plan columns scroll. */
@media (max-width: 760px) {
    .compare thead th:first-child, .compare tbody th[scope="row"] { position: sticky; left: 0; z-index: 1; width: 42%; min-width: 136px; background: var(--raised); box-shadow: 1px 0 0 var(--border); }
    .compare { min-width: 560px; }
}

/* ── Phone menu (2026-11-13) ──
   Phones (≤ 760px): one bar row with the brand, one button (Add to Discord, Log in or the account
   chip) and ☰. The page links, the language picker and the buttons the bar has no room for move into
   the ☰ panel (shell.js phoneMenu; details, works without script). The bar stays on screen while
   scrolling (one 56px row), except on short screens (phones held sideways), where it scrolls away.
   Wider screens keep the menu in the bar and never show ☰. Guarded by tests/siteLayoutCss.test.js. */
.nav-menu { display: none; }
@media (max-width: 760px) {
    .topbar { position: sticky; }
    .topbar .topbar-inner { flex-wrap: nowrap; min-height: 56px; padding-top: 0; }
    .topbar .topnav, .topbar-actions .lang-menu { display: none; }
    .topbar-actions { position: static; }
    .nav-menu { display: block; }
    html { scroll-padding-top: 72px; }
    .ref-group, .rule, .cmd-group, .cmd-card { scroll-margin-top: 72px; }
}
@media (max-width: 760px) and (max-height: 500px) {
    .topbar { position: relative; }
    html { scroll-padding-top: 16px; }
    .ref-group, .rule, .cmd-group, .cmd-card { scroll-margin-top: 16px; }
}
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border-control); border-radius: 8px;
    color: var(--text); cursor: pointer; list-style: none; }
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle:hover { border-color: var(--border-strong); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Three lines; an ✕ while open. */
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; border-radius: 1px; background: currentColor; }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-menu[open] .nav-toggle { background: var(--raised); }
.nav-menu[open] .nav-toggle-bars { background: transparent; }
.nav-menu[open] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-menu[open] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }
/* The panel: the full width under the bar; scrolls inside itself when taller than the screen. */
.nav-pop { position: absolute; left: 0; right: 0; top: 100%; z-index: 6; max-height: calc(100dvh - 56px); overflow-y: auto; overscroll-behavior: contain;
    padding: 12px 16px 20px; border-bottom: 1px solid var(--border); background: var(--raised); box-shadow: 0 16px 32px -16px rgb(0 0 0 / 0.5); }
.nav-pop-account { display: flex; gap: 8px; margin-bottom: 8px; }
.nav-pop-account .button { flex: 1 1 0; min-width: 0; }
.nav-pop-links { list-style: none; margin: 0; padding: 0; }
.nav-pop-links + .nav-pop-links, .nav-pop-account + .nav-pop-links { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.nav-pop-links a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 8px; color: var(--text); font-size: 16px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.nav-pop-links a:hover { background: var(--bg-alt); }
.nav-pop-links a[aria-current="page"] { background: var(--bg-alt); box-shadow: inset 3px 0 0 var(--accent); }
.nav-pop-title { margin: 12px 0 4px; padding: 12px 12px 0; border-top: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--text-muted); }
.nav-pop-langs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; }
.nav-pop-langs a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--text-muted); font-size: 15px; text-decoration: none; }
.nav-pop-langs a:hover { background: var(--bg-alt); color: var(--text); }
.nav-pop-langs a[aria-current] { color: var(--text); font-weight: 700; background: var(--bg-alt); }
