[hidden] {
  display: none !important;
}
:root {
  font-family: system-ui, sans-serif;
  color: #172033;
  background: #f5f7fb;
}
body {
  margin: 0;
}
main {
  max-width: 1400px;
  margin: auto;
  padding: 28px 20px 60px;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
h1 {
  font-size: 28px;
}
h2 {
  font-size: 21px;
}
.muted {
  color: #536278;
}
.card {
  background: white;
  border: 1px solid #dfe5f0;
  border-radius: 12px;
  padding: 18px;
  margin: 16px 0;
}
.hidden {
  display: none !important;
}
.error {
  background: #fff0f2;
  color: #921a2d;
  padding: 14px;
  border-radius: 8px;
}
button,
.button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  background: #2d5be3;
  color: white;
  text-decoration: none;
  display: inline-block;
}
button.secondary {
  background: #e8edf9;
  color: #21345f;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b45309;
  outline-offset: 3px;
}
input,
select {
  font: inherit;
  display: block;
  border: 1px solid #a9b5c9;
  border-radius: 7px;
  padding: 8px;
  background: white;
}
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}
.toolbar label {
  font-size: 14px;
}
nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 10px 0;
}
a {
  color: #244cb9;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metrics strong {
  display: block;
  font-size: 25px;
  margin-top: 8px;
}
.metrics button.card {
  color: #334155;
  text-align: left;
}
.metrics button.card:hover {
  background: #f0fdfa;
  border-color: #007f86;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
td,
th {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #e7ebf2;
  vertical-align: top;
}
th {
  font-size: 13px;
  color: #536278;
}
td button {
  padding: 6px 10px;
}
.rankings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.rankings ol {
  padding-left: 24px;
}
.rankings li {
  margin: 8px 0;
}
.rankings button {
  background: #eef2fc;
  color: #21345f;
}
#graph {
  height: 480px;
  overflow: hidden;
  border-radius: 10px;
  background: #101d32;
}
#graph:empty {
  height: 0;
}
#selection {
  border-left: 4px solid #2d5be3;
}
details {
  margin-top: 18px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
dialog {
  max-width: 700px;
  width: calc(100% - 60px);
  border: 1px solid #b9c3d5;
  border-radius: 12px;
}
dialog::backdrop {
  background: #101d3280;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  header {
    align-items: start;
    flex-direction: column;
  }
  .metrics,
  .rankings {
    grid-template-columns: 1fr 1fr;
  }
  .rankings {
    grid-template-columns: 1fr;
  }
  main {
    padding: 20px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
