:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --text: #1f1f1d;
  --muted: #6b6b66;
  --border: #e4e3de;
  --accent: #b5532a;
  --warn-bg: #fdf1e9;
  --on: #2f6f4f;
  --off: #8a8a85;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

header,
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  padding-top: 32px;
}

h1 {
  margin: 0 0 4px;
  font-size: 26px;
}

h2 {
  margin: 32px 0 4px;
  font-size: 18px;
}

.muted {
  color: var(--muted);
  margin: 0 0 12px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.card-label {
  color: var(--muted);
  font-size: 13px;
}

.card-value {
  font-size: 24px;
  font-weight: 600;
  margin: 2px 0;
}

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

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

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.teams tbody tr {
  cursor: pointer;
}

.teams tbody tr:hover {
  background: #f4f3ef;
}

.teams tr.selected {
  box-shadow: inset 3px 0 0 var(--accent);
}

.teams tr.flag {
  background: var(--warn-bg);
}

.team {
  font-weight: 600;
}

.warn {
  color: var(--accent);
  font-weight: 600;
}

.toggle {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  background: var(--surface);
}

.toggle.on {
  color: var(--on);
  border-color: var(--on);
}

.toggle.off {
  color: var(--off);
}

.limit-wrap {
  white-space: nowrap;
}

.limit {
  width: 88px;
  margin-left: 2px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pr-id {
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}

.pr-title {
  font-weight: 600;
}

.note {
  margin-top: 8px;
  font-size: 13px;
}

#detail {
  margin-bottom: 48px;
}
