/* ==========================================================================
   TestDaF Digital Lab — Clean Modern EdTech Design System
   Light, high-legibility palette with Royal Blue & Emerald accents + Heroicons
   ========================================================================== */
:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #475569;
  --muted-2: #64748b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  --acc: #2563eb;
  --acc-d: #1d4ed8;
  --acc-l: #60a5fa;
  --acc2: #eff6ff;
  --acc-border: #bfdbfe;

  --ok: #059669;
  --okbg: #ecfdf5;
  --ok-border: #a7f3d0;

  --gold: #d97706;
  --gold-bg: #fffbeb;
  --warn: #b45309;
  --warn-bg: #fff7ed;
  --bad: #dc2626;
  --badbg: #fef2f2;
  --hl: #fef08a;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 44px -8px rgba(15, 23, 42, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Vector Icons (Heroicons) ---------- */
.ico {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}
.ico-xs { width: 14px; height: 14px; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 22px; height: 22px; }
.ico-xl { width: 26px; height: 26px; }

.icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--acc2);
  color: var(--acc);
  display: grid;
  place-items: center;
  flex: none;
}
.icon-badge.ok { background: var(--okbg); color: var(--ok); }
.icon-badge.gold { background: var(--gold-bg); color: var(--gold); }
.icon-badge.slate { background: var(--surface-2); color: var(--ink-2); }

/* ---------- Motion Keyframes & Scroll Reveals ---------- */
@keyframes tdlFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes expandDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.lp-grid-3 > .reveal:nth-child(2),
.lp-grid-4 > .reveal:nth-child(2),
.packs > .reveal:nth-child(2),
.steps-strip > .reveal:nth-child(2) { transition-delay: 0.06s; }
.lp-grid-3 > .reveal:nth-child(3),
.lp-grid-4 > .reveal:nth-child(3),
.packs > .reveal:nth-child(3),
.steps-strip > .reveal:nth-child(3) { transition-delay: 0.12s; }
.lp-grid-4 > .reveal:nth-child(4),
.packs > .reveal:nth-child(4) { transition-delay: 0.18s; }

/* ---------- Topbar & Navigation (Clean White Google-style Header) ---------- */
.top {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
  transition: box-shadow 0.2s ease;
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 17px;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none !important;
  min-width: 0;
}
.logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.28);
  flex: none;
  transition: transform 0.2s ease;
}
.brand:hover .logo { transform: scale(1.05); }
.brand small {
  font-weight: 600;
  color: var(--muted);
  font-size: 12.5px;
  margin-left: 4px;
  padding: 2px 8px;
  background: var(--surface-2);
  border-radius: 99px;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.nav-toggle:hover { background: var(--surface-2); border-color: var(--line-strong); }
.nav-mobile-tools { display: none; align-items: center; gap: 8px; margin-left: auto; }
.nav-desktop-lang { display: inline-flex; align-items: center; }
.nav-drawer-head, .nav-backdrop { display: none; }

.navlink {
  color: var(--muted);
  text-decoration: none !important;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.navlink:hover { background: var(--surface-2); color: var(--ink); }
.navlink.on { background: var(--acc2); color: var(--acc-d); }
.navlink.cta {
  background: var(--acc);
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22);
}
.navlink.cta:hover { background: var(--acc-d); color: #fff; transform: translateY(-1px); }

@media (max-width: 860px) {
  .top {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #ffffff;
    z-index: 90;
  }
  body.nav-open { overflow: hidden; }
  .nav-toggle { display: grid; }
  .nav-mobile-tools { display: flex; }
  .nav-desktop-lang { display: none; }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  .nav-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; }
  .topnav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    height: 100dvh;
    z-index: 120;
    background: #ffffff;
    border-left: 1px solid var(--line);
    box-shadow: -16px 0 44px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px 16px 28px;
    overflow-y: auto;
    transform: translateX(104%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  }
  .topnav.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 2px 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }
  .nav-drawer-head .brand { font-size: 15px; }
  .nav-drawer-close {
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--ink);
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex: none;
    transition: background 0.15s ease;
  }
  .nav-drawer-close:hover { background: var(--line); }
  .topnav .navlink, .topnav .user-chip {
    width: 100%;
    justify-content: flex-start;
    padding: 11px 12px;
    font-size: 14.5px;
  }
  .topnav .user-chip { margin-top: 8px; }
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 4px 12px 4px 5px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none !important;
}
.user-chip:hover { border-color: var(--line-strong); background: #fff; }
.user-chip .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--acc);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

/* ---------- Language Switcher (Pre-login only) ---------- */
.lang-switch {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  border: 0;
  background: transparent;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.15s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.on {
  background: #fff;
  color: var(--acc);
  box-shadow: var(--shadow-xs);
}

/* ---------- Buttons & Form Controls ---------- */
.btn {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 15px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none !important;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
  box-shadow: var(--shadow-xs);
}
.btn:hover:not(:disabled) { border-color: #94a3b8; background: var(--surface-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active:not(:disabled) { transform: scale(0.985) translateY(0); }
.btn.p {
  background: var(--acc);
  border-color: var(--acc);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}
.btn.p:hover:not(:disabled) { background: var(--acc-d); border-color: var(--acc-d); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3); }
.btn.soft {
  background: var(--acc2);
  border-color: var(--acc-border);
  color: var(--acc-d);
  box-shadow: none;
}
.btn.soft:hover:not(:disabled) { background: #dbeafe; }
.btn.big { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: 0.48; cursor: not-allowed; }
.btn.danger { color: var(--bad); border-color: #fecaca; background: #fff; }
.btn.danger:hover:not(:disabled) { background: var(--badbg); border-color: var(--bad); }
.btn.wa {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.22);
}
.btn.wa:hover:not(:disabled) { background: #15803d; border-color: #15803d; box-shadow: 0 6px 16px rgba(22, 163, 74, 0.28); }
.btn.wa.sm { padding: 6px 11px; font-size: 12.5px; }

.inp, .krow input, .authbox input, .prow input, .prow select {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  padding: 10px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.inp:focus, .krow input:focus, .authbox input:focus, .prow input:focus, .prow select:focus {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 5px;
  color: var(--muted);
  border-radius: 7px;
  display: grid;
  place-items: center;
}
.pw-eye:hover { background: var(--surface-2); color: var(--ink); }

.lbl {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  display: block;
  margin-bottom: 5px;
}

/* ---------- Landing Website (Public Pre-Login) ---------- */
.lp-hero {
  background:
    radial-gradient(circle at 82% 8%, rgba(219, 234, 254, 0.9) 0%, rgba(239, 246, 255, 0.55) 36%, rgba(248, 250, 252, 0) 70%),
    linear-gradient(180deg, #f0f6ff 0%, #f8fafc 70%, #ffffff 100%);
  padding: 72px 0 68px;
}
.lp-hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 48px;
  align-items: center;
}
.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--acc-border);
  color: var(--acc-d);
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 99px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}
.lp-hero h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.09;
  letter-spacing: -0.032em;
  margin: 0 0 18px;
  color: var(--ink);
}
.lp-hero h1 span { color: var(--acc); }
.lp-hero .lead {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 560px;
  line-height: 1.65;
}
.lp-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.lp-trust {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.lp-trust span { display: inline-flex; align-items: center; gap: 6px; }
.lp-trust svg { color: var(--ok); }

.lp-hero-grid { animation: tdlFadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.lp-preview {
  background: #fff;
  border: 1px solid rgba(203, 213, 225, 0.65);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 24px 56px -14px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(37, 99, 235, 0.05);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}
.lp-preview:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 64px -14px rgba(37, 99, 235, 0.16), 0 6px 16px rgba(15, 23, 42, 0.08);
}
.lp-preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.lp-mod-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-mod-item {
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: var(--bg);
  border-radius: 13px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.lp-mod-item:hover { border-color: var(--acc-border); background: #fff; transform: translateY(-1px); }
.lp-mod-item b { display: block; font-size: 13.5px; }
.lp-mod-item span { font-size: 12px; color: var(--muted); }
.lp-ai-box {
  margin-top: 14px;
  background: var(--okbg);
  border: 1px solid var(--ok-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lp-ai-box strong { font-size: 13.5px; color: #065f46; display: block; }
.lp-ai-box p { margin: 2px 0 0; font-size: 12.5px; color: #047857; line-height: 1.4; }
.tdn-pill {
  background: var(--ok);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lp-sec {
  padding: 74px 0;
  background: #ffffff;
}
.lp-sec.alt {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 14%, #f8fafc 86%, #ffffff 100%);
}
.lp-sec-head { text-align: center; max-width: 660px; margin: 0 auto 42px; }
.lp-sec-head h2 {
  font-size: clamp(25px, 3.1vw, 34px);
  margin: 6px 0 12px;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--ink);
}
.lp-sec-head p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

.lp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lp-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 20px -6px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}
.lp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -10px rgba(37, 99, 235, 0.14);
  border-color: var(--acc-border);
}
.lp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lp-step-num {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--acc-d);
  background: var(--acc2);
  border: 1px solid var(--acc-border);
  padding: 3px 9px;
  border-radius: 99px;
}
.lp-card h3 { margin: 4px 0 0; font-size: 17.5px; letter-spacing: -0.015em; }
.lp-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.62; }
.lp-mod-tag {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--acc-d);
}

/* Hero Metrics Strip */
.lp-stats-strip {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.lp-stat-box {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 6px 20px -8px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lp-stat-box b {
  font-size: 24px;
  font-weight: 800;
  color: var(--acc-d);
  letter-spacing: -0.025em;
}
.lp-stat-box span { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Landing Interactive KI-Studio Showcase */
.lp-ai-sec {
  background:
    radial-gradient(circle at 14% 35%, rgba(219, 234, 254, 0.55) 0%, rgba(239, 246, 255, 0.25) 45%, rgba(255, 255, 255, 0) 75%),
    #ffffff;
}
.lp-ai-showcase {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: center;
}
.lp-ai-copy h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 10px; letter-spacing: -0.02em; }
.lp-ai-sub { margin: 0 0 22px; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.lp-ai-list { display: flex; flex-direction: column; gap: 14px; }
.lp-ai-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.lp-ai-row:hover { transform: translateY(-2px); border-color: var(--acc-border); }
.lp-ai-row h3 { margin: 0 0 3px; font-size: 15.5px; }
.lp-ai-row p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.ai-demo-card {
  background: #fff;
  border: 1px solid var(--acc-border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 20px 44px -12px rgba(37, 99, 235, 0.16);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ai-demo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ai-demo-brand { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; color: var(--ink); }
.ai-demo-brand svg { color: var(--acc); }
.ai-demo-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.ai-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.16s ease;
}
.ai-tab:hover { color: var(--ink); }
.ai-tab.on { background: #fff; color: var(--acc-d); box-shadow: var(--shadow-xs); }
.ai-demo-prompt {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--acc);
  border-radius: 10px;
  padding: 12px 14px;
}
.ai-demo-bars { display: flex; flex-direction: column; gap: 9px; }
.ai-bar-meta { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; color: var(--ink-2); font-weight: 600; }
.ai-bar-meta b { color: var(--acc-d); }
.ai-bar-track { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.ai-bar-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc) 0%, #4f46e5 100%); border-radius: 99px; transition: width 0.35s ease; }
.ai-demo-feedback {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--okbg);
  border: 1px solid var(--ok-border);
  border-radius: 12px;
  padding: 12px 14px;
}
.ai-demo-feedback strong { font-size: 13px; color: #065f46; display: block; margin-bottom: 2px; }
.ai-demo-feedback p { margin: 0; font-size: 13px; color: #047857; line-height: 1.45; }

/* Logged-in Dashboard KI-Trainingsstudio */
.dash-ai-card {
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  border: 1px solid var(--acc-border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.dash-ai-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.dash-ai-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.dash-ai-tile:hover { transform: translateY(-2px); border-color: var(--acc-border); box-shadow: var(--shadow-sm); }
.dash-ai-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dash-ai-tile b { font-size: 14.5px; color: var(--ink); }
.dash-ai-tile p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; flex: 1; }
.dash-ai-sandbox {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  animation: expandDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.dash-ai-samples { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.dash-ai-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.dash-ai-msg { display: flex; gap: 10px; align-items: flex-start; }
.dash-ai-msg.user { justify-content: flex-end; }
.dash-ai-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--acc-soft);
  color: var(--acc);
  border: 1px solid var(--acc-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 2px;
}
.dash-ai-bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(15, 23, 42, 0.04));
}
.dash-ai-msg.user .dash-ai-bubble {
  background: var(--acc);
  border-color: var(--acc);
  color: #fff;
  white-space: pre-wrap;
}
.ai-prose p { margin: 0 0 8px; }
.ai-prose p:last-child { margin-bottom: 0; }
.ai-prose ul { margin: 4px 0 8px; padding-left: 18px; }
.ai-prose ul:last-child { margin-bottom: 0; }
.ai-prose li { margin: 3px 0; }
.dash-ai-ta { width: 100%; resize: vertical; min-height: 82px; font-size: 14.5px; line-height: 1.55; }
.dash-ai-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

.lp-cta-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #2563eb 100%);
  color: #fff;
  border-radius: 24px;
  padding: 46px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 24px 48px -14px rgba(30, 58, 138, 0.32);
}
.lp-cta-banner h2 { margin: 0 0 6px; color: #fff; font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.02em; }
.lp-cta-banner p { margin: 0; opacity: 0.92; max-width: 540px; line-height: 1.55; }
.lp-cta-btn {
  background: #ffffff;
  border-color: #ffffff;
  color: #1d4ed8;
  font-weight: 700;
  box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.28);
}
.lp-cta-btn:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #eff6ff;
  color: #1e40af;
}

/* ---------- Professional Multi-Column Site Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #0f172a 0%, #0b1120 100%);
  color: #cbd5e1;
  padding: 56px 0 26px;
  margin-top: 8px;
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 1fr 1.1fr;
  gap: 32px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.sf-brand .brand { color: #ffffff; margin-bottom: 12px; }
.sf-brand p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: #94a3b8; max-width: 310px; }
.sf-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.sf-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 99px;
  padding: 4px 10px;
}
.sf-col h4 {
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f8fafc;
}
.sf-links { display: flex; flex-direction: column; gap: 9px; }
.sf-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}
.sf-links a:hover { color: #ffffff; transform: translateX(2px); }
.sf-mod-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; color: #94a3b8; }
.sf-mod-list li { display: flex; align-items: center; gap: 8px; }
.sf-mod-list svg { color: #60a5fa; }
.sf-sup-text { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: #94a3b8; }
.sf-wa-btn { box-shadow: none; }
.site-footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #94a3b8;
}
.dev-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 99px;
  padding: 5px 12px;
  color: #cbd5e1;
}
.dev-credit svg { color: #60a5fa; }
.dev-credit strong { color: #ffffff; font-weight: 800; letter-spacing: 0.01em; }

@media (max-width: 1024px) {
  .lp-grid-4, .lp-stats-strip { grid-template-columns: repeat(2, 1fr); }
  .site-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .lp-hero-grid, .lp-ai-showcase { grid-template-columns: 1fr; gap: 28px; }
  .lp-grid-3, .dash-ai-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-sec { padding: 48px 0; }
}
@media (max-width: 600px) {
  .lp-grid-3, .lp-grid-4, .lp-mod-list, .lp-stats-strip, .dash-ai-grid, .site-footer-grid { grid-template-columns: 1fr; }
  .lp-hero { padding: 36px 0 44px; }
  .lp-sec { padding: 40px 0; }
  .lp-cta-banner { padding: 28px 22px; }
  .lp-ctas { flex-direction: column; }
  .lp-ctas .btn { width: 100%; }
  .lp-ai-box { flex-direction: column; align-items: flex-start; }
  .ai-demo-tabs { grid-template-columns: 1fr; }
  .site-footer { padding: 40px 0 22px; }
  .site-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Auth Page (Clean Light Centered / Split Card) ---------- */
.authpage {
  min-height: calc(100vh - 67px);
  min-height: calc(100dvh - 67px);
  background: radial-gradient(circle at top right, #dbeafe 0%, #f8fafc 45%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
}
.authshell {
  width: 100%;
  max-width: 940px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: tdlFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-aside {
  min-width: 0;
  background: linear-gradient(155deg, #eff6ff 0%, #e0e7ff 100%);
  color: var(--ink);
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  border-right: 1px solid var(--line);
}
.auth-aside h2 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.auth-aside h2 span { color: var(--acc); }
.auth-aside p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.auth-features {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
}
.auth-features li .ico-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: var(--acc);
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: var(--shadow-xs);
}
.auth-foot { font-size: 12px; color: var(--muted); border-top: 1px solid rgba(15, 23, 42, 0.08); padding-top: 14px; }
.authbox {
  min-width: 0;
  padding: 36px 34px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.authbox h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.02em; }
.authbox .sub { margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.field { margin-bottom: 14px; }
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin: -4px 0 14px;
}
.auth-sep {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  .authshell { grid-template-columns: minmax(0, 1fr); max-width: 460px; }
  .auth-aside { display: none; }
}

/* ---------- Alerts & Status Pills ---------- */
.alert {
  display: block;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 500;
  margin: 12px 0;
  line-height: 1.55;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.alert-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-ico {
  flex: none;
  display: inline-flex;
  margin-top: 2px;
}
.alert-body {
  min-width: 0;
  flex: 1;
}
.alert-msg {
  margin: 0;
}
.alert-msg b {
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.alert-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.alert-actions .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}
.alert.info { background: var(--acc2); color: #1e40af; border: 1px solid var(--acc-border); }
.alert.ok { background: var(--okbg); color: #065f46; border: 1px solid var(--ok-border); }
.alert.ok .alert-actions .btn {
  border-color: var(--ok-border);
  color: #065f46;
  background: #ffffff;
}
.alert.ok .alert-actions .btn:hover:not(:disabled) {
  background: #f0fdf4;
  border-color: var(--ok);
}
.alert.ko { background: var(--badbg); color: #991b1b; border: 1px solid #fecaca; }
.alert.warn { background: var(--warn-bg); color: #9a3412; border: 1px solid #fed7aa; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 99px;
  padding: 4px 11px;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.pill.ok { background: var(--okbg); color: var(--ok); border-color: var(--ok-border); }
.pill.ko { background: var(--badbg); color: var(--bad); border-color: #fecaca; }
.pill.adm { background: var(--gold-bg); color: var(--warn); border-color: #fde68a; }

/* ---------- App Dashboard (Clean, Airy, Light SaaS Layout) ---------- */
.app-banner {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  animation: tdlFadeUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.banner-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.banner-title h1 { font-size: clamp(20px, 2.5vw, 24px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.banner-sub { font-size: 13.5px; color: var(--muted); word-break: break-word; }
.key-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 320px;
  flex: 0 1 480px;
}
.keybox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.keybox-head label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.krow { display: flex; gap: 8px; }
.krow input { flex: 1; min-width: 0; }
.kmsg { margin-top: 8px; font-weight: 600; font-size: 13px; }
.kmsg.ko, .kot { color: var(--bad); }
.okt { color: var(--ok); }

.dash-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 22px 0;
  box-shadow: var(--shadow-xs);
  animation: tdlFadeUp 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.kpi {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.kpi:hover { transform: translateY(-2px); border-color: var(--acc-border); background: #fff; }
.kpi span { font-size: 12px; color: var(--muted); display: block; }
.kpi b { font-size: 21px; color: var(--ink); letter-spacing: -0.01em; }

.fmt-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fmt-box .mods { margin: 0; }
.fmt-collapse { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); animation: expandDown 0.25s cubic-bezier(0.16, 1, 0.3, 1); }

.mods {
  display: flex;
  gap: 8px;
  margin: 20px 0 14px;
  flex-wrap: wrap;
}
.mod {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: var(--shadow-xs);
  transition: all 0.16s ease;
}
.mod:hover { border-color: var(--acc-l); background: var(--surface-2); transform: translateY(-1px); }
.mod.on { border-color: var(--acc); background: var(--acc2); color: var(--acc-d); }
.mod small { font-weight: 500; color: var(--muted); font-size: 12px; }

.fmt-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
}
.fmt { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.fcard { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fcard .n { font-size: 11.5px; color: var(--acc); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.fcard b { display: block; margin: 3px 0; font-size: 14px; }
.fcard span { font-size: 12.5px; color: var(--muted); }

.catalog-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; scroll-margin-top: 84px; }

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.fpill {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 99px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.16s ease;
}
.fpill:hover { border-color: var(--line-strong); color: var(--ink); transform: translateY(-1px); }
.fpill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.search-wrap { position: relative; min-width: 240px; flex: 0 1 280px; }
.search-wrap .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.search-inp { padding-left: 34px !important; font-size: 13.5px !important; padding-top: 7px !important; padding-bottom: 7px !important; }

h2 { font-size: 21px; margin: 26px 0 6px; letter-spacing: -0.015em; }
.sub { color: var(--muted); margin: 0 0 14px; font-size: 14.5px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.tc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-xs);
  animation: tdlFadeUp 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.grid .tc:nth-child(2) { animation-delay: 0.03s; }
.grid .tc:nth-child(3) { animation-delay: 0.06s; }
.grid .tc:nth-child(4) { animation-delay: 0.09s; }
.grid .tc:nth-child(5) { animation-delay: 0.12s; }
.grid .tc:nth-child(6) { animation-delay: 0.15s; }
.grid .tc:nth-child(n+7) { animation-delay: 0.18s; }
.tc:hover { box-shadow: var(--shadow-md); border-color: var(--acc-border); transform: translateY(-3px); }
.tc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tc h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.tc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.t-tag {
  font-size: 11.5px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
}
.tc.lock {
  background: #fff;
  border-style: dashed;
  border-color: var(--line-strong);
  box-shadow: none;
}
.tc.lock:hover { transform: none; box-shadow: none; border-color: var(--muted-2); }
.tc.lock h3 { color: var(--muted); }
.mbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mb {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  transition: all 0.16s ease;
}
.mb span { display: inline-flex; align-items: center; gap: 6px; }
.mb:hover { border-color: var(--acc); background: var(--acc2); color: var(--acc-d); transform: translateY(-1px); }
.mb i { font-style: normal; font-size: 11px; color: var(--acc-d); background: #fff; border: 1px solid var(--acc-border); border-radius: 6px; padding: 1px 5px; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 34px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
}
.pg-info { font-size: 13px; font-weight: 600; color: var(--muted); }
.pg-btns { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pg-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  display: inline-grid;
  place-items: center;
  transition: all 0.15s ease;
}
.pg-btn:hover:not(:disabled) { border-color: var(--acc); background: var(--acc2); color: var(--acc-d); }
.pg-btn.on { background: var(--acc); border-color: var(--acc); color: #fff; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25); }
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-dots { padding: 0 4px; color: var(--muted-2); font-weight: 700; }

.note { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding: 20px 0 36px; }

/* ---------- Packs Page & Pricing Cards ---------- */
.page-hero {
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 68px;
  animation: tdlFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.page-hero h1 { font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 10px; letter-spacing: -0.025em; }
.page-hero h1 span { color: var(--acc); }
.page-hero p { margin: 0; color: var(--muted); max-width: 640px; font-size: 15.5px; }

.packs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.packs.overlap { margin: -42px 0 32px; }

.pack {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, border-color 0.24s ease;
}
.pack:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--acc-border); }
.pack.pop {
  border: 2px solid var(--acc);
  background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 38%);
  box-shadow: 0 14px 32px -6px rgba(37, 99, 235, 0.18);
  transform: translateY(-4px);
}
.pack.pop:hover { transform: translateY(-8px); box-shadow: 0 22px 42px -8px rgba(37, 99, 235, 0.24); }

.popb {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 99px;
  padding: 5px 13px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.32);
}
.pack-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pack .days {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--acc2);
  color: var(--acc-d);
  border: 1px solid var(--acc-border);
  border-radius: 99px;
  padding: 3px 10px;
}
.pack.pop .days { background: #dbeafe; }
.pack h3 { margin: 4px 0 0; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); }
.pack-sub { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; min-height: 38px; }

.pack-price-box {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pack .price {
  font-size: 30px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.pack .price small { font-size: 13px; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.04em; }

.pack ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}
.pack li { display: flex; align-items: flex-start; gap: 9px; line-height: 1.45; }
.pack-chk {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--okbg);
  color: var(--ok);
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}
.pack-foot { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.pack-foot .btn.wa { width: 100%; justify-content: center; }
.pack .pnote { margin: 0; font-size: 12px; color: var(--muted-2); text-align: center; line-height: 1.4; }

.steps-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 30px;
}
.step-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.step-card:hover { transform: translateY(-2px); border-color: var(--acc-border); }
.step-card b { font-size: 15px; color: var(--ink); }
.step-card span { font-size: 13.5px; color: var(--muted); }

/* ---------- Profile Page ---------- */
.prof-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
  margin: 24px 0 44px;
  align-items: start;
}
@media (max-width: 820px) { .prof-grid { grid-template-columns: 1fr; } }

/* ---------- Admin Page ---------- */
.adm h2 { margin-top: 28px; display: flex; align-items: center; gap: 8px; }
.astats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.astat {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.astat:hover { transform: translateY(-2px); border-color: var(--acc-border); }
.astat.on { border: 2px solid var(--acc); background: var(--acc2); }
.astat b { font-size: 30px; line-height: 1; color: var(--ink); }
.astat span { font-size: 12px; color: var(--muted); margin-top: 4px; }
.astat em { font-style: normal; font-weight: 700; margin-top: 8px; }
.astat i { font-style: normal; font-size: 12px; color: var(--muted); }
.klist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 8px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.kitem { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); padding: 7px 0; }
.kitem code { flex: 1; font-size: 13px; word-break: break-all; }
.kbadge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--okbg); color: var(--ok); }
.kbadge.res { background: var(--gold-bg); color: var(--warn); }
.kfound { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 10px; line-height: 1.7; }
.ptable { display: flex; flex-direction: column; gap: 8px; }
.prow { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.prow b { min-width: 160px; align-self: center; }
.prow label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 4px; }
.prow .grow { flex: 1; min-width: 220px; }

/* ---------- Exam Simulator Styles ---------- */
.ebar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 66px; z-index: 20; }
.ebar .wrap { display: flex; align-items: center; gap: 14px; min-height: 54px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.steps { display: flex; gap: 4px; flex-wrap: wrap; }
.step { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 600; background: #fff; color: var(--muted); }
.step.cur { background: var(--acc); color: #fff; border-color: var(--acc); }
.step.done { background: var(--acc2); color: var(--acc-d); border-color: var(--acc-border); }
button.step { cursor: pointer; }
.timer { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; padding: 5px 12px; border-radius: 9px; background: var(--surface-2); white-space: nowrap; }
.timer.low { background: var(--warn-bg); color: var(--warn); }
.timer.over { background: var(--badbg); color: var(--bad); }
.timer.play { background: var(--acc2); color: var(--acc-d); }
.mode-tag { font-size: 12.5px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.thead { padding: 20px 0 6px; }
.thead .k { font-size: 12px; font-weight: 700; color: var(--acc); text-transform: uppercase; letter-spacing: 0.06em; }
.thead h2 { margin: 4px 0; }
.instr { background: var(--acc2); border-left: 4px solid var(--acc); padding: 11px 15px; border-radius: 0 10px 10px 0; margin: 10px 0 16px; font-weight: 500; color: var(--ink-2); }
.instr p { margin: 0 0 4px; }
.instr p:last-child { margin: 0; }
.cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-xs); }
.panel.text { max-height: calc(100vh - 230px); overflow: auto; position: sticky; top: 134px; }
.reading { font-family: "Source Serif 4", Georgia, serif; font-size: 17px; line-height: 1.72; }
.reading h3 { font-family: 'Inter', sans-serif; font-size: 18px; margin: 0 0 12px; }
.reading p { margin: 0 0 14px; }
.pn { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; color: #fff; background: var(--muted); border-radius: 4px; padding: 1px 6px; margin-right: 6px; vertical-align: 2px; }
select.gap { font: inherit; font-family: 'Inter', sans-serif; font-size: 14px; padding: 3px 6px; border: 1.5px solid var(--acc); border-radius: 7px; background: #fff; color: var(--ink); max-width: 100%; }
select.ok, .ok-b { border-color: var(--ok) !important; background: var(--okbg) !important; }
select.ko, .ko-b { border-color: var(--bad) !important; background: var(--badbg) !important; }
.sol { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; color: var(--ok); margin: 0 4px; }
.fixed { border: 1px dashed var(--line-strong); background: var(--bg); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.olist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.oitem { display: flex; gap: 12px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; align-items: flex-start; }
.oitem[draggable=true] { cursor: grab; }
.oitem.drag { opacity: 0.4; }
.opos { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-top: 4px; }
.oitem .reading { font-size: 16px; flex: 1; }
.omv { display: flex; flex-direction: column; gap: 4px; }
.omv button { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 30px; height: 28px; display: grid; place-items: center; }
.q { padding: 14px 0; border-bottom: 1px solid var(--line); }
.q:last-child { border-bottom: 0; }
.q .qt { font-weight: 600; margin-bottom: 8px; }
.q .qt i { font-style: normal; color: var(--acc); margin-right: 6px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; margin: 6px 0; cursor: pointer; background: #fff; }
.opt:hover { border-color: #94a3b8; }
.opt.sel { border-color: var(--acc); background: var(--acc2); }
.opt input { margin-top: 4px; accent-color: var(--acc); }
.opt.right { border-color: var(--ok); background: var(--okbg); }
.opt.wrong { border-color: var(--bad); background: var(--badbg); }
mark.sp { background: var(--hl); padding: 1px 2px; border-radius: 3px; }
mark.sp b { font-family: 'Inter', sans-serif; font-size: 11px; background: var(--gold); color: #fff; border-radius: 4px; padding: 0 5px; margin-right: 4px; vertical-align: 2px; }
.assign { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.arow { display: flex; gap: 10px; align-items: center; }
.arow .num { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 700; }
.arow select { flex: 1; min-width: 0; font: inherit; padding: 8px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; }
.slist { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.slist li { padding: 6px 0; border-top: 1px solid var(--line); }
.slist li b { color: var(--acc); margin-right: 6px; }
.slist li.used { color: var(--muted); text-decoration: line-through; }
table.cat { width: 100%; border-collapse: collapse; font-size: 14px; }
table.cat th { font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 4px; text-align: center; vertical-align: bottom; }
table.cat td { border-top: 1px solid var(--line); padding: 9px 4px; text-align: center; }
table.cat td:first-child { text-align: left; padding-right: 10px; }
table.cat input { width: 18px; height: 18px; accent-color: var(--acc); }
table.cat tr.okr td { background: var(--okbg); }
table.cat tr.kor td { background: var(--badbg); }
.solline { display: block; font-size: 12px; font-weight: 600; color: var(--ok); }
.ptab { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.pcol { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; min-height: 120px; background: var(--bg); }
.pcol h4 { margin: 0 0 8px; font-size: 13px; }
.pcol .chip { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; margin-bottom: 6px; }
.pcol .empty { font-size: 12px; color: var(--muted); border: 1px dashed #cbd5e1; border-radius: 8px; padding: 8px; margin-bottom: 6px; text-align: center; }
.pst { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.pst .tx { flex: 1; }
.pst .pb { display: flex; gap: 4px; }
.pst .pb button { border: 1.5px solid var(--line); background: #fff; border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 700; }
.pst .pb button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pst.okr { background: var(--okbg); }
.pst.kor { background: var(--badbg); }
.summary { font-family: "Source Serif 4", Georgia, serif; font-size: 17px; line-height: 1.85; }
.sent { cursor: pointer; border-radius: 4px; padding: 1px 2px; transition: background 0.15s; }
.sent:hover { background: var(--surface-2); }
.sent.sel { background: #fecaca; text-decoration: line-through; text-decoration-color: var(--bad); }
.sent.right { background: var(--okbg); outline: 2px solid var(--ok); }
.sent.miss { outline: 2px dashed var(--bad); }
.sent.wrongsel { background: var(--badbg); text-decoration: line-through; }
.counter { font-size: 13px; color: var(--muted); margin-top: 10px; }
.chart { margin: 8px 0 16px; font-family: 'Inter', sans-serif; }
.enav { display: flex; gap: 10px; justify-content: flex-end; padding: 18px 0 40px; flex-wrap: wrap; }
.expl { margin-top: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; }
.expl h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.expl ol, .expl ul { margin: 0; padding-left: 20px; }
.expl li { margin: 4px 0; }
.fb { display: inline-block; font-weight: 700; padding: 4px 10px; border-radius: 8px; margin-left: 8px; font-size: 15px; vertical-align: 3px; }
.fb.g { background: var(--okbg); color: var(--ok); }

/* Hören */
.hstat { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.wave { display: flex; gap: 3px; align-items: center; height: 22px; }
.wave i { width: 4px; background: var(--acc); border-radius: 2px; height: 6px; }
.playing .wave i { animation: w 1s infinite ease-in-out; }
.wave i:nth-child(2) { animation-delay: .15s; }
.wave i:nth-child(3) { animation-delay: .3s; }
.wave i:nth-child(4) { animation-delay: .45s; }
.wave i:nth-child(5) { animation-delay: .6s; }
@keyframes w { 0%, 100% { height: 6px; } 50% { height: 22px; } }
table.ht { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.ht th, table.ht td { border: 1px solid var(--line); padding: 8px; vertical-align: top; text-align: left; }
table.ht th { background: var(--bg); font-size: 13px; }
.tin { width: 100%; font: inherit; font-size: 14px; padding: 7px 9px; border: 1.5px solid var(--acc); border-radius: 7px; background: #fffef8; }
textarea.tin { resize: vertical; min-height: 62px; }
.tin:disabled { background: #f4f4f4; }
.tin.ok-b, .tin.ko-b { border-width: 2px; }
.outl { display: flex; flex-direction: column; gap: 12px; }
.outl label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 4px; }
.dtext { font-family: "Source Serif 4", Georgia, serif; font-size: 18px; line-height: 2; }
.w { cursor: pointer; border-radius: 4px; padding: 1px 2px; }
.w:hover { background: var(--surface-2); }
.w.sel { background: #fecaca; }
.w.right { background: var(--okbg); outline: 2px solid var(--ok); }
.w.miss { outline: 2px dashed var(--bad); }
.w.wrongsel { background: var(--badbg); }
.w small { font-family: 'Inter', sans-serif; font-size: 11px; color: var(--ok); font-weight: 700; margin-left: 2px; }
.trans { white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.trans b { color: var(--acc-d); }
.hidden-sum { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 30px; text-align: center; color: var(--muted); background: var(--bg); display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* Schreiben */
.forum { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg); font-size: 15px; }
.forum .who { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; font-weight: 700; font-size: 14px; color: var(--ink); }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 700; }
textarea.write { width: 100%; min-height: 380px; font: inherit; font-size: 16px; line-height: 1.6; padding: 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; resize: vertical; background: #fff; }
textarea.write:focus { outline: none; border-color: var(--acc); }
.wbar { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.keys { display: flex; gap: 4px; flex-wrap: wrap; }
.keys button { border: 1px solid var(--line); background: #fff; border-radius: 6px; min-width: 30px; height: 30px; font-weight: 600; }
.wc { font-weight: 700; font-size: 14px; }
.wc.low { color: var(--warn); }
.wc.good { color: var(--ok); }

/* Sprechen */
.phases { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.ph { border: 1.5px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; background: #fff; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.ph.cur { border-color: var(--acc); background: var(--acc); color: #fff; }
.ph.done { background: var(--acc2); color: var(--acc-d); border-color: var(--acc-border); }
.bigclock { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stage { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow-xs); }
.stage .lab { font-weight: 700; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 6px; }
.mic { width: 82px; height: 82px; border-radius: 50%; border: 0; background: var(--bad); color: #fff; margin: 12px auto; display: grid; place-items: center; box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
.mic svg { width: 32px; height: 32px; }
.mic.on { animation: pulse 1.4s infinite; }
.mic.idle { background: var(--ink); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); } 70% { box-shadow: 0 0 0 18px rgba(220, 38, 38, 0); } 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); } }
.live { min-height: 60px; text-align: left; font-size: 14px; background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-top: 10px; color: var(--ink); }
.live em { color: var(--muted); }
.notes { width: 100%; min-height: 110px; font: inherit; font-size: 14px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; background: #fffef6; resize: vertical; margin-top: 10px; }
.mt { max-width: 740px; margin: 24px auto 50px; }
.mstep { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow-xs); }
.mstep h3 { margin: 0 0 6px; display: flex; gap: 10px; align-items: center; }
.mstep h3 .st { font-size: 12px; border-radius: 99px; padding: 2px 10px; background: var(--bg); color: var(--muted); }
.mstep h3 .st.okk { background: var(--okbg); color: var(--ok); }
.mstep h3 .st.ko { background: var(--badbg); color: var(--bad); }
.level { display: flex; gap: 3px; height: 26px; align-items: flex-end; margin: 10px 0; }
.level i { width: 8px; border-radius: 2px; background: #cbd5e1; height: 30%; }
.level.on i { background: var(--ok); }
.quote { font-family: "Source Serif 4", serif; font-size: 19px; background: var(--bg); border-radius: 10px; padding: 12px 16px; margin: 10px 0; }

/* Results & AI */
.res { max-width: 840px; margin: 30px auto 50px; }
.score { display: flex; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.ring { width: 120px; height: 120px; flex: none; }
.tdn { font-size: 28px; font-weight: 800; }
.rt { width: 100%; border-collapse: collapse; margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rt td, .rt th { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.rt th { background: var(--bg); font-size: 12px; color: var(--muted); }
.bar { height: 8px; background: var(--surface-2); border-radius: 9px; overflow: hidden; width: 120px; }
.bar i { display: block; height: 100%; background: var(--acc); }
.rcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-top: 14px; box-shadow: var(--shadow-xs); }
.rcard h3 { margin: 0 0 4px; font-size: 16px; }
.rtext { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 12px; font-size: 14px; margin: 10px 0; max-height: 260px; overflow: auto; }
.ai { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; font-size: 14px; }
.ai .tdnb { display: inline-block; background: var(--ink); color: #fff; border-radius: 8px; padding: 3px 10px; font-weight: 700; margin-right: 8px; }
.ai h4 { margin: 10px 0 4px; font-size: 13px; }
.ai ul { margin: 0; padding-left: 18px; }
.corr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 13px; margin: 4px 0; }
.corr s { color: var(--bad); }
.corr b { color: var(--ok); }

/* AI Tutor Drawer / Modal */
.tutor-box {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-lg);
}
.tutor-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tutor-ans {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.65;
  overflow: auto;
  max-height: 320px;
  white-space: pre-wrap;
}

/* Modals, Spinners, Toasts */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 20px;
  animation: modalFade 0.18s ease;
}
.mbox { background: #fff; border-radius: 18px; padding: 24px; max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1); }
.modal.modal-top { z-index: 140; }
.modal-confirm { max-width: 420px; }
.modal-head { display: flex; align-items: flex-start; gap: 14px; }
.modal-head h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.015em; }
.modal-head p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}
.tutor-box { animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1); }
.mbox h3 { margin: 0 0 6px; }
.mchoice { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.mc { border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 15px; text-align: left; background: #fff; transition: all 0.16s ease; }
.mc:hover { border-color: var(--acc); background: var(--acc2); transform: translateY(-1px); }
.mc b { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.mc span { font-size: 13px; color: var(--muted); }
.warnbox { background: var(--warn-bg); border: 1px solid #fed7aa; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 10px 0; color: #9a3412; }

.spin { width: 34px; height: 34px; border-radius: 50%; border: 3.5px solid var(--line); border-top-color: var(--acc); animation: sp 0.8s linear infinite; margin: 0 auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 99; max-width: 90vw; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1); }

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1080px) {
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pack.pop { transform: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .panel.text { max-height: none; position: static; }
  .ptab { grid-template-columns: 1fr; }
  .corr { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-strip { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .grid, .packs { grid-template-columns: 1fr; }
  .packs.overlap { margin-top: -28px; }
  .page-hero { padding: 30px 0 46px; }
  .krow { flex-direction: column; }
  .key-card { min-width: 0; width: 100%; flex: 1 1 100%; }
  .search-wrap { min-width: 0; width: 100%; flex: 1 1 100%; }
  .klist { grid-template-columns: 1fr; padding: 12px; }
  .prow b { min-width: 0; width: 100%; }
  .prow .grow { min-width: 0; width: 100%; }
  .panel { padding: 16px; }
  .authpage { padding: 20px 14px; }
  .authshell { border-radius: 18px; }
  .authbox, .auth-aside { padding: 24px 18px; }
  .authbox h1 { font-size: 21px; }
  .authbox .sub { margin-bottom: 16px; font-size: 13.5px; }
  .auth-top { margin-bottom: 16px; gap: 8px; }
  .alert { padding: 11px 12px; font-size: 13px; }
  .alert-actions .btn { width: 100%; }
  .step { width: 26px; height: 26px; }
  .bigclock { font-size: 36px; }
  .reading { font-size: 16px; }
  table.ht { font-size: 13px; }
  .pagination { justify-content: center; text-align: center; }
  .enav { justify-content: stretch; }
  .enav .btn { flex: 1 1 auto; }
}
@media (max-width: 400px) {
  .dash-grid { grid-template-columns: 1fr; }
  .mbtns { grid-template-columns: 1fr; }
  .authpage { padding: 14px 10px; }
  .authbox, .auth-aside { padding: 20px 14px; }
  .auth-top .lang-switch { margin-left: auto; }
  .alert-row { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
