/* =========================================================
   BASE — resets, typography, document defaults
   (aus /ui übernommen, Google-Fonts-Import entfernt:
    All-Inkl-Kompatibilität ohne externe CDN-Abhängigkeit)
   ========================================================= */

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

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

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

h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--text-strong); font-weight: var(--fw-semibold); line-height: var(--lh-snug); letter-spacing: -0.01em; }
h1 { font-size: var(--fs-24); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-20); }
h3 { font-size: var(--fs-16); }
h4 { font-size: var(--fs-14); }

p { margin: 0; }
a  { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 999px; border: 2px solid var(--bg-app); }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

.sidebar ::-webkit-scrollbar-thumb { background: #374151; border-color: var(--bg-sidebar); }

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--r-sm);
}

.text-muted   { color: var(--text-muted); }
.text-soft    { color: var(--text-soft); }
.text-strong  { color: var(--text-strong); }
.text-danger  { color: var(--color-danger-600); }
.text-warning { color: var(--color-warning-600); }
.text-success { color: var(--color-success-600); }
.text-brand   { color: var(--color-brand-500); }
.font-mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }

.fs-11 { font-size: var(--fs-11); }
.fs-12 { font-size: var(--fs-12); }
.fs-13 { font-size: var(--fs-13); }
.fs-14 { font-size: var(--fs-14); }
.fs-15 { font-size: var(--fs-15); }
.fs-16 { font-size: var(--fs-16); }
.fs-18 { font-size: var(--fs-18); }
.fs-20 { font-size: var(--fs-20); }
.fs-24 { font-size: var(--fs-24); }

.fw-regular  { font-weight: var(--fw-regular); }
.fw-medium   { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold     { font-weight: var(--fw-bold); }

.uppercase   { text-transform: uppercase; letter-spacing: 0.06em; }

.stack-1 > * + * { margin-top: var(--sp-1); }
.stack-2 > * + * { margin-top: var(--sp-2); }
.stack-3 > * + * { margin-top: var(--sp-3); }
.stack-4 > * + * { margin-top: var(--sp-4); }
.stack-6 > * + * { margin-top: var(--sp-6); }

.row { display: flex; align-items: center; }
.row-2 { display: flex; align-items: center; gap: var(--sp-2); }
.row-3 { display: flex; align-items: center; gap: var(--sp-3); }
.row-4 { display: flex; align-items: center; gap: var(--sp-4); }
.row-6 { display: flex; align-items: center; gap: var(--sp-6); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.col   { display: flex; flex-direction: column; }
.col-2 { display: flex; flex-direction: column; gap: var(--sp-2); }
.col-3 { display: flex; flex-direction: column; gap: var(--sp-3); }
.col-4 { display: flex; flex-direction: column; gap: var(--sp-4); }
.col-6 { display: flex; flex-direction: column; gap: var(--sp-6); }
.grow { flex: 1 1 auto; min-width: 0; }
.shrink-0 { flex-shrink: 0; }
.w-full { width: 100%; }

.icon { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 1.75; stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }

.avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, #E5E7EB, #CBD5E1);
  color: var(--color-ink-700);
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  display: inline-flex; align-items: center; justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
  letter-spacing: 0;
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 40px; height: 40px; font-size: var(--fs-14); }
.avatar-xl { width: 56px; height: 56px; font-size: var(--fs-18); }
.avatar.avatar-brand { background: linear-gradient(135deg, #FAC6CB, #E45662); color: #5C0810; }
.avatar.avatar-ink   { background: linear-gradient(135deg, #4B5563, #1F2937); color: #fff; }
.avatar-ring { box-shadow: 0 0 0 2px var(--bg-card); }

kbd {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  padding: 1px 5px;
  border-radius: var(--r-sm);
  color: var(--text-soft);
}

.divider {
  display: flex; align-items: center; gap: var(--sp-3);
  color: var(--text-muted);
  font-size: var(--fs-12);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: var(--fw-medium);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* visually-hidden – aus Sprint 2.1 übernommen */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
    border: 0;
}
