/* CyberPaw base (UI restyle, spec §1): fonts, page defaults, type scale, links, focus ring.
   Colours come only from ui/tokens.css.

   While the legacy sheets are still loaded (they load AFTER this file), their element rules
   (body, a, :focus-visible, *) win ties, so the element defaults here match today's behaviour
   and take over unchanged when the legacy sheets go (Task 9). New markup should use the
   classes below and the ui/components.css classes rather than relying on element styles. */

/* Self-hosted fonts (CSP font-src 'self'). Same files and declarations as app.css, repeated
   here so the ui sheets stand alone once app.css is retired. */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2'), url('/fonts/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Bold.woff2') format('woff2'), url('/fonts/JetBrainsMono-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/IBMPlexSans-Regular.woff2') format('woff2'), url('/fonts/IBMPlexSans-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/IBMPlexSans-Bold.woff2') format('woff2'), url('/fonts/IBMPlexSans-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── Page defaults ─────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: var(--t-md);
  line-height: 1.5;
}
::selection { background: var(--c-accent-muted); color: var(--c-text); }

/* ── Links ─────────────────────────────────────────────────────────────────────────────── */
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── Focus ring: one ring everywhere, keyboard only ────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }

/* ── Type scale (12 / 13 / 14 / 16 / 20) ──────────────────────────────────────────────── */
.t-xs { font-size: var(--t-xs); line-height: 1.4; }
.t-sm { font-size: var(--t-sm); line-height: 1.45; }
.t-md { font-size: var(--t-md); line-height: 1.5; }
.t-lg { font-size: var(--t-lg); line-height: 1.35; font-weight: 600; }
.t-xl { font-size: var(--t-xl); line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.t-2 { color: var(--c-text-2); }
.t-3 { color: var(--c-text-3); }
/* Text colour helpers (replace the u-c-* utilities, Task 9). Status colours carry meaning: pair
   them with words, never colour alone. */
.t-1 { color: var(--c-text); }
.t-accent { color: var(--c-accent); }
.t-risk { color: var(--c-risk); }
.t-warn { color: var(--c-warn); }
.t-ok { color: var(--c-ok); }
.t-info { color: var(--c-info); }
.t-strong { font-weight: 600; }
.t-label {                       /* small muted section label, as in the sidebar groups */
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--c-text-3);
  letter-spacing: .02em;
}
/* .mono only: code/kbd/samp keep their legacy styling until the legacy sheets go (Task 9). */
.mono { font-family: var(--f-mono); }
.tnum { font-variant-numeric: tabular-nums; }

/* Visually hidden, still read by screen readers (same rule as app.css). */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
