/* loader.css — page-global loading overlay (023 §5).

   Overlay, never a gate: the page markup is already in the DOM behind this, so
   a loader that failed to dismiss would still leave a readable page. */

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #05060d;
  transition: opacity 500ms ease;
}

.loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader__bar {
  width: min(220px, 46vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.loader__fill {
  width: 100%;
  height: 100%;
  background: #f4f4f4;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
}

.loader__count {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  opacity: 0.5;
}

/* Static under reduced motion — no animated indicator (000 §3.4). */
@media (prefers-reduced-motion: reduce) {
  .loader { transition: none; }
  .loader__fill { transition: none; }
}

/* ── ?perf harness panel (023 §8 check 13) ────────────────
   Dev-only: injected by core/perf.js, never present on a normal visit. */
#perf {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.82);
  padding: 14px 16px 18px;
  font: 600 15px/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.perf__status { font-size: 12px; opacity: 0.6; margin-bottom: 10px; letter-spacing: 0.08em; }
.perf__table { width: 100%; border-collapse: collapse; }
.perf__table th {
  font-size: 10px; letter-spacing: 0.1em; opacity: 0.5; text-align: right; padding-bottom: 6px;
}
.perf__table th:first-child, .perf__table td:first-child { text-align: left; }
.perf__table td { text-align: right; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.12); }
.perf__table td:first-child { opacity: 0.7; font-weight: 500; }
.perf__verdict { margin-top: 10px; font-size: 14px; }
.perf__verdict.is-pass { color: #39d353; }
.perf__verdict.is-fail { color: #ff5f56; }
