:root {
  color-scheme: light;
  --bg: #fff;
  --fg: #171717;
  --muted: #666;
  --line: #d7d7d7;
  --panel: #f7f7f7;
  --panel-strong: #fff;
  --accent: #234d99;
  --accent-fg: #fff;
  --error: #b42318;
  --success: #067647;
  --field-bg: #fff;
  --field-fg: #111;
  --field-line: #cfcfcf;
  --row-alt: #f6f8fb;
  --chart-track: #f0f0f0;
  --chart-fill: #234d99;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 Georgia, "Times New Roman", serif;
}

a {
  color: inherit;
}

main {
  width: min(1100px, 92vw);
  margin: 2rem auto;
}

.narrow {
  max-width: 28rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: .5rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.nav a,
.nav button,
.button-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: .45rem;
  border: 1px solid var(--field-line);
  background: var(--panel-strong);
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.nav a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.push {
  margin-left: auto;
}

h1 {
  margin: 0 0 .9rem;
}

h2 {
  margin: 0 0 .9rem;
}

p {
  margin: 0 0 1rem;
}

form {
  margin: 1rem 0;
}

label {
  display: block;
  margin-bottom: .35rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 2.5rem;
  padding: .45rem .6rem;
  margin-bottom: 1rem;
  border: 1px solid var(--field-line);
  background: var(--field-bg);
  color: var(--field-fg);
  font: inherit;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

.checkbox-label input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.status-error {
  color: var(--error);
}

.status-success {
  color: var(--success);
}

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

.header-row,
.button-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

.button-row-end {
  align-items: end;
}

.header-row {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.chart-filters {
  grid-template-columns: 16rem 1fr auto;
}

.entity-letter-filters {
  grid-template-columns: 1fr;
}

.filter-group-label {
  margin-bottom: .4rem;
}

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

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

th,
td {
  padding: .55rem;
  text-align: left;
  vertical-align: top;
}

tbody tr:nth-child(odd) {
  background: var(--row-alt);
}

.inline {
  display: inline;
  margin: 0;
}

.chart-section {
  margin-bottom: 2rem;
}

.chart-row {
  margin-bottom: .5rem;
}

.chart-bar-track {
  background: var(--chart-track);
  height: 18px;
}

.chart-bar-fill {
  background: var(--chart-fill);
  height: 18px;
}

.chart-bar-width-0 { width: 0%; }
.chart-bar-width-1 { width: 1%; }
.chart-bar-width-2 { width: 2%; }
.chart-bar-width-3 { width: 3%; }
.chart-bar-width-4 { width: 4%; }
.chart-bar-width-5 { width: 5%; }
.chart-bar-width-6 { width: 6%; }
.chart-bar-width-7 { width: 7%; }
.chart-bar-width-8 { width: 8%; }
.chart-bar-width-9 { width: 9%; }
.chart-bar-width-10 { width: 10%; }
.chart-bar-width-11 { width: 11%; }
.chart-bar-width-12 { width: 12%; }
.chart-bar-width-13 { width: 13%; }
.chart-bar-width-14 { width: 14%; }
.chart-bar-width-15 { width: 15%; }
.chart-bar-width-16 { width: 16%; }
.chart-bar-width-17 { width: 17%; }
.chart-bar-width-18 { width: 18%; }
.chart-bar-width-19 { width: 19%; }
.chart-bar-width-20 { width: 20%; }
.chart-bar-width-21 { width: 21%; }
.chart-bar-width-22 { width: 22%; }
.chart-bar-width-23 { width: 23%; }
.chart-bar-width-24 { width: 24%; }
.chart-bar-width-25 { width: 25%; }
.chart-bar-width-26 { width: 26%; }
.chart-bar-width-27 { width: 27%; }
.chart-bar-width-28 { width: 28%; }
.chart-bar-width-29 { width: 29%; }
.chart-bar-width-30 { width: 30%; }
.chart-bar-width-31 { width: 31%; }
.chart-bar-width-32 { width: 32%; }
.chart-bar-width-33 { width: 33%; }
.chart-bar-width-34 { width: 34%; }
.chart-bar-width-35 { width: 35%; }
.chart-bar-width-36 { width: 36%; }
.chart-bar-width-37 { width: 37%; }
.chart-bar-width-38 { width: 38%; }
.chart-bar-width-39 { width: 39%; }
.chart-bar-width-40 { width: 40%; }
.chart-bar-width-41 { width: 41%; }
.chart-bar-width-42 { width: 42%; }
.chart-bar-width-43 { width: 43%; }
.chart-bar-width-44 { width: 44%; }
.chart-bar-width-45 { width: 45%; }
.chart-bar-width-46 { width: 46%; }
.chart-bar-width-47 { width: 47%; }
.chart-bar-width-48 { width: 48%; }
.chart-bar-width-49 { width: 49%; }
.chart-bar-width-50 { width: 50%; }
.chart-bar-width-51 { width: 51%; }
.chart-bar-width-52 { width: 52%; }
.chart-bar-width-53 { width: 53%; }
.chart-bar-width-54 { width: 54%; }
.chart-bar-width-55 { width: 55%; }
.chart-bar-width-56 { width: 56%; }
.chart-bar-width-57 { width: 57%; }
.chart-bar-width-58 { width: 58%; }
.chart-bar-width-59 { width: 59%; }
.chart-bar-width-60 { width: 60%; }
.chart-bar-width-61 { width: 61%; }
.chart-bar-width-62 { width: 62%; }
.chart-bar-width-63 { width: 63%; }
.chart-bar-width-64 { width: 64%; }
.chart-bar-width-65 { width: 65%; }
.chart-bar-width-66 { width: 66%; }
.chart-bar-width-67 { width: 67%; }
.chart-bar-width-68 { width: 68%; }
.chart-bar-width-69 { width: 69%; }
.chart-bar-width-70 { width: 70%; }
.chart-bar-width-71 { width: 71%; }
.chart-bar-width-72 { width: 72%; }
.chart-bar-width-73 { width: 73%; }
.chart-bar-width-74 { width: 74%; }
.chart-bar-width-75 { width: 75%; }
.chart-bar-width-76 { width: 76%; }
.chart-bar-width-77 { width: 77%; }
.chart-bar-width-78 { width: 78%; }
.chart-bar-width-79 { width: 79%; }
.chart-bar-width-80 { width: 80%; }
.chart-bar-width-81 { width: 81%; }
.chart-bar-width-82 { width: 82%; }
.chart-bar-width-83 { width: 83%; }
.chart-bar-width-84 { width: 84%; }
.chart-bar-width-85 { width: 85%; }
.chart-bar-width-86 { width: 86%; }
.chart-bar-width-87 { width: 87%; }
.chart-bar-width-88 { width: 88%; }
.chart-bar-width-89 { width: 89%; }
.chart-bar-width-90 { width: 90%; }
.chart-bar-width-91 { width: 91%; }
.chart-bar-width-92 { width: 92%; }
.chart-bar-width-93 { width: 93%; }
.chart-bar-width-94 { width: 94%; }
.chart-bar-width-95 { width: 95%; }
.chart-bar-width-96 { width: 96%; }
.chart-bar-width-97 { width: 97%; }
.chart-bar-width-98 { width: 98%; }
.chart-bar-width-99 { width: 99%; }
.chart-bar-width-100 { width: 100%; }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1115;
    --fg: #eceff4;
    --muted: #a6afbb;
    --line: #343a46;
    --panel: #181c23;
    --panel-strong: #20252e;
    --accent: #5a8cff;
    --accent-fg: #fff;
    --error: #ff8f8f;
    --success: #8fdb9c;
    --field-bg: #151922;
    --field-fg: #eceff4;
    --field-line: #3b4250;
    --row-alt: #171b23;
    --chart-track: #232834;
    --chart-fill: #5a8cff;
  }

  html {
    color-scheme: dark;
  }
}
