/*
 * Private scouting workspace — local stylesheet, no CDN, no web font.
 *
 * Desktop-first and information-dense, because the job is reading tables of
 * evidence; still usable down to a phone. System font stack only, so nothing is
 * ever fetched to render a page.
 */

:root {
  --bg: #0f1216;
  --bg-raised: #161b22;
  --bg-sunken: #0b0e12;
  --panel: #171d26;
  --line: #232c38;
  --line-soft: #1c232d;

  --text: #e6edf3;
  --text-dim: #9aa7b4;
  --text-faint: #6b7885;

  --accent: #4f8cff;
  --accent-dim: #2f5fb8;
  --accent-soft: rgba(79, 140, 255, 0.12);

  --gold: #e0a33c;
  --green: #3fb950;
  --red: #f0616d;
  --amber: #d29922;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --mono: "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.92em; }

/* --------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 18, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 16px; height: 16px; border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.brand__mark--lg { width: 30px; height: 30px; border-radius: 8px; }
/* The short product name leads; the full name sits beside it, quieter, and
   steps out of the way on a narrow viewport rather than wrapping the header. */
.brand__name {
  color: var(--text-faint); font-size: 12px; font-weight: 500;
  border-left: 1px solid var(--line-soft); padding-left: 9px;
}
@media (max-width: 900px) { .brand__name { display: none; } }
.brand__badge {
  font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-faint); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 999px; font-weight: 600;
}
.nav { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.nav__link {
  color: var(--text-dim); padding: 6px 11px; border-radius: var(--radius-sm);
  font-weight: 550;
}
.nav__link:hover { background: var(--bg-raised); color: var(--text); text-decoration: none; }
.topbar__user { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.user-chip__name { font-weight: 600; font-size: 13px; }
.user-chip__role { font-size: 11px; color: var(--text-faint); }

/* ----------------------------------------------------------------- page */

.page { max-width: 1560px; margin: 0 auto; padding: 26px 20px 60px; }
.page__title { font-size: 22px; margin: 0 0 16px; letter-spacing: -0.01em; }

.crumbs { color: var(--text-faint); font-size: 12.5px; margin-bottom: 12px; }
.crumbs span { margin: 0 6px; }

.footer {
  max-width: 1560px; margin: 0 auto; padding: 20px;
  color: var(--text-faint); font-size: 12px; border-top: 1px solid var(--line-soft);
}
.footer p { margin: 0 0 4px; }
.footer__brand { color: var(--text-dim); }
.footer__brand strong { color: var(--text); letter-spacing: 0.02em; }
.footer__meta { margin-bottom: 10px; }
.footer__note { font-size: 11.5px; line-height: 1.55; }

/* ----------------------------------------------------------------- hero */

.hero {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end;
  justify-content: space-between; margin-bottom: 26px;
}
.hero__eyebrow {
  color: var(--text-faint); font-size: 11px; letter-spacing: 0.11em;
  text-transform: uppercase; font-weight: 600; margin: 0 0 6px;
}
.hero__title { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.02em; }
.hero__sub { color: var(--text-dim); margin: 0; max-width: 60ch; }

.searchbar { display: flex; gap: 8px; }
.searchbar--hero { min-width: 380px; }
.searchbar__input {
  flex: 1; background: var(--bg-sunken); border: 1px solid var(--line);
  color: var(--text); padding: 9px 13px; border-radius: var(--radius-sm);
  font-size: 14px; min-width: 220px;
}
.searchbar__input:focus { outline: 2px solid var(--accent-dim); border-color: var(--accent-dim); }

/* ---------------------------------------------------------------- cards */

.cards {
  display: grid; gap: 14px; margin-bottom: 26px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; display: flex;
  flex-direction: column; gap: 10px;
}
.card--live { border-color: var(--line); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__title { font-size: 15px; margin: 0; }
.card__body { color: var(--text-dim); margin: 0; flex: 1; font-size: 13px; }

.pool-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.pool-list__item { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pool-list__name { font-size: 13px; }

/* ---------------------------------------------------------------- pills */

.pill {
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  white-space: nowrap;
}
.pill--live { background: rgba(63, 185, 80, 0.14); color: var(--green); }
.pill--soon { background: rgba(210, 153, 34, 0.13); color: var(--amber); }
.pill--off  { background: rgba(240, 97, 109, 0.13); color: var(--red); }
.pill--kind { background: var(--accent-soft); color: var(--accent); }

/* --------------------------------------------------------------- panels */

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
}
.panel--flush { background: transparent; border: none; padding: 0; }
.panel--tight { padding: 12px 16px; }
.panel__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.panel__title { font-size: 15px; margin: 0; letter-spacing: -0.005em; }
.panel__count { color: var(--text-faint); font-size: 12px; }
.panel__note { color: var(--text-dim); font-size: 12.5px; margin: 0 0 12px; max-width: 92ch; }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); }

/* ---------------------------------------------------------------- scope */

.scope {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
  align-items: center; background: linear-gradient(180deg, var(--bg-raised), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 14px;
}
.scope__subject { font-size: 21px; margin: 0 0 9px; letter-spacing: -0.02em; }
.scope__facets { display: flex; flex-wrap: wrap; gap: 8px; }
.facet {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: var(--bg-sunken); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
}
.facet--strong { border-color: var(--accent-dim); background: var(--accent-soft); }
.facet__k { color: var(--text-faint); text-transform: uppercase; font-size: 10px; letter-spacing: 0.06em; }
.facet__v { font-weight: 600; }
.scope__record { display: flex; gap: 26px; }
.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat__value { font-size: 25px; font-weight: 680; letter-spacing: -0.02em; }
.stat__value--muted { color: var(--text-faint); }
.stat__label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }

.scope-audit {
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between;
  font-size: 12.5px; margin-bottom: 8px;
}
.details summary {
  cursor: pointer; color: var(--text-dim); font-size: 12.5px;
  padding: 4px 0; user-select: none;
}
.details summary:hover { color: var(--text); }
.kv { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.kv li {
  display: flex; justify-content: space-between; gap: 20px; font-size: 12.5px;
  padding: 3px 0; border-bottom: 1px dashed var(--line-soft);
}
.kv li span:first-child { color: var(--text-dim); }
/* The exclusion breakdown shown on an empty Player Scout result. Same rows as
   the populated page's "Scope & exclusions" list, constrained so they read as
   a caption inside the centred empty state rather than a full-width table. */
.kv--empty { max-width: 460px; margin: 12px auto 4px; text-align: left; }

/* ------------------------------------------------------------- toolbars */

.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  justify-content: space-between; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px;
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.generate { display: flex; align-items: flex-end; }
.soon-note {
  align-self: center; font-size: 11px; color: var(--amber);
  border: 1px dashed rgba(210, 153, 34, 0.4); padding: 3px 8px; border-radius: 999px;
}

/* --------------------------------------------------------------- fields */

.form { display: flex; flex-direction: column; gap: 12px; }
.form--row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field--inline { min-width: 130px; }
.field__label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.field__input {
  background: var(--bg-sunken); border: 1px solid var(--line); color: var(--text);
  padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13px;
  font-family: inherit;
}
.field__input--sm { padding: 4px 7px; font-size: 12px; }
.field__input:focus { outline: 2px solid var(--accent-dim); border-color: var(--accent-dim); }

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--bg-raised); border: 1px solid var(--line); color: var(--text);
  padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn:hover { background: var(--line-soft); text-decoration: none; border-color: var(--line); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #06121f; }
.btn--primary:hover { background: #6ba0ff; border-color: #6ba0ff; }
.btn--accent { background: var(--gold); border-color: var(--gold); color: #1a1204; }
.btn--accent:hover { background: #edb254; border-color: #edb254; }
.btn--ghost { background: transparent; }
.btn--quiet { background: transparent; color: var(--text-dim); }
.btn--sm { padding: 5px 10px; font-size: 12px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.inline-form { display: inline-flex; gap: 5px; align-items: center; margin: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* --------------------------------------------------------------- tables */

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint); font-weight: 650;
  padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.022); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .right { text-align: right; }
.table .strong { font-weight: 650; }
.row--muted td { color: var(--text-faint); }
.nowrap { white-space: nowrap; }
.muted { color: var(--text-faint); }
.small { font-size: 11.5px; }
.table-scroll { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }

.fmt { color: var(--accent); font-weight: 600; }
.acct {
  background: var(--bg-sunken); padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--line-soft);
}
.acct--opp { color: var(--text-dim); }

/* usage bars */
.bar {
  display: inline-block; height: 4px; width: 42px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--bar), var(--line) var(--bar));
  vertical-align: middle; margin-right: 6px;
}
.bar__label { font-variant-numeric: tabular-nums; }

/* results */
.res { font-weight: 650; }
.res--win { color: var(--green); }
.res--loss { color: var(--red); }
.res--tie, .res--unknown { color: var(--text-faint); }

/* event tiers */
.event { font-size: 12.5px; }
.event--confirmed_match { color: var(--text); font-weight: 550; }
.event--source_context { color: var(--text-dim); font-style: italic; }
.event--generic { color: var(--text-faint); }

/* ------------------------------------------------------------ minisprite */

.mon { display: inline-flex; align-items: center; gap: 6px; }
.mon__icon { width: 34px; height: 20px; image-rendering: pixelated; flex: none; }
.mon--compact .mon__name { display: none; }
.mon--compact { margin-right: 1px; }
.team { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 1px; }
/* A species with no mapped sprite still shows its exact text inside a team. */
.mon--compact:not(:has(.mon__icon)) .mon__name {
  display: inline; font-size: 11px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; margin-right: 3px;
}

/* --------------------------------------------------------------- search */

.result-list { display: flex; flex-direction: column; gap: 8px; }
.result {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  align-items: center; background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 14px; color: var(--text);
}
.result:hover { border-color: var(--accent-dim); text-decoration: none; background: var(--bg-sunken); }
.result__main { display: flex; flex-direction: column; gap: 2px; }
.result__name { font-weight: 650; font-size: 14.5px; }
.result__meta { font-size: 12px; color: var(--text-faint); }
.result__accounts { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.tag {
  font-family: var(--mono); font-size: 11px; background: var(--bg-sunken);
  border: 1px solid var(--line); padding: 2px 7px; border-radius: 999px;
  color: var(--text-dim);
}
.tag--more { color: var(--text-faint); }

/* -------------------------------------------------------------- subject */

.subject { margin-bottom: 16px; }
.subject__head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.subject__name { font-size: 25px; margin: 0; letter-spacing: -0.02em; }

.identity {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.identity__title { font-size: 13px; margin: 0 0 7px; color: var(--text-dim); }
.identity__note { font-size: 12.5px; color: var(--text-dim); margin: 0 0 10px; max-width: 92ch; }
.identity__note--warn { color: var(--amber); }
.identity__pending { font-size: 12px; color: var(--text-faint); margin: 9px 0 0; }
.account-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.account {
  display: inline-flex; align-items: center; gap: 7px; background: var(--bg-sunken);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px;
}
.account__name { font-weight: 600; }
.account__scope { font-size: 10.5px; color: var(--text-faint); }
.account__scope--tournament { color: var(--gold); }

/* replay pools */
.pool-picker { display: flex; flex-wrap: wrap; gap: 9px; }
.pool {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-raised); color: var(--text);
}
.pool--active { border-color: var(--accent); background: var(--accent-soft); }
.pool--disabled { opacity: 0.55; cursor: not-allowed; }
.pool:hover:not(.pool--disabled) { text-decoration: none; border-color: var(--accent-dim); }
.pool__name { font-weight: 600; font-size: 13px; }

/* ----------------------------------------------------------------- sets */

.sets { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.set { background: var(--bg-sunken); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; }
.set__head { margin-bottom: 8px; font-weight: 650; }
.set__group { margin-bottom: 7px; }
.set__label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
.set__facts { list-style: none; margin: 3px 0 0; padding: 0; }
.set__facts li { display: flex; gap: 7px; align-items: baseline; font-size: 12.5px; padding: 1px 0; }
.set__fact { flex: 1; }
.set__count { font-variant-numeric: tabular-nums; color: var(--text-dim); }
.set__note { font-size: 10.5px; color: var(--amber); }

.team-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.team-list__item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--bg-sunken); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 6px 10px;
}
.team-list__count { font-variant-numeric: tabular-nums; color: var(--text-dim); font-weight: 600; }

/* --------------------------------------------------------------- alerts */

.alert {
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 12px;
  font-size: 12.5px; border: 1px solid;
}
.alert--info  { background: var(--accent-soft); border-color: var(--accent-dim); color: #bcd4ff; }
.alert--warn  { background: rgba(210, 153, 34, 0.1); border-color: rgba(210, 153, 34, 0.4); color: #f0cf8b; }
.alert--error { background: rgba(240, 97, 109, 0.1); border-color: rgba(240, 97, 109, 0.4); color: #ffb3ba; }
.alert--ok    { background: rgba(63, 185, 80, 0.1); border-color: rgba(63, 185, 80, 0.4); color: #a6e6ae; }
.warn { color: var(--amber); font-size: 12px; margin: 6px 0 0; }

.hint { color: var(--text-faint); font-size: 11.5px; margin: 8px 0 0; max-width: 100ch; }
.hint--block { margin-bottom: 16px; }

/* ---------------------------------------------------------------- empty */

.empty {
  text-align: center; padding: 40px 20px; color: var(--text-dim);
  background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty--sm { padding: 20px; font-size: 12.5px; }
.empty--state { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 640px; margin: 40px auto; }
.empty h1, .empty h2 { margin: 0; font-size: 18px; color: var(--text); }

/* --------------------------------------------------------------- login */

.login { display: flex; align-items: center; justify-content: center; min-height: 78vh; }
.login__card {
  width: 100%; max-width: 380px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px;
  box-shadow: var(--shadow);
}
.login__brand { text-align: center; margin-bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.login__brand h1 { font-size: 26px; margin: 0; letter-spacing: 0.04em; font-weight: 700; }
.login__name { color: var(--text-dim); font-size: 13.5px; margin: 0; }
.login__sub { color: var(--text-faint); font-size: 12.5px; margin: 0; }
.login__by { color: var(--text-faint); font-size: 11.5px; margin: 2px 0 0; letter-spacing: 0.04em; }
.login__note { color: var(--text-faint); font-size: 11.5px; margin: 18px 0 0; text-align: center; line-height: 1.5; }

/* -------------------------------------------------------------- roadmap */

.roadmap { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.roadmap__item { background: var(--bg-sunken); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.roadmap__head { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 6px; }
.roadmap__title { font-size: 13.5px; margin: 0; }
.roadmap__body { font-size: 12px; color: var(--text-dim); margin: 0; }

.roles { display: grid; gap: 10px; margin: 16px 0 0; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.roles__item dt { font-weight: 650; font-size: 12.5px; margin-bottom: 3px; }
.roles__item dd { margin: 0; font-size: 12px; color: var(--text-dim); }

/* --------------------------------------------------------- small screens */

@media (max-width: 860px) {
  .topbar__inner { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .page { padding: 18px 14px 40px; }
  .grid--2 { grid-template-columns: 1fr; }
  .searchbar--hero { min-width: 0; width: 100%; }
  .scope { flex-direction: column; align-items: flex-start; }
  .scope__record { gap: 20px; }
  .stat { align-items: flex-start; }
  .table-scroll { margin: 0 -14px; padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* --- Batch Scout ------------------------------------------------------- */
.batch-form {
  display: grid;
  gap: 0.9rem;
}
.batch-table td {
  vertical-align: middle;
}
.batch-table .field__input {
  width: 100%;
}
.batch-table td:first-child {
  width: 3rem;
}
.batch-result {
  display: grid;
  gap: 0.9rem;
}

/* ------------------------------------------------- accessibility + paging */

/*
 * Added by CORE-WEBSITE-COMPLETION-1. Everything below is presentation for
 * behaviour that already exists server-side: a visible focus ring, a skip link,
 * a screen-reader-only class for table captions, the active navigation state
 * (which `aria-current` already carries semantically) and the replay-history
 * pager. No layout rule here changes which rows a page contains.
 */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* One visible focus treatment for every interactive control. Keyboard users
   could previously lose the caret entirely on links, buttons and table rows. */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.nav__link--active {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent-dim);
}
.nav__link--active:hover { background: var(--accent-soft); }

.btn--disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.pager__status {
  margin: 0 6px;
  color: var(--text-dim);
  font-size: 12.5px;
}

.empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

/* Long corpus text -- player names, tournament and stage labels -- must wrap
   rather than force the whole table wider than its scroll container. */
.table td, .table th { overflow-wrap: anywhere; }
.table .nowrap { overflow-wrap: normal; }

@media (max-width: 860px) {
  .pager { justify-content: center; }
  .form--row { flex-direction: column; align-items: stretch; }
  .row-actions { flex-wrap: wrap; }
}
