:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --warn: #b45309;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  padding: 28px clamp(16px, 4vw, 48px) 18px;
  background: #0b1f1d;
  color: #fff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
}

.topbar p {
  margin-top: 6px;
  color: #cbd5d1;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab,
.controls input,
.controls select,
th button {
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tab {
  padding: 9px 14px;
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, .35);
  cursor: pointer;
}

.tab.active {
  color: #0b1f1d;
  background: #fff;
}

main {
  padding: 22px clamp(16px, 4vw, 48px) 48px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(130px, .8fr) minmax(150px, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.controls input,
.controls select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.sectionHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 12px;
}

h2 {
  font-size: 22px;
}

.count {
  color: var(--muted);
  font-size: 14px;
}

.tableWrap,
.rankingGrid article,
.drawerPanel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tableWrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

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

th {
  color: var(--muted);
  background: #f9fafb;
  font-size: 13px;
}

th button {
  padding: 4px 7px;
  color: inherit;
  background: #fff;
  cursor: pointer;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #f1f8f6;
}

.score {
  white-space: nowrap;
  font-weight: 800;
}

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

.pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8f3f1;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.rankingGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rankingGrid article {
  padding: 16px;
}

.rankingGrid h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

ol {
  margin: 0;
  padding-left: 24px;
}

li {
  padding: 6px 0;
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: end;
  background: rgba(10, 15, 20, .45);
  z-index: 10;
}

.drawer.open {
  display: flex;
}

.drawerPanel {
  width: min(760px, 100vw);
  height: 100%;
  overflow: auto;
  border-radius: 0;
  padding: 24px;
}

.close {
  float: right;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
}

.detailGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.detailBlock {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detailBlock h3 {
  margin-bottom: 8px;
}

.detailBlock ul {
  margin: 0;
  padding-left: 18px;
}

.events {
  grid-column: 1 / -1;
}

.staff {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .controls,
  .rankingGrid,
  .detailGrid {
    grid-template-columns: 1fr;
  }

  .events {
    grid-column: auto;
  }
}
