/* Base styles shared by portal and admin. Colours come from tokens.css roles only. */
html {
  background: var(--et-bg);
  color: var(--et-text);
}

body {
  background: var(--et-bg);
  color: var(--et-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.015em; /* Oswald is condensed: a little air helps body text (E10-8) */
  -webkit-font-smoothing: antialiased;
}

/* Element defaults sit in the base layer so Tailwind utilities (text-xl, font-bold ...) still win. */
@layer base {
  h1, h2, h3, h4 { font-weight: 500; letter-spacing: 0.01em; line-height: 1.25; } /* Oswald 700 is very heavy: 500-600 only. Sizes are NOT set here: pages own them. */
  /* Tables: at least 14px, tighter leading than prose. */
  table { font-size: 0.875rem; line-height: 1.45; }
  th { font-weight: 500; }
}

/* Mono text keeps its own metrics: no extra tracking. */
code,
kbd,
samp,
pre,
.font-mono {
  letter-spacing: 0;
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
  font-size: 0.9em;
}

table,
.tnum {
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--et-accent);
  outline-offset: 2px;
}

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

@media print {
  html,
  body {
    background: transparent;
    color: CanvasText;
  }
}

/* Type scale guidance tokens (E10-8, docs/plan/E10-brand-and-ui.md section 3). Pages may adopt them; no element default uses them. */
:root {
  --et-text-h1: 2.25rem;
  --et-text-h2: 1.75rem;
  --et-text-h3: 1.375rem;
  --et-text-h4: 1.125rem;
}
@media (max-width: 767px) {
  :root {
    --et-text-h1: 1.875rem;
    --et-text-h2: 1.5rem;
    --et-text-h3: 1.25rem;
  }
}
