/* VECTRA Panel design system. Two themes (dark default, light), calm surfaces, one accent colour.
   Every colour is a token; [data-theme="light"] swaps them. */
:root {
  --bg: #0a0f1c;
  --bg-raised: #0d1322;
  --surface: #111a2d;
  --surface-2: #162036;
  --surface-3: #1e2a44;
  --line: rgba(148, 170, 210, 0.12);
  --line-strong: rgba(148, 170, 210, 0.22);
  --hover: rgba(148, 170, 210, 0.08);
  --text: #e9edf5;
  --text-dim: #a0abc2;
  --text-faint: #6b7790;
  --accent: #2ee59d;
  --accent-hover: #5af0b6;
  --accent-ink: #03150d;
  --green: #2ee59d;
  --green-dim: #19b878;
  --green-ink: #03150d;
  --green-wash: rgba(46, 229, 157, 0.1);
  --amber: #f2b84b;
  --amber-wash: rgba(242, 184, 75, 0.1);
  --red: #ff6070;
  --red-wash: rgba(255, 96, 112, 0.1);
  --blue: #7aaeff;
  --blue-wash: rgba(122, 174, 255, 0.1);
  --violet: #b18cff;
  --violet-wash: rgba(177, 140, 255, 0.12);
  --navy: #12305f;
  --avatar-text: #cfe0ff;
  --knob: #b8c3d9;
  --code-text: #cfe4ff;
  --topbar-bg: rgba(10, 15, 28, 0.82);
  --scrim: rgba(3, 7, 15, 0.7);
  --shadow: none;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --font-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 10px;
  --r-sm: 7px;
  --rail: 248px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f5f8;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --surface-3: #e4e8ef;
  --line: rgba(15, 25, 45, 0.09);
  --line-strong: rgba(15, 25, 45, 0.16);
  --hover: rgba(15, 25, 45, 0.05);
  --text: #0d1526;
  --text-dim: #4a5670;
  --text-faint: #7d879b;
  --accent: #12b76a;
  --accent-hover: #0fa35e;
  --accent-ink: #ffffff;
  --green: #0b8a52;
  --green-dim: #12b76a;
  --green-ink: #ffffff;
  --green-wash: rgba(18, 183, 106, 0.1);
  --amber: #a86400;
  --amber-wash: rgba(242, 160, 30, 0.13);
  --red: #d92d45;
  --red-wash: rgba(217, 45, 69, 0.08);
  --blue: #2563eb;
  --blue-wash: rgba(37, 99, 235, 0.08);
  --violet: #7c3aed;
  --violet-wash: rgba(124, 58, 237, 0.09);
  --navy: #dbe6ff;
  --avatar-text: #12305f;
  --knob: #ffffff;
  --code-text: #0d1526;
  --topbar-bg: rgba(244, 245, 248, 0.86);
  --scrim: rgba(15, 25, 45, 0.35);
  --shadow: 0 1px 2px rgba(15, 25, 45, 0.05);
  --shadow-lg: 0 24px 60px rgba(15, 25, 45, 0.18);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14.5px/1.5 var(--font-ui); letter-spacing: 0.003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color 0.25s, color 0.25s;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(46, 229, 157, 0.28); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }

/* ---------- app frame ---------- */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px;
  padding: 18px 14px 14px; background: var(--bg-raised); border-right: 1px solid var(--line); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 18px; }
.brand__tile { width: 32px; height: 32px; border-radius: 9px; background: #eef2f6; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px rgba(15, 25, 45, 0.08); }
.brand__tile img { width: 24px; height: 24px; object-fit: contain; }
.brand__name { font: 700 14px/1 var(--font-ui); letter-spacing: 0.12em; }
.brand__name small { display: inline-block; margin-left: 6px; font: 600 10px/1 var(--font-ui); letter-spacing: 0.08em; color: var(--accent); padding: 3px 6px; border-radius: 5px; background: var(--green-wash); vertical-align: 2px; }

.rail__label { margin: 20px 10px 6px; font: 600 11px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.nav { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-dim); font-weight: 500; position: relative; transition: background 0.15s, color 0.15s; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: 0.8; }
.nav:hover { background: var(--hover); color: var(--text); }
.nav[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.nav[aria-current="page"] svg { color: var(--accent); opacity: 1; }
.nav .count { margin-left: auto; font: 600 11px/1 var(--font-ui); padding: 3px 7px; border-radius: 99px; background: var(--amber-wash); color: var(--amber); }
.rail__spacer { flex: 1; min-height: 16px; }

.server-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 11px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); text-align: left; box-shadow: var(--shadow); transition: border-color 0.15s; }
.server-switch:hover { border-color: var(--text-faint); }
.server-switch__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-switch__meta { font-size: 12px; color: var(--text-faint); }
.server-switch > div { min-width: 0; flex: 1; }
.server-switch > svg { width: 16px; height: 16px; flex: none; color: var(--text-faint); }

.rail__foot { display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r); border: 1px solid transparent; flex: 1; min-width: 0; background: none; text-align: left; }
.user-chip:hover { background: var(--hover); }
.user-chip > div { min-width: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; font: 600 11.5px/1 var(--font-ui); color: var(--avatar-text); flex: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 36px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: var(--topbar-bg); backdrop-filter: blur(12px); min-height: 60px; }
.topbar__crumbs { display: flex; align-items: center; gap: 8px; color: var(--text-faint); min-width: 0; font-size: 13.5px; }
.topbar__crumbs a:hover { color: var(--text); }
.topbar__crumbs b { color: var(--text); font-weight: 600; }
.topbar__spacer { flex: 1; }
.palette-hint { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text-faint); min-width: 200px; }
.palette-hint span { margin-right: auto; }
.palette-hint:hover { border-color: var(--text-faint); color: var(--text-dim); }
.theme-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-dim); }
.theme-btn:hover { color: var(--text); border-color: var(--text-faint); }
.theme-btn svg { width: 17px; height: 17px; }
kbd { font: 500 11px/1 var(--font-mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text-dim); }
.content { padding: 32px 36px 96px; max-width: 1240px; width: 100%; margin: 0 auto; }
.menu-btn { display: none; }

/* ---------- headings ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font: 650 28px/1.15 var(--font-ui); letter-spacing: -0.02em; }
.page-head h1 em { font-style: normal; color: inherit; }
.page-head p { color: var(--text-dim); margin-top: 6px; max-width: 62ch; }
.page-head__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { font: 600 11px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.h2 { font: 650 20px/1.2 var(--font-ui); letter-spacing: -0.01em; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 14px; }
.section-title h2 { font: 650 18px/1.2 var(--font-ui); letter-spacing: -0.01em; }
.section-title .eyebrow { margin-left: auto; }

/* ---------- buttons ---------- */
.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-strong); background: var(--surface); color: var(--text); font-weight: 550; white-space: nowrap; box-shadow: var(--shadow); transition: background 0.15s, border-color 0.15s, transform 0.08s; }
.btn:hover { background: var(--surface-2); border-color: var(--text-faint); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-dim); box-shadow: none; }
.btn--ghost:hover { background: var(--hover); border-color: transparent; color: var(--text); }
.btn--danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: var(--red-wash); }
.btn--danger:hover { background: color-mix(in srgb, var(--red) 18%, transparent); border-color: var(--red); }
.btn--sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn--lg { height: 44px; padding: 0 18px; font-size: 15px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn--icon { width: 36px; padding: 0; }
.btn--sm.btn--icon { width: 30px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.card__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card__head h3 { font-weight: 650; font-size: 15px; }
.card__head .eyebrow { margin-left: auto; }
.card__body { padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }

.stat { padding: 18px 20px; }
.stat__label { color: var(--text-dim); font-size: 13px; font-weight: 500; }
.stat__value { font: 650 30px/1.1 var(--font-ui); font-feature-settings: "tnum"; letter-spacing: -0.02em; margin-top: 10px; }
.stat__sub { margin-top: 6px; font-size: 12.5px; color: var(--text-faint); }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font: 550 12px/1.3 var(--font-ui); border: 1px solid var(--line-strong); color: var(--text-dim); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--none::before { display: none; }
.pill--ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); background: var(--green-wash); }
.pill--warn { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, transparent); background: var(--amber-wash); }
.pill--bad { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); background: var(--red-wash); }
.pill--info { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, transparent); background: var(--blue-wash); }
.pill--live::before { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.tag { display: inline-block; padding: 2px 7px; border-radius: 5px; font: 600 10.5px/1.4 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; background: var(--surface-3); color: var(--text-dim); }
.tag--beta { background: var(--amber-wash); color: var(--amber); }
.tag--soon { background: var(--blue-wash); color: var(--blue); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 550; font-size: 13.5px; }
.hint { color: var(--text-faint); font-size: 13px; line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--r-sm); transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { height: auto; min-height: 90px; padding: 9px 12px; resize: vertical; font: 400 12.5px/1.5 var(--font-mono); }
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--green-wash); }
.input--mono { font-family: var(--font-mono); font-size: 13px; }
.input--num { width: 116px; font-family: var(--font-mono); text-align: right; }
.input[aria-invalid="true"] { border-color: var(--red); }
.field-error { color: var(--red); font-size: 12.5px; }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238a96ad' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.select option { background: var(--surface); }
.with-unit { display: flex; align-items: center; gap: 8px; }
.unit { color: var(--text-faint); font: 400 12px var(--font-mono); }

/* toggle */
.switch { position: relative; width: 40px; height: 23px; flex: none; display: inline-block; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-strong); transition: background 0.18s, border-color 0.18s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--knob); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.2s var(--ease), background 0.18s; }
.switch input:checked + i { background: var(--accent); border-color: var(--accent); }
.switch input:checked + i::after { transform: translateX(17px); background: var(--accent-ink); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* segmented */
.seg { align-self: flex-start; display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 7px 16px; border-radius: 7px; color: var(--text-dim); font-weight: 550; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), inset 0 0 0 1px var(--line-strong); }
.seg button[aria-pressed="true"].is-enforce { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.seg button[aria-pressed="true"].is-shadow { background: var(--amber-wash); color: var(--amber); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 45%, transparent); }

/* setting rows */
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 28px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting--stack { grid-template-columns: 1fr; }
.setting__title { font-weight: 550; display: flex; align-items: center; gap: 8px; }
.setting__desc { color: var(--text-faint); font-size: 13px; margin-top: 3px; max-width: 70ch; }
.setting.is-changed .setting__title::after { content: "geändert"; font: 600 10px/1 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); background: var(--green-wash); padding: 3px 6px; border-radius: 4px; }
.setting__reset { border: 0; background: none; color: var(--text-faint); padding: 2px 4px; border-radius: 4px; }
.setting__reset:hover { color: var(--text); background: var(--hover); }
.setting.is-locked { opacity: 0.55; }

/* chips input */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; min-height: 40px; background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--r-sm); width: 100%; }
.chips:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--green-wash); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; border-radius: 6px; background: var(--surface-3); font: 400 12.5px/1.3 var(--font-mono); }
.chip button { border: 0; background: none; color: var(--text-faint); width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; padding: 0; }
.chip button:hover { color: var(--red); background: var(--red-wash); }
.chips input { flex: 1; min-width: 140px; background: none; border: 0; outline: 0; padding: 3px 5px; font: 400 13px var(--font-mono); }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.suggest button { border: 1px dashed var(--line-strong); background: none; color: var(--text-dim); border-radius: 6px; padding: 3px 8px; font: 400 12px var(--font-mono); }
.suggest button:hover { border-color: var(--accent); color: var(--green); }

/* tabs (used outside the config editor) */
/* the divider is an inset shadow, so the active underline never overflows and no scrollbar appears */
.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 22px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; color: var(--text-dim); font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.tab svg { width: 16px; height: 16px; }
.tab .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- config editor: category list left, settings right ---------- */
.cfg { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 32px; align-items: start; }
.cfg__nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.cfg__group { margin: 16px 10px 6px; font: 600 11px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.cfg__group:first-child { margin-top: 0; }
.cfg__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-dim); font-weight: 550; transition: background 0.15s, color 0.15s; }
.cfg__item svg { width: 17px; height: 17px; flex: none; opacity: 0.8; }
.cfg__item:hover { background: var(--hover); color: var(--text); }
.cfg__item[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-strong); }
.cfg__item[aria-current="page"] svg { color: var(--accent); opacity: 1; }
.cfg__item .tag { margin-left: auto; font-size: 9.5px; }
.cfg__item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: auto; flex: none; }
.cfg__item .tag + .dot { margin-left: 6px; }
.cfg__main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cfg__head h2 { font: 650 22px/1.2 var(--font-ui); letter-spacing: -0.015em; display: flex; align-items: center; gap: 10px; }
.cfg__head p { color: var(--text-dim); margin-top: 6px; max-width: 70ch; }
.page-status { display: inline-flex; align-items: center; gap: 8px; color: var(--text-faint); font-size: 13px; }

/* floating bar with unsaved changes */
.draftbar {
  position: sticky; bottom: 18px; z-index: 25; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 26px auto 0; padding: 10px 10px 10px 16px; width: fit-content; max-width: 100%;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg);
  animation: rise 0.25s var(--ease);
}
.draftbar.is-dirty { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.draftbar__status { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: 8px; }
.draftbar__spacer { display: none; }

/* ---------- tables / lists ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 550 12px/1 var(--font-ui); color: var(--text-faint); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: var(--hover); }
.table .num { text-align: right; font-feature-settings: "tnum"; }
.table-wrap { overflow-x: auto; }

.feed { display: flex; flex-direction: column; }
.feed__item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.feed__item:last-child { border-bottom: 0; }
.feed__time { font: 400 12px var(--font-mono); color: var(--text-faint); }
.feed__main { min-width: 0; }
.feed__main b { font-weight: 600; }
.feed__sub { color: var(--text-faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed__item.is-new { animation: flash 1.4s ease-out; }
@keyframes flash { from { background: var(--green-wash); } to { background: transparent; } }

/* ---------- meters & charts ---------- */
.ticks { display: flex; gap: 3px; height: 34px; align-items: stretch; }
.ticks i { flex: 1; border-radius: 2px; background: var(--surface-3); }
.ticks i.on { background: var(--accent); }
.ticks i.on.warn { background: var(--amber); }
.ticks i.on.bad { background: var(--red); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 96px; }
.bars i { flex: 1; min-height: 2px; background: var(--surface-3); border-radius: 3px 3px 0 0; transition: background 0.15s; position: relative; }
.bars i.has { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.bars i:hover { background: var(--accent); }
.meter-big { font: 650 56px/1 var(--font-ui); letter-spacing: -0.03em; font-feature-settings: "tnum"; }
.meter-big small { font: 500 16px var(--font-ui); color: var(--text-faint); letter-spacing: 0; margin-left: 4px; }
.hbar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* ---------- misc ---------- */
.callout { display: flex; gap: 12px; padding: 13px 15px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.callout--warn { border-color: color-mix(in srgb, var(--amber) 35%, transparent); background: var(--amber-wash); }
.callout--warn svg { color: var(--amber); }
.callout--info { border-color: color-mix(in srgb, var(--blue) 30%, transparent); background: var(--blue-wash); }
.callout--info svg { color: var(--blue); }
.callout--ok { border-color: color-mix(in srgb, var(--green) 30%, transparent); background: var(--green-wash); }
.callout--ok svg { color: var(--green); }
.callout--bad { border-color: color-mix(in srgb, var(--red) 35%, transparent); background: var(--red-wash); }
.callout--bad svg { color: var(--red); }
.code { position: relative; font: 400 12.5px/1.65 var(--font-mono); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 14px 16px; white-space: pre-wrap; word-break: break-all; color: var(--code-text); }
.code .copy { position: absolute; top: 8px; right: 8px; }
.empty { display: grid; place-items: center; text-align: center; gap: 10px; padding: 60px 24px; color: var(--text-dim); }
.empty svg { width: 44px; height: 44px; color: var(--text-faint); }
.empty h3 { font: 650 19px/1.3 var(--font-ui); color: var(--text); }
.skeleton { border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------- modal, toast, menu, palette ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 24px; animation: fade 0.15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow-lg); animation: rise 0.22s var(--ease); }
.modal--wide { width: min(860px, 100%); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.modal__head { padding: 22px 24px 6px; }
.modal__head h2 { font: 650 20px/1.25 var(--font-ui); letter-spacing: -0.015em; }
.modal__head p { color: var(--text-dim); margin-top: 6px; }
.modal__body { padding: 14px 24px 8px; }
.modal__foot { padding: 14px 24px 22px; display: flex; justify-content: flex-end; gap: 8px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); animation: rise 0.2s var(--ease); max-width: 420px; }
.toast svg { width: 17px; height: 17px; flex: none; }
.toast--ok svg { color: var(--green); }
.toast--bad svg { color: var(--red); }
.menu { position: fixed; z-index: 70; min-width: 230px; padding: 5px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); animation: rise 0.12s var(--ease); }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 7px; border: 0; background: none; text-align: left; color: var(--text); }
.menu button:hover, .menu a:hover { background: var(--hover); }
.menu svg { width: 16px; height: 16px; color: var(--text-dim); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 5px 4px; }
.menu .menu__label { padding: 8px 10px 4px; font: 600 11px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.menu .danger { color: var(--red); }
.menu .danger svg { color: var(--red); }
.palette { width: min(620px, 100%); align-self: start; margin-top: 12vh; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); }
.palette input { width: 100%; height: 54px; padding: 0 18px; background: none; border: 0; border-bottom: 1px solid var(--line); outline: 0; font-size: 16px; }
.palette__list { max-height: 360px; overflow: auto; padding: 6px; }
.palette__item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; width: 100%; border: 0; background: none; text-align: left; }
.palette__item svg { width: 17px; height: 17px; color: var(--text-dim); }
.palette__item[aria-selected="true"] { background: var(--surface-2); }
.palette__item .hint { margin-left: auto; }

/* diff */
.diff { font: 400 12.5px/1.55 var(--font-mono); }
.diff__row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: start; }
.diff__path { grid-column: 1 / -1; color: var(--text-dim); }
.diff__from { color: var(--red); background: var(--red-wash); padding: 3px 7px; border-radius: 4px; word-break: break-all; }
.diff__to { color: var(--green); background: var(--green-wash); padding: 3px 7px; border-radius: 4px; word-break: break-all; }
.diff__arrow { color: var(--text-faint); padding-top: 3px; }

/* auth screen */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.auth__art { position: relative; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(1100px 600px at 10% -10%, rgba(18, 48, 95, 0.85), transparent 60%), #0a1222; color: #e9edf5; border-right: 1px solid var(--line); overflow: hidden; }
.auth__art h1 { font: 400 clamp(40px, 5vw, 68px)/1 var(--font-display); letter-spacing: -0.015em; max-width: 14ch; }
.auth__art h1 em { color: #2ee59d; }
.auth__art p { color: #a0abc2; max-width: 44ch; margin-top: 18px; font-size: 15.5px; }
.auth__ledger { font: 400 12px/1.9 var(--font-mono); color: #6b7790; border-top: 1px solid rgba(148, 170, 210, 0.12); padding-top: 18px; }
.auth__ledger b { color: #2ee59d; font-weight: 500; }
.auth__form { display: grid; place-items: center; padding: 40px 24px; }
.auth__form form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.auth__form h2 { font: 650 28px/1.15 var(--font-ui); letter-spacing: -0.02em; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.back-link:hover { color: var(--text); }
.link { color: var(--green); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.lock-card { position: relative; overflow: hidden; }
.lock-card::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 10px, var(--hover) 10px 11px); pointer-events: none; }

@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfg { grid-template-columns: 1fr; gap: 18px; }
  .cfg__nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .cfg__group { display: none; }
  .cfg__item { white-space: nowrap; border: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform 0.25s var(--ease); }
  .rail.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: inline-flex; }
  .palette-hint { min-width: 0; }
  .palette-hint span, .palette-hint kbd { display: none; }
  .topbar__crumbs { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .content { padding: 22px 16px 90px; }
  .topbar { padding: 10px 16px; }
  .page-head h1 { font-size: 24px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__art { display: none; }
  .setting { grid-template-columns: 1fr; }
  .feed__item { grid-template-columns: 60px minmax(0, 1fr); }
  .feed__item > :last-child { grid-column: 2; }
  .draftbar { width: 100%; }
}

/* ---------- setup guide ---------- */
.gd { min-height: 340px; }
.gd__steps { display: flex; gap: 6px; margin-bottom: 14px; }
.gd__dot { flex: 1; height: 5px; border-radius: 4px; border: 0; padding: 0; background: var(--line-strong); cursor: pointer; }
.gd__dot.is-done { background: var(--green-dim); }
.gd__dot.is-now { background: var(--accent); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent); }
.gd__count { font: 600 11.5px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.gd__title { font: 650 22px/1.2 var(--font-ui); letter-spacing: -0.015em; margin: 8px 0 10px; }
.gd__lead { color: var(--text-dim); max-width: 64ch; margin: 0 0 14px; }
.gd__list { margin: 0 0 14px; padding-left: 18px; color: var(--text-dim); display: grid; gap: 6px; }
.gd__choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.gd__choices--stack { grid-template-columns: 1fr; }
.gd__choice { position: relative; text-align: left; display: grid; gap: 6px; padding: 16px 16px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--text); cursor: pointer; transition: border-color 0.15s, transform 0.15s, background 0.15s; }
.gd__choice:hover { transform: translateY(-2px); border-color: var(--green-dim); }
.gd__choice b { font-size: 15px; }
.gd__choice span { color: var(--text-dim); font-size: 13.5px; line-height: 1.45; }
.gd__choice em { font-style: normal; font-size: 11.5px; color: var(--green); font-weight: 650; }
.gd__choice.is-on { border-color: var(--accent); background: var(--green-wash); }
.gd__rows { display: grid; gap: 8px; }
.gd__row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raised); cursor: pointer; }
.gd__row b { display: block; font-size: 14px; }
.gd__row span { display: block; color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.gd__row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.gd__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gd__chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-dim); font: 500 13px/1 var(--font-mono); cursor: pointer; transition: all 0.15s; }
.gd__chip:hover { border-color: var(--green-dim); color: var(--text); }
.gd__chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gd__sep { height: 1px; background: var(--line); margin: 18px 0; }
.gd__changes { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.gd__changes code { color: var(--green); }
.gd__changes span { color: var(--text-dim); }
.gd__score { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.gd__score b { grid-row: span 2; font-size: 34px; color: var(--green); }
.gd__score span { color: var(--text-dim); font-size: 13px; }
.gd__score em { font-style: normal; font-size: 13px; }
.gd__nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.gd__spacer { flex: 1; }
.gd .callout { margin-top: 14px; }
@media (max-width: 640px) { .gd__nav .btn { flex: 1 1 auto; } .gd__spacer { display: none; } }

/* ---------- theme picker after sign-up ---------- */
.tp { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; background: radial-gradient(900px 500px at 50% -10%, var(--green-wash), transparent 70%), var(--bg); }
.tp__inner { width: min(760px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.tp__inner > * { animation: tp-in 0.6s var(--ease) both; }
.tp__inner > :nth-child(2) { animation-delay: 0.08s; }
.tp__inner > :nth-child(3) { animation-delay: 0.16s; }
.tp__inner > :nth-child(4) { animation-delay: 0.26s; }
.tp__inner > :nth-child(5) { animation-delay: 0.36s; }
.tp__inner > :nth-child(6) { animation-delay: 0.42s; }
@keyframes tp-in { from { opacity: 0; transform: translateY(14px); } }
.tp__badge { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent); animation: tp-pop 0.7s var(--ease) both !important; }
.tp__badge svg { width: 26px; height: 26px; }
@keyframes tp-pop { 0% { opacity: 0; transform: scale(0.4) rotate(-20deg); } 60% { transform: scale(1.12) rotate(6deg); } 100% { opacity: 1; transform: none; } }
.tp h1 { font: 700 clamp(28px, 4vw, 40px)/1.1 var(--font-ui); letter-spacing: -0.03em; margin-top: 6px; }
.tp__lead { color: var(--text-dim); font-size: 16px; max-width: 46ch; }
.tp__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; margin-top: 14px; }
.tp-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 12px 12px 16px; border-radius: 18px; border: 2px solid var(--line-strong); background: var(--surface); text-align: left; color: var(--text); box-shadow: var(--shadow); transition: border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s; }
.tp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tp-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--green-wash), var(--shadow-lg); }
.tp-card__text { padding: 0 6px; display: grid; gap: 4px; }
.tp-card__text b { font-size: 16px; }
.tp-card__text > span { color: var(--text-dim); font-size: 13.5px; }
.tp-badge { font: 600 11px/1 var(--font-ui); padding: 4px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-dim); }
.tp-card[data-kind="dark"] .tp-badge { background: var(--green-wash); color: var(--green); }
.tp-check { position: absolute; top: 20px; right: 20px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); transform: scale(0); transition: transform 0.3s var(--ease); }
.tp-check svg { width: 15px; height: 15px; }
.tp-card[aria-pressed="true"] .tp-check { transform: scale(1); }
.tp__go { margin-top: 18px; min-width: 200px; }

/* mini panel previews, fixed colours so each shows its own theme */
.tp-prev { --pb: #f4f5f8; --ps: #ffffff; --pl: rgba(15, 25, 45, 0.1); --pt: #c9d0dc; --pa: #12b76a; display: grid; grid-template-columns: 22% 1fr; height: 170px; border-radius: 11px; overflow: hidden; background: var(--pb); border: 1px solid var(--pl); }
.tp-prev--dark { --pb: #0a0f1c; --ps: #111a2d; --pl: rgba(148, 170, 210, 0.14); --pt: #2a3756; --pa: #2ee59d; }
.tp-prev__rail { background: var(--ps); border-right: 1px solid var(--pl); padding: 12px 9px; display: flex; flex-direction: column; gap: 8px; }
.tp-prev__rail i { height: 7px; border-radius: 4px; background: var(--pt); }
.tp-prev__rail i.tp-logo { width: 18px; height: 18px; border-radius: 5px; background: var(--pa); margin-bottom: 6px; }
.tp-prev__rail i.on { background: var(--pa); opacity: 0.7; }
.tp-prev__main { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.tp-prev__main .tp-title { height: 10px; width: 45%; border-radius: 4px; background: var(--pt); }
.tp-prev__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.tp-prev__stats i { height: 30px; border-radius: 6px; background: var(--ps); border: 1px solid var(--pl); }
.tp-prev__chart { flex: 1; display: flex; align-items: flex-end; gap: 4px; padding: 8px; border-radius: 6px; background: var(--ps); border: 1px solid var(--pl); }
.tp-prev__chart i { flex: 1; border-radius: 2px 2px 0 0; background: var(--pa); opacity: 0.75; }
@media (max-width: 640px) { .tp__cards { grid-template-columns: 1fr; } .tp-prev { height: 130px; } }
/* config editor uses the full width: category list at the far left, settings take the rest */
.content:has(.cfg) { max-width: none; margin: 0; }
@media (min-width: 1101px) { .content:has(.cfg) .cfg { grid-template-columns: 220px minmax(0, 1fr); gap: 36px; } }


/* ---------- info tooltip ("i" next to a setting) ---------- */
.info { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--text-faint); cursor: help; flex: none; vertical-align: middle; }
.info svg { width: 15px; height: 15px; }
.info:hover, .info:focus-visible { color: var(--text); outline: none; }
.info__pop {
  position: absolute; z-index: 40; left: 50%; bottom: calc(100% + 10px); width: max-content; max-width: 320px;
  padding: 9px 12px; border-radius: 9px; background: var(--text); color: var(--bg);
  font: 500 12.5px/1.45 var(--font-ui); text-align: left; text-transform: none; letter-spacing: 0; white-space: normal;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity 0.15s, transform 0.15s;
}
.info__pop::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--text); }
.info:hover .info__pop, .info:focus-visible .info__pop { opacity: 1; transform: translate(-50%, 0); }
.setting__title { flex-wrap: wrap; }.table-wrap .info__pop { left: calc(100% + 10px); bottom: auto; top: 50%; transform: translate(4px, -50%); }
.table-wrap .info:hover .info__pop, .table-wrap .info:focus-visible .info__pop { transform: translate(0, -50%); }
.table-wrap .info__pop::after { left: auto; right: 100%; top: 50%; transform: translateY(-50%); border-top-color: transparent; border-right-color: var(--text); }

/* --- Discord sign-in, onboarding guide, owner panel ------------------------------------------------- */
.btn--discord { background: #5865f2; border-color: #5865f2; color: #fff; font-weight: 650; gap: 10px; }
.btn--discord:hover { background: #4752c4; border-color: #4752c4; color: #fff; }
.btn--discord[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.auth__perks { list-style: none; display: grid; gap: 8px; margin: 2px 0 0; padding: 0; color: var(--text-dim); font-size: 14px; }
.auth__perks li { display: flex; align-items: center; gap: 9px; }
.auth__perks svg { width: 16px; height: 16px; color: var(--green); flex: none; }
.auth__email { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 12px; }
.auth__email summary { cursor: pointer; color: var(--text-faint); font-size: 13px; }
.auth__email[open] { display: grid; gap: 12px; }

.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.ob { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, #5865f2 14%, transparent), transparent 70%), var(--bg); }
.ob__card { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px; animation: rise 0.35s var(--ease) both; }
.ob__who { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.ob__hi { font-weight: 650; font-size: 16px; }
.ob__out { margin-left: auto; }
.ob__title { font: 650 26px/1.2 var(--font-ui); letter-spacing: -0.02em; }
.ob__lead { color: var(--text-dim); margin-top: 8px; max-width: 54ch; }
.ob__steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ob-step { display: flex; gap: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); transition: background 0.3s, border-color 0.3s, opacity 0.3s; }
.ob-step__num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 650; font-size: 14px; background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--line-strong); }
.ob-step__num svg { width: 16px; height: 16px; }
.ob-step__body { flex: 1; min-width: 0; }
.ob-step__title { font-weight: 650; display: flex; align-items: center; gap: 10px; min-height: 30px; }
.ob-step__body p { color: var(--text-dim); margin-top: 2px; font-size: 14px; }
.ob-step__action { margin-top: 12px; }
.ob-step__ok { font-size: 12px; font-weight: 600; color: var(--green); }
.ob-step.is-active { border-color: color-mix(in srgb, #5865f2 55%, transparent); background: color-mix(in srgb, #5865f2 7%, var(--surface)); }
.ob-step.is-active .ob-step__num { background: #5865f2; border-color: #5865f2; color: #fff; }
.ob-step.is-done .ob-step__num { background: var(--green-wash); border-color: color-mix(in srgb, var(--green) 40%, transparent); color: var(--green); }
.ob-step.is-done .ob-step__title { color: var(--text-dim); }
.ob-step.is-todo { opacity: 0.55; }
.ob__live { display: flex; align-items: center; gap: 9px; margin-top: 18px; font-size: 13px; color: var(--text-faint); }
.ob__dot { width: 8px; height: 8px; border-radius: 50%; background: #5865f2; animation: pulse 1.6s ease-in-out infinite; }
.ob__notice { display: grid; gap: 4px; }
.ob__notice > svg { width: 36px; height: 36px; color: var(--red); margin-bottom: 8px; }
.ob__card--win { text-align: center; display: grid; justify-items: center; gap: 4px; padding: 44px 28px; }
.ob__win { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--green-wash); color: var(--green); margin-bottom: 12px; animation: pop 0.5s var(--ease) both; }
.ob__win svg { width: 30px; height: 30px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.owner-btn { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; padding: 9px 11px; border-radius: var(--r); font-weight: 600; font-size: 13.5px;
  color: var(--amber); background: var(--amber-wash); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.owner-btn span { flex: 1; }
.owner-btn:hover, .owner-btn[aria-current="page"] { border-color: var(--amber); }
.owner-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); margin-bottom: 8px; }
.owner-user { display: flex; align-items: center; gap: 10px; }
.owner-user .faint { font-size: 12.5px; }
.owner-cell { display: grid; gap: 2px; }
.owner-cell .mono { font-size: 12px; }
@media (max-width: 640px) { .ob__card { padding: 20px; } .ob__title { font-size: 22px; } }

/* --- create license / redeem codes ---------------------------------------------------------------- */
.pick__list { display: grid; gap: 2px; margin-top: 6px; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 4px; }
.pick__item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 7px 8px; color: var(--text); }
.pick__item:hover { background: var(--hover); }
.pick__chosen { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--accent); border-radius: var(--r); background: var(--green-wash); }
.codes { display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.codes__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface-2); }
.codes__row .mono { font-size: 15px; letter-spacing: 0.06em; }
.redeem__input { font-size: 16px; letter-spacing: 0.08em; text-align: center; height: 48px; }
.modal .seg { flex-wrap: wrap; }

/* --- checkout and thank-you ------------------------------------------------------------------------- */
.co { width: min(560px, 100%); }
.co__plan { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.co__label { font: 650 24px/1.15 var(--font-ui); letter-spacing: -0.02em; }
.co__runtime { margin-top: 4px; font-size: 14px; }
.co__price { display: grid; justify-items: end; gap: 2px; }
.co__price s { font-size: 14px; }
.co__price b { font: 700 30px/1 var(--font-ui); letter-spacing: -0.02em; }
.co__badge { margin-top: 6px; font: 600 11.5px/1 var(--font-ui); padding: 5px 8px; border-radius: 99px; color: var(--green); background: var(--green-wash); border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); }
.co__features { list-style: none; padding: 0; margin: 16px 0 6px; display: grid; gap: 8px; font-size: 14.5px; color: var(--text-dim); }
.co__features li { display: flex; gap: 9px; align-items: center; }
.co__features svg { width: 15px; height: 15px; color: var(--green); flex: none; }
.co__checks { display: grid; gap: 8px; margin: 18px 0 14px; }
.co-check { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.co-check p { color: var(--text-dim); font-size: 13.5px; margin-top: 2px; }
.co-check__icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.co-check__icon svg { width: 14px; height: 14px; }
.co-check.is-ok .co-check__icon { background: var(--green-wash); color: var(--green); }
.co-check.is-todo { border-color: color-mix(in srgb, #5865f2 55%, transparent); background: color-mix(in srgb, #5865f2 7%, var(--surface)); }
.co-check.is-todo .co-check__icon { background: #5865f2; color: #fff; }
.co-check.is-warn .co-check__icon { background: var(--amber-wash); color: var(--amber); }
.co__buy { width: 100%; margin-top: 4px; }
.co__buy.is-busy { opacity: 0.7; pointer-events: none; }
.co .callout { margin-bottom: 12px; }
.co-thanks { width: min(580px, 100%); }
.co-thanks .ob__lead { max-width: 46ch; margin: 8px auto 0; }
.co-thanks__role { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 7px 12px; border-radius: 99px; font-size: 13px; color: #c9cefe; background: color-mix(in srgb, #5865f2 18%, transparent); }
.co-thanks__next { text-align: left; margin: 22px auto; padding-left: 20px; color: var(--text-dim); display: grid; gap: 6px; font-size: 14.5px; }
.co-thanks__support { display: flex; align-items: center; gap: 12px; text-align: left; margin-top: 24px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); width: 100%; }
.co-thanks__support > svg { width: 20px; height: 20px; color: var(--blue); flex: none; }
.co-thanks__support > div { flex: 1; }
.co-thanks__support p { color: var(--text-dim); font-size: 13.5px; margin-top: 2px; }
.ob__code { margin-left: auto; background: none; border: 0; padding: 0; font-size: 13px; cursor: pointer; }

/* license list in the "Add server" dialog */
.lic-list { display: grid; gap: 8px; }
.lic { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); background: var(--green-wash); }
.lic__icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--green); flex: none; }
.lic__icon svg { width: 16px; height: 16px; }
.lic__body { flex: 1; display: grid; gap: 2px; min-width: 0; }
.lic__body .mono { font-size: 12.5px; }
.co-thanks__spam { text-align: left; margin-top: 16px; font-size: 14px; }

/* --- server dashboard: KPI tiles and the hourly chart --------------------------------------------------- */
/* outcome colours: detections red, kicks amber, bans violet, shadow blue */
.seg--warn { --seg: var(--red); }
.seg--kick { --seg: var(--amber); }
.seg--ban { --seg: var(--violet); }
.seg--shadow { --seg: var(--blue); }

.kpi { position: relative; overflow: hidden; padding: 18px 20px 16px; animation: rise 0.55s var(--ease) backwards; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--kpi); opacity: 0.85; }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, var(--kpi-wash), transparent 70%); pointer-events: none; }
.kpi--green { --kpi: var(--green); --kpi-wash: var(--green-wash); }
.kpi--red { --kpi: var(--red); --kpi-wash: var(--red-wash); }
.kpi--violet { --kpi: var(--violet); --kpi-wash: var(--violet-wash); }
.kpi--amber { --kpi: var(--amber); --kpi-wash: var(--amber-wash); }
.kpi__head { display: flex; align-items: center; gap: 10px; }
.kpi__icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--kpi); background: var(--kpi-wash); flex: none; }
.kpi__label { font-size: 13px; font-weight: 550; color: var(--text-dim); }
.kpi__value { font: 680 34px/1.05 var(--font-ui); font-feature-settings: "tnum"; letter-spacing: -0.025em; margin-top: 14px; }
.kpi__sub { margin-top: 6px; font-size: 12.5px; color: var(--text-faint); }
.kpi__sub b { color: var(--text-dim); font-weight: 600; font-feature-settings: "tnum"; }
.trend { font-feature-settings: "tnum"; }
.trend--up { color: var(--red); }
.trend--down { color: var(--green); }

.chart-card { animation: rise 0.55s var(--ease) 0.2s backwards; }
.chart-card .card__head { flex-wrap: wrap; row-gap: 10px; }
.chart-card .card__head .eyebrow { margin-left: 0; display: block; margin-top: 6px; }
.chart-legend { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.chart-legend__item { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; color: var(--text-dim); cursor: default; }
.chart-legend__item i { width: 9px; height: 9px; border-radius: 3px; background: var(--seg); }
.chart-legend__item b { color: var(--text); font-weight: 650; font-feature-settings: "tnum"; }

.chart { display: grid; gap: 8px; }
.chart__plot { position: relative; height: 230px; padding-left: 38px; }
.chart__grid { position: absolute; inset: 0 0 0 38px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart__line { position: relative; border-top: 1px dashed var(--line); height: 0; }
.chart__line:last-child { border-top: 1px solid var(--line-strong); }
.chart__line span { position: absolute; right: calc(100% + 8px); top: -7px; font: 400 11px/1 var(--font-mono); color: var(--text-faint); }
.chart__cols { position: absolute; inset: 0 0 0 38px; display: flex; align-items: flex-end; gap: 5px; }
.chart__col { flex: 1; height: 100%; display: flex; align-items: flex-end; border-radius: 6px 6px 0 0; transition: background 0.15s; }
.chart__col:hover { background: var(--hover); }
.chart__stack { width: 100%; display: flex; flex-direction: column-reverse; gap: 1px; border-radius: 5px 5px 0 0; overflow: hidden;
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.05), height 0.45s var(--ease); }
.dash-in .chart__stack { transform: scaleY(1); }
.chart__stack i { display: block; flex-basis: 0; min-height: 0; background: var(--seg); opacity: 0.88; }
.chart__col:hover .chart__stack i { opacity: 1; }
.chart__stack.pulse-once { animation: bar-pulse 0.9s var(--ease); }
@keyframes bar-pulse { 0% { filter: brightness(1.8) drop-shadow(0 0 6px var(--red)); } 100% { filter: none; } }
.chart__x { display: flex; gap: 5px; padding-left: 38px; font: 400 10.5px/1 var(--font-mono); color: var(--text-faint); }
.chart__x span { flex: 1; text-align: center; white-space: nowrap; overflow: visible; }
.chart__tip { position: absolute; top: 6px; transform: translateX(-50%); min-width: 170px; padding: 10px 12px; border-radius: 10px; background: var(--bg-raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); font-size: 12.5px; pointer-events: none; z-index: 2; }
.chart__tip-head { display: flex; justify-content: space-between; gap: 12px; color: var(--text-dim); margin-bottom: 6px; }
.chart__tip-head b { color: var(--text); font-feature-settings: "tnum"; }
.chart__tip-row { display: flex; align-items: center; gap: 7px; padding: 2px 0; }
.chart__tip-row i { width: 8px; height: 8px; border-radius: 2px; background: var(--seg); }
.chart__tip-row span { margin-left: auto; font-feature-settings: "tnum"; }

/* dashboard: version tile, compact row, scrolling live feed */
.kpi__head .kpi__action { margin-left: auto; }
.kpi__action { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong); color: var(--text-dim); background: var(--surface-2); white-space: nowrap; transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s var(--ease); position: relative; z-index: 1; }
.kpi__action:hover { color: var(--text); border-color: var(--text-faint); transform: translateY(-1px); }
.kpi__action.is-hot { color: var(--accent-ink); background: var(--amber); border-color: var(--amber); }
.kpi__action.is-off { opacity: 0.6; cursor: default; transform: none; }
.kpi__value--version { font-family: var(--font-mono); font-size: 28px; letter-spacing: -0.02em; }
.dash-row { align-items: stretch; }
.dash-row > .card { min-width: 0; }
.feed-card .card__head .eyebrow { margin-left: auto; }
.feed-scroll { max-height: 380px; overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 1100px) { .dash-row { grid-template-columns: 1fr 1fr; } .dash-row > :last-child { grid-column: 1 / -1; } }
@media (max-width: 720px) { .dash-row { grid-template-columns: 1fr; } }

/* server management */
.mg-tiles { margin-bottom: 16px; }
.mg-tile__value { font-size: 24px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-tile__value .mono { font-size: 20px; letter-spacing: -0.01em; }
.mg-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: stretch; }
.mg-card { display: flex; flex-direction: column; }
.mg-card .card__head .pill, .mg-card .card__head .eyebrow { margin-left: auto; }
.mg-form { display: grid; gap: 18px; flex: 1; }
.mg-field { display: grid; gap: 7px; min-width: 0; }
.mg-field__label { font: 600 11px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.mg-field__hint { font-size: 12.5px; color: var(--text-faint); }
.mg-ip { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); transition: border-color 0.18s, box-shadow 0.22s var(--ease); overflow: hidden; }
.mg-ip:hover { border-color: var(--text-faint); }
.mg-ip:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--green-wash); }
.mg-ip .mg-ip__input { flex: 1; min-width: 0; border: 0; box-shadow: none !important; background: transparent; }
.mg-ip__port { display: grid; place-items: center; padding: 0 12px; font: 500 13px/1 var(--font-mono); color: var(--text-faint); background: var(--surface-2); border-left: 1px solid var(--line); }
.mg-ip.is-locked { opacity: 0.6; }
.mg-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 55%, transparent); border-radius: 0 0 14px 14px; }
.mg-foot__state { margin-right: auto; font-size: 12.5px; color: var(--text-faint); font-family: var(--font-mono); }
.mg-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--blue-wash); color: var(--text-dim); font-size: 13.5px; }
.mg-note svg { color: var(--blue); flex: none; margin-top: 1px; }

.secret { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface-2); min-width: 0; transition: border-color 0.18s; }
.secret:hover { border-color: var(--text-faint); }
.secret--block { align-items: flex-start; }
.secret__value { flex: 1; min-width: 0; font-size: 13px; line-height: 30px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: filter 0.35s var(--ease), opacity 0.35s; user-select: all; }
.secret__value--block { white-space: pre-wrap; word-break: break-all; margin: 0; padding: 6px 0; line-height: 1.65; max-height: 180px; overflow: auto; }
.secret__value.is-blurred { filter: blur(5px); opacity: 0.7; user-select: none; cursor: pointer; }
.secret__actions { display: flex; gap: 2px; flex: none; }
.secret__btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--text-faint); cursor: pointer; transition: background 0.15s, color 0.15s, transform 0.12s var(--ease); }
.secret__btn:hover { background: var(--hover); color: var(--text); }
.secret__btn:active { transform: scale(0.92); }
.secret__btn.is-done { color: var(--green); }

.mg-danger { margin-top: 16px; border-color: color-mix(in srgb, var(--red) 28%, var(--line)); }
.mg-danger .card__head h3 { color: var(--red); }
.mg-danger__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; flex-wrap: wrap; }
.mg-danger__row + .mg-danger__row { border-top: 1px solid var(--line); }
.mg-danger__row b { font-weight: 600; }
.mg-danger__row p { font-size: 13px; color: var(--text-faint); margin-top: 3px; }
@media (max-width: 980px) { .mg-cols { grid-template-columns: 1fr; } }

/* checkout: lifetime discount + waiting for Stripe */
.co__discount { margin-top: 14px; }
.co-wait svg { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* owner panel: release upload */
.upload-drop { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 16px; border-radius: 12px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); color: var(--text-dim); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease); }
.upload-drop svg { color: var(--accent); }
.upload-drop b { color: var(--text); font-weight: 600; word-break: break-all; }
.upload-drop span { font-size: 12.5px; }
.upload-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-drop:hover, .upload-drop.is-over { border-color: var(--accent); background: var(--green-wash); }
.upload-drop.is-over { transform: scale(1.01); }
.upload-drop.has-file { border-style: solid; border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

/* resource version card */
.res-card .card__head .pill { margin-left: auto; }
.res-card--outdated { border-color: color-mix(in srgb, var(--amber) 45%, var(--line)); }
.res-versions { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.res-versions > div:not(.res-versions__arrow) { flex: 1; }
.res-versions__v { font: 650 20px/1.2 var(--font-mono); margin-top: 6px; letter-spacing: -0.01em; }
.res-versions__arrow { color: var(--text-faint); display: grid; place-items: center; }
.res-card--outdated .res-versions > div:first-child .res-versions__v { color: var(--amber); }
.res-card--current .res-versions__v { color: var(--green); }
.res-card .btn { width: 100%; justify-content: center; }

.hbar i.grow-x { width: 0; transition: width 0.9s var(--ease); }
.dash-in .hbar i.grow-x { width: var(--w); }
@media (max-width: 720px) {
  .chart__plot { height: 200px; }
  .chart__cols, .chart__x { gap: 2px; }
  .chart__x span:nth-child(odd) { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .chart__stack { transform: none; transition: none; }
  .kpi, .chart-card { animation: none; }
}

/* ============================================================================================================
   Polish: softer surfaces, smoother interactions and light entrance animations across the whole panel
   ============================================================================================================ */
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
@keyframes enter-x { from { opacity: 0; transform: translateX(-6px); } }

/* page content fades in piece by piece on every navigation */
.content > * { animation: enter 0.45s var(--ease) backwards; }
.content > :nth-child(2) { animation-delay: 50ms; }
.content > :nth-child(3) { animation-delay: 100ms; }
.content > :nth-child(4) { animation-delay: 150ms; }
.content > :nth-child(5) { animation-delay: 200ms; }
.content > :nth-child(n+6) { animation-delay: 250ms; }

/* cards: a hint of depth and a calm hover */
.card { transition: border-color 0.2s, box-shadow 0.25s var(--ease), transform 0.25s var(--ease); background-image: linear-gradient(180deg, color-mix(in srgb, var(--text) 2.2%, transparent), transparent 120px); }
.card:hover { border-color: var(--line-strong); }
a.card:hover, .card.is-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card__head h3 { letter-spacing: -0.005em; }
.kpi:hover { transform: translateY(-2px); }

/* buttons */
.btn { transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.25s var(--ease), transform 0.12s var(--ease); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn--primary { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 18px -10px var(--accent); }
.btn--primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 10px 26px -10px var(--accent); }
.btn svg { transition: transform 0.2s var(--ease); }
.btn:hover svg:last-child:not(:first-child) { transform: translateX(2px); }

/* inputs */
.input, .select, .textarea { transition: border-color 0.18s, box-shadow 0.22s var(--ease), background 0.18s; }
.input:focus, .select:focus, .textarea:focus { box-shadow: 0 0 0 4px var(--green-wash); }

/* switches: springy knob and a soft glow when on */
.switch i::after { transition: transform 0.28s cubic-bezier(0.3, 1.5, 0.5, 1), background 0.18s, width 0.18s; }
.switch input:active + i::after { width: 21px; }
.switch input:checked:active + i::after { transform: translateX(13px); }
.switch input:checked + i { box-shadow: 0 0 0 3px var(--green-wash); }

/* segmented controls */
.seg button { transition: background 0.2s, color 0.18s, box-shadow 0.2s; }

/* tabs: animated underline */
.tab { position: relative; border-bottom-color: transparent !important; transition: color 0.18s; }
.tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform 0.3s var(--ease); }
.tab:hover::after { transform: scaleX(0.35); opacity: 0.6; }
.tab[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }

/* rail navigation: accent marker on the active item */
.nav { transition: background 0.18s, color 0.18s, transform 0.18s var(--ease); }
.nav:hover { transform: translateX(2px); }
.nav[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); animation: enter-x 0.3s var(--ease) backwards; }

/* config: category nav + settings */
.cfg__item { position: relative; transition: background 0.18s, color 0.18s, transform 0.18s var(--ease), box-shadow 0.2s; }
.cfg__item:hover { transform: translateX(2px); }
/* (no var(--shadow) here: it is "none" in dark mode, which would invalidate the whole list) */
.cfg__item[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--line-strong), inset 3px 0 0 var(--accent); }
.cfg__main > * { animation: enter 0.4s var(--ease) backwards; }
.cfg__main > :nth-child(2) { animation-delay: 60ms; }
.cfg__main > :nth-child(3) { animation-delay: 120ms; }
.cfg__main > :nth-child(n+4) { animation-delay: 170ms; }
.cfg__head h2 svg { color: var(--accent); }
.setting { padding: 16px 14px; margin: 0 -14px; border-radius: 10px; border-bottom-color: transparent; position: relative; transition: background 0.18s; }
.setting + .setting::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; border-top: 1px solid var(--line); }
.setting:hover { background: var(--hover); }
.setting:hover::before, .setting:hover + .setting::before { opacity: 0; }
.setting.is-changed { background: color-mix(in srgb, var(--green-wash) 60%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.setting.is-changed .setting__title::after { animation: enter 0.3s var(--ease) backwards; }

/* tables: rows slide in, softer hover */
.table tbody tr { animation: enter 0.35s var(--ease) backwards; }
.table tbody tr:nth-child(2) { animation-delay: 30ms; }
.table tbody tr:nth-child(3) { animation-delay: 60ms; }
.table tbody tr:nth-child(4) { animation-delay: 90ms; }
.table tbody tr:nth-child(5) { animation-delay: 120ms; }
.table tbody tr:nth-child(6) { animation-delay: 150ms; }
.table tbody tr:nth-child(n+7) { animation-delay: 180ms; }
.table th { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }

/* feed, pills, callouts */
.feed__item { transition: background 0.15s; }
.feed__item:hover { background: var(--hover); }
.pill { transition: background 0.2s, color 0.2s, border-color 0.2s; }
.callout { animation: enter 0.4s var(--ease) backwards; }

@media (prefers-reduced-motion: reduce) {
  .content > *, .cfg__main > *, .table tbody tr, .callout, .nav[aria-current="page"]::before { animation: none; }
  .nav:hover, .cfg__item:hover, .kpi:hover, a.card:hover { transform: none; }
}
