:root {
  --bg: #fff;
  --text: #4a4a4a;
  --muted: #6b7280;
  --link: #3273dc;
  --link-hover: #000;
  --nav-current: #000;
  --button-fg: #fff;
  --button-bg: #3298dc;
  --button-bg-hover: #2793da;
  --chart-tick: #6b7280;
  --chart-grid: #e5e7eb;
  --tooltip-bg: #1f2937;
  --tooltip-fg: #f9fafb;
  --series-container: #0f766e;
  --series-production: #c2410c;
  --series-staging: #7c3aed;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0d1117;
    --text: #e6edf3;
    --muted: #8b949e;
    --link: #58a6ff;
    --link-hover: #79c0ff;
    --nav-current: #e6edf3;
    --button-fg: #fff;
    --button-bg: #1f6feb;
    --button-bg-hover: #388bfd;
    --chart-tick: #8b949e;
    --chart-grid: #30363d;
    --tooltip-bg: #161b22;
    --tooltip-fg: #e6edf3;
    --series-container: #2dd4bf;
    --series-production: #fb923c;
    --series-staging: #a78bfa;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #0d1117;
  --text: #e6edf3;
  --muted: #8b949e;
  --link: #58a6ff;
  --link-hover: #79c0ff;
  --nav-current: #e6edf3;
  --button-fg: #fff;
  --button-bg: #1f6feb;
  --button-bg-hover: #388bfd;
  --chart-tick: #8b949e;
  --chart-grid: #30363d;
  --tooltip-bg: #161b22;
  --tooltip-fg: #e6edf3;
  --series-container: #2dd4bf;
  --series-production: #fb923c;
  --series-staging: #a78bfa;
  color-scheme: dark;
}

html {
  font-family: BlinkMacSystemFont, -apple-system, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  font-size: 16px;
}
body {
  color: var(--text);
  background-color: var(--bg);
  margin: 8px;
  font-size: 1em;
  font-weight: 400;
}
header {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
  gap: 12px 16px;
  align-items: start;
}
a {
  color: var(--link);
  cursor: pointer;
  text-decoration: none;
}
a:hover {
  color: var(--link-hover);
}
button {
  color: var(--button-fg);
  background-color: var(--button-bg);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  padding: 4px 10px;
}
button:hover {
  background-color: var(--button-bg-hover);
}
button.theme-toggle {
  background: transparent;
  color: var(--text);
  border-color: var(--chart-grid);
}
button.theme-toggle:hover {
  background: var(--chart-grid);
}
.spacer {
  flex: auto;
}
.small {
  font-size: 0.75rem;
}
footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
#bench-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
#bench-nav a[aria-current='page'] {
  font-weight: 600;
  color: var(--nav-current);
  text-decoration: underline;
}
.swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.25rem;
  vertical-align: middle;
}
.swatch-container {
  background: var(--series-container);
}
.swatch-production {
  background: var(--series-production);
}
.swatch-staging {
  background: var(--series-staging);
}
.benchmark-chart-wrap {
  min-width: 0;
}
.benchmark-chart-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.benchmark-chart-title .budget-note {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.75rem;
}
.benchmark-chart-box {
  position: relative;
  height: 180px;
}
.benchmark-chart-box canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
#page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}
.caption {
  color: var(--muted);
  font-size: 0.875rem;
}
code {
  color: var(--text);
}
