/* Spots · Grundlagen: Reset, Typografie, Fokus, Seitenaufbau (B.1, B.4) */

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

html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}
button:disabled { cursor: default; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }

/* hidden gilt auch, wenn ein Element display im style-Attribut setzt */
[hidden] { display: none !important; }

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

.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;
}

/* Seite: mobil volle Breite, auf dem Desktop zentriert, höchstens 480 px */
#app {
  max-width: 480px;
  /* Was doch einmal zu breit ist, wird abgeschnitten statt die Seite seitlich verschiebbar zu machen.
     clip statt hidden: kein eigener Scroll-Bereich, sticky bleibt intakt. */
  overflow-x: clip;
  min-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
@media (min-width: 520px) {
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

.view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Kopfbereich: Zeile 44 px, Titel, Meta */
.head {
  padding: 4px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid var(--rule);
}
.head.no-rule { border-bottom: 0; }
.head-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  gap: 12px;
}
.head-title {
  font-size: 44px;
  line-height: .95;
  font-weight: 700;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.head-meta { font-size: 15px; color: var(--dim); }

.link-back, .link-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.link-action { font-weight: 600; color: var(--acc); }
.brand { font-size: 15px; font-weight: 700; }

.scroll { flex: 1; }

/* Leiste unten mit Primär-Button, bleibt sichtbar */
.bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.bottom-bar .summary { font-size: 15px; line-height: 1.3; }
.bottom-bar .summary strong { font-weight: 700; }
.bottom-bar .summary span { color: var(--dim); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 20px 10px;
}
.section-head h2 { font-size: 17px; font-weight: 700; }
.section-head .count { font-size: 14px; color: var(--dim); }

.dim { color: var(--dim); }
.acc { color: var(--acc); }
.small { font-size: 13px; color: var(--dim); }
.pad { padding: 0 20px; }

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