:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #1f2328;
  --muted: #6b7280;
  --line: #e3e6ea;
  --accent: #feca0a;
  --accent-ink: #1f2328;
  --pos: #e8f5e9;
  --neg: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: #111418;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 17px; margin: 0; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

.meta { display: flex; align-items: center; gap: 14px; }
.muted { color: #9aa4b2; font-size: 12px; }

.btn {
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { filter: brightness(0.95); }

main { padding: 20px 22px 40px; max-width: 1500px; margin: 0 auto; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.card .num { font-size: 26px; font-weight: 700; }
.card .lbl { color: var(--muted); font-size: 12px; margin-top: 2px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.panel-head h2 { font-size: 15px; margin: 0; }

.roles { display: flex; gap: 6px; flex-wrap: wrap; }
.roles button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
}
.roles button.active {
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.table-wrap { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; min-width: 640px; }
th, td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #fafbfc;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-align: right;
  vertical-align: bottom;
}
th.crit { max-width: 120px; white-space: normal; }
td.team, th.team { text-align: left; font-weight: 600; }
th.rank, td.rank { text-align: left; color: var(--muted); width: 34px; }
td.total, th.total { font-weight: 700; background: #fffdf2; }
tr:hover td { background: #f8fafc; }
td.best { background: var(--pos); }
.axis { color: var(--muted); font-size: 11px; }

.foot { padding: 0 22px 24px; max-width: 1500px; margin: 0 auto; }
