/* ============================================================================
   AB-900 Lernpfad — Shared Styles
   Tailwind CDN provides utility classes. This file adds:
   1. Theme tokens & gradients (extracted from old single-page index.html)
   2. Original interactive primitives (flip-card, reveal, tab, tooltip, ...)
   3. ADHS-Layer (chunk cards, mission brief, XP orb, progress bar, calm mode,
      mini-game zones, drag-drop, toast, confetti, streak flame)
============================================================================ */

:root {
  --m365-blue:   #0078d4;
  --m365-purple: #5c2d91;
  --m365-teal:   #008272;
  --m365-bg:     #faf9fb;

  --chunk-radius: 1rem;
  --orb-size: 56px;
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--m365-bg);
  color: #1f2329;
}

/* ----------------------------- Gradients ---------------------------------- */
.gradient-hero      { background: linear-gradient(135deg, #0a1633 0%, #1e3a8a 35%, #5c2d91 75%, #b146c2 100%); }
.gradient-rbac      { background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%); }
.gradient-admin     { background: linear-gradient(135deg, #0078d4 0%, #5c2d91 100%); }
.gradient-tenant    { background: linear-gradient(135deg, #0d9488 0%, #10b981 100%); }
.gradient-center    { background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%); }
.gradient-pim       { background: linear-gradient(135deg, #be123c 0%, #f43f5e 100%); }
.gradient-watch     { background: linear-gradient(135deg, #0891b2 0%, #1e40af 100%); }
.gradient-copilot   { background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%); }
.gradient-zerotrust { background: linear-gradient(135deg, #0c4a6e 0%, #06b6d4 100%); }
.gradient-governance{ background: linear-gradient(135deg, #365314 0%, #d97706 100%); }
.gradient-labels    { background: linear-gradient(135deg, #7e22ce 0%, #eab308 100%); }

.glass { background: rgba(255,255,255,0.08); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.18); }

/* ----------------------------- Shadows ------------------------------------ */
.shadow-soft    { box-shadow: 0 4px 24px -8px rgba(15,23,42,0.08), 0 2px 6px -2px rgba(15,23,42,0.05); }
.shadow-soft-lg { box-shadow: 0 12px 40px -10px rgba(15,23,42,0.18), 0 4px 12px -4px rgba(15,23,42,0.08); }

/* ----------------------------- Reveal ------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ----------------------------- Section header ----------------------------- */
.section-tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0.7rem; border-radius: 9999px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* ----------------------------- Flip-Card ---------------------------------- */
.flip-card { perspective: 1200px; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform 0.7s cubic-bezier(0.4,0,0.2,1); transform-style: preserve-3d; }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; border-radius: 1rem; overflow: hidden; }
.flip-back { transform: rotateY(180deg); }

/* ----------------------------- Tabs --------------------------------------- */
.tab-btn { position: relative; transition: all 0.25s ease; }
.tab-btn.active { color: white; }
.tab-btn.active .tab-bg { opacity: 1; }
.tab-bg { position: absolute; inset: 0; border-radius: 0.75rem; opacity: 0; transition: opacity 0.25s ease; z-index: -1; }
.tab-bg.bg-admin   { background: linear-gradient(135deg, #0078d4, #5c2d91); }
.tab-bg.bg-orange  { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.tab-bg.bg-watch   { background: linear-gradient(135deg, #0891b2, #1e40af); }
.tab-bg.bg-copilot { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.tab-bg.bg-zt      { background: linear-gradient(135deg, #0c4a6e, #06b6d4); }
.tab-bg.bg-gov     { background: linear-gradient(135deg, #365314, #d97706); }
.tab-bg.bg-labels  { background: linear-gradient(135deg, #7e22ce, #eab308); }

/* ----------------------------- Tooltip ------------------------------------ */
.tooltip {
  position: absolute; pointer-events: none;
  background: rgba(17,17,27,0.95); color: white;
  padding: 8px 12px; border-radius: 8px;
  font-size: 0.8rem; opacity: 0; transition: opacity 0.15s ease;
  max-width: 240px; line-height: 1.35; z-index: 50;
  white-space: normal;
}
.tooltip.show { opacity: 1; }

/* ----------------------------- Diagram pulses ----------------------------- */
.node-pulse { animation: pulse 2.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.flow-arrow { stroke-dasharray: 6 6; animation: dash 1.5s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }

/* PIM-Animationen (nur Tag 5 nutzt sie) */
@keyframes pim-tick { 0%,100% { transform: rotate(0deg);} 50% { transform: rotate(360deg);} }
.pim-clock-hand { transform-origin: center; animation: pim-tick 4s linear infinite; }
@keyframes timeline-fill { 0% { stroke-dashoffset: 800;} 100% { stroke-dashoffset: 0;} }
.timeline-anim { stroke-dasharray: 800; animation: timeline-fill 3.5s ease-in-out infinite alternate; }

/* ----------------------------- Progress fill ------------------------------ */
.progress-fill { transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }

/* ----------------------------- Scenario / Solution ------------------------ */
.scenario-panel { display: none; opacity: 0; transform: translateY(8px); transition: opacity 0.3s ease, transform 0.3s ease; }
.scenario-panel.active { display: block; }
.scenario-panel.shown { opacity: 1; transform: translateY(0); }

.solution-body { max-height: 0; overflow: hidden; transition: max-height 0.5s ease; }
.solution-box.open .solution-body { max-height: 1200px; }
.solution-box.open .chevron { transform: rotate(180deg); }
.chevron { transition: transform 0.3s ease; }

/* ----------------------------- Steckbrief --------------------------------- */
.steckbrief-row {
  display: grid; grid-template-columns: 30% 1fr;
  gap: 0.75rem; padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.steckbrief-row:last-child { border-bottom: none; }
.steckbrief-row dt { color: #64748b; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.steckbrief-row dd { color: #0f172a; font-size: 0.92rem; }

/* ----------------------------- Flow diagram (Tag 6) ----------------------- */
.flow-diagram-wrap { overflow-x: auto; padding-bottom: 8px; }
.flow-diagram { display: flex; align-items: center; justify-content: flex-start; gap: 0.35rem; min-width: max-content; padding: 0.25rem; }
.flow-step {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  padding: 0.85rem 0.9rem; background: white; border: 2px solid #e2e8f0;
  border-radius: 1rem; cursor: pointer; transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  min-width: 100px; flex-shrink: 0; font-family: inherit;
}
.flow-step:hover { border-color: #06b6d4; transform: translateY(-3px); box-shadow: 0 6px 18px -6px rgba(6,182,212,0.3); }
.flow-step.active {
  background: linear-gradient(135deg, #0891b2 0%, #1e40af 100%);
  border-color: transparent; transform: scale(1.06);
  box-shadow: 0 12px 32px -6px rgba(8,145,178,0.5);
}
.flow-step .flow-step-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: #f1f5f9; color: #0891b2; font-weight: 800; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  transition: inherit;
}
.flow-step .flow-step-name { font-size: 0.78rem; font-weight: 700; color: #475569; white-space: nowrap; transition: inherit; }
.flow-step.active .flow-step-num { background: rgba(255,255,255,0.25); color: white; }
.flow-step.active .flow-step-name { color: white; }
.flow-step.active svg { color: white !important; }
.flow-step svg { color: #0891b2; transition: inherit; }
.flow-detail { display: none; }
.flow-detail.active { display: block; animation: flowFade 0.35s ease; }
@keyframes flowFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ----------------------------- Modul 7 (Tag 7) Boxkampf-Optik ------------- */
.lf-corner { position: relative; transition: all 0.4s ease; }
.lf-corner.is-winner {
  background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
  box-shadow: inset 0 0 0 3px #f59e0b, 0 8px 24px -8px rgba(245,158,11,0.45);
}
.lf-corner.is-loser { opacity: 0.45; filter: grayscale(0.55); }
.lf-corner .winner-pin {
  position: absolute; top: -14px; right: 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white; padding: 4px 12px; border-radius: 9999px;
  font-size: 0.7rem; font-weight: 900; letter-spacing: 0.06em;
  box-shadow: 0 6px 16px -4px rgba(245,158,11,0.6);
  display: none; align-items: center; gap: 4px;
  animation: winnerPulse 2.4s ease-in-out infinite;
}
.lf-corner.is-winner .winner-pin { display: inline-flex; }
@keyframes winnerPulse { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(-3deg) scale(1.04); } }
.vs-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  color: white; font-weight: 900; font-size: 1.1rem; letter-spacing: 0.05em;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px -4px rgba(15,23,42,0.4), inset 0 0 0 3px white;
  z-index: 10; pointer-events: none;
}
@media (max-width: 767px) { .vs-badge { display: none; } }
.round-badge {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #fbbf24; font-weight: 900; font-size: 0.7rem; letter-spacing: 0.12em;
  padding: 4px 12px; border-radius: 9999px; box-shadow: inset 0 0 0 1px #fbbf24;
  display: inline-flex; align-items: center; gap: 4px;
}
.verdict-bar {
  background: linear-gradient(90deg, #fef3c7 0%, #fbbf24 50%, #fef3c7 100%);
  background-size: 200% 100%; animation: verdictShimmer 3s linear infinite;
  color: #78350f; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em;
  padding: 10px 16px; border-top: 1px solid #fcd34d;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
@keyframes verdictShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.verdict-bar.is-draw {
  background: linear-gradient(90deg, #e0e7ff 0%, #c7d2fe 50%, #e0e7ff 100%);
  background-size: 200% 100%; color: #3730a3; border-top-color: #a5b4fc;
}

.agent-filter { background: #f1f5f9; color: #475569; border: 1px solid transparent; transition: all 0.2s ease; }
.agent-filter:hover { background: #e2e8f0; transform: translateY(-1px); }
.agent-filter.is-active { background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%); color: white; border-color: transparent; box-shadow: 0 4px 12px -4px rgba(124,58,237,0.5); }
.agent-card { transition: opacity 0.3s ease, transform 0.3s ease; }
.agent-card.is-hidden { display: none !important; }
.agent-card:hover:not(.flipped) .flip-face:not(.flip-back) { transform: translateY(-2px); }
.flip-face { transition: transform 0.3s ease; }
.copilot-hero-pair:hover .copilot-hero-card:not(:hover) { opacity: 0.55; transform: scale(0.98); }
.copilot-hero-card { transition: opacity 0.3s ease, transform 0.3s ease; }
.leitfrage-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.leitfrage-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -10px rgba(124,58,237,0.18); }
.gov-mitigation { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, opacity 0.3s; opacity: 0; }
.gov-card.is-revealed .gov-mitigation { max-height: 320px; opacity: 1; }
.gov-card.is-revealed .gov-toggle-icon { transform: rotate(180deg); }
.gov-toggle-icon { transition: transform 0.3s; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd0d8; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #a8aeb9; }

/* ============================================================================
   ADHS-Layer
============================================================================ */

/* Sticky Lern-Header (gleich auf jeder Themen-Seite) */
.ab-topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid #e6e8ef;
}
.ab-topbar-inner {
  max-width: 72rem; margin: 0 auto; padding: 0.65rem 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.ab-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; color: #0f172a; text-decoration: none; }
.ab-brand .ab-brand-dot { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: white; }
.ab-pathdots { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.ab-pathdots a { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.65rem; font-weight: 800; color: #64748b; background: #eef2f7; transition: all 0.2s ease; text-decoration: none; }
.ab-pathdots a:hover { background: #dbe2ec; color: #1e293b; }
.ab-pathdots a.is-active { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: white; transform: scale(1.18); box-shadow: 0 4px 10px -3px rgba(124,58,237,0.4); }
.ab-pathdots a.is-done { background: #d1fae5; color: #047857; }

.ab-actions { display: flex; align-items: center; gap: 0.4rem; }
.ab-icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: #eef2f7; color: #475569; display: grid; place-items: center;
  border: 0; cursor: pointer; transition: all 0.2s ease;
}
.ab-icon-btn:hover { background: #dbe2ec; color: #1e293b; }
.ab-icon-btn.is-on { background: #1e293b; color: #fbbf24; }

/* XP-Orb */
.xp-orb {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #78350f; padding: 6px 12px; border-radius: 9999px;
  font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px #f59e0b, 0 2px 4px -2px rgba(245,158,11,0.4);
  transition: transform 0.25s ease;
}
.xp-orb svg { color: #f59e0b; }
.xp-orb.is-bumping { animation: xpBump 0.55s ease; }
@keyframes xpBump {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.3) rotate(-6deg); }
  70% { transform: scale(0.95) rotate(2deg); }
}

/* Streak-Flame */
.streak {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #fed7aa 0%, #fb923c 100%);
  color: #7c2d12; padding: 6px 10px; border-radius: 9999px;
  font-weight: 800; font-size: 0.8rem;
}
.streak svg { color: #c2410c; }
.streak.is-zero { opacity: 0.55; filter: saturate(0.6); }

/* Top-Progress-Bar */
.ab-progressbar {
  position: sticky; top: 60px; z-index: 35;
  height: 6px; background: #eef2f7;
}
.ab-progressbar > span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981);
  transition: width 0.55s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px rgba(99,102,241,0.4);
}

/* Hero Mission-Brief */
.mission-card {
  background: rgba(255,255,255,0.96);
  border-radius: 1.25rem; padding: 1.25rem 1.5rem;
  box-shadow: 0 12px 40px -10px rgba(15,23,42,0.18);
  display: flex; gap: 1rem; align-items: flex-start;
  max-width: 720px;
}
.mission-card .mc-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  color: #78350f; display: grid; place-items: center;
}
.mission-card h3 { font-weight: 900; color: #0f172a; font-size: 1.05rem; margin-bottom: 4px; letter-spacing: -0.01em; }
.mission-card p { font-size: 0.95rem; line-height: 1.5; color: #1e293b; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; }
.chip-time { background: #dbeafe; color: #1d4ed8; }
.chip-level { background: #dcfce7; color: #15803d; }
.chip-game { background: #fce7f3; color: #be185d; }

/* Chunk-Card */
.chunk {
  position: relative;
  background: white;
  border-radius: var(--chunk-radius);
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  box-shadow: 0 4px 20px -6px rgba(15,23,42,0.08), 0 1px 3px rgba(15,23,42,0.04);
  border-left: 6px solid #c7d2fe;
  transition: all 0.35s ease;
}
.chunk + .chunk { margin-top: 1.25rem; }
.chunk.tone-rbac      { border-left-color: #4f46e5; }
.chunk.tone-admin     { border-left-color: #0078d4; }
.chunk.tone-tenant    { border-left-color: #10b981; }
.chunk.tone-center    { border-left-color: #ea580c; }
.chunk.tone-pim       { border-left-color: #f43f5e; }
.chunk.tone-watch     { border-left-color: #0891b2; }
.chunk.tone-copilot   { border-left-color: #7c3aed; }
.chunk.tone-zerotrust { border-left-color: #06b6d4; }
.chunk.tone-governance{ border-left-color: #d97706; }
.chunk.tone-labels    { border-left-color: #eab308; }

.chunk.is-done { background: #f8fafc; opacity: 0.85; }
.chunk-head {
  display: flex; align-items: flex-start; gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.chunk-head .chunk-num {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: #eef2ff; color: #4338ca; font-weight: 900;
  display: grid; place-items: center; font-size: 0.85rem;
}
.chunk-head h3 { font-size: 1.1rem; font-weight: 800; color: #0f172a; flex: 1; }

/* Erledigt-Häkchen */
.chunk-done {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 10px;
  background: #f1f5f9; color: #94a3b8;
  border: 0; cursor: pointer; display: grid; place-items: center;
  transition: all 0.25s ease;
}
.chunk-done:hover { background: #e2e8f0; color: #475569; }
.chunk-done.is-done { background: #d1fae5; color: #047857; }
.chunk-done.is-done svg { animation: doneTick 0.55s ease; }
@keyframes doneTick { 0% { transform: scale(0.4); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* Toast */
.toast-host {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 60;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #0f172a; color: white;
  padding: 10px 16px; border-radius: 12px;
  font-weight: 700; font-size: 0.85rem;
  box-shadow: 0 12px 32px -8px rgba(15,23,42,0.45);
  display: flex; align-items: center; gap: 8px;
  animation: toastIn 0.35s ease;
  max-width: 320px;
}
.toast.is-out { animation: toastOut 0.3s ease forwards; }
.toast.kind-xp { background: linear-gradient(135deg, #f59e0b, #d97706); }
.toast.kind-success { background: linear-gradient(135deg, #10b981, #059669); }
.toast.kind-info { background: linear-gradient(135deg, #4f46e5, #06b6d4); }
@keyframes toastIn  { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { to   { transform: translateY(20px); opacity: 0; } }

/* Konfetti */
.confetti-root {
  position: fixed; inset: 0; pointer-events: none; z-index: 70;
  overflow: hidden;
}
.confetti-root .conf {
  position: absolute; width: 8px; height: 14px; border-radius: 2px;
  animation: confFall 1.4s cubic-bezier(0.2,0.6,0.4,1) forwards;
}
@keyframes confFall {
  0%   { transform: translate(0,0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx,0), var(--dy,400px)) rotate(var(--r,540deg)); opacity: 0; }
}

/* Mini-Game */
.minigame {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 1.25rem;
}
.dnd-tagpool {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 1rem;
}
.dnd-tag {
  background: white; border: 1px solid #e2e8f0;
  padding: 6px 12px; border-radius: 9999px;
  font-size: 0.8rem; font-weight: 700; color: #334155;
  cursor: grab; user-select: none;
  transition: all 0.2s ease;
}
.dnd-tag:hover { transform: translateY(-1px); box-shadow: 0 4px 12px -4px rgba(15,23,42,0.15); }
.dnd-tag.is-dragging { opacity: 0.4; cursor: grabbing; }
.dnd-tag.placed-correct { background: #d1fae5; color: #065f46; border-color: #10b981; }
.dnd-tag.placed-wrong { background: #fee2e2; color: #991b1b; border-color: #ef4444; animation: wrongShake 0.4s ease; }
@keyframes wrongShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.dnd-zone {
  background: white; border: 2px dashed #cbd5e1;
  border-radius: 12px; padding: 0.75rem;
  min-height: 60px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start;
  transition: all 0.2s ease;
}
.dnd-zone.is-over { background: #ecfeff; border-color: #06b6d4; box-shadow: inset 0 0 0 2px rgba(6,182,212,0.3); }
.dnd-zone .dnd-zone-label {
  width: 100%; font-size: 0.7rem; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px;
}

/* Quiz */
.quiz-card { background: white; border-radius: 14px; padding: 1.25rem; box-shadow: 0 2px 12px -4px rgba(15,23,42,0.08); }
.quiz-question { font-weight: 700; color: #0f172a; margin-bottom: 0.85rem; }
.quiz-options { display: grid; gap: 8px; }
.quiz-option {
  text-align: left; padding: 10px 14px; border-radius: 10px;
  background: #f8fafc; border: 2px solid #e2e8f0;
  font-weight: 600; color: #1e293b; cursor: pointer;
  transition: all 0.2s ease;
}
.quiz-option:hover:not(.is-correct):not(.is-wrong):not(.is-locked) { background: #eef2ff; border-color: #c7d2fe; }
.quiz-option.is-correct { background: #d1fae5; border-color: #10b981; color: #065f46; }
.quiz-option.is-wrong   { background: #fee2e2; border-color: #ef4444; color: #991b1b; animation: wrongShake 0.4s ease; }
.quiz-option.is-locked  { cursor: default; opacity: 0.7; }
.quiz-feedback { margin-top: 10px; font-size: 0.85rem; color: #475569; min-height: 1.2em; }

/* Calm-Mode override */
body.calm-mode *, body.calm-mode *::before, body.calm-mode *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.15s !important;
}
body.calm-mode { filter: saturate(0.85); }
body.calm-mode .gradient-hero,
body.calm-mode [class*="gradient-"] { filter: saturate(0.7) brightness(1.02); }

/* Mission cards on Dashboard */
.mission-tile {
  background: white;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 24px -8px rgba(15,23,42,0.08), 0 2px 6px -2px rgba(15,23,42,0.05);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  position: relative;
  border: 1px solid #eef2f7;
}
.mission-tile:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -12px rgba(15,23,42,0.18); }
.mission-tile-banner { height: 88px; padding: 14px 18px; color: white; display: flex; flex-direction: column; justify-content: space-between; }
.mission-tile-banner .mt-day { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; opacity: 0.85; }
.mission-tile-banner .mt-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.2); display: grid; place-items: center; align-self: flex-end; }
.mission-tile-body { padding: 14px 18px 16px; }
.mission-tile-body h3 { font-weight: 800; color: #0f172a; font-size: 1.05rem; margin-bottom: 4px; }
.mission-tile-body p { font-size: 0.85rem; color: #475569; line-height: 1.4; min-height: 2.4em; }
.mission-tile-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.mission-tile-foot .mt-progress { flex: 1; height: 6px; background: #eef2f7; border-radius: 9999px; overflow: hidden; }
.mission-tile-foot .mt-progress > span { display: block; height: 100%; background: linear-gradient(90deg,#4f46e5,#10b981); transition: width 0.4s ease; }
.mission-tile-foot .mt-status { font-size: 0.75rem; font-weight: 700; color: #475569; min-width: 56px; text-align: right; }

.mt-status.s-open { color: #64748b; }
.mt-status.s-progress { color: #b45309; }
.mt-status.s-done { color: #047857; }

/* Page-end CTA */
.next-cta {
  background: linear-gradient(135deg, #1e293b, #4338ca);
  color: white; border-radius: 1.25rem; padding: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 2rem;
}
.next-cta .nc-btn {
  background: white; color: #1e293b; padding: 10px 18px; border-radius: 12px;
  font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.next-cta .nc-btn:hover { background: #fbbf24; color: #78350f; }

/* Reset progress button */
.reset-btn {
  background: transparent; color: #94a3b8; border: 1px dashed #cbd5e1;
  padding: 8px 14px; border-radius: 10px; font-size: 0.78rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s ease;
}
.reset-btn:hover { border-color: #ef4444; color: #b91c1c; }

/* Footer */
.ab-footer {
  background: #0f172a; color: #94a3b8; padding: 2rem 1.5rem;
  text-align: center; font-size: 0.82rem;
}
.ab-footer a { color: #c7d2fe; }
.ab-footer .priv-note { margin-top: 6px; font-size: 0.72rem; color: #64748b; }
