/*
  EDR Broadcast league hub - the shared look of the driver page (index.html), the league dashboard
  (league.html) and the league sign-up page (join.html). Served by the generated profile-page function beside the pages (CSP style-src 'self'),
  cache-busted with a content hash by scripts/gen-profile-page-fn.mjs. Brand: the EDR token set the timing
  pages use (electric yellow on near-black, Saira Semi Condensed display type), plus the official
  edr-broadcast-wordmark from the brand kit. Nothing here may hand-roll a substitute EDR mark.
*/
:root {
  color-scheme: dark;
  --bg-0: #07090c;
  --bg-1: #0d1117;
  --bg-2: #131922;
  --bg-3: #1a212c;
  --bg-4: #232c3a;
  --line: #212935;
  --line-2: #2e3949;
  --text: #f4f6fa;
  --text-mute: #a3acb9;
  /* #7a8595 clears WCAG AA (4.5:1) on every surface here; the old #6e7988 was 4.3:1 on --bg-1. */
  --text-dim: #7a8595;
  --accent: #f0f000;
  --accent-hover: #fbfb3a;
  --accent-ink: #111400;
  --accent-soft: rgba(240, 240, 0, 0.12);
  --orange: #f76a0c;
  --orange-soft: rgba(247, 106, 12, 0.14);
  --live: #00d084;
  --live-soft: rgba(0, 208, 132, 0.13);
  --err: #ff5a5a;
  --err-soft: rgba(255, 90, 90, 0.13);
  --blue: #4da3ff;
  --blue-soft: rgba(77, 163, 255, 0.13);
  --radius: 10px;
  --radius-lg: 16px;
  --head: 'Saira Semi Condensed', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --topbar-h: 60px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(240, 240, 0, 0.05), transparent 60%),
    radial-gradient(900px 520px at -10% 0%, rgba(247, 106, 12, 0.045), transparent 55%),
    var(--bg-0);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.5 var(--body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.dim { color: var(--text-dim); }
.mute { color: var(--text-mute); }
.grow { flex: 1 1 auto; }
.row-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── top bar ───────────────────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  height: var(--topbar-h); padding: 0 20px;
  background: rgba(10, 13, 18, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent) 0, var(--accent) 96px, var(--orange) 96px, var(--orange) 112px, transparent 112px);
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 26px; width: auto; display: block; }
.product {
  font-family: var(--head); font-size: 15px; color: var(--text-mute);
  padding-left: 14px; border-left: 1px solid var(--line-2); white-space: nowrap;
}
.topbar .who { color: var(--text-dim); font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toplink { color: var(--text-mute); font-size: 13px; font-weight: 600; white-space: nowrap; }
.toplink:hover { color: var(--text); text-decoration: none; }

/* ── buttons ───────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text);
  font: 700 13px/1 var(--body); cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: var(--bg-4); border-color: #3a4659; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-mute); }
.btn-ghost:hover { background: var(--bg-3); color: var(--text); border-color: var(--line); }
.btn-danger { background: transparent; color: #ff8a8a; border-color: rgba(255, 90, 90, 0.45); }
.btn-danger:hover { background: var(--err-soft); border-color: var(--err); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: transparent; border: 1px solid transparent; color: var(--text-mute); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); border-color: var(--line); }
.icon-btn svg { width: 18px; height: 18px; }
.linkish { background: none; border: 0; padding: 0; color: var(--text-mute); font: inherit; text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--text); }

/* ── form fields ───────────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--text-mute); }
.field .hint { font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.field .hint.bad { color: var(--err); }
.input, input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], input[type="date"], input[type="datetime-local"], input:not([type]), textarea, select {
  width: 100%; min-width: 0; height: 40px; padding: 0 12px;
  background: var(--bg-0); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  font: 14px/1.4 var(--body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { height: auto; min-height: 104px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select { padding-right: 32px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input.bad, textarea.bad { border-color: var(--err); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
input[type="file"] { height: auto; padding: 0; border: 0; background: transparent; font-size: 13px; color: var(--text-mute); width: auto; }
input[type="file"]::file-selector-button {
  height: 32px; margin-right: 10px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--bg-3); color: var(--text); font: 700 12px/1 var(--body); cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--bg-4); }
.grid-2 { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.cols-2 { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text); cursor: pointer; }
.check input { margin-top: 2px; flex: none; }
.counter { font-size: 11px; color: var(--text-dim); text-align: right; }

/* An input with its action button beside it (copy a link, look up an id); wraps on a phone. */
.copyrow { display: flex; gap: 8px; flex-wrap: wrap; }
.copyrow > input, .copyrow > select { flex: 1 1 220px; }
.copyrow input.mono { font-size: 13px; }

/* ── cards and page furniture ──────────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 40%), var(--bg-1);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: 18px; }
.card-head h3 { font-size: 16px; }
.card-head p { margin: 4px 0 0; color: var(--text-mute); font-size: 13px; }
.card-sub { color: var(--text-mute); font-size: 13px; margin: 4px 0 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 18px; height: 3px; background: var(--accent); border-radius: 3px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 30px; line-height: 1.1; margin-top: 6px; }
.page-head p { margin: 6px 0 0; color: var(--text-mute); max-width: 640px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.section-gap { margin-top: 22px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 18px 0; }

/* ── status badges, chips, pills ───────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px;
  font: 700 11px/1 var(--body); white-space: nowrap; border: 1px solid var(--line-2);
  background: var(--bg-3); color: var(--text-mute);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge.plain::before { display: none; }
.s-ok { color: var(--live); background: var(--live-soft); border-color: rgba(0, 208, 132, 0.35); }
.s-wait { color: #ffa35c; background: var(--orange-soft); border-color: rgba(247, 106, 12, 0.4); }
.s-bad { color: #ff8a8a; background: var(--err-soft); border-color: rgba(255, 90, 90, 0.4); }
.s-info { color: var(--blue); background: var(--blue-soft); border-color: rgba(77, 163, 255, 0.35); }
.s-accent { color: var(--accent); background: var(--accent-soft); border-color: rgba(240, 240, 0, 0.4); }
.s-none { color: var(--text-dim); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--text-mute); font: 700 12px/1 var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.chip:hover { color: var(--text); border-color: #3a4659; }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip .n { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .n { color: var(--accent); }
.plate {
  display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 7px;
  font: 700 14px/1 var(--head); color: var(--accent); background: #000; border: 1px solid #343434; border-radius: 6px;
  font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.plate.lg { min-width: 54px; height: 38px; font-size: 22px; border-radius: 8px; }
.plate.none { color: var(--text-dim); }
.cc {
  display: inline-grid; place-items: center; height: 20px; padding: 0 6px; border-radius: 5px;
  font: 700 10px/1 var(--body); letter-spacing: 0.06em; color: var(--text-mute); background: var(--bg-4);
}

/* ── avatars ───────────────────────────────────────────────────────────────────────────── */
.avatar {
  --size: 44px; --hue: 210;
  width: var(--size); height: var(--size); flex: none; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--hue) 45% 30%), hsl(calc(var(--hue) + 40) 50% 18%));
  color: #fff; font: 700 calc(var(--size) * 0.38) / 1 var(--head);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sq { border-radius: 12px; }
.avatar.xl { --size: 120px; border-radius: 18px; }

/* ── KPI tiles ─────────────────────────────────────────────────────────────────────────── */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.tile {
  position: relative; overflow: hidden;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px;
}
.tile .k { font-size: 12px; font-weight: 700; color: var(--text-mute); display: flex; align-items: center; gap: 8px; }
.tile .k svg { width: 16px; height: 16px; color: var(--text-dim); }
.tile .v { font: 700 34px/1.1 var(--head); margin-top: 8px; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 16px; color: var(--text-dim); font-weight: 600; }
.tile .s { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.tile.accent { border-color: rgba(240, 240, 0, 0.35); background: linear-gradient(160deg, rgba(240, 240, 0, 0.08), transparent 60%), var(--bg-1); }
.tile.warn .v { color: #ffa35c; }
button.tile { text-align: left; color: inherit; font: inherit; cursor: pointer; }
button.tile:hover { border-color: var(--line-2); }
.bar { height: 6px; border-radius: 999px; background: var(--bg-4); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s; }
.bar.live > i { background: var(--live); }

/* ── checklist ─────────────────────────────────────────────────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.step {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2);
}
.step .dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line-2); color: var(--text-dim); font: 700 13px/1 var(--head);
}
.step.done .dot { background: var(--live); border-color: var(--live); color: #00140d; }
.step.done .dot svg { width: 16px; height: 16px; }
.step b { display: block; font-size: 14px; }
.step span { color: var(--text-mute); font-size: 12px; }
.step.done b { color: var(--text-mute); }
.step-cta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .step { grid-template-columns: 30px 1fr; } .step-cta { grid-column: 2; justify-content: flex-start; } }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--bg-4) 0); }
.ring::before { content: ""; grid-area: 1 / 1; width: 50px; height: 50px; border-radius: 50%; background: var(--bg-1); }
.ring b { grid-area: 1 / 1; position: relative; font: 700 16px/1 var(--head); }

/* ── tables ────────────────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 800;
  color: var(--text-dim); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--bg-3); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--bg-2); }
.table td.r, .table th.r { text-align: right; }
.table .who { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.table .who > div > b { display: block; font-weight: 700; }
.table .who > div > span { display: block; color: var(--text-dim); font-size: 12px; }
.table tr.me td { background: var(--accent-soft); }
.table tr.me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table tr.cut td { border-bottom: 2px dashed rgba(247, 106, 12, 0.6); }
.pos { font: 700 18px/1 var(--head); width: 36px; font-variant-numeric: tabular-nums; }
.pos.p1 { color: #ffd84d; }
.pos.p2 { color: #d6dde6; }
.pos.p3 { color: #e0975a; }

/* ── empty states ──────────────────────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 44px 20px; color: var(--text-mute); }
.empty .ico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-3); color: var(--accent); }
.empty .ico svg { width: 26px; height: 26px; }
.empty h3 { font-size: 18px; color: var(--text); margin-bottom: 6px; }
.empty p { max-width: 460px; margin: 0 auto 16px; line-height: 1.55; }

/* ── modal (native <dialog>) ───────────────────────────────────────────────────────────── */
dialog.modal {
  width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0;
  background: var(--bg-1); color: var(--text); border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: var(--shadow);
}
dialog.modal.wide { width: min(920px, calc(100vw - 24px)); }
dialog.modal.narrow { width: min(460px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(3, 5, 8, 0.72); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 20px; }
.modal-head p { margin: 4px 0 0; color: var(--text-mute); font-size: 13px; }
.modal-body { padding: 20px 22px; overflow-y: auto; max-height: calc(100vh - 200px); }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg-0); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button {
  height: 34px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: var(--text-mute);
  font: 700 13px/1 var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.seg button svg { width: 15px; height: 15px; }
.seg button[aria-selected="true"] { background: var(--bg-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ── side drawer ───────────────────────────────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(3, 5, 8, 0.6); animation: fade 0.15s ease-out; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(560px, 100vw);
  background: var(--bg-1); border-left: 1px solid var(--line-2); overflow-y: auto; box-shadow: var(--shadow);
  animation: slide 0.2s ease-out;
}
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; gap: 16px; align-items: center; padding: 20px 22px; background: rgba(13, 17, 23, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 22px; line-height: 1.15; }
/* minmax(0, 1fr): a grid column defaults to its widest child's min-content, which pushed every zone past a 390 px
   screen (gate run 27 Oct, K1629). Wide tables scroll in their own .table-wrap. */
.drawer-body { padding: 18px 22px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.zone { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--bg-2); }
.zone h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.zone h3 svg { width: 16px; height: 16px; color: var(--text-dim); }
.zone .own { font-size: 12px; color: var(--text-dim); margin: 4px 0 12px; }
.zone dl { margin: 0; display: grid; grid-template-columns: 128px 1fr; gap: 7px 12px; font-size: 13px; }
.zone dt { color: var(--text-dim); }
.zone dd { margin: 0; overflow-wrap: anywhere; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── on-air lower-third preview ────────────────────────────────────────────────────────── */
.onair { position: relative; border-radius: 14px; overflow: hidden; padding: 36px 18px 18px; background:
  repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 18px),
  radial-gradient(400px 200px at 80% 0%, rgba(240, 240, 0, 0.07), transparent 70%), #0a0d12; border: 1px solid var(--line); }
.onair .tag { position: absolute; top: 12px; left: 18px; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: var(--text-dim); text-transform: uppercase; }
.lt { display: flex; align-items: stretch; max-width: 460px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55)); }
.lt .ph { width: 76px; flex: none; background: #1b2230; overflow: hidden; border-radius: 10px 0 0 10px; display: grid; place-items: center; }
.lt .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lt .ph .avatar { --size: 76px; border-radius: 0; border: 0; }
.lt .nm { flex: 1; min-width: 0; background: linear-gradient(90deg, #f4f6fa, #e6e9ef); color: #0a0d12; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; }
.lt .nm b { font: 700 22px/1.05 var(--head); text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt .nm span { font-size: 12px; font-weight: 700; color: #4a5361; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt .no { width: 62px; flex: none; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 26px/1 var(--head); border-radius: 0 10px 10px 0; }
.lt .no.none { background: #2a3240; color: #6e7988; }
.lt-sub { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-mute); }

/* ── toasts ────────────────────────────────────────────────────────────────────────────── */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--bg-3); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13px; animation: slide 0.18s ease-out;
}
.toast::before { content: ""; width: 4px; align-self: stretch; border-radius: 4px; background: var(--live); flex: none; }
.toast.err::before { background: var(--err); }
.toast.info::before { background: var(--blue); }
.toast p { margin: 0; flex: 1; }
.toast { cursor: pointer; }
.toast .x { color: var(--text-dim); font-size: 16px; line-height: 1; padding: 0 2px; }

/* ── notices ───────────────────────────────────────────────────────────────────────────── */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(77, 163, 255, 0.35); background: var(--blue-soft); margin-bottom: 18px; }
.notice.warn { border-color: rgba(247, 106, 12, 0.45); background: var(--orange-soft); }
.notice.ok { border-color: rgba(0, 208, 132, 0.4); background: var(--live-soft); }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice b { display: block; margin-bottom: 2px; }
.notice p { margin: 0; color: var(--text-mute); font-size: 13px; }

/* ── auth screen ───────────────────────────────────────────────────────────────────────── */
/* Sign in comes first in the markup; on wide screens the hero sits on the left by grid area, on phones below it. */
.auth-wrap { min-height: calc(100vh - var(--topbar-h)); display: grid; grid-template-columns: 1.05fr 1fr; grid-template-areas: 'hero panel'; }
.auth-hero {
  grid-area: hero;
  position: relative; overflow: hidden; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 22px),
    radial-gradient(700px 420px at 20% 20%, rgba(240, 240, 0, 0.09), transparent 65%),
    radial-gradient(600px 400px at 90% 100%, rgba(247, 106, 12, 0.08), transparent 60%),
    var(--bg-1);
  border-right: 1px solid var(--line);
}
.auth-hero h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.04; margin: 14px 0 14px; max-width: 560px; }
.auth-hero h1 em { font-style: normal; color: var(--accent); }
.auth-hero p.lead { color: var(--text-mute); font-size: 16px; max-width: 520px; margin: 0 0 26px; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 520px; }
.perks li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; }
.perks .pi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.perks .pi svg { width: 19px; height: 19px; }
.perks b { display: block; }
.perks span { color: var(--text-mute); font-size: 13px; }
.auth-panel { grid-area: panel; display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(420px, 100%); }
.auth-card h2 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-mute); margin: 0 0 22px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .msg { min-height: 20px; font-size: 13px; }
.auth-card .keep { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.auth-card .keep input { margin-top: 1px; flex: none; }
.auth-card .keep small { display: block; font-weight: 400; color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.msg.ok { color: var(--live); }
.msg.err { color: #ff8a8a; }

/* ── skeleton + spinner ────────────────────────────────────────────────────────────────── */
.skel { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rot 0.7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.foot { color: var(--text-dim); font-size: 12px; text-align: center; padding: 28px 18px 34px; line-height: 1.7; }
.foot a { color: var(--text-mute); }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; grid-template-areas: 'panel' 'hero'; min-height: 0; }
  .auth-panel { padding: 28px 16px 32px; }
  .auth-hero { padding: 36px 22px; border-right: 0; border-top: 1px solid var(--line); }
  .product { display: none; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .brand img { height: 22px; }
  .topbar .who { display: none; }
  .card { padding: 16px; }
  .page-head h1 { font-size: 24px; }
  .toplink { display: none; }
  .cols-2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; }
  .tile .v { font-size: 28px; }
  .lt .nm b { font-size: 18px; }
  .table .who { min-width: 0; gap: 10px; }
  .table .who > div { min-width: 0; }
  .table .who > div > b, .table .who > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
  .table th, .table td { padding-left: 8px; padding-right: 8px; }
  .lt .no { width: 50px; font-size: 22px; }
  .zone dl { grid-template-columns: 1fr; gap: 2px; }
  .zone dd { margin-bottom: 8px; }
  .modal-body, .modal-head, .modal-foot { padding-left: 16px; padding-right: 16px; }
}
/* League sign-ups (hubSignups.js): Review > Sign-ups and Settings > Sign-up link. */
.su-toolbar { flex-wrap: wrap; gap: 8px; }
.su-toolbar select { width: auto; }
.su-list { display: grid; gap: 12px; }
.su-card { display: grid; gap: 10px; margin: 0; }
.su-name { font-family: var(--head); font-size: 18px; }
.su-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; margin-top: 2px; }
.su-mismatch { color: var(--orange); font-weight: 700; }
.su-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; }
.plate.su-taken { opacity: 0.55; text-decoration: line-through; }
.su-answers { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 14px; margin: 0; font-size: 13px; }
.su-answers dt { color: var(--text-mute); }
.su-answers dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.su-season { margin-top: 0; }
.su-conduct { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.su-conduct-h { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute); }
.cd-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cd-list li { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.cd-list .cd-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.su-q { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.su-q:first-child { border-top: 0; }
@media (max-width: 640px) {
  .su-answers { grid-template-columns: minmax(0, 1fr); }
  .su-answers dd { margin-bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── league results (A5): season tabs, the review table with its adjustments panel, standings ───────────── */
.rs-tabs { margin: 4px 0 14px; }
/* A newer hub after a deploy: a small bar, bottom centre, until reloaded or dismissed. */
.newer-hub { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.rs-ign-list { margin-top: 8px; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.rs-ign-opt { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 12px; text-align: left; background: none; color: var(--text); border: 0; border-bottom: 1px solid var(--line); cursor: pointer; font: inherit; }
.rs-ign-opt:last-of-type { border-bottom: 0; }
.rs-ign-opt:hover:not([disabled]), .rs-ign-opt:focus-visible { background: var(--bg-3); }
.rs-ign-opt[disabled] { cursor: not-allowed; opacity: .7; }
.rs-ign-list .rs-ign-none { padding: 0 12px; }
.rs-review { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.rs-review-main { min-width: 0; }
.rs-adjust { position: sticky; top: calc(var(--topbar-h) + 12px); }
.rs-adj-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rs-adj-list li { display: grid; gap: 2px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.rs-adj-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.rs-adj-list li .btn { justify-self: start; }
.rs-adj-mini { font-size: 12px; color: var(--orange, #f76a0c); }
.rs-rows tr.rs-unmatched td { background: var(--orange-soft); }
.rs-standings tr.rs-cut td { padding: 0; border-bottom: 2px dashed var(--accent); }
.rs-standings tr.rs-cut span { display: inline-block; margin: 0 0 -9px 8px; padding: 0 6px; font-size: 11px; color: var(--accent); background: var(--bg-1); }
.rs-grants { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.rs-grants li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rs-grants li .btn { margin-left: auto; }
@media (max-width: 900px) {
  .rs-review { grid-template-columns: 1fr; }
  .rs-adjust { position: static; }
}

/* ── A9 rules editor and A10 entry scoring (hubRules.js, hubEntryScoring.js) ── */
#c-body { white-space: pre-line; }
.rr { display: grid; gap: 14px; }
.rr-sec { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; margin: 0; min-width: 0; display: grid; gap: 10px; }
.rr-sec legend { padding: 0 6px; font-weight: 600; }
.rr-src-sw { display: grid; gap: 8px; padding: 10px 0 0 26px; border-top: 1px dashed var(--line); }
.rr-unused > :not(legend):not(p) { opacity: 0.6; }
.rr-sec textarea { width: 100%; font-family: var(--mono, ui-monospace, monospace); }
.rr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rr-num input { max-width: 140px; }
.rr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rr-chip { border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 12px; white-space: nowrap; }
.rr-tbs { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rr-tb { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rr-err { margin: 2px 0 0; font-size: 12px; color: var(--err); }
[aria-invalid="true"] { border-color: var(--err) !important; }
.rr-history summary, .es-carry summary { cursor: pointer; }
.rr-history ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.es-panel { margin: 0 0 12px; display: grid; gap: 12px; }

/* M1d: a sign-up request's thread with the league (hubSignups.js, join.html) */
.su-thread { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.su-msg { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.su-msg-staff { border-left: 3px solid var(--accent, #f5e400); }
.su-msg-head { font-size: 12px; margin-bottom: 2px; }
.su-msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
/* M1e reminders (hubReminders.js): the card under the Schedule, and its inline per-round inputs */
.rm-sep { border-top: 1px solid var(--line, rgba(255,255,255,0.08)); margin: 14px 0; }
.rm-preview { border: 1px solid var(--line, rgba(255,255,255,0.08)); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.rm-preview b { display: block; margin-bottom: 6px; }
.rm-text textarea { width: 100%; }
.rs-schedule input.rm-opens { max-width: 190px; }
/* NZ Racing, 27 Oct: the round's start shown as a default (not saved until changed). */
.rs-schedule input.rm-opens-default { color: var(--text-dim); font-style: italic; }
.rm-discord { display: flex; gap: 12px; background: #313338; color: #dbdee1; border-radius: 8px; padding: 12px 14px; font-size: 14px; line-height: 1.4; }
.rm-discord-av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #0c1016; color: #f0f000; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.rm-discord-msg { min-width: 0; flex: 1; }
.rm-discord-who b { color: #f2f3f5; }
.rm-discord-app { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; border-radius: 3px; padding: 1px 4px; vertical-align: 1px; }
.rm-discord-embed { margin-top: 6px; background: #2b2d31; border-left: 4px solid #f0f000; border-radius: 4px; padding: 8px 12px 10px; max-width: 520px; }
.rm-discord-title { font-weight: 700; color: #f2f3f5; margin-bottom: 4px; }
.rm-discord-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.rm-discord-foot { margin-top: 8px; font-size: 11px; color: #949ba4; }
.rm-discord-field { margin-top: 8px; }
.rm-discord-fname { font-weight: 700; font-size: 13px; color: #f2f3f5; margin-bottom: 2px; }
/* A Discord timestamp: the reader's own time, on Discord's grey chip */
.rm-ts { background: rgba(78, 80, 88, 0.48); border-radius: 3px; padding: 0 2px; }
.rm-channels { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.rm-ch { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.rm-warn { flex-basis: 100%; margin: 4px 0 0; font-size: 12px; color: var(--amber, #f5b74a); }
.rm-summary ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.su-thread-wrap { margin: 6px 0; }

/* M2: grid control */
.su-over { color: var(--err); font-weight: 600; }

/* M1b: messages (messagesView.js; hub Messages view and the driver page's Messages tab) */
.msg-layout { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 14px; align-items: start; }
@media (max-width: 760px) { .msg-layout { grid-template-columns: 1fr; } }
.msg-threads { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.msg-thread { width: 100%; text-align: left; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.msg-thread.is-open { border-color: var(--accent, #f5e400); }
.msg-thread.is-unread .msg-thread-sub { font-weight: 700; }
.msg-thread-top { display: flex; gap: 8px; align-items: center; }
.msg-thread-sub, .msg-thread-when { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-thread-when { font-size: 12px; }
.msg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #f5e400); display: inline-block; margin-left: auto; }
.msg-mine { border-left: 3px solid var(--line-2, #2e3949); }
.msg-ann { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.msg-ann li { border-bottom: 1px solid var(--line); padding-bottom: 8px; display: grid; gap: 2px; }

/* M1f: Settings > League contact email */
.ct-switches { display: grid; gap: 10px; }
.ct-notify select { min-width: 140px; }
.ct-log { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }

/* M1a: Messages > New message and Sent */
.msg-tabs { margin-bottom: 12px; }
.bulk-form { display: grid; gap: 4px; }
.bulk-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; max-height: 260px; overflow: auto; padding: 4px 0; }
.bulk-preview.is-stale { opacity: .6; }
.bulk-recips { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.bulk-sent td { vertical-align: top; }

/* C3b: Settings > Notifications */
.nt-switches { display: grid; gap: 10px; }

/* B3: fix a confirmed result (hubResults.js) */
.rs-fix-rows input, .rs-fix-rows select { width: 4.75rem; min-width: 0; }
.rs-fix-rows td.rs-fix-changed { background: var(--warn-soft, rgba(255, 190, 70, 0.12)); }

/* B4: the scoring log (hubResults.js, History tab) */
.rs-log { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.rs-log li { border-bottom: 1px solid var(--line); padding-bottom: 8px; display: grid; gap: 2px; }
.rs-log-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* The season archive and records (hubArchive.js), under Standings */
.ar-tiles { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.ar-tiles .tile { padding: 12px 14px; }
.ar-tiles .tile .v { font-size: 28px; margin-top: 4px; }
.ar-tiles .ar-rest { margin-top: 2px; }
.ar-lines { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: 13px; }
.ar-seasons { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ar-season { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg-1); }
.ar-season-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 14px; }
.ar-season-head .dim { font-size: 12px; }
.ar-podium { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: 13px; }
.ar-rank { display: inline-block; min-width: 72px; font-weight: 700; color: var(--text-dim); }
.ar-p1 .ar-rank { color: var(--accent); }

/* Driver careers (driverCareer.js): the driver's Career card and the hub drawer's Career zone */
.dc-tiles { grid-template-columns: repeat(auto-fit, minmax(min(92px, 100%), 1fr)); gap: 8px; }
.dc-tiles .tile { padding: 10px 12px; }
.dc-tiles .tile .v { font-size: 24px; margin-top: 4px; }
.dc-leagues { display: grid; gap: 6px; margin-top: 10px; }
.dc-league { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--bg-1); }
.dc-league summary { cursor: pointer; font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.dc-league summary .dim { font-size: 12px; }
.dc-seasons { list-style: none; padding: 0; margin: 8px 0 2px; display: grid; gap: 6px; font-size: 13px; }
.dc-seasons li { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.dc-table tbody th { font: 700 13px/1.3 var(--body); text-transform: none; letter-spacing: 0; color: var(--text); text-align: left; white-space: nowrap; padding: 10px 12px; border-bottom: 1px solid var(--bg-3); }

/* "My league" (myLeagueView.js): one league's drivers-only view on the driver page */
.ml-me { margin-top: 12px; }
.ml-cars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.ml-car { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg-1); }
.ml-car.me { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.ml-car.reserve { opacity: 0.8; }
.ml-who { display: grid; gap: 4px; min-width: 0; }
.ml-driver { display: flex; align-items: center; gap: 8px; font-size: 14px; overflow-wrap: anywhere; }
.ml-driver img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.ml-news { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ml-news li { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.ml-news li.unread b { color: var(--accent); }
.ml-body { white-space: pre-line; margin: 6px 0 0; font-size: 14px; color: var(--text-mute); }
/* B13: the Rules tab's "Preview changes" */
.rr-preview { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.rr-preview.is-stale { opacity: .6; }
.rr-moves { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 14px; }

/* B10: the Rules tab's Teams panel */
.rr-teams select { max-width: 260px; }
.rr-best { width: 5rem; }

/* B11: the Rules tab's Playoffs panel */
.rr-stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rr-stage { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.rs-standings tr.rs-out td { opacity: .7; }

/* B12: Rules > Qualification */
.rr-qfrom { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rr-qfrom li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* C1: Standings tabs per class and per cup */
.rs-st-tabs { margin: 0 0 10px; }

/* The league owner guide (hubGuide.js, the Guide view) */
.guide-toc { margin: 8px 0 0; padding-left: 1.1rem; columns: 2 18rem; column-gap: 24px; font-size: 13px; }
.guide-toc li { margin: 0 0 6px; break-inside: avoid; }
.guide-sec h2 { font-size: 18px; margin: 0 0 6px; }
.guide-steps { margin: 10px 0 0; padding-left: 1.2rem; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; }
.guide-shot { margin: 14px 0 0; }
.guide-shot img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.guide-shot figcaption { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.hint svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }
/* Settings > Notifications: the "A Discord webhook is set" check had no size and filled the card. */
#nt-card p > svg { width: 16px; height: 16px; vertical-align: -3px; }

/* A championship sent from the app (hubImport.js): the owner's review, atop Seasons */
.im-list { margin: 6px 0 0; padding-left: 1.2rem; display: grid; gap: 4px; font-size: 13px; }
.im-list li.im-skip { color: var(--text-dim); }
.im-list li .btn { margin-left: 8px; }

.ar-class { margin-top: 8px; }
.ar-class-name { font-size: 13px; }
.ar-cups { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; display: grid; gap: 4px; }

/* iRacing's points mode (#1525): the standings notes under a driver, and Review's champ points gate */
.rs-notes { color: var(--text-mute); font-size: 12px; margin-top: 2px; }
.rs-champ-gate { margin: 0 0 10px; }

/* C3b / C3c (hubBranding.js): the Branding card's preview and the embed designer */
.bd-preview { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 10px; border-left: 5px solid; min-height: 72px; }
.bd-logo { width: 52px; height: 52px; object-fit: contain; flex: none; }
.bd-nologo { display: grid; place-items: center; border: 1px dashed; border-radius: 8px; font-size: 10px; font-weight: 700; opacity: 0.8; }
.bd-big { font-weight: 800; font-size: 20px; letter-spacing: 0.02em; }
.bd-small { font-size: 12px; font-weight: 600; }
.bd-colour input[type="color"] { width: 40px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.em-grid { display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
#em-card textarea.mono { font-size: 12px; width: 100%; }

/* C2 stewarding: the driver's reports (My league) and the hub's Stewards queue */
.ml-reports, .st-list, .st-pub { list-style: none; padding: 0; margin: 0; }
.ml-reports > li { padding: 10px 0; border-top: 1px solid var(--line); }
.ml-reports > li:first-child { border-top: 0; padding-top: 0; }
.st-list > li + li { margin-top: 10px; }
.st-pub > li + li { margin-top: 8px; }
.st-decision { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); }
.ml-cars-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; }

/* A round's sessions (Caterham, 25 Oct): the round dialog's editor and the schedule's line */
.rs-ss { display: grid; gap: 6px; }
.rs-ss-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.rs-ss-row > select { flex: 0 1 140px; min-width: 110px; }
.rs-ss-row > input:not([type="hidden"]) { flex: 1 1 160px; min-width: 0; }
.rs-ss-row > .check { margin-right: auto; }
.rs-ss-line { font-size: 12px; margin-top: 2px; }

/* Branding plan WP4 (hubBrand.js): the league's logo in the header, the Logos and Sponsors cards, and the public page
   preview. A logo with no transparency sits on a white plate on dark (.bb-plate: CSS, never baked into the image). */
.hub-logo { display: inline-flex; align-items: center; height: 30px; max-width: 120px; padding: 0; border-radius: 6px; flex: none; }
.hub-logo img { max-height: 30px; max-width: 120px; object-fit: contain; display: block; }
.hub-logo.bb-plate { background: #fff; padding: 3px 6px; }
@media (max-width: 560px) { .hub-logo { max-width: 72px; } .hub-logo img { max-width: 72px; max-height: 24px; } }
.bb-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 8px; }
.bb-slot { display: grid; gap: 6px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.bb-slot .hint, .bb-slot .notice { margin: 0; }
.bb-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bb-sw { display: grid; place-items: center; height: 96px; border-radius: 8px; padding: 10px; overflow: hidden; }
.bb-dark { background: #0c1016; border: 1px solid var(--line); }
.bb-light { background: #f4f6fa; border: 1px solid #d7dce4; }
.bb-empty { font-size: 12px; color: var(--text-mute); }
.bb-light.bb-empty { color: #5b6573; }
.bb-img { display: inline-grid; place-items: center; max-width: 100%; max-height: 100%; border-radius: 6px; }
.bb-img img { display: block; max-width: 100%; max-height: 72px; object-fit: contain; }
.bb-plate { background: #fff; padding: 6px 8px; }
.bb-tier h3 { font-size: 14px; margin: 14px 0 8px; }
.bb-sps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bb-sp { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.bb-sp.dim { opacity: 0.6; }
.bb-mini { width: 84px; height: 40px; flex: none; display: grid; place-items: center; background: #0c1016; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; }
.bb-mini img { max-height: 32px; max-width: 76px; }
.bb-mini.bb-plate { background: #fff; }
.bb-pl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
/* The public page preview: EDR's chrome in EDR's colours, the league's colours inside (publicPalette). */
.pp { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0c1016; color: #e8ecf2; font-size: 13px; }
.pp-chrome { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #07090c; color: #e8ecf2; font: 800 12px/1 var(--head); letter-spacing: 0.06em; }
.pp-chrome b { color: #f0f000; }
.pp-foot { font-weight: 600; letter-spacing: 0; color: #8a94a3; }
.pp-hero { display: flex; align-items: center; gap: 12px; padding: 16px 14px; border-bottom: 4px solid; flex-wrap: wrap; }
.pp-logo img { max-height: 44px; max-width: 140px; }
.pp-name { font: 800 20px/1.1 var(--head); }
.pp-powered { font-size: 12px; opacity: 0.85; margin-top: 3px; }
.pp-btn { display: inline-block; padding: 7px 14px; border-radius: 8px; font-weight: 800; }
.pp-strip { list-style: none; margin: 0; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 0; border-bottom: 1px solid #1c2330; }
.pp-sp { display: flex; align-items: center; padding: 0 12px; min-height: 30px; border-left: 2px solid var(--pp-div); }
.pp-sp:first-child { border-left: 0; padding-left: 0; }
.pp-sp img { max-height: 28px; max-width: 96px; }
.pp-title img { max-height: 36px; }
.pp-partner img { max-height: 20px; }
.pp-none { margin: 0; padding: 10px 12px; color: #8a94a3; font-size: 12px; border-bottom: 1px solid #1c2330; }
.pp-body { padding: 12px; }
.pp-link { text-decoration: underline; font-weight: 700; cursor: default; }
.pp-dim { color: #8a94a3; }
.pp-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.pp-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #aab3c0; padding: 6px 4px; }
.pp-table thead tr { border-bottom: 2px solid; }
.pp-table td { padding: 6px 4px; border-bottom: 1px solid #1c2330; }
.pp-notes { margin: 10px 0 0; padding-left: 18px; color: var(--text-mute); font-size: 12px; }

/* The EDR support view (hubSupport.js): the banner and the "All leagues" list */
.sv-banner { position: sticky; top: 0; z-index: 5; margin: 0 0 14px; }
.sv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.sv-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.sv-open { flex: 1 1 240px; min-width: 0; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.sv-open b { display: block; }
.sv-open span { display: block; font-size: 12px; }
.sv-badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sv-page { font-size: 12px; }

/* Drivers' camera links (#1605): the driver page's "Your camera" card and the hub's round Cameras list */
.cam-rounds { list-style: none; padding: 0; margin: 12px 0 0; display: grid; }
.cam-round { padding: 10px 0; border-top: 1px solid var(--line); }
.cam-default { padding: 0 0 10px; }
.cam-default a, .cam-round a { font-size: 13px; }

/* Deleting a season (#1595): what goes with it */
.sd-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }

/* Season health (#1595) on the Overview */
.health-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.health-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.health-list li .grow { display: flex; gap: 8px; align-items: center; min-width: 200px; }
.health-list li svg { width: 16px; height: 16px; flex: none; color: var(--warn, #f5a524); }
.card.health { margin-bottom: 16px; }

/* Phone width (390 px pass, 26 Oct): the season's schedule keeps its row actions (Cameras, Edit, Cancel) in view while
   the wide table scrolls; a round's Cameras list stacks each driver as a card, its tools under the name. */
@media (max-width: 560px) {
  .rs-schedule th:last-child, .rs-schedule td:last-child { position: sticky; right: 0; background: var(--bg-1); box-shadow: -8px 0 8px -8px rgba(0, 0, 0, 0.6); }
  .rs-schedule td:last-child .row-flex { flex-direction: column; align-items: stretch; }
  [data-testid="cams"] table, [data-testid="cams"] tbody, [data-testid="cams"] tr, [data-testid="cams"] td { display: block; }
  [data-testid="cams"] thead { display: none; }
  [data-testid="cams"] tr[data-cam-cust] { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
  [data-testid="cams"] tr[data-cam-cust] > td { padding: 0; border: 0; }
  [data-testid="cams"] tr[data-cam-cust] > td:nth-child(4), [data-testid="cams"] tr[data-cam-cust] > td:nth-child(5) { grid-column: 1 / -1; }
  [data-testid="cams"] tr[data-cam-cust] > td:nth-child(4):has(> .dim:only-child) { display: none; }
  [data-testid="cams"] tr[data-cam-cust] > td:nth-child(5) .row-flex { justify-content: flex-start !important; }
  [data-testid="cams"] .cam-edit-row > td { padding: 8px 0; border: 0; }
}
