/* Wet Boys Server Manager
   Themes: every color, font and shape comes from the tokens below. A theme is one block of values on
   :root[data-theme=...]; the components further down only use the tokens.
     wetboys - gold-on-black, matched to the Wet Boys website (default)
     modern  - dark, rounded, cyan accent
     light   - light, rounded; accent color selectable on the Account page */

@font-face { font-family: "Russo One"; font-weight: 400; font-display: swap; src: url("fonts/russo-one-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Saira"; font-weight: 400; font-display: swap; src: url("fonts/saira-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Saira"; font-weight: 600; font-display: swap; src: url("fonts/saira-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Saira"; font-weight: 700; font-display: swap; src: url("fonts/saira-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }

/* ---- light (also the fallback before a theme is known) */
:root {
  color-scheme: light;
  --bg: #f3f3f1; --surface: #fcfcfb; --surface-2: #f0efec; --panel: #f7f7f5; --hud-bg: #f7f7f5;
  --ink: #0b0b0b; --ink-2: #52514e; --ink-3: #7a7974; --ink-strong: #0b0b0b;
  --line: rgba(11,11,11,0.12); --line-soft: rgba(11,11,11,0.08); --line-strong: #8f8e86;
  --grid: #e1e0d9; --axis: #c3c2b7;
  --accent: #1f6bc4; --accent-ink: #fff; --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --good: #0ca30c; --good-ink: #0a7d0a; --warn: #fab219; --warn-ink: #8a5a00; --serious: #ec835a; --crit: #d03b3b; --crit-ink: #b42f2f;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif; --font-display: var(--font-body);
  --font-mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  --radius: 10px; --radius-sm: 6px; --chamfer: 0px; --btn-clip: none;
  --label-tt: none; --label-ls: 0; --label-size: 12px; --head-tt: none; --head-ls: -0.01em;
  --eyebrow-prefix: ""; --bracket: transparent; --shadow: 0 1px 2px rgba(0,0,0,0.04);
}
:root[data-theme="light"][data-accent="green"]  { --accent: #13804f; }
:root[data-theme="light"][data-accent="purple"] { --accent: #7048c4; }
:root[data-theme="light"][data-accent="orange"] { --accent: #b6520f; }
:root[data-theme="light"][data-accent="slate"]  { --accent: #4a5a6e; }

/* ---- modern: dark, rounded, cyan */
:root[data-theme="modern"] {
  color-scheme: dark;
  --bg: #0b0e12; --surface: #151a20; --surface-2: #1c232b; --panel: #10141a; --hud-bg: #10141a;
  --ink: #e8edf2; --ink-2: #a3adb8; --ink-3: #8e99a6; --ink-strong: #ffffff;
  --line: rgba(255,255,255,0.09); --line-soft: rgba(255,255,255,0.06); --line-strong: rgba(255,255,255,0.22);
  --grid: #222a33; --axis: #2c3540;
  --accent: #4cc2ff; --accent-ink: #06121a;
  --good: #2fbf71; --good-ink: #5fd796; --warn: #f5b83d; --warn-ink: #f5c45e; --serious: #f08a4b; --crit: #ff5c5c; --crit-ink: #ff8a8a;
  --series-1: #3a93e8; --series-2: #dc6e30; --series-3: #1aa898; --series-4: #a074e6; --series-5: #d45b8c;
  --radius: 16px; --radius-sm: 10px; --shadow: none;
}
:root[data-theme="modern"][data-accent="green"]  { --accent: #3fb987; }
:root[data-theme="modern"][data-accent="purple"] { --accent: #a88cf0; }
:root[data-theme="modern"][data-accent="orange"] { --accent: #f0904d; }
:root[data-theme="modern"][data-accent="slate"]  { --accent: #9fb0c4; }

/* ---- wetboys: the website's look - gold on near-black, chamfered corners, HUD brackets, stencil headings */
:root[data-theme="wetboys"] {
  color-scheme: dark;
  --bg: #070b0e; --surface: #11161a; --surface-2: #0c1115; --panel: #0e1317; --hud-bg: #0a0f12;
  --ink: #e9edf1; --ink-2: #b8c0c7; --ink-3: #9aa3ab; --ink-strong: #ffffff;
  --line: #2a3239; --line-soft: #1f262c; --line-strong: #5a636b;
  --grid: #1c2328; --axis: #2a3239;
  --accent: #edbe56; --accent-ink: #070b0e; --accent-soft: rgba(237,190,86,0.08);
  --good: #3ddc84; --good-ink: #3ddc84; --warn: #ffb547; --warn-ink: #ffb547; --serious: #f08a4b; --crit: #ff6b5e; --crit-ink: #ff8a80;
  --series-1: #3a93e8; --series-2: #dc6e30; --series-3: #1aa898; --series-4: #a074e6; --series-5: #d45b8c;
  --font-body: "Saira", "Segoe UI", system-ui, sans-serif; --font-display: "Russo One", "Saira", sans-serif;
  --radius: 0px; --radius-sm: 0px; --chamfer: 16px;
  --btn-clip: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  --label-tt: uppercase; --label-ls: 0.18em; --label-size: 11px; --head-tt: uppercase; --head-ls: 0.02em;
  --eyebrow-prefix: "// "; --bracket: #edbe56; --shadow: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font-body); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
code, pre, textarea { font-family: var(--font-mono); font-size: 13px; }
h1 { font-size: 22px; margin: 0 0 6px; } h2 { font-size: 17px; margin: 0 0 12px; } h3 { font-size: 13px; margin: 0 0 6px; color: var(--ink-2); font-weight: 600; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); font-size: 16px; } .brand span { font-weight: 400; color: var(--ink-2); }
nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
main { max-width: 1280px; margin: 0 auto; padding: 18px 16px 60px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.narrow { max-width: 460px; margin: 40px auto; }
.muted { color: var(--ink-2); } .small { font-size: 13px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.grid4 .card { margin: 0; }
.stat .big { font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; }
.kv { margin: 14px 0 6px; } .kv div { display: flex; flex-direction: column; } .kv span { font-size: 12px; color: var(--ink-2); } .kv b { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 8px 0; } .between { justify-content: space-between; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 10px; } .stack label, .row label, .grid3 label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.checks label { flex-direction: row; align-items: center; color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
input, select, textarea, button { font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 10px; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; padding: 0; }
textarea { width: 100%; min-height: 300px; }
.num { width: 90px; }
button { cursor: pointer; background: var(--surface-2); } button:hover { border-color: var(--axis); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
button.danger { color: var(--crit); } button.link { background: none; border: 0; padding: 2px 4px; color: var(--accent); }
button.link.danger { color: var(--crit); }
form.inline { display: inline; }
.controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; } .controls form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin: 0; }
.msg input[name=text] { flex: 1; min-width: 240px; }
.flash { padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 12px; border: 1px solid var(--line); }
.flash.ok { border-left: 4px solid var(--good); } .flash.err { border-left: 4px solid var(--crit); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--ink-2); font-weight: 600; }
td.wrap { white-space: normal; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: var(--radius); border: 1px solid var(--line); color: var(--ink-2); }
.tag.err { color: var(--crit); border-color: var(--crit); }
.state { display: inline-flex; align-items: center; gap: 6px; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.state.on::before { background: var(--good); } .state.pending::before { background: var(--warn); }
.status-pill { padding: 4px 12px; border-radius: 14px; border: 1px solid var(--line); font-weight: 600; }
.pain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pain li { padding: 8px 12px; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius-sm); }
.pain li.crit { border-left-color: var(--crit); } .pain li.warn { border-left-color: var(--warn); } .pain li.info { border-left-color: var(--accent); }
.pain .lvl { font-size: 11px; font-weight: 700; text-transform: uppercase; margin-right: 6px; }
.pain .lvl.crit { color: var(--crit); } .pain .lvl.warn { color: var(--ink); } .pain .lvl.info { color: var(--ink-2); }
.pain .hint { color: var(--ink-2); font-size: 13px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ranges button { padding: 3px 9px; font-size: 13px; } .ranges button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.charts2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; margin-top: 10px; }
.charts2 > div { position: relative; height: 210px; padding-bottom: 22px; }
.chart-empty { position: absolute; inset: 30px 0 0; display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 13px; }
pre.log { background: var(--surface-2); padding: 12px; border-radius: var(--radius-sm); overflow: auto; max-height: 70vh; white-space: pre; }
pre.log .e { color: var(--crit); } pre.log .w { color: var(--serious); }
.events { list-style: none; padding: 0; margin: 0; } .events li { padding: 4px 0; border-bottom: 1px solid var(--line); }
code.pw { font-size: 16px; padding: 2px 6px; background: var(--surface-2); border-radius: 4px; user-select: all; }
@media (max-width: 640px) { .charts2 { grid-template-columns: 1fr; } .stat .big { font-size: 24px; } main { padding: 12px 16px 40px; } }
/* layout fixes */
.stack > button, fieldset > button { align-self: flex-start; }
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { flex-direction: row !important; align-items: center; gap: 6px; color: var(--ink); }
.controls label { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); font-size: 14px; }
/* theme picker */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches label { flex-direction: row !important; align-items: center; gap: 6px; color: var(--ink); }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); }
.swatch.blue { background: #1f6bc4; } .swatch.green { background: #13804f; } .swatch.purple { background: #7048c4; }
.swatch.orange { background: #b6520f; } .swatch.slate { background: #4a5a6e; }
.themebtn { background: none; border: 1px solid var(--line); padding: 3px 9px; font-size: 13px; }
/* sub-navigation on server pages */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.subnav a { padding: 5px 12px; border-radius: 16px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.subnav a.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.subnav a:hover { text-decoration: none; border-color: var(--axis); }
/* script controls */
.tree { list-style: none; margin: 0; padding: 0; }
.tree ul { list-style: none; margin: 0; padding-left: 18px; border-left: 1px solid var(--line); }
.tree li { margin: 2px 0; }
.tree details > summary { cursor: pointer; padding: 3px 0; font-weight: 600; }
.tree .cmd { display: flex; align-items: center; gap: 8px; padding: 2px 0; flex-wrap: wrap; }
.tree .cmd button.run { padding: 2px 10px; font-size: 13px; }
.star { background: none; border: 0; padding: 0 2px; font-size: 16px; color: var(--ink-3); line-height: 1; }
.star.on { color: var(--warn); }
.hit { background: color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 3px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar input[type=search] { flex: 1; min-width: 200px; }
.result { margin-top: 8px; font-size: 13px; min-height: 1.4em; }
.result.ok { color: var(--good); } .result.err { color: var(--crit); }
.favs { display: flex; flex-wrap: wrap; gap: 8px; }
.favs .fav { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface-2); text-align: left; max-width: 320px; }
.favs .fav small { color: var(--ink-2); font-size: 11px; }
.flagrow { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.flagrow code { min-width: 180px; }
.flagrow .val { font-variant-numeric: tabular-nums; min-width: 40px; font-weight: 650; }
pre.out { background: var(--surface-2); padding: 10px; border-radius: var(--radius-sm); white-space: pre-wrap; overflow-wrap: anywhere; min-height: 2.5em; margin: 8px 0 0; }
/* environment */
.envgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.envgrid > fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 14px; }
.envgrid legend { font-weight: 650; padding: 0 6px; }
.season { display: flex; gap: 6px; flex-wrap: wrap; }
.season button { font-size: 13px; padding: 4px 10px; }
.windrow { display: grid; grid-template-columns: 1fr 90px 90px; gap: 6px; align-items: center; font-size: 13px; }
.windrow input { width: 100%; }
.note { font-size: 13px; color: var(--ink-2); }
.callout { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; }
.callout.warn { border-left-color: var(--warn); }
.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.envgrid > fieldset.card { margin: 0; }
select, input:not([type=checkbox]):not([type=radio]) { max-width: 100%; }
#luacode { min-height: 120px; }
.row > label, .controls label { max-width: 100%; min-width: 0; }
.row > label > select { width: 100%; text-overflow: ellipsis; }
/* permissions tables */
table.perms td.c, table.perms th.c { text-align: center; width: 110px; }
table.perms tr.grp th { padding-top: 14px; color: var(--ink); font-size: 13px; border-bottom: 1px solid var(--axis); }
table.perms .yes { color: var(--good); font-weight: 700; }
table.perms .no { color: var(--ink-3); }
table.perms select { min-width: 170px; }
/* wizard */
.wsteps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 10px 0 0; flex-wrap: wrap; counter-reset: ws; }
.wsteps li { counter-increment: ws; padding: 5px 12px 5px 8px; border-radius: 16px; border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); cursor: pointer; }
.wsteps li::before { content: counter(ws); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 12px; font-weight: 650; }
.wsteps li.on { border-color: var(--accent); color: var(--ink); }
.wsteps li.on::before { background: var(--accent); color: var(--accent-ink); }
.wsteps li.done::before { content: "✓"; }
.wsteps li.bad::before { background: var(--crit); color: #fff; content: "!"; }
.js .wstep { display: none; } .js .wstep.on { display: block; }
.wnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.hint { font-size: 12px; color: var(--ink-3); }
.fieldnote { font-size: 13px; min-height: 0; }
.fieldnote:not(:empty) { color: var(--crit); margin-top: -4px; }
.fieldnote.ok { color: var(--good); }
dl.review { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 16px; margin: 0; }
dl.review dt { color: var(--ink-2); font-size: 13px; } dl.review dd { margin: 0; overflow-wrap: anywhere; }
.subnav a.subtle { color: var(--crit); }
@media (max-width: 640px) { dl.review { grid-template-columns: 1fr; } dl.review dd { margin-bottom: 6px; } }
a.button { display: inline-block; padding: 7px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
a.button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
a.button:hover { text-decoration: none; filter: brightness(1.05); }
[hidden] { display: none !important; }
.subnav a.subtle.on { background: var(--crit); color: #fff; }
.pain .dismiss { float: right; font-size: 13px; }
.pain .dismissall { text-align: right; border-left-color: transparent; }
/* server header + quick actions */
.srvhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.srvhead-right { display: flex; gap: 10px; align-items: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
details.qa { position: relative; display: inline-block; }
details.qa > summary { list-style: none; cursor: pointer; padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; white-space: nowrap; }
details.qa > summary::-webkit-details-marker { display: none; }
details.qa[open] > summary { border-color: var(--accent); }
.qa-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 240px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,0.18); padding: 6px; display: flex; flex-direction: column; }
.qa-menu button, .qa-menu a { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: var(--radius-sm); padding: 7px 10px; color: var(--ink); font-size: 14px; }
.qa-menu button:hover, .qa-menu a:hover { background: var(--surface-2); text-decoration: none; }
.qa-menu button.danger { color: var(--crit); }
.qa-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
td.qa-cell { text-align: right; }
.state.bad::before { background: var(--crit); }
#toast { position: fixed; right: 16px; bottom: 16px; z-index: 50; max-width: min(460px, calc(100vw - 32px)); padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--good); box-shadow: 0 8px 24px rgba(0,0,0,0.2); white-space: pre-line; }
#toast.err { border-left-color: var(--crit); }
/* power panel */
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-bottom: 6px; }
.choice label { flex-direction: row !important; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); }
.choice label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.choice label span { display: flex; flex-direction: column; gap: 2px; }
.choice small { color: var(--ink-2); font-size: 12px; }
.choice input { margin-top: 3px; }
button.big { padding: 10px 22px; font-size: 16px; }
label.grow { flex: 1; min-width: 240px; }
label.grow input { width: 100%; }
.tablewrap { position: relative; }
table.servers td.name { min-width: 200px; max-width: 280px; }
.qa-menu { max-height: calc(100vh - 24px); overflow-y: auto; }
/* operation overlay over the server name */
table.servers td.name, .srvtitle { position: relative; }
.opov { position: absolute; inset: 2px; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 6px 10px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--warn); font-size: 13px; }
.opov.done { border-left-color: var(--good); } .opov.failed { border-left-color: var(--crit); }
.opov-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.opov-head b { color: var(--ink); } .opov.failed .opov-head b { color: var(--crit); }
.opov-time { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; font-size: 12px; }
.opov-sub { color: var(--ink-2); font-size: 12px; white-space: normal; line-height: 1.3; }
.opbar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.opbar > span { display: block; height: 100%; width: 2%; border-radius: 3px; background: var(--warn); transition: width 0.9s linear; }
.opov.done .opbar > span { background: var(--good); } .opov.failed .opbar > span { background: var(--crit); }
.opbar.indet > span { width: 30% !important; animation: opslide 1.4s ease-in-out infinite; }
@keyframes opslide { 0% { transform: translateX(-100%); } 100% { transform: translateX(330%); } }
@media (prefers-reduced-motion: reduce) { .opbar.indet > span { animation: none; width: 100% !important; opacity: 0.5; } .opbar > span { transition: none; } }
.srvtitle { min-height: 56px; min-width: 280px; }

/* =====================================================================================================
   Theme layer: site-style components. Everything below uses tokens only.
   ===================================================================================================== */
a:hover { color: color-mix(in srgb, var(--accent) 75%, #fff); }
h1, h2 { font-family: var(--font-display); text-transform: var(--head-tt); letter-spacing: var(--head-ls); font-weight: 700; }
:root[data-theme="wetboys"] h1, :root[data-theme="wetboys"] h2 { font-weight: 400; }
h1 { font-size: 26px; line-height: 1.1; }
h2 { font-size: 18px; line-height: 1.2; }
h3, th, .kv span, .label { text-transform: var(--label-tt); letter-spacing: var(--label-ls); }
h3 { font-size: var(--label-size); color: var(--ink-3); }
th { font-size: var(--label-size); color: var(--ink-3); }
.kv span { font-size: var(--label-size); color: var(--ink-3); font-weight: 600; }
input, select, textarea { background: var(--surface-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
.card { position: relative; box-shadow: var(--shadow); }
.muted { color: var(--ink-2); }

/* chamfered bottom-right corner (a drawn diagonal, so menus inside the card are never clipped) */
.card::after, .srvcard::after, .summary::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: var(--chamfer); height: var(--chamfer); pointer-events: none;
  background: linear-gradient(to top left, var(--bg) calc(50% - 0.6px), var(--cut-line, var(--line)) calc(50% - 0.6px),
    var(--cut-line, var(--line)) calc(50% + 0.6px), transparent calc(50% + 0.6px)); }

/* buttons: outlined, tracked capitals and clipped corners in the Wet Boys theme */
:root[data-theme="wetboys"] button:not(.link):not(.star):not(.fav),
:root[data-theme="wetboys"] a.button, :root[data-theme="wetboys"] details.qa > summary {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 700; padding: 9px 16px;
  background: transparent; border: 1px solid var(--line-strong); color: var(--ink-strong); clip-path: var(--btn-clip); }
:root[data-theme="wetboys"] button.primary, :root[data-theme="wetboys"] a.button.primary { border-color: var(--accent); color: var(--ink-strong); background: transparent; }
:root[data-theme="wetboys"] button:not(.link):not(.star):not(.fav):hover,
:root[data-theme="wetboys"] a.button:hover, :root[data-theme="wetboys"] details.qa > summary:hover { border-color: var(--accent); background: var(--accent-soft); filter: none; }
:root[data-theme="wetboys"] button.big, :root[data-theme="wetboys"] .ranges button.on,
:root[data-theme="wetboys"] button.primary.solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
:root[data-theme="wetboys"] button.danger:not(.link) { color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 55%, transparent); }
:root[data-theme="wetboys"] .qa-menu button:not(.link):not(.star):not(.fav), :root[data-theme="wetboys"] .season button:not(.link):not(.star):not(.fav),
:root[data-theme="wetboys"] .tree .cmd button.run:not(.link):not(.star):not(.fav) { clip-path: none; }
/* menu items read like the links below them, not like buttons */
:root[data-theme="wetboys"] .qa-menu button:not(.link):not(.star):not(.fav) { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400;
  border: 0; padding: 7px 10px; color: var(--ink); background: none; }
:root[data-theme="wetboys"] .qa-menu button:not(.link):not(.star):not(.fav):hover { background: var(--surface-2); }
:root[data-theme="wetboys"] .qa-menu button.danger:not(.link):not(.star):not(.fav) { color: var(--crit-ink); }
:root[data-theme="wetboys"] .qa-menu button.danger { color: var(--crit-ink); }
:root[data-theme="wetboys"] .ranges button { padding: 5px 11px; font-size: 11px; }
:root[data-theme="wetboys"] button.link { text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; font-weight: 700; }
:root[data-theme="wetboys"] .qa-menu { border-color: var(--line); background: var(--panel); }
:root[data-theme="wetboys"] details.qa[open] > summary { border-color: var(--accent); color: var(--accent); }
button.primary.solid { background: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- top bar (like the site header) */
.top { display: block; padding: 0; background: var(--panel); border-bottom: 1px solid var(--line-soft); }
.topin { max-width: 1320px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.emblem { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; background: var(--surface); color: var(--accent); }
.brand-t { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: 0.06em; text-transform: var(--head-tt); line-height: 1.15; }
.brand-s { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.22em; color: var(--ink-3); text-transform: uppercase; }
:root[data-theme="wetboys"] .brand-t { font-weight: 400; }
:root:not([data-theme="wetboys"]) .brand-s { letter-spacing: 0.04em; font-size: 12px; text-transform: none; }
.mainnav { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; }
.mainnav a { color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 4px 0; border-bottom: 2px solid transparent; }
.mainnav a[aria-current="page"] { color: var(--ink-strong); border-bottom-color: var(--accent); }
.mainnav a:hover { color: var(--ink-strong); text-decoration: none; }
:root[data-theme="wetboys"] .mainnav a { text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; }
.usernav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.usernav .who { font-size: 12px; color: var(--ink-3); letter-spacing: 0.08em; }
.usernav .who b { color: var(--ink-2); font-weight: 600; }
:root[data-theme="wetboys"] .usernav .who { text-transform: uppercase; }
.themebtn { font-size: 12px !important; padding: 6px 10px !important; }
nav { gap: 16px; }

/* ---------------------------------------------------------------- page structure */
main { max-width: 1320px; padding: 28px 24px 64px; }
.page > section, .page > .hero, .page > nav.subnav { margin-bottom: 30px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.eyebrow::before { content: var(--eyebrow-prefix); }
:root[data-theme="wetboys"] .eyebrow { border-left: 2px solid var(--accent); padding-left: 8px; }
:root:not([data-theme="wetboys"]) .eyebrow { letter-spacing: 0.08em; color: var(--ink-3); }
.section-title { font-size: 30px; line-height: 1.05; margin: 0 0 16px; }
:root:not([data-theme="wetboys"]) .section-title { font-size: 20px; margin-bottom: 12px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 16px; margin-bottom: 14px; }
.section-head .section-title { margin: 0; }
.wb-only { display: none; }
:root[data-theme="wetboys"] .wb-only { display: block; }

/* hero: title block + operational summary */
.hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.hero-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; border-left: 3px solid var(--accent); padding-left: 22px; }
.tagline { font-size: 13px; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-2); }
.hero-title { margin: 0; font-size: 54px; line-height: 1; overflow-wrap: anywhere; }
.hero-sub { font-style: italic; font-size: 17px; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; }
:root:not([data-theme="wetboys"]) .hero-main { border-left: 0; padding-left: 0; }
:root:not([data-theme="wetboys"]) .tagline { letter-spacing: 0.06em; font-size: 12px; color: var(--ink-3); }
:root:not([data-theme="wetboys"]) .hero-title { font-size: 32px; letter-spacing: -0.02em; }
.summary { position: relative; flex: 1 1 320px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.summary h2 { font-family: var(--font-body); font-size: 13px; letter-spacing: 0.26em; font-weight: 700; margin: 0 0 8px; text-transform: uppercase; }
:root:not([data-theme="wetboys"]) .summary h2 { letter-spacing: 0.04em; color: var(--ink-2); }
.sumrow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.sumrow > span:first-child { font-size: var(--label-size); letter-spacing: var(--label-ls); text-transform: var(--label-tt); color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.sumrow > b { font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.sumrow.total > span:first-child { color: var(--ink); font-weight: 700; }
.sumrow.total > span:first-child::before { content: "/// "; color: var(--accent); }
:root:not([data-theme="wetboys"]) .sumrow.total > span:first-child::before { content: ""; }
.word { letter-spacing: 0.1em; text-transform: uppercase; }
.word.green { color: var(--good-ink); } .word.amber { color: var(--warn-ink); } .word.red { color: var(--crit-ink); } .word.dim { color: var(--ink-3); }

/* restart countdown strip */
.hack { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.hack > div { padding: 14px 10px; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; min-width: 0; }
.hack .lab { font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hack .clock { font-family: var(--font-display); font-size: 24px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hack .at { font-size: 11px; color: var(--ink-3); }
.hack .now { background: color-mix(in srgb, var(--accent) 9%, var(--panel)); }
.hack .now .lab, .hack .now .clock { color: var(--accent); }
.hack .none .clock { color: var(--ink-3); }

/* flight board: header strip + rows (Master Caution, pilots) */
.board { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.board-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft);
  font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.live-dot { color: var(--good); }
.board .pain { gap: 0; }
.board .pain li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 16px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
.board .pain li:last-child { border-bottom: 0; }
.board .pain li.crit { background: color-mix(in srgb, var(--crit) 6%, transparent); }
.pain .pbody { flex: 1 1 380px; min-width: 0; }
.pain .ptitle { font-weight: 700; color: var(--ink-strong); }
:root[data-theme="wetboys"] .pain .ptitle { color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; }
.pain .pdet { font-size: 14px; color: var(--ink-2); }
.pain .lvl { flex: none; display: inline-block; min-width: 76px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 8px; margin: 2px 0 0; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--ink-2); }
.pain .lvl.crit { background: var(--crit); border-color: var(--crit); color: #0b0b0b; }
.pain .lvl.warn { background: var(--warn); border-color: var(--warn); color: #0b0b0b; }
.pain .lvl.info { color: var(--ink-2); }
.pain .dismiss { float: none; margin-left: auto; align-self: center; }
.pain li.dismissall { justify-content: flex-end; }
.pain li.okrow .pdet { color: var(--good-ink); }
#srvpain:empty { display: none; }
#srvpain { margin-top: 14px; }
#srvpain li { border: 1px solid var(--line); background: var(--panel); }

/* server cards */
.srvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.srvcard { position: relative; background: var(--surface); border: 1px solid var(--cut-line, var(--line)); border-radius: var(--radius); display: flex; flex-direction: column; min-width: 0; }
.srvcard.busy { --cut-line: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.srvcard.bad { --cut-line: color-mix(in srgb, var(--crit) 45%, var(--line)); }
.srvcard.off { --cut-line: var(--line); }
.hud { position: relative; height: 150px; margin: 14px; border: 1px solid var(--line-soft); border-radius: calc(var(--radius) - 6px); overflow: hidden;
  background:
    linear-gradient(var(--bracket), var(--bracket)) left top / 14px 2px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) left top / 2px 14px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right top / 14px 2px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right top / 2px 14px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) left bottom / 14px 2px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) left bottom / 2px 14px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right bottom / 14px 2px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right bottom / 2px 14px no-repeat,
    var(--hud-bg); }
.srvcard.bad .hud { --bracket: var(--crit); }
:root:not([data-theme="wetboys"]) .srvcard.bad .hud { --bracket: transparent; border-color: color-mix(in srgb, var(--crit) 35%, transparent); }
.hudlabel { position: absolute; left: 12px; top: 10px; right: 12px; font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); z-index: 1; }
.hudlabel.on { color: var(--good-ink); } .hudlabel.bad { color: var(--crit-ink); } .hudlabel.amber { color: var(--warn-ink); }
.hudmsg { position: absolute; inset: 34px 16px 14px; font-size: 13px; color: var(--ink-2); overflow: hidden; }
.spark { position: absolute; left: 10px; right: 10px; bottom: 10px; width: calc(100% - 20px); height: 96px; }
.spark .g { stroke: var(--grid); stroke-width: 1; }
.spark .l { fill: none; stroke: var(--series-1); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-cap { position: absolute; right: 12px; bottom: 8px; font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; z-index: 1; }
.srvbody { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.srvid { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); overflow-wrap: anywhere; }
:root:not([data-theme="wetboys"]) .srvid { color: var(--ink-3); letter-spacing: 0.04em; text-transform: none; font-size: 12px; }
.srvname { margin: 0; font-family: var(--font-display); font-size: 22px; line-height: 1.15; text-transform: var(--head-tt); overflow-wrap: anywhere; }
:root[data-theme="wetboys"] .srvname { font-weight: 400; }
.srvname a { color: var(--ink-strong); }
.srvsub { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); overflow-wrap: anywhere; }
:root:not([data-theme="wetboys"]) .srvsub { letter-spacing: 0; text-transform: none; font-size: 13px; font-weight: 400; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.stats3 .label { font-size: 10px; color: var(--ink-3); font-weight: 600; }
.stats3 .v { font-family: var(--font-display); font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats3 .v.dim { color: var(--ink-3); }
.srvmeta { font-size: 12px; color: var(--ink-3); }
.srvfoot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.srvfoot .st { white-space: nowrap; }
.srvfoot .st.on { color: var(--good-ink); } .srvfoot .st.amber { color: var(--warn-ink); } .srvfoot .st.bad { color: var(--crit-ink); } .srvfoot .st.off { color: var(--ink-3); }
.srvfoot .oly { white-space: nowrap; }
:root:not([data-theme="wetboys"]) .srvfoot { letter-spacing: 0.02em; text-transform: none; font-size: 13px; font-weight: 600; }
.srvcard details.qa > summary { padding: 6px 12px; }
.srverr { padding: 18px; color: var(--crit-ink); }

/* operation progress inside the HUD frame (and over the server title) */
.hud .opov { inset: 0; border: 0; border-radius: 0; background: color-mix(in srgb, var(--accent) 6%, var(--hud-bg)); padding: 16px 18px; gap: 8px; }
.hud .opov.failed { background: color-mix(in srgb, var(--crit) 8%, var(--hud-bg)); }
.hud .opov.done { background: color-mix(in srgb, var(--good) 6%, var(--hud-bg)); }
.opov-head b { text-transform: var(--label-tt); letter-spacing: var(--label-ls); font-size: 12px; color: var(--warn-ink); }
.opov.done .opov-head b { color: var(--good-ink); }
.hud .opov-time { font-family: var(--font-display); font-size: 22px; color: var(--accent); }
.opsegs { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 4px; }
.opsegs > .seg { height: 6px; background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); border-radius: 0; overflow: hidden; }
.opsegs > .seg.full { background: var(--warn); }
.opov.done .opsegs > .seg, .opov.done .opsegs > .seg > span { background: var(--good); }
.opov.failed .opsegs > .seg.cur > span { background: var(--crit); }
.opsegs > .seg.opbar { height: 6px; border-radius: 0; background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); }
.opsegs > .seg.opbar > span { border-radius: 0; }
:root:not([data-theme="wetboys"]) .opsegs > .seg { border-radius: 3px; }
.opnames { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 4px; font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.opnames span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opnames span.cur { color: var(--accent); }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.tile .label { font-size: var(--label-size); color: var(--ink-3); font-weight: 600; }
.tile .big { font-family: var(--font-display); font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1.2; }
:root[data-theme="wetboys"] .tile .big { font-weight: 400; }
.tile .big small { font-family: var(--font-body); font-size: 13px; color: var(--ink-3); }
.tile .muted { font-size: 13px; }

/* charts framed like a HUD */
.charts2 > div { background: var(--hud-bg); border: 1px solid var(--line-soft); border-radius: calc(var(--radius) - 4px); padding: 12px 14px 30px; height: 240px;
  background:
    linear-gradient(var(--bracket), var(--bracket)) left top / 14px 2px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) left top / 2px 14px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right top / 14px 2px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right top / 2px 14px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) left bottom / 14px 2px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) left bottom / 2px 14px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right bottom / 14px 2px no-repeat,
    linear-gradient(var(--bracket), var(--bracket)) right bottom / 2px 14px no-repeat,
    var(--hud-bg); }
.charts2 > div h3 { font-size: 10px; }
.chart-head h2 { margin: 0; }

/* tabs (server sub-navigation) */
.subnav { gap: 4px 26px; border-bottom: 1px solid var(--line-soft); flex-wrap: nowrap; overflow-x: auto; margin-bottom: 24px; scrollbar-width: thin; }
.subnav a { border: 0; border-radius: 0; background: none; padding: 12px 0; white-space: nowrap; color: var(--ink-2); font-size: 13px; font-weight: 600;
  border-bottom: 2px solid transparent; }
.subnav a.on { background: none; color: var(--ink-strong); border-bottom-color: var(--accent); }
.subnav a:hover { color: var(--ink-strong); }
.subnav a.subtle { color: var(--crit-ink); }
.subnav a.subtle.on { background: none; color: var(--crit-ink); border-bottom-color: var(--crit); }
:root[data-theme="wetboys"] .subnav a { text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; font-weight: 700; }
.crumbs { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
:root:not([data-theme="wetboys"]) .crumbs { letter-spacing: 0.04em; text-transform: none; font-size: 13px; }

/* server page hero */
.srvtitle { min-height: 0; min-width: 0; position: relative; }
.srvtitle .opov { inset: -6px -10px; }
.status-pill { border-radius: var(--radius-sm); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.status-pill.on { color: var(--good-ink); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.status-pill.amber { color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.status-pill.bad { color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 45%, transparent); }

/* tables like the site's flight board */
:root[data-theme="wetboys"] th { font-weight: 600; font-size: 10px; letter-spacing: 0.2em; }
:root[data-theme="wetboys"] td { border-bottom-color: var(--line-soft); }
.board table th, .board table td { padding: 10px 16px; }
.board table td.callsign { font-weight: 700; color: var(--accent); letter-spacing: 0.04em; }
:root:not([data-theme="wetboys"]) .board table td.callsign { color: var(--ink-strong); }

/* forms and misc in the Wet Boys theme */
:root[data-theme="wetboys"] .stack label, :root[data-theme="wetboys"] .row label, :root[data-theme="wetboys"] .grid3 label { color: var(--ink-3); }
:root[data-theme="wetboys"] .callout { border-left-color: var(--accent); background: var(--panel); }
:root[data-theme="wetboys"] .callout.warn { border-left-color: var(--warn); }
:root[data-theme="wetboys"] .choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
:root[data-theme="wetboys"] .flash { background: var(--panel); }
:root[data-theme="wetboys"] .tag { border-radius: 0; text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; }
:root[data-theme="wetboys"] .card h2:first-child, :root[data-theme="wetboys"] .card > .row.between h2, :root[data-theme="wetboys"] .card .chart-head h2 {
  font-family: var(--font-body); font-weight: 700; font-size: 15px; letter-spacing: 0.2em; border-left: 3px solid var(--accent); padding-left: 10px; }
:root[data-theme="wetboys"] .card.narrow > h1:first-child { border-left: 3px solid var(--accent); padding-left: 12px; }
:root[data-theme="wetboys"] .envgrid legend { text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; color: var(--accent); }
:root[data-theme="wetboys"] .wsteps li, :root[data-theme="wetboys"] .wsteps li::before { border-radius: 0; }
:root[data-theme="wetboys"] #toast { border-radius: 0; background: var(--panel); }
pre.log, pre.out { background: var(--hud-bg); border: 1px solid var(--line-soft); }

/* theme picker on the Account page */
.themepick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.themepick label { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; color: var(--ink) !important; }
.themepick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.themepick .pv { height: 64px; border: 1px solid rgba(128,128,128,0.35); position: relative; overflow: hidden; }
.themepick .pv i { position: absolute; left: 10px; right: 30%; height: 7px; }
.themepick .pv i:nth-child(1) { top: 12px; } .themepick .pv i:nth-child(2) { top: 28px; right: 50%; } .themepick .pv i:nth-child(3) { top: 44px; right: 60%; }
.pv.wetboys { background: #070b0e; } .pv.wetboys i { background: #2a3239; } .pv.wetboys i:nth-child(1) { background: #edbe56; }
.pv.modern { background: #0b0e12; border-radius: 10px; } .pv.modern i { background: #1c232b; border-radius: 4px; } .pv.modern i:nth-child(1) { background: #4cc2ff; }
.pv.light { background: #f3f3f1; border-radius: 10px; } .pv.light i { background: #e1e0d9; border-radius: 4px; } .pv.light i:nth-child(1) { background: #1f6bc4; }
.themepick .tn { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.swatch.theme { background: conic-gradient(#edbe56 0 33%, #4cc2ff 0 66%, #1f6bc4 0); }

/* ---------------------------------------------------------------- phones */
@media (max-width: 720px) {
  .topin { padding: 10px 16px; }
  .mainnav { gap: 4px 18px; order: 3; width: 100%; }
  main { padding: 18px 16px 48px; }
  .hero-title { font-size: 34px; }
  :root:not([data-theme="wetboys"]) .hero-title { font-size: 26px; }
  .hero-sub { font-size: 15px; }
  .hero-main { padding-left: 14px; }
  .section-title { font-size: 24px; }
  .page > section, .page > .hero { margin-bottom: 22px; }
  .hack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hack .clock { font-size: 19px; }
  .charts2 { grid-template-columns: minmax(0, 1fr); }
  .usernav .who { display: none; }
}
@media (max-width: 400px) { .brand-s { display: none; } }
.opsegs[data-n="1"], .opnames[data-n="1"] { --n: 1; } .opsegs[data-n="2"], .opnames[data-n="2"] { --n: 2; }
.opsegs[data-n="3"], .opnames[data-n="3"] { --n: 3; } .opsegs[data-n="4"], .opnames[data-n="4"] { --n: 4; }
.opsegs[data-n="5"], .opnames[data-n="5"] { --n: 5; } .opsegs[data-n="6"], .opnames[data-n="6"] { --n: 6; }
.card.narrow.wide { max-width: 640px; }
.tiles + .charts2 { margin-top: 20px; }
.srvhero .hero-title { font-size: 46px; }
:root:not([data-theme="wetboys"]) .srvhero .hero-title { font-size: 30px; }
.hero-actions .status-pill { padding: 8px 14px; }
#pending, #srvpain, .page > .callout, .page > .flash { margin-bottom: 20px; }
@media (max-width: 720px) { .srvhero .hero-title { font-size: 30px; } }
.srvname { letter-spacing: 0.02em; font-size: 21px; }
:root:not([data-theme="wetboys"]) .srvname { letter-spacing: -0.01em; font-size: 18px; }
.srvfoot > :first-child:empty { display: none; }
/* server page: progress sits under the title instead of covering it */
.srvtitle .opov { position: relative; inset: auto; margin-top: 12px; max-width: 640px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--warn); }
.srvtitle .opov.done { border-left-color: var(--good); } .srvtitle .opov.failed { border-left-color: var(--crit); }
.pain li > .lvl:first-child { margin-right: 12px; vertical-align: 1px; }
.board .pain li > .lvl:first-child { margin-right: 0; }
.srvcard .cancelbtn { width: 100%; margin-top: 6px; min-height: 40px; border-color: var(--accent) !important; color: var(--accent) !important; background: transparent; }
.srvcard .cancelbtn:hover { background: var(--accent-soft) !important; }
td.detail div + div { margin-top: 2px; } td.detail { overflow-wrap: anywhere; min-width: 260px; }

/* players: action menu, dialog, chat log */
td.actions { width: 1%; white-space: nowrap; text-align: right; }
.pmenu .qa-menu hr { border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.pmenu .qa-menu a { display: block; padding: 7px 10px; color: var(--ink); }
.pdlg { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 22px 24px; width: min(460px, calc(100vw - 32px)); }
.pdlg::backdrop { background: rgba(0, 0, 0, 0.6); }
.pdlg h2 { margin: 0; }
.pdlg input, .pdlg select { width: 100%; }
:root[data-theme="wetboys"] .pdlg { border-top: 3px solid var(--accent); }
button.danger.solid, .pdlg button.primary.solid.danger { background: var(--crit); border-color: var(--crit); color: #0b0b0b; }
.chatlog td:last-child { overflow-wrap: anywhere; min-width: 240px; }
td.nowrap { white-space: nowrap; }
tr.admin-row td { color: var(--warn-ink); }
.board-head a { letter-spacing: 0.12em; }
.optgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px 22px; }
.optgrid label { display: flex; flex-direction: column; gap: 4px; }
label.check { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; }
label.check input { width: auto; }
details.more { margin: 6px 0 4px; } details.more > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 6px 0; }
details.more[open] > summary { margin-bottom: 12px; }
tr.clash td { color: var(--crit-ink); }
.tile .big.dim { color: var(--ink-3); }
.err { color: var(--crit-ink); }
:root[data-theme] .pdlg #pdlg-go.danger { background: var(--crit); border-color: var(--crit); color: #0b0b0b; }
:root[data-theme] .pdlg #pdlg-go:not(.danger) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* the main nav has grown: tighten it before it wraps onto a second row */
.mainnav { gap: 6px 18px; }
:root[data-theme="wetboys"] .mainnav a { letter-spacing: 0.1em; }
.usernav .who { display: none; }
@media (max-width: 1280px) and (min-width: 721px) {
  .topin { justify-content: flex-start; }
  .mainnav { order: 3; width: 100%; }
}
input.wide { min-width: min(360px, 70vw); }
.pnote { border-left: 3px solid var(--line); padding: 6px 12px; margin: 10px 0; }
.pnote-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pnote-text { white-space: pre-wrap; overflow-wrap: anywhere; }
:root[data-theme="wetboys"] .pnote { border-left-color: var(--accent); background: var(--panel); }
.rule { border: 1px solid var(--line-soft); padding: 12px 14px; margin: 10px 0; background: var(--panel); }
.rule-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 2px 4px 2px 10px; border-radius: var(--radius-sm); }
/* Admin dropdown in the top bar */
.navmenu { position: relative; }
.navmenu > summary { list-style: none; cursor: pointer; color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 4px 0; border-bottom: 2px solid transparent; }
.navmenu > summary::-webkit-details-marker { display: none; }
.navmenu > summary[aria-current="page"] { color: var(--ink-strong); border-bottom-color: var(--accent); }
.navmenu > summary:hover { color: var(--ink-strong); }
:root[data-theme="wetboys"] .navmenu > summary { text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; }
.navmenu-list { position: absolute; top: calc(100% + 8px); left: -12px; z-index: 30; min-width: 210px; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.mainnav .navmenu-list a { padding: 8px 10px; border-bottom: 0; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.mainnav .navmenu-list a[aria-current="page"] { color: var(--accent); }
.mainnav .navmenu-list a:hover { background: var(--surface-2); }
textarea.short { min-height: 0; height: auto; resize: vertical; }
.row.days { gap: 6px 16px; }
h3#msched { margin-top: 26px; }
/* live chat */
.chatbox { display: flex; flex-direction: column; }
.chatlines { list-style: none; margin: 0; padding: 8px 16px; height: min(60vh, 560px); overflow-y: auto; font-size: 14px; }
.chatlines li { padding: 4px 0; border-bottom: 1px solid var(--line-soft); display: grid; grid-template-columns: max-content minmax(90px, 200px) 1fr; gap: 10px; align-items: baseline; }
.chatlines .t { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chatlines .who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatlines .who.blue { color: #6fb2ff; } .chatlines .who.red { color: #ff8a80; } .chatlines .who.web { color: var(--accent); }
.chatlines .msg { overflow-wrap: anywhere; }
.chatlines .scope { font-size: 11px; color: var(--ink-3); margin-right: 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.chatlines li.empty { display: block; color: var(--ink-3); border: 0; }
.chatform { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chatform select { flex: 0 1 200px; min-width: 0; }
.chatform input { flex: 1 1 260px; min-width: 0; }
@media (max-width: 720px) { .chatlines li { grid-template-columns: max-content 1fr; } .chatlines .msg { grid-column: 1 / -1; } }

/* ---- batch C: audit filters, public page ---- */
.good-ink { color: var(--good-ink); } .crit-ink { color: var(--crit-ink); }
.nowrap { white-space: nowrap; }
.auditfilter { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; align-items: end; margin-bottom: 14px; }
.auditfilter label { display: flex; flex-direction: column; gap: 4px; }
.auditfilter .row { grid-column: 1 / -1; }
.spaced { margin-top: 22px; }
.live-dot.off { color: var(--ink-3); animation: none; }
/* ---- two-step login ---- */
.qrbox { margin: 10px 0; }
.qrbox #qr { display: inline-block; background: #fff; padding: 10px; border-radius: 6px; line-height: 0; }
.qrbox #qr img { width: 200px; height: 200px; image-rendering: pixelated; }
ol.steps li { margin-bottom: 12px; }
ul.rcodes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
ul.rcodes code { font-size: 16px; letter-spacing: 0.05em; }
.tag.ok { color: var(--good-ink); border-color: var(--good); }
/* ---- announcements ---- */
.rule.off { opacity: 0.6; }
.annform { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
a.lnk { padding: 2px 4px; color: var(--accent); text-decoration: none; }
:root[data-theme="wetboys"] a.lnk { text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; font-weight: 700; }
.appfoot { text-align: center; color: var(--ink-3); font-size: 11px; letter-spacing: 0.06em; padding: 24px 16px 28px; }
/* ---- v1.2 ---- */
.sidelocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 12px 0; }
.sidelocks .rule { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cols2 { display: grid; grid-template-columns: minmax(200px, 1fr) 3fr; gap: 16px; }
@media (max-width: 800px) { .cols2 { grid-template-columns: 1fr; } }
ol.toplist { margin: 0; padding-left: 20px; } ol.toplist li { padding: 1px 0; }
.warn-ink { color: var(--warn-ink); }
[hidden] { display: none !important; }
/* ---- BDA ---- */
.bdamap { height: 380px; background: #0a0c10; }
.bda-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.bda-tiles .tile { display: flex; flex-direction: column; gap: 2px; }
.bda-tiles .tile b { font: 28px var(--font-display); }
.bda-cols { grid-template-columns: 1fr 1.4fr; }
td.ind { padding-left: 22px; }
tr.grp td { background: var(--surface-2); }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 6px var(--good); margin-left: 6px; vertical-align: middle; }
.bdamap.leaflet-container { background: #0a0c10; }
/* ---- v1.5 declutter: 4 areas, name menu, Jump to, server tabs ---- */
.jumpbtn { display: inline-flex; align-items: center; gap: 22px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-3); padding: 6px 10px; font-size: 13px; border-radius: var(--radius-sm); cursor: pointer; }
.jumpbtn:hover { border-color: var(--accent); color: var(--ink); }
kbd { font: 11px ui-monospace, Consolas, monospace; border: 1px solid var(--line); padding: 0 5px; border-radius: 3px; color: var(--ink-3); }
.usermenu > summary { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); padding: 5px 10px; border-radius: var(--radius-sm); border-bottom-width: 1px; }
.usermenu > summary .online-dot { margin: 0 4px 0 0; }
.usermenu .navmenu-list { left: auto; right: 0; }
.usermenu .navmenu-list a, .usermenu .menubtn { display: block; width: 100%; text-align: left; padding: 8px 10px; color: var(--ink); background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.usermenu .navmenu-list a:hover, .usermenu .menubtn:hover { background: var(--surface-2); text-decoration: none; }
.usermenu form { margin: 0; }
.menu-who { padding: 6px 10px 8px; font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.areanav, .subnav2 { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.areanav a, .subnav2 a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink-2); font-size: 13px; background: var(--surface); }
.areanav a[aria-current="page"], .subnav2 a.on { border-color: var(--accent); color: var(--ink-strong); background: var(--accent-soft, var(--surface-2)); }
.areanav a:hover, .subnav2 a:hover { text-decoration: none; border-color: var(--axis, var(--accent)); }
.subnav2 a.danger { color: var(--crit-ink); }
.subnav.tabs { margin-bottom: 14px; }
.subnav.tabs + .subnav2 { margin-top: -2px; }
.srvbar { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.srvbar a { color: var(--ink-2); }
.srvswitch > summary { color: var(--ink); font-weight: 600; }
.srvswitch .navmenu-list { left: 0; }
.srvswitch .navmenu-list a { padding: 8px 10px; color: var(--ink); }
.srvswitch .navmenu-list a:hover { background: var(--surface-2); text-decoration: none; }
.srvhero.compact { margin-bottom: 16px !important; }
.srvhero.compact .hero-title { font-size: 30px; }
.srvhero.compact .tagline { display: none; }
.wiz-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
/* Jump to (Ctrl K) */
.jumpdlg { width: min(620px, calc(100vw - 24px)); max-height: min(560px, 80vh); padding: 0; border: 1px solid var(--accent); background: var(--panel); color: var(--ink); border-radius: var(--radius-sm); margin-top: 10vh; }
.jumpdlg::backdrop { background: rgba(0, 0, 0, 0.6); }
.jumpdlg input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 14px 18px; font-size: 17px; color: var(--ink); border-radius: 0; }
.jumpdlg input:focus { outline: none; }
#jumplist { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; max-height: calc(min(560px, 80vh) - 100px); }
#jumplist li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 18px; cursor: pointer; border-left: 2px solid transparent; }
#jumplist li .ctx { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
#jumplist li[aria-selected="true"] { background: var(--surface-2); border-left-color: var(--accent); }
#jumplist li.empty { color: var(--ink-3); cursor: default; }
.jumpfoot { display: flex; gap: 18px; padding: 8px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
/* phones: the 4 areas become a bottom bar at thumb height */
@media (max-width: 720px) {
  .mainnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; width: auto; order: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 0; background: var(--panel); border-top: 1px solid var(--line); padding: 0 0 env(safe-area-inset-bottom); }
  .mainnav a { text-align: center; padding: 14px 0 12px; border-bottom: 0; border-top: 2px solid transparent; font-size: 11px !important; }
  .mainnav a[aria-current="page"] { border-top-color: var(--accent); color: var(--accent); }
  body { padding-bottom: 60px; }
  .jumpbtn { gap: 0; padding: 7px 10px; } .jumpbtn kbd { display: none; }
  .areanav, .subnav2 { flex-wrap: nowrap; overflow-x: auto; }
  .areanav a, .subnav2 a { white-space: nowrap; }
}
/* ---- new-server wizard: ports ---- */
.porttable td:first-child { width: 1%; }
.porttable input[type="number"] { width: 110px; }
.porttable .why { color: var(--ink-3); font-size: 13px; }
.fwnote { font-size: 13px; color: var(--ink-2); }
@media (min-width: 721px) { .mainnav { order: 0; width: auto; } .topin { justify-content: space-between; } }
.board .pad { padding: 14px 18px; } .board .pad > :last-child { margin-bottom: 0; }
:root[data-theme] button.jumpbtn { clip-path: none; text-transform: none; letter-spacing: 0; font-family: inherit; font-weight: 400; font-size: 13px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-3); padding: 6px 10px; min-height: 0; }
:root[data-theme] button.jumpbtn:hover { border-color: var(--accent); color: var(--ink); background: var(--panel); }
:root[data-theme] .page .srvhero.compact .hero-title { font-size: 30px; }
:root[data-theme] .usermenu button.menubtn { clip-path: none; text-transform: none; letter-spacing: 0; font-family: inherit; font-weight: 400; border: 0; background: none; color: var(--ink); min-height: 0; }
:root[data-theme] .usermenu button.menubtn:hover { background: var(--surface-2); color: var(--ink); }
/* the top bar stays put while you scroll (phones use the bottom bar instead) */
@media (min-width: 721px) {
  header.top { position: sticky; top: 0; z-index: 1100; }
  html { scroll-padding-top: 84px; }
}

/* sortable tables */
:root[data-theme] table.sortable th button.sorthead { cursor: pointer; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; display: inline-flex; gap: 4px; align-items: center;
  background: none; border: 0; padding: 0; margin: 0; clip-path: none; min-height: 0; text-decoration: none; }
table.sortable th button.sorthead::after { content: "↕"; opacity: .35; font-size: .9em; }
table.sortable th[aria-sort="ascending"] button.sorthead::after { content: "▲"; opacity: .9; }
table.sortable th[aria-sort="descending"] button.sorthead::after { content: "▼"; opacity: .9; }
table.sortable th button.sorthead:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tag.qa { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.envpick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
#qalog td.detail, #qalog td.small { max-width: 460px; min-width: 200px; overflow-wrap: anywhere; }
#qalog td:nth-child(4) { max-width: 220px; overflow-wrap: anywhere; }
#fwrules td, #fwothers td { overflow-wrap: anywhere; }
#qalog { table-layout: fixed; width: 100%; min-width: 1000px; }
#qalog th:nth-child(1) { width: 140px; } #qalog th:nth-child(2) { width: 110px; } #qalog th:nth-child(3) { width: 60px; }
#qalog th:nth-child(4) { width: 130px; } #qalog th:nth-child(5) { width: 150px; } #qalog th:nth-child(6) { width: 120px; }
#qalog th:nth-child(8) { width: 170px; }
#qalog td { overflow-wrap: anywhere; white-space: normal; }
#qalog td.nowrap { white-space: nowrap; }

/* ---- popularity (Pilots page, pilot page) */
.seglinks { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seglinks a { padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: var(--label-ls); text-transform: var(--label-tt); }
.seglinks a:hover { text-decoration: none; color: var(--ink); background: var(--surface-2); }
.seglinks a.on { background: var(--accent); color: var(--accent-ink); }
.heatwrap { overflow-x: auto; } .heat { display: block; width: 100%; min-width: 560px; height: auto; }
.heat .hl { fill: var(--ink-3); font: 11px var(--font-body); }
.lv0 { fill: var(--surface-2); } .lv1 { fill: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
.lv2 { fill: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); } .lv3 { fill: color-mix(in srgb, var(--accent) 70%, var(--surface-2)); }
.lv4 { fill: var(--accent); }
.heatlegend { display: flex; gap: 5px; align-items: center; font-size: 11px; color: var(--ink-3); margin-top: 8px; }
.heatlegend i { display: inline-block; width: 16px; height: 10px; }
.heatlegend i.lv0 { background: var(--surface-2); } .heatlegend i.lv1 { background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
.heatlegend i.lv2 { background: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); } .heatlegend i.lv3 { background: color-mix(in srgb, var(--accent) 70%, var(--surface-2)); }
.heatlegend i.lv4 { background: var(--accent); }
.weeks { display: inline-block; vertical-align: middle; width: 80px; height: 24px; margin-right: 6px; } .weeks rect { fill: var(--accent); opacity: .55; } .weeks rect.now { opacity: 1; }
.weeks .base { stroke: var(--line); stroke-width: 1; }
.sharebar { display: inline-block; vertical-align: middle; width: 90px; height: 8px; margin-right: 8px; }
.sharebar .trk { fill: var(--surface-2); } .sharebar .val { fill: var(--accent); }
td.cell { padding: 3px 4px; } td.cell span { display: block; padding: 5px 8px; text-align: right; font-variant-numeric: tabular-nums; border-radius: var(--radius-sm); }
td.cell span.lv0 { color: var(--ink-3); background: transparent; }
td.cell span.lv1 { background: color-mix(in srgb, var(--accent) 18%, transparent); }
td.cell span.lv2 { background: color-mix(in srgb, var(--accent) 38%, transparent); }
td.cell span.lv3 { background: color-mix(in srgb, var(--accent) 62%, transparent); color: var(--accent-ink); }
td.cell span.lv4 { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.trend-up { color: var(--good-ink); } .trend-down { color: var(--crit-ink); }
.popgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.srvbars { display: grid; gap: 10px; } .srvbars .sharebar { width: 100%; height: 8px; margin: 4px 0 0; }
.popgrid .lbl, .card > .lbl { font-size: var(--label-size); letter-spacing: var(--label-ls); text-transform: var(--label-tt); color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.bignum { font-family: var(--font-display); font-size: 34px; line-height: 1.1; color: var(--ink-strong); }
.popgrid p { margin: 6px 0 0; }
.card.podium1 { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.hero-side { display: flex; align-items: flex-end; }
.srvbars .rivalrow > span { display: block; }
details.inline-edit { display: inline-block; margin-left: 8px; }
details.inline-edit summary { display: inline; cursor: pointer; color: var(--accent); list-style: none; }
details.inline-edit summary::-webkit-details-marker { display: none; }
details.inline-edit[open] { display: flex; gap: 6px; align-items: center; margin: 6px 0 0; }
details.inline-edit[open] input { min-width: 280px; }
.periodpick { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.periodpick select { min-width: 190px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- profile pictures */
.avatar { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: visible;
  background: var(--surface-2); color: var(--accent); font-weight: 700; border: 2px solid var(--accent); vertical-align: middle; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar.xs { width: 24px; height: 24px; font-size: 10px; border-width: 1px; margin-right: 8px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; border-width: 1px; margin-right: 6px; }
.avatar.sm .online-dot { position: absolute; right: -2px; bottom: -2px; margin: 0; }
.avatar.xl { width: 112px; height: 112px; font-size: 38px; border-width: 3px; }
.profile-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.profile-id { flex: 1 1 320px; min-width: 0; } .profile-id h1 { margin: 2px 0 4px; overflow-wrap: anywhere; }
.profile-id p { margin: 4px 0; }
.avatar-form { flex: 0 1 280px; }
a.person { display: inline-flex; align-items: center; color: inherit; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; }
.row .grow { flex: 1 1 260px; }
/* ---- show / hide password */
.pwwrap { position: relative; display: block; }
.pwwrap input { width: 100%; padding-right: 44px; }
.pwwrap .pweye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center;
  background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: 0; }
.pwwrap .pweye:hover, .pwwrap .pweye:focus-visible { color: var(--accent); }
.pwwrap .pweye svg { width: 20px; height: 20px; }
#about textarea { min-height: 72px; height: auto; }

/* Maintenance: after a reboot */
.bootform { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 16px; }
.bootform .popgrid > fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px 12px; gap: 6px; }
.bootform legend { font-weight: 600; padding: 0 4px; }
.bootform > button { align-self: flex-start; }

/* View as role: read-only preview banner */
.viewas { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--warn, #b8860b); color: #111; font-size: 0.95rem; }
:root .viewas a.button, :root .viewas a.button:hover, :root[data-theme] .viewas a.button, :root[data-theme] .viewas a.button:hover { background: #111; color: #fff; border-color: #111; }
.viewas a.button::before, .viewas a.button::after { display: none; }
#fixclash fieldset.clash { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 14px 10px; gap: 6px; }
#fixclash fieldset.clash legend { padding: 0 4px; }
#fixclash input[type=radio] { width: auto; }

/* Filter chips (Pilots roster, People & roles), squadrons, team kills */
.filterbar { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; }
.fchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fchips .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3, var(--muted)); margin-right: 4px; }
a.fchip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--ink-2); font-size: 13px; }
a.fchip:hover { text-decoration: none; color: var(--ink-strong); border-color: var(--ink-3, var(--line)); }
a.fchip.on { border-color: var(--accent); color: var(--ink-strong); box-shadow: inset 0 0 0 1px var(--accent); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.dot.live { background: var(--good); }
.sq { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; }
td.tkn { color: var(--crit-ink); font-weight: 700; }
.sqtable input[type=color] { width: 44px; height: 30px; padding: 2px; }
.sqtable input[name=name] { min-width: 14em; }
.side-blue { color: #5aa9ff; font-weight: 700; }
.side-red { color: #ff6b5e; font-weight: 700; }
:root[data-theme="light"] .side-blue { color: #1f5fbf; }
:root[data-theme="light"] .side-red { color: #b3261e; }
a.button.discord-btn { display: flex; justify-content: center; background: #5865f2; border-color: #5865f2; color: #fff; }
a.button.discord-btn:hover { background: #4752c4; color: #fff; text-decoration: none; }
.card .or { text-align: center; margin: 10px 0 6px; }
