:root {
  --bg: #0b1724;
  --panel: #162232;
  --panel2: #102030;
  --text: #eee;
  --muted: #bbb;
  --line: #24364f;
  --link: #9dc3ff;
  --primary: #2b7cff;
  --primary2: #1b5cbd;
  --good: #28a745;
  --bad: #c0392b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Collapsible explain blocks
   Some page-scoped styles hide the browser's default <summary> marker for
   consistent alignment (e.g., via list-style/::-webkit-details-marker).
   Add an explicit triangle so users can see the section is collapsible. */
details.explain > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none; /* hide native marker (Firefox/Chromium) */
}

details.explain > summary::-webkit-details-marker {
  display: none; /* hide native marker (Safari/Chrome) */
}

details.explain > summary::before {
  content: '▸';
  display: inline-block;
  width: 1em;
  color: var(--muted);
  flex: 0 0 auto;
}

details.explain[open] > summary::before {
  content: '▾';
}

/* Layout */
.page, .container {
  max-width: 1200px;
  margin: 18px auto;
  padding: 0 14px;
}

.card {
  background: var(--panel);
  border-radius: 8px;
  padding: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.muted { color: var(--muted); }

.tiny {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--panel2);
  border: 1px solid #334;
  font-size: 12px;
  color: var(--muted);
}
.badge.good { border-color: rgba(40,167,69,.55); color: #bff2c9; }
.badge.bad { border-color: rgba(192,57,43,.55); color: #ffd0cc; }
.badge.warn { border-color: rgba(255,193,7,.55); color: #ffe8a3; }
.badge.secondary { border-color: rgba(120,120,140,.55); color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block;
  border-radius: 6px;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
}
.btn:hover { background: var(--primary2); }
.btn.secondary { background: #243248; }
.btn.secondary:hover { background: #324363; }
.btn.good { background: var(--good); }
.btn.good:hover { filter: brightness(0.95); }
.btn.bad { background: var(--bad); }
.btn.bad:hover { filter: brightness(0.95); }
.btn.small { padding: 6px 10px; font-size: 12px; }
.btn:disabled { opacity: .7; cursor: not-allowed; }

input[type=text], input[type=number], input[type=password], select {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #555;
  background: var(--bg);
  color: var(--text);
}

/* Top Nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 23, 36, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.brand {
  font-weight: 800;
  letter-spacing: .2px;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}

.navlinks a.active {
  text-decoration: none;
  font-weight: 700;
  color: #fff;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Tournament Bar (shown on tournament-scoped pages)
   This gives operators a reliable "where am I" + navigation strip. */
.tournamentbar {
  border-bottom: 1px solid var(--line);
  background: rgba(16, 32, 48, 0.85);
}

.tournamentbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tournamentbar-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.tournamentbar-name {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.tournamentbar-format {
  font-size: 13px;
  color: var(--muted);
}

.tournamentbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.tournamentbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tournamentbar-links a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(22, 34, 50, 0.6);
  font-size: 12px;
  color: var(--link);
}

.tournamentbar-links a:hover {
  text-decoration: none;
  border-color: rgba(157, 195, 255, 0.6);
}

.tournamentbar-links a.active {
  border-color: rgba(43, 124, 255, 0.8);
  background: rgba(43, 124, 255, 0.18);
  color: #fff;
  font-weight: 700;
}

/* Optional per-page actions that live alongside the Tournament Bar navigation.
   Example: Round page utilities like Pairing fairness / Adjust losses / Undo.
   These are rendered via the tournament-bar fragment's extraActions slot. */
.tournamentbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* The Tournament Bar styles all anchors as nav pills. For action links that use
   our standard .btn classes, restore true button styling. */
.tournamentbar-links a.btn {
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}
.tournamentbar-links a.btn:hover {
  background: var(--primary2);
  text-decoration: none;
}
.tournamentbar-links a.btn.secondary { background: #243248; }
.tournamentbar-links a.btn.secondary:hover { background: #324363; }
.tournamentbar-links a.btn.good { background: var(--good); }
.tournamentbar-links a.btn.good:hover { filter: brightness(0.95); }
.tournamentbar-links a.btn.bad { background: var(--bad); }
.tournamentbar-links a.btn.bad:hover { filter: brightness(0.95); }
.tournamentbar-links a.btn.small { padding: 6px 10px; font-size: 12px; }

.tournamentbar-actions form {
  margin: 0;
}

/* The bracket view uses a wider layout; let the tournament bar match. */
.page-bracket .tournamentbar-inner {
  max-width: none;
}

/* Flash messages */
.flashbar {
  max-width: 1200px;
  margin: 10px auto 0;
  padding: 0 14px;
}
.flash {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 14px;
}
.flash.warning {
  border-color: rgba(255, 193, 7, 0.55);
  color: #ffe9a8;
}

.hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 10px 0;
}

.hr2 {
  border: 2px;
  border-width: 0;
  color: grey;
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.table th { color: var(--muted); font-weight: 700; font-size: 12px; }
.table td { font-size: 14px; }

.kpi {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.kpi .k {
  background: var(--panel);
  border-radius: 8px;
  padding: 12px 14px;
  min-width: 180px;
}
.kpi .k .num { font-size: 22px; font-weight: 800; }



/* ===============================
   Template-scoped styles (moved from inline <style> blocks)
   =============================== */

/* === Analytics (shared look & feel) === */
body[class*="page-analytics-"] .container {
  max-width: 1100px;
  margin: 28px auto;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

body[class*="page-analytics-"] h2 { margin: 0; }
body[class*="page-analytics-"] h3 { margin: 22px 0 10px; }

body[class*="page-analytics-"] .pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--panel2);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}

body[class*="page-analytics-"] .nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
  font-size: 14px;
}

body[class*="page-analytics-"] .nav a {
  color: var(--link);
  text-decoration: none;
}

body[class*="page-analytics-"] .nav a:hover {
  text-decoration: underline;
}

body[class*="page-analytics-"] .meta {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 12px;
}

body[class*="page-analytics-"] .tiny { font-size: 11px; color: #9aa6b2; }
body[class*="page-analytics-"] .note { font-size: 11px; color: #9aa6b2; margin-top: 4px; line-height: 1.35; }
body[class*="page-analytics-"] .num { font-size: 12px; color: #e9eef6; }

body[class*="page-analytics-"] code.k,
body[class*="page-analytics-"] .k {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  color: #cfe3ff;
}

body[class*="page-analytics-"] details.explain {
  margin: 12px 0 14px;
  padding: 12px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

body[class*="page-analytics-"] details.explain > summary {
  cursor: pointer;
  user-select: none;
  font-weight: 800;
  color: #e9eef6;
}

body[class*="page-analytics-"] details.explain .body { margin-top: 10px; }
body[class*="page-analytics-"] details.explain .body p {
  margin: 8px 0;
  color: #cfd6df;
  font-size: 13px;
  line-height: 1.45;
}

body[class*="page-analytics-"] details.explain ul {
  margin: 8px 0 0 18px;
  color: #cfd6df;
  font-size: 13px;
}

body[class*="page-analytics-"] details.explain li { margin: 6px 0; }

/* Controls (shared) */
body[class*="page-analytics-"] form.controls,
body[class*="page-analytics-"] .controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0 14px;
}

body[class*="page-analytics-"] form.controls label,
body[class*="page-analytics-"] .controls label {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  min-width: 160px;
}

body[class*="page-analytics-"] form.controls input,
body[class*="page-analytics-"] form.controls select,
body[class*="page-analytics-"] .controls input,
body[class*="page-analytics-"] .controls select {
  width: auto;              /* override global width:100% */
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

body[class*="page-analytics-"] form.controls input[type=range],
body[class*="page-analytics-"] .controls input[type=range] {
  padding: 0;
  height: 26px;
  min-width: 220px;
}

body[class*="page-analytics-"] form.controls button,
body[class*="page-analytics-"] .controls button {
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid rgba(43,124,255,0.45);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  height: 40px;
  align-self: flex-end;
}

/*
  Skill audit has a multi-line helper under “Sensitivity”. If the controls row
  bottom-aligns (align-items:flex-end), that helper pushes the other controls
  downward and makes the layout look “justified to the bottom”.

  Override for just that page: top-align all control blocks, and keep the Apply
  button visually aligned with the input row.
*/
body.page-analytics-skill-audit form.controls { align-items: flex-start; }

body.page-analytics-skill-audit form.controls button {
  align-self: flex-start;
  margin-top: 18px;
}

/* Skill Audit: hover tooltip for the "Players flagged for review" header */
body.page-analytics-skill-audit .hover-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: help;
  border-bottom: 1px dotted rgba(255,255,255,0.35);
  padding-bottom: 1px;
}

body.page-analytics-skill-audit .hover-info:focus {
  outline: 2px solid rgba(157,195,255,0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

body.page-analytics-skill-audit .hover-info .info-icon {
  font-weight: 700;
  opacity: 0.85;
  font-size: 13px;
  line-height: 1;
}

body.page-analytics-skill-audit .hover-info .tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 360px;
  max-width: 90vw;
  white-space: normal;

  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;

  font-size: 12px;
  line-height: 1.35;
  color: #d7deea;

  box-shadow: 0 18px 36px rgba(0,0,0,0.35);
  z-index: 1000;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s;
}

body.page-analytics-skill-audit .hover-info .tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 14px;
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent var(--panel) transparent;
}

body.page-analytics-skill-audit .hover-info:hover .tooltip,
body.page-analytics-skill-audit .hover-info:focus .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .12s ease, transform .12s ease;
}

body[class*="page-analytics-"] form.controls button:hover,
body[class*="page-analytics-"] .controls button:hover {
  background: var(--primary2);
}

/* Stats (shared) */
body[class*="page-analytics-"] .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 12px 0 14px;
}

body[class*="page-analytics-"] .stat {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

body[class*="page-analytics-"] .stat .label { font-size: 12px; color: #9aa6b2; }
body[class*="page-analytics-"] .stat .value { font-size: 22px; font-weight: 800; margin-top: 6px; }

body[class*="page-analytics-"] .stat .note {
  font-size: 12px;
  color: #b6c0cc;
  margin-top: 6px;
  line-height: 1.35;
}

body[class*="page-analytics-"] .empty {
  margin-top: 12px;
  padding: 14px;
  background: var(--panel2);
  border: 1px dashed rgba(255,255,255,0.22);
  border-radius: 8px;
  color: #cfd6df;
}

/* Callouts */
body[class*="page-analytics-"] .callout,
body[class*="page-analytics-"] details.callout {
  margin: 14px 0;
  padding: 12px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #d7deea;
}

body[class*="page-analytics-"] details.callout > summary {
  cursor: pointer;
  user-select: none;
  font-weight: 800;
  color: #e9eef6;
}

body[class*="page-analytics-"] details.callout > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none; /* hide native marker */
}

body[class*="page-analytics-"] details.callout > summary::-webkit-details-marker {
  display: none;
}

body[class*="page-analytics-"] details.callout > summary::before {
  content: '▸';
  display: inline-block;
  width: 1em;
  color: var(--muted);
  flex: 0 0 auto;
}

body[class*="page-analytics-"] details.callout[open] > summary::before {
  content: '▾';
}

/* Chips / tags */
body[class*="page-analytics-"] .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: #cfd6df;
  font-size: 12px;
  margin-right: 6px;
}

/* Tables (shared). Heatmaps are special and styled separately. */
body[class*="page-analytics-"] table:not(.heatmap) {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

body[class*="page-analytics-"] table:not(.heatmap) th,
body[class*="page-analytics-"] table:not(.heatmap) td {
  padding: 10px 10px;
  vertical-align: top;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

body[class*="page-analytics-"] table:not(.heatmap) th {
  text-align: left;
  font-size: 12px;
  color: #9aa6b2;
  background: rgba(255,255,255,0.03);
  font-weight: 700;
}

body[class*="page-analytics-"] table:not(.heatmap) th:not(:last-child),
body[class*="page-analytics-"] table:not(.heatmap) td:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,0.06);
}

body[class*="page-analytics-"] table:not(.heatmap) tr:last-child td { border-bottom: none; }

body[class*="page-analytics-"] tr.small-sample td { opacity: 0.75; }
body[class*="page-analytics-"] tr.lowN td { opacity: 0.55; }

body[class*="page-analytics-"] ul { margin: 8px 0 0 18px; }
body[class*="page-analytics-"] li { margin: 6px 0; }

body[class*="page-analytics-"] .footnote {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 760px) {
  body[class*="page-analytics-"] .container { padding: 16px; }
  body[class*="page-analytics-"] form.controls label,
  body[class*="page-analytics-"] .controls label { min-width: 140px; }
  body[class*="page-analytics-"] table:not(.heatmap) { display: block; overflow-x: auto; }
}

/* === Analytics index (cards) === */
.page-analytics-index .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.page-analytics-index a.card {
  display: block;
  padding: 14px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.page-analytics-index a.card:hover {
  border-color: rgba(43,124,255,0.55);
  box-shadow: 0 0 0 1px rgba(59,109,184,0.25);
}

.page-analytics-index a.card h3 { margin: 0 0 8px 0; font-size: 16px; }
.page-analytics-index a.card p { margin: 0 0 10px 0; font-size: 13px; color: #cfd6df; line-height: 1.35; }

.page-analytics-index .meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: #9aa6b2;
}

/* === Analytics results === */
.page-analytics-results a.action {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-size: 13px;
}

.page-analytics-results a.action:hover {
  background: var(--primary2);
}

/* === Race-heatmap specifics === */
.page-analytics-race-heatmap table.heatmap {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.page-analytics-race-heatmap table.heatmap th,
.page-analytics-race-heatmap table.heatmap td {
  border: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
}

.page-analytics-race-heatmap table.heatmap th {
  background: var(--panel2);
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  min-width: 40px;
}

.page-analytics-race-heatmap td.hm-empty { background: #101a28; }

.page-analytics-race-heatmap .hmcell { font-size: 12px; line-height: 1.25; }
.page-analytics-race-heatmap .hm-top { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 4px; }
.page-analytics-race-heatmap .hm-line { margin: 2px 0; }
.page-analytics-race-heatmap .hm-small { font-size: 11px; color: #c8c8c8; }
.page-analytics-race-heatmap .hm-quiet { font-size: 11px; color: #9aa6b2; }
.page-analytics-race-heatmap .hm-flag {
  font-size: 11px;
  color: #fff;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
}

.page-analytics-race-heatmap details.hm-suggest { margin-top: 6px; }
.page-analytics-race-heatmap details.hm-suggest summary {
  cursor: pointer;
  color: var(--link);
  font-size: 11px;
  user-select: none;
}

.page-analytics-race-heatmap .hm-sugbody {
  margin-top: 6px;
  padding: 8px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  color: #ddd;
}

.page-analytics-race-heatmap .hm-sugbody div { margin: 4px 0; }

/* === Fairness curve specifics (bar visuals) === */
.page-analytics-fairness-curve .bar {
  height: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 6px 0;
}

.page-analytics-fairness-curve .bar .fill {
  height: 100%;
  background: rgba(90, 180, 255, 0.85);
}

/* === Losses-allowed impact specifics (mapping + distributions) === */
.page-analytics-losses-allowed-impact .mapping {
  margin: 10px 0 14px 0;
  padding: 12px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.page-analytics-losses-allowed-impact .mapping h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #cfe3ff;
}

.page-analytics-losses-allowed-impact .mapgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
  font-size: 12px;
  color: #cfd6df;
}

.page-analytics-losses-allowed-impact .chip {
  padding: 6px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  text-align: center;
}

.page-analytics-losses-allowed-impact .dist {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
  margin-top: 2px;
}

.page-analytics-losses-allowed-impact .dist .iqr {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(157,195,255,0.45);
}

.page-analytics-losses-allowed-impact .dist .med {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 16px;
  background: rgba(255,255,255,0.85);
}

.page-analytics-losses-allowed-impact .small {
  margin-top: 6px;
  font-size: 12px;
  color: #cfd6df;
}

.page-analytics-losses-allowed-impact .wRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.page-analytics-losses-allowed-impact .wRow .wVal { font-weight: 800; }
.page-analytics-losses-allowed-impact .wHelp { font-size: 11px; color: #9aa6b2; margin-top: 4px; }


/* === src/main/resources/templates/facebook-login.html (was inline) === */
.page-facebook-login pre {
  margin: 0;
}

.page-facebook-login code {
  white-space: pre-wrap;
}


/* === src/main/resources/templates/login.html (was inline) === */
.page-login {
  font-family: Arial, sans-serif; background: #0b1724; color: #eee;
}

.page-login .login-box {
  max-width: 360px;
              margin: 80px auto;
              padding: 24px;
              background: #162232;
              border-radius: 6px;
}

.page-login label {
  display: block; margin-bottom: 6px;
}

.page-login input[type=text], .page-login input[type=password] {
  width: 100%; padding: 8px; margin-bottom: 14px;
              border-radius: 4px; border: 1px solid #555; background: #0b1724; color: #eee;
}

.page-login button {
  width: 100%; padding: 10px;
              border: none; border-radius: 4px;
              background: #2b7cff; color: white;
              font-size: 14px; cursor: pointer;
}

.page-login button:hover {
  background: #1b5cbd;
}

.page-login button.secondary {
  background: #444; margin-top: 10px;
}

.page-login button.secondary:hover {
  background: #333;
}

.page-login .error {
  color: #ff8080; margin-bottom: 10px;
}

.page-login .warn {
  color: #ffd180; margin-bottom: 10px;
}

.page-login .hint {
  margin-top: 12px; font-size: 12px; color: #bbb; line-height: 1.4;
}


/* === src/main/resources/templates/losses-adjust.html (was inline) === */
.page-losses-adjust .danger {
  background: #2a1414;
              border: 1px solid rgba(192,57,43,.55);
              border-left: 6px solid #c0392b;
              border-radius: 10px;
              padding: 12px 14px;
}

.page-losses-adjust .danger h2 {
  margin: 0 0 6px;
}

.page-losses-adjust .danger ul {
  margin: 8px 0 0 18px;
}

.page-losses-adjust .danger li {
  margin: 6px 0; color: #ffd0cc;
}

.page-losses-adjust .player-name {
  font-weight: 800;
}

.page-losses-adjust .pill {
  display:inline-block;
              padding: 2px 8px;
              border-radius: 999px;
              border: 1px solid var(--line);
              background: var(--panel2);
              font-size: 12px;
              color: var(--muted);
}

.page-losses-adjust .pill.bad {
  border-color: rgba(192,57,43,.55); color: #ffd0cc;
}

.page-losses-adjust .pill.good {
  border-color: rgba(40,167,69,.55); color: #bff2c9;
}

.page-losses-adjust .controls {
  display:flex; gap: 6px; justify-content: flex-end;
}

.page-losses-adjust .controls form {
  margin: 0;
}

.page-losses-adjust .controls .btn {
  min-width: 44px;
}

.page-losses-adjust .note {
  color: var(--muted); font-size: 13px;
}


/* === src/main/resources/templates/pairing-audit-math.html (was inline) === */
.page-pairing-audit-math .meta {
  color: var(--muted); font-size: 13px;
}

.page-pairing-audit-math .callout {
  margin-top: 12px;
              background: var(--panel);
              border-radius: 8px;
              padding: 14px;
              border: 1px solid var(--line);
}

.page-pairing-audit-math .callout h2 {
  margin: 0 0 6px 0; font-size: 16px;
}

.page-pairing-audit-math .callout p {
  margin: 8px 0; line-height: 1.5;
}

.page-pairing-audit-math .mathy {
  margin-top: 12px;
              background: var(--panel);
              border-radius: 8px;
              padding: 14px;
              border: 1px solid var(--line);
}

.page-pairing-audit-math .mathy h2 {
  margin: 0 0 6px 0; font-size: 16px;
}

.page-pairing-audit-math .mathy h3 {
  margin: 14px 0 6px 0; font-size: 14px;
}

.page-pairing-audit-math .mathy p, .page-pairing-audit-math .mathy li {
  line-height: 1.55;
}

.page-pairing-audit-math code, .page-pairing-audit-math .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
              font-size: 0.95em;
}

.page-pairing-audit-math .pill {
  display: inline-block;
              padding: 2px 10px;
              border-radius: 999px;
              border: 1px solid var(--line);
              background: var(--panel2);
              font-size: 12px;
              color: var(--muted);
              margin-left: 6px;
}

.page-pairing-audit-math details {
  margin-top: 10px;
              padding: 10px 12px;
              border-radius: 8px;
              border: 1px solid var(--line);
              background: var(--panel2);
}

.page-pairing-audit-math details summary {
  cursor: pointer;
              font-weight: 700;
}

.page-pairing-audit-math .kpi {
  margin-top: 10px;
              display: grid;
              grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
              gap: 10px;
}

.page-pairing-audit-math .k {
  background: var(--panel2);
              border: 1px solid var(--line);
              border-radius: 8px;
              padding: 10px 12px;
}

.page-pairing-audit-math .k .label {
  color: var(--muted); font-size: 12px;
}

.page-pairing-audit-math .k .value {
  font-size: 18px; font-weight: 800; margin-top: 4px;
}


/* === src/main/resources/templates/pairing-audit.html (was inline) === */
.page-pairing-audit .summary {
  margin-top: 12px;
              background: var(--panel);
              border-radius: 8px;
              padding: 14px;
}

.page-pairing-audit details.round {
  margin-top: 12px;
              background: var(--panel);
              border-radius: 8px;
              padding: 12px 14px;
              border: 1px solid var(--line);
}

.page-pairing-audit details.round summary {
  cursor: pointer;
              display: flex;
              align-items: center;
              justify-content: space-between;
              gap: 10px;
              list-style: none;
}

.page-pairing-audit details.round summary::-webkit-details-marker {
  display: none;
}

.page-pairing-audit .round-title {
  font-weight: 800;
              font-size: 16px;
}

.page-pairing-audit .meta {
  color: var(--muted); font-size: 13px;
}

.page-pairing-audit .pill {
  display: inline-block;
              padding: 2px 10px;
              border-radius: 999px;
              border: 1px solid var(--line);
              background: var(--panel2);
              font-size: 12px;
              color: var(--muted);
}

.page-pairing-audit .pill.good {
  border-color: rgba(40,167,69,.55); color: #bff2c9;
}

.page-pairing-audit .pill.bad {
  border-color: rgba(192,57,43,.55); color: #ffd0cc;
}

.page-pairing-audit .pill.warn {
  border-color: rgba(255,193,7,.55); color: #ffe9a8;
}

.page-pairing-audit .pairtable {
  width: 100%;
              border-collapse: collapse;
              margin-top: 10px;
              font-size: 14px;
}

.page-pairing-audit .pairtable th, .page-pairing-audit .pairtable td {
  padding: 8px 6px;
              border-bottom: 1px solid var(--line);
              text-align: left;
}

.page-pairing-audit .pairtable th {
  color: var(--muted); font-size: 12px;
}

.page-pairing-audit .tag {
  display: inline-block;
              padding: 2px 8px;
              border-radius: 999px;
              font-size: 12px;
              border: 1px solid var(--line);
              background: var(--panel2);
              color: var(--muted);
}

.page-pairing-audit .tag.rematch {
  border-color: rgba(255,170,0,.55); color: #ffe0a6;
}

.page-pairing-audit .tag.good {
  border-color: rgba(40,167,69,.55); color: #bff2c9;
}

.page-pairing-audit .tag.bad {
  border-color: rgba(192,57,43,.55); color: #ffd0cc;
}


/* === src/main/resources/templates/players.html (was inline) === */
.page-players {
  font-family: Arial, sans-serif; background: #0b1724; color: #eee;
}

.page-players .page {
  max-width: 1200px; margin: 20px auto;
}

.page-players h1, .page-players h2 {
  margin-bottom: 8px;
}

.page-players /* Header controls (rename + sort links) */
        .tournament-header {
  display: flex;
              justify-content: space-between;
              align-items: flex-end;
              gap: 14px;
              flex-wrap: wrap;
              margin: 10px 0 16px;
}

.page-players .tournament-left {
  display: flex;
              flex-direction: column;
              gap: 6px;
              min-width: 320px;
}

.page-players .tournament-title {
  margin: 0;
              display: flex;
              flex-wrap: wrap;
              gap: 6px;
              align-items: baseline;
}

.page-players .tournament-edit-hint {
  font-size: 12px;
}

.page-players .tournament-rename {
  display: flex;
              gap: 8px;
              align-items: center;
              margin: 0;
}

.page-players .tournament-rename input {
  width: min(360px, 100%); max-width: 360px;
}

.page-players .toolbar {
  margin: 0;
              display: flex;
              gap: 8px;
              flex-wrap: wrap;
              align-items: center;
}

.page-players .toolbar a {
  margin-right: 0;
              padding: 6px 10px;
              border-radius: 4px;
              background: #2b7cff;
              color: #fff;
              text-decoration: none;
}

.page-players .toolbar a:hover {
  background: #1b5cbd;
}

.page-players .columns {
  display: flex; gap: 16px;
}

.page-players .panel {
  flex: 1;
              background: #162232;
              padding: 10px;
              border-radius: 6px;
}

.page-players .panel h2 {
  font-size: 18px; margin-top: 0;
}

.page-players ul {
  list-style: none; padding-left: 0; margin: 0;
}

.page-players li {
  margin-bottom: 6px;
}

.page-players .player-button {
  width: 100%; text-align: left;
              border: none; border-radius: 4px;
              padding: 6px 8px; cursor: pointer;
              background: #243248; color: #eee;
}

.page-players .player-button:hover {
  background: #324363;
}

.page-players .scrollable-list {
  max-height: 540px;   /* roughly ~18 rows worth of buttons */
              overflow-y: auto;
}

.page-players .form-section {
  margin-top: 20px;
              background: #162232;
              padding: 10px;
              border-radius: 6px;
}

.page-players .form-row {
  margin-bottom: 8px;
}

.page-players label {
  display: block; margin-bottom: 4px;
}

.page-players input[type=text], .page-players input[type=number] {
  width: 100%; padding: 6px;
              border-radius: 4px; border: 1px solid #555;
              background: #0b1724; color: #eee;
}

/* Fees row: keep the fee inputs narrow and visually grouped (much easier to scan). */
.page-players .fee-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.page-players .fee-field {
  width: 160px;
  max-width: 160px;
}

.page-players input.fee-input {
  width: 160px;
  max-width: 160px;
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

/* Ensure placeholders line up with right-justified numeric values (helps when fee fields are blank). */
.page-players input.fee-input::placeholder,
.page-players input.numeric-right::placeholder {
  text-align: right;
}

/* Right-justified numeric fields (race-to, etc.) */
.page-players input.numeric-right {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.page-players button.action {
  margin-top: 8px;
              padding: 6px 10px;
              border-radius: 4px; border: none;
              background: #2b7cff; color: #fff;
              cursor: pointer;
}

.page-players button.action:hover {
  background: #1b5cbd;
}

.page-players button.action[disabled] {
  background: #555;
              cursor: not-allowed;
              opacity: 0.7;
}

.page-players .footer {
  margin-top: 20px;
              text-align: right;
}

.page-players .start-btn {
  padding: 8px 14px;
              border-radius: 4px; border: none;
              font-size: 14px;
              background: #28a745; color: #fff;
              cursor: pointer;
}

.page-players .start-btn[disabled] {
  background: #555; cursor: not-allowed;
}

.page-players .search-box {
  margin: 6px 0 10px 0;
}

.page-players .search-box input {
  padding: 4px 6px;
              border-radius: 4px;
              border: 1px solid #555;
              background: #0b1724;
              color: #eee;
              width: 100%;
              box-sizing: border-box;
}

.page-players .danger-button {
  margin-left: 4px;
              padding: 4px 6px;
              border-radius: 4px; border: none;
              background: #b32626;
              color: #fff;
              cursor: pointer;
              font-size: 12px;
}

.page-players .danger-button:hover {
  background: #e53935;
}


/* === src/main/resources/templates/results.html (was inline) === */
.page-results .winner {
  font-weight: 800;
}


/* === src/main/resources/templates/round.html (was inline) === */
.page-round {
  font-family: Arial, sans-serif; background: #0b1724; color: #eee;
}

.page-round .page {
  max-width: 1200px; margin: 20px auto;
}

.page-round .header {
  display: flex; justify-content: space-between; align-items: baseline;
}

.page-round .grid {
  margin-top: 20px;
              display: grid;
              grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
              gap: 12px;
}

.page-round .card {
  background: #162232;
              border-radius: 6px;
              padding: 10px;
}

.page-round .card h3 {
  margin: 0 0 6px;
}

.page-round .race {
  font-size: 12px; color: #ccc; margin-bottom: 8px;
}

.page-round .score-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin: 8px 0 10px 0;
  background: #0f2035;
  border: 1px solid #24364f;
  border-radius: 6px;
}

.page-round .score-entry .score-label {
  font-weight: bold;
  font-size: 12px;
  color: #ddd;
}

.page-round .score-entry input[type='number'] {
  width: 64px;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid #345;
  background: #081321;
  color: #fff;
  font-size: 12px;
}

.page-round .score-entry .score-sep {
  color: #ccc;
}

.page-round .score-entry .score-hint {
  margin-left: 8px;
  font-size: 11px;
  color: #bbb;
}

.page-round .score-entry .score-status {
  margin-left: auto;
  font-size: 11px;
  color: #bbb;
}

.page-round .score-entry .score-status.ok {
  color: #20c997;
}

.page-round .score-entry .score-status.bad {
  color: #ff6b6b;
}

/*
  The director queue places the score-status element outside .score-entry.
  Keep styling consistent across pages.
*/
.score-status {
  font-size: 11px;
  color: #bbb;
}

.score-status.ok {
  color: #20c997;
}

.score-status.bad {
  color: #ff6b6b;
}

.page-round .final-score {
  font-size: 12px;
  color: #ddd;
  margin: 6px 0 10px 0;
}

.page-round .player-row {
  margin-bottom: 8px;
}

.page-round .completed {
  opacity: 0.6;
}

.page-round .no-matches {
  margin-top: 30px;
}

.page-round form {
  display: inline-block; margin-right: 4px; margin-bottom: 4px;
}

.page-round form.match-score-form {
  display: block;
  margin-right: 0;
}

.page-round button {
  border-radius: 4px; border: none;
              padding: 6px 8px; cursor: pointer;
              background: #2b7cff; color: #fff;
              font-size: 12px;
}

.page-round button.secondary { background: #243248; }
.page-round button.secondary:hover { background: #324363; }
.page-round button.small { padding: 4px 6px; font-size: 11px; }

/* Green "Match Announced" button */
.page-round button.announce { background: #28a745; }
.page-round button.announce:hover { filter: brightness(0.95); }

/* Match header row: Table/Race on the left, announce/stopwatch on the right */
.page-round .match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.page-round .match-head-left h3 { margin: 0; }
.page-round .match-head-left .race { margin: 2px 0 0 0; }

.page-round .match-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-round .match-head-right form { margin: 0; display: inline-block; }

.page-round .announce-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px 0;
}

.page-round .stopwatch {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #24364f;
  background: #0f2035;
  color: #ddd;
}

.page-round button.forfeit {
  background: #c0392b;
}

.page-round button:hover {
  opacity: 0.9;
}

.page-round button:disabled {
  cursor: not-allowed;
  opacity: 0.65;

  /* "stippled" look so it's obvious you can't click yet */
  background-color: #4a4a4a;
  background-image: repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.18) 0px,
      rgba(255,255,255,0.18) 4px,
      rgba(0,0,0,0.10) 4px,
      rgba(0,0,0,0.10) 8px
  );
}

.page-round .player-name {
  font-weight: bold;
}

.page-round .player-name.winner {
  color: #00AA00; /* almost green */
}

.page-round .player-name.loser {
  color: #FF0000; /* red */
}

.bye-banner {
  margin-top: 10px;
              padding: 8px 10px;
              background: #102030;
              border-left: 4px solid #ffaa00;
}

.queued-banner {
  margin-top: 10px;
              padding: 8px 10px;
              background: #102030;
              border-left: 4px solid #2b7cff;
}

/* ======================
   Calcutta
   ====================== */

.page-calcutta .calcutta-section {
  margin-bottom: 12px;
}

.page-calcutta .calcutta-section-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.page-calcutta .calcutta-grid {
  display: grid;
  grid-template-columns: 1fr 110px 240px;
  gap: 8px 10px;
  align-items: center;
}

/* Wrapper that does not affect the grid layout */
.page-calcutta .calcutta-rows {
  display: contents;
}

.page-calcutta .calcutta-grid-head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9fb1c9;
  padding: 6px 2px;
}

.page-calcutta .calcutta-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 110px 240px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #24364f;
  border-radius: 8px;
  background: #0b1320;
}

.page-calcutta .bidder-cell {
  position: relative;
}

/* Hidden: per-player paid flag is still submitted in the form, but controlled by bidder-level checkbox */
.page-calcutta .calcutta-paid-flag {
  display: none;
}

.page-calcutta .calcutta-row input[type="text"],
.page-calcutta .calcutta-row input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #24364f;
  background: #0a1220;
  color: #e5e7eb;
}

.page-calcutta .player-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-calcutta .player-name {
  font-weight: 700;
}

.page-calcutta .calcutta-empty {
  color: #9fb1c9;
}

.page-calcutta .calcutta-row.eliminated {
  opacity: 0.55;
  filter: grayscale(1);
  /* "Stippled" look: subtle diagonal pattern so eliminated rows visually fall back. */
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.04) 5px,
    rgba(0, 0, 0, 0) 5px,
    rgba(0, 0, 0, 0) 10px
  );
}

.page-calcutta .calcutta-row.eliminated .player-name {
  text-decoration: line-through;
}

.page-calcutta .calcutta-bidder-table-wrap {
  overflow-x: auto;
}

.page-calcutta .calcutta-bidder-players {
  white-space: normal;
  line-height: 1.35;
}

.page-calcutta .bidder-paid-toggle {
  transform: scale(1.15);
}


.warning-banner {
  margin-top: 10px;
              padding: 10px 10px;
              background: #102030;
              border-left: 4px solid #ff4d4d;
}

.page-round .queued-list {
  margin-top: 8px;
}

.page-round .queued-item {
  padding: 6px 0;
              border-bottom: 1px solid #24364f;
}

.page-round .queued-item:last-child {
  border-bottom: none;
}

.page-round .queue-num {
  color: #2b7cff; font-weight: bold; margin-right: 8px;
}

.page-round .match-separator {
  grid-column: 1 / -1;     /* span full grid width */
              border: 0;
              border-top: 1px solid #24364f;
              margin: 3px 0;
              opacity: 0.9;
}

.page-round .section-label {
  grid-column: 1 / -1;   /* span full grid width */
              margin: 10px 0 4px;
              font-weight: 700;
              opacity: 0.95;
}


/* === src/main/resources/templates/rules.html (was inline) === */
.page-rules {
  font-family: Arial, sans-serif; background: #0b1724; color: #eee;
}

.page-rules .page {
  max-width: 1100px; margin: 20px auto;
}

.page-rules h1, .page-rules h2 {
  margin-bottom: 8px;
}

.page-rules table {
  border-collapse: collapse; width: 100%; margin-bottom: 20px;
}

.page-rules th, .page-rules td {
  border: 1px solid #334; padding: 4px 6px; text-align: center;
}

.page-rules input[type="number"], .page-rules input[type="text"] {
  width: 60px;
}

.page-rules .btn, .page-rules button {
  display: inline-block;
              padding: 6px 10px;
              border-radius: 4px;
              border: none;
              background: #2b7cff;
              color: #fff;
              text-decoration: none;
              cursor: pointer;
}

.page-rules .btn:hover, .page-rules button:hover {
  background: #1b5cbd;
}


/* === src/main/resources/templates/tables-adjust.html (was inline) === */
.page-tables-adjust .tables-list label {
  display:block; margin-bottom: 6px;
}

.page-tables-adjust .tables-list input {
  margin-right: 8px;
}

.page-tables-adjust .players-table tr:nth-child(even) {
  background: #1b2737;
}

/* === Director / Bracket views === */
.page-director .director-topbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.page-director .pill {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #334;
  border-radius: 999px;
  font-size: 12px;
}

.page-director .section {
  margin-top: 18px;
}

.page-director .match-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-director .match-card {
  border: 1px solid #334;
  border-radius: 6px;
  padding: 10px;
  background: #121a26;
  min-width: 300px;
  max-width: 360px;
}

.page-director .match-card .match-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.page-director .match-card .match-label {
  font-weight: 700;
}

.page-director .match-card .match-meta {
  font-size: 12px;
  opacity: 0.9;
}

.page-director .match-card .players {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  align-items: center;
  margin-top: 8px;
}

.page-director .match-card .players .name {
  font-weight: 600;
}

.page-director .match-card input[type="number"] {
  width: 64px;
}

.page-director .match-card .btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.page-director .match-card .btn-small {
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  background: #2b7cff;
  color: #fff;
  cursor: pointer;
}

.page-director .match-card .btn-small.secondary {
  background: #445;
}

.page-director .match-card .btn-small.danger {
  background: #b23b3b;
}

.page-director .notice {
  border: 1px solid #334;
  border-radius: 6px;
  padding: 10px;
  background: #121a26;
  margin-top: 10px;
}

.page-bracket .bracket-columns {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-gutter: stable both-edges;
  padding-bottom: 12px;
}

/* Bracket pages can get *wide* (64-player double-elim produces a lot of rounds).
   Let the bracket use the full browser width so we don't cut off late columns by default. */
.page-bracket .container {
  max-width: none;
}

.page-bracket .round-col {
  min-width: 240px;
  border: 1px solid #334;
  border-radius: 6px;
  padding: 10px;
  background: #121a26;
}

.page-bracket .round-col h3 {
  margin-top: 0;
  font-size: 14px;
}

.page-bracket .bracket-match {
  border: 1px solid #223;
  border-radius: 6px;
  padding: 8px;
  background: #0f1722;
  margin-bottom: 10px;
}

.page-bracket .bracket-match .label {
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.page-bracket .bracket-match .status {
  font-size: 12px;
  opacity: 0.85;
}

.page-bracket .bracket-match .p {
  margin-top: 6px;
}

.page-bracket .bracket-match .winner {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.95;
}

/* ==============================
   Round Robin Pod Results page
   ============================== */

.page-rr-results .pod-block {
  margin-bottom: 18px;
}

.page-rr-results .rr-pod-table tbody tr.rr-advancing {
  background: rgba(40, 167, 69, 0.14);
}

.page-rr-results .rr-pod-table tbody tr.rr-eliminated {
  background: rgba(192, 57, 43, 0.12);
}

/* During the group stage, players are not eliminated yet.
   "Below cutoff" is informational only, so use a neutral tint. */
.page-rr-results .rr-pod-table tbody tr.rr-below-cutoff {
  background: rgba(140, 140, 160, 0.10);
}

.page-rr-results .rr-summary {
  display: flex;
  justify-content: flex-start;
}
