/*
 * Document-level styles and design tokens.
 *
 * The components render into shadow roots, so almost nothing here reaches them - custom properties
 * are the deliberate exception, since they pierce the shadow boundary. That makes this file the one
 * place a colour or a font changes, without any component needing to know about the others.
 */

:root {
  color-scheme: light dark;

  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #16191d;
  --ink-soft: #5c6672;
  --ink-faint: #949ba5;
  --line: #e3e6ea;

  --accent: #2f6fed;
  --over: #d6453d;
  --under: #7f8894;
  --grid: #eceff3;
  --volume: #ccd9f2;

  --radius: 10px;
  --shadow: 0 1px 2px rgb(16 25 40 / 6%), 0 4px 16px rgb(16 25 40 / 4%);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --panel: #1c2027;
    --ink: #e8ecf1;
    --ink-soft: #9aa4b1;
    --ink-faint: #6b7684;
    --line: #2b313a;

    --accent: #6b9bff;
    --over: #ff6b60;
    --under: #7a8595;
    --grid: #262c35;
    --volume: #39445c;

    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 20%);
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

header.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 span {
  color: var(--ink-faint);
  font-weight: 400;
}

#freshness {
  color: var(--ink-faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

footer.coverage {
  margin-top: 24px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.7;
}

footer.coverage code {
  font-family: var(--mono);
}

/* Shown only if the browser never upgrades the custom elements, which would otherwise be a
   silently blank page. */
.nojs {
  display: none;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink-soft);
}

.failed .nojs {
  display: block;
}
