/* Impact section (#impact) and the decorative eBPF canvas (#ebpf-bg).
   Tokens only: no colour literals. Tiles reuse the generic .card surface, so the
   tested contrast model applies unchanged. Bars use --muted (before) and --link
   (after); both are tested text-contrast tokens, so they meet 3:1 against the tile
   surface too. Bars are aria-hidden: meaning lives in the caption, value and labels. */

#impact .tile { margin: 0; }

.impact-note { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }

.impact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 16px;
}

.tile { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; }

.tile-title {
  margin: 0; color: var(--muted); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}

.tile-value {
  margin: 0; color: var(--text); font-size: 1.5rem; font-weight: 700; line-height: 1.2;
  overflow-wrap: anywhere; text-wrap: balance;
}

.tile-text { margin: 0; color: var(--text); font-size: 0.95rem; overflow-wrap: anywhere; }

.bars { display: grid; gap: 0.4rem; margin-top: auto; }

.bar-row {
  display: grid; grid-template-columns: 3.5rem 1fr; align-items: center; gap: 0.5rem;
  color: var(--muted); font-size: 0.8rem;
}

.bar-track {
  display: block; height: 10px; border-radius: 999px; background: var(--border); overflow: hidden;
}

.bar { display: block; height: 100%; }

.bar-before { background: var(--muted); }

.bar-after { background: var(--link); }

/* Scale rules: latency After = 50/500 = 10%; 6x Before = 1/6 = 17%; 9x Before = 1/9 = 11%. */
.w-10 { width: 10%; }
.w-11 { width: 11%; }
.w-17 { width: 17%; }
.w-100 { width: 100%; }

/* Grow-in only when the user has not asked for reduced motion and JS has armed the reveal. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .tile .bar { transform: scaleX(0); transform-origin: left; transition: transform .8s ease; }
  .reveal-ready main section.is-visible .tile .bar { transform: none; }
}

/* Background canvas: fixed, behind all content, never takes pointer events. */
#ebpf-bg {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
}

@media print {
  .bar-track { display: none; }
  #ebpf-bg { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  #ebpf-bg { display: none !important; }
}

@media (forced-colors: active) {
  #ebpf-bg { display: none !important; }
}
