/* ============================================================================
   DDPM-Portal · BASE  — reset + element defaults. Consumes tokens.css only.
   ============================================================================ */

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

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-strong);
  line-height: var(--lh-tight);
  font-weight: var(--fw-semibold);
}
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { line-height: var(--lh-relaxed); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--primary-hover); text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

code, pre, kbd { font-family: var(--font-mono); font-size: 0.9em; }
code {
  background: var(--surface-alt);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  color: var(--color-coral-700);
}

hr { border: none; border-top: 1px solid var(--divider); margin: var(--space-6) 0; }

ul, ol { padding-left: var(--space-5); }

/* Form controls inherit the app font by default */
button, input, select, textarea { font: inherit; color: inherit; }

/* Consistent, visible keyboard focus everywhere (accessibility) */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* Honor reduced-motion preference */
@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;
  }
}

/* Screen-reader-only utility (used for icon-button labels) */
.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;
}
