:root {
  --red: #C00000;
  --red-dark: #9A0000;
  --blue: #0070C0;
  --blue-dark: #005A9C;
  --cream: #FDF3EC;
  --ink: #1F2329;
  --muted: #6B7280;
  --line: #E7E2DD;
  --bg: #FFFFFF;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 17px;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--blue); }
.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 22px; }

/* Kopf */
.site-header { border-bottom: 3px solid var(--red); background: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 46px; height: 46px; }
.brand .name { font-weight: 800; font-size: 28px; letter-spacing: -.3px; line-height: 1.05; display: block; }
.brand .sub { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; letter-spacing: 1.2px; }
.header-right { font-size: 14px; color: var(--muted); }

main { flex: 1; padding: 44px 0 56px; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 14px; }
h2 { font-size: 21px; margin: 32px 0 10px; color: var(--red); }
.lead { font-size: 19px; color: #374151; margin: 0 0 26px; }
.eyebrow { color: var(--red); font-weight: 700; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 8px; }

/* Karten & Formulare */
.card { background: var(--cream); border-radius: var(--radius); padding: 28px; }
.card.white { background: #fff; border: 1px solid var(--line); }
label { display: block; font-weight: 600; font-size: 15px; margin: 18px 0 6px; }
input[type=email], input[type=text], input[type=password], select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #D6CFC8; border-radius: 10px; background: #fff;
}
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.code-input { text-transform: uppercase; letter-spacing: 3px; font-weight: 600; }
.btn {
  display: inline-block; font: inherit; font-weight: 600; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--blue); color: #fff; padding: 13px 26px; text-decoration: none; transition: background .15s;
}
.btn:hover { background: var(--blue-dark); }
.btn.red { background: var(--red); }
.btn.red:hover { background: var(--red-dark); }
.btn.ghost { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.btn:disabled { background: #B9C4CF; cursor: not-allowed; }
.btn.small { padding: 7px 13px; font-size: 14px; }
.actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 15px; }
.flash.error { background: #FDE8E8; color: #8A0F0F; border: 1px solid #F5C2C2; }
.flash.ok { background: #E8F4FC; color: #0B4F80; border: 1px solid #BFE0F5; }

/* Anleitung */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 52px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.science { border-left: 4px solid var(--blue); padding: 6px 0 6px 18px; color: #374151; font-size: 15.5px; margin-top: 28px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; font-weight: 500; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--blue); flex: none; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { margin: 0; font-weight: 500; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: 9px 16px; border: 1px solid #D6CFC8; border-radius: 999px; background: #fff;
  cursor: pointer; font-size: 15px; transition: all .12s;
}
.chips input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Test */
.test-top { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.test-top .wrap { padding-top: 14px; padding-bottom: 12px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 7px; }
.progress { height: 10px; background: #F1ECE7; border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--red); border-radius: 99px; transition: width .4s; }
.timer { height: 4px; background: #EEF3F8; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.timer > div { height: 100%; background: var(--blue); width: 100%; }
.timer.low > div { background: #E9993A; }

.pair { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.pair.done { border-color: #BFD9EE; }
.statements { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 18px; }
.statement { background: var(--cream); border-radius: 10px; padding: 16px 18px; font-size: 17px; font-weight: 500; }
.statement .tag { display:block; color: var(--red); font-weight: 700; font-size: 13px; letter-spacing: 1px; margin-bottom: 4px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale label { margin: 0; text-align: center; font-weight: 500; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale .dot {
  display: block; margin: 0 auto 6px; border-radius: 50%; border: 2px solid #C9D3DD; background: #fff; transition: all .12s;
}
.scale label:nth-child(1) .dot, .scale label:nth-child(5) .dot { width: 40px; height: 40px; }
.scale label:nth-child(2) .dot, .scale label:nth-child(4) .dot { width: 32px; height: 32px; margin-top: 4px; }
.scale label:nth-child(3) .dot { width: 24px; height: 24px; margin-top: 8px; }
.scale label:hover .dot { border-color: var(--blue); }
.scale input:checked + .dot { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 4px #D8E9F6; }
.scale input:focus-visible + .dot { outline: 2px solid var(--red); outline-offset: 2px; }
.test-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.hint { font-size: 14px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); margin-left: 16px; }

/* Danke */
.big-check { width: 64px; height: 64px; border-radius: 50%; background: var(--red); color: #fff; font-size: 34px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }

/* Admin */
.admin .wrap { max-width: 1180px; }
.admin-nav a { margin-left: 18px; text-decoration: none; font-weight: 600; color: var(--ink); }
.admin-nav a.active { color: var(--red); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: #fff; }
th { text-align: left; background: var(--blue); color: #fff; font-weight: 600; padding: 10px 10px; white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: #FFFBF8; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge.angelegt { background: #EEF0F3; color: #4B5563; }
.badge.eingeladen { background: #E2EFFA; color: #0B4F80; }
.badge.gestartet { background: #FFF1DC; color: #8A5300; }
.badge.abgeschlossen { background: #E3F4E8; color: #1F6B35; }
.inline { display: inline; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.code { font-family: Consolas, Menlo, monospace; letter-spacing: 1px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.panel-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 22px; margin-bottom: 30px; }
.warn { background: #FFF6E5; border: 1px solid #F3D19C; color: #6B4500; padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 14.5px; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 14px; }
.filters select { width: auto; padding: 8px 12px; }
.table-scroll { overflow-x: auto; }
.copy { cursor: pointer; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 26px; }
  main { padding: 28px 0 40px; }
  .grid2, .panel-grid { grid-template-columns: 1fr; }
  .statements { grid-template-columns: 1fr; gap: 10px; }
  .pair { padding: 16px; }
  .brand .name { font-size: 24px; }
  .header-right { display: none; }
}
