/* EpicBots - shared styles of every page.
   Dark first, quiet blue-tinted neutrals, one cobalt accent, Geist type,
   hairline borders. Status colours only where something needs attention;
   trivia adds a warm amber for points and medals. */
:root {
  --bg: #0a0c10;
  --surface: #111419;
  --raised: #161a21;
  --sunken: #07090c;
  --line: #222732;
  --line-2: #2d3341;
  --fg: #eceff4;
  --muted: #8a93a6;
  --faint: #5c6476;
  --accent: #5b82ff;
  --accent-2: #8aa6ff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(91, 130, 255, .12);
  --gold: #f2c14e;
  --silver: #b9c2d3;
  --bronze: #d4915c;
  --nick: #f3b16b;
  --ok: #3ccf8e;
  --warn: #f2b84b;
  --bad: #ff6b6b;
  --chart-a: #5b82ff;
  --chart-b: #f2b84b;
  --chart-c: #3a4253;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -12px rgba(0,0,0,.6);
  --grid: rgba(255,255,255,.035);
  --display: "Geist", "Segoe UI", system-ui, sans-serif;
  --body: "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 12px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f8fa; --surface: #ffffff; --raised: #ffffff; --sunken: #eef1f5; --line: #e4e7ec; --line-2: #d5dae2;
    --fg: #0d1117; --muted: #5a6475; --faint: #8a93a3; --accent: #2b5bf5; --accent-2: #2b5bf5; --accent-ink: #ffffff;
    --accent-soft: rgba(43, 91, 245, .08); --gold: #b98a12; --silver: #7d8799; --bronze: #a8622c;
    --nick: #b45f06; --ok: #12915a; --warn: #b7791f; --bad: #d93b3b;
    --chart-a: #2b5bf5; --chart-b: #e09b2d; --chart-c: #cfd5de;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -12px rgba(16,24,40,.12); --grid: rgba(13,17,23,.045);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f7f8fa; --surface: #ffffff; --raised: #ffffff; --sunken: #eef1f5; --line: #e4e7ec; --line-2: #d5dae2;
  --fg: #0d1117; --muted: #5a6475; --faint: #8a93a3; --accent: #2b5bf5; --accent-2: #2b5bf5; --accent-ink: #ffffff;
  --accent-soft: rgba(43, 91, 245, .08); --gold: #b98a12; --silver: #7d8799; --bronze: #a8622c;
  --nick: #b45f06; --ok: #12915a; --warn: #b7791f; --bad: #d93b3b;
  --chart-a: #2b5bf5; --chart-b: #e09b2d; --chart-c: #cfd5de;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -12px rgba(16,24,40,.12); --grid: rgba(13,17,23,.045);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
code, kbd, .mono { font-family: var(--mono); font-size: .875em; }
code { color: var(--fg); }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; background: var(--raised); font-size: .8em; }
img, svg { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 640px) { .wrap { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); } }
::selection { background: var(--accent); color: var(--accent-ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.14em; flex: none; }

/* --- top bar --- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { font: 600 1.05rem/1 var(--display); color: var(--fg); display: flex; align-items: center; gap: 10px; white-space: nowrap; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .hash { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 600 .9rem var(--mono); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 4px 14px -4px var(--accent); }
.pages { display: flex; gap: 2px; min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: none; }
.pages::-webkit-scrollbar { display: none; }
.pages a { font: 500 .88rem var(--body); color: var(--muted); padding: 7px 12px; border-radius: 8px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.pages a:hover { color: var(--fg); background: var(--raised); text-decoration: none; }
.pages a[aria-current="page"] { color: var(--fg); background: var(--raised); box-shadow: 0 0 0 1px var(--line) inset; }
.pages a .ico { color: var(--faint); }
.pages a[aria-current="page"] .ico { color: var(--accent-2); }
.livepill { font: 500 .76rem var(--mono); color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.livepill:hover { text-decoration: none; color: var(--fg); }
.iconbtn { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 8px; height: 32px; min-width: 32px; padding: 0 10px; cursor: pointer; font: 500 .76rem var(--body); display: inline-grid; place-items: center; }
.iconbtn:hover { color: var(--fg); border-color: var(--line-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); animation: pulse 2.4s ease-in-out infinite; }
.dot.off { background: var(--bad); }
.dot.warn { background: var(--warn); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 6%, transparent); } }
@media (max-width: 1000px) { .livepill { display: none; } }
@media (max-width: 720px) { .top .cta { display: none; } .pages a .lbl-long { display: none; } }
@media (max-width: 520px) { .pages a .ico { display: none; } .pages a { padding: 7px 9px; } .brand .word { display: none; } }

/* section sub-navigation (inside a page) */
.subnav { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: calc(62px + env(safe-area-inset-top, 0px)); z-index: 15; }
.subnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; height: 44px; align-items: center; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav a { font: 500 .8rem var(--mono); color: var(--faint); padding: 5px 10px; border-radius: 7px; white-space: nowrap; }
.subnav a:hover { color: var(--fg); text-decoration: none; }
.subnav a[aria-current="true"] { color: var(--fg); background: var(--raised); }

/* --- status banner --- */
.banner { font-size: .86rem; border-bottom: 1px solid var(--line); }
.banner .wrap { display: flex; gap: 10px; align-items: center; justify-content: center; padding-block: 9px; flex-wrap: wrap; text-align: center; }
.banner.ok { background: color-mix(in srgb, var(--ok) 7%, var(--bg)); }
.banner.warn { background: color-mix(in srgb, var(--warn) 9%, var(--bg)); }
.banner.bad { background: color-mix(in srgb, var(--bad) 9%, var(--bg)); }
.banner b { font-weight: 600; }
.banner span.m { color: var(--muted); }

/* --- sections --- */
section { padding-block: 96px; scroll-margin-top: 112px; border-top: 1px solid var(--line); }
section.first { border-top: 0; }
section.alt { background: var(--surface); }
@media (max-width: 640px) { section { padding-block: 72px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 .8rem var(--mono); color: var(--accent-2); margin: 0 0 16px; letter-spacing: .01em; }
.eyebrow::before { content: ""; width: 14px; height: 1px; background: currentColor; }
h1, h2, h3, h4 { font-family: var(--display); text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 600; line-height: 1.08; letter-spacing: -.035em; }
h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -.01em; }
.lead { color: var(--muted); max-width: 62ch; margin: 16px 0 0; font-size: 1.08rem; }
.sechead { margin-bottom: 44px; max-width: 780px; }
.sechead.center { margin-inline: auto; text-align: center; }
.sechead.center .lead { margin-inline: auto; }
.sechead.row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.sechead.row > div { max-width: 720px; }

/* --- hero --- */
.hero { position: relative; padding-block: 88px 96px; overflow: hidden; border-top: 0; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%); pointer-events: none; }
.hero::after { content: ""; position: absolute; width: 760px; height: 440px; left: 50%; top: -230px; transform: translateX(-50%); background: radial-gradient(closest-side, var(--accent-soft), transparent); filter: blur(10px); pointer-events: none; }
.hero.amber::after { background: radial-gradient(closest-side, color-mix(in srgb, var(--gold) 14%, transparent), transparent); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 56px; align-items: center; }
.hero.solo .wrap { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
.hero.solo h1 { max-width: 880px; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 44px; } }
.hero .eyebrow { padding: 5px 12px 5px 10px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--muted); }
.hero .eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.3rem); font-weight: 600; line-height: 1.03; letter-spacing: -.045em; }
.hero h1 em { font-style: normal; background: linear-gradient(180deg, var(--fg) 15%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero.amber h1 em { background: linear-gradient(180deg, var(--fg) 15%, var(--gold)); -webkit-background-clip: text; background-clip: text; }
.hero p.sub { color: var(--muted); font-size: 1.15rem; max-width: 48ch; margin: 22px 0 0; }
.hero.solo p.sub { margin-inline: auto; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: .88rem; color: var(--muted); }
.hero.solo .facts { justify-content: center; }
.facts span { display: inline-flex; align-items: center; gap: 7px; }
.facts span::before { content: ""; width: 15px; height: 15px; border-radius: 50%; background: var(--accent-soft) no-repeat center / 9px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%235b82ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero.solo .actions { justify-content: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--raised); color: var(--fg); cursor: pointer; font: 500 .93rem var(--body); padding: 10px 18px; border-radius: 9px; transition: background .15s, border-color .15s, transform .15s, opacity .15s; white-space: nowrap; }
.btn:hover { border-color: var(--faint); text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset, 0 8px 24px -8px var(--accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.gold { background: var(--gold); border-color: transparent; color: #1a1406; box-shadow: 0 8px 24px -10px var(--gold); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 11px; font-size: .8rem; border-radius: 7px; }
.btn .ico { font-size: 1.05em; }

/* --- IRC window --- */
.irc { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; font: .8rem/1.8 var(--mono); overflow: hidden; box-shadow: var(--shadow), 0 30px 80px -30px var(--accent-soft); min-width: 0; }
.irc .bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .76rem; background: var(--raised); }
.irc .bar::before { content: ""; width: 42px; height: 10px; flex: none; background: radial-gradient(circle at 5px 5px, var(--line-2) 4px, transparent 4.5px), radial-gradient(circle at 21px 5px, var(--line-2) 4px, transparent 4.5px), radial-gradient(circle at 37px 5px, var(--line-2) 4px, transparent 4.5px); }
.irc .bar b { color: var(--fg); font-weight: 500; }
.irc .tabsw { margin-left: auto; display: flex; gap: 4px; }
.irc .tabsw button { font: 500 .7rem var(--mono); border: 1px solid transparent; background: transparent; color: var(--faint); padding: 2px 8px; border-radius: 6px; cursor: pointer; }
.irc .tabsw button[aria-pressed="true"] { color: var(--fg); border-color: var(--line-2); background: var(--surface); }
.irc .log { padding: 14px 18px; overflow-x: auto; min-height: 290px; }
.irc .ln { white-space: pre; display: block; animation: lnin .45s both; }
.irc .ts { color: var(--faint); }
.irc .nk { color: var(--nick); font-weight: 500; }
.irc .bt { color: var(--accent-2); font-weight: 500; }
.irc .sys { color: var(--faint); }
.irc .bad { color: var(--bad); }
.irc .good { color: var(--ok); }
.irc .gold { color: var(--gold); }
.irc .hl { background: var(--accent-soft); border-radius: 4px; padding: 1px 3px; color: var(--fg); }
@keyframes lnin { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* --- tiles --- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .tiles.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .tiles, .tiles.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tiles.five .tile:last-child { grid-column: 1 / -1; } }
.tile { background: var(--surface); padding: 22px 24px; min-width: 0; }
.tile .num { font: 600 2.2rem/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tile .lbl { color: var(--fg); font-size: .88rem; margin-top: 10px; font-weight: 500; }
.tile .sub { color: var(--faint); font: .74rem var(--mono); margin-top: 3px; }
@media (max-width: 420px) { .tile { padding: 18px 16px; } .tile .num { font-size: 1.8rem; } }
.updated { color: var(--faint); font: .76rem var(--mono); margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge { font: 500 .7rem var(--mono); padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.badge.sample { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.badge.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, transparent); display: inline-flex; gap: 6px; align-items: center; }
.badge.acc { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }

/* --- product cards (home) --- */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .products { grid-template-columns: minmax(0, 1fr); } }
.product { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; padding: 32px; background: var(--bg); display: grid; gap: 18px; align-content: start; min-width: 0; transition: border-color .2s, transform .2s; }
.product:hover { border-color: var(--line-2); transform: translateY(-2px); }
.product::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 360px; height: 360px; background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; }
.product.amber::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--gold) 12%, transparent), transparent); }
.product .pico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; color: var(--accent-2); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); position: relative; }
.product.amber .pico { color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); border-color: color-mix(in srgb, var(--gold) 30%, transparent); }
.product h3 { font-size: 1.5rem; letter-spacing: -.025em; position: relative; }
.product p { color: var(--muted); margin: 0; position: relative; }
.product .pstats { display: flex; gap: 26px; flex-wrap: wrap; position: relative; }
.product .pstats div { display: grid; }
.product .pstats b { font: 600 1.5rem var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.product .pstats span { color: var(--faint); font: .74rem var(--mono); }
.product .actions { margin-top: 4px; position: relative; }
.ticks { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .93rem; display: grid; gap: 9px; position: relative; }
.ticks li { padding-left: 25px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .42em; width: 15px; height: 15px; border-radius: 50%; background: var(--accent-soft) no-repeat center / 8px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%235b82ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* --- feature grid --- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
@media (max-width: 940px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature { background: var(--surface); padding: 28px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.alt .feature { background: var(--bg); }
.feature .fic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--accent-2); background: var(--accent-soft); font-size: 1.1rem; margin-bottom: 6px; }
.feature.amber .fic { color: var(--gold); background: color-mix(in srgb, var(--gold) 11%, transparent); }
.feature h3 { font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: .9rem; }
.feature code { font-size: .8em; }

/* --- bot cards --- */
.botgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 24px; }
.bot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; align-content: start; transition: border-color .15s; min-width: 0; }
.alt .bot { background: var(--bg); }
.bot:hover { border-color: var(--line-2); }
.bot .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bot .name { font: 500 .95rem var(--mono); display: flex; align-items: center; gap: 9px; min-width: 0; }
.type { font: 500 .68rem var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; background: var(--raised); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.type.hub { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.type.trivia { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.load { height: 5px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.load i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .6s; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .84rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: .8rem; font-variant-numeric: tabular-nums; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.problems { font: .74rem var(--mono); color: var(--warn); }
.strip { display: grid; grid-template-columns: repeat(48, 1fr); gap: 2px; height: 22px; }
.strip i { border-radius: 2px; background: var(--raised); }
.strip i.u { background: color-mix(in srgb, var(--ok) 75%, var(--surface)); }
.strip i.d { background: var(--bad); }
.minilbl { display: flex; justify-content: space-between; font: .68rem var(--mono); color: var(--faint); margin-top: 5px; }
.spark { width: 100%; height: 36px; display: block; }
.spark .area { fill: var(--accent-soft); }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.spark .end { fill: var(--accent); }

/* --- feed --- */
.feed { list-style: none; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 8px; }
.feed li:hover { background: var(--raised); }
.feed .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 600 .85rem var(--mono); background: var(--raised); border: 1px solid var(--line); }
.feed .ic.approved { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.feed .ic.takeover { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.feed .ic.drone { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.feed .ic.removed { color: var(--muted); }
.feed .when { font: .74rem var(--mono); color: var(--faint); white-space: nowrap; }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 940px) { .split, .split.even { grid-template-columns: minmax(0, 1fr); } }

/* --- history --- */
.history { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 0; }
.history::before { content: ""; position: absolute; left: 111px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(var(--line-2), var(--accent) 60%, var(--accent-2)); }
.history li { display: grid; grid-template-columns: 96px 32px minmax(0, 1fr); gap: 0 0; padding-block: 18px; align-items: start; }
.history .yr { font: 600 .82rem var(--mono); color: var(--faint); text-align: right; padding-right: 16px; padding-top: 3px; }
.history .pt { width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); margin: 6px 0 0 9px; position: relative; z-index: 1; }
.history li.key .pt { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.history li.now .pt { border-color: var(--ok); background: var(--ok); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 15%, transparent); }
.history li.key .yr { color: var(--accent-2); }
.history h3 { font-size: 1.08rem; margin-bottom: 4px; }
.history p { margin: 0; color: var(--muted); max-width: 62ch; }
@media (max-width: 560px) {
  .history::before { left: 7px; }
  .history li { grid-template-columns: 26px minmax(0, 1fr); }
  .history .yr { grid-column: 2; text-align: left; padding: 0 0 2px; }
  .history .pt { grid-row: 1 / span 2; grid-column: 1; margin: 6px 0 0 1px; }
}

/* --- team --- */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .team { grid-template-columns: minmax(0, 1fr); } }
.member { border: 1px solid var(--line); border-radius: 16px; padding: 26px; background: var(--bg); display: grid; gap: 14px; align-content: start; position: relative; overflow: hidden; }
.member.boss { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: linear-gradient(180deg, var(--accent-soft), transparent 55%), var(--bg); }
.member .av { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font: 600 1.2rem var(--mono); color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #a35bff)); box-shadow: 0 10px 26px -12px var(--accent); }
.member.ga .av { background: linear-gradient(135deg, #2f3a52, #4a5876); }
.member h3 { font: 600 1.25rem var(--mono); letter-spacing: -.02em; }
.member .role { font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); }
.member p { margin: 0; color: var(--muted); font-size: .92rem; }

/* --- takeover timeline --- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 14px; width: 1px; background: linear-gradient(var(--bad), var(--bad) 75%, var(--ok)); opacity: .6; }
.timeline li { display: grid; grid-template-columns: 16px 56px minmax(0, 1fr); gap: 12px; padding: 10px 0; align-items: start; }
.timeline li::before { content: ""; width: 15px; height: 15px; border-radius: 50%; margin-top: 3px; background: var(--bg); border: 2px solid var(--bad); position: relative; }
.timeline li.calm::before { border-color: var(--ok); background: var(--ok); }
.timeline .t { font: 500 .8rem var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 2px; }
.timeline b { display: block; font-weight: 600; font-size: .95rem; }
.timeline span { color: var(--muted); font-size: .9rem; }

/* --- steps --- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .steps, .steps.four { grid-template-columns: minmax(0, 1fr); } }
.steps li { counter-increment: s; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.alt .steps li { background: var(--bg); }
.steps li::before { content: counter(s); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font: 600 .82rem var(--mono); color: var(--accent-2); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); margin-bottom: 16px; }
.steps h3 { font-size: 1rem; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); font-size: .9rem; }

/* --- tables --- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.alt .tablewrap { background: var(--bg); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 .72rem var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .07em; background: var(--raised); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--raised) 60%, transparent); }
td.num, th.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-family: var(--mono); font-size: .82rem; text-align: right; }
td.num { color: var(--muted); }
td code { white-space: nowrap; }
tr.click { cursor: pointer; }
.lvl { font: 500 .7rem var(--mono); white-space: nowrap; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* --- wizard / forms --- */
.wizard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 940px) { .wizard { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; display: grid; gap: 18px; min-width: 0; }
.alt .panel { background: var(--bg); }
@media (max-width: 480px) { .panel { padding: 18px; } }
label { font-weight: 500; font-size: .88rem; display: grid; gap: 8px; }
.flabel { font-weight: 500; font-size: .88rem; margin-bottom: 8px; }
input[type="text"], input[type="search"], select { font: .95rem var(--mono); padding: 11px 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); color: var(--fg); width: 100%; transition: border-color .15s, box-shadow .15s; }
select { font-family: var(--body); width: auto; padding-right: 32px; }
input[type="text"]:focus, input[type="search"]:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input::placeholder { color: var(--faint); }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.seg button { font: 500 .86rem var(--mono); padding: 6px 16px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--fg); box-shadow: 0 0 0 1px var(--line-2) inset, 0 2px 6px rgba(0,0,0,.2); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks label { font-weight: 400; display: flex; gap: 11px; align-items: flex-start; cursor: pointer; color: var(--muted); }
.checks input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.checks input:checked + span { color: var(--fg); }
.cmd { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 7px 8px 7px 14px; min-width: 0; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; }
.ready { font-size: .88rem; color: var(--muted); margin: 0; }
.ready.ok { color: var(--ok); }
.howto { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 9px; font-size: .9rem; }
.howto code { color: var(--fg); }
.next { font-size: .88rem; color: var(--muted); margin: 0; padding: 10px 12px; border-radius: 9px; background: var(--accent-soft); }
.next b { color: var(--fg); font-family: var(--mono); font-weight: 500; }
.lookup { margin: 0; font-size: .9rem; padding: 9px 12px; border-radius: 9px; }
.lookup.yes { color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, transparent); }
.lookup.no { color: var(--muted); background: var(--raised); }

/* --- guide --- */
.guide { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; counter-reset: g; }
@media (max-width: 780px) { .guide { grid-template-columns: minmax(0, 1fr); } }
.guide li { counter-increment: g; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.guide h3 { font-size: 1rem; display: flex; gap: 12px; align-items: center; }
.guide h3::before { content: counter(g, decimal-leading-zero); font: 500 .76rem var(--mono); color: var(--faint); }
.guide p { margin: 0; color: var(--muted); font-size: .88rem; }

/* --- toolbar, tabs --- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type="search"] { max-width: 320px; }
.toolbar .grow { flex: 1; }
.count { color: var(--faint); font: .78rem var(--mono); }
.empty { color: var(--muted); padding: 26px; text-align: center; }
.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.alt .tabs { background: var(--bg); }
.tabs button { font: 500 .84rem var(--body); padding: 6px 13px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { background: var(--raised); color: var(--fg); box-shadow: 0 0 0 1px var(--line-2) inset; }
.tabs .n { color: var(--faint); font-family: var(--mono); font-size: .76em; margin-left: 4px; }
.where { color: var(--muted); font-size: .88rem; margin: 6px 0 16px; }

/* --- channel management (protect) --- */
.mgmt { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .mgmt { grid-template-columns: minmax(0, 1fr); } }
.mgmt nav { display: grid; gap: 4px; position: sticky; top: 130px; }
@media (max-width: 900px) { .mgmt nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; } }
.mgmt nav button { text-align: left; font: 500 .9rem var(--body); padding: 11px 14px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.mgmt nav button:hover { color: var(--fg); background: var(--raised); }
.mgmt nav button[aria-selected="true"] { color: var(--fg); background: var(--raised); border-color: var(--line); }
.mgmt nav .ico { color: var(--accent-2); }
.mgmt .pane { display: grid; gap: 18px; min-width: 0; }
.mgmt .pane > p { margin: 0; color: var(--muted); }
.cmdlist { display: grid; gap: 10px; }
.cmditem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); align-items: center; min-width: 0; }
.alt .cmditem { background: var(--bg); }
.cmditem code { font-size: .86rem; color: var(--fg); overflow-wrap: anywhere; }
.cmditem p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .88rem; }
.cmditem .who { justify-self: end; }
.levelpill { font: 500 .68rem var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.levelpill.owner { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.levelpill.master { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.levelpill.op { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.levelpill.voice, .levelpill.everybody, .levelpill.todos { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.levelpill.staff { color: #c38bff; border-color: color-mix(in srgb, #c38bff 35%, var(--line)); }

/* --- charts --- */
.charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 940px) { .charts { grid-template-columns: minmax(0, 1fr); } }
.chart { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 22px; min-width: 0; }
.chart.wide { grid-column: 1 / -1; }
.chart h3 { font-size: 1rem; }
.chart .note { color: var(--faint); font: .74rem var(--mono); margin-top: 4px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin: 6px 0 14px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.axis { stroke: var(--line); stroke-width: 1; }
.tick { fill: var(--faint); font: 10.5px var(--mono); }
.sa { fill: var(--chart-a); } .sb { fill: var(--chart-b); } .sc { fill: var(--chart-c); }
.chart rect { transition: opacity .15s; }
.chart rect:hover { opacity: .8; }
.lnA { fill: none; stroke: var(--chart-a); stroke-width: 2; }
.lnB { fill: none; stroke: var(--chart-b); stroke-width: 2; stroke-dasharray: 4 3; }
.arA { fill: var(--accent-soft); }

/* bar rows (categories, questions) */
.bars { display: grid; gap: 12px; }
.barrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: .88rem; min-width: 0; }
.barrow .lab { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barrow .val { font: .78rem var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.barrow .track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.barrow .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.barrow .track i.warm { background: linear-gradient(90deg, var(--bad), var(--warn)); }

/* --- Q --- */
.qgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 940px) { .qgrid { grid-template-columns: minmax(0, 1fr); } }
.flag { font: 600 .9rem var(--mono); color: var(--accent-2); }
.qcmds { display: grid; gap: 16px; min-width: 0; }
.qcmds p { margin: 6px 0 0; color: var(--muted); font-size: .86rem; }

/* --- rules --- */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 940px) { .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .rules { grid-template-columns: minmax(0, 1fr); } }
.rules li { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.alt .rules li { background: var(--bg); }
.rules b { display: block; font-weight: 600; margin-bottom: 6px; }
.rules span { color: var(--muted); font-size: .9rem; }

/* --- webchat --- */
.chatbox { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow); }
.chatbox iframe { display: block; width: 100%; height: 560px; border: 0; }
.chatcard { padding: 32px; display: grid; gap: 14px; justify-items: start; }
.chans { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* --- faq --- */
.faq { display: grid; max-width: 860px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 500; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
details p { margin: 0 0 20px; color: var(--muted); max-width: 72ch; }

/* --- call to action band --- */
.ctaband { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 20px; padding: clamp(28px, 5vw, 56px); background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 60%), var(--surface); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
@media (max-width: 780px) { .ctaband { grid-template-columns: minmax(0, 1fr); } }
.ctaband h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.ctaband p { margin: 10px 0 0; color: var(--muted); }

/* --- footer --- */
footer { padding-block: 56px 64px; color: var(--muted); font-size: .86rem; border-top: 1px solid var(--line); }
footer .wrap { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 780px) { footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
footer h4 { font: 500 .76rem var(--mono); color: var(--fg); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--fg); text-decoration: none; }
footer .copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 8px; color: var(--faint); font: .76rem var(--mono); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.totop { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 9; width: 40px; height: 40px; border-radius: 50%; box-shadow: var(--shadow); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--raised); color: var(--fg); border: 1px solid var(--line-2); padding: 9px 16px; border-radius: 10px; font: .8rem var(--mono); z-index: 40; max-width: calc(100% - 40px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: var(--shadow); }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
.no-io .rv { opacity: 1; transform: none; }

/* ============================ trivia ============================ */
.game { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .game { grid-template-columns: minmax(0, 1fr); } }
.board { border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow), 0 40px 90px -40px color-mix(in srgb, var(--gold) 30%, transparent); min-width: 0; }
.board .bhead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--raised); flex-wrap: wrap; }
.board .bhead select { padding: 6px 30px 6px 10px; font: 500 .84rem var(--mono); }
.board .bhead .grow { flex: 1; }
.qcard { padding: clamp(20px, 4vw, 36px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; align-items: start; border-bottom: 1px solid var(--line); position: relative; }
.qcard .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qcard .qnum { font: 600 .78rem var(--mono); color: var(--accent-2); }
.qcard .cat { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .07em; padding: 3px 9px; border-radius: 99px; background: var(--raised); border: 1px solid var(--line); color: var(--muted); }
.qcard .tag { font: 600 .7rem var(--mono); padding: 3px 9px; border-radius: 99px; }
.qcard .tag.bonus { color: #1a1406; background: var(--gold); }
.qcard .tag.kaos { color: #fff; background: #b04ae0; }
.qcard .tag.scramble { color: var(--fg); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.qcard .qtext { grid-column: 1; font: 600 clamp(1.3rem, 2.8vw, 1.9rem)/1.25 var(--display); letter-spacing: -.02em; margin-top: 12px; min-height: 2.5em; overflow-wrap: anywhere; }
.qcard .qtext.idle { color: var(--muted); font-weight: 500; }
.qcard .hint { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.qcard .hintword { font: 600 clamp(1.1rem, 2.4vw, 1.5rem) var(--mono); letter-spacing: .2em; color: var(--gold); overflow-wrap: anywhere; }
.qcard .hints { display: flex; gap: 5px; }
.qcard .hints i { width: 22px; height: 5px; border-radius: 99px; background: var(--line-2); }
.qcard .hints i.on { background: var(--gold); }
.ring { width: 78px; height: 78px; position: relative; grid-row: 1 / span 2; grid-column: 2; }
.ring svg { width: 78px; height: 78px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .bgc { stroke: var(--line); }
.ring .fgc { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.ring.low .fgc { stroke: var(--bad); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 600 1.2rem var(--mono); font-variant-numeric: tabular-nums; }
.ring small { position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font: .66rem var(--mono); color: var(--faint); }
@media (max-width: 520px) { .ring, .ring svg { width: 60px; height: 60px; } .ring b { font-size: 1rem; } }
.kaosfound { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.kaosfound span { font: 500 .8rem var(--mono); padding: 4px 10px; border-radius: 8px; background: color-mix(in srgb, #b04ae0 14%, transparent); color: var(--fg); border: 1px solid color-mix(in srgb, #b04ae0 35%, transparent); }
.kaosfound span.miss { background: transparent; color: var(--faint); border-style: dashed; }
.answer { padding: 16px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); background: var(--bg); }
.answer form { display: flex; gap: 10px; }
.answer input { flex: 1; min-width: 0; }
.answer .res { font: 500 .82rem var(--mono); min-height: 1.4em; }
.answer .res.ok { color: var(--ok); } .answer .res.bad { color: var(--bad); } .answer .res.info { color: var(--muted); }
.answer .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.answer .who { font: .8rem var(--mono); color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.answer .who b { color: var(--fg); font-weight: 500; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.gfeed { list-style: none; margin: 0; padding: 10px 8px; max-height: 320px; overflow-y: auto; font: .8rem/1.6 var(--mono); scroll-behavior: smooth; }
.gfeed li { padding: 4px 10px; border-radius: 7px; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; animation: lnin .35s both; }
.gfeed li .t { color: var(--faint); font-size: .72rem; padding-top: 2px; }
.gfeed li .x { overflow-wrap: anywhere; }
.gfeed li.q .x { color: var(--fg); font-weight: 600; }
.gfeed li.ok .x { color: var(--ok); }
.gfeed li.miss .x { color: var(--bad); }
.gfeed li.hint .x { color: var(--gold); }
.gfeed li.news .x { color: #c38bff; }
.gfeed li.start .x, .gfeed li.stop .x, .gfeed li.info .x { color: var(--muted); }
.gfeed li.web { background: var(--accent-soft); }
.side { display: grid; gap: 16px; min-width: 0; }
.card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 18px; min-width: 0; }
.alt .card { background: var(--bg); }
.card h3 { font-size: .95rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.card h3 span { font: 500 .72rem var(--mono); color: var(--faint); }
.minitop { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: m; }
.minitop li { counter-increment: m; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .88rem; padding: 5px 6px; border-radius: 7px; }
.minitop li::before { content: counter(m); font: 600 .72rem var(--mono); color: var(--faint); text-align: center; }
.minitop li:nth-child(1)::before { color: var(--gold); } .minitop li:nth-child(2)::before { color: var(--silver); } .minitop li:nth-child(3)::before { color: var(--bronze); }
.minitop li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.minitop li b { font: 500 .8rem var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.minitop li.me { background: var(--accent-soft); }
.login { display: grid; gap: 12px; }
.login .codebox { font: 600 1.6rem var(--mono); letter-spacing: .3em; text-align: center; padding: 14px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg); color: var(--gold); }
.login ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: .88rem; display: grid; gap: 8px; }
.login .wait { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .85rem; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.stopped { padding: 34px 24px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.stopped p { margin: 0; color: var(--muted); max-width: 46ch; }
.medal { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 .7rem var(--mono); color: #1a1406; flex: none; }
.medal.g1 { background: var(--gold); } .medal.g2 { background: var(--silver); } .medal.g3 { background: var(--bronze); }
.pos { font: 600 .82rem var(--mono); color: var(--faint); font-variant-numeric: tabular-nums; }
.player { display: flex; gap: 10px; align-items: center; min-width: 0; }
.player .pav { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font: 600 .78rem var(--mono); color: var(--accent-ink); flex: none; }
.player .pn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.player .q { color: var(--accent-2); font-size: .72rem; font-family: var(--mono); }
.lvltag { font: 500 .68rem var(--mono); padding: 2px 8px; border-radius: 99px; background: var(--raised); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; margin-bottom: 18px; }
@media (max-width: 640px) { .podium { gap: 8px; } }
.podium .pl { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 18px 14px; text-align: center; display: grid; gap: 6px; justify-items: center; min-width: 0; cursor: pointer; transition: transform .2s, border-color .2s; }
.podium .pl:hover { transform: translateY(-3px); border-color: var(--line-2); }
.podium .pl.p1 { padding-block: 28px; border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 10%, transparent), transparent 70%), var(--surface); order: 2; }
.podium .pl.p2 { order: 1; } .podium .pl.p3 { order: 3; }
.podium .pl .pav { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font: 600 1rem var(--mono); color: var(--accent-ink); }
.podium .pl b { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .pl .pts { font: 600 1.3rem var(--display); letter-spacing: -.03em; }
.podium .pl .pts small { font: .7rem var(--mono); color: var(--faint); margin-left: 4px; }
.ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.achv { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 4px 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); align-items: center; min-width: 0; }
.alt .achv { background: var(--bg); }
.achv .ai { grid-row: 1 / span 2; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.achv b { font-weight: 600; font-size: .93rem; }
.achv span { color: var(--muted); font-size: .8rem; }
.achv.locked { opacity: .45; }
.achv.locked .ai { color: var(--faint); background: var(--raised); border-color: var(--line); }
.achv .pct { grid-column: 2; font: .72rem var(--mono); color: var(--faint); }
.ladder { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 860px) { .ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ladder div { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); display: grid; gap: 4px; min-width: 0; }
.ladder b { font-weight: 600; }
.ladder span { font: .74rem var(--mono); color: var(--faint); }
.ladder div:last-child { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.ladder div:last-child b { color: var(--gold); }
.records { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .records { grid-template-columns: minmax(0, 1fr); } }
.record { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--surface); display: grid; gap: 6px; min-width: 0; }
.alt .record { background: var(--bg); }
.record .rv2 { font: 600 2rem var(--display); letter-spacing: -.04em; color: var(--gold); font-variant-numeric: tabular-nums; }
.record .rl { color: var(--fg); font-weight: 500; }
.record .rb { font: .76rem var(--mono); color: var(--faint); }
.hof { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hof li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); align-items: center; }
.alt .hof li { background: var(--bg); }
.hof .wk { font: 500 .78rem var(--mono); color: var(--faint); }
.hof .ws { display: flex; gap: 16px; flex-wrap: wrap; font-size: .88rem; }
.hof .ws span { display: inline-flex; gap: 7px; align-items: center; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .modes { grid-template-columns: minmax(0, 1fr); } }
.mode { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--bg); display: grid; gap: 10px; align-content: start; }
.mode .mex { font: .78rem/1.6 var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; color: var(--muted); overflow-x: auto; white-space: pre; }
.mode .mex b { color: var(--gold); font-weight: 600; }
.mode p { margin: 0; color: var(--muted); font-size: .9rem; }
.pointsrules { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 18px; }
@media (max-width: 860px) { .pointsrules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pointsrules div { background: var(--surface); padding: 18px; }
.pointsrules b { font: 600 1.5rem var(--display); color: var(--gold); display: block; letter-spacing: -.03em; }
.pointsrules span { font-size: .82rem; color: var(--muted); }

/* modal (player profile) */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--sunken) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.modal .sheet { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 40px 120px -30px rgba(0,0,0,.6); animation: up .25s both; }
@keyframes up { from { transform: translateY(12px); opacity: 0; } }
.sheet .shead { display: flex; gap: 16px; align-items: center; padding: 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sheet .shead .pav { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font: 600 1.2rem var(--mono); color: var(--accent-ink); flex: none; }
.sheet .shead h3 { font-size: 1.4rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.sheet .shead .grow { flex: 1; min-width: 0; }
.sheet .sbody { padding: 24px; display: grid; gap: 22px; }
.sheet .lvlbar { display: grid; gap: 6px; }
.sheet .lvlbar .track { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.sheet .lvlbar .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 60%, #fff)); }
.sheet .lvlbar .lt { display: flex; justify-content: space-between; font: .74rem var(--mono); color: var(--faint); }
.sheet .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
@media (max-width: 560px) { .sheet .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sheet .stats div { background: var(--bg); padding: 14px; }
.sheet .stats b { font: 600 1.25rem var(--display); display: block; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sheet .stats span { font-size: .76rem; color: var(--muted); }
.sheet .ach { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.sheet .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 500 .74rem var(--mono); padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); background: var(--bg); }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--raised), var(--line), var(--raised)); background-size: 200% 100%; animation: sk 1.4s linear infinite; border-radius: 6px; color: transparent !important; }
@keyframes sk { to { background-position: -200% 0; } }

/* --- language menu --- */
.langsel { font: 500 .78rem var(--body); height: 32px; padding: 0 26px 0 10px; border-radius: 8px; border: 1px solid var(--line); background-color: var(--surface); color: var(--muted); cursor: pointer; width: auto; }
.langsel:hover { color: var(--fg); border-color: var(--line-2); }
@media (max-width: 520px) { .langsel { max-width: 92px; } }

/* ============================ admin page ============================ */
.adm { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; padding-block: 36px 80px; }
@media (max-width: 900px) { .adm { grid-template-columns: minmax(0, 1fr); } }
.adm nav { display: grid; gap: 3px; position: sticky; top: 80px; }
@media (max-width: 900px) { .adm nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; } }
.adm nav button { text-align: left; font: 500 .9rem var(--body); padding: 10px 13px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.adm nav button:hover { color: var(--fg); background: var(--raised); }
.adm nav button[aria-selected="true"] { color: var(--fg); background: var(--surface); border-color: var(--line); }
.adm nav button .n { margin-left: auto; font: 600 .7rem var(--mono); padding: 1px 7px; border-radius: 99px; background: var(--warn); color: #1a1406; }
.adm nav .ico { color: var(--accent-2); }
.adm .pane { display: grid; gap: 22px; min-width: 0; }
.adm h2 { font-size: 1.6rem; letter-spacing: -.025em; }
.adm .phead { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.adm .phead p { margin: 6px 0 0; color: var(--muted); }
.st { font: 600 .68rem var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.st.approved, .st.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.st.denied, .st.failed, .st.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.st.pending, .st.queued, .st.checking, .st.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.rowact { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 10%, var(--raised)); }
.formrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.formrow > * { flex: 1 1 160px; min-width: 0; }
.formrow .btn { flex: 0 0 auto; }
.console { background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; font: .82rem/1.65 var(--mono); padding: 14px 16px; max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.console .in { color: var(--accent-2); }
.console .out { color: var(--fg); }
.console .err { color: var(--bad); }
.sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.set { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 16px; display: grid; gap: 8px; }
.set b { font: 500 .86rem var(--mono); }
.set p { margin: 0; color: var(--muted); font-size: .82rem; }
.set .formrow input, .set .formrow select { padding: 8px 10px; font-size: .86rem; }
.set.changed { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.loglist { list-style: none; margin: 0; padding: 0; font: .8rem/1.6 var(--mono); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-height: 560px; overflow: auto; }
.loglist li { padding: 7px 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.loglist li:last-child { border-bottom: 0; }
.loglist .ts { color: var(--faint); margin-right: 8px; }
.gate { max-width: 560px; margin: 70px auto; text-align: center; display: grid; gap: 16px; justify-items: center; }
.gate .card { text-align: left; width: 100%; }
dialog.confirm { border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--fg); padding: 24px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 40px 120px -30px rgba(0,0,0,.6); }
dialog.confirm::backdrop { background: color-mix(in srgb, var(--sunken) 70%, transparent); backdrop-filter: blur(4px); }
dialog.confirm h3 { margin-bottom: 8px; }
dialog.confirm p { color: var(--muted); margin: 0 0 14px; }
dialog.confirm .actions { justify-content: flex-end; margin-top: 18px; }

/* --- networks: QuakeNet (/) and DALnet (/dalnet/) --- */
html.net-quakenet [data-net="dalnet"], html.net-dalnet [data-net="quakenet"] { display: none !important; }
.netsel { color: var(--fg); font-weight: 600; }
@media (max-width: 520px) { .top .wrap { gap: 8px; } .langsel { max-width: 72px; padding-right: 22px; } }
