/* Sbaq Admin. No external fonts or scripts: the CSP allows only this origin.
   Order: tokens, base, shell, components, page-specific pieces, small screens. */

/* ---- tokens ------------------------------------------------------------- */
:root {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --surface-2: #f1f4f1;
  --surface-3: #e8ede9;
  --text: #0f1a12;
  --muted: #5b6b60;
  --border: #e0e6e1;
  --border-strong: #c9d3cc;
  --brand: #166534;
  --brand-hover: #125a2d;
  --brand-ink: #ffffff;
  --brand-soft: #e7f3ea;
  --accent: #65a30d;
  --focus: #16a34a;
  /* Sidebar: a floodlit pitch at night, with trophy gold for "you are here". */
  --side: #0f2d22;
  --side-deep: #0b231a;
  --side-text: #dbe9e1;
  --side-strong: #ffffff;
  --side-muted: #94b3a4;
  --side-hover: #173a2c;
  --side-active: #1d4736;
  --side-gold: #e6c068;
  --side-line: #21493a;
  --side-thumb: #4f846c;
  --ok-bg: #e8f5ec;
  --ok-text: #14532d;
  --ok-line: #b9dfc5;
  --err-bg: #fdecec;
  --err-text: #9b1c1c;
  --err-line: #f3c2c2;
  --warn: #b45309;
  --warn-bg: #fdf3e1;
  --warn-line: #f1d6a3;
  --info-bg: #e8f0fd;
  --info-text: #1e40af;
  --bar-a: #65a30d;
  --bar-b: #0f766e;
  --bar-c: #1d4ed8;

  /* spacing: 4px steps */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 48px;
  /* type */
  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-md: .875rem;
  --fs-base: .9375rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.875rem;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(16 24 18 / 5%), 0 1px 3px rgb(16 24 18 / 4%);
  --shadow-pop: 0 4px 12px rgb(16 24 18 / 10%), 0 12px 32px rgb(16 24 18 / 12%);
  --ring: 0 0 0 3px rgb(22 163 74 / 28%);
  color-scheme: light;
}
/* Dark: follows the system unless the admin picked a theme (admin.js sets
   data-theme on <html>). The two blocks below must stay the same. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b110d;
    --surface: #121a15;
    --surface-2: #18221b;
    --surface-3: #1f2c23;
    --text: #e6efe8;
    --muted: #93a598;
    --border: #243128;
    --border-strong: #34463a;
    --brand: #22c55e;
    --brand-hover: #3ad573;
    --brand-ink: #062411;
    --brand-soft: #12301d;
    --focus: #4ade80;
    --side: #0c241b;
    --side-deep: #081b14;
    --side-hover: #133126;
    --side-active: #1a3f30;
    --side-line: #1c3f32;
    --ok-bg: #0f2a19;
    --ok-text: #86efac;
    --ok-line: #1c4a2c;
    --err-bg: #2c1212;
    --err-text: #fca5a5;
    --err-line: #5a2323;
    --warn: #fbbf24;
    --warn-bg: #2b2110;
    --warn-line: #57431a;
    --info-bg: #13213f;
    --info-text: #93c5fd;
    --bar-a: #a3e635;
    --bar-b: #2dd4bf;
    --bar-c: #60a5fa;
    --shadow: none;
    --shadow-pop: 0 8px 28px rgb(0 0 0 / 55%);
    --ring: 0 0 0 3px rgb(74 222 128 / 30%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b110d;
  --surface: #121a15;
  --surface-2: #18221b;
  --surface-3: #1f2c23;
  --text: #e6efe8;
  --muted: #93a598;
  --border: #243128;
  --border-strong: #34463a;
  --brand: #22c55e;
  --brand-hover: #3ad573;
  --brand-ink: #062411;
  --brand-soft: #12301d;
  --focus: #4ade80;
  --side: #0c241b;
  --side-deep: #081b14;
  --side-hover: #133126;
  --side-active: #1a3f30;
  --side-line: #1c3f32;
  --ok-bg: #0f2a19;
  --ok-text: #86efac;
  --ok-line: #1c4a2c;
  --err-bg: #2c1212;
  --err-text: #fca5a5;
  --err-line: #5a2323;
  --warn: #fbbf24;
  --warn-bg: #2b2110;
  --warn-line: #57431a;
  --info-bg: #13213f;
  --info-text: #93c5fd;
  --bar-a: #a3e635;
  --bar-b: #2dd4bf;
  --bar-c: #60a5fa;
  --shadow: none;
  --shadow-pop: 0 8px 28px rgb(0 0 0 / 55%);
  --ring: 0 0 0 3px rgb(74 222 128 / 30%);
  color-scheme: dark;
}

/* Icons: drawn by CSS masks from data: images (img-src allows data:), so the
   templates need no icon markup and the icons take the text colour. */
:root {
  --i-monitor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-4l-3 9L9 3l-3 9H2'/%3E%3C/svg%3E");
  --i-questions: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
  --i-players: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  --i-store: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
  --i-ads: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E");
  --i-security: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
  --i-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
  --i-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E");
  --i-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpath d='m9 11 3 3L22 4'/%3E%3C/svg%3E");
  --i-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
  --i-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
  --i-moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z'/%3E%3C/svg%3E");
  --i-system: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E");
  --i-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E");
  --i-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}

/* ---- base --------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: var(--fs-base); font-weight: 650; }
h3 { font-size: var(--fs-md); font-weight: 650; }
.muted { color: var(--muted); }
.lead { margin: 0 0 var(--s-5); max-width: 80ch; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.small { font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }
.warn { color: var(--warn); }
.push-end { margin-inline-start: auto; }
.sr-only, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--s-3); overflow-x: auto; font-size: var(--fs-sm); white-space: pre; }
details summary { cursor: pointer; font-weight: 600; }

/* ---- shell -------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--side);
  color: var(--side-text);
  border-inline-end: 1px solid var(--side-line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 20;
  min-width: 0;
}
.side-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 18px 20px 14px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--side-strong); text-decoration: none; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; border-radius: 10px; }
.brand:hover { color: var(--side-strong); }
.brand small { font-weight: 500; font-size: var(--fs-sm); color: var(--side-muted); letter-spacing: 0; }
.logo {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--side-gold); color: var(--side); font-weight: 800; font-size: .95rem; letter-spacing: -.02em;
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 14%);
}
/* The panel holds the scrolling list and the account row, which stays put. */
.side-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.side-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain; /* reaching the end doesn't scroll the page */
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 12px 16px;
  scrollbar-gutter: stable;
  /* Shadows that appear only when there is more to scroll to. */
  background:
    linear-gradient(var(--side) 40%, transparent) top / 100% 24px no-repeat local,
    linear-gradient(transparent, var(--side) 60%) bottom / 100% 24px no-repeat local,
    linear-gradient(rgb(0 0 0 / 28%), transparent) top / 100% 10px no-repeat scroll,
    linear-gradient(transparent, rgb(0 0 0 / 28%)) bottom / 100% 10px no-repeat scroll;
}
/* Always visible, so it's clear the menu scrolls. Chrome ignores these rules if
   scrollbar-width or scrollbar-color is set, so those are only for other browsers. */
.side-nav::-webkit-scrollbar { width: 10px; }
.side-nav::-webkit-scrollbar-track { background: transparent; }
.side-nav::-webkit-scrollbar-thumb { background: var(--side-thumb); border-radius: 99px; border: 2px solid var(--side); }
.side-nav::-webkit-scrollbar-thumb:hover { background: var(--side-muted); }
@supports not selector(::-webkit-scrollbar) {
  .side-nav { scrollbar-width: thin; scrollbar-color: var(--side-thumb) transparent; }
}
.nav-label { margin: 14px 0 2px; font-size: var(--fs-xs); font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--side-muted); }
.side-nav > .nav-group:first-of-type > .nav-label { margin-top: 0; }
/* Collapsible groups. The title is a button; admin.js adds .js-nav once it has
   restored each group's state, so without scripts every group stays open. */
.nav-group { flex: none; }
.nav-group-btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; margin: 0; padding: 6px 10px; border: 0; border-radius: var(--radius-sm);
  background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: start; cursor: pointer;
}
/* The group's icon, picked by the data-group the markup already has. */
.nav-group-btn::before {
  content: ""; flex: none; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: var(--i-monitor) center / contain no-repeat; mask: var(--i-monitor) center / contain no-repeat;
}
.nav-group[data-group="questions"] .nav-group-btn::before { -webkit-mask-image: var(--i-questions); mask-image: var(--i-questions); }
.nav-group[data-group="players"] .nav-group-btn::before { -webkit-mask-image: var(--i-players); mask-image: var(--i-players); }
.nav-group[data-group="store"] .nav-group-btn::before { -webkit-mask-image: var(--i-store); mask-image: var(--i-store); }
.nav-group[data-group="ads"] .nav-group-btn::before { -webkit-mask-image: var(--i-ads); mask-image: var(--i-ads); }
.nav-group[data-group="security"] .nav-group-btn::before { -webkit-mask-image: var(--i-security); mask-image: var(--i-security); }
.nav-group[data-current] .nav-group-btn { color: var(--side-gold); }
.nav-group-btn:hover { color: var(--side-strong); background: var(--side-hover); }
.nav-group-btn:focus-visible { outline: 2px solid var(--side-gold); outline-offset: -2px; }
.chev { flex: none; margin-inline-start: auto; line-height: 0; }
.chev::before {
  content: ""; display: inline-block; width: 12px; height: 12px; background: currentColor; transform: rotate(90deg);
  -webkit-mask: var(--i-chevron) center / contain no-repeat; mask: var(--i-chevron) center / contain no-repeat;
}
.nav-group.is-closed .chev::before { transform: rotate(0deg); }
html:not(.js-nav) .chev { display: none; }
html:not(.js-nav) .nav-group-btn { cursor: default; background: none; color: inherit; }
/* "Collapse all" above the groups; hidden until admin.js runs. */
.nav-tools { flex: none; display: flex; justify-content: flex-end; padding: 0 12px 4px; }
.nav-tools[hidden] { display: none; }
.nav-all-btn {
  font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--side-muted);
  background: none; border: 1px solid var(--side-line); border-radius: 7px;
  padding: 3px 9px; cursor: pointer;
}
.nav-all-btn:hover { color: var(--side-strong); background: var(--side-hover); }
.nav-all-btn:focus-visible { outline: 2px solid var(--side-gold); outline-offset: 2px; }
.nav-items { display: grid; grid-template-rows: 1fr; }
.nav-items > div { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.js-nav .nav-group.is-closed .nav-items { grid-template-rows: 0fr; visibility: hidden; }
.nav-animate .chev::before { transition: transform .18s ease; }
.nav-animate .nav-items { transition: grid-template-rows .2s ease, visibility .2s; }
.side-nav a {
  position: relative;
  flex: none;
  display: block;
  padding: 7px 10px 7px 35px; /* lines up with the group title, past its icon */
  border-radius: var(--radius-md);
  color: var(--side-text);
  font-size: var(--fs-md);
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
  scroll-margin-block: 56px;
  transition: background-color .12s ease, color .12s ease;
}
.side-nav a:hover { background: var(--side-hover); color: var(--side-strong); }
.side-nav a.active {
  background: var(--side-active);
  color: var(--side-strong);
  font-weight: 600;
  /* Each page load starts the list at the top: this brings the current page
     into view where browsers support it. */
  scroll-initial-target: nearest;
}
.side-nav a.active::before {
  content: "";
  position: absolute;
  inset-block: 8px;
  inset-inline-start: 17px;
  width: 3px;
  border-radius: 99px;
  background: var(--side-gold);
}
.side-nav a:focus-visible, .brand:focus-visible, .me .btn:focus-visible, .theme-btn:focus-visible { outline: 2px solid var(--side-gold); outline-offset: -2px; box-shadow: none; }
.me {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 12px 20px;
  background: var(--side-deep);
  border-top: 1px solid var(--side-line);
}
.me-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.me-who strong { color: var(--side-strong); font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-who span { color: var(--side-muted); font-size: var(--fs-xs); text-transform: capitalize; }
.me form { flex: none; margin: 0; }
.me .btn-quiet { color: var(--side-text); background: transparent; border-color: var(--side-line); min-height: 32px; padding: 5px 11px; font-size: var(--fs-sm); white-space: nowrap; }
.me .btn-quiet:hover { background: var(--side-hover); color: var(--side-strong); border-color: var(--side-line); }
/* Light / dark / system. Hidden until admin.js runs. */
.theme-btn { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--side-line); border-radius: var(--radius-md); background: none; color: var(--side-text); cursor: pointer; }
.theme-btn[hidden] { display: none; }
.theme-btn:hover { background: var(--side-hover); color: var(--side-strong); }
.theme-btn::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i-system) center / contain no-repeat; mask: var(--i-system) center / contain no-repeat; }
:root[data-theme="light"] .theme-btn::before { -webkit-mask-image: var(--i-sun); mask-image: var(--i-sun); }
:root[data-theme="dark"] .theme-btn::before { -webkit-mask-image: var(--i-moon); mask-image: var(--i-moon); }
/* The phone menu is a checkbox and its label: it works with no scripts. */
.nav-toggle { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.nav-toggle-btn, .nav-backdrop { display: none; }

.content { padding: 0 var(--s-7) 56px; max-width: 1320px; width: 100%; margin-inline: auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-4); padding: 26px 0 18px; margin-bottom: var(--s-5); border-bottom: 1px solid var(--border); }
.page-title { min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.crumbs:empty { display: none; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs > * + *::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-inline-end: 6px; background: var(--border-strong); -webkit-mask: var(--i-chevron) center / contain no-repeat; mask: var(--i-chevron) center / contain no-repeat; }
.page-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.page-actions:empty { display: none; }

/* ---- cards and grids ---------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s-5); margin-bottom: var(--s-4); }
.card > h2:first-child, .card > h3:first-child { margin-bottom: var(--s-2); }
.card > :last-child { margin-bottom: 0; }
.card > :first-child { margin-top: 0; }
.card-head { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; align-items: center; margin-bottom: var(--s-2); }
.grid { display: grid; gap: var(--s-4); margin-bottom: var(--s-4); }
.grid .card { margin-bottom: 0; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
/* One look for every figure card, whichever heading level the page used. */
.kpi { display: flex; flex-direction: column; padding: var(--s-4) var(--s-5); }
.kpi h2, .kpi h3 { margin: 0; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.kpi .big { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.15; margin: 6px 0 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .stat, .stat { font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi p { margin: 0; font-size: var(--fs-sm); }
.kpi p.muted { line-height: 1.45; }
.checklist { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.checklist li { display: flex; justify-content: space-between; gap: var(--s-3); padding: 10px 0; border-top: 1px solid var(--border); }
.checklist li:first-child { border-top: 0; }
.checklist strong { font-variant-numeric: tabular-nums; }
.checklist a { color: inherit; }
.checklist a:hover { color: var(--brand); }
.content > h2 { margin: var(--s-7) 0 var(--s-3); font-size: var(--fs-lg); }
.content > .form { margin-bottom: var(--s-4); }
h2 + .grid, h2 + .tabs { margin-top: var(--s-3); }

/* ---- tables ------------------------------------------------------------- */
.table-wrap { position: relative; overflow-x: auto; margin-top: var(--s-3); border: 1px solid var(--border); border-radius: var(--radius-md); }
.table-wrap.tall { max-height: 70vh; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
th { text-align: start; font-weight: 600; color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table-wrap.tall th { position: sticky; top: 0; z-index: 1; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
/* The "nothing here" row of a table. */
td.muted[colspan] { padding: 28px 12px; text-align: center; }
tbody tr:hover td.muted[colspan] { background: none; }
tr.inactive td { opacity: .5; }
.ua { max-width: 360px; overflow-wrap: anywhere; }
.bar-cell { display: inline-flex; align-items: center; gap: 10px; }
.bar-cell svg { background: var(--surface-3); border-radius: 3px; }
.bar-a { fill: var(--bar-a); }
.bar-b { fill: var(--bar-b); }
.bar-c { fill: var(--bar-c); }
.details div + div { margin-top: 2px; }
.details .was { text-decoration: line-through; color: var(--muted); }
/* Sorting: admin.js puts a button in each header of a table[data-sortable]. */
.th-sort { display: inline-flex; align-items: center; gap: 4px; margin: -4px -6px; padding: 4px 6px; border: 0; border-radius: var(--radius-sm); background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.th-sort:hover { color: var(--text); background: var(--surface-3); }
.th-sort:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.th-sort::after { content: ""; width: 10px; height: 10px; background: currentColor; opacity: .35; transform: rotate(90deg); -webkit-mask: var(--i-chevron) center / contain no-repeat; mask: var(--i-chevron) center / contain no-repeat; }
th[aria-sort] .th-sort { color: var(--text); }
th[aria-sort] .th-sort::after { opacity: 1; }
th[aria-sort="ascending"] .th-sort::after { transform: rotate(-90deg); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }

/* ---- pills -------------------------------------------------------------- */
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 600; line-height: 1.6; white-space: nowrap; }
.pill-warn, .level-warning { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.pill-info, .status-reviewed { color: var(--info-text); background: var(--info-bg); border-color: transparent; }
.status-published, .level-ok { color: var(--ok-text); background: var(--ok-bg); border-color: var(--ok-line); }
.status-suspended, .level-critical { color: var(--err-text); background: var(--err-bg); border-color: var(--err-line); }
.status-deleted { color: var(--err-text); border-color: currentColor; background: transparent; }
.diff-easy { color: var(--ok-text); background: var(--ok-bg); border-color: var(--ok-line); }
.diff-medium { color: var(--info-text); background: var(--info-bg); border-color: transparent; }
.diff-hard { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.diff-legendary { color: var(--err-text); background: var(--err-bg); border-color: var(--err-line); }

/* ---- forms and buttons -------------------------------------------------- */
label { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 9px 12px;
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
input[type=file] { padding: 7px 10px; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: var(--ring); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 8px 15px;
  font: inherit; font-weight: 600; font-size: var(--fs-md); line-height: 1.2;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--focus); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-ink); }
.btn-quiet { background: var(--surface); color: var(--text); }
.btn-danger { background: var(--surface); color: var(--err-text); border-color: var(--err-line); }
.btn-danger:hover { background: var(--err-bg); color: var(--err-text); border-color: var(--err-text); }
.btn-danger-solid { background: var(--err-text); color: var(--surface); border-color: transparent; }
.btn-danger-solid:hover { background: var(--err-text); color: var(--surface); filter: brightness(1.1); }
.btn-small { min-height: 30px; padding: 4px 11px; font-size: var(--fs-sm); }
.btn-block { width: 100%; min-height: 42px; margin-top: 4px; }
.btn-new::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--i-plus) center / contain no-repeat; mask: var(--i-plus) center / contain no-repeat; }
/* A form that was just sent: admin.js marks the pressed button. */
.btn.is-busy { pointer-events: none; opacity: .75; }
.btn.is-busy::after { content: ""; flex: none; width: 13px; height: 13px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { margin-top: var(--s-4); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: var(--s-3); }
form.inline { display: inline; margin: 0; }
.hint { display: block; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; margin-top: 6px; }
p.hint { margin: var(--s-2) 0; }
fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 4px; margin: 0 0 14px; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: var(--fs-sm); padding: 0 6px; }
label.check { display: flex; align-items: center; gap: var(--s-2); font-weight: 500; font-size: var(--fs-md); }
label.check input { width: auto; margin: 0; }
.inline-check { margin: 0; }
.form { margin-bottom: 0; }
.form-layout { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.row2, .row3 { display: grid; gap: var(--s-3); }
.row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.narrow-form { max-width: 640px; }
.narrow { max-width: 480px; }
aside .card .form label:last-of-type { margin-bottom: 10px; }

/* ---- alerts ------------------------------------------------------------- */
.alert { position: relative; padding: 11px 14px 11px 42px; border: 1px solid transparent; border-radius: var(--radius-md); margin: 0 0 var(--s-4); font-size: var(--fs-md); }
.alert::before { content: ""; position: absolute; inset-inline-start: 14px; top: 12px; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--i-ok) center / contain no-repeat; mask: var(--i-ok) center / contain no-repeat; }
.alert-ok { background: var(--ok-bg); color: var(--ok-text); border-color: var(--ok-line); }
.alert-error { background: var(--err-bg); color: var(--err-text); border-color: var(--err-line); }
.alert-error::before { -webkit-mask-image: var(--i-alert); mask-image: var(--i-alert); }
.alert a { color: inherit; font-weight: 600; }

/* ---- toolbars, filters, tabs, menus ------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; align-items: center; margin: 0 0 var(--s-4); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.filters input, .filters select { width: auto; margin: 0; }
.filters label { margin: 0; }
.filters input[type=search] { min-width: 260px; }
.filters.card { align-items: flex-end; gap: var(--s-3); padding: var(--s-4) var(--s-5); }
.filters.card label input, .filters.card label select { margin-top: 6px; }
.filters.card > .muted { flex-basis: 100%; font-size: var(--fs-sm); }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
/* Tabs: one segmented control wherever a page offers views of the same thing. */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin-bottom: var(--s-4); background: var(--surface-3); border-radius: 10px; max-width: 100%; }
.tabs .btn { min-height: 32px; padding: 5px 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: var(--fs-md); text-transform: capitalize; }
.tabs .btn:hover { color: var(--text); background: transparent; }
.tabs .btn-primary, .tabs .btn-primary:hover { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 12%); }
/* A button that opens a short list of links (details/summary: works with no scripts). */
.menu-btn { position: relative; }
.menu-btn > summary { list-style: none; }
.menu-btn > summary::-webkit-details-marker { display: none; }
.menu-btn > .menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; }
.menu { display: grid; gap: 2px; min-width: 190px; padding: 5px; text-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop); }
.menu a, .menu button { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--radius-sm); background: none; font: inherit; font-size: var(--fs-md); font-weight: 500; color: var(--text); text-align: start; text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--text); }
.menu .danger { color: var(--err-text); }
.menu .danger:hover { background: var(--err-bg); color: var(--err-text); }
.menu form { margin: 0; }
th.row-actions, td.row-actions { width: 1%; text-align: end; }
.row-menu { position: relative; display: inline-block; }
.row-menu summary { list-style: none; display: inline-grid; place-items: center; width: 32px; height: 28px; border-radius: var(--radius-sm); color: var(--muted); }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu summary > span { width: 16px; height: 16px; overflow: hidden; color: transparent; background: var(--muted); -webkit-mask: var(--i-dots) center / contain no-repeat; mask: var(--i-dots) center / contain no-repeat; }
.row-menu summary:hover, .row-menu[open] summary { background: var(--surface-3); }
.row-menu summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.row-menu .menu { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); z-index: 30; min-width: 130px; }
/* The last rows open upwards, so the menu isn't cut off by the table's edge. */
tbody tr:nth-last-child(-n+2):not(:nth-child(-n+2)) .row-menu .menu { top: auto; bottom: calc(100% + 4px); }

/* Confirmation dialog, built by admin.js for buttons with data-confirm. */
dialog.confirm { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
dialog.confirm::backdrop { background: rgb(8 16 11 / 55%); }
.confirm-body { padding: var(--s-6) var(--s-6) var(--s-4); }
.confirm-body h2 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.confirm-body p { margin: 0; color: var(--muted); }
.confirm-foot { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-3) var(--s-6) var(--s-5); }

/* ---- questions ---------------------------------------------------------- */
.qtext { max-width: 460px; }
.qtext a, .qlink { color: var(--text); text-decoration: none; }
.qtext a:hover, .qlink:hover { color: var(--brand); text-decoration: underline; }
.qlink { font-weight: 600; font-size: var(--fs-lg); }
.step { flex: none; width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; background: var(--surface-2); font-size: var(--fs-xs); }
.reports { list-style: none; padding: 0; margin: 10px 0 0; }
.reports li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.reports li:first-child { border-top: 0; }
.reports li.resolved { opacity: .55; }
.report-head { display: flex; justify-content: space-between; gap: 16px; }
.report-head p { margin: 6px 0 0; }
.report-head .count { flex: none; display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; background: var(--warn-bg); font-size: 1.25rem; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 0; }
.bulk-bar p { margin: 0; }
.bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; }
th.pick, td.pick { width: 1%; padding-inline-end: 0; }
td.pick input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; cursor: pointer; }
tr:has(td.pick input:checked) td { background: var(--brand-soft); }
.deleted-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.deleted-banner form { margin: 0; }
.confirm-card { max-width: 680px; margin: 8px 0 24px; border-top: 4px solid var(--err-text); }
.confirm-list { list-style: none; padding: 0; margin: 0 0 12px; max-height: 55vh; overflow-y: auto; }
.confirm-list li { padding: 10px 0; border-top: 1px solid var(--border); }
.confirm-list li:first-child { border-top: 0; }
.confirm-list p { margin: 0; }
.confirm-text { font-size: var(--fs-lg); font-weight: 600; line-height: 1.6; }
details.card > summary { font-size: var(--fs-base); }
details.card[open] > summary { margin-bottom: var(--s-3); }

/* Categories: one edit form per row, and the up/down buttons side by side */
.inline-form { display: inline-flex; gap: 4px; }
.category-form { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; min-width: 320px; }
.category-form label { font-size: var(--fs-xs); }

/* ---- store and ads ------------------------------------------------------ */
details.refund summary { list-style: none; }
details.refund summary::-webkit-details-marker { display: none; }
details.refund[open] form { margin-top: 8px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.creative-preview { display: block; max-width: 100%; height: auto; max-height: 360px; width: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* ---- game settings: order buttons, the round's name, On/Mic switches ----- */
.move-btns { width: 1%; white-space: nowrap; }
.move-btns .btn-icon { display: flex; width: 30px; min-height: 26px; height: 26px; padding: 0; margin: 2px 0; font-size: 1rem; line-height: 1; }
.btn-icon:disabled { opacity: .3; cursor: default; background: transparent; }
.round-cell { min-width: 220px; }
.round-no { display: block; font-weight: 700; margin-bottom: 2px; }
.round-cell .round-name { margin: 4px 0 6px; padding: 7px 10px; font-size: var(--fs-md); }
td input, td select { margin-top: 0; }
/* A short number with its unit beside it ("80 %"). */
td input[size] { display: inline-block; width: auto; max-width: 100%; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; white-space: nowrap; font-weight: 600; font-size: var(--fs-sm); }
.switch input { position: absolute; inset-inline-start: 0; top: 50%; width: 36px; height: 20px; margin: -10px 0 0; padding: 0; opacity: 0; cursor: pointer; }
.switch-track { position: relative; flex: none; width: 36px; height: 20px; border-radius: 99px; background: var(--border-strong); transition: background .15s; }
.switch-track::before { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 30%); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::before { transform: translateX(16px); }
[dir="rtl"] .switch input:checked + .switch-track::before { transform: translateX(-16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch-text::after { content: attr(data-off); color: var(--muted); }
.switch input:checked ~ .switch-text::after { content: attr(data-on); color: var(--text); }

/* ---- charts (System health, Analytics): drawn by the server as SVG ------ */
.chart svg { display: block; width: 100%; max-width: 720px; height: auto; margin: 8px 0; } /* its text grows with it */
.chart h3 { margin: 0; }
.chart-line { fill: none; stroke: var(--bar-b); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--bar-b); }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-axis { stroke: var(--muted); stroke-width: 1; }
.chart-label { fill: var(--muted); font-size: 11px; }
.chart-limit-warning, .chart-limit-critical { stroke-width: 1; stroke-dasharray: 5 4; }
.chart-limit-warning { stroke: var(--warn); }
.chart-limit-critical { stroke: var(--err-text); }
.chart-hit { fill: transparent; }
.chart-hit:hover { fill: var(--muted); fill-opacity: .15; }

/* ---- sign-in and error pages -------------------------------------------- */
.center {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(900px 480px at 50% -10%, rgb(22 101 52 / 16%), transparent 70%),
    var(--bg);
}
.login { width: 100%; max-width: 400px; padding: var(--s-7); box-shadow: var(--shadow-pop); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-brand .logo { width: 44px; height: 44px; font-size: 1.15rem; border-radius: 11px; }
.login-brand h1 { font-size: 1.2rem; }
.login-brand p { margin: 0; font-size: var(--fs-sm); }
.fineprint { color: var(--muted); font-size: var(--fs-xs); margin: 16px 0 0; }
.error-card { max-width: 520px; padding: var(--s-7); text-align: center; }
.center .error-card { box-shadow: var(--shadow-pop); }
.shell .error-card { margin: var(--s-8) auto; }
.error-card::before { content: ""; display: block; width: 40px; height: 40px; margin: 0 auto var(--s-3); background: var(--warn); -webkit-mask: var(--i-alert) center / contain no-repeat; mask: var(--i-alert) center / contain no-repeat; }
.error-card h1 { font-size: 1.25rem; margin-bottom: var(--s-2); }
.error-card p { margin: 0 0 var(--s-4); color: var(--muted); }
.error-card .form-actions { justify-content: center; }

/* ---- small screens: a top bar, and the menu as a drawer ------------------ */
@media (max-width: 860px) {
  .form-layout, .row2, .row3 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { height: auto; border-inline-end: 0; border-bottom: 1px solid var(--side-line); }
  .side-top { padding: 10px 16px; }
  .nav-toggle-btn {
    display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 12px; cursor: pointer; user-select: none;
    border: 1px solid var(--side-line); border-radius: var(--radius-md);
    color: var(--side-strong); font-size: var(--fs-md); font-weight: 600;
  }
  .nav-toggle-btn::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--i-menu) center / contain no-repeat; mask: var(--i-menu) center / contain no-repeat; }
  .nav-toggle-btn:hover { background: var(--side-hover); }
  .nav-toggle:focus-visible ~ .side-top .nav-toggle-btn { outline: 2px solid var(--side-gold); outline-offset: 2px; }
  .nav-close { display: none; }
  .nav-toggle:checked ~ .side-top .nav-open { display: none; }
  .nav-toggle:checked ~ .side-top .nav-close { display: inline; }
  .side-panel {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 40;
    width: min(300px, 86vw); padding-top: 10px;
    background: var(--side); border-inline-end: 1px solid var(--side-line);
    transform: translateX(-100%); visibility: hidden;
    transition: transform .22s ease, visibility .22s;
  }
  [dir="rtl"] .side-panel { transform: translateX(100%); }
  .nav-toggle:checked ~ .side-panel { transform: none; visibility: visible; box-shadow: var(--shadow-pop); }
  .nav-backdrop { position: fixed; inset: 0; z-index: 39; margin: 0; background: rgb(8 16 11 / 55%); cursor: pointer; }
  .nav-toggle:checked ~ .nav-backdrop { display: block; }
  .side-nav a { padding-block: 9px; }
  .content { padding: 0 var(--s-4) 40px; }
  .page-head { padding: 18px 0 14px; }
  h1 { font-size: 1.3rem; }
  .filters input[type=search] { min-width: 0; flex: 1 1 200px; }
  .card { padding: var(--s-4); }
}

@media (prefers-reduced-motion: reduce) {
  .side-nav a, .btn, input, select, textarea { transition: none; }
  .nav-animate .chev::before, .nav-animate .nav-items { transition: none; }
  .switch-track, .switch-track::before { transition: none; }
  .side-panel { transition: none; }
  .btn.is-busy::after { animation-duration: 1.6s; }
}
