/* Larpcord's document pages (Terms, Privacy, Legal) and the 404 page: near-black, quiet, readable. */
:root {
    --bg: #08080a;
    --surface: #101114;
    --border: rgba(255, 255, 255, .08);
    --text: #f2f3f5;
    --body: #c4c7ce;
    --muted: #8a8f99;
    --blurple: #5865f2;
    --blurple-soft: #8c95f8;
    --font-display: "Satoshi", "Geist", system-ui, sans-serif;
    --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--body); font-family: var(--font-body); font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: var(--blurple-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- top bar ------------------------------------------------------------------------------------------ */
.doc-bar { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border); background: rgba(8, 8, 10, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.doc-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px; margin: 0 auto; padding: 14px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.doc-links { display: flex; gap: 6px; }
.doc-links a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500; }
.doc-links a:hover { color: var(--text); text-decoration: none; }
.doc-links a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .06); }

/* ---- the document --------------------------------------------------------------------------------------- */
.doc { flex: 1 0 auto; width: 100%; max-width: 780px; margin: 0 auto; padding: 64px 40px 96px; }
.doc-head { margin-bottom: 48px; }
.doc-kicker { margin: 0 0 14px; color: var(--blurple-soft); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.doc-head h1 { margin: 0; color: var(--text); font-family: var(--font-display); font-size: clamp(40px, 5vw, 60px); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.doc-lead { margin: 28px 0 0; padding: 20px 22px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--body); font-size: 15.5px; }

.toc { position: sticky; top: 96px; align-self: start; }
.toc p { margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; border-left: 1px solid var(--border); }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); font-size: 14px; line-height: 1.45; }
.toc a::before { content: counter(toc) ". "; color: #5c606b; }
.toc a:hover { color: var(--text); border-left-color: var(--blurple); text-decoration: none; }

.doc-body { counter-reset: section; }
.doc-body section { counter-increment: section; padding-top: 8px; }
.doc-body section + section { margin-top: 40px; }
.doc-body h2 { margin: 0 0 14px; color: var(--text); font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.doc-body h2::before { content: counter(section) ". "; color: var(--blurple-soft); }
.doc-body h3 { margin: 26px 0 8px; color: var(--text); font-size: 16.5px; font-weight: 600; }
.doc-body p { margin: 0 0 14px; }
.doc-body ul { margin: 0 0 14px; padding-left: 22px; }
.doc-body li { margin: 6px 0; }
.doc-body li::marker { color: #5c606b; }
.doc-body strong { color: var(--text); font-weight: 600; }
.doc-body code { padding: 2px 6px; border-radius: 6px; background: var(--surface); color: var(--text); font-family: "Geist Mono", ui-monospace, monospace; font-size: .86em; }
.callout { margin: 0 0 16px; padding: 16px 18px; border-radius: 10px; border: 1px solid rgba(88, 101, 242, .3); background: rgba(88, 101, 242, .07); }
.callout p:last-child { margin-bottom: 0; }
.doc-body table { width: 100%; margin: 0 0 16px; border-collapse: collapse; font-size: 14.5px; }
.doc-body th, .doc-body td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.doc-body th { color: var(--text); font-weight: 600; }

/* ---- footer ------------------------------------------------------------------------------------------- */
.doc-footer { border-top: 1px solid var(--border); }
.doc-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; max-width: 1120px; margin: 0 auto; padding: 28px 24px 40px; color: #5f6472; font-size: 13px; }
.doc-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.doc-footer nav a { color: var(--muted); font-size: 14px; }

/* ---- 404 ---------------------------------------------------------------------------------------------- */
.lost { flex: 1 0 auto; display: grid; place-items: center; padding: 120px 24px; }
.lost-inner { width: 100%; max-width: 520px; }
.lost-code { margin: 0 0 20px; color: var(--blurple-soft); font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; font-weight: 500; letter-spacing: .06em; }
.lost h1 { margin: 0 0 14px; color: var(--text); font-family: var(--font-display); font-size: clamp(34px, 5vw, 48px); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; }
.lost p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.lost-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.lost-links { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
.lost-links p { margin-bottom: 10px; font-size: 13px; }
.lost-links ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; border: .8px solid transparent; font-size: 15px; font-weight: 600; letter-spacing: -.3px; }
.btn:hover { text-decoration: none; }
.btn-white { background: #fff; color: #0a0a0c; }
.btn-white:hover { background: #e9ebf0; }
.btn-dark { background: #1a1b26; border-color: #393d5c; color: #fff; }
.btn-dark:hover { background: #22243a; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (max-width: 560px) {
    .doc-links a:not([aria-current="page"]) { display: none; }
    .doc-body table, .doc-body thead, .doc-body tbody, .doc-body tr, .doc-body th, .doc-body td { display: block; }
    .doc-body thead { display: none; }
    .doc-body td { padding: 4px 0; border: none; }
    .doc-body tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
}

/* ---- docs layout: a big sidebar with the documents and this page's contents ------------------------- */
body.docs { display: block; }
.side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 20; width: 300px;
    display: flex; flex-direction: column; border-right: 1px solid var(--border); background: #0b0b0e;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 22px 24px 18px; color: var(--text); font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.side-brand:hover { text-decoration: none; }
.side-brand img { width: 30px; height: 30px; }
.side-tag { padding: 2px 8px; border-radius: 6px; background: rgba(88, 101, 242, .18); color: var(--blurple-soft); font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.side-scroll { flex: 1 1 auto; overflow-y: auto; padding: 6px 14px 20px; }
.side-group + .side-group { margin-top: 26px; }
.side-label { margin: 0 0 8px; padding: 0 12px; color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #b8bcc6; font-size: 15.5px; font-weight: 500; }
.side-link svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--muted); }
.side-link:hover { background: rgba(255, 255, 255, .04); color: var(--text); text-decoration: none; }
.side-link.active { background: rgba(255, 255, 255, .07); color: var(--text); }
.side-link.active svg { color: var(--blurple-soft); }
.side-toc { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.side-toc li { counter-increment: toc; }
.side-toc a { display: flex; gap: 10px; padding: 8px 12px; border-radius: 8px; color: #9da2ad; font-size: 15px; line-height: 1.4; }
.side-toc a::before { content: counter(toc); flex: 0 0 22px; color: #5c606b; font-variant-numeric: tabular-nums; }
.side-toc a:hover { background: rgba(255, 255, 255, .04); color: var(--text); text-decoration: none; }
.side-toc a.current { background: rgba(88, 101, 242, .12); color: var(--text); }
.side-toc a.current::before { color: var(--blurple-soft); }
.side-back { display: flex; align-items: center; gap: 10px; margin: 0 14px 16px; padding: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 500; }
.side-back svg { width: 17px; height: 17px; }
.side-back:hover { color: var(--text); text-decoration: none; }

.docs-main { min-height: 100vh; margin-left: 300px; display: flex; flex-direction: column; }
.docs-bar {
    position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    height: 64px; padding: 0 32px; border-bottom: 1px solid var(--border); background: rgba(8, 8, 10, .82);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.docs-crumb { color: var(--muted); font-size: 14px; }
.docs-crumb b { color: var(--text); font-weight: 500; }
.docs-bar-links { display: flex; align-items: center; gap: 6px; }
.docs-bar-links a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500; }
.docs-bar-links a:hover { color: var(--text); text-decoration: none; }
.docs-bar-links .docs-download { background: var(--blurple); color: #fff; }
.docs-bar-links .docs-download:hover { background: #4752c4; color: #fff; }
.docs-main .doc-footer-inner { max-width: none; padding-left: 40px; padding-right: 40px; }

@media (max-width: 960px) {
    .side { position: static; width: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .side-scroll { overflow: visible; padding-bottom: 8px; }
    .side-back { display: none; }
    .docs-main { margin-left: 0; min-height: 0; }
    .docs-bar { padding: 0 20px; }
    .doc { padding: 40px 20px 72px; }
    .docs-main .doc-footer-inner { padding-left: 20px; padding-right: 20px; }
}
