/* Gemeinsames Aussehen der Übersichtsseiten (Startseite und Kapitel) */
:root {
  --bg: #14161a;
  --surface: #1d2026;
  --surface-hover: #252a32;
  --line: #2f343d;
  --text: #eef0f3;
  --muted: #9aa3b0;
  --accent: #f2b705;
  --radius: 16px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f2ee;
    --surface: #ffffff;
    --surface-hover: #fbfaf8;
    --line: #dedad2;
    --text: #1b1d21;
    --muted: #666d78;
    --accent: #c99700;
  }
}
* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 40px 16px 40px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 15px; margin-bottom: 18px; }
.back:hover { color: var(--text); }
header { margin: 16px 0 40px; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.kicker::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; margin: 12px 0 10px; letter-spacing: -.02em; }
header p { margin: 0; color: var(--muted); max-width: 56ch; font-size: 17px; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  list-style: none; padding: 0; margin: 0;
}
.card {
  display: flex; gap: 16px; align-items: flex-start;
  height: 100%; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.card:hover { background: var(--surface-hover); border-color: var(--accent); transform: translateY(-2px); }
.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.icon {
  flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden;
  background: var(--line); display: grid; place-items: center;
}
.icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.icon.letter { font-size: 30px; font-weight: 800; color: #1b1d21; background: var(--accent); }
.body { min-width: 0; }
.name { font-size: 19px; font-weight: 700; margin: 2px 0 4px; letter-spacing: -.01em; }
.desc { margin: 0 0 10px; color: var(--muted); font-size: 14.5px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}

/* Kapitelseite: ein Abschnitt pro Test, darin Lernen und Testen */
.test { margin-bottom: 48px; }
.test-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 18px; }
.test-head h2 { font-size: 28px; margin: 0; letter-spacing: -.01em; }
.date { color: var(--muted); font-size: 15px; }
.badge { font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #1b1d21; }
.badge.done { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.test > p { margin: -6px 0 18px; color: var(--muted); max-width: 64ch; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.col h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 700; }
.col h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.col.test-col h3::before { border-radius: 2px; }
.col .grid { grid-template-columns: 1fr; }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; } }

footer { margin-top: 20px; color: var(--muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

/* Prüfungsplanung */
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 22px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; }
.plan h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
.plan h3::before { content: ""; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.countdown { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1; margin: 0 0 14px; }
.countdown small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { position: relative; padding: 0 0 12px 7.4em; font-size: 14.5px; }
.timeline li::before { content: ""; position: absolute; left: 5.6em; top: 5px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); background: var(--surface); z-index: 1; box-sizing: border-box; }
.timeline li::after { content: ""; position: absolute; left: calc(5.6em + 4px); top: 15px; bottom: -5px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .d { position: absolute; left: 0; top: 0; }
.timeline .d { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline .past { opacity: .55; }
.timeline .now::before { background: var(--accent); border-color: var(--accent); }
.timeline .exam::before { background: var(--text); border-color: var(--text); border-radius: 2px; }
.timeline .exam { font-weight: 700; }
.timeline .sub { display: block; color: var(--muted); font-weight: 400; font-size: 13.5px; }
@media (max-width: 720px) { .plan { grid-template-columns: 1fr; } }

.note-link { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.note-link a { color: var(--text); }
