/* Int Police: broadcast killfeed in pure ink. Black ground, white type, greys between, red only for danger. */

:root {
  color-scheme: dark;

  --ground: #000;
  --raised: #0b0b0b;
  --hover: #141414;
  --rule: #242424;
  --rule-strong: #3a3a3a;

  --fg: #fff;
  --fg-2: #c2c2c2;  /* secondary copy, 12:1 on black */
  --fg-3: #8f8f8f;  /* tertiary copy, 6.4:1 on black */
  --fg-4: #5a5a5a;  /* disabled and decoration only, never body text */

  --danger: #e5484d;
  --danger-dim: rgba(229, 72, 77, 0.14);

  --font: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --narrow: 72%;   /* font-stretch for broadcast caps */

  --t-xs: 0.75rem;
  --t-sm: 0.8125rem;
  --t-md: 0.9375rem;
  --t-lg: 1.125rem;
  --t-xl: 1.375rem;
  --t-2xl: 2rem;
  --t-3xl: 2.75rem;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;

  --radius: 2px;
  --strip-h: 48px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  overflow-x: hidden;
  background: var(--ground);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--fg); color: var(--ground); }

img, video, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

* { scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border: 2px solid var(--ground); }
::-webkit-scrollbar-track { background: transparent; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- type ---------- */

.caps {
  font-stretch: var(--narrow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.label {
  font-stretch: var(--narrow);
  font-weight: 700;
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3);
}
.muted { color: var(--fg-3); }
.dim { color: var(--fg-2); }
.small { font-size: var(--t-sm); }
.tiny { font-size: var(--t-xs); }
.num { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.danger-text { color: var(--danger); }

h1, h2, h3 { font-weight: 650; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-lg); }
h3 { font-size: var(--t-md); }

/* ---------- icons ---------- */

.i {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.i-sm { width: 14px; height: 14px; }
.i-lg { width: 20px; height: 20px; }

/* ---------- broadcast strip (top nav) ---------- */

.strip {
  position: sticky; top: 0; z-index: 20;
  height: var(--strip-h);
  display: flex; align-items: stretch;
  background: var(--ground);
  border-bottom: 1px solid var(--rule);
}
.strip-brand {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0 var(--s-4);
  text-decoration: none;
}
.wordmark { font-size: var(--t-md); font-stretch: var(--narrow); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.season-tag {
  font-stretch: var(--narrow); font-weight: 800; font-size: var(--t-xs);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 1px 6px;
  border: 1px solid var(--rule-strong); color: var(--fg-2);
}
.strip-tabs { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.strip-tabs::-webkit-scrollbar { display: none; }
.strip-tab {
  display: flex; align-items: center;
  padding: 0 var(--s-4);
  font-weight: 500; font-size: var(--t-sm);
  color: var(--fg-3); text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 -1px 0 transparent;
  transition: color 150ms ease, box-shadow 150ms ease;
}
.strip-tab[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--fg); }
.strip-end { margin-left: auto; display: flex; align-items: center; gap: var(--s-4); padding: 0 var(--s-4); white-space: nowrap; }
.status { display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; font-stretch: var(--narrow); }
.status-mark { width: 8px; height: 8px; background: var(--fg-4); }
.status[data-state="online"] { color: var(--fg); }
.status[data-state="online"] .status-mark { background: var(--fg); }
.status[data-state="offline"] { color: var(--danger); }
.status[data-state="offline"] .status-mark { background: var(--danger); }
.who { font-size: var(--t-sm); color: var(--fg-2); }
.who b { color: var(--fg); font-weight: 700; }
.role-tag { font-size: 0.6875rem; font-weight: 800; font-stretch: var(--narrow); text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid var(--rule-strong); padding: 1px 5px; color: var(--fg-2); }

@media (hover: hover) and (pointer: fine) {
  .strip-tab:not([aria-current="page"]):hover { color: var(--fg); }
}

/* ---------- page frame ---------- */

.page { max-width: 1320px; margin: 0 auto; padding: var(--s-6) var(--s-5) var(--s-7); }
.page-narrow { max-width: 880px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding-bottom: var(--s-5); margin-bottom: var(--s-6); }
.page-head p { color: var(--fg-3); font-size: var(--t-sm); margin-top: 6px; max-width: 65ch; }

/* ---------- panels: ruled sections, no card chrome ---------- */

.panel { border-top: 1px solid var(--rule); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: 44px; padding: var(--s-2) 0;
}
.panel-head .tools { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.panel-body { display: flex; flex-direction: column; gap: var(--s-3); padding-bottom: var(--s-5); }
.panel-body > .note { color: var(--fg-3); font-size: var(--t-sm); }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: 40px; padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-sm);
}
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row-actions { display: flex; gap: var(--s-1); flex: none; }

.empty { color: var(--fg-3); font-size: var(--t-sm); padding: var(--s-3) 0; }
.empty b { color: var(--fg-2); font-weight: 600; }

/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: transparent; color: var(--fg);
  font-weight: 600; font-size: var(--t-sm);
  white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: transform 140ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled="true"] { color: var(--fg-4); border-color: var(--rule); cursor: not-allowed; }
.btn-primary { background: var(--fg); color: var(--ground); border-color: var(--fg); }
.btn-ghost { border-color: transparent; color: var(--fg-2); }
.btn-sm { height: 28px; padding: 0 10px; font-size: var(--t-xs); }
.btn-icon { width: 32px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-block { width: 100%; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover:not(:disabled) { border-color: var(--fg-3); }
  .btn-primary:hover:not(:disabled) { background: #e2e2e2; border-color: #e2e2e2; }
  .btn-ghost:hover:not(:disabled) { color: var(--fg); background: var(--hover); border-color: transparent; }
  .btn-danger:hover:not(:disabled) { border-color: var(--danger); }
}

/* Hold-to-confirm: a red fill wipes across while pressed; release early and it snaps back. */
.hold { position: relative; overflow: hidden; isolation: isolate; }
.hold::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--danger);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 180ms var(--ease-out);
}
.hold.is-holding::before { clip-path: inset(0 0 0 0); transition: clip-path var(--hold-ms, 800ms) linear; }
.hold.is-holding { color: var(--fg); border-color: var(--danger); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-stretch: var(--narrow); font-weight: 700; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-3); }
.inline { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.inline > .input, .inline > select { flex: 1 1 160px; }

.input, select, textarea {
  width: 100%; min-width: 0; height: 36px;
  padding: 0 10px;
  background: var(--ground); color: var(--fg);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  font-size: var(--t-sm);
  transition: border-color 150ms ease;
}
textarea { height: auto; padding: 8px 10px; resize: vertical; }
select {
  appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2c2c2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px;
}
select option { background: var(--raised); color: var(--fg); }
.input::placeholder, textarea::placeholder { color: var(--fg-3); }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--fg); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.select-auto { width: auto; }

.check { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); color: var(--fg-2); cursor: pointer; }
.check input {
  appearance: none; width: 16px; height: 16px; margin: 0; flex: none;
  border: 1px solid var(--fg-3); border-radius: var(--radius); background: var(--ground);
  display: grid; place-content: center; cursor: pointer;
}
.check input:checked { background: var(--fg); border-color: var(--fg); }
.check input:checked::after { content: ""; width: 8px; height: 4px; border: 2px solid var(--ground); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 84px; padding: var(--s-4);
  border: 1px dashed var(--rule-strong); border-radius: var(--radius);
  color: var(--fg-3); font-size: var(--t-sm); text-align: center; cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.dropzone.is-over, .dropzone:focus-within { border-color: var(--fg); color: var(--fg); background: var(--hover); }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.thumb { position: relative; width: 72px; height: 54px; border: 1px solid var(--rule-strong); overflow: hidden; background: var(--raised); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; display: grid; place-items: center; background: var(--ground); border: 1px solid var(--rule-strong); cursor: pointer; padding: 0; }

.or { display: flex; align-items: center; gap: var(--s-2); color: var(--fg-3); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.06em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ---------- tags ---------- */

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 6px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  font-weight: 500; font-size: 0.6875rem;
  white-space: nowrap;
  color: var(--fg-2);
}
.tag-solid { background: var(--fg); color: var(--ground); border-color: var(--fg); }
.tag-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.id { font-size: var(--t-xs); color: var(--fg-3); letter-spacing: 0.02em; }

/* ---------- dialog ---------- */

dialog.dlg {
  width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 64px);
  padding: 0; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--raised); color: var(--fg);
  opacity: 1; transform: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), overlay 180ms allow-discrete, display 180ms allow-discrete;
}
dialog.dlg.dlg-wide { width: min(880px, calc(100vw - 32px)); }
dialog.dlg:not([open]) { opacity: 0; transform: scale(0.97); }
@starting-style { dialog.dlg[open] { opacity: 0; transform: scale(0.97); } }
dialog.dlg::backdrop { background: rgba(0, 0, 0, 0.8); }
.dlg-inner { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); }
.dlg-title { font-size: var(--t-xl); }
.dlg-body { color: var(--fg-2); font-size: var(--t-sm); line-height: 1.6; }
.dlg-body strong { color: var(--fg); }
.dlg-actions { display: flex; justify-content: flex-end; gap: var(--s-2); flex-wrap: wrap; }

/* ---------- toast ---------- */

.toasts { position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: 60; display: flex; flex-direction: column; gap: var(--s-2); pointer-events: none; }
.toast {
  pointer-events: auto;
  min-width: 240px; max-width: 360px;
  padding: 10px 14px;
  background: var(--fg); color: var(--ground);
  font-size: var(--t-sm); font-weight: 600;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
@starting-style { .toast { opacity: 0; transform: translateY(8px); } }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition-duration: 150ms; }
.toast-danger { background: var(--danger); color: #fff; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 70;
  display: grid; grid-template-rows: auto 1fr auto;
  background: rgba(0, 0, 0, 0.96);
}
@starting-style { .lightbox { opacity: 0; } }
.lightbox { transition: opacity 180ms var(--ease-out); }
.lb-top, .lb-bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); }
.lb-title { min-width: 0; }
.lb-title .caps { font-size: var(--t-lg); }
.lb-stage { display: grid; place-items: center; min-height: 0; padding: 0 var(--s-4); }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-links { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* ---------- media grid (evidence) ---------- */

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px; }
.media-cell {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--raised); border: 0; padding: 0; cursor: pointer; text-align: left;
}
.media-cell img, .media-cell video { width: 100%; height: 100%; object-fit: cover; transition: opacity 200ms ease; }
.media-cell .media-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 8px 6px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  display: flex; flex-direction: column; gap: 1px;
}
.media-cell .media-meta .caps { font-size: var(--t-sm); }
.media-cell .media-meta .tiny { color: var(--fg-2); }
.media-cell .play { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 26px; height: 26px; background: var(--fg); color: var(--ground); }
.media-cell .play .i { fill: currentColor; stroke: none; width: 12px; height: 12px; }
@media (hover: hover) and (pointer: fine) {
  .media-cell:hover img, .media-cell:hover video { opacity: 0.85; }
}
.link-row { display: flex; align-items: center; gap: var(--s-3); padding: 10px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: var(--t-sm); }
.link-row:last-child { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .link-row:hover { background: var(--hover); } }

/* ---------- tables ---------- */

.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th { text-align: left; font-stretch: var(--narrow); font-weight: 700; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-3); padding: 8px 10px; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table td.r, .table th.r { text-align: right; }
@media (hover: hover) and (pointer: fine) { .table tbody tr:hover { background: var(--hover); } }

/* ---------- skeleton ---------- */

.skeleton { background: linear-gradient(90deg, var(--raised) 0%, var(--hover) 50%, var(--raised) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel-row { height: 56px; margin-bottom: 2px; }

/* ---------- login ---------- */

.login { min-height: 100vh; display: grid; place-items: center; padding: var(--s-5); }
.login-panel { width: min(320px, 100%); display: flex; flex-direction: column; align-items: center; gap: var(--s-5); }
.login-panel .wordmark { font-size: var(--t-2xl); line-height: 1; text-align: center; }
.login-error { border: 1px solid var(--danger); color: var(--danger); padding: 10px 12px; font-size: var(--t-sm); }
.login .btn { height: 44px; }

/* ---------- responsive strip ---------- */

@media (max-width: 900px) {
  .strip { height: auto; flex-wrap: wrap; }
  .strip-brand { height: var(--strip-h); border-right: 0; }
  .strip-end { height: var(--strip-h); }
  .strip-tabs { order: 3; width: 100%; height: 40px; border-top: 1px solid var(--rule); }
  .who { display: none; }
  .page { padding: var(--s-4) var(--s-4) var(--s-6); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .hold.is-holding::before { transition-duration: var(--hold-ms, 800ms) !important; }
}

/* ================= dashboard ================= */

.dash-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.dash-section { margin-top: var(--s-7); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-3); }
.section-head h1 { font-size: var(--t-xl); }
.section-head h2 { font-size: var(--t-lg); }
.section-head .tools { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }

/* scoreboard */
.board { border-top: 1px solid var(--rule-strong); }
.board-row { border-bottom: 1px solid var(--rule); }
.board-main {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 64px; align-items: center; gap: var(--s-4);
  min-height: 56px; padding: 12px 0 6px;
}
.board-rank { color: var(--fg-3); font-size: var(--t-sm); }
.board-row:first-child .board-rank { color: var(--fg); }
.board-name { font-size: var(--t-lg); }
.board-count { text-align: right; line-height: 1; }
.board-count b { display: block; font-size: var(--t-2xl); font-weight: 600; letter-spacing: -0.02em; }
.board-count span { font-size: var(--t-xs); color: var(--fg-3); }
.board-ints { padding: 0 0 var(--s-3) calc(36px + var(--s-4)); }
.int-line { display: flex; align-items: center; gap: var(--s-3); min-height: 34px; font-size: var(--t-sm); border-top: 1px solid var(--rule); }
.int-line .grow { flex: 1; min-width: 0; color: var(--fg-2); }
.int-slot { width: 28px; flex: none; }

/* kill feed */
.feed { position: sticky; top: calc(var(--strip-h) + var(--s-5)); }
.feed-list { border-top: 1px solid var(--rule-strong); }
.feed-line {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--s-3);
  min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--rule);
}
.feed-date { color: var(--fg-3); font-size: var(--t-xs); line-height: 1.2; }
.feed-who { font-size: var(--t-md); }
.feed-why { color: var(--fg-3); font-size: var(--t-sm); }
.feed-line.is-new { animation: feed-in 280ms var(--ease-out); }
@keyframes feed-in { from { opacity: 0; transform: translateY(-10px); } }

.record { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); margin-bottom: var(--s-4); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.record[hidden] { display: none; }
@starting-style { .record { opacity: 0; transform: translateY(-6px); } }
.record { transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.record-actions { display: flex; justify-content: flex-end; gap: var(--s-2); }

.chart-wrap { position: relative; height: 300px; margin-top: var(--s-3); }
.timeline { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-3); }
.timeline-date { min-width: 110px; text-align: right; }
.range { --pct: 100%; flex: 1; min-width: 0; height: 28px; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.range:disabled { cursor: default; opacity: 0.4; }
.range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--fg) var(--pct), var(--rule-strong) var(--pct)); }
.range::-moz-range-track { height: 2px; background: linear-gradient(to right, var(--fg) var(--pct), var(--rule-strong) var(--pct)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; background: var(--fg); border: 0; border-radius: var(--radius); transition: transform 140ms var(--ease-out); }
.range::-moz-range-thumb { width: 14px; height: 14px; background: var(--fg); border: 0; border-radius: var(--radius); }
.range:active::-webkit-slider-thumb { transform: scale(1.15); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--fg); outline-offset: 3px; }
.range:focus-visible::-moz-range-thumb { outline: 2px solid var(--fg); outline-offset: 3px; }

/* control room */
.control { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 0 var(--s-7); }
.dash-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.dash-shell > .page { width: 100%; }
.audit-side {
  position: sticky; top: var(--strip-h);
  height: calc(100vh - var(--strip-h));
  display: flex; flex-direction: column;
  border-left: 1px solid var(--rule);
  background: var(--ground);
}
.audit-side-head { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--rule); }
.audit-list { flex: 1; overflow-y: auto; padding: 0 var(--s-4) var(--s-4); }
@media (max-width: 1200px) {
  .dash-shell { grid-template-columns: 1fr; }
  .audit-side { position: static; height: auto; max-height: 560px; border-left: 0; border-top: 1px solid var(--rule); }
}
.audit-line { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-sm); display: grid; gap: 2px; }
.audit-line .who-line { display: flex; justify-content: space-between; gap: var(--s-2); }
.audit-line .act { color: var(--fg-2); word-break: break-word; }
.audit-line.is-danger .act { color: var(--danger); }
.audit-line.is-new { animation: feed-in 280ms var(--ease-out); }
.member-list { max-height: 520px; overflow-y: auto; }

@media (max-width: 1080px) {
  .dash-top { grid-template-columns: 1fr; gap: var(--s-6); }
  .feed { position: static; }
}
@media (max-width: 560px) {
  .board-main { grid-template-columns: 24px minmax(0, 1fr) 52px; }
  .board-ints { padding-left: 0; }
}

/* ---------- switch ---------- */

.switch {
  position: relative; flex: none;
  width: 36px; height: 20px; padding: 0;
  border: 1px solid var(--fg-3); border-radius: 10px;
  background: var(--ground); cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--fg-3);
  transition: transform 200ms var(--ease-out), background-color 150ms ease;
}
.switch[aria-checked="true"] { background: var(--fg); border-color: var(--fg); }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--ground); }
.switch:disabled { opacity: 0.4; cursor: not-allowed; }
