/* Shared site foundation. Domain matrices, state colors and behavior stay local. */
body.rs-site {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #202b38;
  --muted: #606e7b;
  --border: #dce2e7;
  --border-strong: #bfcad3;
  --chip: #f0f3f5;
  --hover: #edf2f5;
  --accent: #096b50;
  --accent-soft: #e5f2ec;
  --rs-accent-hover: #07543f;
  --rs-accent-ink: #07593f;
  --rs-accent-on: #ffffff;
  --green: #087c76;
  --green-soft: #e2f3ef;
  --danger: #c3394c;
  --amber: #936208;
  --soft: var(--accent-soft);
  --chip-border: var(--border);
  --table-hover: var(--hover);
  --good: var(--green);
  --warn: var(--amber);
  --bad: var(--danger);
  --focus: #096b5033;
  --shadow: 0 16px 48px #202b3826;
  --sidebar-bg: var(--card);
  --sidebar-link: var(--muted);
  --radius: 6px;
  --rs-gutter: 28px;
  --rs-control: 36px;
  --rs-space-1: 4px;
  --rs-space-2: 8px;
  --rs-space-3: 12px;
  --rs-space-4: 16px;
  --rs-space-6: 24px;
  --rs-space-8: 32px;
  --rs-body: 13px;
  --rs-small: 12px;
  --rs-label: 11px;
  --rs-title: 24px;
  color-scheme: light;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  font-size: var(--rs-body);
  line-height: 1.5;
  letter-spacing: 0;
}

body.rs-site[data-rs-accent="blue"] {
  --accent: #245cca;
  --accent-soft: #eaf0fc;
  --rs-accent-hover: #1b4ba9;
  --rs-accent-ink: #194aab;
  --focus: #245cca33;
}

.rs-site, .rs-site * { box-sizing: border-box; }
.rs-site :where(button, input, select, textarea) { font: inherit; letter-spacing: 0; }
.rs-site :where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--accent); }
.rs-site :where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.rs-site :where(button, input, select, textarea):disabled { cursor: not-allowed; }
.rs-site :where(dialog) { color: var(--text); }
.rs-site :where(dialog)::backdrop { background: #131c2c73; backdrop-filter: blur(2px); }
.rs-site :where(.app-main, .app-shell) { min-width: 0; }
.rs-site .app-shell .mobile-bar { height: 60px; padding-inline: var(--rs-gutter); background: var(--card); backdrop-filter: none; }
.rs-site .sidebar-toggle { width: 34px; height: 34px; flex-basis: 34px; border-radius: 5px; }
.rs-site .mobile-brand { min-height: 36px; border-radius: 5px; padding: 3px 9px; }
.rs-site .mobile-brand-logo { width: 150px; height: 30px; }
.rs-site .team-search-header { top: 12px; right: var(--rs-gutter); min-height: 36px; border-radius: 5px; }
.rs-site .app-sidebar { padding: 20px 12px; }
.rs-site .sidebar-link { min-height: 38px; font-size: 13px; font-weight: 500; border-radius: 5px; }
.rs-site .sidebar-link.active { color: var(--rs-accent-ink); background: var(--accent-soft); font-weight: 650; }
.rs-site .sidebar-brand { min-height: 54px; border-radius: 5px; margin-bottom: 20px; }
.rs-site .team-search-dialog { border-radius: 8px; }

.rs-site .rs-workspace { width: 100%; max-width: 1720px; margin-inline: auto; padding: 26px var(--rs-gutter) 40px; min-width: 0; }
.rs-site .rs-workspace-wide { max-width: none; }
.rs-site .rs-page-head { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.rs-site .rs-page-heading { min-width: 0; display: grid; align-content: start; gap: 5px; }
.rs-site .rs-page-context { display: block; margin: 0; font-size: var(--rs-label); line-height: 1.4; font-weight: 500; color: var(--muted); text-decoration: none; }
.rs-site .rs-page-title { font-size: var(--rs-title); line-height: 1.25; font-weight: 700; margin: 0; color: var(--text); overflow-wrap: anywhere; }
.rs-site #aw-updated.rs-page-meta { margin: 0; color: var(--muted); font-size: var(--rs-label); line-height: 1.5; }
.rs-site #aw-updated:empty { display: none; }

/* The same tab contract serves links, team navigation and client-side views. */
.rs-site .rs-tabs { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 22px; min-height: 44px; margin: 0; padding: 0; overflow-x: auto; border: 0; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.rs-site .rs-tabs > :is(a, button),
.rs-site .rs-tabs > a.team-primary-tab {
  display: inline-flex; justify-content: center; align-items: center; flex: none; gap: 7px;
  min-height: 44px; max-width: 100%; padding: 10px 2px; margin: 0;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: transparent; color: var(--muted); font: inherit; font-size: var(--rs-body);
  line-height: 20px; font-weight: 500; white-space: nowrap; cursor: pointer; text-decoration: none;
}
.rs-site .rs-tabs > :is(a, button):hover { color: var(--text); background: transparent; filter: none; text-decoration: none; }
.rs-site .rs-tabs > :is([aria-current="page"], [aria-selected="true"]),
.rs-site .rs-tabs > a.team-primary-tab[aria-current="page"] { color: var(--rs-accent-ink); background: transparent; border-bottom-color: var(--accent); font-weight: 700; }
.rs-site .rs-tabs > a.team-primary-tab { color: var(--rs-accent-ink); font-weight: 650; }
.rs-site .rs-tabs svg { width: 16px; height: 16px; flex: none; }
.rs-site :is(.aw-filters, .pt-toolbar, .bet-filters) { margin: 0; padding: 20px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.rs-site :is(.aw-filters label, .bet-field label, .pt-season label) { font-size: var(--rs-label); font-weight: 500; line-height: 1.5; color: var(--muted); }
.rs-site :is(.aw-filters label, .bet-field, .pt-season) { gap: 6px; }
.rs-site :is(.aw input, .aw select, .aw textarea, .bet-field input, .bet-field select, .participation select, .pt-search) {
  min-height: var(--rs-control); height: var(--rs-control); padding: 7px 10px; border: 1px solid var(--border-strong);
  border-radius: 5px; background: var(--card); color: var(--text); font-size: var(--rs-body); line-height: 20px;
}
.rs-site .aw textarea { height: auto; min-height: 100px; resize: vertical; }
.rs-site :is(.aw input, .aw select, .bet-field input, .bet-field select, .participation select):focus { border-color: var(--accent); }
.rs-site :is(.aw input, .bet-field input, .pt-search input)::placeholder { color: var(--muted); opacity: .8; }
.rs-site :is(.aw .aw-icon, .bet-icon, .pt-icon, .sidebar-toggle) { display: inline-flex; align-items: center; justify-content: center; width: var(--rs-control); height: var(--rs-control); min-height: var(--rs-control); flex: 0 0 var(--rs-control); padding: 0; border: 1px solid var(--border); border-radius: 5px; background: var(--card); color: var(--muted); }
.rs-site :is(.aw .aw-icon, .bet-icon, .pt-icon):not(:disabled):hover { color: var(--text); background: var(--hover); border-color: var(--border-strong); }
.rs-site :is(.aw .aw-icon, .bet-icon, .pt-icon) svg { width: 16px; height: 16px; }
.rs-site .app-shell .sidebar-toggle { flex-direction: column; align-items: stretch; gap: 4px; padding: 0 9px; color: var(--text); }
.rs-site .sidebar-toggle span { flex: none; min-height: 2px; }
.rs-site :is(.aw .aw-button, .aw-form-actions > button, .bet-primary, .pt-primary) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--rs-control); padding: 7px 12px; border-radius: 5px; font-size: var(--rs-body); line-height: 20px; font-weight: 600; }
.rs-site :is(.bet-primary, .pt-primary, .aw .aw-primary) { background: var(--accent); color: var(--rs-accent-on) !important; border-color: var(--accent); }
.rs-site :is(.bet-primary, .pt-primary, .aw .aw-primary):not(:disabled):hover { background: var(--rs-accent-hover); border-color: var(--rs-accent-hover); }
.rs-site :is(.bet-section-head, .aw-editor-grid h3) { margin-bottom: 16px; }
.rs-site :is(.bet-section-head h2, .bet-section-head h3, .aw-editor-grid h3) { font-size: 15px; line-height: 1.4; font-weight: 650; }
.rs-site :is(.aw-dialog, .aw-add-dialog, .aw-reminder-dialog, #bet-money-dialog, #bet-coupon-dialog) { border-radius: 8px; border-color: var(--border-strong); box-shadow: var(--shadow); }
.rs-site :is(.aw-dialog h2, .aw-add-dialog h2, .aw-reminder-heading h2, #bet-money-dialog h2, #bet-coupon-dialog h2) { font-size: 18px; line-height: 1.35; }

/* Keep operational state colors independent of the chosen brand accent. */
.rs-site .aw { --aw-red: #ac3c59; --aw-green: #087c76; --aw-departure: #936208; }
.rs-site .aw-viewbar { gap: 16px; padding: 0; min-height: 52px; align-items: center; }
.rs-site .aw-tabs { gap: 6px; align-self: stretch; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.rs-site .aw-tabs button { flex: none; min-height: 44px; margin: 4px 0; padding: 8px 12px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font-size: var(--rs-small); font-weight: 500; white-space: nowrap; }
.rs-site .aw-tabs button[aria-selected="true"], .rs-site .aw-tabs button[aria-selected="true"]:hover { color: var(--rs-accent-ink); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--accent-soft); box-shadow: none; font-weight: 700; }
.rs-site .aw-direction { font-size: var(--rs-label); gap: 8px !important; }
.rs-site .aw-direction select { width: 150px; min-height: 32px; height: 32px; font-size: var(--rs-small); padding-block: 4px; }
.rs-site .aw-filters { grid-template-columns: 140px repeat(4, minmax(100px, 1fr)) var(--rs-control); }
.rs-site .aw .aw-fixture { border-color: var(--border); }
.rs-site .aw .aw-team-panel { border-color: var(--border); }
.rs-site .aw .aw-fixture-head a { color: var(--text); }
.rs-site .aw .aw-team-heading h2 { font-size: 16px; }
.rs-site .aw .aw-remind-match[data-waiting="true"], .rs-site .aw .aw-remind-match[data-waiting="true"]:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.rs-site #aw-notice, .rs-site #aw-form-error { background: #fff5df; color: #80530b; border-color: #e8d7af; border-radius: 5px; }

.rs-site .participation { --pt-green: #087c76; --pt-green-bg: #e0f2ed; --pt-blue: #326cb0; --pt-blue-bg: #e6effa; --pt-absent: #a44f69; --pt-absent-bg: #f6e9ee; --pt-row-hover: var(--hover); }
.rs-site .pt-crest { width: 44px; height: 44px; }
.rs-site .pt-team { gap: 12px; }
.rs-site .pt-season { min-width: 230px; max-width: 360px; }
.rs-site .pt-toolbar { align-items: center; }
.rs-site .pt-search { width: 230px; padding: 0 10px; }
.rs-site .pt-search input { height: 32px; min-height: 0; padding: 0; font-size: var(--rs-body); border: 0; }
.rs-site .pt-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.rs-site .pt-window { height: var(--rs-control); border-color: var(--border-strong); border-radius: 5px; }
.rs-site .pt-window button { font-size: var(--rs-small); color: var(--muted); }
.rs-site .pt-window button[aria-pressed="true"] { background: var(--accent-soft); color: var(--rs-accent-ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.rs-site .pt-status { margin-block: 14px 8px; color: var(--muted); }
.rs-site .pt-model-status { margin: 8px 0 12px; }
.rs-site .pt-matrix-scroll { border-radius: 0; max-height: calc(100dvh - 340px); line-height: normal; }
.rs-site .pt-matrix-scroll thead .pt-stat-muted { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-site .pt-matrix-scroll thead th { background: var(--chip); }
.rs-site .pt-matrix-scroll thead th:is(.pt-player-col, .pt-rating-col, .pt-stat-col, .pt-total-col) { background: var(--chip); }
.rs-site .pt-model-status #pt-refresh-profiles { width: 28px; height: 28px; min-height: 28px; flex-basis: 28px; }
.rs-site .pt-player-wrap input, .rs-site .pt-choice input { accent-color: var(--accent); }

.rs-site .bet-filters { margin-bottom: 24px; }
.rs-site .bet-entry { padding-top: 24px; }
.rs-site #panel-entry > .bet-section-head { margin: 24px 0 0; }
.rs-site .bet-money-summary { margin-bottom: 24px; padding-bottom: 24px; }
.rs-site .bet-metrics { margin-bottom: 24px; padding-bottom: 24px; }
.rs-site .bet-metrics dt { font-size: var(--rs-label); margin-bottom: 8px; }
.rs-site .bet-metrics dd { font-size: 26px; font-weight: 650; line-height: 1.3; margin-bottom: 5px; }
.rs-site .bet-analysis-grid { gap: 28px; margin-bottom: 24px; }
.rs-site .bet-history { padding-top: 24px; }
.rs-site .bet-workspace .bet-table { font-size: var(--rs-small); background: var(--card); }
.rs-site .bet-workspace .bet-table th { color: var(--muted); font-size: var(--rs-label); padding: 10px 12px; background: var(--chip); }
.rs-site .bet-workspace .bet-table td { padding: 12px; }
.rs-site .bet-workspace .bet-table small { color: var(--muted); }
.rs-site .bet-history .bet-table :is(th:last-child, td.bet-action-cell) { background: var(--card); }
.rs-site :is(.bet-positive, .bet-result.win, .bet-result.half_win), .rs-site .bet-table td.bet-positive { color: var(--green); }
.rs-site :is(.bet-negative, .bet-result.loss, .bet-result.half_loss), .rs-site .bet-table td.bet-negative { color: var(--danger); }
.rs-site .bet-bar-fill.win, .rs-site .bet-bar-fill.half_win { background: var(--green); }
.rs-site .bet-bar-fill.loss, .rs-site .bet-bar-fill.half_loss { background: var(--danger); }
.rs-site .bet-breakdowns { gap: 28px; }
.rs-site .bet-coupon-total-row td { background: var(--chip); }

/* Legacy page adapters: names stay stable for existing scripts and deep links. */
.rs-site .app-main > :is(.wrapper, .country-catalog, .control-wrap, .audit-wrap, .health-wrap, .detail-wrap, .seasons-page, .future-admin, .radar-page, .radar-admin, .radar-workspace, .log-admin, .runs-admin, .status-admin, .analysis-wrap, .denmark-player-rating-page, .denmark-player-roles-page, .strength-page, .club-rating-page, .rss-workspace, .diary, .margin-page, .pk-page, .rd, .sources-page, .disciplinary) {
  width: 100%; max-width: 1720px; min-width: 0; margin-inline: auto; padding: 26px var(--rs-gutter) 40px;
}
.rs-site .app-main > :is(.match-page, .wrapper.wide, .denmark-player-rating-page, .denmark-player-roles-page, .strength-page, .club-rating-page) { max-width: none; }
.rs-site .app-main h1 { font-size: var(--rs-title); line-height: 1.25; font-weight: 700; letter-spacing: 0; overflow-wrap: anywhere; }
.rs-site :is(.subtitle, .analysis-subtitle, .control-subtitle, .audit-subtitle, .health-subtitle, .detail-subtitle, .future-subtitle, .radar-subtitle, .log-subtitle, .runs-subtitle, .status-subtitle, .rd-eyebrow, .pt-breadcrumb) { color: var(--muted); font-size: var(--rs-small); font-weight: 400; line-height: 1.5; }
.rs-site :is(.page-head, .catalog-heading, .margin-heading, .rd-heading, .pk-head, .analysis-head, .audit-head, .health-head, .detail-head, .future-head, .log-head, .runs-head, .status-head, .radar-header, .player-rating-header, .player-roles-header) { gap: 16px; margin-bottom: 20px; min-width: 0; }
.rs-site :is(.page-nav, .page-crumbs) { font-weight: 500; }
.rs-site .page-nav { margin-bottom: 16px; }
.rs-site .page-back { min-height: 36px; padding: 7px 11px; border-radius: 5px; font-weight: 500; }
.rs-site .page-crumb { min-height: 36px; max-width: min(260px, 100%); font-weight: 500; }
.rs-site .sidebar-sublink.active { background: var(--accent-soft); color: var(--rs-accent-ink); }

/* Unframe page sections; retain frames for repeated items, tables and dialogs. */
.rs-site .app-main .card,
.rs-site :is(.control-panel, .analysis-card, .health-section, .seasons-head, .radar-head, .country-catalog-header, .table-card, .runs-card, .match-section) {
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
  background: transparent; box-shadow: none; padding: 20px 0; min-width: 0;
}
.rs-site .app-main > .wrapper > .card:first-child { padding-top: 0; }
.rs-site .control-hero { padding-top: 0; }
.rs-site .match-page > .match-section:first-child { padding-top: 0; }
.rs-site :is(.summary-card, .summary-cell, .audit-card, .status-card) { border-radius: 5px; box-shadow: none; }
.rs-site :is(.summary-value, .status-value) { font-weight: 650; }
.rs-site :is(.summary-label, .status-label, .worker-label, .audit-label) { font-size: var(--rs-label); font-weight: 500; text-transform: none; }
.rs-site :is(.summary-detail, .status-detail) { font-weight: 400; }
.rs-site :is(.future-table, .analysis-table) th { font-weight: 500; text-transform: none; background: var(--chip); }
.rs-site :is(.card-head, .section-head) h2 { font-size: 16px; line-height: 1.4; font-weight: 650; }
.rs-site .app-main :is(.table-wrap, .table-scroll) { border-radius: 0; max-width: 100%; }

/* Page navigation uses one scrollable underline pattern, never wrapped pills. */
.rs-site :is(.tabs, .country-section-tabs, .strength-country-nav, .pt-nav, .match-view-tabs, .catalog-tabs, .dy-tabs, .rd-tabs) {
  display: flex; align-items: stretch; flex-wrap: nowrap; gap: 22px; min-height: 44px;
  max-width: 100%; padding: 0; margin-block: 0; overflow-x: auto;
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
  background: transparent; scrollbar-width: thin;
}
.rs-site :is(.tabs, .country-section-tabs, .strength-country-nav, .pt-nav, .match-view-tabs, .catalog-tabs, .dy-tabs, .rd-tabs) > :is(a, button) {
  display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 7px;
  max-width: none; min-height: 44px; margin: 0; padding: 10px 2px;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: transparent; color: var(--muted); box-shadow: none;
  font-size: var(--rs-body); font-weight: 500; line-height: 20px; white-space: nowrap; text-decoration: none;
}
.rs-site :is(.tabs, .country-section-tabs, .strength-country-nav, .pt-nav, .match-view-tabs, .catalog-tabs, .dy-tabs, .rd-tabs) > :is(a, button):hover { color: var(--text); background: transparent; text-decoration: none; }
.rs-site :is(.tabs, .country-section-tabs, .strength-country-nav, .pt-nav, .match-view-tabs, .catalog-tabs, .dy-tabs, .rd-tabs) > :is(.active, .is-active, [aria-current="page"], [aria-selected="true"], [aria-pressed="true"]) {
  color: var(--rs-accent-ink); background: transparent; border-bottom-color: var(--accent); font-weight: 700; box-shadow: none;
}
.rs-site .rd .rd-tabs > button[aria-selected="true"],
.rs-site .rd .rd-tabs > button[aria-selected="true"]:hover { color: var(--rs-accent-ink); background: transparent; border-bottom-color: var(--accent); }

.rs-site :is(.btn, .admin-btn, .analysis-btn, .audit-btn, .health-btn, .radar-btn, .catalog-browse, .season-start-submit, .pk-apply, .pk-clear, .mc-button) {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--rs-control); padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: 5px;
  background: var(--card); color: var(--text); font-size: var(--rs-body); line-height: 20px; font-weight: 500; text-decoration: none;
}
.rs-site :is(.btn, .admin-btn, .analysis-btn, .audit-btn, .health-btn, .radar-btn, .catalog-browse, .season-start-submit, .pk-clear, .mc-button):not(:disabled):hover { background: var(--hover); border-color: var(--border-strong); text-decoration: none; }
.rs-site :is(.btn-primary, .btn.primary, .admin-btn.primary, .radar-btn.primary, .pk-apply, .mc-primary) { background: var(--accent); color: var(--rs-accent-on); border-color: var(--accent); }
.rs-site :is(.btn-primary, .btn.primary, .admin-btn.primary, .radar-btn.primary, .pk-apply, .mc-primary):not(:disabled):hover { background: var(--rs-accent-hover); color: var(--rs-accent-on); border-color: var(--rs-accent-hover); }
.rs-site .mc-danger { color: var(--danger); border-color: var(--danger); }
.rs-site :is(.catalog-reset, .mc-icon, .rd .rd-icon, .source-icon) { width: var(--rs-control); height: var(--rs-control); min-height: var(--rs-control); border-radius: 5px; }
.rs-site .mc-reference { border-radius: 5px; }
.rs-site :is(.database-catalog, .country-catalog, .calendar-wrapper, .season-starts-page, .control-wrap, .audit-wrap, .health-wrap, .detail-wrap, .seasons-page, .future-admin, .radar-page, .radar-admin, .radar-workspace, .runs-admin, .analysis-wrap, .denmark-player-rating-page, .denmark-player-roles-page, .strength-page, .club-rating-page, .rss-workspace, .pk-page, .sources-page) :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
  min-height: var(--rs-control); border: 1px solid var(--border-strong); border-radius: 5px;
  background: var(--card); color: var(--text); font: inherit; font-size: var(--rs-body); padding: 7px 10px;
}
.rs-site :is(.database-catalog, .pk-page, .rss-workspace) label { font-size: var(--rs-label); color: var(--muted); font-weight: 500; }
.rs-site :is(.catalog-filters, .pk-filters, .rss-toolbar) { padding-block: 20px; gap: 12px; }
.rs-site .database-catalog .catalog-search-box input { min-height: var(--rs-control); padding: 7px 34px 7px 35px; }
.rs-site .catalog-search-box { min-height: var(--rs-control); border-radius: 5px; }
.rs-site .catalog-filters { top: 60px; }
.rs-site .catalog-countries { top: calc(76px + var(--catalog-toolbar-height)); }
.rs-site .country-catalog-tools { padding: 20px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.rs-site .country-division-card { border-radius: 5px; box-shadow: none; }
.rs-site .catalog-country-button[aria-pressed="true"] { color: var(--rs-accent-ink); background: var(--accent-soft); border-color: transparent; }
.rs-site .margin-toolbar { top: 60px; }
.rs-site .margin-page { max-width: 1280px; }
.rs-site .rd-toolbar { padding-block: 0 20px; }
.rs-site .rd-filters { flex-wrap: wrap; }
.rs-site .rd-tabs { border-bottom: 0; }
.rs-site .rd-search input { border-color: var(--border-strong); }
.rs-site .dy-tabs button[aria-pressed="true"] { color: var(--rs-accent-ink); }
.rs-site .dy-row.active { border-left-color: var(--accent); }
.rs-site :is(.dy-tag, .pk-clv.positive) { color: var(--green); }
.rs-site .pk-clv.negative { color: var(--danger); }
.rs-site .sources-page .pt-header { margin-bottom: 20px; }
.rs-site .source-row { border-color: var(--border); }
.rs-site :is(.source-row input, .source-row select) { min-width: 0; }
.rs-site :is(.source-row label, .sources-footer) { font-size: var(--rs-small); }
.rs-site :is(dialog, .note-modal .dialog) { border-color: var(--border-strong); border-radius: 8px; background: var(--card); box-shadow: var(--shadow); }
.rs-site .match-page :is(.page-back, .match-pill, .match-view-tab) { border-radius: 5px; }
.rs-site .match-page .match-view-tab { border-radius: 0; }
.rs-site .match-sidebar-toggle { border-radius: 5px; }
.rs-site .match-page .team-name { font-size: 20px; line-height: 1.3; font-weight: 700; }
.rs-site .match-page .score-line { font-size: 28px; }
.rs-site .match-page .match-pill.card-status.ready { color: var(--green); background: var(--green-soft); border-color: var(--green); }
.rs-site :is(.hero-left, .hero-right) { min-width: 0; }
.rs-site :is(.kpi, .kv-item, .player-photo, .player-strength-strip, .coach-trust-strip, .team-match-list, .dq-card, .chart-canvas) { border-radius: 5px; }
.rs-site .kpi { box-shadow: none; }
.rs-site :is(.kpi .label, .kv-label) { font-weight: 500; }
.rs-site .kv-value { font-weight: 600; }
.rs-site :is(.player-photo, .team-header .team-logo) { background: var(--chip); border-color: var(--border); border-radius: 5px; box-shadow: none; }
.rs-site .season-select { height: var(--rs-control); min-height: var(--rs-control); border-radius: 5px; font-size: var(--rs-body); font-weight: 500; }

/* Standalone login and local lineup tool share tokens without adding website navigation. */
body.rs-auth { display: grid; place-items: center; min-height: 100dvh; margin: 0; padding: 24px 16px; }
.rs-auth main { width: min(380px, 100%); padding: 28px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); box-shadow: none; }
.rs-auth .login-brand-logo { display: block; width: 100%; height: 54px; padding: 8px; object-fit: contain; border-radius: 5px; background: #0f172a; }
.rs-auth h1 { margin: 0 0 16px; font-size: 24px; }
.rs-auth p { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.rs-auth label { display: block; margin: 16px 0 6px; font-size: 12px; font-weight: 500; }
.rs-auth input:not([type="hidden"]) { box-sizing: border-box; width: 100%; height: 40px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 5px; color: var(--text); background: var(--card); }
.rs-auth button { width: 100%; min-height: 40px; margin-top: 24px; border: 0; border-radius: 5px; background: var(--accent); color: var(--rs-accent-on); cursor: pointer; font-weight: 600; }
.rs-auth button:hover { background: var(--rs-accent-hover); }
.rs-auth .error { margin-top: 16px; color: var(--danger); font-size: 13px; }
.rs-lineup :is(header, table, input[type="file"], td input, td select) { background: var(--card); color: var(--text); border-color: var(--border); }
.rs-lineup header { padding-inline: var(--rs-gutter); }
.rs-lineup header strong { color: var(--text); }
.rs-lineup main { padding: 26px var(--rs-gutter); }
.rs-lineup :is(button, th, td, .identity, #result) { border-color: var(--border); }
.rs-lineup button { color: var(--text); background: var(--card); border-radius: 5px; }
.rs-lineup button:hover { background: var(--hover); }
.rs-lineup :is(#confirm, #recognize) { background: var(--accent); border-color: var(--accent); color: var(--rs-accent-on); }
.rs-lineup :is(th, #model, td small) { color: var(--muted); }
.rs-lineup th { background: var(--chip); }

/* Local review controls are never supplied by production route contexts. */
.rs-previewbar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 8px var(--rs-gutter); background: var(--card); border-bottom: 1px solid var(--border); min-height: 48px; }
.rs-preview-label { font-size: 10px; font-weight: 700; color: var(--muted); }
.rs-preview-pages { display: flex; flex-wrap: wrap; gap: 4px; }
.rs-preview-pages a { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; color: var(--muted); border-radius: 4px; font-size: 12px; text-decoration: none; }
.rs-preview-pages a[aria-current="page"] { color: var(--text); background: var(--chip); font-weight: 650; }
.rs-preview-swatches { display: flex; gap: 4px; margin-left: auto; }
.rs-swatch { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 9px; font-size: 11px; color: var(--muted); border: 1px solid transparent; border-radius: 4px; text-decoration: none; }
.rs-swatch[aria-current="true"] { border-color: var(--border-strong); color: var(--text); }
.rs-swatch > span { display: block; width: 12px; height: 12px; border-radius: 3px; background: #245cca; }
.rs-swatch-green > span { background: #096b50; }

@media (max-width: 1050px) {
  .rs-site .aw-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rs-site .pt-window { margin-left: 0; }
  .rs-site .pt-actions { margin-left: auto; }
  .rs-site .pt-search { flex: 1 1 180px; }
}
@media (max-width: 820px) {
  body.rs-site { --rs-gutter: 20px; }
  .rs-site .rs-page-head { align-items: flex-start; }
  .rs-site .pt-header { flex-wrap: wrap; }
  .rs-site .pt-season { min-width: 0; width: 100%; max-width: 360px; }
  .rs-site .bet-analysis-grid { gap: 24px; }
  .rs-site .rs-tabs { gap: 20px; }
}
@media (max-width: 600px) {
  body.rs-site { --rs-gutter: 16px; }
  .rs-site .rs-workspace { padding-top: 20px; padding-bottom: 28px; }
  .rs-site .rs-page-head { margin-bottom: 16px; }
  .rs-site .rs-tabs { gap: 16px; }
  .rs-site :is(.aw-filters, .pt-toolbar, .bet-filters) { padding: 16px 0; gap: 10px; }
  .rs-site .aw-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-site .aw-viewbar { flex-wrap: wrap; gap: 8px; padding: 8px 0; }
  .rs-site .aw-tabs { width: 100%; }
  .rs-site .aw-tabs button { padding-inline: 8px; }
  .rs-site .aw-direction { margin-left: auto; }
  .rs-site .aw-calculation-actions { flex: none; }
  .rs-site .aw-calculation-actions .aw-button { padding-inline: 8px; }
  .rs-site .pt-toolbar > select { flex: 1 1 130px; min-width: 0; }
  .rs-site .pt-toolbar > .pt-search { width: 100%; flex-basis: 100%; }
  .rs-site .pt-season { max-width: none; }
  .rs-site .pt-legend { gap: 7px 12px; }
  .rs-site .pt-matrix-scroll { max-height: 60dvh; }
  .rs-site .bet-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-site .app-main > :is(.wrapper, .country-catalog, .control-wrap, .audit-wrap, .health-wrap, .detail-wrap, .seasons-page, .future-admin, .radar-page, .radar-admin, .radar-workspace, .log-admin, .runs-admin, .status-admin, .analysis-wrap, .denmark-player-rating-page, .denmark-player-roles-page, .strength-page, .club-rating-page, .rss-workspace, .diary, .margin-page, .pk-page, .rd, .sources-page, .disciplinary) { padding-top: 20px; padding-bottom: 28px; }
  .rs-site :is(.tabs, .country-section-tabs, .strength-country-nav, .pt-nav, .match-view-tabs, .catalog-tabs, .dy-tabs, .rd-tabs) { gap: 16px; }
  .rs-site :is(.catalog-heading, .margin-heading, .rd-heading, .pk-head) { flex-wrap: wrap; }
  .rs-site :is(.rd-filters, .rd-search, .rd-search input) { width: 100%; }
  .rs-site .control-hero { grid-template-columns: minmax(0, 1fr); }
  .rs-site .match-page .team-name { font-size: 16px; }
  .rs-site .match-page .score-line { font-size: 24px; }
  .rs-lineup .inputs label { min-width: 0; flex-basis: 100%; }
  .rs-previewbar { gap: 6px; padding-block: 8px; }
  .rs-preview-label { display: none; }
  .rs-preview-pages { width: 100%; justify-content: center; }
  .rs-preview-swatches { margin-inline: auto; }
}
@media (prefers-color-scheme: dark) {
  body.rs-site {
    --bg: #14191e; --card: #1c2329; --text: #e7edf2; --muted: #aab7c2;
    --border: #35414b; --border-strong: #586875; --chip: #232d35; --hover: #2a353e;
    --accent: #77d3ab; --accent-soft: #203e32; --rs-accent-hover: #9ce4c5;
    --rs-accent-ink: #a2e5c4; --rs-accent-on: #103b2b; --focus: #77d3ab44;
    --green: #77d4c7; --green-soft: #1b3b35; --danger: #ff9ca9; --amber: #e6be74;
    --shadow: 0 16px 48px #0008; color-scheme: dark;
  }
  body.rs-site[data-rs-accent="blue"] {
    --accent: #96bbff; --accent-soft: #263952; --rs-accent-hover: #b2cdff;
    --rs-accent-ink: #b1cdff; --rs-accent-on: #142c52; --focus: #96bbff44;
  }
  .rs-site .aw { --aw-red: #f2a2b9; --aw-green: #77d4c7; --aw-departure: #e6be74; }
  .rs-site .participation { --pt-green: #77d4c7; --pt-green-bg: #1b3b35; --pt-blue: #9dc5ef; --pt-blue-bg: #223b50; --pt-absent: #f2a2b9; --pt-absent-bg: #422e3a; }
  .rs-site #aw-notice, .rs-site #aw-form-error { background: #382f1e; color: #ecd096; border-color: #6a5735; }
}
@media (prefers-reduced-motion: reduce) {
  .rs-site *, .rs-site *::before, .rs-site *::after { scroll-behavior: auto; transition-duration: 0s; animation-duration: 0s; }
}
