:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --grid: #e1e0d9;
  --axis: #898781;
  --border: rgba(11, 11, 11, 0.12);
  --band: #efeee9;
  --pos: #2a78d6;
  --neg: #e34948;
  --link: #1c5cab;
  --focus: #104281;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --grid: #2c2c2a;
    --axis: #898781;
    --border: rgba(255, 255, 255, 0.12);
    --band: #2a2a27;
    --pos: #3987e5;
    --neg: #e66767;
    --link: #86b6ef;
    --focus: #86b6ef;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font:
    16px/1.5 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
}
a {
  color: var(--link);
  text-underline-offset: 0.15em;
}
:where(a, button, select, input, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
/* Targets of in-page links (the skip link, "ask a question") take focus but are not controls. */
:where(main, h2)[tabindex='-1']:focus {
  outline: none;
}
.wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 16px;
}
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}

header.site {
  padding-block: 32px 8px;
}
.tag {
  display: inline-block;
  margin: 0 0 12px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.lede {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  color: var(--ink-2);
  max-width: 62ch;
}
.notice {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-2);
  max-width: 75ch;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
  margin-block: 24px 16px;
}
.field {
  display: grid;
  gap: 4px;
}
.field label {
  font-size: 0.875rem;
  font-weight: 600;
}
select {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  min-height: 44px;
  min-width: 15rem;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--axis);
  border-radius: 8px;
}
.download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 4px;
  font-weight: 600;
}
.summary {
  font-size: 1.0625rem;
  max-width: 70ch;
  margin: 0 0 20px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.tile dt {
  font-size: 0.875rem;
  color: var(--ink-2);
}
.tile dd {
  margin: 0;
}
.tile .big {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
}
.tile .small {
  font-size: 0.875rem;
  color: var(--ink-2);
}

.grid2 {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
@media (min-width: 900px) {
  .grid2 {
    grid-template-columns: 1fr 1fr;
  }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 18px 14px;
  margin-bottom: 16px;
  min-width: 0;
}
.grid2 .card {
  margin-bottom: 0;
}
.card h2 {
  font-size: 1.125rem;
  margin: 0 0 2px;
}
.sub {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.note {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.chart {
  position: relative;
  border-radius: 8px;
}
.chart svg {
  display: block;
  overflow: visible;
}
.chart text {
  fill: var(--ink-2);
  font-size: 13px;
  font-family: inherit;
}
.chart text.lbl {
  fill: var(--ink);
}
.chart text.strong {
  font-weight: 600;
}
.chart text.val {
  fill: var(--ink);
  font-variant-numeric: tabular-nums;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.chart text.tick {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chart .grid {
  stroke: var(--grid);
  stroke-width: 1;
}
.chart .zero {
  stroke: var(--axis);
  stroke-width: 1;
}
.chart .ref {
  stroke: var(--ink-2);
  stroke-width: 1;
}
.chart .bar.pos {
  fill: var(--pos);
}
.chart .bar.neg {
  fill: var(--neg);
}
.chart .hit {
  fill: transparent;
}
.chart .band {
  fill: var(--band);
}
.chart .halo {
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 6px;
  stroke-linejoin: round;
}
.chart .shade {
  fill: transparent;
}
.chart .shade.band,
.chart .shade.on {
  fill: var(--band);
}
.chart .row.rank-row.on .hit {
  fill: transparent; /* the rank chart shades rows in its back layer, behind the lines */
}
.chart .row.sel .halo,
.chart .row.on .halo,
.chart .row.sel text.val,
.chart .row.on text.val {
  stroke: var(--band);
}
.chart .row.on .hit {
  fill: var(--band);
}
.chart .line {
  fill: none;
  stroke: var(--pos);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart .dot {
  fill: var(--pos);
  stroke: var(--surface);
  stroke-width: 2;
}
.chart .dot.on {
  r: 6;
}
.chart .cross {
  stroke: var(--axis);
  stroke-width: 1;
}
.readout {
  margin: 8px 0 0;
  padding: 8px 10px;
  min-height: 3.1em;
  border-top: 1px solid var(--grid);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink-2);
}
.readout strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 820px;
  font-size: 0.9375rem;
}
caption,
.cap {
  text-align: left;
  font-size: 0.875rem;
  color: var(--ink-2);
  padding-bottom: 8px;
}
.cap {
  margin: 0;
  max-width: 75ch;
}
th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--grid);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
th:first-child,
td:first-child {
  text-align: left;
}
thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  vertical-align: bottom;
  color: var(--ink-2);
}
th:has(> button) {
  padding: 0;
}
th button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 600;
  color: inherit;
}
th:first-child button {
  justify-content: flex-start;
}
th button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}
th button svg {
  flex: none;
  width: 10px;
  height: 10px;
  margin-bottom: 4px;
  opacity: 0;
}
th[aria-sort] button svg {
  opacity: 1;
}
th[aria-sort='descending'] button svg {
  transform: rotate(180deg);
}
tbody th {
  font-weight: 400;
  white-space: nowrap;
}
tbody th,
tfoot th {
  position: sticky;
  left: 0;
  background: var(--surface);
}
tbody tr.sel > * {
  background: var(--band);
}
tbody tr.sel th {
  font-weight: 600;
}
tfoot th,
tfoot td {
  font-weight: 600;
  border-bottom: 0;
  border-top: 2px solid var(--axis);
}

/* ---------- Ask the data ---------- */
.ask .sub {
  max-width: 70ch;
}
.ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* keeps the question box inside its card on a 320 px screen */
  gap: 6px;
  margin-top: 4px;
}
.ask-form label {
  font-size: 0.875rem;
  font-weight: 600;
}
.ask-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ask-row input {
  flex: 1 1 18rem;
  min-width: 0;
  min-height: 44px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  padding: 8px 12px;
  border: 1px solid var(--axis);
  border-radius: 8px;
}
.btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--focus);
  background: var(--focus);
  color: var(--surface);
}
.btn[aria-disabled='true'] {
  cursor: progress;
  opacity: 0.7;
}
.btn-quiet {
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--axis);
  background: var(--page);
  color: var(--ink);
}
.btn-quiet:hover,
.btn:hover {
  filter: brightness(1.08);
}
.hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
  padding: 0;
  list-style: none;
}
.ask-log {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* lets a wide answer table scroll in its box instead of widening the page */
  gap: 12px;
}
.ask-log:empty {
  display: none;
}
.qa {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--page);
}
.qa .q {
  margin: 0 0 6px;
  font-weight: 600;
}
.qa .a-text {
  margin: 0;
}
.qa .meta {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.qa table {
  min-width: 0;
  width: auto;
  margin-top: 8px;
  font-size: 0.875rem;
}
.qa .table-wrap {
  margin-top: 4px;
}
.qa caption {
  padding-bottom: 4px;
}
.qa th.num,
.qa td.num {
  text-align: right;
}
.qa th,
.qa td {
  text-align: left;
  padding: 4px 10px;
}
.qa thead th {
  color: var(--ink-2);
}
.qa tbody th {
  white-space: normal;
}
@media (max-width: 520px) {
  .qa {
    padding-inline: 10px;
  }
  .qa th,
  .qa td {
    padding-inline: 6px;
  }
}
.ask-status {
  min-height: 1.5em;
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.ask-note {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
  max-width: 75ch;
}
.ask-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.ask-tools[hidden] {
  display: none;
}

.about {
  margin-block: 32px 8px;
  max-width: 75ch;
}
.about h2 {
  font-size: 1.25rem;
  margin: 0 0 8px;
}
.about h3 {
  font-size: 1rem;
  margin: 20px 0 4px;
}
.about p,
.about li {
  color: var(--ink-2);
}
.about ul {
  padding-left: 1.2em;
  margin: 0;
}
.about li + li {
  margin-top: 4px;
}
footer.foot {
  padding-block: 24px 40px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

@media (max-width: 520px) {
  select {
    min-width: 0;
    width: 100%;
  }
  .field {
    width: 100%;
  }
  .chart text {
    font-size: 12px;
  }
}
@media (forced-colors: active) {
  .chart .bar.pos,
  .chart .dot {
    fill: CanvasText;
  }
  .chart .bar.neg {
    fill: GrayText;
  }
  .chart .line {
    stroke: CanvasText;
  }
}
@media print {
  .ask-form,
  .examples,
  .ask-tools {
    display: none;
  }
  .filters select {
    border: 0;
  }
  .readout {
    display: none;
  }
}
