:root {
  --bg: #1b1d22;
  --panel-bg: #24262d;
  --text: #e6e6e6;
  --muted: #7b7f8a;
  --correct: #4caf7d;
  --incorrect: #e05a5a;
  --missing: #b5453f;
  --accent: #6ea8fe;
  --warning: #e5b45c;
  --panel-border: rgba(255, 255, 255, 0.1);
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --reflow-pulse-tint: var(--accent);
  --reflow-pulse-duration: 0.5s;
}

/* The reflow pulse is a color fall-off with no movement, so it is toned
 * down here rather than switched off: a muted wash over a longer, gentler
 * fade. It has to keep animating in some form — app.js retires the
 * .reflowed class on animationend, so a branch with no animation would
 * strand the class on the span permanently. Driving it through custom
 * properties keeps the keyframe name stable, which is what that listener
 * matches on. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --reflow-pulse-tint: var(--muted);
    --reflow-pulse-duration: 0.9s;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

main {
  width: 100%;
  max-width: 760px;
}

header h1 {
  margin: 0;
  font-size: 1.75rem;
}

.subtitle {
  color: var(--muted);
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

/* Generic hover/focus tooltip, driven off data-tooltip. Shared across the
 * whole page: the top stat labels, the certification stat grid, and any
 * other [data-tooltip] element that shows up later. */
[data-tooltip] {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted var(--muted);
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 260px;
  max-width: 60vw;
  background: #0d0f12;
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  font-size: 0.72rem;
  line-height: 1.45;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s, transform 0.12s;
  z-index: 20;
}

[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

/* Shared by the certification-panel stat values and the top live stat
 * tiles: a number's unit, rendered smaller and gray next to it. */
.unit-label {
  color: var(--muted);
  font-size: 0.7em;
  font-weight: 400;
  margin-left: 0.3em;
}
