/* Farben aus dem reha-team-halle-Designsystem (tokens/colors.css der Website). */
:root {
  --surface: #fdfbf7;
  --raised: #ffffff;
  --sunken: #f8f4ec;
  --border: #e9e3d8;
  --ink: #20303b;
  --muted: #51626e;
  --interactive: #0d86c4;
  --accent: #0a5c89;
  --dark: #16323f;
  --error: #b23b1e;
  --r: 0.875rem;
  --sans: "Lexend", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Faustina", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 1rem/1.55 var(--sans); }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem); margin: 0.5rem 0 0.5rem; }
h2 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.6rem); margin-bottom: 1rem; }
p { margin: 0; }
.leise { color: var(--muted); }
.block { display: block; }
.kopf, main { max-width: 72rem; margin: 0 auto; padding-inline: 2.5rem; }
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.5rem; font-size: 0.875rem; }
.kopf img { height: 2.2rem; width: auto; }
main { padding-bottom: 4rem; }
section { margin-top: 3rem; }
.unterzeile { margin-bottom: -1rem; }
.karte { background: var(--raised); border: 1px solid var(--border); border-radius: var(--r); padding: 1.25rem; }

/* Login */
.login { max-width: 28rem; margin-top: 2rem; }
.login form { display: flex; flex-direction: column; gap: 0.75rem; }
label { font-size: 0.875rem; font-weight: 600; margin-top: 0.5rem; }
input { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.8rem 0.9rem; }
input:focus-visible, button:focus-visible { outline: 2px solid var(--interactive); outline-offset: 2px; }
button { align-self: flex-start; font: 600 1rem var(--sans); color: #fff; background: var(--dark); border: 0; border-radius: 999px; padding: 0.8rem 1.6rem; cursor: pointer; }
button:hover { background: #11272f; }
.fehler { color: var(--error); font-weight: 600; font-size: 0.875rem; }

/* Kennzahlen */
.kennzahlen { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-top: 2rem; }
.k-titel { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.k-wert { font-family: var(--serif); font-size: 2.25rem; line-height: 1.2; margin: 0.25rem 0; font-variant-numeric: tabular-nums; }
.k-hinweis { font-size: 0.8rem; color: var(--muted); }

/* Tabelle */
.tabelle { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--raised); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 0.65rem 0.8rem; text-align: right; border-top: 1px solid var(--border); }
thead th { border-top: 0; background: var(--sunken); color: var(--muted); font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
thead th:first-child, tbody th { text-align: left; }
tbody th { font-weight: 400; min-width: 12rem; }
tbody th .leise { font-size: 0.875rem; }
.summe { background: var(--sunken); font-weight: 600; }
.summe th, .summe td { border-top: 2px solid var(--border); font-weight: 600; }

/* Verlauf und Trichter */
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.zweispaltig section { margin-top: 3rem; }
ol.karte { list-style: none; margin: 0; }
.tage { display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.875rem; }
.tage li { display: grid; grid-template-columns: 5.5rem 1fr; align-items: center; gap: 0.75rem; }
.tag-zeile { display: flex; align-items: center; gap: 0.75rem; font-variant-numeric: tabular-nums; }
.balken { display: block; height: 0.875rem; min-width: 0.25rem; border-radius: 999px; background: var(--interactive); }
.trichter { display: flex; flex-direction: column; gap: 1.25rem; }
.trichter p { display: flex; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.4rem; font-variant-numeric: tabular-nums; }
.spur { display: block; height: 0.875rem; border-radius: 999px; background: var(--sunken); }
.spur .balken { height: 100%; min-width: 0; }

.lesehilfe { max-width: 46rem; }
.lesehilfe ul { margin: 0; padding-left: 1.25rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.5rem; }
.lesehilfe strong { color: var(--ink); }

@media (max-width: 64rem) {
  .kennzahlen { grid-template-columns: repeat(3, 1fr); }
  .zweispaltig { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 48rem) {
  .kopf, main { padding-inline: 1.25rem; }
  .kennzahlen { grid-template-columns: repeat(2, 1fr); }
  .kennzahlen .karte:last-child { grid-column: span 2; }
}
