:root {
  --ink: #20242a;
  --muted: #636b74;
  --line: #c9ced6;
  --soft-line: #e4e7eb;
  --header: #b72f2f;
  --header-dark: #7f1f1f;
  --link: #235a99;
  --paper: #ffffff;
  --band: #f3f5f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 720px);
  gap: 16px;
  align-items: end;
  padding: 14px 18px 12px;
  border-top: 5px solid var(--header);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#fff, #f8f9fa);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.site-header p {
  margin-top: 3px;
  color: var(--muted);
}

.method-blurb {
  display: block;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(180px, 1.4fr);
  gap: 10px;
  align-items: end;
}

label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

select,
input {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 4px 7px;
}

main {
  padding-bottom: 24px;
}

section {
  padding: 12px 18px 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--header-dark);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 5px 7px;
  border-bottom: 1px solid var(--soft-line);
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #e9edf2;
  border-bottom: 1px solid var(--line);
  color: #222;
  cursor: pointer;
  text-align: left;
}

th.sorted {
  background: #d7e2ef;
  color: #111;
}

th.sorted::after {
  content: " " attr(data-direction);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background: #fafbfc;
}

tbody tr:hover {
  background: #fff6d7;
}

td.sorted-cell {
  background: #eef5fc;
  font-weight: 700;
}

tbody tr:nth-child(even) td.sorted-cell {
  background: #e8f0f8;
}

tbody tr:hover td.sorted-cell {
  background: #ffeeb2;
}

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

.player-link {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

.player-link:hover,
.player-link:focus {
  text-decoration: underline;
}

.delta-pos {
  color: #17663a;
  font-weight: 700;
}

.delta-neg {
  color: #9d2525;
  font-weight: 700;
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  section {
    padding-left: 10px;
    padding-right: 10px;
  }
}
