/* Council dashboard: the CCSIT Student Council's official identity (navy, steel blue, Tajawal, council logo).
   Dark by default; a light theme is one click away and remembered on the device. */

:root, :root[data-theme='dark'] {
  color-scheme: dark;
  --page: #0e1524;
  --surface: #151f33;
  --surface-2: #1c2840;
  --surface-3: #24324d;
  --control-bg: #111a2c;
  --line: #26334b;
  --steel: #8fa3bf;
  --bar-track: rgba(143, 163, 191, 0.16);
  --field-line: #5d6f8d;
  --ink: #e6ecf4;
  --ink-2: #a7b4c7;
  --ink-3: #8a99b0;
  --brand: #a9bcd6;
  --brand-hover: #c9d6e3;
  --brand-press: #dce5ef;
  --brand-tint: rgba(169, 188, 214, 0.16);
  --brand-tint-2: rgba(169, 188, 214, 0.07);
  --on-brand: #0e1524;
  --focus: 0 0 0 3px rgba(169, 188, 214, 0.38);
  --danger: #ff8f85;
  --danger-tint: rgba(255, 143, 133, 0.12);
  --danger-ink: #ffc2bd;
  --danger-solid: #c4372c;
  --success: #7dd39a;
  --success-tint: rgba(125, 211, 154, 0.12);
  --success-ink: #b5ebc6;
  --warning: #f0c46a;
  --warning-tint: rgba(240, 196, 106, 0.12);
  --warning-ink: #f6dca2;
  --selection: rgba(169, 188, 214, 0.35);
  --scrim: rgba(5, 9, 18, 0.62);
  --toast-bg: #e6ecf4;
  --toast-ink: #0e1524;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(0, 0, 0, 0.22);
  --shadow-2: 0 14px 36px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7b4c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

:root[data-theme='light'] {
  color-scheme: light;
  --page: #fbfcfb;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --surface-3: #e1e8ef;
  --control-bg: #ffffff;
  --line: #c9d4df;
  --steel: #8fa3bf;
  --bar-track: #eef3f7;
  --field-line: #7f8fa3;
  --ink: #171e3d;
  --ink-2: #4a5a6e;
  --ink-3: #67768a;
  --brand: #2e4e69;
  --brand-hover: #243e55;
  --brand-press: #1b3043;
  --brand-tint: #c9d6e3;
  --brand-tint-2: #eef3f7;
  --on-brand: #ffffff;
  --focus: 0 0 0 3px rgba(46, 78, 105, 0.3);
  --danger: #b42318;
  --danger-tint: #fef1f0;
  --danger-ink: #7a1a12;
  --danger-solid: #b42318;
  --success: #157f3b;
  --success-tint: #edf8f1;
  --success-ink: #0f5a2a;
  --warning: #9a5b00;
  --warning-tint: #fff6e5;
  --warning-ink: #6b3f00;
  --selection: #c9d6e3;
  --scrim: rgba(23, 30, 61, 0.35);
  --toast-bg: #171e3d;
  --toast-ink: #ffffff;
  --shadow-1: 0 1px 2px rgba(23, 30, 61, 0.06), 0 2px 8px rgba(23, 30, 61, 0.05);
  --shadow-2: 0 8px 28px rgba(23, 30, 61, 0.14), 0 2px 6px rgba(23, 30, 61, 0.06);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5a6e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

body { background: var(--page); color: var(--ink); font-size: 0.9375rem; }
::selection { background: var(--selection); color: var(--ink); }
* { scrollbar-color: var(--field-line) transparent; }
.select { background-image: var(--chevron); }

.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.875rem; border-radius: 10px; }
.btn-sm .icon { width: 18px; height: 18px; }

.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--brand-hover); }

/* ---------- brand: council logo + product name ---------- */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { height: 64px; width: auto; flex: none; }
.logo-on-dark { display: none; }
:root:not([data-theme='light']) .logo-on-light { display: none; }
:root:not([data-theme='light']) .logo-on-dark { display: block; }
.brand-sep { width: 1px; height: 36px; background: var(--line); flex: none; }
.brand-text { display: grid; line-height: 1.2; }
.brand-name { font-size: 1.0625rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.brand-sub { white-space: nowrap; }
.brand-sub { font-size: 0.8125rem; color: var(--ink-2); font-weight: 500; }
.theme-toggle { margin-inline-start: auto; }

/* ---------- gate (loading, unlock, setup) ---------- */
.gate { min-height: 100dvh; display: grid; place-content: center; gap: 16px; padding: 32px 16px; }
.gate-card {
  width: min(460px, calc(100vw - 32px));
  padding: 24px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.gate-head { position: relative; display: flex; align-items: center; gap: 12px; padding-bottom: 22px; margin-bottom: 22px; }
.gate-head::after {
  content: ''; position: absolute; inset-inline: 0; bottom: -4px; height: 10px;
  background:
    radial-gradient(circle, var(--brand) 4.5px, transparent 5px) right center / 10px 10px no-repeat,
    radial-gradient(circle, transparent 3.2px, var(--steel) 3.7px, var(--steel) 5px, transparent 5.5px) left center / 11px 11px no-repeat,
    linear-gradient(var(--steel), var(--steel)) center / calc(100% - 26px) 2px no-repeat;
}
.gate-title { font-size: 1.375rem; font-weight: 800; line-height: 1.35; }
.gate-text { color: var(--ink-2); line-height: 1.65; }
.gate-link { justify-self: center; font-size: 0.9375rem; }
.gate-foot { text-align: center; font-size: 0.8125rem; color: var(--ink-2); }
.stack { display: grid; gap: 16px; }
.facts { display: grid; gap: 6px; padding-inline-start: 18px; color: var(--ink-2); line-height: 1.6; }
.facts li::marker { color: var(--steel); }

.skeleton { display: grid; gap: 12px; }
.skeleton span { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton span:nth-child(1) { width: 60%; height: 22px; }
.skeleton span:nth-child(3) { width: 80%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.pw { position: relative; }
.pw .input { padding-inline-end: 52px; }
.pw-toggle {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 10px; background: none; color: var(--ink-2); cursor: pointer;
}
.pw-toggle:hover { background: var(--surface-2); color: var(--ink); }
.pw-toggle:focus-visible { outline: none; box-shadow: var(--focus); }

.code-box {
  display: grid; gap: 8px; padding: 18px; border-radius: 14px;
  background: var(--surface-2); border: 1px dashed var(--field-line); text-align: center;
}
.code { font-family: var(--mono); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.06em; direction: ltr; color: var(--ink); word-break: break-all; }
.code-input { font-size: 1.0625rem; letter-spacing: 0.06em; text-align: left; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > .btn { flex: 1; }
.check { display: flex; gap: 10px; align-items: flex-start; line-height: 1.55; cursor: pointer; }
.check input { margin: 2px 0 0; flex: none; }

/* ---------- shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: 72px minmax(0, 1fr);
  grid-template-areas: 'top top' 'nav main';
  height: 100dvh;
}
.top {
  grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.top .brand-logo { height: 56px; }
.top-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }

.nav { grid-area: nav; display: grid; align-content: start; gap: 2px; padding: 16px 12px; background: var(--surface); border-inline-end: 1px solid var(--line); }
.nav-item {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px;
  border-radius: 10px; color: var(--ink-2); font-weight: 500; text-decoration: none;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item[aria-current='page'] { background: var(--brand-tint); color: var(--brand-press); font-weight: 700; }
.nav-item[aria-current='page'] .icon { color: var(--brand); }
.nav-count { margin-inline-start: auto; min-width: 24px; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 0.75rem; font-weight: 700; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.nav-count:empty { display: none; }
.nav-item[aria-current='page'] .nav-count { background: var(--surface); color: var(--brand-press); }

.main { grid-area: main; overflow: auto; padding: 24px 28px 48px; outline: none; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.head-actions .select { width: auto; min-height: 44px; padding-block: 8px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.view-title { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 800; line-height: 1.3; }
.view-title::before {
  content: ''; flex: none; width: 27px; height: 10px;
  background:
    radial-gradient(circle, var(--brand) 4.5px, transparent 5px) right center / 10px 10px no-repeat,
    linear-gradient(var(--brand), var(--brand)) left center / 18px 2px no-repeat;
}
.view-sub { color: var(--ink-2); margin-top: 2px; }

/* ---------- requests ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2);
  font-weight: 500; cursor: pointer;
}
.tab:hover { border-color: var(--field-line); color: var(--ink); }
.tab[aria-pressed='true'] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 700; }
.tab .n { font-variant-numeric: tabular-nums; font-size: 0.8125rem; opacity: 0.8; }
.tab:focus-visible { outline: none; box-shadow: var(--focus); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters .search { flex: 2 1 240px; }
.filters .select { flex: 1 1 140px; width: auto; }
.filters .input, .filters .select { min-height: 40px; padding-block: 6px; font-size: 0.9375rem; border-radius: 10px; }
.filters .select { padding-inline-end: 38px; background-position: left 10px center; }
.search { position: relative; }
.search .icon { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 18px; height: 18px; }
.search .input { padding-inline-start: 38px; }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th {
  position: sticky; top: 0; z-index: 1;
  padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  text-align: start; font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); white-space: nowrap;
}
.grid td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid tbody tr { cursor: pointer; transition: background-color 120ms var(--ease); }
.grid tbody tr:hover { background: var(--brand-tint-2); }
.grid tbody tr[aria-selected='true'] { background: var(--brand-tint); }
.grid .num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.row-link {
  display: block; max-width: 46ch; padding: 0; border: 0; background: none; cursor: pointer;
  text-align: start; font-weight: 700; color: var(--ink); line-height: 1.45;
}
.row-link:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.snippet { display: block; max-width: 56ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 0.875rem; }
.snippet .icon-sm { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-inline-end: 4px; }
.muted { color: var(--ink-2); }

.prio { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.prio::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--field-line); }
.prio-high::before { background: var(--warning); }
.prio-low { color: var(--ink-2); }
.prio-urgent { color: var(--danger); font-weight: 700; }
.prio-urgent::before { background: var(--danger); }

.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.st-received { background: var(--brand-tint); color: var(--brand-press); }
.st-working { background: var(--warning-tint); color: var(--warning); }
.st-resolved { background: var(--success-tint); color: var(--success); }
.st-declined { background: var(--surface-3); color: var(--ink-2); }
.src { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); white-space: nowrap; }
.src .icon { width: 16px; height: 16px; }
.broken { color: var(--danger); font-weight: 700; }

.empty { display: grid; justify-items: center; gap: 10px; padding: 56px 24px; text-align: center; }
.empty .icon { width: 36px; height: 36px; color: var(--brand); }
.empty h2 { font-size: 1.125rem; font-weight: 800; }
.empty p { max-width: 44ch; color: var(--ink-2); line-height: 1.6; }

/* ---------- side panel ---------- */
.panel {
  position: fixed; inset-block: 72px 0; inset-inline-end: 0; z-index: 20;
  width: min(480px, 100vw); overflow: auto;
  background: var(--surface); border-inline-start: 1px solid var(--line); box-shadow: var(--shadow-2);
  animation: slide 220ms var(--ease) both;
}
@keyframes slide { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.scrim { position: fixed; inset: 0; z-index: 15; background: var(--scrim); }
@media (min-width: 1280px) { .scrim { display: none; } .shell.has-panel .main { padding-inline-end: 508px; } }
@media (min-width: 1280px) and (max-width: 1700px) { .shell.has-panel .c-type, .shell.has-panel .c-area, .shell.has-panel .c-src { display: none; } }
.panel-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.panel-title { font-size: 1.1875rem; font-weight: 800; line-height: 1.4; }
.panel-body { display: grid; gap: 22px; padding: 18px 20px 32px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 10px; background: none; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-size: 0.8125rem; font-weight: 500; }
.body-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; font-size: 1rem; }
.sub { font-size: 0.875rem; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 0.9375rem; }
.dl dt { color: var(--ink-2); }
.answers { display: grid; gap: 4px; font-size: 0.9375rem; }
.answers dt { color: var(--ink-2); font-size: 0.8125rem; line-height: 1.5; }
.answers dd { font-weight: 700; margin-bottom: 10px; }
.answers dd:last-child { margin-bottom: 0; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.shot { display: grid; place-items: center; gap: 4px; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: 0.75rem; text-align: center; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot:focus-visible { outline: none; box-shadow: var(--focus); }
.shot .spin { animation: spin 0.9s linear infinite; }
.shot.is-broken .icon { color: var(--danger); }
.panel .segmented { gap: 6px; }
.panel .choice span { min-height: 40px; font-size: 0.875rem; padding: 6px 4px; white-space: nowrap; }
.radios { display: grid; gap: 6px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; }
.radio input { margin: 0; flex: none; }
.panel .textarea { min-height: 110px; font-size: 1rem; }
.log { display: grid; gap: 12px; padding-inline-start: 14px; border-inline-start: 1px solid var(--line); }
.log li { display: grid; gap: 2px; list-style: none; font-size: 0.875rem; }
.log .when { color: var(--ink-2); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.danger-zone { padding-top: 16px; border-top: 1px solid var(--line); }
.form-grid { display: grid; gap: 16px; }
.form-grid .input, .form-grid .select { min-height: 46px; font-size: 1rem; }

/* ---------- numbers ---------- */
.numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.card h2 { font-size: 1rem; font-weight: 800; margin-bottom: 10px; }
/* One shared grid per card, so every bar in a card starts and ends at the same place. */
.bars { display: grid; grid-template-columns: minmax(0, max-content) minmax(72px, 1fr) 3ch; gap: 8px 10px; align-items: center; }
.bar-row { display: contents; font-size: 0.9375rem; }
.bar-row > span:first-child { font-size: 0.9375rem; line-height: 1.4; }
.bar { height: 8px; border-radius: 4px; background: var(--bar-track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.bar-row .n { text-align: end; font-variant-numeric: tabular-nums; font-weight: 700; }
.total { font-size: 1rem; color: var(--ink-2); margin-bottom: 16px; }
.total strong { color: var(--ink); font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* ---------- members & settings ---------- */
.sections { display: grid; gap: 16px; max-width: 760px; }
.section-title { font-size: 1.0625rem; font-weight: 800; margin-bottom: 4px; }
.section-text { color: var(--ink-2); line-height: 1.6; margin-bottom: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.yes { color: var(--success); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.no { color: var(--warning); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- dialog & toast ---------- */
.confirm { width: min(440px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-2); background: var(--surface); color: var(--ink); }
.confirm::backdrop { background: var(--scrim); }
.confirm-title { font-size: 1.1875rem; font-weight: 800; }
.confirm-text { color: var(--ink-2); line-height: 1.6; }
.confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.toast {
  position: fixed; bottom: 20px; inset-inline-start: 50%; transform: translateX(50%); z-index: 50;
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px;
  background: var(--toast-bg); color: var(--toast-ink); font-weight: 500; box-shadow: var(--shadow-2);
  animation: rise 240ms var(--ease) both;
}
.toast .icon { color: var(--toast-ink); opacity: 0.8; }
@keyframes rise { from { opacity: 0; transform: translate(50%, 8px); } to { opacity: 1; transform: translate(50%, 0); } }

.print-sheet { display: none; }
@media print {
  body { background: #fff; color: #000; }
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block !important; padding: 24mm; font-size: 14pt; line-height: 1.8; color: #000; }
  .print-sheet .code { font-size: 22pt; margin: 12mm 0; }
}

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .top .brand-logo { height: 48px; }
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 64px auto minmax(0, 1fr); grid-template-areas: 'top' 'nav' 'main'; }
  .nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .nav-item { flex: none; min-height: 36px; }
  .main { padding: 16px 16px 40px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .search { grid-column: 1 / -1; }
  .panel { inset-block: 0; z-index: 30; }
  .two { grid-template-columns: 1fr; }
  /* table becomes a list of rows */
  .grid thead { display: none; }
  .grid, .grid tbody, .grid tr, .grid td { display: block; }
  .grid tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .grid td { padding: 0; border: 0; }
  .grid td.c-title { grid-column: 1 / -1; order: -1; }
  .grid td.c-type, .grid td.c-area, .grid td.c-src { display: none; }
}
.grid tbody tr.static { cursor: default; }
.grid tbody tr.static:hover { background: transparent; }

/* Title column takes the remaining width and truncates, so the table never overflows beside the panel */
@media (min-width: 961px) {
  .grid td.c-title { width: 100%; max-width: 0; }
  .grid .row-link, .grid .snippet { max-width: 100%; }
  .grid .row-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.grid td.c-type, .grid td.c-area, .grid td.c-src { white-space: nowrap; }

/* Radios and checkboxes drawn in the theme instead of browser defaults */
.radio input, .check input {
  appearance: none; -webkit-appearance: none;
  display: grid; place-content: center;
  width: 20px; height: 20px;
  border: 1.5px solid var(--field-line); background: var(--control-bg);
  cursor: pointer; transition: border-color 140ms var(--ease), background-color 140ms var(--ease);
}
.radio input { border-radius: 50%; }
.check input { border-radius: 6px; }
.radio input::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); transform: scale(0); transition: transform 140ms var(--ease); }
.radio input:checked { border-color: var(--brand); }
.radio input:checked::before { transform: scale(1); }
.check input::before { content: ''; width: 6px; height: 11px; margin-top: -2px; border: solid var(--on-brand); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 140ms var(--ease); }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::before { transform: rotate(45deg) scale(1); }
.radio input:hover, .check input:hover { border-color: var(--brand); }
.radio input:focus-visible, .check input:focus-visible { outline: none; box-shadow: var(--focus); }

@media (max-width: 480px) {
  .top { padding: 0 12px; gap: 8px; }
  .top .brand { gap: 8px; }
  .top .brand-sep, .top .brand-sub { display: none; }
  .top .brand-logo { height: 44px; }
  .top-actions { gap: 4px; }
  .top .btn-text { display: none; }
  .top [data-action='lock'] { padding: 0 10px; }
}

/* Danger buttons follow the active theme */
.btn-danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { border-color: var(--danger); }
:root:not([data-theme='light']) .btn-danger-solid:hover { background: #a82e25; }
