:root {
  --bg: #f7f8f3;
  --surface: #ffffff;
  --line: #d9ded4;
  --text: #171717;
  --muted: #667064;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --amber: #b45309;
  --red: #b42318;
  --green-soft: #dff3ea;
  --amber-soft: #fff1d6;
  --shadow: 0 18px 55px rgba(30, 38, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  width: min(1420px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 42px;
}

.header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: 0;
}

.updated {
  min-width: 220px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(30, 38, 34, 0.08);
}

.updated span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.updated strong {
  font-size: 15px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.stat {
  min-height: 86px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat:nth-child(2) {
  background: var(--green-soft);
}

.stat:nth-child(4) {
  background: var(--amber-soft);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
}

.tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tab,
.json-link {
  min-height: 38px;
  border-radius: 6px;
  font: inherit;
  font-weight: 750;
}

.tab {
  border: 0;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.tab.active {
  color: #fff;
  background: var(--teal);
}

.search {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.json-link {
  display: inline-grid;
  place-items: center;
  padding: 0 16px;
  border: 1px solid var(--text);
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
}

.table-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.table-heading h2 {
  font-size: 18px;
}

.table-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.table-scroll {
  width: 100%;
  overflow: auto;
  max-height: calc(100vh - 310px);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef2ea;
  color: #28312a;
  font-size: 12px;
  text-transform: uppercase;
}

th button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  text-align: left;
}

td.numeric,
th.numeric button {
  justify-content: flex-end;
  text-align: right;
}

tbody tr:hover {
  background: #f3f7f2;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.score-high {
  color: var(--teal-dark);
  font-weight: 850;
}

.score-mid {
  color: var(--amber);
  font-weight: 800;
}

.status-active {
  color: var(--teal-dark);
  font-weight: 800;
}

.status-pending {
  color: var(--red);
  font-weight: 750;
}

.sort-mark {
  color: var(--teal);
  font-size: 14px;
}

.empty {
  padding: 42px;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 820px) {
  .page {
    width: min(100% - 20px, 1420px);
    padding-top: 12px;
  }

  .header,
  .table-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .updated {
    min-width: 0;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .table-scroll {
    max-height: calc(100vh - 420px);
  }
}

@media (max-width: 460px) {
  .stats {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 42px;
  }
}
