/* Reset + base — depends on tokens.css being loaded first.
   See docs/superpowers/specs/2026-05-14-opal-direction-design.md. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100dvh;
}

img, video, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
}

p { max-width: 70ch; }

::selection { background: var(--accent); color: var(--ink); }

:focus-visible {
  outline: 2px solid oklch(75% 0.20 252);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Page-level layout helper */
.shell {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  position: relative;
  isolation: isolate;
}

/* Mono utility (for labels/eyebrows/stats) */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* Reduced motion — disable decorative animation everywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* — Running progress gutter (fixed bottom-right) — */
.gutter {
  position: fixed;
  bottom: 22px;
  right: var(--container-pad);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  pointer-events: none;
}
.gutter__bar {
  width: 60px;
  height: 2px;
  background: var(--rule);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.gutter__fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

@media (max-width: 640px) { .gutter { display: none; } }
