/* ============================================================
   telc Deutsch C1 Hochschule – Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  color-scheme: light;

  /* Backgrounds */
  --bg-base:        #f8f9fc;
  --bg-surface:     #ffffff;
  --bg-elevated:    #f1f5f9;
  --bg-card:        #ffffff;

  /* Surface aliases (used in component inline styles) */
  --surface-card:   #ffffff;
  --border-card:    #e2e8f0;
  --surface-hover:  #f8fafc;

  /* Borders */
  --border-subtle:  #e2e8f0;
  --border-accent:  #cbd5e1;

  /* Brand colours — adjusted for light backgrounds */
  --blue-primary:   #2563eb;
  --blue-hover:     #1d4ed8;
  --blue-glow:      rgba(37, 99, 235, 0.10);
  --blue-light:     #3b82f6;

  --emerald:        #059669;
  --emerald-hover:  #047857;
  --emerald-glow:   rgba(5, 150, 105, 0.10);
  --emerald-light:  #10b981;

  --amber:          #d97706;
  --amber-glow:     rgba(217, 119, 6, 0.12);
  --amber-light:    #f59e0b;

  --violet:         #7c3aed;
  --violet-glow:    rgba(124, 58, 237, 0.10);
  --violet-light:   #8b5cf6;

  /* Text — dark charcoal on light background */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-accent:    #2563eb;

  /* States */
  --success: #059669;
  --warning: #d97706;
  --error:   #ef4444;

  /* Spacing & Shape */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows — light and airy for light theme */
  --shadow-sm:           0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:           0 4px 16px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg:           0 10px 40px rgba(0,0,0,0.11), 0 4px 12px rgba(0,0,0,0.07);
  --shadow-glow-blue:    0 0 20px rgba(37, 99, 235, 0.22);
  --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.18);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f8f9fc;
  color: #0f172a;
}

/* LIGHT THEME — literal values, no variables */
body {
  background: #f8f9fc !important;
  color: #0f172a !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--blue-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--text-primary); }

img, svg { display: block; max-width: 100%; }

/* ── Typography Scale ───────────────────────────────────────── */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem);  font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
h2 { font-size: clamp(1.35rem, 3vw, 2rem);   font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem);  font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
h4 { font-size: 1rem; font-weight: 600; }
p  { font-size: 1rem; color: var(--text-secondary); line-height: 1.75; }

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.gap-2  { gap: 0.5rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.text-center { text-align: center; }

/* ── Site Header ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #0891b2);
  pointer-events: none;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.header-logo {
  width: 38px;
  height: 38px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #2563eb;
  flex-shrink: 0;
}

.header-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}

.site-header .logo-text {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header .logo-subtitle {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.header-badge {
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  border: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 5rem);
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.2);
  color: var(--blue-primary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 55%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.hero-stat .stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero-stat .stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border-subtle);
}

/* ── Section ────────────────────────────────────────────────── */
.section { padding: clamp(1.5rem, 4vw, 3rem) 0; }

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.section-icon.blue {
  background: var(--blue-glow);
  border: 1px solid rgba(37,99,235,0.3);
  color: var(--blue-light);
}

.section-icon.amber {
  background: var(--amber-glow);
  border: 1px solid rgba(217,119,6,0.25);
  color: var(--amber);
}

.section-title { display: flex; flex-direction: column; }
.section-title h2 { color: var(--text-primary); }
.section-title p  { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.15rem; }

.section-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-subtle), transparent);
}

/* ── Cards Grid ─────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

/* ── Subtest Card ───────────────────────────────────────────── */
.subtest-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-smooth),
    box-shadow var(--transition-smooth),
    border-color var(--transition-smooth);
}

/* Subtle top sheen */
.subtest-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, transparent 50%);
  pointer-events: none;
}

/* Background glow blob */
.subtest-card::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  top: -60px;
  right: -60px;
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.subtest-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.subtest-card:hover::after { opacity: 1; }

/* ── Card Colour Themes ─────────────────────────────────────── */
.card-theme-blue {
  --card-accent: var(--blue-primary);
  --card-glow:   var(--blue-glow);
  --card-light:  var(--blue-light);
}
.card-theme-blue:hover {
  border-color: rgba(37,99,235,0.5);
  box-shadow: var(--shadow-lg), var(--shadow-glow-blue);
}
.card-theme-blue::after {
  background: radial-gradient(circle, rgba(37,99,235,0.15), transparent 70%);
}

.card-theme-emerald {
  --card-accent: var(--emerald);
  --card-glow:   var(--emerald-glow);
  --card-light:  var(--emerald-light);
}
.card-theme-emerald:hover {
  border-color: rgba(16,185,129,0.5);
  box-shadow: var(--shadow-lg), var(--shadow-glow-emerald);
}
.card-theme-emerald::after {
  background: radial-gradient(circle, rgba(16,185,129,0.12), transparent 70%);
}

.card-theme-violet {
  --card-accent: var(--violet);
  --card-glow:   var(--violet-glow);
  --card-light:  var(--violet-light);
}
.card-theme-violet:hover {
  border-color: rgba(124,58,237,0.5);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(124,58,237,0.25);
}
.card-theme-violet::after {
  background: radial-gradient(circle, rgba(124,58,237,0.12), transparent 70%);
}

.card-theme-amber {
  --card-accent: var(--amber);
  --card-glow:   var(--amber-glow);
  --card-light:  var(--amber-light);
}
.card-theme-amber:hover {
  border-color: rgba(217,119,6,0.45);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(217,119,6,0.15);
}
.card-theme-amber::after {
  background: radial-gradient(circle, rgba(217,119,6,0.10), transparent 70%);
}

/* ── Card Inner Layout ──────────────────────────────────────── */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  background: var(--card-glow);
  border: 1px solid rgba(0,0,0,0.06);
  color: var(--card-accent);
  transition: transform var(--transition-base);
}

.subtest-card:hover .card-icon { transform: scale(1.08) rotate(-3deg); }

.card-number {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--card-accent);
  background: var(--card-glow);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.card-body { flex: 1; }

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--card-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.card-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-meta-item i { font-size: 0.7rem; color: var(--card-light); }

.card-cta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--card-light);
  transition: gap var(--transition-fast);
}

.subtest-card:hover .card-cta { gap: 0.65rem; }

/* ── Progress Bar ───────────────────────────────────────────── */
.progress-bar-wrapper {
  height: 4px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--card-accent), var(--card-light));
  border-radius: 999px;
}

/* ── Info Banner ────────────────────────────────────────────── */
.info-banner {
  background: rgba(37,99,235,0.05);
  border: 1px solid rgba(37,99,235,0.18);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.info-banner-icon {
  font-size: 1.1rem;
  color: var(--blue-light);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.info-banner-content h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.info-banner-content p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--blue-hover);
  box-shadow: var(--shadow-glow-blue);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

/* ── Back Navigation ────────────────────────────────────────── */
.back-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: clamp(1rem, 3vw, 2rem) 0 0;
  transition: color var(--transition-fast);
}
.back-nav:hover { color: var(--blue-light); }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb-sep     { color: var(--border-accent); }
.breadcrumb-current { color: var(--text-secondary); font-weight: 500; }

/* ── Exercise Layout (sub-pages) ────────────────────────────── */
.exercise-page { flex: 1; padding-bottom: clamp(2rem, 6vw, 4rem); }

.exercise-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.exercise-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.exercise-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.badge-blue    { background: rgba(37,99,235,0.10);  border: 1px solid rgba(37,99,235,0.25);  color: var(--blue-primary); }
.badge-emerald { background: rgba(5,150,105,0.10);  border: 1px solid rgba(5,150,105,0.25);  color: var(--emerald); }
.badge-violet  { background: rgba(124,58,237,0.10); border: 1px solid rgba(124,58,237,0.25); color: var(--violet); }
.badge-amber   { background: rgba(217,119,6,0.10);  border: 1px solid rgba(217,119,6,0.25);  color: var(--amber); }

/* ── Answer Feedback States ─────────────────────────────────── */
.feedback-correct {
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.25);
  color: var(--emerald);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.875rem;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.feedback-wrong {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  color: var(--error);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.875rem;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Choice Labels ──────────────────────────────────────────── */
.choice-group { display: flex; flex-direction: column; gap: 0.5rem; }

.choice-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
}

.choice-label:hover {
  background: var(--bg-elevated);
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.choice-label input { display: none; }

.choice-label.selected  { background: rgba(37,99,235,0.1);  border-color: rgba(37,99,235,0.5);  color: var(--text-primary); }
.choice-label.correct   { background: rgba(5,150,105,0.08); border-color: rgba(5,150,105,0.4); color: var(--emerald); }
.choice-label.incorrect { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.4); color: var(--error); }

/* ── Reading Text Block ─────────────────────────────────────── */
.reading-text {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.reading-text .text-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.gap-blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.1rem 0.5rem;
  background: rgba(37,99,235,0.15);
  border: 1px dashed rgba(37,99,235,0.5);
  border-radius: var(--radius-sm);
  color: var(--blue-light);
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0 0.2rem;
}

/* ── Score Panel ────────────────────────────────────────────── */
.score-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-in-up { animation: fadeInUp 0.6s ease both; }
.animate-fade-in    { animation: fadeIn   0.4s ease both; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: #1e293b;
  padding: 0;
  margin-top: auto;
}

.site-footer .container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #334155;
}

.footer-col { flex: 1; min-width: 160px; }
.footer-col-center { display: flex; align-items: center; justify-content: center; }
.footer-col-right  { display: flex; justify-content: flex-end; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.footer-logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
}

.footer-name    { font-size: 0.85rem; font-weight: 700; color: #f1f5f9; }
.footer-tagline { font-size: 0.77rem; color: #94a3b8; margin: 0; }
.footer-motto   { font-size: 0.85rem; color: #64748b; font-style: italic; margin: 0; }

.footer-links { display: flex; flex-direction: column; gap: 0.45rem; }
.footer-links a { font-size: 0.82rem; color: #94a3b8; text-decoration: none; transition: color var(--transition-fast); }
.footer-links a:hover { color: #f1f5f9; }

.footer-copyright {
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.7rem;
  color: #475569;
}

/* ── Custom Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Focus Visible ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--blue-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat-divider { display: none; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .section-divider { display: none; }
  .exercise-title-row { flex-direction: column; }
  .site-footer .container { flex-direction: column; padding-top: 2rem; }
  .footer-col-center, .footer-col-right { justify-content: flex-start; }
  .footer-links { align-items: flex-start; }

  /* Header mobile fixes */
  .site-header {
    padding: 0 16px;
    height: 56px;
    gap: 8px;
  }
  .header-brand {
    gap: 8px;
  }
  .header-logo {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
  .site-header .logo-subtitle {
    display: none;
  }
  .site-header .logo-text {
    font-size: 13px;
  }
  .site-header button,
  .site-header a[href*="unterstuetzung"],
  .site-header a[href*="ko-fi"] {
    font-size: 11px !important;
    padding: 5px 10px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    animation: none !important;
  }
}

@media (max-width: 480px) {
  .subtest-card { padding: 1.25rem; }
  .card-footer  { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ══════════════════════════════════════════════════════════════
   EXERCISE LAYOUT  (Leseverstehen Teil 1 · 2 · 3)
   ══════════════════════════════════════════════════════════════ */

/* ── Two-column exercise grid ───────────────────────────────── */
.exercise-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

/* ── Instructions strip ─────────────────────────────────────── */
.instructions-box {
  background: rgba(37,99,235,0.05);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: var(--radius-md);
  padding: 0.875rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.instructions-box i { color: var(--blue-light); margin-top: 0.1rem; flex-shrink: 0; }

/* ── Progress strip ─────────────────────────────────────────── */
.exercise-progress {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.progress-track {
  flex: 1;
  height: 5px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-light));
  border-radius: 999px;
  width: 0%;
  transition: width 0.5s ease;
}
.progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Article card ───────────────────────────────────────────── */
.article-panel { min-width: 0; }

.article-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.article-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.3;
}

.article-para {
  font-size: 0.98rem;
  line-height: 1.95;
  color: var(--text-secondary);
  margin-bottom: 0.875rem;
}

/* ── Gap 0 (prefilled example) ──────────────────────────────── */
.gap-example {
  display: inline;
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.25);
  border-radius: var(--radius-sm);
  color: var(--emerald);
  font-size: 0.84rem;
  padding: 0.1rem 0.55rem;
  margin: 0 0.15rem;
  font-style: italic;
}

/* ── Drop zones (gaps 1–6) ──────────────────────────────────── */
.drop-zone {
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  border-radius: var(--radius-md);
}

.gap-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem 0.2rem 0.35rem;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--border-accent);
  background: var(--bg-elevated);
  transition: all var(--transition-base);
  user-select: none;
  white-space: nowrap;
}

/* Drag-over highlight */
.drop-zone.drag-over .gap-chip {
  border-color: var(--blue-primary);
  border-style: solid;
  background: rgba(37,99,235,0.12);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Selected (click-to-place mode) */
.drop-zone.click-target .gap-chip {
  border-color: var(--blue-light);
  border-style: solid;
  background: rgba(37,99,235,0.08);
  animation: pulse-border 1.2s ease infinite;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 2px rgba(37,99,235,0.2); }
  50%       { box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
}

/* Filled state */
.drop-zone.filled .gap-chip {
  border-style: solid;
  border-color: rgba(37,99,235,0.45);
  background: rgba(37,99,235,0.07);
}

/* After check: correct */
.drop-zone.correct .gap-chip {
  border-color: var(--emerald);
  background: rgba(16,185,129,0.1);
}
.drop-zone.correct .gap-letter-badge { background: var(--emerald); }
.drop-zone.correct .gap-text-preview { color: var(--emerald); }

/* After check: incorrect */
.drop-zone.incorrect .gap-chip {
  border-color: var(--error);
  background: rgba(239,68,68,0.1);
}
.drop-zone.incorrect .gap-letter-badge { background: var(--error); }
.drop-zone.incorrect .gap-text-preview { color: var(--error); }

/* Gap number badge */
.gap-number {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(37,99,235,0.18);
  color: var(--blue-light);
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gap-placeholder {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Filled chip parts */
.gap-letter-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gap-text-preview {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--blue-light);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gap-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.1rem;
  font-size: 0.9rem;
  line-height: 1;
  transition: color var(--transition-fast);
  flex-shrink: 0;
  margin-left: 0.1rem;
}
.gap-remove:hover { color: var(--error); }

/* Missed (empty at check time) */
.drop-zone.missed .gap-chip {
  border-color: rgba(239,68,68,0.5);
  background: rgba(239,68,68,0.07);
}
.drop-zone.missed .gap-number { background: rgba(239,68,68,0.2); color: var(--error); }
.drop-zone.missed .gap-placeholder { color: var(--error); font-style: normal; }

/* ── Options panel ──────────────────────────────────────────── */
.options-panel {
  position: sticky;
  top: 76px;
}

.options-panel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.options-panel-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
}

.options-panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.options-counter {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--blue-light);
  background: rgba(37,99,235,0.12);
  border: 1px solid rgba(37,99,235,0.25);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

#options-pool {
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

#options-pool.drag-over-pool {
  background: rgba(37,99,235,0.05);
  border-radius: var(--radius-md);
}

/* Option cards */
.option-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: grab;
  transition: all var(--transition-base);
  user-select: none;
  position: relative;
}

.option-card:hover:not(.used):not([disabled]) {
  background: var(--bg-elevated);
  border-color: rgba(37,99,235,0.4);
  transform: translateX(-3px);
  box-shadow: 3px 0 12px rgba(37,99,235,0.10);
}

.option-card:active:not(.used) { cursor: grabbing; }

.option-card.dragging { opacity: 0.35; transform: scale(0.97); }

.option-card.selected {
  border-color: var(--blue-primary);
  background: rgba(37,99,235,0.1);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
  transform: translateX(-2px);
}

.option-card.used {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

.option-card.answer-correct {
  opacity: 1 !important;
  border-color: var(--emerald) !important;
  background: rgba(16,185,129,0.08) !important;
  pointer-events: none;
}

.option-card.answer-wrong {
  opacity: 1 !important;
  border-color: var(--error) !important;
  background: rgba(239,68,68,0.08) !important;
  pointer-events: none;
}

.option-letter {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.3);
  color: var(--blue-light);
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.05rem;
  transition: all var(--transition-base);
}

.answer-correct .option-letter {
  background: rgba(5,150,105,0.12);
  border-color: rgba(5,150,105,0.4);
  color: var(--emerald);
}
.answer-wrong .option-letter {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.45);
  color: var(--error);
}

.option-body { flex: 1; min-width: 0; }

.option-text {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.placed-badge {
  display: none;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--blue-light);
  background: rgba(37,99,235,0.15);
  border: 1px solid rgba(37,99,235,0.25);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
}
.option-card.used .placed-badge { display: inline-block; }

/* ── Action bar ─────────────────────────────────────────────── */
.action-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 0 0;
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-pruefen {
  background: var(--blue-primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-pruefen:hover:not(:disabled) {
  background: var(--blue-hover);
  box-shadow: var(--shadow-glow-blue);
  transform: translateY(-1px);
}
.btn-pruefen:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-reset {
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.btn-reset:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

/* ── Score result panel ─────────────────────────────────────── */
.score-result {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 220px;
  border-radius: var(--radius-md);
  padding: 0.875rem 1.25rem;
  transition: all var(--transition-base);
}
.score-result.hidden { display: none; }

.score-result.result-pass {
  background: rgba(16,185,129,0.09);
  border: 1px solid rgba(16,185,129,0.3);
}
.score-result.result-fail {
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.25);
}

.score-emoji { font-size: 1.4rem; flex-shrink: 0; }

.score-details { flex: 1; }

.score-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.score-message {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.score-pct {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.result-pass .score-pct { color: var(--emerald); }
.result-fail .score-pct { color: var(--amber); }

/* ── Responsive overrides ───────────────────────────────────── */
@media (max-width: 960px) {
  .exercise-layout {
    grid-template-columns: 1fr;
  }
  .options-panel {
    position: static;
  }
  #options-pool {
    max-height: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.4rem;
  }
}

@media (max-width: 560px) {
  #options-pool { grid-template-columns: 1fr; }
  .gap-text-preview { max-width: 110px; }
  .action-bar { flex-direction: column; align-items: stretch; }
  .btn-pruefen, .btn-reset { justify-content: center; }
}

/* ══════════════════════════════════════════════════════════════
   EXERCISE SELECTOR BAR  (Leseverstehen Teil 1 – multi-exercise)
   ══════════════════════════════════════════════════════════════ */

.selector-bar {
  margin-bottom: 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1rem 1rem 0.85rem;
}

.selector-bar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Wrapping grid — auto-fills columns, each at least 88px wide */
.selector-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
}

/* Every button is identical in size via grid stretch */
.selector-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  height: 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition:
    background  0.15s ease,
    border-color 0.15s ease,
    color       0.15s ease,
    transform   0.15s ease,
    box-shadow  0.15s ease;
}

.selector-btn:hover:not(.active) {
  background: rgba(37,99,235,0.07);
  border-color: rgba(37,99,235,0.35);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.12);
}

/* ÜT number — now the PRIMARY label (big & bold) */
.selector-btn .s-num {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: inherit;
  opacity: 1;
  flex-shrink: 0;
}

/* Topic word — SECONDARY label (wraps within fixed-height button) */
.selector-btn .s-label {
  font-size: 0.72rem;
  font-weight: 500;
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
  padding: 0 0.2rem;
  opacity: 0.7;
}

/* Active / selected */
.selector-btn.active {
  background: var(--blue-primary);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
  box-shadow: 0 6px 20px rgba(37,99,235,0.35), 0 2px 6px rgba(37,99,235,0.2);
  transform: translateY(-2px);
}
.selector-btn.active .s-num  { opacity: 1; }
.selector-btn.active .s-label { opacity: 0.8; }
.selector-btn.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255,255,255,0.15) 0%, transparent 55%);
  pointer-events: none;
}

/* Completed (all 6 correct) */
.selector-btn.completed:not(.active) {
  border-color: rgba(5,150,105,0.35);
  background: rgba(5,150,105,0.07);
  color: var(--emerald);
}
.selector-btn.completed:not(.active) .s-label { opacity: 0.75; }
.selector-btn.completed:not(.active)::before {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.55rem;
  color: var(--emerald);
  font-weight: 900;
}
