:root {
  --bg: #f4f5f7; --panel: #ffffff; --side: #ebedf0; --text: #1d1f23; --muted: #6b7280;
  --border: #e1e3e8; --hover: rgba(0, 0, 0, .05); --active: rgba(217, 138, 0, .14); --accent: #c27a00;
  --green: #2d8a4b; --green-bg: rgba(59, 165, 93, .15); --red: #c93638; --red-bg: rgba(216, 60, 62, .12);
  --amber: #a86400; --amber-bg: rgba(240, 165, 0, .16); --shadow: 0 10px 40px rgba(0, 0, 0, .18);
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --grid: rgba(0, 0, 0, .07);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1f22; --panel: #2b2d31; --side: #232428; --text: #e8e9eb; --muted: #9a9ca3;
    --border: #3a3c42; --hover: rgba(255, 255, 255, .05); --active: rgba(240, 165, 0, .16); --accent: #f0a500;
    --green: #57c27a; --green-bg: rgba(59, 165, 93, .18); --red: #f06a6c; --red-bg: rgba(240, 106, 108, .14);
    --amber: #f0b445; --amber-bg: rgba(240, 165, 0, .16); --shadow: 0 10px 40px rgba(0, 0, 0, .5);
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --grid: rgba(255, 255, 255, .07);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1e1f22; --panel: #2b2d31; --side: #232428; --text: #e8e9eb; --muted: #9a9ca3;
  --border: #3a3c42; --hover: rgba(255, 255, 255, .05); --active: rgba(240, 165, 0, .16); --accent: #f0a500;
  --green: #57c27a; --green-bg: rgba(59, 165, 93, .18); --red: #f06a6c; --red-bg: rgba(240, 106, 108, .14);
  --amber: #f0b445; --amber-bg: rgba(240, 165, 0, .16); --shadow: 0 10px 40px rgba(0, 0, 0, .5);
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --grid: rgba(255, 255, 255, .07);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, sans-serif; }
[hidden] { display: none !important; }
a { color: inherit; }
img { display: block; }
button { font: inherit; }
kbd { font: 11px ui-monospace, monospace; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); background: var(--panel); }

/* Sign in */
#signin { min-height: 100%; }
.button { display: inline-block; background: #5865f2; color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; }
.button:hover { background: #4752c4; }

/* Layout */
.app { display: flex; min-height: 100%; }
.sidebar { width: 260px; flex: none; background: var(--side); border-right: 1px solid var(--border); display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid var(--border); }
.brand img { width: 36px; height: 36px; border-radius: 50%; background: var(--border); }
.brand .bname { font-weight: 700; font-size: 15px; line-height: 1.2; }
.brand .bmeta { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ba55d; flex: none; }
.dot.down { background: var(--red); }
.search-btn { margin: 10px 8px 0; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); color: var(--muted); cursor: pointer; font-size: 13px; text-align: left; }
.search-btn:hover { color: var(--text); }
.search-btn svg { width: 14px; height: 14px; }
.search-btn kbd { margin-left: auto; }
nav { flex: 1; overflow-y: auto; padding: 6px 8px 10px; }
.nav-label { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 14px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--text); font-size: 14px; }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--active); font-weight: 600; }
.ico { width: 24px; height: 24px; border-radius: 50%; background: var(--border); flex: none; display: grid; place-items: center; font-size: 11px; color: var(--muted); overflow: hidden; }
.ico svg { width: 15px; height: 15px; }
.ico img { width: 24px; height: 24px; }
.nav-item .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.nav-empty { color: var(--muted); font-size: 13px; padding: 4px 10px; }
.nav-back { display: block; color: var(--muted); font-size: 13px; text-decoration: none; padding: 10px 10px 8px; }
.nav-back:hover { color: var(--text); }
.nav-server { display: flex; align-items: center; gap: 10px; padding: 4px 10px 10px; }
.nav-server img, .nav-server .ph { width: 32px; height: 32px; border-radius: 50%; background: var(--border); flex: none; }
.nav-server b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); }
.me { position: relative; }
.me-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; margin: -6px; padding: 6px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.me-btn:hover, .me-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--text) 7%, transparent); }
.me-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.me img { width: 32px; height: 32px; border-radius: 50%; background: var(--border); flex: none; }
.me .who { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.me .who small { display: block; }
.me-menu { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 6px); background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 40; animation: pop .12s ease-out; }
.me-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 14px; }
.me-menu a:hover, .me-menu a:focus-visible { background: color-mix(in srgb, var(--text) 7%, transparent); outline: none; }
.me-menu a span { width: 16px; height: 16px; display: inline-flex; color: var(--muted); }
.me-menu a span svg { width: 16px; height: 16px; }
.me-menu a.out { color: var(--red); }
.facts.profile-facts { margin: 0; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: 14px; }
.facts.profile-facts dd { text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.me-menu a.out span { color: var(--red); }
.me .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who small { color: var(--muted); }
.icon-btn { background: none; border: 0; padding: 5px; border-radius: 6px; color: var(--muted); cursor: pointer; display: grid; place-items: center; text-decoration: none; }
.icon-btn:hover { color: var(--text); background: var(--hover); }
.icon-btn svg { width: 17px; height: 17px; }

.content { flex: 1; min-width: 0; }
.topbar { display: none; }
.page { max-width: 1080px; margin: 0 auto; padding: 28px 28px 56px; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.page-head img, .page-head .ph { width: 48px; height: 48px; border-radius: 50%; background: var(--border); flex: none; }
.page-head .ph { display: grid; place-items: center; font-size: 18px; color: var(--muted); }
.page-head h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.page-head .grow { flex: 1; min-width: 0; }
.updated { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sub { color: var(--muted); font-size: 13px; }
.error { color: var(--red); }
h2 { font-size: 16px; margin: 0 0 10px; }
section + section, .block + .block { margin-top: 28px; }

/* Tiles and cards */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.tile .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tile .value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
.tile .hint { color: var(--muted); font-size: 12px; }
.tile.alert { border-color: var(--red); background: var(--red-bg); }
.tile.alert .value { color: var(--red); }
.tile.warn .value { color: var(--amber); }
.meter { height: 6px; border-radius: 999px; background: var(--border); margin-top: 8px; overflow: hidden; }
.meter > div { height: 100%; background: var(--accent); border-radius: 999px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cog-group { grid-column: 1 / -1; margin: 14px 0 -2px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cog-group:first-child { margin-top: 0; }
.cog-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cog-group .count { font-weight: 600; letter-spacing: 0; text-transform: none; }
.cog-group .group-actions { margin-left: auto; display: flex; gap: 6px; }
.cog-group .group-actions .btn { font-size: 12px; padding: 3px 10px; letter-spacing: 0; text-transform: none; }
.setup-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; flex-wrap: wrap; counter-reset: step; }
.setup-steps li { flex: 1; min-width: 110px; font-size: 13px; color: var(--muted); padding: 8px 10px 0; border-top: 3px solid var(--border); counter-increment: step; }
.setup-steps li::before { content: counter(step) ". "; }
.setup-steps li.done { border-color: var(--green); color: var(--text); }
.setup-steps li.current { border-color: var(--accent); color: var(--text); font-weight: 700; }
.setup-panel { padding: 20px; max-width: 760px; }
.setup-panel h2 { margin: 0 0 6px; }
.setup-panel > .sub { margin-bottom: 16px; }
.setup-choices { display: grid; gap: 10px; margin: 14px 0; }
.setup-choice { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; }
.setup-choice:hover { border-color: var(--accent); }
.setup-choice.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.setup-choice input { margin-top: 3px; accent-color: var(--accent); }
.setup-choice small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.setup-choice .tag { font-size: 11px; font-weight: 700; margin-left: 8px; color: var(--accent); }
.setup-field { display: grid; gap: 6px; margin: 14px 0; font-size: 14px; }
.setup-field select { max-width: 420px; }
.setup-nav { display: flex; gap: 8px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.setup-nav .spacer { flex: 1; }
.setup-score { display: flex; align-items: baseline; gap: 10px; margin: 10px 0; }
.setup-score b { font-size: 40px; }
.setup-list { margin: 10px 0; padding-left: 20px; font-size: 14px; }
.setup-list li { margin: 4px 0; }
.setup-list .sev { font-size: 11px; font-weight: 700; text-transform: uppercase; margin-right: 6px; color: var(--red); }
.banner.setup { background: var(--panel); border: 1px solid var(--accent); color: var(--text); justify-content: space-between; flex-wrap: wrap; }
.cog-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.cog-tools .filter { margin: 0; flex: 1; min-width: 200px; max-width: 320px; }
.cog-tools .chips { margin: 0; }
.cog-recommend { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--accent); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.card .desc { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.card .cog-note { font-size: 12.5px; margin-top: 6px; }
.card .cog-note.warn { color: var(--red, #e5484d); }
.card .cog-note.info { color: var(--muted); }
.card .cog-note a { color: inherit; text-decoration: underline; }
.card .cog-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }
/* Three a row, so a cog's buttons fit on one line; fewer on narrow screens */
#cog-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { #cog-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { #cog-cards { grid-template-columns: 1fr; } }
.card { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; text-decoration: none; }
a.card:hover { border-color: var(--accent); }
.card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.card b { font-size: 15px; }
.card .sub { font-size: 13px; }
.card.disabled b { color: var(--muted); }
.card .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.banner { display: flex; align-items: center; gap: 12px; border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; font-size: 14px; }
.banner.red { background: var(--red-bg); border: 1px solid var(--red); color: var(--red); }
.banner b { color: inherit; }
.banner.amber { background: var(--amber-bg); border: 1px solid var(--amber); color: var(--text); display: block; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Tables */
.table { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th .arrow { font-size: 10px; margin-left: 4px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--hover); }
td.empty { color: var(--muted); text-align: center; padding: 22px; white-space: normal; }
td.wrap { white-space: normal; min-width: 200px; }
td.muted { color: var(--muted); }
.who-cell { display: flex; align-items: center; gap: 10px; }
.who-cell img, .who-cell .ph { width: 28px; height: 28px; border-radius: 50%; background: var(--border); flex: none; }
.ph { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.who-cell a { text-decoration: none; font-weight: 500; }
.rank { font-weight: 700; color: var(--muted); width: 28px; display: inline-block; }
.rank.gold { color: #d4a017; } .rank.silver { color: #9aa2ad; } .rank.bronze { color: #b87333; }

/* Controls */
.filter, select.input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; }
.filter { margin-bottom: 18px; }
select.input { width: auto; min-width: 220px; max-width: 100%; padding: 6px 10px; font-size: 14px; }
select.input:disabled { opacity: .6; }
.btn { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn[disabled]:hover { border-color: var(--border); color: var(--text); }
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.on { background: var(--green-bg); color: var(--green); }
.badge.off { background: var(--border); color: var(--muted); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.switch { position: relative; width: 38px; height: 22px; flex: none; border: 0; border-radius: 999px; background: var(--border); cursor: pointer; padding: 0; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch[aria-checked="true"] { background: #3ba55d; }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.switch:disabled { opacity: .5; cursor: wait; }
.switch:focus-visible, .btn:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.chip { background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--text); cursor: pointer; }
.chip.active { background: var(--active); border-color: var(--accent); font-weight: 600; }
.note { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 8px; font-size: 14px; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.bad { background: var(--red); color: #fff; }

/* Commands and cog data */
.cog { margin-bottom: 20px; }
.cog h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 8px; }
td code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
td.desc { white-space: normal; color: var(--muted); min-width: 220px; }
td.perm { font-size: 12px; color: var(--muted); }
td.cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
td.cell.null { color: var(--muted); font-style: italic; }
.name { font-family: system-ui, sans-serif; color: var(--accent); }
tr.default td { color: var(--muted); font-style: italic; }
tr.default td:first-child::before { content: 'default'; font: 600 10px system-ui, sans-serif; text-transform: uppercase; letter-spacing: .04em; background: var(--border); color: var(--muted); border-radius: 4px; padding: 1px 5px; margin-right: 8px; }
.legend { font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Cog data */
.data-actions { display: flex; align-items: center; gap: 8px; margin: -8px 0 18px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--muted); cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab.empty { opacity: .55; }
.tab .count { font-size: 11px; font-weight: 600; background: var(--border); color: var(--muted); border-radius: 999px; padding: 0 7px; }
.tab.active .count { background: var(--active); color: var(--accent); }
.data-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.data-title h2 { margin: 0; }
.data-tools { display: flex; align-items: center; gap: 12px; }
.filter.small { margin: 0; width: 220px; padding: 6px 10px; font-size: 14px; }
.raw-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.settings-list { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; margin: 0; }
.settings-list dt, .settings-list dd { padding: 11px 16px; border-bottom: 1px solid var(--border); margin: 0; }
.settings-list dt { color: var(--muted); font-size: 14px; }
.settings-list dd { font-size: 14px; overflow-wrap: anywhere; }
.settings-list dt:nth-last-child(2), .settings-list dd:last-child { border-bottom: 0; }
.settings-list.default dd { color: var(--muted); font-style: italic; }
.data-table td.cell { font: 14px system-ui, sans-serif; max-width: 360px; white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.data-table td.cell.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table th.num { text-align: right; }
.data-table td.clamp { cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.data-table td.clamp.open { display: table-cell; -webkit-line-clamp: unset; }
.nil { color: var(--muted); }
.time { white-space: nowrap; border-bottom: 1px dotted var(--muted); cursor: help; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; border: 1px solid var(--border); }
.chips-inline { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.fields { display: flex; flex-direction: column; gap: 2px; }
.field-name { color: var(--muted); }
.pill { font-size: 12px; background: var(--border); border-radius: 999px; padding: 1px 8px; }
.stored-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); align-items: start; gap: 8px; margin: 4px 0; width: 100%; }
.stored-card { display: block; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--hover); overflow-wrap: anywhere; }
details.stored-more > summary { cursor: pointer; color: var(--accent); width: fit-content; }
details.stored-more[open] > summary { margin-bottom: 6px; }
.perm-admin { font-size: 12px; font-weight: 600; color: #fff; background: var(--red, #ed4245); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.id { font: 12px ui-monospace, monospace; color: var(--muted); }

/* Settings */
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.setting:last-child { border-bottom: 0; }
.setting .what b { display: block; font-size: 14px; font-weight: 500; }
.setting .what small { color: var(--muted); font-size: 12px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }

/* Cog settings */
.form-about { margin: -8px 0 18px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.field-row:last-child { border-bottom: 0; }
.field-row .what { min-width: 0; }
.field-row .what b { display: block; font-size: 14px; font-weight: 600; }
.field-row .what small { color: var(--muted); font-size: 13px; }
.field-row.dirty { box-shadow: inset 3px 0 0 var(--accent); }
.field-control { flex: none; display: flex; align-items: center; gap: 8px; max-width: 55%; justify-content: flex-end; flex-wrap: wrap; }
.num-input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); overflow: hidden; }
.num-input input { width: 96px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; padding: 6px 10px; text-align: right; font-variant-numeric: tabular-nums; }
.num-input input:focus { outline: none; }
.num-input:focus-within { border-color: var(--accent); }
.num-input span { color: var(--muted); font-size: 13px; padding: 0 10px 0 2px; }
.num-input.bad { border-color: var(--red); }
.multi { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.multi .tag { display: inline-flex; align-items: center; gap: 4px; background: var(--active); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; }
.multi .tag button { border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 50%; width: 18px; height: 18px; line-height: 1; padding: 0; }
.multi .tag button:hover { color: var(--red); background: var(--red-bg); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.savebar { position: sticky; bottom: 16px; margin-top: 18px; display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--accent); border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); }
.savebar span { flex: 1; font-size: 14px; }
.btn.save { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.save:hover { color: #fff; filter: brightness(1.08); }

/* Members */
.member-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.member-tools .filter { margin: 0; flex: 1; min-width: 200px; }
.member-tools .sub { white-space: nowrap; }
.role-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.who-cell .names { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.who-cell .names small { color: var(--muted); font-size: 12px; }
.profile { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.profile-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.profile-card .banner-strip { height: 64px; background: linear-gradient(135deg, var(--banner-2), var(--banner-3)); }
.profile-card .body { padding: 0 18px 18px; }
.profile-card .big-avatar { width: 84px; height: 84px; border-radius: 50%; border: 5px solid var(--panel); margin-top: -42px; background: var(--border); }
.profile-card h2 { margin: 6px 0 0; font-size: 20px; }
.profile-card .handle { color: var(--muted); font-size: 13px; }
.profile-card .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.facts { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.role-list { display: flex; flex-wrap: wrap; gap: 6px; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.act { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; font-weight: 600; font-size: 13px; }
.act:hover { border-color: var(--accent); }
.act.danger { color: var(--red); }
.act.danger:hover { border-color: var(--red); background: var(--red-bg); }
.act svg { width: 15px; height: 15px; }
.score { display: flex; align-items: center; gap: 14px; }
.score .ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: conic-gradient(var(--c, var(--green)) calc(var(--p) * 1%), var(--border) 0); position: relative; flex: none; }
.score .ring::before { content: ''; position: absolute; inset: 7px; background: var(--panel); border-radius: 50%; }
.score .ring span { position: relative; }
.reasons { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.reasons li { display: flex; gap: 8px; padding: 2px 0; }
.reasons b { font-variant-numeric: tabular-nums; min-width: 34px; color: var(--red); }
.reasons b.neg { color: var(--green); }
.stack > * + * { margin-top: 20px; }
.pad { padding: 14px 16px; }

/* Analytics */
.range { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.range .sub { margin-left: auto; }
.kpi .delta { font-size: 12px; font-weight: 600; margin-top: 2px; display: inline-flex; align-items: center; gap: 3px; }
.kpi .delta.up { color: var(--green); } .kpi .delta.down { color: var(--red); } .kpi .delta.flat { color: var(--muted); }
.kpi .delta.invert.up { color: var(--red); } .kpi .delta.invert.down { color: var(--green); }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.chart-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 10px; min-width: 0; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.chart-head h3 { margin: 0; font-size: 14px; }
.chart-head .big { font-size: 13px; color: var(--muted); }
.chart-head .btn { margin-left: auto; }
.legend-row { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); }
.chart .baseline { stroke: var(--border); }
.chart .hair { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart .bar { transition: opacity .1s; }
.chart.hovering .bar:not(.on) { opacity: .45; }
.tip { position: fixed; z-index: 70; pointer-events: none; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; min-width: 120px; }
.tip .t { color: var(--muted); margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 8px; }
.tip .r i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.tip .r b { font-variant-numeric: tabular-nums; }
.tip .r span { color: var(--muted); }
.hbars { display: grid; gap: 8px; padding: 6px 0; }
.hbar { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.hbar code { font: 12px ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 10px; }
.hbar .fill { height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar b { font-variant-numeric: tabular-nums; font-size: 12px; }
.chart-table { max-height: 260px; overflow-y: auto; }
.chart-table td, .chart-table th { padding: 6px 10px; font-size: 13px; }
@media (max-width: 860px) { .charts { grid-template-columns: 1fr; } }

/* Server settings */
.settings-summary { display: grid; grid-template-columns: auto 1fr; gap: 18px 22px; align-items: center; padding: 18px 20px; margin-bottom: 18px; }
.settings-summary .ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--honey-2) calc(var(--p) * 1%), var(--border) 0); }
.settings-summary .ring > div { width: 60px; height: 60px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.summary-text h2 { margin: 0 0 2px; }
.summary-text .sub { margin-bottom: 10px; }
.settings-summary .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.settings-summary .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--hover); color: var(--muted); border: 0; cursor: pointer; }
.settings-summary .chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.settings-summary .chip.ok { background: var(--green-bg); color: var(--green); }
.settings-summary .chip.bad { background: var(--amber-bg); color: var(--amber); }
.settings-summary .chip.on { outline: 2px solid currentColor; outline-offset: 1px; }
.settings-summary .filter { grid-column: 1 / -1; margin: 0; }
.group { margin-bottom: 18px; overflow: hidden; }
.group-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: color-mix(in srgb, var(--tint) 5%, var(--panel)); }
.group-head .tile-ico { margin: 0; flex: none; }
.group-head .title { flex: 1; min-width: 160px; }
.group-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.group-head .count { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--hover); border-radius: 999px; padding: 1px 8px; }
.group-head .count.full { color: var(--green); background: var(--green-bg); }
.group-about { color: var(--muted); font-size: 13px; margin: 0; }
.group-head .bulk { display: flex; gap: 8px; align-items: center; }
.group-head .bulk select { min-width: 0; width: 180px; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 250px) 30px; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .12s; }
.srow:last-child { border-bottom: 0; }
.srow:hover { background: var(--hover); }
.srow .what b { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.srow .what small { color: var(--muted); font-size: 13px; display: block; }
.srow .state { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 0 8px; color: var(--muted); background: var(--hover); }
.srow.set .state { color: var(--green); background: var(--green-bg); }
.srow.bad .state { color: var(--amber); background: var(--amber-bg); }
.srow .warn-text { color: var(--amber); font-size: 12px; font-weight: 600; margin-top: 3px; display: flex; gap: 4px; align-items: center; }
.srow select.input { width: 100%; min-width: 0; }
.srow.set select.input { border-color: color-mix(in srgb, var(--green) 45%, var(--border)); }
.srow.bad select.input { border-color: var(--amber); }
.srow .clear { width: 28px; height: 28px; }
.srow.saving { opacity: .6; }
.srow.flash { animation: flash 1s ease-out; }
@keyframes flash { from { background: color-mix(in srgb, var(--green) 18%, transparent); } }
@media (max-width: 800px) {
  .srow { grid-template-columns: minmax(0, 1fr) 30px; }
  .srow select.input { grid-column: 1; grid-row: 2; }
  .srow .clear { grid-column: 2; grid-row: 2; }
  .group-head .bulk { width: 100%; }
  .group-head .bulk select { flex: 1; width: auto; }
  .settings-summary { grid-template-columns: 1fr; justify-items: start; }
}

.access-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; font-size: 14px; flex-wrap: wrap; }
#member-list > .note + .panel { margin-bottom: 22px; }

/* Premium */
.premium-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 14px; flex-wrap: wrap; --tint: var(--honey-2); }
.premium-head .tile-ico { margin: 0; width: 44px; height: 44px; border-radius: 12px; }
.premium-head h2 { margin: 0; }
.premium-head .meter { max-width: 260px; margin: 6px 0; }
.premium-head .meter > div { background: linear-gradient(90deg, var(--honey-1), var(--honey-2)); }
.tier-cards .card { display: flex; flex-direction: column; gap: 2px; }
.tier-cards .card.current { border-color: var(--honey-2); }
#view-premium { max-width: 1240px; }
.tier-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tier-cards .badge, .tier-cards .btn { align-self: flex-start; margin-top: auto; }
.tier-cards .sub { margin-bottom: 10px; }
@media (max-width: 1100px) { .tier-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tier-cards { grid-template-columns: 1fr; } }
.tier-cards .card.below { opacity: .5; }
.tier-cards .card.lifetime { border-color: color-mix(in srgb, var(--honey-1) 60%, var(--border)); background: color-mix(in srgb, var(--honey-1) 7%, var(--panel)); }
.tier-cards { margin-bottom: 8px; }
.buy-note { margin: 0 0 26px; }
.feed .when.paused { color: var(--amber); }
#premium-body > section + section, #premium-body > section { margin-top: 0; margin-bottom: 26px; }
.perks th:not(:first-child), .perks td:not(:first-child) { text-align: center; }
.perks td:first-child { white-space: normal; min-width: 180px; }
.perks .mine { background: color-mix(in srgb, var(--honey-1) 10%, transparent); }
.perks th.mine { color: var(--text); }
.perks td.yes { color: var(--green); }
.perks td.yes svg { width: 16px; height: 16px; vertical-align: middle; }
.perks td.no { color: var(--muted); }
.perks tr:last-child td { border-bottom: 0; }
.perks .perk-group td { text-align: left !important; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--hover); padding-top: 14px; }
#premium-body .feed li { align-items: center; }
.punishments { margin-top: 24px; }
.suggestion-stats { display: flex; flex-direction: column; gap: 16px; }
.suggestion-stats h3 { font-size: 14px; margin: 0 0 8px; }
.day-cols { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.day-col { flex: 1; background: var(--series-1); border-radius: 3px 3px 0 0; min-height: 2px; }
#config-extra:not(:empty) { margin-top: 24px; }
.field-row.list-row { flex-direction: column; align-items: stretch; }
.field-row.list-row .field-control { max-width: none; width: 100%; justify-content: flex-start; }
.field-row.list-row .field-control > .list-edit { flex: 1; }
.list-edit { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; width: 100%; }
.list-table { width: 100%; border-collapse: collapse; }
.list-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.list-table td { padding: 4px 6px; vertical-align: top; }
.list-table select.input { min-width: 0; width: 100%; }
.list-table input.filter { padding: 6px 10px; min-width: 120px; }
.list-table textarea.text-input { width: 100%; min-width: 180px; resize: vertical; }
.list-table td.wide { width: 65%; }

/* Column sizes for each cog's settings page */
[data-cog="Rules"] .col-title { width: 22%; }
[data-cog="Rules"] .col-colour { width: 110px; }
[data-cog="Applications"] .col-name { width: 20%; }
[data-cog="Applications"] .col-role_id { width: 20%; }
[data-cog="Applications"] .col-answer { width: 110px; }
.list-table .list-table { background: var(--bg); border-radius: 8px; }
.list-table .list-table th { padding-top: 6px; }
[data-cog="Sticky"] .col-channel_id { width: 22%; }
[data-cog="Sticky"] .col-count { width: 120px; }
[data-cog="Economy"] .col-role_id { width: 40%; }
[data-cog="Links"] .col-channel_id { width: 25%; }
[data-cog="Links"] .col-mode { width: 20%; }
[data-cog="ReactionRoles"] .col-message { width: 45%; }
[data-cog="ReactionRoles"] .col-emoji { width: 120px; }
[data-cog="CogManager"] .col-command { width: 40%; }
.list-table .list-remove { width: 1%; white-space: nowrap; }
@media (max-width: 720px) {
  .list-table thead { display: none; }
  .list-table tr { display: block; border-bottom: 1px solid var(--border); padding: 6px 0; }
  .list-table td { display: block; }
  .list-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
}
.punish-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.punish-form input.filter { width: 80px; padding: 6px 10px; }
.punish-form select.input { min-width: 0; }
.punish-length { display: inline-flex; align-items: center; gap: 8px; }
.punish-length[hidden] { display: none; }
.template-pick { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.template-pick .grow { flex: 1; min-width: 220px; }
.premium-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; vertical-align: middle; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--honey-1), var(--honey-2)); }
.premium-badge svg { width: 12px; height: 12px; }
.card .top .premium-badge { margin-left: 8px; }

.text-input { width: 100%; min-width: 260px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 14px; padding: 8px 10px; resize: vertical; }
.text-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hp-add { padding: 16px; margin-bottom: 18px; display: grid; gap: 10px; }
.hp-add-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hp-add-row select { flex: 1; min-width: 180px; }
.hp-card { margin-bottom: 18px; overflow: hidden; }
.hp-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.hp-head h2 { margin: 0; flex: 1; }
.hp-colour { display: flex; gap: 8px; align-items: center; }
.hp-colour input[type=color] { width: 48px; height: 34px; padding: 2px; }
.hp-card .savebar { position: static; margin: 0; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; box-shadow: none; }

/* Dialog */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 55; display: grid; place-items: center; padding: 16px; animation: fade .12s ease-out; }
.modal { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; animation: pop .15s ease-out; }
.modal h3 { margin: 0 0 6px; font-size: 18px; }
.modal p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.modal label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.modal textarea, .modal select { width: 100%; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; padding: 8px 10px; }
.modal textarea { min-height: 72px; resize: vertical; }
.modal .buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal .btn { padding: 7px 16px; font-size: 13px; }
.modal.announce-modal { max-width: 560px; }
#actions-body .action { max-width: 640px; }
.action h2 { margin: 0 0 4px; font-size: 16px; }
.action .sub { margin: 0 0 10px; }
.action .note { font-style: italic; margin: 0; }
.action label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.action .input { width: 100%; max-width: none; box-sizing: border-box; }
.action input.input, .action textarea.input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 14px; }
.action textarea.input { resize: vertical; min-height: 72px; }
.action label.check-row { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.action label.check-row input { width: auto; margin: 0; }
.action-buttons { display: flex; justify-content: flex-end; margin-top: 14px; }
.action-help { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.modal.announce-modal input.text-input { width: 100%; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; padding: 8px 10px; }
.modal.announce-modal textarea { min-height: 140px; }
.announce-count { display: block; text-align: right; color: var(--muted); font-size: 12px; margin-top: 4px; }
.staff-table td.staff-mark { text-align: center; color: var(--muted); }
.staff-table td.staff-mark.yes { color: var(--green); font-weight: 700; }
.staff-table th:not(:first-child) { text-align: center; }
.staff-note { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }

/* Feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.feed li:last-child { border-bottom: 0; }
.feed .when { color: var(--muted); font-size: 12px; white-space: nowrap; margin-left: auto; padding-left: 10px; }
.feed .what { min-width: 0; }
.feed .what small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.feed .empty { color: var(--muted); justify-content: center; }

/* Honeypot catches */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 { margin: 0; }
.section-head a { font-size: 13px; color: var(--accent); text-decoration: none; }
.section-head a:hover { text-decoration: underline; }
.catches { display: grid; gap: 10px; }
.catch { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 10px; padding: 12px 16px; display: grid; grid-template-columns: 40px 1fr; gap: 12px; }
.catch.banned { border-left-color: var(--red); }
.catch.kicked, .catch.timed-out, .catch.quarantined { border-left-color: var(--amber); }
.catch > img, .catch > .ph { width: 40px; height: 40px; border-radius: 50%; background: var(--border); }
.catch .line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.catch .line b { font-size: 14px; }
.catch .line .tag { color: var(--muted); font-size: 12px; }
.catch .line .when { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.catch .where { color: var(--muted); font-size: 12px; margin-top: 2px; }
.catch blockquote { margin: 8px 0 0; padding: 8px 12px; border-radius: 6px; background: var(--bg); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 7.5em; overflow: hidden; position: relative; }
.catch blockquote.long::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2em; background: linear-gradient(transparent, var(--bg)); }
.catch blockquote.open { max-height: none; }
.catch blockquote.open::after { display: none; }
.catch blockquote.empty { color: var(--muted); font-style: italic; }
.catch .more { background: none; border: 0; padding: 0; margin-top: 4px; color: var(--accent); font-size: 12px; cursor: pointer; }
.catch .flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.empty-card { background: var(--panel); border: 1px dashed var(--border); border-radius: 10px; padding: 22px; text-align: center; color: var(--muted); font-size: 14px; }

/* Bot-wide switches */
.confirm { border-top: 1px solid var(--border); background: var(--red-bg); padding: 14px 16px; }
.confirm p { margin: 4px 0 8px; }
.leave-list { margin: 0 0 12px; padding-left: 20px; max-height: 180px; overflow-y: auto; font-size: 14px; }
.confirm .actions { display: flex; gap: 8px; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { color: #fff; filter: brightness(1.1); }

/* Adding the bot */
.nav-item.add { color: var(--muted); }
.nav-item.add:hover { color: var(--text); }
.add-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.add-card .who-cell { min-width: 0; }
.add-card .btn.disabled { opacity: .5; pointer-events: none; }
#add-limit.sub { margin: -8px 0 18px; }
.add-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.primary { background: #5865f2; border-color: #5865f2; color: #fff; white-space: nowrap; }
.btn.primary:hover { background: #4752c4; color: #fff; }
.add-other { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; flex-wrap: wrap; }
.perms summary { cursor: pointer; font-weight: 600; }
.perms p { margin: 8px 0 10px; }
#add-hint { margin-top: 10px; }

/* Quick switcher */
.palette-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette { width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 16px; padding: 14px 16px; outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.palette li.sel { background: var(--active); }
.palette li small { margin-left: auto; color: var(--muted); font-size: 12px; }
.palette .none { color: var(--muted); padding: 14px; justify-content: center; cursor: default; }

/* Phones: the sidebar slides in from a menu button */
.scrim { display: none; }
@media (max-width: 860px) {
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .app.open .sidebar { transform: none; }
  .app.open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 30; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--side); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
  .topbar .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .page { padding: 20px 16px 40px; }
  .setting, .field-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .profile { grid-template-columns: 1fr; }
  .field-control { max-width: none; justify-content: flex-start; }
  .multi { justify-content: flex-start; }
  select.input { width: 100%; }
}

/* ---------- Design layer ---------- */
:root { --radius: 12px; --lift: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04); --lift-hover: 0 8px 24px rgba(16, 24, 40, .08); --honey-1: #f5b02e; --honey-2: #e07a1f;
  /* Banners: deep violet to indigo, so honey stays the colour of premium */
  --banner-1: #4c1d95; --banner-2: #6d28d9; --banner-3: #4338ca; }
:root[data-theme="dark"] { --lift: 0 1px 2px rgba(0, 0, 0, .3); --lift-hover: 0 10px 30px rgba(0, 0, 0, .45); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --lift: 0 1px 2px rgba(0, 0, 0, .3); --lift-hover: 0 10px 30px rgba(0, 0, 0, .45); } }
body { -webkit-font-smoothing: antialiased; letter-spacing: -.003em; }
h1, h2, h3 { letter-spacing: -.015em; }
.page { animation: rise .22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Sidebar */
.sidebar { background: linear-gradient(180deg, var(--side), var(--bg)); }
.brand { position: relative; }
.brand img { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px color-mix(in srgb, var(--honey-1) 60%, transparent); }
.nav-item { position: relative; transition: background .12s, color .12s; }
.nav-item.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.nav-item.active::before { content: ''; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(var(--honey-1), var(--honey-2)); }
.nav-item.active .ico { background: linear-gradient(135deg, var(--honey-1), var(--honey-2)); color: #fff; }
.nav-item .count { background: var(--hover); border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 600; }

/* Surfaces */
.tile, .card, .panel, .table, .chart-card, .profile-card, .catch, .empty-card { border-radius: var(--radius); box-shadow: var(--lift); }
.empty-card { box-shadow: none; }
a.tile, a.card, .server-card { transition: transform .15s, box-shadow .15s, border-color .15s; }
a.tile:hover, a.card:hover, .server-card:hover { transform: translateY(-2px); box-shadow: var(--lift-hover); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.tile { position: relative; padding: 16px 18px; }
.tile .label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }
.tile .value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.tile-ico { width: 32px; height: 32px; margin-bottom: 10px; border-radius: 9px; display: grid; place-items: center; color: var(--tint, var(--accent)); background: color-mix(in srgb, var(--tint, var(--accent)) 14%, transparent); }
.tile-ico svg { width: 17px; height: 17px; }
.tile.alert .tile-ico { --tint: var(--red); }
.tile.warn .tile-ico { --tint: var(--amber); }
.page-head h1 { font-size: 26px; }
h2 { font-size: 17px; }
.btn { border-radius: 8px; padding: 5px 12px; transition: border-color .12s, color .12s, background .12s; }
.switch { transition: background .18s; }
.switch::after { transition: transform .18s cubic-bezier(.3, 1.4, .5, 1); }
th { letter-spacing: .03em; font-size: 11px; }
tbody tr { transition: background .1s; }
.badge { letter-spacing: .01em; }

/* Loading shimmer for values not here yet */
.value:empty::after, .value.loading { content: ''; display: inline-block; width: 64px; height: 1em; border-radius: 6px; vertical-align: middle; background: linear-gradient(90deg, var(--border), var(--hover), var(--border)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Hero for a server's overview and the bot's */
.hero { position: relative; overflow: hidden; border-radius: 16px; padding: 22px 24px; margin-bottom: 22px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .18), transparent 55%), linear-gradient(120deg, var(--banner-1), var(--banner-2) 50%, var(--banner-3)); box-shadow: var(--lift-hover); }
.hero::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; opacity: .12;
  background: repeating-conic-gradient(from 30deg, #fff 0 60deg, transparent 0 120deg); clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }
.hero .row { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.hero img, .hero .ph { width: 64px; height: 64px; border-radius: 18px; background: rgba(255, 255, 255, .2); border: 2px solid rgba(255, 255, 255, .5); flex: none; font-size: 26px; color: #fff; }
.hero h1 { margin: 0; font-size: 26px; color: #fff; }
.hero .sub { color: rgba(255, 255, 255, .85); }
.hero .grow { flex: 1; min-width: 0; }
.hero .updated { color: rgba(255, 255, 255, .8); }
.hero-stats { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stats div { font-size: 12px; color: rgba(255, 255, 255, .8); }
.hero-stats b { display: block; font-size: 18px; color: #fff; font-variant-numeric: tabular-nums; }

/* Server cards on the bot overview */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.server-card { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--lift); overflow: hidden; }
.server-card .cover { height: 54px; background: linear-gradient(120deg, color-mix(in srgb, var(--banner-2) 70%, var(--panel)), color-mix(in srgb, var(--banner-3) 60%, var(--panel))); }
.server-card .inner { padding: 0 16px 14px; }
.server-card .icon { width: 52px; height: 52px; border-radius: 15px; border: 4px solid var(--panel); margin-top: -26px; background: var(--border); display: grid; place-items: center; font-size: 20px; color: var(--muted); }
.server-card b { display: block; font-size: 16px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-card .stats { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin-top: 2px; }
.server-card .meter { margin-top: 12px; }
.server-card .meter > div { background: linear-gradient(90deg, var(--honey-1), var(--honey-2)); }
.server-card .foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.view-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.view-head h2 { margin: 0; flex: 1; }
.view-head .filter { margin: 0; width: 240px; }
@media (max-width: 800px) { .view-head { flex-wrap: wrap; } .view-head .filter { width: 100%; } .hero { padding: 18px; } }

/* Security page */
.sec-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.sev-filter { display: flex; gap: 2px; padding: 4px; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; flex-wrap: wrap; }
.sev-filter button { border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.sev-filter button:hover { background: var(--hover); }
.sev-filter button b { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.sev-filter button.on { background: linear-gradient(135deg, var(--honey-1), var(--honey-2)); color: #fff; }
.sev-filter button.on b { color: rgba(255, 255, 255, .85); }
.sec-bar .actions { margin-left: auto; display: flex; gap: 8px; }
#security-body .btn:has(svg) { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 13px; }
.sec-bar .actions .btn { padding: 7px 14px; font-size: 13px; display: inline-flex; align-items: center; }
#security-body .btn svg { width: 14px; height: 14px; flex: none; }
#security-body .empty-card p { margin: 0 0 14px; }
.sev { --tone: var(--muted); }
.sev.critical { --tone: var(--red); }
.sev.high { --tone: var(--series-2); }
.sev.medium { --tone: var(--amber); }
.sev.low { --tone: var(--series-1); }
.sev.good { --tone: var(--green); }
.sec-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.score-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; overflow: hidden; }
.score-card > div { padding: 18px 20px; }
.score-main { display: flex; flex-direction: column; gap: 10px; }
.score-main h3, .sec-chart h3 { margin: 0; font-size: 14px; font-weight: 600; }
.score-row { display: flex; align-items: center; gap: 14px; }
.score-big { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.score-big small { font-size: 18px; color: var(--muted); font-weight: 500; }
.grade { margin-left: auto; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; font-weight: 700; color: var(--tone); background: color-mix(in srgb, var(--tone) 15%, transparent); }
.meter-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.meter-bar > div { height: 100%; background: var(--tone); border-radius: inherit; transition: width .5s; }
.score-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.score-foot > span { white-space: nowrap; }
.score-foot b { color: var(--tone); font-weight: 600; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.improve { border-left: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; }
.improve p { margin: 0; font-size: 14px; }
.improve .btn.save { padding: 9px 18px; font-size: 14px; border-radius: 8px; }
.sec-chart { padding: 16px 18px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sec-chart svg { width: 100%; height: auto; max-height: 180px; display: block; }
.sec-chart .axis { fill: var(--muted); font-size: 9px; }
.sec-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.sec-cat { text-align: left; font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--lift); transition: border-color .12s, box-shadow .12s; }
.sec-cat:hover { box-shadow: var(--lift-hover); }
.sec-cat.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sec-cat .tile-ico { --tint: var(--tone); }
.sec-cat b { font-size: 14px; }
.sec-cat small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.sec-cat .status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tone); margin-top: 6px; }
.sec-cat .status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.sec-cat .meter-bar { height: 4px; margin-top: 4px; }
.sec-findings { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.sec-finding { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg); }
.sec-finding.ignored { opacity: .6; }
.sec-finding .sev-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 15%, transparent); }
.sec-finding .sev-ico svg { width: 16px; height: 16px; }
.sec-finding .title { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.sec-finding p { margin: 2px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.sec-finding p.advice { color: var(--text); }
.sec-finding .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sev-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; color: var(--tone); background: color-mix(in srgb, var(--tone) 15%, transparent); }
.sec-finding .acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.sec-finding .acts .btn { text-align: center; }
.sec-finding .ignore-form { display: flex; gap: 6px; margin-top: 8px; }
.sec-finding .ignore-form input { flex: 1; min-width: 0; margin: 0; padding: 5px 9px; font-size: 13px; }
.sec-list-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.sec-list-head h2 { margin: 0; }
.sec-list-head .sub { margin-left: auto; color: var(--muted); font-size: 13px; }
.sec-resolved li { align-items: center; }
.sec-resolved .badge { align-self: center; }
#security-body > section, #security-body > .note { margin-top: 24px; }
.sec-resolved li .what b { text-decoration: line-through; text-decoration-color: var(--muted); }
@media (max-width: 900px) { .sec-top { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .score-card { grid-template-columns: 1fr; }
  .improve { border-left: 0; border-top: 1px solid var(--border); }
  .sec-finding { grid-template-columns: auto minmax(0, 1fr); }
  .sec-finding .acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .sec-bar .actions { margin-left: 0; width: 100%; }
  .sec-bar .actions .btn { flex: 1; justify-content: center; }
}

/* Suggest Feature */
.suggest-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; max-width: 980px; }
.suggest-form { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.suggest-form label > span, .suggest-form legend { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.suggest-form fieldset { border: 0; margin: 0; padding: 0; }
.suggest-form input[type=text], .suggest-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; padding: 9px 12px; }
.suggest-form textarea { min-height: 170px; resize: vertical; line-height: 1.5; }
.suggest-form input:focus, .suggest-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.suggest-form .count { display: block; text-align: right; font-size: 12px; font-weight: 400; color: var(--muted); margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.suggest-form .count.bad { color: var(--red); }
/* Account: the signed-in person's own settings */
#view-account { max-width: 900px; }
.acct { display: grid; gap: 22px; }
.acct section > h2 { margin: 0 0 4px; font-size: 16px; }
.acct section > .sub { margin: 0 0 10px; }
.acct .panel { padding: 16px; }
.acct-who { display: flex; align-items: center; gap: 14px; }
.acct-who img { width: 56px; height: 56px; border-radius: 50%; background: var(--border); }
.acct-who b { display: block; font-size: 18px; }
.acct-who small { color: var(--muted); }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.profile-grid label { display: block; font-size: 13px; font-weight: 600; }
.profile-grid label.wide { grid-column: 1 / -1; }
.profile-grid .text-input { min-width: 0; margin-top: 6px; box-sizing: border-box; background: var(--bg); }
.pet-head { display: flex; align-items: center; gap: 12px; }
.pet-head .pet-emoji { font-size: 30px; line-height: 1; }
.pet-head b { display: block; font-size: 15px; }
.pet-head small { color: var(--muted); font-size: 13px; }
.pet-bar { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; margin: 12px 0; }
.pet-bar span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.pet-bar span.low { background: var(--red); }
.facts.profile-facts dd.pet-low { color: var(--red); }
.pet-servers { padding: 0 !important; }
.pet-server { padding: 14px 16px; border-bottom: 1px solid var(--border); display: grid; gap: 10px; }
.pet-server:last-child { border-bottom: 0; }
.pet-server-head { display: flex; align-items: center; gap: 10px; }
.pet-server-head img, .pet-server-head .ph { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.pet-server-head b { flex: 1; min-width: 0; }
.pet-owned { display: flex; align-items: center; gap: 12px; }
.pet-owned .pet-emoji { font-size: 28px; line-height: 1; }
.pet-owned b { display: block; }
.pet-owned small { color: var(--muted); }
.pet-buy { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr auto; gap: 8px; }
.pet-buy .text-input { min-width: 0; box-sizing: border-box; background: var(--bg); }
@media (max-width: 640px) { .pet-buy { grid-template-columns: 1fr 1fr; } }
.profile-grid .text-input:read-only { color: var(--muted); cursor: default; }
.acct .foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.acct .foot .grow { flex: 1; }
.acct .btn { padding: 7px 14px; font-size: 13px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 0 8px 8px; }
.data-table td { padding: 9px 8px; border-top: 1px solid var(--border); vertical-align: top; }
.data-table td.servers { color: var(--muted); font-size: 13px; }
.data-table .keep { color: var(--muted); font-size: 12px; }
.danger-zone { border-color: var(--red) !important; }
.danger-zone h3 { margin: 0 0 4px; font-size: 15px; }
.danger-zone p { margin: 0; color: var(--muted); font-size: 14px; }
.modal code { font: 13px ui-monospace, monospace; background: color-mix(in srgb, var(--text) 8%, transparent); padding: 1px 5px; border-radius: 4px; user-select: all; }
.modal input.text-input { min-width: 0; box-sizing: border-box; }
.modal ul { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .profile-grid { grid-template-columns: 1fr; } .data-table td.servers { display: none; } }
.kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.kinds label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; background: var(--bg); }
.kinds input { position: absolute; opacity: 0; pointer-events: none; }
.kinds label:has(input:checked) { border-color: transparent; background: linear-gradient(135deg, var(--honey-1), var(--honey-2)); color: #fff; font-weight: 600; }
.kinds label:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.suggest-form label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.suggest-form label.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.suggest-done .foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.suggest-form .foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.suggest-form .foot .btn.save { padding: 9px 20px; font-size: 14px; border-radius: 8px; }
.suggest-form .foot .sub { font-size: 13px; }
.suggest-tips { padding: 18px; font-size: 14px; }
.suggest-tips h3 { margin: 0 0 8px; font-size: 14px; }
.suggest-tips ul { margin: 0; padding-left: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.suggest-done { padding: 28px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.suggest-done .tile-ico { --tint: var(--green); width: 48px; height: 48px; border-radius: 14px; margin: 0; }
.suggest-done h2 { margin: 0; }
.suggest-done p { margin: 0; color: var(--muted); }
@media (max-width: 800px) { .suggest-wrap { grid-template-columns: 1fr; } }

/* Server overview: catches beside incidents */
.overview-feeds { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px 20px; align-items: start; margin-top: 28px; }
.overview-feeds > section { margin-top: 0; min-width: 0; }
@media (max-width: 1100px) { .overview-feeds { grid-template-columns: 1fr; } }
h2 .h-count { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.legal-links { display: flex; gap: 6px; padding: 6px 16px; font-size: 12px; color: var(--muted); }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--accent); text-decoration: underline; }

/* Dashboard levels */
.page-head { flex-wrap: wrap; }
.page-head .level-note { flex-basis: 100%; margin: 6px 0 0; }
#server-head > .level-note { margin: 12px 0 0; }

/* Audit: undone changes */
#audit-feed li.undone .what { opacity: .65; }
#audit-feed li .btn { margin-left: 8px; }

/* Live updates badge, in the corner */
.live-badge[hidden] { display: none; }
.live-badge { position: fixed; right: 16px; bottom: 16px; z-index: 40; background: var(--panel); box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber, #d4a017); }
.live-badge.on { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, var(--border)); }
.live-badge.on i { background: var(--green); box-shadow: 0 0 0 0 var(--green); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-badge.on i { animation: none; } }

/* Health check */
.health-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; }
.health-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); }
.health-dot.sev-problem { background: var(--red); }
.health-dot.sev-warning { background: var(--amber); }
.health-list { display: grid; gap: 10px; }
.health-item { background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 10px; padding: 12px 16px; }
.health-item.sev-problem { border-left-color: var(--red); }
.health-item.sev-warning { border-left-color: var(--amber); }
.health-item.sev-tip { border-left-color: var(--accent); }
.health-item p { margin: 4px 0 8px; font-size: 14px; color: var(--muted); }
.health-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.health-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.health-sev { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--border); color: var(--text); }
.health-sev.sev-problem { background: var(--red-bg); color: var(--red); }
.health-sev.sev-warning { background: var(--amber-bg); color: var(--text); }
.health-sev.sev-tip { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
#health-overview section { margin-bottom: 22px; }
.nav-item .count.bad { background: var(--red); color: #fff; }

/* Backups and templates */
.transfer-panel { padding: 18px 20px; margin-bottom: 22px; }
.transfer-panel h2 { margin: 0 0 6px; font-size: 17px; }
.transfer-panel .sub { margin: 0 0 12px; }
.transfer-panel .text-input { display: block; width: 100%; max-width: 520px; box-sizing: border-box; margin: 8px 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.transfer-panel textarea.text-input { min-height: 64px; resize: vertical; }
.transfer-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.transfer-actions select { max-width: 260px; }
#transfer-body .feed li .btn { margin-left: 8px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.template-card .desc { font-size: 13px; color: var(--muted); margin: 6px 0; }
.template-card .chips-inline { margin-top: 8px; }
.modal.transfer-modal { max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; }
.transfer-h { display: block; margin-top: 12px; font-size: 13px; }
.transfer-h.warn { color: var(--red); }
.modal.transfer-modal label.check-row { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 8px 0; }

/* Alerts on the account page */
.alerts-here { display: grid; gap: 10px; }
.alerts-here p { margin: 0; }
.alerts-h { margin: 18px 0 8px; font-size: 14px; }
#alerts td.center { text-align: center; }
#alerts td.center input { accent-color: var(--accent); width: 16px; height: 16px; }

/* Messages: the message and embed builder */
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.mb-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.mb-toolbar .input { flex: 1 1 260px; min-width: 0; }
.mb-toolbar .input, .mb-where-row select, .mb-input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.mb-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 26px; }
.mb-editor { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mb-editor > section + section, .mb-editor > section, .mb-side > section { margin: 0; }
.mb-side { position: sticky; top: 16px; min-width: 0; }
.mb-where, .mb-text { padding: 14px 16px; }
.mb-where-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.mb-where-row select { flex: 1 1 220px; min-width: 0; }
.mb-editing { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--amber-bg); color: var(--text); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }
.mb-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.mb-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mb-field.wide { grid-column: 1 / -1; }
.mb-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.mb-count { font-weight: 400; font-variant-numeric: tabular-nums; }
.mb-count.over { color: var(--red); font-weight: 600; }
.mb-input { width: 100%; min-width: 0; }
textarea.mb-input { resize: vertical; }
.mb-embed { border-left: 4px solid var(--embed, var(--border)); overflow: hidden; }
.mb-embed-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.mb-embed-head::-webkit-details-marker { display: none; }
.mb-embed-sub { color: var(--muted); font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-tools { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: none; }
.mb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 4px 14px 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.mb-colour { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mb-colour input[type="color"] { width: 44px; height: 32px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); padding: 2px; cursor: pointer; }
.mb-colour .mb-input { flex: 1; min-width: 0; width: auto; }
.mb-frow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.mb-field > .btn { align-self: flex-start; margin-top: 4px; }
.mb-frow > .mb-tools { padding-top: 26px; }
.btn.mb-add { align-self: flex-start; padding: 8px 14px; font-size: 13px; }
.mb-preview-panel { overflow: hidden; }
.mb-preview-head { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.mb-status { padding: 10px 16px 0; }
.mb-problems { margin: 0 0 6px; padding-left: 18px; color: var(--red); font-size: 13px; }
.mb-total { color: var(--muted); font-size: 12px; }
.mb-actions { display: flex; gap: 8px; padding: 10px 16px 14px; flex-wrap: wrap; }
.mb-actions .btn { padding: 7px 16px; font-size: 13px; }
@media (max-width: 1100px) {
  .mb-layout { grid-template-columns: minmax(0, 1fr); }
  .mb-side { position: static; order: -1; }
}
@media (max-width: 600px) {
  .mb-grid { grid-template-columns: minmax(0, 1fr); }
  .mb-frow { grid-template-columns: minmax(0, 1fr); }
}

/* The preview, drawn like a Discord message */
.d-preview { --d-bg: #ffffff; --d-text: #313338; --d-muted: #5c5e66; --d-embed: #f2f3f5; --d-link: #006ce7; --d-code: #ebedef; --d-mention: rgba(88, 101, 242, .15); --d-mention-text: #505cdc;
  background: var(--d-bg); color: var(--d-text); padding: 16px; font-size: 15px; line-height: 1.375; overflow-wrap: anywhere; max-height: 75vh; overflow-y: auto; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .d-preview { --d-bg: #313338; --d-text: #dbdee1; --d-muted: #949ba4; --d-embed: #2b2d31; --d-link: #00a8fc; --d-code: #2b2d31; --d-mention: rgba(88, 101, 242, .3); --d-mention-text: #c9cdfb; }
}
:root[data-theme="dark"] .d-preview { --d-bg: #313338; --d-text: #dbdee1; --d-muted: #949ba4; --d-embed: #2b2d31; --d-link: #00a8fc; --d-code: #2b2d31; --d-mention: rgba(88, 101, 242, .3); --d-mention-text: #c9cdfb; }
.d-msg { display: flex; gap: 16px; }
.d-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--d-embed); }
.d-body { min-width: 0; flex: 1; }
.d-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.d-name { font-weight: 600; }
.d-app { background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 4px; border-radius: 3px; }
.d-stamp { color: var(--d-muted); font-size: 12px; margin-left: 2px; }
.d-md b { font-weight: 700; }
.d-link { color: var(--d-link); text-decoration: none; }
.d-link:hover { text-decoration: underline; }
.d-code { background: var(--d-code); border-radius: 4px; padding: 0 3px; font: 85% ui-monospace, monospace; }
.d-pre { background: var(--d-code); border-radius: 4px; padding: 8px; margin: 4px 0; overflow-x: auto; font: 85% ui-monospace, monospace; white-space: pre-wrap; }
.d-quote { border-left: 4px solid var(--d-muted); margin: 2px 0; padding: 0 8px 0 12px; }
.d-list { margin: 2px 0; padding-left: 22px; }
.d-h1 { font-size: 1.5em; font-weight: 700; margin: 8px 0 4px; }
.d-h2 { font-size: 1.25em; font-weight: 700; margin: 8px 0 4px; }
.d-h3 { font-size: 1em; font-weight: 700; margin: 8px 0 4px; }
.d-sub { color: var(--d-muted); font-size: 12px; }
.d-mention { background: var(--d-mention); color: var(--m, var(--d-mention-text)); border-radius: 3px; padding: 0 2px; font-weight: 500; }
.d-emoji { display: inline-block; width: 1.375em; height: 1.375em; vertical-align: bottom; object-fit: contain; }
.d-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; cursor: pointer; }
.d-spoiler.shown { background: var(--d-code); color: inherit; cursor: auto; }
.d-time-tag { background: var(--d-code); border-radius: 3px; padding: 0 2px; }
.d-content { margin-top: 2px; }
.d-embed { --bar: #1e1f22; display: flex; gap: 16px; max-width: 520px; margin-top: 6px; background: var(--d-embed); border-left: 4px solid var(--bar); border-radius: 4px; padding: 8px 16px 16px 12px; }
.d-embed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.d-author { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.d-author a { color: inherit; text-decoration: none; }
.d-author a:hover { text-decoration: underline; }
.d-author-icon, .d-footer-icon { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.d-footer-icon { width: 20px; height: 20px; }
.d-title { font-weight: 600; font-size: 16px; }
.d-desc { font-size: 14px; }
.d-fields { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
.d-field { min-width: 0; font-size: 14px; }
.d-fname { font-weight: 600; margin-bottom: 2px; }
.d-image { max-width: 100%; max-height: 300px; border-radius: 4px; object-fit: contain; align-self: flex-start; margin-top: 8px; }
.d-thumb { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; flex: none; margin-top: 8px; }
.d-footer { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--d-muted); margin-top: 0; }
.d-empty { color: var(--d-muted); font-size: 14px; margin-top: 4px; font-style: italic; }

/* AutoMod rules from Discord */
.am-rule { margin-bottom: 12px; }
.am-rule.off { opacity: .7; }
.am-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.am-head b { display: block; }
.am-head small { color: var(--muted); font-size: 13px; }
.am-body { padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.am-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.am-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.am-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.am-chip { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 1px 8px; font-size: 13px; overflow-wrap: anywhere; }
code.am-chip { font: 12px ui-monospace, monospace; padding: 2px 8px; }
@media (max-width: 600px) { .am-row { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Customising the bot's own messages */
.mb-modes { margin-bottom: 14px; }
.mb-about { margin: 10px 0 0; }
.mb-state { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.mb-where .note { margin: 10px 0 0; }
.mb-placeholders { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.mb-placeholders .mb-label { font-weight: 400; }
button.mb-ph { cursor: pointer; font: 12px ui-monospace, monospace; color: var(--text); }
button.mb-ph:hover { border-color: var(--accent); color: var(--accent); }

/* Pages premium covers */
.nav-item .nav-premium { margin-left: auto; font-size: 10px; padding: 1px 7px; }
.page-lock { --tint: var(--honey-2); max-width: 620px; margin: 10px auto; padding: 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.page-lock h2 { margin: 4px 0 0; }
.page-lock p { margin: 0; color: var(--muted); }
.page-lock .btn { margin-top: 8px; padding: 8px 18px; font-size: 13px; }
.page-lock .action-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.page-lock .action-buttons .btn { margin-top: 8px; padding: 8px 18px; font-size: 13px; }
.mb-premium .premium-badge { margin: 0 4px 0 0; }
