/* COGNIFLY – Designsystem
   Konzept: Nachtanflug. Tiefes Navy wie das Cockpit bei Nacht, weißes AST-Logo, ein kühles Himmelblau als einzige Akzentfarbe,
   Bernstein ausschließlich für Zeitdruck und Warnungen. Zahlen in B612 Mono (Cockpit-Schrift von Airbus). */
@font-face { font-family: "Barlow"; src: url(../fonts/barlow-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(../fonts/barlow-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(../fonts/barlow-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(../fonts/barlow-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url(../fonts/barlow-semi-condensed-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url(../fonts/barlow-semi-condensed-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url(../fonts/barlow-semi-condensed-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "B612 Mono"; src: url(../fonts/b612-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "B612 Mono"; src: url(../fonts/b612-mono-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #060d16;
  --bg-raise: #0a1520;
  --panel: #0d1926;
  --panel-2: #112030;
  --panel-3: #16283b;
  --line: rgba(150, 182, 214, .13);
  --line-2: rgba(150, 182, 214, .24);
  --ink: #edf2f7;
  --ink-2: #c2cedb;
  --muted: #8395a8;
  --faint: #55687c;
  --accent: #5db8ff;
  --accent-2: #a9dbff;
  --accent-ink: #03101c;
  --amber: #ffb547;
  --ok: #3ccf8e;
  --bad: #ff6a5c;
  --dlr: #5db8ff;
  --bq: #ffb547;
  --sky: #2a5e8f; --ground: #6b4a2b;
  --scope-bg: #050c14; --display-0: #0f2338; --display-1: #060d16; --demo-glow: #10233a; --scrim: rgba(3, 8, 14, .66);
  --cube-edge: #dfe8f1; --cube-top: #33506b; --cube-front: #233a52; --cube-side: #182b3e; --cube-net: #233a52; --cube-back: #0f1d2b; --cube-sym: #f3f7fb;
  --p0: #5db8ff; --p1: #ffb547; --p2: #3ccf8e; --p3: #c39bff; --shadow: 0 1px 0 transparent;
  --display: "Barlow Semi Condensed", "Barlow", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "B612 Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --num: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --r: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* ---------- Heller Modus ---------- */
:root[data-theme="light"] {
  --bg: #f2f4f7; --bg-raise: #ffffff; --panel: #ffffff; --panel-2: #eef2f6; --panel-3: #e3e9ef;
  --line: rgba(12, 24, 36, .11); --line-2: rgba(12, 24, 36, .2);
  --ink: #0c1824; --ink-2: #33475b; --muted: #5d7084; --faint: #8796a6;
  --accent: #1170c4; --accent-2: #0b5aa1; --accent-ink: #ffffff; --amber: #b56a00; --ok: #138657; --bad: #c8382b;
  --dlr: #1170c4; --bq: #b56a00;
  --scope-bg: #f7f9fb; --display-0: #ffffff; --display-1: #e9eef3; --demo-glow: #e6eef7; --scrim: rgba(12, 24, 36, .35);
  --cube-edge: #0c1824; --cube-top: #ffffff; --cube-front: #e3e9f0; --cube-side: #c9d4df; --cube-net: #ffffff; --cube-back: #c9d3dd; --cube-sym: #0c1824;
  --p0: #1170c4; --p1: #b56a00; --p2: #138657; --p3: #7a4fd0; --shadow: 0 1px 2px rgba(12, 24, 36, .06), 0 8px 24px rgba(12, 24, 36, .05);
  color-scheme: light;
}
:root[data-theme="light"] .panel, :root[data-theme="light"] .qpanel, :root[data-theme="light"] .card, :root[data-theme="light"] .result, :root[data-theme="light"] .table-wrap, :root[data-theme="light"] .opt, :root[data-theme="light"] .mc-opt { box-shadow: var(--shadow); }
:root[data-theme="light"] .login-panel { background: linear-gradient(180deg, #ffffff, #f2f4f7); }
:root[data-theme="light"] .demo-banner { color: #8a5200; }
.logo-pair { display: inline-flex; }
.logo-pair img { height: inherit; width: auto; }
.logo-pair .lg-dark { display: none; }
:root[data-theme="light"] .logo-pair .lg-light { display: none; }
:root[data-theme="light"] .logo-pair .lg-dark { display: block; }
.theme-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.theme-switch button { width: 34px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.theme-switch button svg { width: 17px; height: 17px; }
.theme-switch button[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); }
.tag.p0 { color: var(--p0); border-color: color-mix(in srgb, var(--p0) 45%, transparent); background: color-mix(in srgb, var(--p0) 9%, transparent); }
.tag.p1 { color: var(--p1); border-color: color-mix(in srgb, var(--p1) 45%, transparent); background: color-mix(in srgb, var(--p1) 9%, transparent); }
.tag.p2 { color: var(--p2); border-color: color-mix(in srgb, var(--p2) 45%, transparent); background: color-mix(in srgb, var(--p2) 9%, transparent); }
.tag.p3 { color: var(--p3); border-color: color-mix(in srgb, var(--p3) 45%, transparent); background: color-mix(in srgb, var(--p3) 9%, transparent); }
.prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.prog-card { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; color: var(--ink); font: inherit; transition: border-color .2s, transform .2s var(--ease); box-shadow: var(--shadow); }
.prog-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.prog-card.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.prog-card h3 { font-size: 21px; }
.prog-card .stats { display: flex; gap: 18px; color: var(--muted); font-size: 14px; }
.prog-card .stats b { color: var(--ink); font-family: var(--num); font-size: 18px; font-weight: 600; }
.mod-row td .move { display: inline-flex; gap: 4px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.wizard { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; background: radial-gradient(80% 60% at 50% 0%, var(--demo-glow), var(--bg)); }
.wizard .box { width: min(560px, 100%); display: flex; flex-direction: column; gap: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 36px 40px; box-shadow: var(--shadow); }
.wizard .box .logo-pair { height: 64px; }
.code-reveal { font: 400 38px/1 var(--mono); letter-spacing: .14em; color: var(--accent); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#app { min-height: 100%; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: .005em; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 600; }
h2 { font-size: clamp(24px, 2.4vw, 32px); }
h3 { font-size: 20px; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
::selection { background: color-mix(in srgb, var(--accent) 35.0%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
b, .ring-stat .val b, .kv-col b, .meta b, .metrics b, .kpis b { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.label { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.eyebrow { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons & Eingaben ---------- */
.btn { --b: var(--line-2); font: 600 15px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: var(--r); border: 1px solid var(--b); background: transparent; color: var(--ink); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); white-space: nowrap; user-select: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--ink); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40.0%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 12.0%, transparent); border-color: var(--bad); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; gap: 7px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn.lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn.icon { width: 36px; padding: 0; height: 36px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span:first-child { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field small { color: var(--faint); font-size: 13px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg-raise); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 12px; min-height: 44px; width: 100%; transition: border-color .15s, background .15s; }
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--panel); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 38px; height: 22px; border-radius: 11px; background: var(--panel-3); border: 1px solid var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-2); transition: transform .2s var(--ease), background .2s; }
.switch input:checked + i { background: color-mix(in srgb, var(--accent) 30.0%, transparent); border-color: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); background: var(--accent); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 3px; font: 600 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag.dlr { color: var(--dlr); border-color: color-mix(in srgb, var(--accent) 40.0%, transparent); background: color-mix(in srgb, var(--accent) 8.0%, transparent); }
.tag.bq { color: var(--bq); border-color: color-mix(in srgb, var(--amber) 45.0%, transparent); background: color-mix(in srgb, var(--amber) 8.0%, transparent); }
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40.0%, transparent); background: color-mix(in srgb, var(--ok) 8.0%, transparent); }
.tag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40.0%, transparent); background: color-mix(in srgb, var(--bad) 8.0%, transparent); }
.tag.dim { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15.0%, transparent); }
.dot.bad { background: var(--bad); }
.dot.amber { background: var(--amber); }
.score { font-family: var(--num); font-weight: 600; font-variant-numeric: tabular-nums; }
.band { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.band.hi { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.band.lo { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.trend { font-size: 14px; white-space: nowrap; }
.trend.up { color: var(--ok); } .trend.down { color: var(--bad); } .trend.flat { color: var(--muted); }
.score.good { color: var(--ok); } .score.mid { color: var(--amber); } .score.low { color: var(--bad); }

/* ---------- Ansichten & Übergänge ---------- */
.view { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: rowIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Login ---------- */
.login { position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); background: var(--bg); overflow: hidden; }
.login-visual { position: relative; overflow: hidden; border-right: 1px solid var(--line); }
.login-visual .brandmark { position: absolute; left: clamp(28px, 5vw, 64px); top: clamp(28px, 5vw, 56px); width: clamp(150px, 16vw, 220px); }
.login-visual .brandmark img { width: 100%; height: auto; }
.login-visual .claim { position: absolute; left: clamp(28px, 5vw, 64px); bottom: clamp(28px, 6vw, 72px); max-width: 560px; display: flex; flex-direction: column; gap: 16px; }
.login-visual .claim h1 { font-size: clamp(38px, 4.8vw, 66px); line-height: 1.02; }
.login-visual .claim p { color: var(--ink-2); font-size: 18px; max-width: 60ch; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 72px); gap: 28px; background: linear-gradient(180deg, var(--bg-raise), var(--bg)); }
.login-panel .logo-m { display: none; width: 150px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.tabs button { font: 600 14px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: none; border: 0; padding: 14px 0; margin-right: 28px; cursor: pointer; position: relative; }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.login-form { display: flex; flex-direction: column; gap: 18px; max-width: 420px; }
.code-input { font: 400 30px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; height: 66px; text-align: center; }
.form-error { color: var(--bad); font-size: 14px; min-height: 20px; }
.demo-note { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 14px 16px; font-size: 14px; color: var(--ink-2); max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.demo-note code { font-family: var(--mono); color: var(--accent); background: none; cursor: pointer; }

/* ---------- App-Rahmen ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: 68px; display: flex; align-items: center; gap: 20px; padding: 0 clamp(16px, 3vw, 36px); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .logo { height: 40px; width: auto; display: block; }
.topbar .sep { width: 1px; height: 28px; background: var(--line-2); }
.topbar .title { font: 600 14px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.topbar .spacer { flex: 1; }
.tb-break { display: none; }
/* Lizenz: Chip in der Kopfzeile der Teilnehmer, Leiste über den Seiten der Trainer */
.lic-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.lic-chip .k, .lic-bar .k { font: 600 11px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lic-chip .left { color: var(--muted); }
.lic-chip .left::before { content: "·"; margin-right: 6px; }
.lic-chip.warn { border-color: var(--amber); } .lic-chip.warn .left { color: var(--amber); font-weight: 600; }
.lic-bar { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding: 10px clamp(20px, 3vw, 40px); border-bottom: 1px solid var(--line); background: var(--bg-raise); font-size: 14px; color: var(--ink-2); }
.lic-bar svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.lic-bar.warn { background: color-mix(in srgb, var(--amber) 10%, var(--bg-raise)); } .lic-bar.warn .left { color: var(--amber); font-weight: 600; }
/* Support-Fenster (Trainer) */
.support { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.support-fab { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 14px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 14px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; box-shadow: 0 8px 24px rgba(3, 8, 14, .22); }
.support-fab svg { width: 20px; height: 20px; }
.support.open .support-fab { background: var(--panel); color: var(--ink); border-color: var(--line-2); }
.support-panel { width: min(380px, calc(100vw - 32px)); max-height: calc(100dvh - 110px); overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 16px 48px rgba(3, 8, 14, .28); }
.support-panel[hidden] { display: none; }
.support-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.support-head h3 { margin: 0; font: 600 20px/1.2 var(--display); }
.support-head p { margin: 4px 0 0; font-size: 14px; }
.support-form { display: flex; flex-direction: column; gap: 12px; }
.support-form textarea { min-height: 120px; resize: vertical; }
.support-actions { display: flex; justify-content: flex-end; }
.support-done { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 6px 0; }
.support-done svg { width: 32px; height: 32px; color: var(--ok); }
.support-done p { margin: 0; }
.support-msg summary { cursor: pointer; font-size: 14px; color: var(--accent); margin-top: 4px; }
.support-msg p { white-space: pre-wrap; margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
@media (max-width: 640px) { .support { right: 12px; bottom: 12px; left: 12px; align-items: flex-end; } .support-panel { width: 100%; } }
.topbar .who { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-2); }
.page { max-width: 1240px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 36px) 80px; display: flex; flex-direction: column; gap: 40px; }
.demo-banner { background: color-mix(in srgb, var(--amber) 10.0%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--amber) 30.0%, transparent); color: var(--amber); font-size: 13px; text-align: center; padding: 7px 16px; letter-spacing: .02em; }

/* ---------- Teilnehmer: Programm ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.hero h1 { margin-top: 10px; }
.hero p.lead { color: var(--ink-2); font-size: 18px; max-width: 58ch; margin-top: 14px; }
.hero-stats { display: flex; gap: 36px; align-items: center; }
.ring-stat { position: relative; width: 132px; height: 132px; }
.ring-stat svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.demo-word { position: absolute; left: 22px; top: 46px; display: flex; flex-direction: column; gap: 4px; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; pointer-events: none; }
.demo-word.on { opacity: 1; transform: none; }
.demo-word b { font: 700 clamp(22px, 2.6vw, 30px)/1 var(--display); color: var(--accent); letter-spacing: .02em; }
.demo-word span { font-size: 13px; color: var(--muted); }
.ring-stat .val svg { width: auto; height: auto; transform: none; } /* Symbol in der Mitte (z. B. Haken nach der Übung) nicht mitdrehen */
.ring-stat .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-stat .val b { font: 500 34px/1 var(--num); }
.ring-stat .val span { font: 600 11px/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; text-align: center; }
.kv-col { display: flex; flex-direction: column; gap: 14px; }
.kv-col div { display: flex; flex-direction: column; gap: 3px; }
.kv-col b { font: 500 28px/1 var(--num); }
.kv-col span { font: 600 11px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.group { display: flex; flex-direction: column; gap: 0; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; }
.prog { border-top: 1px solid var(--line); }
.prog-row { display: grid; grid-template-columns: 56px minmax(0, 1.6fr) minmax(0, 1fr) 140px 110px 132px; align-items: center; gap: 16px; padding: 18px 8px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: background .2s var(--ease); }
.prog-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transition: transform .25s var(--ease); }
.prog-row:hover { background: color-mix(in srgb, var(--accent) 4.5%, transparent); }
.prog-row:hover::before { transform: scaleY(1); }
.prog-row .idx { font: 500 16px/1 var(--num); color: var(--faint); font-variant-numeric: tabular-nums; }
.prog-row .nm b { display: block; font: 600 21px/1.15 var(--display); letter-spacing: .01em; }
.prog-row .nm span { color: var(--muted); font-size: 14px; }
.prog-row .fmt { color: var(--ink-2); font-size: 14px; }
.prog-row .fmt .mono { color: var(--ink); font-family: var(--num); font-weight: 600; }
.prog-row .st { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.prog-row .res { font: 500 24px/1 var(--num); text-align: right; font-variant-numeric: tabular-nums; }
.prog-row .go { display: flex; justify-content: flex-end; }
/* Am Smartphone nur am Computer möglich (Psychomotorik): ausgegraut */
.prog-row.pc-only { cursor: default; }
.prog-row.pc-only:hover { background: none; }
.prog-row.pc-only:hover::before { transform: scaleY(0); }
.prog-row.pc-only .idx, .prog-row.pc-only .nm b, .prog-row.pc-only .nm > span:not(.pc-note), .prog-row.pc-only .fmt, .prog-row.pc-only .res { opacity: .45; }
.prog-row.pc-only .go .btn { opacity: .55; pointer-events: none; }
.prog-row .pc-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.prog-row .pc-note svg { width: 15px; height: 15px; flex: none; }

/* ---------- Testeinführung ---------- */
.crumbs { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.intro-head { display: flex; flex-direction: column; gap: 14px; grid-column: 1 / -1; }
.intro-head p.lead { font-size: 19px; color: var(--ink-2); max-width: 64ch; }
.explain { display: flex; flex-direction: column; }
.explain section { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.explain section .n { font: 600 15px/1.5 var(--num); color: var(--accent); letter-spacing: .06em; }
.explain section h3 { font-size: 19px; margin-bottom: 8px; }
.explain section .body { color: var(--ink-2); display: flex; flex-direction: column; gap: 10px; max-width: 62ch; }
.explain ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.explain li::marker { color: var(--faint); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; }
kbd { font: 400 13px/1 var(--mono); color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; padding: 5px 8px; white-space: nowrap; }
.side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 18px; }
.demo-box { position: relative; background: radial-gradient(120% 90% at 50% 0%, var(--demo-glow) 0%, var(--panel) 60%); border: 1px solid var(--line); border-radius: 6px; aspect-ratio: 4 / 3; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.demo-box .cap { position: absolute; left: 16px; top: 14px; display: flex; align-items: center; gap: 8px; }
.demo-box .cap .live { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.demo-box .step-label { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font: 600 14px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 6px; }
.meta div { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--line); }
.meta div:first-child { border-left: 0; }
.meta b { font: 500 24px/1 var(--num); }
.meta span { font: 600 11px/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cta { display: flex; flex-direction: column; gap: 10px; }
.cta .btn { width: 100%; }
.note-box { border-left: 2px solid var(--amber); padding: 6px 0 6px 14px; color: var(--ink-2); font-size: 15px; }
.note-box.ok { border-left-color: var(--ok); }
/* Mobile Version: Hinweis auf der Programmseite */
.mobile-note { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; margin: 0 0 22px; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.mobile-note .mn-ico { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.mobile-note .mn-ico svg { width: 20px; height: 20px; }
.mobile-note b { font: 600 16px/1.3 var(--display); }
.mobile-note p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
/* Touch-Geräte: Tastenkürzel in Buttons ausblenden (es gibt keine Tastatur) */
@media (hover: none) and (pointer: coarse) { .btn kbd { display: none; } .topbar .dev-btn { display: none; } }
.date-row { display: flex; gap: 8px; align-items: center; }
.date-row input { flex: 1; min-width: 0; }

/* ---------- Testlauf ---------- */
.runner { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.run-bar { height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px; padding: 0 clamp(16px, 3vw, 36px); border-bottom: 1px solid var(--line); background: var(--bg-raise); }
.run-bar .rb-l { display: flex; align-items: center; gap: 16px; min-width: 0; }
.run-bar .rb-l img { height: 30px; }
.run-bar .rb-l .t { font: 600 16px/1.1 var(--display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-bar .rb-c { display: flex; align-items: center; gap: 18px; }
.run-bar .rb-r { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.counter { font: 500 17px/1 var(--num); letter-spacing: .04em; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.counter b { color: var(--ink); font-weight: 400; }
.progress { position: relative; height: 3px; background: var(--line); }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); transition: width .4s var(--ease); }
.timer { position: relative; width: 52px; height: 52px; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .tv { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 600 18px/1 var(--num); font-variant-numeric: tabular-nums; }
.timer.warn .tv { color: var(--amber); }
.timer.crit .tv { color: var(--bad); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { opacity: .45; } }
.timer-wide { display: flex; align-items: center; gap: 10px; font: 600 22px/1 var(--num); font-variant-numeric: tabular-nums; }
.timer-wide svg { width: 20px; height: 20px; color: var(--muted); }
.run-stage { flex: 1; display: flex; flex-direction: column; padding: clamp(18px, 3vw, 36px); gap: 20px; max-width: 1320px; width: 100%; margin: 0 auto; }
.flash { position: fixed; left: 50%; top: 88px; transform: translateX(-50%); z-index: 50; font: 600 14px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; padding: 10px 16px; border-radius: var(--r); background: var(--panel-3); border: 1px solid var(--line-2); animation: flashIn 1.4s var(--ease) both; pointer-events: none; }
.flash.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50.0%, transparent); }
.flash.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50.0%, transparent); }
@keyframes flashIn { 0% { opacity: 0; transform: translate(-50%, -8px); } 12%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.countdown { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(6px); }
.countdown .cd-n { font: 400 120px/1 var(--mono); animation: cdPop .8s var(--ease) both; }
@keyframes cdPop { from { opacity: 0; transform: scale(1.4); } 30% { opacity: 1; transform: scale(1); } to { opacity: .2; transform: scale(.9); } }
.countdown .cd-t { font: 600 15px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.practice-flag { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 3px; background: color-mix(in srgb, var(--amber) 12.0%, transparent); color: var(--amber); font: 600 12px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; }

.qpanel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: clamp(18px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.qtext { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; max-width: 52ch; }
.qtext.big { font: 400 clamp(40px, 6vw, 72px)/1.1 var(--mono); letter-spacing: .02em; max-width: none; }
.answer { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.answer input { font: 400 30px/1 var(--mono); width: 260px; height: 64px; text-align: center; letter-spacing: .04em; }
.answer .unit { font: 400 18px/1 var(--mono); color: var(--muted); }
.feedback { min-height: 26px; font-size: 16px; }
.feedback.ok { color: var(--ok); } .feedback.bad { color: var(--bad); } .feedback.near { color: var(--amber); }
.feedback .why { display: block; color: var(--ink-2); margin-top: 6px; font-size: 15px; }

/* Würfel */
.cube-grid { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(0, 1.6fr); gap: 20px; align-items: stretch; }
.opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.opt { position: relative; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 6px; padding: 30px 10px 14px; display: flex; justify-content: center; cursor: pointer; color: var(--ink); transition: border-color .2s, background .2s, transform .2s var(--ease); }
.opt:hover { border-color: var(--accent); background: var(--panel-2); transform: translateY(-2px); }
.opt .k { position: absolute; left: 12px; top: 10px; font: 400 14px/1 var(--mono); color: var(--muted); }
.opt svg { width: 100%; max-width: 150px; height: auto; }
.opt.correct { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); background: color-mix(in srgb, var(--ok) 8.0%, transparent); }
.opt.wrong { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); background: color-mix(in srgb, var(--bad) 8.0%, transparent); }
svg .face { stroke: var(--cube-edge); stroke-width: 1.4; stroke-linejoin: round; }
svg .f-top { fill: var(--cube-top); } svg .f-front { fill: var(--cube-front); } svg .f-side { fill: var(--cube-side); } svg .f-net { fill: var(--cube-net); } svg .f-back { fill: var(--cube-back); }
svg .sym { fill: var(--cube-sym); }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 12px; font-size: 18px; }
.steps li::before { content: counter(s); font: 400 13px/1 var(--mono); color: var(--accent-ink); background: var(--accent); width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* Wissenstest */
.mc-opts { display: flex; flex-direction: column; gap: 10px; }
.mc-opt { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: center; text-align: left; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; color: var(--ink); font: inherit; font-size: 17px; cursor: pointer; transition: border-color .2s, background .2s; }
.mc-opt:hover { border-color: var(--accent); background: var(--panel-2); }
.mc-opt .k { width: 32px; height: 32px; border: 1px solid var(--line-2); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font: 400 14px/1 var(--mono); color: var(--ink-2); }
.mc-opt.correct { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8.0%, transparent); }
.mc-opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8.0%, transparent); }
.subject { font: 400 13px/1 var(--mono); color: var(--accent); letter-spacing: .04em; }

/* Instrumente */
.inst-row { display: flex; gap: clamp(12px, 3vw, 36px); justify-content: center; flex-wrap: wrap; padding: 10px 0; }
.inst-row figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.inst-row figcaption { font: 600 11px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.inst-row svg { width: clamp(150px, 18vw, 220px); height: auto; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* Tracking / Multitasking */
.scope-wrap { position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--scope-bg); }
canvas.scope { display: block; width: 100%; height: min(64vh, 600px); cursor: crosshair; touch-action: none; }
.hud { position: absolute; top: 12px; left: 14px; font: 400 12px/1.5 var(--mono); color: var(--ink-2); letter-spacing: .06em; white-space: pre-line; pointer-events: none; }
.hud.r { left: auto; right: 14px; text-align: right; }
.mt-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.mt-grid canvas.scope { height: min(60vh, 560px); }
.mt-side { display: flex; flex-direction: column; gap: 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-h > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.tanks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tank { position: relative; height: 168px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg-raise); overflow: hidden; cursor: pointer; padding: 0; }
.tank .band { position: absolute; z-index: 2; left: 0; right: 0; bottom: 35%; height: 50%; border-top: 1px dashed color-mix(in srgb, var(--ok) 70.0%, transparent); border-bottom: 1px dashed color-mix(in srgb, var(--ok) 70.0%, transparent); background: color-mix(in srgb, var(--ok) 6.0%, transparent); pointer-events: none; }
.tank .fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #4aa6ee, #2a6fae); transition: background .25s; }
.tank.out .fill { background: linear-gradient(180deg, #ff7d6f, #b8392d); }
.tank .k { position: absolute; z-index: 3; top: 8px; left: 0; right: 0; text-align: center; font: 700 15px/1 var(--mono); color: var(--ink); }
.tank .pump { position: absolute; z-index: 3; bottom: 8px; left: 50%; transform: translateX(-50%); width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--ink-2); background: transparent; }
.tank.on .pump { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 10px var(--ok); }
.radio-log { display: flex; flex-direction: column; gap: 6px; min-height: 120px; font: 400 14px/1.3 var(--mono); }
.radio-log div { padding: 7px 10px; border-radius: 3px; background: var(--bg-raise); border-left: 2px solid transparent; opacity: .5; transition: opacity .3s; }
.radio-log div.fresh { opacity: 1; border-left-color: var(--accent); }
.radio-log div.hit { border-left-color: var(--ok); }
.radio-log div.miss { border-left-color: var(--bad); }
.callsign { font: 700 22px/1 var(--mono); color: var(--amber); letter-spacing: .06em; }
.mq { font: 400 28px/1 var(--mono); min-height: 34px; }
.mbuf { font: 400 24px/1 var(--mono); color: var(--accent); min-height: 28px; }

/* Merken & Vergleich */
.big-display { font: 400 clamp(80px, 14vw, 160px)/1 var(--mono); min-height: 1.3em; display: flex; align-items: center; justify-content: center; background: radial-gradient(70% 90% at 50% 50%, var(--display-0), var(--display-1)); border: 1px solid var(--line); border-radius: 6px; padding: 30px 0; }
.big-display.flashd { animation: digit .2s var(--ease); }
@keyframes digit { from { opacity: .2; transform: scale(.94); } to { opacity: 1; transform: none; } }
.matrix { display: grid; gap: 8px; width: min(100%, 460px); margin: 0 auto; }
.matrix button { aspect-ratio: 1; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg-raise); cursor: pointer; padding: 0; transition: background .15s, border-color .15s, transform .15s; }
.matrix button:hover { border-color: var(--accent); }
.matrix button.lit { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 45.0%, transparent); }
.matrix button.sel { background: var(--ink); border-color: var(--ink); }
.matrix button.hit { background: var(--ok); border-color: var(--ok); }
.matrix button.wrong { background: var(--bad); border-color: var(--bad); }
.matrix button.miss { border: 2px dashed var(--accent); }
.matrix.locked button { pointer-events: none; }
.clearance { font: 400 clamp(19px, 2.3vw, 26px)/1.65 var(--mono); padding: 28px 30px; background: var(--scope-bg); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; }
/* ATC-Freigabe: nur hören, Lückentext */
.clearance.listen { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: clamp(18px, 2vw, 22px); }
.clearance.listen .cs { font-weight: 700; color: var(--ink); }
.clearance.listen .muted { font-family: var(--body); font-size: 16px; }
.clearance .wave { display: inline-flex; align-items: center; gap: 4px; height: 28px; }
.clearance .wave i { width: 4px; height: 100%; border-radius: 2px; background: var(--accent); animation: clrWave 1s ease-in-out infinite; }
.clearance .wave i:nth-child(2) { animation-delay: -.8s; } .clearance .wave i:nth-child(3) { animation-delay: -.6s; } .clearance .wave i:nth-child(4) { animation-delay: -.4s; } .clearance .wave i:nth-child(5) { animation-delay: -.2s; }
.clearance.listen.done .wave i { animation: none; transform: scaleY(.2); opacity: .5; }
@keyframes clrWave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .clearance .wave i { animation: none; transform: scaleY(.5); } }
.clr-form { display: flex; flex-direction: column; gap: 18px; }
.clr-line { font: 400 clamp(18px, 2.1vw, 24px)/2.2 var(--mono); padding: 20px 26px; background: var(--scope-bg); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; }
.clr-line .unit { white-space: nowrap; }
.clr-line .given { color: var(--muted); }
.clr-line input.gap { display: inline-block; height: 1.7em; min-height: 0; padding: 0 .3em; margin: 0 .15em; font: inherit; line-height: 1; text-transform: uppercase; vertical-align: baseline; border: 1px solid var(--line-2); border-bottom: 2px solid var(--accent); border-radius: 4px; background: var(--panel); color: var(--ink); }
.clr-line input.gap.ok { border-color: var(--ok); }
.clr-line input.gap.bad { border-color: var(--bad); }
.clr-line .gap-sol { color: var(--ok); font-size: .8em; }
.clr-line .gap-sol:not(:empty) { margin-right: .3em; }
.gap-demo { color: var(--accent); border-bottom: 2px solid var(--accent); padding: 0 2px; }
.qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.qa .field input { font-family: var(--mono); font-size: 19px; }
.qa .field.ok input { border-color: var(--ok); }
.qa .field.bad input { border-color: var(--bad); }
.qa .sol { font: 400 13px/1.2 var(--mono); color: var(--muted); min-height: 16px; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp div { font: 400 clamp(20px, 2.6vw, 38px)/1 var(--mono); text-align: center; padding: 44px 12px; background: var(--scope-bg); border: 1px solid var(--line); border-radius: 6px; letter-spacing: .05em; white-space: nowrap; overflow-x: auto; }
.cmp-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Ergebnis ---------- */
.result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(24px, 4vw, 48px); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.result .ring-stat { width: 190px; height: 190px; }
.result .ring-stat .val b { font-size: 60px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border-top: 1px solid var(--line); margin-top: 18px; }
.metrics div { padding: 14px 16px 14px 0; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
.metrics b { font: 500 24px/1.1 var(--num); }
.metrics span { font: 600 11px/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.review { display: flex; flex-direction: column; }
.review-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.review-item .mark { font: 700 16px/1.5 var(--mono); }
.review-item .mark.ok { color: var(--ok); } .review-item .mark.bad { color: var(--bad); }
.review-item .q { font-size: 17px; }
.review-item .a { color: var(--ink-2); font-size: 15px; display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.review-item .a .ok { color: var(--ok); } .review-item .a .bad { color: var(--bad); }

/* ---------- Geräte ---------- */
.dev-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.axis { display: grid; grid-template-columns: 70px 1fr 56px; gap: 10px; align-items: center; font: 400 13px/1 var(--mono); }
.axis .bar { position: relative; height: 8px; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 4px; }
.axis .bar i { position: absolute; top: -1px; bottom: -1px; width: 3px; background: var(--accent); left: 50%; }
.axis .bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-2); }
.btn-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-dots span { width: 26px; height: 22px; border-radius: 3px; border: 1px solid var(--line-2); font: 400 11px/20px var(--mono); text-align: center; color: var(--muted); }
.btn-dots span.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pad-card { border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

/* ---------- Admin ---------- */
.admin { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidenav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px; background: var(--bg-raise); border-right: 1px solid var(--line); }
.sidenav .logo { width: 132px; margin: 4px 10px 24px; }
.sidenav .lbl { padding: 14px 12px 6px; }
.sidenav button { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border: 0; border-radius: var(--r); background: none; color: var(--ink-2); font: 500 16px/1 var(--body); cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.sidenav button svg { width: 19px; height: 19px; opacity: .8; }
.sidenav button:hover { background: var(--panel-2); color: var(--ink); }
.sidenav button.active { background: var(--panel-3); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.sidenav .foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.sidenav .foot .who { padding: 4px 12px 8px; font-size: 14px; color: var(--muted); }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 32px clamp(20px, 3vw, 40px) 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.admin-head p { color: var(--muted); margin-top: 8px; }
.admin-body { padding: 24px clamp(20px, 3vw, 40px) 64px; display: flex; flex-direction: column; gap: 24px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; height: 38px; min-height: 38px; padding: 6px 10px; font-size: 15px; }
.toolbar .grow { flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; }
.kpis div { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--line); }
.kpis div:first-child { border-left: 0; }
.kpis b { font: 500 40px/1 var(--num); }
.kpis span { font: 600 12px/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars .b { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 48px; gap: 12px; align-items: center; font-size: 14px; }
.bars .b .track { height: 6px; border-radius: 3px; background: var(--bg-raise); overflow: hidden; }
.bars .b .track i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.table-wrap { border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; background: var(--panel); }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { text-align: left; font: 600 12px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 13px 14px; border-bottom: 1px solid var(--line-2); white-space: nowrap; background: var(--bg-raise); position: sticky; top: 0; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .15s; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr:hover { background: color-mix(in srgb, var(--accent) 4.0%, transparent); }
table.t td.num { text-align: right; font-family: var(--num); font-size: 16px; font-variant-numeric: tabular-nums; }
table.t th.num { text-align: right; }
table.t td .sub { display: block; color: var(--muted); font-size: 13px; }
table.t td.wrap { white-space: normal; max-width: 520px; }
.empty { padding: 36px; text-align: center; color: var(--muted); }
.code-chip { display: inline-flex; align-items: center; gap: 8px; font: 400 15px/1 var(--mono); letter-spacing: .08em; padding: 6px 8px 6px 10px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg-raise); }
.code-chip button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; display: inline-flex; }
.code-chip button:hover { color: var(--ink); }
.code-chip svg { width: 15px; height: 15px; }

.scrim { position: fixed; inset: 0; z-index: 80; background: var(--scrim); backdrop-filter: blur(3px); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; z-index: 81; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--bg-raise); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; animation: slideIn .32s var(--ease) both; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.drawer-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 28px 18px; border-bottom: 1px solid var(--line); }
.drawer-b { flex: 1; overflow-y: auto; padding: 22px 28px; display: flex; flex-direction: column; gap: 20px; }
.drawer-f { padding: 16px 28px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal { position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; background: var(--bg-raise); border: 1px solid var(--line-2); border-radius: 8px; padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; animation: pop .25s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; }
.toasts { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--panel-3); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--r); padding: 12px 16px; font-size: 15px; min-width: 240px; max-width: 420px; animation: toastIn .3s var(--ease) both; }
.toast.bad { border-left-color: var(--bad); }
.toast.ok { border-left-color: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
.checks { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; }
.checks label { display: flex; gap: 10px; align-items: center; font-size: 15px; padding: 4px 0; cursor: pointer; }
.answer-edit { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; }
.answer-edit input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--ok); }

@media (max-width: 1040px) {
  .login { grid-template-columns: 1fr; }
  .login-visual { min-height: 46vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .intro, .cube-grid, .mt-grid, .dev-grid, .two { grid-template-columns: 1fr; }
  .side { position: static; }
  .prog-row { grid-template-columns: 40px minmax(0, 1fr) 110px 120px; }
  .prog-row .fmt, .prog-row .res { display: none; }
  .admin { grid-template-columns: 1fr; }
  .sidenav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
  .sidenav .logo { width: 90px; margin: 0 12px 0 4px; }
  .sidenav .lbl, .sidenav .foot .who { display: none; }
  .sidenav .foot { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpis div:nth-child(3) { border-left: 0; }
  .kpis div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .prog-row { grid-template-columns: minmax(0, 1fr) 110px; }
  .prog-row .idx, .prog-row .st { display: none; }
  .opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .run-bar { grid-template-columns: 1fr auto; height: auto; padding: 10px 16px; }
  .run-bar .rb-l img { display: none; }
  .run-bar .rb-c { grid-column: 1 / -1; order: 3; }
  /* Laufleiste am Handy: Modulname und „Übung“ links, Zeit und Abbrechen rechts – ohne Überlappung */
  .run-bar { gap: 10px; }
  .run-bar .rb-l { gap: 10px; overflow: hidden; }
  .run-bar .rb-l .brand { display: none; }
  .run-bar .rb-l .t { font-size: 14px; }
  .run-bar .practice-flag { flex: none; }
  .run-bar .rb-r { gap: 6px; }
  .run-bar .timer { width: 44px; height: 44px; }
  .run-bar .timer .tv { font-size: 16px; }
  .result { grid-template-columns: 1fr; justify-items: start; }
  .meta { grid-template-columns: 1fr 1fr; }
  .topbar .title, .topbar .sep { display: none; }
  /* Kopfzeile zweizeilig: oben Marke und Knöpfe, unten Programm und Darstellung/Sprache */
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px 8px; }
  .tb-break { display: block; order: 1; flex-basis: 100%; height: 0; }
  .topbar .who, .topbar .prefs { order: 2; }
  .topbar .who { flex: 1 1 auto; min-width: 0; }
  .topbar .who > .nm { display: none; }
  .topbar .who { flex-wrap: wrap; row-gap: 6px; }
  .topbar .who .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .dev-btn span, .topbar .fs-btn { display: none; }
  .choice-grid, .cmp, .cmp-btns { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.sidenav .logo-pair img, .login-visual .brandmark img, .wizard .logo-pair img { width: 100%; height: auto; }
.wizard .logo-pair { width: 150px; height: auto !important; }
.sidenav .theme-row { padding: 6px 12px 10px; }
.mod-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mod-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) 150px 120px auto; gap: 14px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.mod-item .idx { font: 600 15px/1 var(--num); color: var(--faint); }
.mod-item b { font-family: var(--display); font-size: 18px; font-weight: 600; }
.mod-item .sub { display: block; color: var(--muted); font-size: 13px; }
.mod-item .acts { display: flex; gap: 4px; justify-content: flex-end; }
.mod-item.off { opacity: .5; }
.outbox-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.outbox-item .err { color: var(--bad); font-size: 14px; }
.kv-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 15px; }
.kv-list dt { color: var(--muted); }
.kv-list dd { margin: 0; font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.series-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin: 8px 0 18px; }
.series-row .n { min-width: 74px; padding: 14px 12px; text-align: center; font: 500 30px/1 var(--num); font-variant-numeric: tabular-nums; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--ink); }
.series-row .n.q { color: var(--accent); border-color: var(--accent); border-style: dashed; }
.series-row .n.solved { color: var(--ok); border-color: var(--ok); border-style: solid; }
.series-row .n.missed { color: var(--bad); border-color: var(--bad); border-style: solid; }
.series-row .n.pop { animation: numPop .38s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes numPop { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .series-row .n.pop { animation: none; } }
.sidenav .theme-switch button { width: 36px; height: 32px; padding: 0; gap: 0; justify-content: center; border-radius: 0; }
.sidenav .theme-switch button svg { width: 17px; height: 17px; opacity: 1; }
.sidenav .theme-switch button.active, .sidenav .theme-switch button:hover { box-shadow: none; }
.series-row.sm { gap: 7px; }
.series-row.sm .n { min-width: 50px; padding: 10px 8px; font-size: 22px; }

/* Startseite: Foto Anflug 25C – Tag im hellen, Nacht im dunklen Modus. Text immer hell auf dunklem Verlauf. */
.login-visual { background: #0b1520; --ink: #f3f6f9; --ink-2: #d5dde6; --muted: #a7b4c2; color: var(--ink); }
.login-visual .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; transform-origin: 49% 54%;
  opacity: 0; transition: opacity .7s ease; animation: approach 48s cubic-bezier(.25, .1, .25, 1) both; }
.login-visual .photo.night { opacity: 1; }
:root[data-theme="light"] .login-visual .photo.day { opacity: 1; }
:root[data-theme="light"] .login-visual .photo.night { opacity: 0; }
.login-visual::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(4, 9, 15, .82) 0%, rgba(4, 9, 15, .55) 30%, rgba(4, 9, 15, 0) 58%), linear-gradient(to bottom, rgba(4, 9, 15, .3) 0%, rgba(4, 9, 15, 0) 24%); }
.login-visual .brandmark, .login-visual .claim { z-index: 2; }
:root[data-theme="light"] .login-visual .logo-pair .lg-light { display: block; }
:root[data-theme="light"] .login-visual .logo-pair .lg-dark { display: none; }
@keyframes approach { from { transform: scale(1); } to { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) { .login-visual .photo { animation: none; } }

/* ---------- COGNIFLY-Schriftzug ---------- */
.brand { display: inline-flex; align-items: baseline; font: 700 22px/1 var(--display); letter-spacing: .2em; color: var(--ink); white-space: nowrap; user-select: none; }
.brand b { font-weight: 700; color: var(--accent); }
.brand.lg { font-size: 30px; }
.brand.sm { font-size: 16px; letter-spacing: .18em; }
.login-visual .brand { color: #f3f6f9; }
.login-visual .brand b { color: #6cc2ff; }
.sidenav .brand { padding: 0 12px; margin: 2px 0 6px; font-size: 18px; }
.login-panel .panel-top { display: flex; align-items: center; gap: 12px; max-width: 520px; }
.login-body { display: flex; flex-direction: column; gap: 28px; }
.wizard .box .brand { font-size: 26px; }
.warn-text { color: var(--bad); }

/* ---------- Zwei-Faktor-Anmeldung ---------- */
.mfa-steps { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.mfa-setup { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.mfa-qr { background: #fff; padding: 10px; border-radius: 8px; border: 1px solid var(--line-2); }
.mfa-qr svg { display: block; width: 100%; height: auto; }
.mfa-secret { font-family: var(--mono); font-size: 15px; letter-spacing: .06em; line-height: 1.7; color: var(--ink); word-break: break-all; }
@media (max-width: 520px) { .mfa-setup { grid-template-columns: 1fr; } .mfa-qr { width: 200px; } }

/* ---------- Testdurchlauf (Team-Mitglied absolviert ein Programm) ---------- */
.test-banner { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 5px 16px; }
.test-banner .btn { color: inherit; }

/* ---------- Programme: Liste nach Gruppen und Details ---------- */
.prog-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.prog-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 32px); }
.prog-list { overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 4px; }
.prog-list-group { display: flex; flex-direction: column; gap: 4px; }
.prog-list-group .label { padding: 4px 2px; }
.prog-item { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; color: var(--ink); font-size: 15px; }
.prog-item:hover { border-color: var(--accent); }
.prog-item.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.prog-item .sub { font-size: 13px; }
@media (max-width: 1100px) { .prog-layout { grid-template-columns: 1fr; } .prog-side { position: static; max-height: none; } .prog-list { max-height: 360px; } }
/* Programmdetails auf dem Handy: Modulzeile zweizeilig (Name und Schalter, darunter Dauer und Aktionen) */
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.k3 div { border-top: 0; border-left: 1px solid var(--line); }
.kpis.k3 div:first-child { border-left: 0; }
@media (max-width: 760px) {
  .prog-head { flex-wrap: wrap; }
  .prog-head .toolbar { width: 100%; }
  .kpis.k3 div { padding: 14px 12px; gap: 8px; }
  .kpis.k3 b { font-size: 24px; }
  .kpis.k3 span { font-size: 11px; letter-spacing: .1em; }
  .mod-item { grid-template-columns: 24px minmax(0, 1fr) auto; grid-template-areas: "idx main sw" ". num acts"; gap: 4px 10px; padding: 12px 2px; }
  .mod-item > .idx { grid-area: idx; align-self: start; padding-top: 3px; }
  .mod-item > :nth-child(2) { grid-area: main; }
  .mod-item > .num { grid-area: num; color: var(--muted); font-size: 14px; }
  .mod-item > :nth-child(4) { grid-area: sw; align-self: start; }
  .mod-item .switch { font-size: 0; gap: 0; }
  .mod-item > :nth-child(5) { grid-area: acts; }
  .mod-item b { font-size: 16px; }
}

/* ---------- Sprache DE / EN ---------- */
.prefs { display: inline-flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.lang-switch button { height: 32px; min-width: 36px; padding: 0 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 600 12px/1 var(--display); letter-spacing: .12em; }
.lang-switch button[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); }
.lang-switch button:hover { color: var(--ink); }

/* ---------- Cookie-Hinweis und Übersicht (Startseite und Anwendung) ---------- */
.cookie-notice { position: fixed; z-index: 85; left: 20px; bottom: 20px; width: min(440px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 40px rgba(3, 8, 14, .22); font: 400 15px/1.5 var(--body); animation: toastIn .35s var(--ease) both; }
.cookie-notice p { margin: 0; color: var(--ink-2); }
.cookie-notice p b { color: var(--ink); font-weight: 600; }
.cookie-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px 18px; flex-wrap: wrap; }
.cookie-btn { height: 40px; padding: 0 20px; border: 1px solid var(--accent); border-radius: var(--r); background: var(--accent); color: var(--accent-ink); font: 600 14px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background .2s var(--ease); }
.cookie-btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.cookie-link { padding: 0; border: 0; background: none; color: var(--accent); font: 500 15px/1 var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cookie-link:hover { color: var(--accent-2); }
.cookie-dlg { width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px 26px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--ink); box-shadow: 0 24px 80px rgba(3, 8, 14, .35); font: 400 15px/1.5 var(--body); }
.cookie-dlg::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
.cookie-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.cookie-dlg .cookie-dlg-head h2 { margin: 0; font: 600 24px/1.2 var(--display); letter-spacing: .01em; }
.cookie-dlg p { color: var(--ink-2); margin: 0 0 14px; }
.cookie-x { width: 36px; height: 36px; flex: none; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.cookie-x:hover { color: var(--ink); border-color: var(--ink-2); }
.cookie-table { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 8px; }
.cookie-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cookie-table th { text-align: left; padding: 10px 12px; background: var(--panel-2); color: var(--muted); font: 600 12px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.cookie-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.cookie-table code { font: 400 13px/1.4 var(--mono); color: var(--ink); white-space: nowrap; }
.cookie-kind { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.cookie-note { font-size: 14px; }
.cookie-grow { flex: 1; }
.cookie-dlg .cookie-actions a { color: var(--accent); }
.login-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; max-width: 520px; font-size: 13px; }
.login-legal a, .login-legal button { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.login-legal a:hover, .login-legal button:hover { color: var(--ink); }
@media (max-width: 560px) {
  .cookie-notice { left: 16px; right: 16px; bottom: 16px; width: auto; padding: 16px; }
  .cookie-dlg { padding: 20px 16px; }
  .cookie-table thead { display: none; }
  .cookie-table tr { display: block; padding: 10px 12px; border-top: 1px solid var(--line); }
  .cookie-table tr:first-child { border-top: 0; }
  .cookie-table td { display: block; padding: 2px 0; border: 0; }
}
.cookie-notice.inline { position: static; width: auto; max-width: 420px; padding: 14px 16px; background: transparent; border-color: var(--line-2); box-shadow: none; font-size: 14px; animation: none; }
.cookie-notice.inline .cookie-btn { height: 36px; padding: 0 16px; font-size: 13px; }
.cookie-slot:empty { display: none; }

/* ---------- Uhrentest ---------- */
.dial-area { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: min(320px, calc(100dvh - 300px)); }
.dial-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 3vw, 40px); width: min(100%, 620px, calc((100dvh - 330px) * 3)); margin: 0 auto; }
.dial-cell { aspect-ratio: 1; display: flex; min-width: 0; }
.dial-cell svg { width: 100%; height: 100%; display: block; }
.dial-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, 780px, calc((100dvh - 330px) * 2.6)); }
.dial-opt { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .2s, background .2s; }
button.dial-opt:hover { border-color: var(--accent); background: var(--panel-2); }
.dial-opt .k { width: 32px; height: 32px; border: 1px solid var(--line-2); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font: 400 14px/1 var(--mono); color: var(--ink-2); }
.dial-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dial-opt.picked { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.dial-opt.correct { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); box-shadow: inset 0 0 0 1px var(--ok); }
.dial-opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.dial-opts.demo { gap: 6px; width: 100%; }
.dial-opts.demo .dial-opt { grid-template-columns: 18px minmax(0, 1fr); gap: 6px; padding: 5px 7px; }
.dial-opts.demo .k { width: 18px; height: 18px; font-size: 10px; }
.dial-opts.demo .dial-mini { gap: 4px; }
@media (max-width: 640px) { .dial-opts { grid-template-columns: 1fr; } }

/* ---------- Einführung beim ersten Anmelden (views/welcome.js) ---------- */
.hero-guide { margin-top: 18px; }
.wg { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 16px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(10px); animation: wgFade .3s var(--ease) both; }
.wg.out { animation: wgFadeOut .25s ease both; }
.wg-panel { width: min(1120px, 100%); height: min(820px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 90px rgba(3, 8, 14, .32); overflow: hidden; animation: wgRise .45s var(--ease) both; }
.wg-top { display: flex; align-items: center; gap: 16px; padding: 18px 26px; border-bottom: 1px solid var(--line); }
.wg-top .brand { font-size: 15px; }
.wg-count { flex: 1; font: 500 13px/1 var(--mono); color: var(--muted); letter-spacing: .1em; }
.wg-skip { border: 0; background: none; color: var(--muted); font: 600 13px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; padding: 8px 4px; }
.wg-skip:hover { color: var(--ink); }
.wg-stage { overflow: auto; padding: 28px 32px; overscroll-behavior: contain; }
.wg-page { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.wg-page.from-right { animation: wgInR .5s var(--ease) both; }
.wg-page.from-left { animation: wgInL .5s var(--ease) both; }
.wg-art { min-height: 380px; display: flex; align-items: center; justify-content: center; padding: 26px; border-radius: 14px; background: radial-gradient(120% 90% at 30% 0%, var(--demo-glow, var(--panel-2)), var(--panel-2) 70%); border: 1px solid var(--line); }
.wg-copy, .wg-head { display: flex; flex-direction: column; gap: 14px; }
.wg-copy h2 { font: 600 clamp(28px, 3vw, 38px)/1.1 var(--display); margin: 0; }
.wg-lead { margin: 0; font-size: 17px; color: var(--ink-2); line-height: 1.55; }
.wg-points, .wg-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wg-points li { position: relative; padding-left: 30px; color: var(--ink-2); line-height: 1.5; animation: wgUp .45s var(--ease) both; animation-delay: calc(var(--k) * 90ms + 180ms); }
.wg-points li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.wg-points li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 6px; height: 4px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.wg-points b, .wg-list b { color: var(--ink); }
.wg-list { counter-reset: wg; }
.wg-list li { counter-increment: wg; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; color: var(--ink-2); animation: wgUp .45s var(--ease) both; animation-delay: calc(var(--k) * 90ms + 180ms); }
.wg-list li::before { content: counter(wg); width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font: 600 13px/1 var(--display); }
.wg-setup { margin-top: 6px; padding: 14px 16px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.wg-setup ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 15px; }
.wg-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 26px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.wg-dots { display: flex; gap: 8px; }
.wg-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 6px; background: var(--line-2); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.wg-dots button.done { background: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.wg-dots button[aria-selected="true"] { width: 30px; background: var(--accent); }
.wg-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* Seite 1: Ablauf eines Moduls */
.wg-flow { position: relative; width: 100%; max-width: 430px; display: flex; flex-direction: column; gap: 12px; }
.wg-flow::before { content: ""; position: absolute; left: 36px; top: 34px; bottom: 34px; width: 2px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 10%, transparent)); opacity: .35; }
.wg-step, .wg-result { position: relative; display: grid; grid-template-columns: 42px 1fr; column-gap: 14px; align-items: center; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.wg-step b, .wg-result b { font: 600 17px/1.2 var(--display); }
.wg-step > span:last-child, .wg-result > span:last-child { grid-column: 2; color: var(--muted); font-size: 14px; }
.wg-ico { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-2); color: var(--accent); }
.wg-ico svg { width: 20px; height: 20px; }
.wg-step { animation: wgStep 7.2s var(--ease) infinite; animation-delay: calc(var(--k) * 1.4s); }
.wg-step .wg-ico { animation: wgIco 7.2s var(--ease) infinite; animation-delay: calc(var(--k) * 1.4s); }
.wg-result { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); animation: wgPop 7.2s var(--ease) infinite; }
.wg-result .wg-ico { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
/* Seite 2: Sitzposition und Geräte */
.wg-art-col { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.wg-art-col > div:first-child { width: 100%; display: flex; justify-content: center; }
.wg-seat { width: 100%; max-width: 470px; height: auto; display: block; }
.wg-seat .floor { stroke: var(--line-2); stroke-width: 2; }
.wg-seat .desk rect { fill: var(--panel-3); } .wg-seat .desk line { stroke: var(--line-2); stroke-width: 5; stroke-linecap: round; }
.wg-seat .monitor rect { fill: var(--ink-2); } .wg-seat .monitor line { stroke: var(--ink-2); stroke-width: 4; stroke-linecap: round; }
.wg-seat .sight { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 7; animation: wgDash 1.6s linear infinite; }
.wg-seat .chair rect { fill: var(--panel-3); stroke: var(--line-2); stroke-width: 2; } .wg-seat .chair line { stroke: var(--line-2); stroke-width: 5; stroke-linecap: round; } .wg-seat .chair circle { fill: var(--line-2); }
.wg-seat .pedal rect { fill: var(--ink-2); }
.wg-seat .stick > rect { fill: var(--ink-2); } .wg-seat .shaft line { stroke: var(--ink-2); stroke-width: 6; stroke-linecap: round; } .wg-seat .shaft rect { fill: var(--accent); }
.wg-seat .shaft { transform-box: view-box; transform-origin: 297px 180px; animation: wgTilt 3.6s ease-in-out infinite; }
.wg-seat .body path { fill: none; stroke: var(--ink); stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; } .wg-seat .head { fill: var(--ink); }
.wg-seat .dist line { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 5; } .wg-seat .dist path { fill: var(--muted); }
.wg-seat .pin { transform-box: fill-box; transform-origin: center; animation: wgPin 3.2s ease-in-out infinite; animation-delay: var(--d); }
.wg-seat .pin circle { fill: var(--accent); stroke: var(--panel); stroke-width: 3; } .wg-seat .pin text { fill: var(--accent-ink); font: 700 14px var(--display); text-anchor: middle; }
.wg-devs { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wg-dev { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.wg-dev-art svg { width: 96px; height: 76px; display: block; }
.wg-dev b { font: 600 15px/1.2 var(--display); } .wg-dev span { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.wg-dev .base { fill: var(--line-2); } .wg-dev .ln { stroke: var(--ink-2); stroke-width: 7; stroke-linecap: round; } .wg-dev .grip { fill: var(--accent); } .wg-dev .knob { fill: var(--accent-ink); }
.wg-dev .plate { fill: var(--ink-2); } .wg-dev .slot { fill: var(--line-2); } .wg-dev .mk { fill: var(--muted); font: 700 16px var(--display); text-anchor: middle; }
.wg-dev .mv { transform-box: view-box; }
.wg-dev .stick-mv { transform-origin: 60px 82px; animation: wgStick 3.2s ease-in-out infinite; }
.wg-dev .ped-l { animation: wgPedL 2.6s ease-in-out infinite; } .wg-dev .ped-r { animation: wgPedR 2.6s ease-in-out infinite; }
.wg-dev .thr-mv { animation: wgThr 3s ease-in-out infinite; }
/* Seite 3: Tastatur und Maus */
.wg-kb { width: 100%; }
.wg-keys { width: 100%; height: auto; display: block; }
.wg-keys .key rect { fill: var(--panel); stroke: var(--line-2); stroke-width: 1.5; }
.wg-keys .key text { fill: var(--muted); font: 600 12px var(--mono); text-anchor: middle; }
.wg-keys .key.g1 rect, .wg-keys .key.g2 rect, .wg-keys .key.g3 rect, .wg-keys .key.g4 rect, .wg-keys .key.g5 rect { animation: wgKeyR 10s ease-in-out infinite; }
.wg-keys .key.g1 text, .wg-keys .key.g2 text, .wg-keys .key.g3 text, .wg-keys .key.g4 text, .wg-keys .key.g5 text { animation: wgKeyT 10s ease-in-out infinite; }
.wg-keys .key.g2 rect, .wg-keys .key.g2 text { animation-delay: 2s; } .wg-keys .key.g3 rect, .wg-keys .key.g3 text { animation-delay: 4s; }
.wg-keys .key.g4 rect, .wg-keys .key.g4 text { animation-delay: 6s; } .wg-keys .key.g5 rect, .wg-keys .key.g5 text { animation-delay: 8s; }
.wg-keys .key.g2.g4 rect { animation: wgKeyRW 10s ease-in-out infinite; } .wg-keys .key.g2.g4 text { animation: wgKeyTW 10s ease-in-out infinite; }
.wg-keys .mouse rect { fill: var(--panel); stroke: var(--line-2); stroke-width: 2; } .wg-keys .mouse line { stroke: var(--line-2); stroke-width: 2; } .wg-keys .mouse .wheel { fill: var(--accent); }
.wg-keys .cursor path { fill: var(--ink); stroke: var(--panel); stroke-width: 1.5; }
.wg-keys .cursor { transform-box: view-box; animation: wgCur 6s ease-in-out infinite; }
.wg-kb-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; justify-content: center; }
.wg-kb-legend span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); animation: wgChip 10s ease-in-out infinite; }
.wg-kb-legend kbd { padding: 3px 7px; border-radius: 6px; background: var(--panel-2); font: 600 12px/1.2 var(--mono); color: var(--ink); animation: wgChipK 10s ease-in-out infinite; }
.wg-kb-legend .g2, .wg-kb-legend .g2 kbd { animation-delay: 2s; } .wg-kb-legend .g3, .wg-kb-legend .g3 kbd { animation-delay: 4s; }
.wg-kb-legend .g4, .wg-kb-legend .g4 kbd { animation-delay: 6s; } .wg-kb-legend .g5, .wg-kb-legend .g5 kbd { animation-delay: 8s; }
@keyframes wgFade { from { opacity: 0; } }
@keyframes wgFadeOut { to { opacity: 0; } }
@keyframes wgRise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes wgInR { from { opacity: 0; transform: translateX(32px); } }
@keyframes wgInL { from { opacity: 0; transform: translateX(-32px); } }
@keyframes wgUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes wgStep { 0%, 24%, 100% { border-color: var(--line); transform: none; box-shadow: none; } 5%, 19% { border-color: var(--accent); transform: translateX(8px); box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 16%, transparent); } }
@keyframes wgIco { 0%, 24%, 100% { background: var(--panel-2); color: var(--accent); } 5%, 19% { background: var(--accent); color: var(--accent-ink); } }
@keyframes wgPop { 0%, 74% { opacity: .45; transform: scale(.98); } 80%, 96% { opacity: 1; transform: none; } 100% { opacity: .45; transform: scale(.98); } }
@keyframes wgDash { to { stroke-dashoffset: -26; } }
@keyframes wgTilt { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes wgPin { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.18); } 24% { transform: scale(1); } }
@keyframes wgStick { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-16deg); } 45% { transform: rotate(14deg); } 70% { transform: rotate(-6deg) translateY(2px); } }
@keyframes wgPedL { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes wgPedR { 0%, 100% { transform: translateY(7px); } 50% { transform: translateY(0); } }
@keyframes wgThr { 0%, 100% { transform: translateY(18px); } 50% { transform: translateY(-26px); } }
@keyframes wgKeyR { 0%, 19%, 100% { fill: var(--panel); stroke: var(--line-2); } 3%, 15% { fill: var(--accent); stroke: var(--accent); } }
@keyframes wgKeyT { 0%, 19%, 100% { fill: var(--muted); } 3%, 15% { fill: var(--accent-ink); } }
@keyframes wgKeyRW { 0%, 20%, 39%, 60%, 79%, 100% { fill: var(--panel); stroke: var(--line-2); } 23%, 35%, 63%, 75% { fill: var(--accent); stroke: var(--accent); } }
@keyframes wgKeyTW { 0%, 20%, 39%, 60%, 79%, 100% { fill: var(--muted); } 23%, 35%, 63%, 75% { fill: var(--accent-ink); } }
@keyframes wgChip { 0%, 19%, 100% { border-color: var(--line); color: var(--ink-2); } 3%, 15% { border-color: var(--accent); color: var(--ink); } }
@keyframes wgChipK { 0%, 19%, 100% { background: var(--panel-2); color: var(--ink); } 3%, 15% { background: var(--accent); color: var(--accent-ink); } }
@keyframes wgCur { 0%, 100% { transform: translate(430px, 22px); } 30% { transform: translate(458px, 4px); } 60% { transform: translate(444px, 50px); } }
@media (max-width: 860px) {
  .wg { padding: 0; }
  .wg-panel { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .wg-top, .wg-foot { padding: 12px 16px; }
  .wg-stage { padding: 18px 16px; }
  .wg-page { grid-template-columns: 1fr; gap: 16px; align-items: start; min-height: 0; }
  .wg-copy { display: contents; }
  .wg-head { order: 0; } .wg-art { order: 1; margin-bottom: 4px; } .wg-copy > :not(.wg-head) { order: 2; }
  .wg-art { min-height: 0; padding: 18px 14px; }
  .wg-flow { max-width: none; }
  .wg-foot { flex-wrap: nowrap; }
  .wg-nav .btn:not(.primary):not(.ghost) { display: none; }
  .wg-nav .btn.ghost { font-size: 0; gap: 0; padding: 0 12px; }
  .wg-nav .btn.lg { height: 48px; padding: 0 20px; }
}
@media (prefers-reduced-motion: reduce) { .wg, .wg * { animation: none !important; transition: none !important; } }

/* AV-Vertrag: Dialog für Trainer (Text kommt vom Server, Stil dazu in DPA_CSS) */
.modal.dpa-modal { width: min(820px, calc(100vw - 32px)); }
.dpa-box { flex: none; max-height: 38vh; overflow-y: auto; border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 18px; background: var(--bg); color: var(--ink-2); }
.dpa-check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 15px; cursor: pointer; }
.dpa-check input { margin-top: 3px; }
.dpa-bar .btn { margin-left: auto; }
