/* ZiB Prüfungstrainer – Farben wie im Heft (style_v5.css) */
:root {
  --navy: #0f2f4a;
  --navy-mid: #134e6f;
  --teal: #0e7490;
  --text: #1f2937;
  --muted: #4b5563;
  --subtle: #6b7280;
  --line: #e5e7eb;
  --line-strong: #cbd5e1;
  --bg: #f1f5f9;
  --card: #ffffff;
  --soft: #e2e8f0;
  --note-bg: #f8fafc;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(15, 47, 74, 0.08);
  --max: 40rem;
}

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

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a { color: var(--teal); }
a:hover { color: var(--navy); }
a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: linear-gradient(160deg, #0f2f4a 0%, #134e6f 60%, #0e7490 100%);
  color: #fff;
  padding: 1.75rem 0 2rem;
}

.site-header a { color: #fff; }

.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  font-weight: 600;
}

.site-header h1 {
  margin: 0 0 0.65rem;
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}

.meta {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.92;
}

/* Main */
main { padding: 1.35rem 0 2.5rem; }

h2 {
  margin: 0 0 0.55rem;
  color: var(--navy);
  font-size: 1.25rem;
  line-height: 1.25;
}

h3 {
  margin: 0 0 0.4rem;
  color: var(--navy);
  font-size: 1.05rem;
}

p { margin: 0 0 0.8rem; }
p:last-child { margin-bottom: 0; }

.lead {
  color: var(--muted);
  margin-bottom: 1rem;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.featured {
  border: none;
  border-left: 5px solid var(--teal);
  background: var(--card);
  padding: 1.2rem 1.15rem 1.25rem 1.2rem;
}

.badge {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}

.downloads {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.dl {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
}

.dl:hover {
  border-color: var(--teal);
  background: #fff;
  color: inherit;
}

.dl:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.dl-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.02rem;
}

.dl-meta {
  font-size: 0.88rem;
  color: var(--subtle);
}

.dl-action {
  margin-top: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  min-height: 2.6rem;
}

.dl:hover .dl-action { background: var(--navy-mid); }

.dl.secondary .dl-action {
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.dl.secondary:hover .dl-action {
  background: var(--navy);
  color: #fff;
}

.extras { margin-top: 1.6rem; }

.guide {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.35rem 0 0.9rem;
}

.guide ol {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.guide li { margin: 0.25rem 0; }

.note {
  background: var(--note-bg);
  border-left: 4px solid var(--navy);
  border-radius: 0 10px 10px 0;
  padding: 0.95rem 1.05rem;
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Legal pages: Überschriften im Kopf bleiben weiß wie auf der Startseite */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.legal h2 {
  margin-top: 1.35rem;
  font-size: 1.12rem;
}
.legal address {
  font-style: normal;
  margin: 0 0 0.8rem;
}
.back {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
}
.back:hover { opacity: 1; color: #fff; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line-strong);
  background: #fff;
  padding: 1.15rem 0 1.4rem;
  font-size: 0.88rem;
  color: var(--subtle);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; color: var(--teal); }

@media (min-width: 560px) {
  .site-header { padding: 2.1rem 0 2.35rem; }
  .site-header h1 { font-size: 1.85rem; }
  .downloads { grid-template-columns: 1fr 1fr; }
  .card, .featured { padding: 1.35rem 1.4rem 1.4rem; }
}

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