/* fish — "deep water": near-black with a cold tint, hairlines instead of boxes, one red accent from the tie. */
:root {
  --bg: #090b0e;
  --bg-2: #0d1014;
  --panel: #11151a;
  --panel-2: #161b21;
  --line: rgba(220, 235, 250, 0.075);
  --line-2: rgba(220, 235, 250, 0.14);
  --text: #e6ecf1;
  --muted: #8b97a3;
  --faint: #5b6773;
  --accent: #7cc4ea;
  --accent-soft: rgba(124, 196, 234, 0.1);
  --ok: #4cc38a;
  --warn: #e9b44c;
  --danger: #e5484d;
  --radius: 12px;
  --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f8;
    --bg-2: #eef0f2;
    --panel: #ffffff;
    --panel-2: #f3f5f7;
    --line: rgba(10, 20, 30, 0.08);
    --line-2: rgba(10, 20, 30, 0.16);
    --text: #0e1418;
    --muted: #55606b;
    --faint: #8a949e;
    --accent: #1f6f9e;
    --accent-soft: rgba(31, 111, 158, 0.08);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
code, kbd { font-family: var(--mono); }

.i { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.i.xs { width: 13px; height: 13px; }
.i.ok { color: var(--ok); }
.i.lg { width: 20px; height: 20px; }
.i.xl { width: 28px; height: 28px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: 60px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -0.03em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; display: block; }
.topnav { display: flex; gap: 2px; }
.topnav a { padding: 6px 11px; border-radius: 99px; color: var(--muted); font-size: 14px; transition: color .15s, background .15s; }
.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--text); background: var(--panel-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--panel-2); object-fit: cover; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 99px;
  border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-weight: 500; font-size: 14px;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--panel-2); border-color: var(--line-2); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: color-mix(in srgb, var(--text) 86%, var(--bg)); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn:focus-visible, .input:focus-visible, .side-link:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.input, select.input, textarea.input {
  width: 100%; min-height: 38px; padding: 8px 11px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; outline: none;
  transition: border-color .15s;
}
.input:focus { border-color: var(--accent); }
textarea.input { min-height: 96px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
.input[type="color"] { padding: 3px; height: 38px; width: 56px; }

.switch { position: relative; display: inline-block; vertical-align: middle; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); cursor: pointer; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); background: #061018; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- landing ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.label, .eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--muted); text-transform: lowercase; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.center { text-align: center; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; }

/* hero: one sentence, two buttons, the real numbers */
.hero { position: relative; overflow: hidden; padding: 128px 0 112px; text-align: center; }
.hero-water { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.hero-water::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='120' viewBox='0 0 600 120'%3E%3Cg fill='none' stroke='%237cc4ea' stroke-opacity='.12'%3E%3Cpath d='M0 40 C100 20 200 60 300 40 S500 20 600 40'/%3E%3Cpath d='M0 70 C100 50 200 90 300 70 S500 50 600 70'/%3E%3Cpath d='M0 100 C100 80 200 120 300 100 S500 80 600 100'/%3E%3C/g%3E%3C/svg%3E") repeat-x bottom / 600px 120px; }
.hero-inner { position: relative; display: grid; justify-items: center; }
.status-pill { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel) 70%, transparent); font-size: 13px; color: var(--muted); }
.status-pill:hover { color: var(--text); }
.hero h1 { font-size: clamp(44px, 7vw, 84px); letter-spacing: -0.05em; font-weight: 600; margin: 26px 0 20px; line-height: 1; max-width: 900px; }
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--accent); }
.hero p { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0; }
.hero-actions { display: flex; gap: 10px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
.hero-count { margin-top: 30px !important; font-size: 15px !important; color: var(--faint) !important; }
.hero-count b { color: var(--text); font-weight: 600; }

/* section headings: a small icon, a plain title, one line */
.section-head { display: grid; justify-items: center; text-align: center; margin-bottom: 40px; }
.badge-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--accent); }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.04em; margin: 18px 0 10px; max-width: 720px; }
.section-head p { margin: 0; color: var(--muted); font-size: 16px; max-width: 560px; }

/* platforms: slowly drifting cards in each platform's colour */
.platforms { padding: 72px 0 40px; }
.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: drift 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.reverse .marquee-track { animation-direction: reverse; }
@keyframes drift { to { transform: translateX(calc(-50% - 7px)); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } .marquee { overflow-x: auto; } }
.plat-card { display: grid; gap: 6px; align-content: start; width: 250px; flex: none; padding: 20px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--c) 22%, var(--line));
  background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 60%), var(--panel); }
.plat-card .i { width: 26px; height: 26px; color: var(--c); margin-bottom: 8px; }
.plat-card b { font-size: 16px; }
.plat-card > span { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* features: words on one side, a Discord message on the other */
.features { display: grid; gap: 120px; padding: 96px 28px 64px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature.flip .feature-copy { order: 2; }
.feature-copy h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.04em; margin: 18px 0 12px; }
.feature-copy p { margin: 0; color: var(--muted); font-size: 16px; }
.feature-copy ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.feature-copy li { position: relative; padding-left: 20px; font-size: 14.5px; color: var(--text); }
.feature-copy li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--accent); }
.cmd-chip { display: inline-block; margin-top: 22px; font-size: 13px; padding: 6px 11px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line-2); color: var(--text); }
.feature-pic { min-width: 0; }

/* Discord, in Discord's own colours */
.dc-window { border-radius: 14px; overflow: hidden; background: #313338; color: #dbdee1; font-size: 14px; border: 1px solid rgba(255, 255, 255, .06); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.dc-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(0, 0, 0, .28); font-weight: 600; color: #f2f3f5; font-size: 14.5px; }
.dc-bar span { color: #80848e; font-size: 20px; font-weight: 400; line-height: 1; }
.dc-body { display: grid; gap: 14px; padding: 16px 16px 20px; }
.dc-msg { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.dc-av { width: 40px; height: 40px; border-radius: 50%; }
.dc-main { display: grid; gap: 4px; min-width: 0; }
.dc-head { display: flex; align-items: center; gap: 6px; }
.dc-head b { color: #f2f3f5; font-weight: 600; }
.dc-app { font-size: 10px; font-weight: 600; padding: 0 5px; border-radius: 4px; background: #5865f2; color: #fff; line-height: 16px; }
.dc-time { font-size: 12px; color: #949ba4; margin-left: 2px; }
.dc-text { line-height: 1.4; }
.dc-text b { color: #f2f3f5; }
.dc-link { color: #00a8fc; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-ping, .dc-mention { color: #c9cdfb; background: rgba(88, 101, 242, .3); border-radius: 3px; padding: 0 2px; }
.dc-mention { justify-self: start; }
.dc-role { color: #7cc4ea; background: rgba(124, 196, 234, .14); border-radius: 3px; padding: 0 2px; }
.dc-embed { display: grid; grid-template-columns: 1fr auto; gap: 14px; max-width: 460px; padding: 10px 14px 14px; border-radius: 4px; border-left: 4px solid var(--c); background: #2b2d31; }
.dc-embed-main { display: grid; gap: 6px; min-width: 0; }
.dc-author { font-size: 13px; font-weight: 600; color: #f2f3f5; }
.dc-title { font-weight: 600; color: #f2f3f5; }
.dc-desc { font-size: 14px; line-height: 1.45; }
.dc-desc b { color: #f2f3f5; }
.dc-fields { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 28px; margin-top: 2px; }
.dc-fields b { display: block; font-size: 13px; color: #f2f3f5; }
.dc-fields span { font-size: 13.5px; }
.dc-footer { font-size: 12px; color: #b5bac1; }
.dc-thumb { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; }
.dc-body .sp-card { max-width: 420px; }

.sp-card { border-radius: 12px; overflow: hidden; background: #4a4a4a; color: #fff; font-size: 12px; }
.sp-head { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 12px 6px; background: #555; }
.sp-head img { border-radius: 6px; object-fit: cover; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.sp-title { display: grid; gap: 2px; min-width: 0; }
.sp-title b { font-size: 15px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.sp-title span { color: rgba(255, 255, 255, .7); font-size: 12.5px; }
.sp-logo { align-self: start; width: 18px; height: 18px; background-color: #fff; }
.sp-controls { display: flex; align-items: center; justify-content: space-between; padding: 4px 12px 12px; background: #555; }
.sp-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .45); }
.sp-buttons { display: inline-flex; align-items: center; gap: 12px; }
.sp-buttons > .i { width: 14px; height: 14px; background-color: #fff; }
.sp-play { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; }
.sp-play .i { width: 13px; height: 13px; margin-left: 2px; background-color: #000; }
.sp-tracks { list-style: none; margin: 0; padding: 4px 0; }
.sp-tracks li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 6px 12px; }
.sp-n, .sp-d { color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.sp-t { display: grid; min-width: 0; }
.sp-t b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-t span { display: flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, .65); font-size: 11px; white-space: nowrap; overflow: hidden; }
.sp-t i { font-style: normal; font-size: 8.5px; font-weight: 700; padding: 0 3px; border-radius: 2px; background: rgba(255, 255, 255, .25); color: #ddd; }

/* everything else */
.extras { padding: 72px 0 24px; }
.chips-row { margin-bottom: 12px; }
.chips-row .marquee-track { gap: 10px; animation-duration: 70s; }
.x-chip { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 9px 15px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); font-size: 14px; color: var(--muted); }
.x-chip .i { color: var(--accent); }
.text-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 26px; color: var(--accent); font-size: 15px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* the closing invitation */
.cta { position: relative; overflow: hidden; margin: 72px 0 96px; padding: 80px 32px; border-radius: 26px; text-align: center; border: 1px solid var(--line-2);
  background: radial-gradient(70% 90% at 50% 120%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%), radial-gradient(50% 70% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--panel); }
.cta h2 { font-size: clamp(32px, 5vw, 54px); letter-spacing: -0.045em; }
.cta p { margin: 14px 0 0; color: var(--muted); font-size: 17px; }

.link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.link:hover { color: var(--text); }

/* ---- legal pages ---- */
.legal { padding-bottom: 96px; }
.legal-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); max-width: 760px; }
.legal-head h1 { font-size: clamp(36px, 5vw, 54px); letter-spacing: -0.045em; margin: 14px 0 10px; }
.legal-date { margin: 0 0 18px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.legal-intro { margin: 0; font-size: 17px; line-height: 1.6; color: var(--muted); }
.legal-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding-top: 40px; }
.legal-toc { position: sticky; top: 84px; align-self: start; display: grid; gap: 2px; max-height: calc(100vh - 110px); overflow-y: auto; }
.legal-toc .label { margin-bottom: 10px; }
.legal-toc a { display: grid; grid-template-columns: 26px 1fr; padding: 6px 8px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: 13.5px; line-height: 1.35; }
.legal-toc a span { font-family: var(--mono); font-size: 11px; color: var(--faint); padding-top: 2px; }
.legal-toc a:hover { color: var(--text); background: var(--panel); }
.legal-toc .legal-other { display: block; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); border-radius: 0; color: var(--accent); }
.legal-article { max-width: 760px; }
.legal-article section { padding: 6px 0 30px; scroll-margin-top: 84px; }
.legal-article section + section { border-top: 1px solid var(--line); padding-top: 30px; }
.legal-article h2 { display: flex; gap: 14px; align-items: baseline; font-size: 22px; letter-spacing: -0.02em; margin-bottom: 14px; }
.legal-article h2 span { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--faint); letter-spacing: 0; }
.legal-article p, .legal-article li { color: var(--muted); font-size: 15px; line-height: 1.7; }
.legal-article p { margin: 0 0 12px; }
.legal-article ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.legal-article b { color: var(--text); font-weight: 600; }
.legal-article a { color: var(--accent); }
.legal-article code { font-size: 12.5px; padding: 1px 6px; border-radius: 5px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.legal-table { overflow-x: auto; margin: 14px 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.legal-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--faint); background: var(--bg-2); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.legal-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); line-height: 1.55; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table td:first-child { color: var(--text); font-weight: 500; width: 28%; }
.legal-table .tag { margin-top: 4px; font-size: 10px; }

footer.foot { border-top: 1px solid var(--line); padding: 34px 0 40px; color: var(--faint); font-size: 14px; }
.foot-inner { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.foot-brand { display: inline-flex; gap: 10px; align-items: center; }
.foot-brand b { color: var(--text); font-weight: 600; }
.foot-brand img { border-radius: 6px; }
.foot-links { display: flex; gap: 22px; }
.foot-links a:hover { color: var(--text); }

/* ---------- commands page ---------- */
.page-head { padding: 52px 0 24px; display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 36px; letter-spacing: -0.035em; }
.page-head p { color: var(--muted); margin: 6px 0 0; }
.search { position: relative; width: min(340px, 100%); }
.search .i { position: absolute; left: 12px; top: 11px; color: var(--faint); }
.search .input { padding-left: 36px; border-radius: 99px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 10px 0; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; font-size: 13.5px; }
.chip:hover { color: var(--text); }
.chip.active { color: var(--text); border-bottom-color: var(--accent); }
.cmd-list { display: grid; padding-bottom: 72px; }
.cmd { padding: 16px 0; border-bottom: 1px solid var(--line); }
.cmd-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmd code, code.k { font-size: 12.5px; background: var(--panel); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; }
.cmd .desc { color: var(--muted); font-size: 14px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.subs { margin-top: 10px; display: grid; gap: 4px; padding-left: 14px; border-left: 1px solid var(--line-2); }
.subs div { font-size: 13px; color: var(--muted); }

/* ---------- server picker ---------- */
.servers { padding-bottom: 80px; }
.servers-sub { font-size: 15px; color: var(--muted); font-weight: 500; margin: 40px 0 14px; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.server-card { position: relative; display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); transition: border-color .15s, transform .15s; }
a.server-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.server-banner { height: 84px; background: var(--img, none) center / cover, linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--panel)), var(--panel-2)); filter: blur(18px) saturate(1.2); transform: scale(1.3); opacity: .55; }
.server-body { position: relative; display: flex; align-items: center; gap: 14px; padding: 0 16px 16px; margin-top: -26px; }
.server-body > .i { color: var(--faint); }
.server-name { flex: 1; min-width: 0; padding-top: 22px; }
.server-name h3 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-name span { font-size: 12.5px; color: var(--faint); }
.server-card.off .guild-icon { filter: grayscale(.7); opacity: .8; }
.server-card .btn { position: absolute; top: 12px; right: 12px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); }
.guild-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--panel-2); border: 3px solid var(--panel); display: grid; place-items: center; font-weight: 600; font-size: 15px; color: var(--muted); object-fit: cover; flex: none; }

/* ---------- guild dashboard ---------- */
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 60px); }
.sidebar { border-right: 1px solid var(--line); padding: 18px 12px 40px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.side-back { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; margin-bottom: 10px; font-size: 13px; color: var(--faint); }
.side-back:hover { color: var(--text); }
.side-guild { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.side-guild img, .side-guild .guild-icon { width: 36px; height: 36px; border-radius: 11px; font-size: 12px; border: 0; }
.side-guild b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.side-guild span { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.side-label { font-family: var(--mono); font-size: 11px; color: var(--faint); padding: 16px 10px 6px; text-transform: lowercase; }
.side-link { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.side-link:hover { color: var(--text); background: var(--panel); }
.side-link.active { color: var(--text); background: var(--panel); }
.side-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--accent); }
.content { padding: 32px 40px 120px; max-width: 1040px; width: 100%; }
.content-head { margin-bottom: 26px; }
.content-head h1 { font-size: 30px; letter-spacing: -0.035em; }
.content-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.card { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; background: var(--panel); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; letter-spacing: -0.01em; }
.card-head h2 .i { color: var(--faint); }
.card-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.card-body { padding: 18px; display: grid; gap: 18px; }
.feature-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.field label.lbl { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; }
.field .hint { color: var(--faint); font-size: 12px; margin-top: 5px; }
.row-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.row-toggle .lbl { margin: 0; }
.row-toggle .hint { margin-top: 2px; }

.multi { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; min-height: 38px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 9px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.pill i.sw { width: 9px; height: 9px; border-radius: 50%; }
.pill button { border: 0; background: none; cursor: pointer; color: var(--faint); display: grid; place-items: center; padding: 0; }
.pill button:hover { color: var(--danger); }
.multi select { border: 0; background: transparent; outline: none; flex: 1; min-width: 140px; color: var(--muted); }

.list-row { display: grid; gap: 10px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.list-row .row-actions { display: flex; justify-content: flex-end; }
.empty { text-align: center; color: var(--faint); padding: 26px 10px; font-size: 14px; }
.empty .i { width: 24px; height: 24px; display: block; margin: 0 auto 10px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--faint); font-weight: 400; font-family: var(--mono); font-size: 11px; text-transform: lowercase; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .input { min-height: 32px; padding: 4px 9px; }
.tbl-wrap { overflow-x: auto; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.kpi { padding: 18px 20px; border-left: 1px solid var(--line); display: block; }
.kpi:first-child { border-left: 0; }
.kpi .feature-icon { display: none; }
.kpi b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.kpi span { color: var(--faint); font-size: 12px; font-family: var(--mono); }
.module-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; margin: -6px 0; }
.module-row { display: grid; grid-template-columns: 8px auto 1fr auto; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 14px; border-radius: 6px; }
.module-row:hover { background: var(--panel-2); }
.module-row b { font-weight: 500; }
.module-row .module-text { color: var(--faint); font-size: 13px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.module-row .i { color: var(--faint); }
.status-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.state { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.state.on { background: var(--ok); }
.facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.facts span { display: block; font-size: 12.5px; color: var(--faint); }
.facts b { font-size: 18px; font-weight: 600; }
.badge { font-family: var(--mono); font-size: 11px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--faint); }
.badge.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }

/* embed preview (Discord colours on purpose) */
.preview { background: #313338; border-radius: 8px; padding: 14px 16px; color: #dbdee1; font-size: 14px; }
.preview .pv-content { white-space: pre-wrap; margin-bottom: 6px; }
.preview code { background: #1e1f22; padding: 1px 4px; border-radius: 4px; font-size: 85%; }
.pv-embed { display: grid; grid-template-columns: 1fr auto; gap: 10px; max-width: 520px; background: #2b2d31; border-left: 4px solid var(--accent); border-radius: 4px; padding: 10px 14px 14px; }
.pv-embed .pv-author { font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.pv-embed .pv-author img { width: 22px; height: 22px; border-radius: 50%; }
.pv-embed .pv-title { font-weight: 700; color: #fff; margin-top: 4px; }
.pv-embed .pv-desc { white-space: pre-wrap; margin-top: 4px; }
.pv-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.pv-fields div.full { grid-column: 1 / -1; }
.pv-fields b { display: block; font-size: 13px; color: #fff; }
.pv-embed .pv-img { max-width: 100%; border-radius: 6px; margin-top: 10px; grid-column: 1 / -1; }
.pv-embed .pv-thumb { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; }
.pv-footer { font-size: 12px; color: #b5bac1; margin-top: 8px; grid-column: 1 / -1; }
.pv-buttons { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pv-buttons span { background: #4e5058; color: #fff; padding: 6px 14px; border-radius: 4px; font-size: 13px; font-weight: 500; }

/* bot profile preview — Discord's profile popout */
.pf-card { width: 100%; max-width: 340px; margin: 0 auto; background: #232428; border-radius: 10px; overflow: hidden; color: #dbdee1; position: relative; }
.pf-banner { height: 120px; background: #0e4f7a center / cover; }
.pf-avatar { position: absolute; top: 72px; left: 16px; width: 88px; height: 88px; border-radius: 50%; border: 6px solid #232428; object-fit: cover; background: #232428; }
.pf-body { padding: 52px 16px 16px; }
.pf-name { font-size: 20px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 6px; }
.pf-bot { font-size: 10px; font-weight: 700; background: #5865f2; color: #fff; padding: 1px 5px; border-radius: 4px; }
.pf-user { font-size: 14px; color: #b5bac1; }
.pf-section { margin-top: 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #b5bac1; }
.pf-bio { margin-top: 4px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.btn input[type="file"] { display: none; }

.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.icon-tile { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; background: #313338; font-size: 12px; color: #dbdee1; min-width: 0; }
.icon-tile span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11px; }

/* save bar */
.savebar {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 160%); z-index: 30;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px;
  background: var(--text); color: var(--bg); border-radius: 99px;
  transition: transform .2s ease; width: min(560px, calc(100% - 32px));
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.savebar.show { transform: translate(-50%, 0); }
.savebar span { flex: 1; font-weight: 500; font-size: 14px; }
.savebar .btn.ghost { color: color-mix(in srgb, var(--bg) 70%, var(--text)); }
.savebar .btn.ghost:hover { background: transparent; color: var(--bg); }
.savebar .btn.primary { background: var(--bg); color: var(--text); border-color: var(--bg); }

.toast-stack { position: fixed; right: 18px; top: 72px; z-index: 40; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 14px; animation: slide .18s ease; max-width: 360px; }
.toast.ok .i { color: var(--ok); }
.toast.err .i { color: var(--danger); }
@keyframes slide { from { opacity: 0; transform: translateY(-4px); } }

.loading { display: grid; place-items: center; padding: 120px 0; color: var(--muted); gap: 12px; text-align: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--text); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mobile-nav { display: none; }

@media (max-width: 960px) {
  .hero { padding: 96px 0 80px; }
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip .feature-copy { order: 0; }
  .features { gap: 88px; }
  .legal-body { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc { position: static; max-height: none; grid-template-columns: 1fr 1fr; }
  .legal-toc .label, .legal-toc .legal-other { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(3) { border-left: 0; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: block; margin-bottom: 16px; }
  .content { padding: 22px 16px 120px; }
}
@media (max-width: 640px) {
  body { overflow-x: hidden; }
  .topbar { padding: 0 16px; gap: 12px; }
  .topnav a[data-nav="home"] { display: none; }
  .brand > span { display: none; }
  .topnav a { padding: 6px 8px; }
  .topbar-right { gap: 6px; }
  .hide-sm { display: none; }
  .wrap { padding: 0 16px; }
  .grid-2, .grid-3, .module-list { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .pv-fields { grid-template-columns: 1fr; }
  .features { padding: 64px 16px 40px; }
  .hero { padding: 72px 0 64px; }
  .cta { padding: 56px 20px; margin: 48px 0 64px; }
  .plat-card { width: 220px; }
  .dc-fields { grid-template-columns: 1fr 1fr; }
  .legal-toc { grid-template-columns: 1fr; }
  .legal-head { padding-top: 48px; }
  .legal-table td:first-child { width: auto; }
}
