/* ============================================================
   AI Act Compliance Training — Stylesheet
   ============================================================ */

:root {
  /* Core brand — modern indigo/violet */
  --brand:       #5b51e8;
  --brand-dark:  #4a3fd1;
  --brand-light: #eeecff;
  --brand-2:     #8b5cf6;   /* violet */
  --accent:      #06b6d4;   /* cyan */
  --accent-2:    #22d3ee;   /* bright cyan */
  --amber:       #f59e0b;

  --text:        #15132b;
  --text-muted:  #6b6880;
  --border:      #e8e6f2;
  --bg:          #f6f5ff;
  --bg-2:        #fbfaff;
  --white:       #ffffff;
  --success:     #10b981;
  --error:       #ef4444;

  --radius:      14px;
  --radius-lg:   20px;

  /* Signature gradients */
  --grad-brand:  linear-gradient(135deg, #6d5cf6 0%, #5b51e8 45%, #4f46e5 100%);
  --grad-hero:   linear-gradient(135deg, #4f1f9e 0%, #4338ca 35%, #4f46e5 60%, #2563eb 100%);
  --grad-accent: linear-gradient(120deg, #8b5cf6 0%, #5b51e8 50%, #06b6d4 100%);
  --grad-glow:   radial-gradient(circle at 30% 20%, rgba(139,92,246,.55), transparent 55%),
                 radial-gradient(circle at 80% 70%, rgba(6,182,212,.45), transparent 55%);

  /* Soft, coloured shadows */
  --shadow:      0 2px 6px rgba(40,30,90,.06), 0 10px 30px rgba(40,30,90,.07);
  --shadow-lg:   0 16px 50px rgba(60,40,130,.16);
  --shadow-glow: 0 8px 30px rgba(91,81,232,.35);

  --max-w:       820px;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Layout helpers ────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 4rem 0; }
.section--alt { background: var(--bg); }

/* ── Typography ────────────────────────────────────────────── */
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.18; letter-spacing: -.02em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.85rem); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-muted); }
strong { color: var(--text); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .8rem 1.7rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s, filter .2s;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}
/* Shimmer sweep on hover */
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 70%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg);
  transition: left .55s ease;
  z-index: 1;
}
.btn:hover::after { left: 130%; }
.btn > * { position: relative; z-index: 2; }
.btn:active { transform: scale(.96); }
.btn--primary {
  background: var(--grad-brand);
  background-size: 160% 160%;
  color: var(--white);
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover {
  background-position: 100% 0;
  box-shadow: 0 10px 34px rgba(91,81,232,.5);
  transform: translateY(-2px);
}
.btn--outline {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}
.btn--outline:hover { background: var(--brand-light); transform: translateY(-2px); }
.btn--ghost {
  background: rgba(255,255,255,.14);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.4);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255,255,255,.26); transform: translateY(-2px); box-shadow: 0 8px 26px rgba(0,0,0,.18); }
.btn--lg { padding: .95rem 2.1rem; font-size: 1.05rem; }

/* ── Navbar ────────────────────────────────────────────────── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.nav-logo-icon {
  width: 34px;
  height: 34px;
  background: var(--grad-brand);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: .8rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(91,81,232,.4);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.nav-logo:hover .nav-logo-icon { transform: rotate(-8deg) scale(1.08); }
.nav-badge {
  font-size: .68rem;
  font-weight: 600;
  background: var(--brand-light);
  color: var(--brand);
  padding: .15rem .5rem;
  border-radius: 20px;
  letter-spacing: .02em;
}
.progress-bar-wrap {
  width: 120px;
  height: 7px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
/* ── Language selector ─────────────────────────────────────── */
.lang-wrap { display: flex; align-items: center; }
.lang-select {
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .3rem .5rem;
  cursor: pointer;
  transition: border-color .15s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .4rem center;
  padding-right: 1.4rem;
}
.lang-select:focus { outline: none; border-color: var(--brand); }
.lang-select:hover { border-color: var(--brand); }

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--grad-accent);
  background-size: 200% 100%;
  border-radius: 99px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  animation: shimmerBar 3s linear infinite;
}
@keyframes shimmerBar { to { background-position: 200% 0; } }

/* ── Hero ──────────────────────────────────────────────────── */
#hero {
  position: relative;
  background: var(--grad-hero);
  background-size: 220% 220%;
  animation: heroShift 16s ease infinite;
  color: white;
  padding: 5.5rem 0 5rem;
  text-align: center;
  overflow: hidden;
}
@keyframes heroShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
/* Floating glow orbs */
#hero::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: var(--grad-glow);
  opacity: .9;
  pointer-events: none;
  animation: orbFloat 14s ease-in-out infinite alternate;
}
@keyframes orbFloat {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(4%, 5%) scale(1.12); }
}
/* Subtle grid overlay */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
#hero .container { position: relative; z-index: 2; }
#hero h1 {
  color: white;
  margin-bottom: 1.1rem;
  text-shadow: 0 2px 30px rgba(0,0,0,.18);
}
#hero .sub {
  font-size: 1.12rem;
  color: rgba(255,255,255,.86);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.34);
  color: white;
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem .95rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0,0,0,.12);
}
.hero-badge::before { content: '⚖️'; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
  padding: .4rem .2rem;
  transition: transform .25s;
}
.stat:hover { transform: translateY(-4px); }
.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  letter-spacing: -.01em;
}
.stat-lbl { font-size: .8rem; color: rgba(255,255,255,.72); margin-top: .1rem; }

/* Hero entrance — staggered fade-up */
.hero-badge,
#hero h1,
#hero .sub,
.hero-actions,
.hero-stats {
  opacity: 0;
  animation: heroIn .8s cubic-bezier(.22,1,.36,1) forwards;
}
.hero-badge   { animation-delay: .05s; }
#hero h1      { animation-delay: .18s; }
#hero .sub    { animation-delay: .32s; }
.hero-actions { animation-delay: .46s; }
.hero-stats   { animation-delay: .60s; }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Trust strip ───────────────────────────────────────────── */
.trust-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
  background: var(--bg);
}
.trust-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
}
.trust-item span { font-size: 1rem; }

/* ── Modules ───────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: .6rem;
}
.section-title { margin-bottom: .7rem; }
.section-sub { font-size: 1rem; max-width: 520px; margin-bottom: 2.5rem; }

.modules-grid {
  display: grid;
  gap: 1.25rem;
}

/* Reading-time chip on module cards */
.module-min {
  display: inline-block;
  margin-left: .45rem;
  padding: .08rem .5rem;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  text-transform: none;
  vertical-align: 1px;
}
.module-card.done .module-min { color: var(--success); border-color: #a7f3d0; background: #f0fdf4; }

/* ── "How it works" journey steps ──────────────────────────── */
.flow-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: .35rem;
  margin: 0 auto 3rem;
  max-width: 560px;
}
.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  min-width: 92px;
  text-align: center;
}
.flow-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--white);
  border: 2px solid var(--border);
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
  position: relative;
}
.flow-check { display: none; }
.flow-step.active .flow-dot {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(91,81,232,.35);
  transform: scale(1.08);
}
.flow-step.done .flow-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.flow-step.done .flow-num { display: none; }
.flow-step.done .flow-check { display: block; }
.flow-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.3;
}
.flow-step.active .flow-label { color: var(--brand); }
.flow-step.done .flow-label { color: var(--success); }
.flow-line {
  flex: 1;
  height: 2px;
  margin-top: 19px;          /* aligns with dot centre */
  background: var(--border);
  border-radius: 2px;
  min-width: 24px;
  transition: background .35s;
}
.flow-line.done { background: var(--success); }

/* ── Global polish ─────────────────────────────────────────── */
::selection { background: rgba(91,81,232,.22); }

#modules, #quiz, #certificate, #employer-section {
  scroll-margin-top: 70px;   /* anchors don't hide under sticky nav */
}

.study-body { scrollbar-width: thin; scrollbar-color: #cfcbee #f8faff; }
.study-body::-webkit-scrollbar { width: 10px; }
.study-body::-webkit-scrollbar-track { background: #f8faff; }
.study-body::-webkit-scrollbar-thumb {
  background: #cfcbee;
  border-radius: 99px;
  border: 3px solid #f8faff;
}
.study-body::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* "New learner — start fresh" reset (shared-PC / conference-room use) */
.new-learner-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: -1rem 0 1.75rem;
  padding: .45rem 1rem;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.new-learner-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* Module cards — now navigation-only; expand behaviour moved to study-view */
.callout {
  background: var(--brand-light);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .75rem 1rem;
  margin: 1rem 0;
  font-size: .87rem;
}
.callout strong { color: var(--brand); }

/* ── Quiz ──────────────────────────────────────────────────── */
#quiz { background: var(--bg); }

.quiz-progress {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.75rem;
  font-size: .82rem;
  color: var(--text-muted);
}
.quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 99px;
  transition: width .35s;
}

.quiz-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.85rem 1.6rem;
  box-shadow: var(--shadow);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  animation: quizCardIn .45s cubic-bezier(.22,1,.36,1);
}
@keyframes quizCardIn {
  from { opacity: 0; transform: translateY(16px) scale(.99); }
  to   { opacity: 1; transform: none; }
}
.quiz-q-num { font-size: .75rem; font-weight: 700; color: var(--brand); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6rem; }
.quiz-q-text { font-size: 1.05rem; font-weight: 600; margin-bottom: 1.25rem; color: var(--text); }

.quiz-options { display: flex; flex-direction: column; gap: .65rem; flex: 1; }
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1.05rem;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
  background: var(--white);
  text-align: left;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--text);
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-light);
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(91,81,232,.12);
}
.quiz-option.selected { border-color: var(--brand); background: var(--brand-light); }
.quiz-option.correct {
  border-color: var(--success); background: #d1fae5; color: #065f46;
  animation: pop .4s cubic-bezier(.34,1.56,.64,1);
}
.quiz-option.wrong {
  border-color: var(--error); background: #fee2e2; color: #991b1b;
  animation: shake .4s ease;
}
.quiz-option:disabled { cursor: default; }
@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.035); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.option-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .05rem;
}
.quiz-option.selected .option-letter { background: var(--brand); border-color: var(--brand); color: white; }
.quiz-option.correct .option-letter  { background: var(--success); border-color: var(--success); color: white; }
.quiz-option.wrong   .option-letter  { background: var(--error); border-color: var(--error); color: white; }

.quiz-feedback {
  margin-top: 1rem;
  font-size: .85rem;
  padding: .6rem .85rem;
  border-radius: 8px;
  font-weight: 500;
  display: none;
}
.quiz-feedback.show { display: block; animation: fbIn .35s ease; }
.quiz-feedback.good { background: #d1fae5; color: #065f46; }
.quiz-feedback.bad  { background: #fee2e2; color: #991b1b; }
@keyframes fbIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}
.quiz-score-display {
  font-size: .82rem;
  color: var(--text-muted);
}

/* ── Score result ──────────────────────────────────────────── */
.score-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: quizCardIn .5s cubic-bezier(.22,1,.36,1);
}
.score-ring {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  animation: ringIn .6s cubic-bezier(.34,1.56,.64,1);
}
@keyframes ringIn {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.score-ring .score-pct { font-size: .75rem; font-weight: 600; margin-top: .2rem; }
.score-ring.pass {
  background: #d1fae5; color: var(--success); border: 3px solid var(--success);
  animation: ringIn .6s cubic-bezier(.34,1.56,.64,1), passGlow 2s ease-in-out .6s infinite;
}
.score-ring.fail { background: #fee2e2; color: var(--error); border: 3px solid var(--error); }
@keyframes passGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,.4); }
  50% { box-shadow: 0 0 0 16px rgba(16,185,129,0); }
}
.score-verdict { font-size: 1.35rem; font-weight: 800; margin-bottom: .5rem; }
.score-sub { font-size: .9rem; margin-bottom: 1.5rem; }

/* ── Certificate Form ──────────────────────────────────────── */
#certificate { }

.form-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
}
.form-row { display: grid; gap: 1rem; }
@media (min-width: 520px) {
  .form-row.two { grid-template-columns: 1fr 1fr; }
}
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .82rem; font-weight: 600; color: var(--text); }
.field input {
  padding: .65rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .92rem;
  font-family: var(--font);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  background: var(--white);
}
.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}
.field input.error { border-color: var(--error); }
.field-err { font-size: .78rem; color: var(--error); font-weight: 500; display: none; }
.field input.error ~ .field-err { display: block; }

.form-footer { margin-top: 1.5rem; display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.form-legal { font-size: .75rem; color: var(--text-muted); margin-top: .75rem; }

/* ── Certificate Print ─────────────────────────────────────── */
#cert-preview {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
#cert-preview::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--brand);
}
.cert-watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(-25deg);
  font-size: 5rem;
  opacity: .04;
  font-weight: 900;
  pointer-events: none;
  white-space: nowrap;
  color: var(--brand);
}
.cert-logo { font-size: 2rem; margin-bottom: .5rem; }
.cert-issuer { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.5rem; }
.cert-headline { font-size: 1.7rem; font-weight: 800; color: var(--text); margin-bottom: .3rem; }
.cert-sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.cert-name { font-size: 2rem; font-weight: 800; color: var(--brand); margin-bottom: .25rem; border-bottom: 2px solid var(--brand-light); padding-bottom: .5rem; display: inline-block; min-width: 300px; }
.cert-detail { font-size: .85rem; color: var(--text-muted); margin-top: .5rem; }
.cert-module-list { text-align: left; display: inline-block; margin: 1.25rem auto; }
.cert-module-list li { font-size: .82rem; color: var(--text-muted); padding: .2rem 0; }
.cert-module-list li::before { content: '✓ '; color: var(--success); font-weight: 700; }
.cert-footer-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.cert-sig { text-align: left; }
.cert-sig-name { font-size: .85rem; font-weight: 700; }
.cert-sig-title { font-size: .75rem; color: var(--text-muted); }
.cert-seal { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--brand); display: flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 700; color: var(--brand); text-align: center; line-height: 1.2; letter-spacing: .02em; text-transform: uppercase; }

.cert-actions { margin-top: 1.5rem; display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: #0f1729;
  color: rgba(255,255,255,.55);
  padding: 2.5rem 0;
  font-size: .82rem;
  text-align: center;
}
footer a { color: rgba(255,255,255,.7); text-decoration: none; }
footer .footer-brand { font-weight: 700; color: white; margin-bottom: .4rem; }
footer .footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: .75rem; }

/* ── Util ──────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: .5rem; }

/* ── Scroll-reveal animation ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }

/* Global section reveal (class added by JS to avoid FOUC) */
body.anim-ready .reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
body.anim-ready .reveal-on-scroll.in-view {
  opacity: 1;
  transform: none;
}

/* ── Confetti ──────────────────────────────────────────────── */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -5vh;
  display: block;
  opacity: .9;
  animation-name: confettiFall;
  animation-timing-function: cubic-bezier(.3,.6,.5,1);
  animation-fill-mode: forwards;
}
@keyframes confettiFall {
  0%   { transform: translate(0,0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--drift), 108vh) rotate(calc(var(--rot) + 540deg)); opacity: .9; }
}

/* ── Reading-progress bar inside study view ────────────────── */
.sv-read-bar {
  height: 3px;
  background: var(--brand-light);
  position: relative;
  flex-shrink: 0;
}
.sv-read-bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--brand);
  width: 0%;
  transition: width .12s linear;
}

/* ── Animated AI timeline ──────────────────────────────────── */
.ai-timeline {
  position: relative;
  margin: 1.5rem 0 2rem;
  padding-left: 0;
}
.ai-timeline::before {
  content: '';
  position: absolute;
  left: 50px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand), #6ee7f7);
}
.tl-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity .5s ease, transform .5s ease;
}
.tl-item.visible { opacity: 1; transform: none; }
.tl-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--brand);
  flex-shrink: 0;
  margin-top: 3px;
  position: relative;
  z-index: 1;
  margin-left: 42px;
}
.tl-year {
  font-size: .72rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .06em;
  min-width: 36px;
  padding-top: 1px;
}
.tl-text { font-size: .88rem; color: var(--text-muted); line-height: 1.5; }
.tl-text strong { color: var(--text); }

/* ── LLM token animation ───────────────────────────────────── */
.token-demo {
  background: #0f1729;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: 'Courier New', monospace;
  font-size: .9rem;
  color: #94a3b8;
  overflow: hidden;
  min-height: 60px;
}
.token-demo .token-prompt { color: #6ee7f7; }
.token-demo .token-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #6ee7f7;
  vertical-align: middle;
  animation: blink .8s step-end infinite;
  margin-left: 1px;
}
.token-demo .token-word {
  display: inline;
  opacity: 0;
  color: #a5f3fc;
  animation: fadeWord .2s ease forwards;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes fadeWord { to { opacity: 1; } }

/* ── Neural-network SVG diagram ────────────────────────────── */
.nn-diagram {
  margin: 1.5rem auto;
  display: block;
  max-width: 400px;
}
.nn-node {
  animation: nnPulse 2.5s ease-in-out infinite;
}
.nn-node:nth-child(2) { animation-delay: .4s; }
.nn-node:nth-child(3) { animation-delay: .8s; }
.nn-node:nth-child(4) { animation-delay: 1.2s; }
@keyframes nnPulse {
  0%,100% { fill-opacity: .45; }
  50% { fill-opacity: 1; }
}
.nn-edge {
  stroke-dasharray: 6 4;
  animation: dashFlow 1.8s linear infinite;
}
@keyframes dashFlow { to { stroke-dashoffset: -40; } }

/* ── Risk meter ────────────────────────────────────────────── */
.risk-meter {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
}
.risk-meter-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .6rem;
}
.risk-bar-track {
  height: 10px;
  border-radius: 99px;
  background: #e5e7eb;
  overflow: hidden;
}
.risk-bar-fill {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
.risk-bar-fill.high { background: linear-gradient(90deg, #fbbf24, #ef4444); }
.risk-bar-fill.med  { background: linear-gradient(90deg, #6ee7f7, #fbbf24); }
.risk-meter-caption { font-size: .8rem; color: var(--text-muted); margin-top: .45rem; }

/* ── Traffic-light data classifier ────────────────────────── */
.data-lights {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}
.dl-card {
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  border: 1.5px solid transparent;
  transition: transform .2s, box-shadow .2s;
}
.dl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dl-card.green { background:#f0fdf4; border-color:#86efac; }
.dl-card.amber { background:#fffbeb; border-color:#fde68a; }
.dl-card.red   { background:#fef2f2; border-color:#fca5a5; }
.dl-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  margin: 0 auto .6rem;
  animation: dlPulse 2s ease-in-out infinite;
}
.dl-dot.green { background:#22c55e; }
.dl-dot.amber { background:#f59e0b; animation-delay: .5s; }
.dl-dot.red   { background:#ef4444; animation-delay: 1s; }
@keyframes dlPulse { 0%,100%{box-shadow:0 0 0 0 rgba(0,0,0,.15)} 50%{box-shadow:0 0 0 6px rgba(0,0,0,0)} }
.dl-card h5 { font-size: .8rem; font-weight: 700; margin-bottom: .35rem; }
.dl-card p  { font-size: .72rem; line-height: 1.45; margin: 0; }
.dl-card.green h5 { color: #166534; }
.dl-card.amber h5 { color: #92400e; }
.dl-card.red h5   { color: #991b1b; }

/* ── Interactive daily checklist ───────────────────────────── */
.ic-list { list-style: none; padding: 0; margin: 1rem 0; }
.ic-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .65rem .85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  user-select: none;
  margin-bottom: .35rem;
  border: 1.5px solid var(--border);
  background: white;
}
.ic-item:hover { background: var(--brand-light); border-color: var(--brand); }
.ic-item.checked { background: #f0fdf4; border-color: #86efac; }
.ic-item.checked .ic-text { text-decoration: line-through; color: var(--text-muted); }
.ic-box {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  transition: all .15s;
}
.ic-item.checked .ic-box { background: var(--success); border-color: var(--success); color: white; }
.ic-text { font-size: .88rem; line-height: 1.5; }
.ic-reset {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: .35rem .9rem; font-size: .8rem; cursor: pointer;
  color: var(--text-muted); font-family: var(--font);
  display: block; margin-top: .75rem;
}
.ic-reset:hover { border-color: var(--brand); color: var(--brand); }

/* ── Key stat chips (animated) ─────────────────────────────── */
.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 1.25rem 0;
}
.stat-chip {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem 1rem;
  text-align: center;
  flex: 1;
  min-width: 120px;
}
.stat-chip-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand);
  display: block;
  line-height: 1;
}
.stat-chip-lbl { font-size: .72rem; color: var(--text-muted); margin-top: .2rem; }

/* ── Video embed ───────────────────────────────────────────── */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  background: #0f1729;
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ── Employer / legal obligations section ──────────────────── */
.emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.emp-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.emp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.emp-card--warn { border-color: #fcd9b6; background: linear-gradient(180deg,#fffaf3,#fff); }
.emp-card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--brand-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: .9rem;
}
.emp-card--warn .emp-card-icon { background: #fff1e0; }
.emp-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .6rem; color: var(--text); }
.emp-card p { font-size: .9rem; line-height: 1.6; color: var(--text-muted); }
.emp-list { margin: .4rem 0 0; padding-left: 1.1rem; }
.emp-list li { font-size: .87rem; line-height: 1.55; color: var(--text-muted); margin-bottom: .55rem; }
.emp-note { font-size: .82rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed var(--border); color: var(--text-muted); }
.emp-law-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  border-bottom: 2px solid var(--brand-light);
  transition: border-color .2s;
}
.emp-law-link:hover { border-color: var(--brand); }

/* ── Study-view home brand ─────────────────────────────────── */
.sv-home {
  display: flex;
  align-items: center;
  gap: .45rem;
  cursor: pointer;
  text-decoration: none;
  padding: .25rem .55rem .25rem .35rem;
  border-radius: 9px;
  transition: background .15s;
  flex-shrink: 0;
}
.sv-home:hover { background: var(--brand-light); }
.sv-home-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  box-shadow: 0 2px 8px rgba(91,81,232,.35);
}
.sv-home-name { font-weight: 700; font-size: .9rem; color: var(--text); white-space: nowrap; }
@media (max-width: 640px) { .sv-home-name { display: none; } }

/* ── Study view (full-page module reader) ──────────────────── */
.study-view {
  position: fixed;
  inset: 0;
  background: #f8faff;
  z-index: 500;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.study-view.hidden { display: none !important; }

.study-header {
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: .7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 10;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  flex-shrink: 0;
}
.study-back {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .35rem .85rem;
  font-size: .82rem;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.study-back:hover { background: var(--brand-light); color: var(--brand); border-color: var(--brand); }
.study-header-info {
  flex: 1;
  min-width: 0;
}
.study-header-module { font-size: .72rem; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }
.study-header-title  { font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.study-header-nav {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}
.study-nav-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .35rem .7rem;
  font-size: .82rem;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text-muted);
  transition: all .15s;
}
.study-nav-btn:hover:not(:disabled) { background: var(--brand-light); color: var(--brand); border-color: var(--brand); }
.study-nav-btn:disabled { opacity: .35; cursor: default; }

.study-body {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  flex: 1;
  overflow-y: auto;
}
.study-module-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--brand-light);
  color: var(--brand);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}
.study-icon {
  font-size: 2.75rem;
  margin-bottom: 1rem;
  display: block;
}
.study-h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.study-content { color: var(--text-muted); }
.study-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 .6rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--brand-light);
}
.study-content h4:first-child { margin-top: 0; }
.study-content p { margin-bottom: 1rem; line-height: 1.75; }
.study-content ul { margin: 0 0 1.25rem 1.3rem; }
.study-content li { margin-bottom: .6rem; line-height: 1.65; }
.study-content .callout {
  background: var(--brand-light);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .9rem 1.1rem;
  margin: 1.5rem 0;
  color: var(--text);
  font-size: .92rem;
  line-height: 1.6;
}
.study-content .callout strong { color: var(--brand); }
.study-content .fact-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: .9rem;
  color: #92400e;
}
.study-content .fact-box strong { color: #78350f; }

.study-footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
}
.study-done-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  padding: .35rem 1rem;
  font-size: .82rem;
  font-weight: 600;
}
.study-progress-dots {
  display: flex;
  gap: .4rem;
  align-items: center;
}
.study-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background .2s;
}
.study-dot.active { background: var(--brand); }
.study-dot.done { background: var(--success); }

/* Redesigned module cards — now navigation cards */
.module-card {
  position: relative;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  cursor: pointer;
  transition: border-color .25s, box-shadow .3s, transform .25s cubic-bezier(.34,1.56,.64,1);
  margin-bottom: .85rem;
  overflow: hidden;
}
/* Gradient accent bar that grows on hover */
.module-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--grad-accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s ease;
}
.module-card:hover {
  border-color: transparent;
  box-shadow: 0 14px 40px rgba(91,81,232,.18);
  transform: translateY(-4px);
}
.module-card:hover::before { transform: scaleY(1); }
.module-card.done { border-color: #a7f3d0; background: linear-gradient(120deg, #f0fdf9, #fbfffd); }
.module-card.done::before { background: var(--success); transform: scaleY(1); }
.module-card.done .module-num { color: var(--success); }
.module-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.module-card:hover .module-icon { transform: scale(1.12) rotate(-6deg); }
.module-meta { flex: 1; min-width: 0; }
.module-num   { font-size: .72rem; color: var(--brand); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.module-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-top: .1rem; }
.module-done-badge {
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  padding: .2rem .65rem;
  font-size: .75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.module-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform .25s, color .25s;
}
.module-card:hover .module-arrow { transform: translateX(5px); color: var(--brand); }

/* Staggered entrance for module cards (class added by JS) */
.module-card.card-in {
  animation: cardIn .6s cubic-bezier(.22,1,.36,1) backwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Certificate verification (ID + QR) ────────────────────── */
.cert-verify {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  text-align: left;
}
.cert-verify-label {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cert-verify-code {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .04em;
  margin-top: .15rem;
}
.cert-verify-hint { font-size: .68rem; color: var(--text-muted); margin-top: .2rem; }
.cert-verify-qr { flex-shrink: 0; text-align: center; }
.cert-verify-qr img { display: block; border-radius: 6px; }
.cert-verify-qr-fallback { font-size: .6rem; color: var(--text-muted); width: 92px; }

/* ── Focus-visible (keyboard accessibility) ────────────────── */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 3px; }
.quiz-option:focus-visible { outline-offset: -1px; }

/* ── Print styles ──────────────────────────────────────────── */
@media print {
  @page { size: A4 portrait; margin: 10mm; }

  html, body { height: auto !important; background: #fff !important; }

  /* Hide everything except the certificate section */
  body > *:not(#certificate) { display: none !important; }
  #certificate { display: block !important; padding: 0 !important; margin: 0 !important; }
  #certificate > .container { padding: 0 !important; max-width: 100% !important; }
  .section-label, .section-title, .section-sub,
  .cert-actions, .btn, #cert-form-wrap { display: none !important; }

  /* Cert card — fills the whole A4 page */
  #cert-preview {
    border: 2px solid var(--brand) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    padding: 11mm 16mm 9mm !important;
    min-height: 255mm !important;          /* fits A4 printable height incl. renewal + QR blocks */
    max-height: 273mm !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  #cert-preview::before { height: 7px !important; }

  /* Larger, page-filling display elements */
  .cert-logo   { font-size: 2.4rem !important; margin-bottom: .3rem !important; }
  .cert-issuer { font-size: .8rem !important; margin-bottom: 1.2rem !important; letter-spacing: .12em !important; }
  .cert-headline { font-size: 1.8rem !important; margin-bottom: .3rem !important; }
  .cert-sub    { font-size: .9rem !important; margin-bottom: 1rem !important; }
  .cert-name   { font-size: 2.4rem !important; padding-bottom: .5rem !important; margin-bottom: .3rem !important; min-width: unset !important; width: 85% !important; }
  .cert-detail { font-size: .9rem !important; margin-top: .45rem !important; }
  #cert-course-name { font-size: 1.25rem !important; margin: .6rem 0 !important; }
  .cert-module-list { margin: .9rem auto !important; }
  .cert-module-list li { font-size: .9rem !important; padding: .2rem 0 !important; }
  .cert-watermark { font-size: 6.5rem !important; opacity: .05 !important; }
  .cert-issued-line, #cert-issued-line { font-size: .82rem !important; margin-top: .5rem !important; }

  /* Verification + signature pinned to the bottom of the page */
  .cert-verify {
    margin-top: auto !important;            /* push this and everything below to the bottom */
    width: 100% !important;
    padding-top: 1rem !important;
  }
  .cert-verify-code { font-size: 1rem !important; }
  .cert-verify-hint { font-size: .7rem !important; }
  .cert-verify-qr img { width: 72px !important; height: 72px !important; }
  .cert-footer-row { width: 100% !important; margin-top: .8rem !important; padding-top: .7rem !important; page-break-inside: avoid !important; break-inside: avoid !important; }
  .cert-sig-name  { font-size: 1rem !important; }
  .cert-sig-title { font-size: .8rem !important; }
  .cert-seal { width: 70px !important; height: 70px !important; font-size: .62rem !important; }

  /* If the verification block hasn't been generated, still pin the signature row */
  #cert-preview:not(:has(.cert-verify)) .cert-footer-row { margin-top: auto !important; }
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-stats { gap: 1.5rem; }
  .trust-inner { gap: 1rem; }
  .cert-footer-row { flex-direction: column; gap: 1rem; align-items: center; }
  .cert-name { min-width: unset; width: 100%; }
  .quiz-nav { flex-direction: column; gap: .75rem; }
  .quiz-nav > div { width: 100%; }
  .quiz-nav .btn { width: 100%; justify-content: center; }
  .cert-verify { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .emp-grid { grid-template-columns: 1fr; }

  .flow-steps { max-width: 100%; margin-bottom: 2.25rem; }
  .flow-step { min-width: 0; flex: 1; }
  .flow-label { font-size: .62rem; }
  .flow-dot { width: 34px; height: 34px; font-size: .85rem; }
  .flow-line { margin-top: 16px; min-width: 12px; }

  /* Study-view header: compact so it never overflows on phones */
  .study-header { padding: .55rem .75rem; gap: .5rem; }
  .study-back { padding: .35rem .6rem; }
  .study-header-title { display: none; }       /* keep the short module label only */
  .study-nav-btn { padding: .35rem .55rem; font-size: 0; }   /* arrow-only on mobile */
  .study-nav-btn::before { font-size: .95rem; }
  #sv-prev-btn::before { content: '←'; }
  #sv-next-btn::before { content: '→'; }
  .study-footer { padding: .75rem 1rem; }
  .study-body { padding: 1.75rem 1.15rem 1.5rem; }
}

/* ════════════════════════════════════════════════════════════
   VISUAL UPGRADE BATCH — solid CTA, SVG icons, cert seal
   ════════════════════════════════════════════════════════════ */

/* ── Solid (filled) hero CTA — the primary action pops ─────── */
.btn--solid {
  background: var(--white);
  color: var(--brand);
  box-shadow: 0 10px 30px rgba(0,0,0,.22), inset 0 -2px 0 rgba(91,81,232,.14);
  border: none;
  font-weight: 700;
}
.btn--solid:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
  background: #ffffff;
}
.btn--solid .cta-arrow { display: inline-block; transition: transform .25s ease; }
.btn--solid:hover .cta-arrow { transform: translateX(4px); }

/* ── Inline SVG icon system ─────────────────────────────────── */
.icn {
  width: 1.15em; height: 1.15em;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.2em;
  flex-shrink: 0;
}
.nav-logo-icon .icn { width: 20px; height: 20px; color: #fff; vertical-align: 0; }
.sv-home-icon .icn  { width: 18px; height: 18px; color: #fff; vertical-align: 0; }
.trust-item .icn    { width: 17px; height: 17px; color: var(--brand); }
.module-icon .icn   { width: 26px; height: 26px; }
.footer-brand .icn  { width: 16px; height: 16px; color: #fff; }
.btn .icn           { width: 1.05em; height: 1.05em; }

/* Quiz state icons (lock / ready) */
.state-icn-wrap {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto .85rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-light, #ecebfd);
  color: var(--brand);
}
.state-icn-wrap .icn { width: 30px; height: 30px; }
.state-icn-wrap--ok { background: #d1fae5; color: #059669; }

/* Certificate logo mark */
.cert-logo .icn { width: 40px; height: 40px; color: var(--brand); }

/* ── Gold rosette seal ──────────────────────────────────────── */
.cert-seal {
  width: auto; height: auto;
  border: none; border-radius: 0;
  background: none;
}
.cert-seal svg { width: 92px; height: 92px; display: block; filter: drop-shadow(0 2px 5px rgba(180,130,20,.35)); }

@media print {
  .cert-seal { border: none !important; width: auto !important; height: auto !important; }
  .cert-seal svg { width: 68px !important; height: 68px !important; filter: none; }
  .cert-logo .icn { width: 38px !important; height: 38px !important; }
}
.emp-card-icon .icn { width: 26px; height: 26px; }

/* ════════════════════════════════════════════════════════════
   FEATURE BATCH 2 — mini-check, FAQ, register, stats pop, dark
   ════════════════════════════════════════════════════════════ */

/* ── Per-module quick check ─────────────────────────────────── */
.mini-check {
  margin-top: 2rem;
  padding: 1.4rem 1.5rem;
  border: 2px solid var(--brand-light);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, #f6f5ff, #fbfaff);
}
.mini-check-title { font-weight: 700; color: var(--brand); font-size: 1rem; }
.mini-check-hint  { font-size: .82rem; color: var(--text-muted); margin: .2rem 0 .9rem; }
.mini-check-q     { font-weight: 600; color: var(--text); margin-bottom: .8rem; }
.mini-check-opts  { display: grid; gap: .5rem; }
.mini-opt {
  text-align: left;
  padding: .7rem .95rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-size: .9rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.mini-opt:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-light); }
.mini-opt:disabled { cursor: default; opacity: .85; }
.mini-opt.correct  { border-color: var(--success); background: #ecfdf5; color: #065f46; font-weight: 600; opacity: 1; }
.mini-opt.wrong    { border-color: var(--error); background: #fef2f2; color: #991b1b; }
.mini-check-fb {
  margin-top: .9rem;
  font-size: .86rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: .8rem;
}
.mini-shake { animation: miniShake .5s ease; }
@keyframes miniShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-7px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}

/* ── FAQ ────────────────────────────────────────────────────── */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: .7rem; }
.faq-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item[open] { border-color: var(--brand); box-shadow: var(--shadow, 0 6px 22px rgba(91,81,232,.10)); }
.faq-item summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 600; color: var(--text); font-size: .95rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chev { color: var(--brand); transition: transform .25s; flex-shrink: 0; }
.faq-item[open] .faq-chev { transform: rotate(180deg); }
.faq-a { padding: 0 1.2rem 1.1rem; font-size: .89rem; color: var(--text-muted); line-height: 1.65; }

/* ── Employer register card ─────────────────────────────────── */
.emp-card--register { grid-column: 1 / -1; }
.emp-reg-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.emp-reg-actions .btn { font-size: .85rem; padding: .65rem 1.1rem; }

/* ── Hero stats pop-in ──────────────────────────────────────── */
.hero-stats .stat { animation: statPop .55s cubic-bezier(.34,1.56,.64,1) backwards; }
.hero-stats .stat:nth-child(1) { animation-delay: .55s; }
.hero-stats .stat:nth-child(2) { animation-delay: .68s; }
.hero-stats .stat:nth-child(3) { animation-delay: .81s; }
.hero-stats .stat:nth-child(4) { animation-delay: .94s; }
@keyframes statPop {
  from { opacity: 0; transform: translateY(14px) scale(.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-stats .stat { animation: none; }
  .mini-shake { animation: none; }
}

/* ── Automatic dark mode ────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --text:        #eceaf8;
    --text-muted:  #a7a3c2;
    --border:      #35314f;
    --bg:          #131120;
    --bg-2:        #181529;
    --white:       #1e1b32;
    --brand-light: #2a2647;
  }
  body { background: var(--bg); }
  #navbar { background: rgba(19,17,32,.85); }
  .trust-strip { background: var(--bg-2); }
  .section--alt { background: var(--bg-2); }
  .module-card.done { background: linear-gradient(120deg, #12241e, #14211d); border-color: #1d4a3a; }
  .module-done-badge { background: #113328; color: #6ee7b7; }
  .lang-select { background: var(--white); color: var(--text); border-color: var(--border); }
  .faq-item[open] { box-shadow: 0 6px 22px rgba(0,0,0,.4); }
  .mini-check { background: linear-gradient(140deg, #1b1830, #1e1b32); border-color: #2a2647; }
  .mini-opt.correct { background: #113328; color: #6ee7b7; }
  .mini-opt.wrong   { background: #3a1420; color: #fda4af; }
  .study-view { background: var(--bg); }
  .study-header { background: rgba(19,17,32,.9); }
  /* Certificate must stay light — it gets printed */
  #cert-preview {
    --text: #15132b; --text-muted: #6b6880; --border: #e8e6f2;
    --white: #ffffff; --brand-light: #eeecff;
    background: #fff;
  }
}

/* dark mode: components with hardcoded light backgrounds */
@media (prefers-color-scheme: dark) {
  .module-card, .risk-meter, .ic-item, .stat-chip { background: var(--white); }
  .study-header, .study-footer { background: rgba(19,17,32,.92); }
  .study-back { background: var(--white); color: var(--text); }
  .hero-badge, .nav-badge { color: #fff; }
}

/* ════════════════════════════════════════════════════════════
   ART DROP — aurora hero, constellation, gradient titles,
   glass cards, gold-foil seal. All GPU-cheap, reduced-motion safe.
   ════════════════════════════════════════════════════════════ */

/* ── Aurora hero ────────────────────────────────────────────── */
#hero { position: relative; overflow: hidden; isolation: isolate; }
#hero .container { position: relative; z-index: 3; }
#hero::before, #hero::after {
  content: '';
  position: absolute;
  width: 62vmax; height: 62vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  z-index: 0;
  animation: auroraDrift 26s ease-in-out infinite alternate;
  pointer-events: none;
}
#hero::before {
  background: radial-gradient(circle at 30% 30%, rgba(139,92,246,.85), transparent 60%);
  top: -28vmax; left: -18vmax;
}
#hero::after {
  background: radial-gradient(circle at 70% 70%, rgba(6,182,212,.7), transparent 60%);
  bottom: -30vmax; right: -16vmax;
  animation-delay: -13s;
  animation-duration: 32s;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0,0,0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(6vmax,-4vmax,0) scale(1.15) rotate(30deg); }
  100% { transform: translate3d(-4vmax,5vmax,0) scale(.95) rotate(-25deg); }
}
#hero-stars {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .9;
}

/* ── Gradient shimmer section titles ────────────────────────── */
.section-title {
  background: linear-gradient(100deg, var(--text) 0%, var(--text) 38%, var(--brand) 50%, var(--brand-2) 58%, var(--text) 70%, var(--text) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text);
  animation: titleSheen 7s ease-in-out infinite;
}
@keyframes titleSheen {
  0%, 55%, 100% { background-position: 0% 0; }
  75% { background-position: 100% 0; }
}

/* ── Floating module icons (gentle bob) ─────────────────────── */
.module-icon { animation: iconFloat 5.5s ease-in-out infinite; }
.module-card:nth-child(2) .module-icon { animation-delay: -1.4s; }
.module-card:nth-child(3) .module-icon { animation-delay: -2.8s; }
.module-card:nth-child(4) .module-icon { animation-delay: -4.2s; }
@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.module-card:hover .module-icon { animation-play-state: paused; }

/* ── Glass + gradient-ring cards ────────────────────────────── */
.module-card, .emp-card, .faq-item { position: relative; }
.module-card::after {
  content: '';
  position: absolute; inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(130deg, rgba(139,92,246,.9), rgba(6,182,212,.9), rgba(139,92,246,.9));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.module-card:hover::after { opacity: 1; }
.trust-strip { backdrop-filter: blur(8px); }
.trust-item { transition: transform .25s ease, color .25s ease; }
.trust-item:hover { transform: translateY(-2px); color: var(--brand); }
.trust-item:hover .icn { filter: drop-shadow(0 3px 6px rgba(91,81,232,.45)); }

/* ── Solid CTA breathing glow ───────────────────────────────── */
.btn--solid { animation: ctaBreathe 3.6s ease-in-out infinite; }
@keyframes ctaBreathe {
  0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.22), 0 0 0 0 rgba(255,255,255,.35); }
  50%      { box-shadow: 0 14px 38px rgba(0,0,0,.30), 0 0 0 9px rgba(255,255,255,0); }
}

/* ── Quiz pass ring celebration glow ────────────────────────── */
.score-ring.pass { animation: passGlow 2.2s ease-in-out infinite; }
@keyframes passGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.45); }
  55%      { box-shadow: 0 0 0 16px rgba(16,185,129,0); }
}

/* ── Gold-foil sheen on the certificate seal (screen only) ──── */
.cert-seal { position: relative; }
.cert-seal::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.65) 50%, transparent 58%);
  background-size: 260% 100%;
  animation: foilSheen 4.5s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: soft-light;
}
@keyframes foilSheen {
  0%, 60%, 100% { background-position: 120% 0; }
  80% { background-position: -30% 0; }
}
@media print { .cert-seal::after { display: none !important; } }

/* ── FAQ answer slide-in ────────────────────────────────────── */
.faq-item[open] .faq-a { animation: faqIn .3s ease both; }
@keyframes faqIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reduced motion: kill the art, keep the content ─────────── */
@media (prefers-reduced-motion: reduce) {
  #hero::before, #hero::after, .section-title, .module-icon,
  .btn--solid, .score-ring.pass, .cert-seal::after { animation: none !important; }
  #hero-stars { display: none; }
}

/* ════════════════════════════════════════════════════════════
   CERTIFICATE ART — diploma-grade frame, fonts & gold details
   ════════════════════════════════════════════════════════════ */
#cert-preview {
  background:
    radial-gradient(circle at 50% -20%, rgba(212,160,23,.06), transparent 55%),
    repeating-radial-gradient(circle at 50% 130%, rgba(91,81,232,.022) 0 2px, transparent 2px 16px),
    #fffdf9;
  border: 2.5px solid var(--brand);
  position: relative;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
/* inner gold frame (replaces the old top bar) */
#cert-preview::before {
  content: '' !important;
  position: absolute !important;
  inset: 8px !important;
  height: auto !important; width: auto !important;
  background: none !important;
  border: 1.5px solid rgba(201,154,46,.7) !important;
  border-radius: 6px !important;
  pointer-events: none;
}
/* gold corner brackets */
#cert-preview::after {
  content: '';
  position: absolute; inset: 15px;
  pointer-events: none;
  background:
    linear-gradient(#c99a2e,#c99a2e) left 0 top 0 / 30px 2.5px,
    linear-gradient(#c99a2e,#c99a2e) left 0 top 0 / 2.5px 30px,
    linear-gradient(#c99a2e,#c99a2e) right 0 top 0 / 30px 2.5px,
    linear-gradient(#c99a2e,#c99a2e) right 0 top 0 / 2.5px 30px,
    linear-gradient(#c99a2e,#c99a2e) left 0 bottom 0 / 30px 2.5px,
    linear-gradient(#c99a2e,#c99a2e) left 0 bottom 0 / 2.5px 30px,
    linear-gradient(#c99a2e,#c99a2e) right 0 bottom 0 / 30px 2.5px,
    linear-gradient(#c99a2e,#c99a2e) right 0 bottom 0 / 2.5px 30px;
  background-repeat: no-repeat;
}
/* typographic hierarchy — engraved serif + calligraphy name */
.cert-headline {
  font-family: 'Playfair Display', Georgia, serif !important;
  text-transform: uppercase;
  letter-spacing: .14em !important;
  color: #201c3d !important;
}
.cert-issuer { color: #8a6a1c !important; letter-spacing: .22em !important; }
.cert-name {
  font-family: 'Great Vibes', 'Playfair Display', cursive !important;
  font-weight: 400 !important;
  font-size: 3.4rem !important;
  color: var(--brand-dark) !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  line-height: 1.15 !important;
}
.cert-name + .cert-detail { margin-top: .1rem; }
/* gold flourish under the name */
#cert-name-display::after,
.cert-name::after {
  content: '';
  display: block;
  width: 220px; height: 10px;
  margin: .35rem auto 0;
  background:
    radial-gradient(circle 3px at 50% 50%, #c99a2e 98%, transparent) center / 10px 10px no-repeat,
    linear-gradient(90deg, transparent, #c99a2e 35%, #c99a2e 65%, transparent) center / 100% 1.5px no-repeat;
}
/* course name framed by gold sparks */
#cert-course-name {
  font-family: 'Playfair Display', Georgia, serif !important;
  letter-spacing: .02em;
}
#cert-course-name::before { content: '✦  '; color: #c99a2e; font-size: .8em; }
#cert-course-name::after  { content: '  ✦'; color: #c99a2e; font-size: .8em; }
/* module ticks slightly gold */
.cert-module-list li::marker { color: #c99a2e; }
/* watermark softer, on-brand */
.cert-watermark { opacity: .045 !important; }
@media print {
  #cert-preview, #cert-preview * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .cert-name { font-size: 2.9rem !important; }
  #cert-preview::before { inset: 7px !important; }
  #cert-preview::after { inset: 13px !important; }
}
