/* Oakridge Moderation. Warm charcoal with the Oakridge ember, in a dark and a light theme. */
:root {
  --bg: #0d0a08; --bg-2: #130f0c; --panel: #18130e; --panel-2: #1f1913; --raise: #2a221a;
  --line: rgba(255, 228, 200, .1); --line-2: rgba(255, 228, 200, .2);
  --text: #f7efe6; --text-2: #d8c9b9; --muted: #a39384;
  --ember: #f08a3c; --ember-2: #ffb36b; --ember-soft: rgba(240, 138, 60, .14); --on-ember: #1d0f04;
  --danger: #ef5a4c; --danger-soft: rgba(239, 90, 76, .14);
  --ok: #4cc38a; --ok-soft: rgba(76, 195, 138, .14);
  --warn: #f0b429; --warn-soft: rgba(240, 180, 41, .14);
  --info: #6aa5ff; --info-soft: rgba(106, 165, 255, .14);
  --shadow: 0 16px 40px rgba(0, 0, 0, .5);
  --r: 12px; --r-sm: 8px;
  --display: 'Poppins', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f3ee; --bg-2: #f1ebe3; --panel: #ffffff; --panel-2: #faf6f1; --raise: #f1e9df;
  --line: rgba(70, 45, 20, .12); --line-2: rgba(70, 45, 20, .26);
  --text: #23180f; --text-2: #4a3b2e; --muted: #7b6b5c;
  --ember: #cf6517; --ember-2: #a94f0d; --ember-soft: rgba(207, 101, 23, .11); --on-ember: #fff;
  --danger: #c93a2c; --danger-soft: rgba(201, 58, 44, .1);
  --ok: #1c8f5a; --ok-soft: rgba(28, 143, 90, .11);
  --warn: #a8790a; --warn-soft: rgba(168, 121, 10, .12);
  --info: #2c69cc; --info-soft: rgba(44, 105, 204, .1);
  --shadow: 0 16px 40px rgba(70, 45, 20, .16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 14.5px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--ember-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 17px; }
h3 { font-size: 14.5px; font-family: var(--body); }
p { margin: 0; }
code, .mono { font: 12.5px/1.4 ui-monospace, 'Cascadia Code', Consolas, monospace; }
code { background: var(--raise); padding: 1px 6px; border-radius: 5px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.nowrap { white-space: nowrap; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
svg.icon { flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

/* ---------- Buttons and inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 600 13.5px/1 var(--body); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { background: var(--raise); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--ember); border-color: transparent; color: var(--on-ember); }
.btn.primary:hover { background: var(--ember-2); }
[data-theme="light"] .btn.primary:hover { background: var(--ember-2); }
.btn.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--raise); color: var(--text); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.icon-only { width: 36px; padding: 0; }
.btn.sm.icon-only { width: 30px; }
.btn.discord { background: #5865f2; border-color: transparent; color: #fff; height: 44px; padding: 0 20px; font-size: 15px; }
.btn.discord:hover { background: #4752c4; }

.input, select.input, textarea.input { width: 100%; min-height: 36px; padding: 7px 11px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 14px/1.4 var(--body); }
textarea.input { resize: vertical; min-height: 76px; }
.input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
.input::placeholder { color: var(--muted); opacity: .8; }
select.input { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.input.narrow { width: 110px; }
.search { position: relative; }
.search .input { padding-left: 34px; }
.search svg { position: absolute; left: 10px; top: 9px; color: var(--muted); }

.switch { flex: none; position: relative; width: 40px; height: 23px; border-radius: 99px; border: 0; background: var(--line-2); cursor: pointer; transition: background .15s; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--ember); }
.switch[aria-checked="true"]::after { transform: translateX(17px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 262px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 16px 12px 12px; background: var(--bg-2); border-right: 1px solid var(--line); scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand strong { display: block; font: 600 15px/1.15 var(--display); }
.brand small { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ember-2); font-weight: 600; }
.server { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); }
.server img, .server .ph { width: 30px; height: 30px; border-radius: 9px; background: var(--raise); object-fit: cover; flex: none; display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.server b { display: block; font-size: 13px; line-height: 1.25; }
.server span { font-size: 11.5px; color: var(--muted); }
.nav-group { margin: 16px 10px 6px; font: 600 10.5px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; font-size: 13.5px; }
.nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--ember-soft); color: var(--ember-2); }
.nav a .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.nav a .dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.side .foot { margin-top: auto; padding: 14px 8px 2px; font-size: 11.5px; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 28px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .menu { display: none; }
.kbd-search { display: flex; align-items: center; gap: 9px; height: 36px; min-width: 240px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); font: 13.5px var(--body); cursor: pointer; }
.kbd-search:hover { border-color: var(--ember); }
.kbd-search kbd { margin-left: auto; font: 600 11px var(--body); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.online i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.pill.error i { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.pill.connecting i { background: var(--warn); }
.avatar { border-radius: 50%; background: var(--raise); object-fit: cover; flex: none; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: 600 13px var(--body); cursor: pointer; }
.user-btn:hover { border-color: var(--line-2); }
.page { width: 100%; max-width: 1140px; margin: 0 auto; padding: 28px 28px 90px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-head .lead { color: var(--text-2); margin-top: 6px; max-width: 70ch; }
.page-head .tile { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--ember-soft); color: var(--ember-2); flex: none; }

/* ---------- Cards and pieces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.card > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card > .body { padding: 18px; }
.card.flat > .body { padding: 0; }
.grid { display: grid; gap: 16px; }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.stat { padding: 16px 18px; }
.stat .n { font: 700 28px/1.1 var(--display); margin-top: 6px; }
.stat .l { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; gap: 7px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; background: var(--raise); color: var(--text-2); white-space: nowrap; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.mute { background: rgba(232, 133, 58, .15); color: var(--ember-2); }
.badge.kick, .badge.softban { background: rgba(239, 122, 76, .15); color: #f2906a; }
.badge.ban, .badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.unmute, .badge.unban, .badge.good { background: var(--ok-soft); color: var(--ok); }
.badge.info { background: var(--info-soft); color: var(--info); }
[data-theme="light"] .badge.kick, [data-theme="light"] .badge.softban { color: #c0562c; }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--raise); border: 1px solid var(--line); font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; display: grid; }
.chip button:hover { color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font: 600 16px var(--display); margin-bottom: 4px; }
.notice { display: flex; gap: 12px; padding: 13px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.notice.bad { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: var(--danger-soft); }
.notice.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-soft); }
.notice.good { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.notice svg { margin-top: 2px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { padding: 9px 13px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 600 13.5px var(--body); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--ember-2); border-bottom-color: var(--ember); }
.tabs button span { margin-left: 6px; font-size: 11.5px; padding: 1px 6px; border-radius: 99px; background: var(--raise); color: var(--text-2); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toggle-chip { height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: 600 12.5px var(--body); cursor: pointer; }
.toggle-chip:hover { border-color: var(--ember); }
.toggle-chip.on { background: var(--ember-soft); border-color: var(--ember); color: var(--ember-2); }

/* ---------- Tables and lists ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 600 11px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover { background: var(--panel-2); }
.table .num { font-weight: 700; color: var(--muted); white-space: nowrap; }
.table .reason { max-width: 340px; color: var(--text-2); }
.person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.person b { display: block; font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voided td { opacity: .5; }
.list > * { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: inherit; }
.list > *:last-child { border-bottom: 0; }
.list > a:hover { background: var(--panel-2); text-decoration: none; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.scroll-x { overflow-x: auto; }

/* ---------- Settings forms ---------- */
.section { margin-bottom: 18px; }
.section > header h2 { font-size: 15.5px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 8px 28px; align-items: start; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field.wide { grid-template-columns: minmax(0, 1fr); }
.field label { font-weight: 600; display: block; }
.field .help { color: var(--muted); font-size: 13px; margin-top: 3px; max-width: 62ch; }
.field .control { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-height: 36px; min-width: 0; }
.field.wide .control { justify-content: stretch; display: block; }
.field.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 40% { background: var(--ember-soft); } 100% { background: transparent; } }
.duration { display: flex; gap: 6px; width: 100%; }
.duration .input:first-child { flex: 1; min-width: 0; }
.duration select { width: 118px; flex: none; }
.color { display: flex; gap: 8px; align-items: center; width: 100%; }
.color input[type="color"] { width: 40px; height: 36px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg-2); cursor: pointer; flex: none; }
.unit { display: flex; align-items: center; gap: 8px; width: 100%; }
.unit span { color: var(--muted); font-size: 13px; white-space: nowrap; }

.picker { position: relative; width: 100%; }
.picker-btn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; min-height: 36px; padding: 5px 30px 5px 8px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 14px var(--body); cursor: pointer; text-align: left; position: relative; }
.picker-btn:hover, .picker.open .picker-btn { border-color: var(--ember); }
.picker-btn::after { content: ''; position: absolute; right: 12px; top: 14px; width: 7px; height: 7px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(45deg); }
.picker-btn .ph { color: var(--muted); padding-left: 3px; }
.pop { position: absolute; z-index: 60; top: calc(100% + 5px); left: 0; right: 0; min-width: 240px; max-height: 300px; display: flex; flex-direction: column; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: var(--shadow); overflow: hidden; }
.pop.up { top: auto; bottom: calc(100% + 5px); }
.pop .input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none !important; }
.pop ul { list-style: none; margin: 0; padding: 5px; overflow-y: auto; }
.pop li { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.pop li:hover, .pop li.at { background: var(--raise); }
.pop li.sel { color: var(--ember-2); font-weight: 600; }
.pop li.head { cursor: default; background: none; font: 600 10.5px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 9px 3px; }
.pop li i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.pop li .tick { margin-left: auto; }
.pop .none { padding: 14px; color: var(--muted); text-align: center; font-size: 13px; }

.items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.item { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); }
.item > header { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; cursor: pointer; }
.item > header b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item > header span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.item > .inner { border-top: 1px solid var(--line); padding: 4px 0; }
.item .field { padding: 11px 14px; border-bottom: 0; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); }
.item .field .control { justify-content: stretch; }
.ctable { width: 100%; border-collapse: collapse; }
.ctable th { text-align: left; font: 600 11px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 10px; }
.ctable td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.ctable td:first-child { width: 100%; }
.ctable td .picker { width: 220px; }
.ctable tr.group td { border-top: 0; padding-top: 18px; font: 600 12.5px var(--body); color: var(--ember-2); letter-spacing: .04em; }
.ctable tr.group:first-child td { padding-top: 4px; }
.ctable .row-note { display: block; color: var(--muted); font-size: 12px; }

.savebar { position: fixed; z-index: 40; left: 50%; bottom: 22px; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: transform .22s cubic-bezier(.2, .9, .3, 1.2); max-width: calc(100vw - 24px); }
.savebar.show { transform: translate(-50%, 0); }
.savebar b { font-size: 13.5px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.danger-zone > header h2 { color: var(--danger); }

/* ---------- Charts ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 8px; }
.bars .day { flex: 1; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; position: relative; }
.bars .stack-bar { align-self: end; display: flex; flex-direction: column-reverse; border-radius: 5px 5px 2px 2px; overflow: hidden; min-height: 3px; background: var(--raise); }
.bars .seg { min-height: 2px; }
.bars .day small { text-align: center; color: var(--muted); font-size: 10.5px; margin-top: 6px; white-space: nowrap; overflow: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.seg.warn, .legend .warn { background: #f0b429; } .seg.mute, .legend .mute { background: #e8853a; } .seg.kick, .legend .kick { background: #ef7a4c; }
.seg.softban, .legend .softban { background: #ef5a4c; } .seg.ban, .legend .ban { background: #d93a3a; } .seg.unmute, .seg.unban, .legend .lift { background: #4cc38a; }

/* ---------- Overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(8, 5, 3, .62); display: grid; place-items: center; padding: 20px; animation: fade .12s ease-out; }
[data-theme="light"] .overlay { background: rgba(50, 35, 20, .38); }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); animation: rise .16s ease-out; }
.modal.wide { width: min(760px, 100%); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.modal > header { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.modal > .body { padding: 18px 20px; overflow-y: auto; }
.modal > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.drawer-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(8, 5, 3, .5); animation: fade .12s ease-out; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(500px, 100%); display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line-2); box-shadow: var(--shadow); animation: slide .2s cubic-bezier(.2, .8, .3, 1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer > header { display: flex; align-items: center; gap: 10px; padding: 16px 14px 14px 20px; border-bottom: 1px solid var(--line); }
.drawer > .body { flex: 1; overflow-y: auto; padding: 18px 20px; display: grid; gap: 16px; align-content: start; }
.drawer > footer { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 9px 14px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.toasts { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; justify-items: end; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 11px 15px; border-radius: 11px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 500; animation: rise .16s ease-out; }
.toast.bad { border-color: var(--danger); } .toast.bad svg { color: var(--danger); }
.toast.good svg { color: var(--ok); }
.menu-pop { position: absolute; z-index: 60; right: 0; top: calc(100% + 6px); min-width: 190px; padding: 5px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: var(--shadow); }
.menu-pop button, .menu-pop a { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: 500 13.5px var(--body); cursor: pointer; text-align: left; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--raise); text-decoration: none; }

.palette { align-self: start; margin-top: 12vh; width: min(600px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; animation: rise .14s ease-out; }
.palette .input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; height: 52px; font-size: 16px; padding: 0 18px; background: transparent; box-shadow: none !important; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.palette li.at { background: var(--ember-soft); }
.palette li small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.palette li span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .hint { padding: 9px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; gap: 14px; }

/* ---------- Member profile ---------- */
.profile { display: flex; gap: 18px; align-items: center; padding: 20px; flex-wrap: wrap; }
.profile .avatar { width: 84px; height: 84px; border: 3px solid var(--panel-2); box-shadow: 0 0 0 1px var(--line-2); }
.profile h1 { font-size: 22px; }
.profile .ids { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
.copy { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; display: inline-grid; }
.copy:hover { color: var(--ember-2); }
.tallies { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.tallies div { background: var(--panel); padding: 12px 14px; text-align: center; }
.tallies b { display: block; font: 700 20px var(--display); }
.tallies span { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.note { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note p { white-space: pre-wrap; overflow-wrap: anywhere; }
.note .meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.case-line { display: flex; gap: 12px; align-items: flex-start; padding: 13px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.case-line:last-child { border-bottom: 0; }
.case-line:hover { background: var(--panel-2); }
.case-line .what { flex: 1; min-width: 0; }
.case-line .what p { color: var(--text-2); overflow-wrap: anywhere; }
.case-line .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; text-align: right; }

/* ---------- Commands ---------- */
.cmd { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cmd:last-child { border-bottom: 0; }
.cmd .name { font: 600 14.5px var(--body); }
.cmd .usage { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cmd .perm { margin-top: 12px; padding: 12px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Public pages ---------- */
.public { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(240, 138, 60, .16), transparent 62%), var(--bg); }
.public .top { background: transparent; border-bottom: 0; backdrop-filter: none; position: static; }
.hero { max-width: 880px; margin: 0 auto; padding: 8vh 24px 40px; text-align: center; }
.hero .mark { width: 76px; height: 76px; margin-bottom: 22px; filter: drop-shadow(0 12px 28px rgba(240, 138, 60, .35)); }
.hero h1 { font-size: clamp(32px, 6vw, 52px); letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--ember-2); }
.hero p { margin: 16px auto 28px; max-width: 58ch; color: var(--text-2); font-size: 16.5px; }
.features { max-width: 980px; margin: 10px auto 60px; padding: 0 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.features .card { padding: 18px; }
.features .card svg { color: var(--ember-2); margin-bottom: 10px; }
.features .card p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.public footer { margin-top: auto; padding: 22px; text-align: center; color: var(--muted); font-size: 12.5px; }
.steps { text-align: left; max-width: 620px; margin: 0 auto; }
.steps ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }

@media (max-width: 1000px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c3, .grid.split, .features { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 75; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow); }
  .top { padding: 10px 16px; }
  .top .menu { display: inline-flex; }
  .kbd-search { min-width: 0; flex: 1; }
  .kbd-search kbd, .top .pill span { display: none; }
  .page { padding: 20px 16px 90px; }
  .field, .item .field { grid-template-columns: minmax(0, 1fr); }
  .field .control { justify-content: flex-start; }
  .grid.c2, .cmd .perm { grid-template-columns: minmax(0, 1fr); }
  .table .hide-sm { display: none; }
  .ctable td .picker { width: 150px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------- Automod and protection ---------------- */
.section-lead { margin: 0; padding: 12px 18px 0; color: var(--muted); font-size: 13.5px; max-width: 78ch; }
.group-head { margin: 28px 0 12px; }
.group-head h2 { font-size: 19px; }
.group-head p { color: var(--muted); font-size: 13.5px; margin-top: 3px; max-width: 78ch; }
.fold { margin-bottom: 10px; }
.fold > summary { display: flex; align-items: center; gap: 12px; padding: 13px 18px; cursor: pointer; list-style: none; border-radius: var(--r); }
.fold > summary::-webkit-details-marker, .more > summary::-webkit-details-marker, .plan > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: var(--panel-2); }
.fold > summary > svg, .more > summary > svg, .plan > summary > svg { flex: none; color: var(--muted); transition: transform .15s; }
.fold[open] > summary > svg, .more[open] > summary > svg, .plan[open] > summary > svg { transform: rotate(90deg); }
.fold > summary h2 { font-size: 15px; }
.fold > summary p { color: var(--muted); font-size: 13px; margin-top: 1px; }
.fold[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
.more > summary { display: flex; align-items: center; gap: 8px; padding: 12px 18px; cursor: pointer; list-style: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.more > summary:hover { color: var(--text); }
.more { border-top: 1px solid var(--line); }
.more[open] > summary { border-bottom: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; padding: 16px 18px; }
.card:not(.flat) .kv, .stack > .kv { padding: 0; }
.kv span { color: var(--muted); }
.card.flat > .body > .stack, .card.flat > .body > .hbars, .card.flat > .body > .bars { padding: 16px 18px; }
.card.flat > .body > .bars { height: 182px; }
.hbars { display: grid; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(0, 150px) minmax(40px, 1fr) 34px; gap: 10px; align-items: center; font-size: 13px; }
.hbar .track { height: 8px; border-radius: 99px; background: var(--raise); overflow: hidden; }
.hbar .track i { display: block; height: 100%; min-width: 0; border-radius: 99px; background: var(--ember); }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.hbar.off { color: var(--muted); }
.hbar.off b { font-weight: 500; font-size: 12px; }
.hit { display: flex; gap: 12px; align-items: flex-start; padding: 13px 18px; border-bottom: 1px solid var(--line); color: inherit; }
.hit:last-child { border-bottom: 0; }
.hit:hover { background: var(--panel-2); text-decoration: none; }
.hit .what { flex: 1; min-width: 0; }
.hit time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.quote { margin-top: 6px; padding: 6px 10px; border-left: 3px solid var(--line-2); background: var(--bg-2); border-radius: 0 6px 6px 0; color: var(--text-2); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 5.6em; overflow: hidden; }
.hit-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.hit-line:last-child { border-bottom: 0; }
.card.flat > .body > div > .hit-line, .card.flat > .body > .hit-line { padding: 10px 18px; }
.hit-line code { overflow-wrap: anywhere; background: none; padding: 0; font-size: 13px; }
.incident { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.incident:first-child { padding-top: 0; }
.incident:last-child { border-bottom: 0; padding-bottom: 0; }
.incident.done { opacity: .72; }
.progress { height: 10px; border-radius: 99px; background: var(--raise); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ember); border-radius: 99px; transition: width .4s; }
.plan > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 4px 0; }
ul.plain { margin: 6px 0 0; padding-left: 22px; color: var(--text-2); font-size: 13px; }
.narrow-page { width: 100%; max-width: 860px; margin: 0 auto; padding: 4vh 20px 48px; }
.narrow-page .page-head { margin-bottom: 18px; }
@media (max-width: 700px) {
  .hbar { grid-template-columns: minmax(0, 110px) minmax(30px, 1fr) 30px; }
  .hit time { display: none; }
  .hit-line { flex-wrap: wrap; }
}
.test-hit { display: grid; gap: 5px; padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.test-hit:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---------------- Queues: the inbox, reports, ban requests, appeals ---------------- */
.nav a .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--ember); color: var(--on-ember); font-size: 11.5px; font-weight: 700; }
.kind-tile { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--raise); color: var(--ember-2); }
.kind-tile.sm { width: 26px; height: 26px; border-radius: 7px; }
.case-line.urgent { box-shadow: inset 3px 0 0 var(--danger); }
a.case-line { color: inherit; }
a.case-line:hover { text-decoration: none; }
.facts { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 9px 14px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts dd a:hover { text-decoration: none; }
.quote.tall { max-height: none; margin-top: 0; font-size: 13.5px; color: var(--text); }
.chat { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); padding: 6px; }
.chat-line { padding: 6px 9px; border-radius: 6px; min-width: 0; }
.chat-line.main { background: var(--ember-soft); }
.chat-line b { font-size: 13px; }
.chat-line time { color: var(--muted); font-size: 12px; }
.chat-line p { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; color: var(--text-2); }
.chat-line.main p { color: var(--text); }
.plan + .chat, .label + .chat { margin-top: 0; }
.plan > .chat { margin: 6px 0 8px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumbs a { display: block; width: 104px; height: 104px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-2); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); min-width: 0; }
.ev .meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.ev > .label:first-child, .ev > div > .label:first-child { margin-top: 0; }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ember); flex: none; }
.watch-line { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line); color: inherit; }
.watch-line:last-child { border-bottom: 0; }
.watch-line:hover { background: var(--panel-2); text-decoration: none; }
.watch-line .what { flex: 1; min-width: 0; }
.watch-line .what p { color: var(--text-2); overflow-wrap: anywhere; }
.table .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.my-case { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.my-case:last-child { border-bottom: 0; }
.my-case p { overflow-wrap: anywhere; }
.my-case .plan { margin-top: 10px; }
.narrow-page .hero { padding-top: 4vh; }
.hero .notice { text-align: left; max-width: 560px; margin: 0 auto 18px; }
@media (max-width: 700px) {
  .hide-sm { display: none !important; }
  .facts { grid-template-columns: 96px minmax(0, 1fr); }
  .watch-line { flex-wrap: wrap; }
}

/* ---------------- Community: message editor, previews, the suggestion board ---------------- */
.msg-editor { display: grid; gap: 10px; width: 100%; min-width: 0; }
.embed-fields { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); }
.embed-fields .label { margin-top: 0; }
.dc-wrap:empty { display: none; }
.dc { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); min-width: 0; }
.dc-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--raise); padding: 7px; }
.dc-body { flex: 1; min-width: 0; }
.dc-name b { font-size: 14px; }
.dc-name span { margin-left: 6px; padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; vertical-align: 1px; }
.dc-text { font-size: 14px; overflow-wrap: anywhere; }
.dc-embed { margin-top: 6px; max-width: 480px; padding: 10px 12px; border-left: 4px solid var(--ember); border-radius: 4px; background: var(--panel-2); }
.dc-embed-main { display: flex; gap: 12px; }
.dc-title { font-weight: 700; margin-bottom: 4px; overflow-wrap: anywhere; }
.dc-thumb { flex: none; width: 64px; height: 64px; border-radius: 6px; object-fit: cover; }
.dc-image { display: block; max-width: 100%; max-height: 240px; margin-top: 10px; border-radius: 6px; }
.dc-footer { margin-top: 8px; font-size: 12px; color: var(--muted); }
.dc-notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dc-notes span { padding: 2px 8px; border-radius: 6px; background: var(--raise); color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.md-h { font-weight: 700; }
.md-h1 { font-size: 20px; }
.md-h2 { font-size: 17px; }
.md-h3 { font-size: 15px; }
.md-small { font-size: 12px; color: var(--muted); }
.md-quote { padding-left: 9px; border-left: 3px solid var(--line-2); color: var(--text-2); }
.vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.var { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); color: var(--text-2); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.var:hover { border-color: var(--ember); }
.var code { padding: 0; background: none; color: var(--ember-2); font-size: 13px; }
.item .field.wide { grid-template-columns: minmax(0, 1fr); }
.item .item { background: var(--panel); }
.item > .inner > .more { margin: 4px 14px 10px; }
.item > .inner > .more .field { padding-left: 0; padding-right: 0; }
.item > header .badge { flex: none; }
.input[type="datetime-local"] { width: auto; }
.wide-page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 4vh 20px 48px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.board-col { min-width: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.board-col > header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.board-col > header i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.board-col > header span { padding: 1px 7px; border-radius: 99px; background: var(--raise); color: var(--text-2); font-size: 11.5px; font-weight: 700; }
.board-col .cards { display: grid; gap: 10px; padding: 10px; max-height: 72vh; overflow-y: auto; }
.sug { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); cursor: pointer; min-width: 0; }
.sug:hover { border-color: var(--line-2); }
.sug p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 13.5px; }
.sug-note { padding-left: 9px; border-left: 3px solid var(--line-2); color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.sug-meta { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.vote { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 99px; background: transparent; color: var(--text-2); font: 600 12.5px var(--body); cursor: pointer; }
.vote:hover:not(:disabled) { border-color: var(--ember); }
.vote:disabled { cursor: default; opacity: .75; }
.vote.on.up { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.vote.on.down { border-color: transparent; background: var(--danger-soft); color: var(--danger); }
@media (max-width: 700px) {
  .board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); }
  .board-col .cards { max-height: none; }
}
