/*
 * Basis-CSS für alle Apps der Suite, nach dem Hansteinmedia-Designsystem.
 * Werte kommen ausschließlich aus tokens.css. Die App-Oberflächen sind dichter
 * gesetzt als die Website: Grundschrift body-sm (15/24) statt body (17/28).
 */
*, *::before, *::after { box-sizing: border-box; }

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

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 24px;
  background: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); }
h1 { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 22px; line-height: 30px; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 18px; line-height: 26px; font-weight: 650; }
p { margin: 0; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

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

.muted { color: var(--ink-muted); }
.eyebrow {
  font-family: var(--font-mono); font-size: 13px; line-height: 16px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted);
}
.data { font-family: var(--font-mono); font-size: 14px; line-height: 22px; font-variant-numeric: tabular-nums; }
.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;
}

/* Button */
.hm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font: inherit; font-size: 15px; line-height: 20px; font-weight: 600;
  min-height: 44px; padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.hm-btn--primary { background: var(--action); color: var(--on-action); }
.hm-btn--primary:hover { background: var(--action-hover); color: var(--on-action); }
.hm-btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.hm-btn--secondary:hover { background: var(--ink); color: var(--surface); }
.hm-btn--block { width: 100%; }

/* Badge */
.hm-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 13px; line-height: 20px; font-weight: 500;
  padding: 0 var(--space-2); border-radius: var(--radius-sm);
  background: var(--surface-sunken); color: var(--ink-muted); border: 1px solid var(--line);
}
.hm-badge--blue { background: var(--surface-tint); color: var(--accent); border-color: transparent; }

/* TextField */
.hm-field { display: flex; flex-direction: column; gap: var(--space-2); }
.hm-field__label { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
.hm-field__input {
  font: inherit; font-size: 15px; line-height: 24px; padding: 9px var(--space-3); width: 100%;
  background: var(--surface-raised); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
}
.hm-field__input::placeholder { color: var(--ink-muted); }
.hm-field--error .hm-field__input { border-color: var(--danger); }
.hm-field__hint { font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.hm-field__error { font-size: 13px; line-height: 20px; font-weight: 600; color: var(--danger); }

/* Notice: info und success teilen die blaue Fläche, es gibt bewusst kein Grün */
.hm-notice {
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg);
  background: var(--surface-tint); color: var(--ink);
}
.hm-notice--warning { background: var(--warning-soft); }
.hm-notice--danger { background: var(--danger-soft); }
.hm-notice__title { font-weight: 650; }
.hm-notice--danger .hm-notice__title { color: var(--danger); }
.hm-notice--warning .hm-notice__title { color: var(--warning); }

/* Karte */
.hm-card {
  padding: var(--space-5); background: var(--surface-raised);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
