:root {
  --text: #1d1d1f;
  --muted: #5b5b66;
  --line: #e3e3e8;
  --bg: #ffffff;
  --panel: #f7f7f9;
  --accent: #0f6e74;
  --accent-text: #ffffff;
  --danger: #b42318;
  --rise: #1a7f37;
  --fall: #cf222e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #ececf1;
    --muted: #a1a1aa;
    --line: #2e2e36;
    --bg: #111114;
    --panel: #1a1a1f;
    --accent: #3fb6bd;
    --accent-text: #0b1214;
    --danger: #f97066;
    --rise: #3fb950;
    --fall: #ff7b72;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    16px / 1.5 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
header .brand {
  font-weight: 700;
  letter-spacing: 0.01em;
}
h1 {
  font-size: 1.5rem;
  margin: 8px 0 4px;
}
h2 {
  font-size: 1.05rem;
  margin: 28px 0 8px;
  color: var(--accent);
}
p.muted,
.muted {
  color: var(--muted);
}
ul.rows {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
ul.rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
ul.rows li:first-child {
  border-top: none;
}
.button,
button {
  display: inline-block;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
button.quiet {
  background: transparent;
  color: var(--accent);
}
button.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
form.inline {
  display: inline;
  margin: 0;
}
.notice {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 14px 16px;
}
code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

/* The page of an artifact (subjects 12.6): the data-as-of line first, then the blocks; every value is the text of its cell. */
main.artifact {
  max-width: 980px;
}
.asof {
  margin: 0;
  font-weight: 600;
}
.updated {
  margin: 2px 0 0;
  font-size: 0.9rem;
}
.rise {
  color: var(--rise);
}
.fall {
  color: var(--fall);
}
ul.tiles {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
ul.tiles li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.tile-name {
  font-weight: 600;
}
.tile-label {
  color: var(--muted);
  font-size: 0.85rem;
}
ul.tiles strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}
figure {
  margin: 20px 0;
}
figcaption {
  font-weight: 600;
  margin-bottom: 8px;
}
.chart-box {
  width: 100%;
  height: 340px;
}
details.values {
  margin-top: 6px;
  font-size: 0.9rem;
}
.table-box {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.table-box table,
details.values table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.table-box th,
.table-box td,
details.values th,
details.values td {
  padding: 8px 12px;
  text-align: right;
  white-space: nowrap;
  border-top: 1px solid var(--line);
}
.table-box th:first-child,
details.values th {
  text-align: left;
}
.table-box thead th {
  border-top: none;
  background: var(--panel);
  cursor: pointer;
  user-select: none;
}
.table-box thead th[aria-sort="ascending"]::after {
  content: " ▲";
}
.table-box thead th[aria-sort="descending"]::after {
  content: " ▼";
}
.summary {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  border-radius: 0 10px 10px 0;
}
section.stories ul {
  padding-left: 18px;
}
section.stories li {
  margin: 6px 0;
}
a {
  color: var(--accent);
}
section.note {
  margin-top: 28px;
  padding: 4px 16px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
section.note h2 {
  color: var(--muted);
  font-size: 0.95rem;
}
section.slide {
  margin: 28px 0;
  padding-top: 8px;
  border-top: 2px solid var(--line);
}
p.sources {
  margin-top: 28px;
  font-size: 0.85rem;
}
@media (max-width: 480px) {
  .chart-box {
    height: 280px;
  }
  ul.tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
