/* ============================================================================
   Base — Reset, Body, Typografie (v11 — Mobile-First Rewrite)
   KEINE body::before/after Overlays
   ============================================================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color-scheme: dark light;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-base);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

/* --- KEIN body::before (Noise), KEIN body::after (Mesh) --- */

/* --- Typografie --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p { color: var(--text-secondary); }

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}
a:hover { color: var(--accent-secondary-lt); }

code, pre, .mono {
  font-family: var(--font-mono);
}

.kpi-number {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' on, 'lnum' on;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
}

.label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-muted);
}

/* --- Global Touch Fix --- */
button, a, [role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* --- Selection --- */
::selection {
  background: rgba(240, 136, 62, 0.3);
  color: var(--text-primary);
}

[data-theme="light"] ::selection {
  background: rgba(212, 112, 42, 0.2);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(139, 148, 158, 0.2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 148, 158, 0.4);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* --- Focus Ring --- */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

/* --- Utility: Visually Hidden --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
