:root {
  --bg: #0a0c10;
  --bg-2: #0f1218;
  --panel: #12151c;
  --panel-2: #171b24;
  --line: #232834;
  --line-soft: #1b2029;
  --text: #e7eaf1;
  --muted: #8b93a7;
  --dim: #5f677a;
  --accent: #5865f2;
  --accent-soft: rgba(88, 101, 242, 0.16);
  --green: #3ba55d;
  --amber: #faa61a;
  --red: #ed4245;
  --purple: #b46ce0;
  --cyan: #3fc1d6;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(88, 101, 242, 0.13), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(180, 108, 224, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 15px; }
h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.mono { font-family: var(--mono); }

/* ---------- topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 20px;
  height: 60px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 16, 0.82);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 9px; }
.brand-name {
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 13px;
}
.brand-sub {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--dim);
  border-left: 1px solid var(--line);
  padding-left: 9px;
}

.pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.5);
}
.pulse.ok { background: var(--green); animation: beat 2.6s infinite; }
.pulse.warn { background: var(--amber); animation: beat 1.6s infinite; }
.pulse.err { background: var(--red); }
.pulse.paused { background: var(--purple); }
@keyframes beat {
  0% { box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(59, 165, 93, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 165, 93, 0); }
}

.identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--purple));
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  flex: none;
}
.identity-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.identity-text > span:first-child {
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 190px;
}

.topstats { display: flex; gap: 18px; margin-left: auto; }
.stat { display: flex; flex-direction: column; line-height: 1.2; }
.stat b { font-size: 13px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.11em; color: var(--dim); }

.actions { display: flex; gap: 8px; }

/* ---------- buttons ---------- */

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, transform 0.06s;
  white-space: nowrap;
}
.btn:hover { background: #1d222c; border-color: #2d3442; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.primary:hover { background: #6772f5; }
.btn.tiny { padding: 4px 9px; font-size: 11.5px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn.paused { background: rgba(180, 108, 224, 0.18); border-color: rgba(180, 108, 224, 0.45); color: #d9b6f2; }

.icon-btn {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 6px;
}
.icon-btn:hover { color: var(--text); }

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 20px 24px;
  flex: 1;
  min-height: 0;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 140px), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filters {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-self: start;
  position: sticky;
  top: 76px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
  font-weight: 600;
}

input[type="search"], input[type="text"], input[type="number"], select, .picker {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, .picker:focus {
  border-color: rgba(88, 101, 242, 0.65);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
select { cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: all 0.14s;
}
.chip:hover { color: var(--text); border-color: #313848; }
.chip.on { background: var(--accent-soft); border-color: rgba(88, 101, 242, 0.5); color: #c3c9ff; }

/* ---------- feed ---------- */

.feed-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px 14px 14px;
}

.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 8px;
}
.feed-title { display: flex; align-items: center; gap: 9px; }
.feed-flags { display: flex; align-items: center; gap: 8px; }

.pill {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pill.live { color: #7ee2a8; border-color: rgba(59, 165, 93, 0.4); background: rgba(59, 165, 93, 0.12); }
.pill.live.off { color: var(--amber); border-color: rgba(250, 166, 26, 0.4); background: rgba(250, 166, 26, 0.1); }
.pill.live.paused { color: #d9b6f2; border-color: rgba(180, 108, 224, 0.45); background: rgba(180, 108, 224, 0.12); }

.feed {
  overflow-y: auto;
  flex: 1;
  min-height: 380px;
  max-height: calc(100vh - 230px);
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #2a303c transparent;
}
.feed::-webkit-scrollbar { width: 9px; }
.feed::-webkit-scrollbar-thumb { background: #2a303c; border-radius: 8px; }

.empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 70px 20px;
  color: var(--dim);
  text-align: center;
}
.empty strong { color: var(--muted); font-weight: 600; }

.row {
  display: grid;
  grid-template-columns: 66px 116px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 9px;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background 0.12s;
}
.row:hover { background: rgba(255, 255, 255, 0.028); }
.row + .row { border-top: 1px solid rgba(35, 40, 52, 0.5); }

.row .time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.row .badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
.row .body { min-width: 0; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.row .who { font-weight: 600; font-size: 12.5px; }
.row .where {
  font-size: 11.5px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.row .what { font-size: 12.5px; color: #c9cfe0; flex-basis: 100%; overflow-wrap: anywhere; }
.row .meta { font-family: var(--mono); font-size: 10px; color: #3f4657; }
.row .raw {
  grid-column: 1 / -1;
  margin: 8px 0 2px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: #9fb0c9;
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.row[data-group="message"] { border-left-color: var(--accent); }
.row[data-group="presence"] { border-left-color: var(--green); }
.row[data-group="voice"] { border-left-color: var(--cyan); }
.row[data-group="member"] { border-left-color: var(--amber); }
.row[data-group="channel"] { border-left-color: #6e8ef7; }
.row[data-group="server"] { border-left-color: #e08a3c; }
.row[data-group="role"] { border-left-color: #d4a72c; }
.row[data-group="moderation"] { border-left-color: var(--red); }
.row[data-group="relationship"] { border-left-color: var(--purple); }
.row[data-group="call"] { border-left-color: #35b8a8; }
.row[data-group="profile"] { border-left-color: #8f7bf0; }
.row[data-group="interaction"] { border-left-color: #4aa8ff; }

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 60;
}
.modal.hidden, .toast.hidden { display: none; }

.modal-card {
  width: min(720px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.modal-head h2 { font-size: 15px; }

.modal-body { overflow-y: auto; padding: 6px 18px 18px; }

.exempt-block { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.exempt-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }

.exempt-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 4px; margin-bottom: 9px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.13);
  border: 1px solid rgba(88, 101, 242, 0.34);
  color: #c6ccff;
  max-width: 100%;
}
.tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag em { font-family: var(--mono); font-style: normal; font-size: 9.5px; color: #7c84a8; }
.tag button {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  width: 16px; height: 16px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: grid; place-items: center;
  padding: 0;
}
.tag button:hover { background: rgba(237, 66, 69, 0.6); }

.results { display: flex; flex-direction: column; gap: 2px; max-height: 168px; overflow-y: auto; margin-top: 4px; }
.result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.result:hover { background: rgba(255, 255, 255, 0.05); }
.result .sub { margin-left: auto; font-size: 10.5px; color: var(--dim); font-family: var(--mono); }

.toggles { padding-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.toggles h3 { margin-bottom: 3px; }
.toggle { display: flex; align-items: center; gap: 9px; font-size: 12.5px; cursor: pointer; color: #c9cfe0; }
.toggle input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

.retention { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12.5px; }
.retention input { width: 84px; }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  z-index: 80;
}
.toast.err { border-color: rgba(237, 66, 69, 0.6); color: #ffb3b4; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .topstats { display: none; }
  .row { grid-template-columns: 56px 92px minmax(0, 1fr); }
  .row .meta { display: none; }
}

/* ---------- sign-in ---------- */

.auth-body {
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.auth-card {
  width: min(470px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
}

.auth-brand { display: flex; align-items: center; gap: 9px; }
.auth-card h1 { margin: 6px 0 0; font-size: 21px; letter-spacing: -0.02em; font-weight: 700; }
.auth-lede { margin: 0; font-size: 13px; line-height: 1.65; color: var(--muted); }

.auth-btn {
  justify-content: center;
  gap: 9px;
  margin-top: 4px;
  padding: 11px 16px;
  font-size: 13.5px;
}
.auth-discord { font-size: 12px; opacity: 0.9; }

.auth-fine { margin: 0; line-height: 1.7; }
.auth-fine strong { color: #c9cfe0; }

.auth-notice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 13px;
  border: 1px solid rgba(250, 166, 26, 0.4);
  border-radius: 10px;
  background: rgba(250, 166, 26, 0.08);
  color: #f0cd92;
  font-size: 12px;
  line-height: 1.65;
}
.auth-notice .mono { font-size: 11.5px; color: #f7dfb6; }

.btn.subtle { background: transparent; color: var(--muted); }
.btn.subtle:hover { color: var(--text); background: var(--panel-2); }

/* ---------- dashboard: stats rail + filter bar ---------- */

.layout {
  grid-template-columns: 300px minmax(0, 1fr);
  padding-top: 14px;
}

.filterbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 20px 11px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 16, 0.86);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 60px;
  z-index: 19;
  flex-wrap: wrap;
}

.fb-field { display: flex; flex-direction: column; gap: 4px; min-width: 132px; }
.fb-field > label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
  font-weight: 600;
}
.fb-field.search { flex: 1 1 300px; min-width: 230px; }
.fb-field.search input { padding: 9px 12px; }
.fb-field.narrow { min-width: 116px; }
.fb-field input[type="date"] { color-scheme: dark; }
.filterbar .clear { margin-bottom: 1px; }

.rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: start;
  position: sticky;
  top: 128px;
  max-height: calc(100vh - 146px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a303c transparent;
}
.rail::-webkit-scrollbar { width: 8px; }
.rail::-webkit-scrollbar-thumb { background: #2a303c; border-radius: 8px; }

.stats { padding: 14px 16px 12px; }
.statlist { display: flex; flex-direction: column; margin: 8px 0 0; }
.statrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.statrow:last-child { border-bottom: 0; }
.statrow dt {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.statrow dd {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 62%;
}
.statrow dd.bad { color: var(--red); }
.statrow.wide {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-bottom: 8px;
}
.statrow.wide dd {
  text-align: left;
  font-weight: 500;
  font-size: 11.5px;
  color: #c9cfe0;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.stat-foot { color: var(--dim); padding-top: 9px; }

.tracked { padding: 14px 16px 12px; display: flex; flex-direction: column; }
.tracked h3 { display: flex; align-items: center; gap: 8px; }
.tracked-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 9px;
  overflow-y: auto;
  max-height: 34vh;
  scrollbar-width: thin;
}
.tracked-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.tracked-row:hover { background: rgba(255, 255, 255, 0.05); }
.tracked-row.on { background: var(--accent-soft); color: #c3c9ff; }
.tracked-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tracked-count {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* five-column message rows: date, time, user, message, where */
.feed { max-height: calc(100vh - 300px); }

.row {
  grid-template-columns: 88px 68px 148px minmax(0, 1fr) 210px;
  align-items: center;
  gap: 10px;
}
.row .date {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.row .user {
  font-weight: 600;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row .msg {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 7px;
  font-size: 12.5px;
  color: #c9cfe0;
  overflow-wrap: anywhere;
  min-width: 0;
}
.row .where {
  font-size: 11px;
  color: var(--dim);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.row.head {
  cursor: default;
  padding: 0 10px 8px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
  font-weight: 600;
}
.row.head:hover { background: transparent; }
.row.head .where { text-align: right; }

.row.deleted { border-left-color: var(--red); }
.row.deleted .msg .text {
  color: #f0a9ab;
  text-decoration: line-through;
  text-decoration-color: rgba(237, 66, 69, 0.45);
}
.badge.deleted {
  background: rgba(237, 66, 69, 0.16);
  color: #ff9fa1;
  border: 1px solid rgba(237, 66, 69, 0.36);
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.filechip {
  font-family: var(--mono);
  font-size: 9.5px;
  color: #9fc6ff;
  background: rgba(88, 101, 242, 0.14);
  border: 1px solid rgba(88, 101, 242, 0.32);
  border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}

.exempt-panel { padding: 14px 16px 13px; }
.exempt-panel h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-link {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa4c4;
  text-decoration: none;
  border-bottom: 1px dotted rgba(154, 164, 196, 0.5);
}
.mini-link:hover { color: #c3c9ff; border-bottom-color: #c3c9ff; }
.ex-list { display: flex; flex-direction: column; margin-top: 9px; }
.ex-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--muted);
}
.ex-row b { color: var(--text); font-variant-numeric: tabular-nums; font-size: 12px; }
.ex-flags { margin-top: 7px; font-size: 11px; color: var(--dim); font-family: var(--mono); }

/* ---------- exemptions page ---------- */

.page { padding: 20px 20px 40px; display: flex; flex-direction: column; gap: 16px; max-width: 1180px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.01em; }
.page-head p { margin: 0; }
.page-actions { display: flex; align-items: center; gap: 12px; }
.page-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.page-grid .exempt-block { padding: 16px; border-bottom: 0; }
.page-toggles { padding: 16px 18px; }
.page .exempt-list { min-height: 10px; }

@media (max-width: 1180px) {
  .row { grid-template-columns: 84px 64px 120px minmax(0, 1fr); }
  .row .where, .row.head .where { grid-column: 1 / -1; text-align: left; padding-left: 0; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .rail { position: static; max-height: none; }
  .filterbar { position: static; }
  .row { grid-template-columns: 62px 58px minmax(0, 1fr); }
  .row .msg { grid-column: 1 / -1; }
  .row.head { display: none; }
}
