:root {
  --sg-bg: #F4F7FB;
  --sg-bg-deep: #0B1220;
  --sg-bg-elevated: #FFFFFF;
  --sg-ink: #0F172A;
  --sg-ink-soft: #334155;
  --sg-muted: #64748B;
  --sg-line: rgba(148, 163, 184, 0.35);
  --sg-accent: #3B82F6;
  --sg-accent-hover: #2563EB;
  --sg-accent-deep: #1D4ED8;
  --sg-navy: #1A2233;
  --sg-success: #16A34A;
  --sg-danger: #DC2626;
  --sg-radius: 10px;
  --sg-font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --sg-mono: "IBM Plex Mono", ui-monospace, monospace;
  --sg-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --sg-header-h: 72px;
  --sg-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sg-max: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sg-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--sg-ink);
  background: var(--sg-bg);
}

a { color: var(--sg-accent-deep); text-decoration: none; }
a:hover { color: var(--sg-accent-hover); }

h1, h2, h3 { line-height: 1.2; color: var(--sg-ink); }

code {
  font-family: var(--sg-mono);
  font-size: 0.9em;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.muted { color: var(--sg-muted); }

.shell {
  width: min(100% - 2.5rem, var(--sg-max));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--sg-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--sg-radius);
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; color: #fff; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: var(--sg-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 160ms var(--sg-ease), color 160ms var(--sg-ease), border-color 160ms var(--sg-ease), transform 160ms var(--sg-ease);
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 0.85rem 1.9rem; font-size: 1.05rem; }
.btn-primary { background: var(--sg-accent); color: #fff; }
.btn-primary:hover { background: var(--sg-accent-hover); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--sg-ink);
  border-color: var(--sg-line);
}
.btn-ghost:hover { border-color: var(--sg-accent); color: var(--sg-accent-deep); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--sg-header-h);
  background: rgba(244, 247, 251, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sg-line);
}
.is-landing .site-header,
.is-exam .site-header { background: rgba(11, 18, 32, 0.75); border-bottom-color: rgba(148, 163, 184, 0.18); }
.is-landing .site-header .nav-link,
.is-landing .site-header .brand-name,
.is-exam .site-header .nav-link,
.is-exam .site-header .brand-name { color: #E2E8F0; }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--sg-ink);
}
.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sg-accent-deep);
  background: rgba(59, 130, 246, 0.12);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-left: auto;
}
.nav-link {
  color: var(--sg-ink-soft);
  font-weight: 500;
  padding: 0.3rem 0.15rem;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--sg-ink); }
.nav-link.is-active { color: var(--sg-accent-deep); border-bottom-color: var(--sg-accent); }
.nav-cta {
  background: var(--sg-accent);
  color: #fff;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border-radius: var(--sg-radius);
}
.nav-cta:hover { background: var(--sg-accent-hover); color: #fff; }
.nav-signout { margin: 0; }
.nav-link-button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  color: var(--sg-ink);
  margin: 5px 0;
  transition: transform 200ms var(--sg-ease);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 480px at 78% -10%, rgba(59, 130, 246, 0.28), transparent 60%),
    radial-gradient(700px 420px at 12% 110%, rgba(29, 78, 216, 0.25), transparent 60%),
    var(--sg-bg-deep);
  color: #E2E8F0;
  margin-top: calc(-1 * var(--sg-header-h));
  padding-top: var(--sg-header-h);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(4.5rem, 12vh, 8rem) 0 clamp(4rem, 10vh, 7rem);
  max-width: 780px;
}
.hero-brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  margin: 0 0 1rem;
}
.hero-brand span { color: var(--sg-accent); }
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  margin: 0 0 1.1rem;
  color: #fff;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #B6C2D6;
  max-width: 560px;
  margin: 0 0 2rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.hero .btn-ghost { color: #E2E8F0; border-color: rgba(148, 163, 184, 0.4); }
.hero .btn-ghost:hover { border-color: var(--sg-accent); color: #fff; }

/* Sections */
.section { padding: clamp(3rem, 8vh, 5.5rem) 0; }
.section-deep {
  background:
    radial-gradient(800px 400px at 85% 0%, rgba(59, 130, 246, 0.18), transparent 60%),
    var(--sg-bg-deep);
  color: #CBD5E1;
}
.section-deep h2, .section-deep h3 { color: #fff; }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 0.4rem; }
.section-sub { color: var(--sg-muted); margin: 0 0 2rem; max-width: 620px; }
.section-cta { margin-top: 2.5rem; }

/* Module list (landing + account) */
.module-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.module-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--sg-line);
}
.module-row h3 { margin: 0 0 0.15rem; font-size: 1.1rem; }
.module-row p { margin: 0; color: var(--sg-muted); font-size: 0.95rem; }
.module-index {
  font-family: var(--sg-mono);
  font-size: 1.15rem;
  color: var(--sg-accent-deep);
  font-weight: 500;
}
.module-meta {
  color: var(--sg-muted);
  font-size: 0.9rem;
  white-space: nowrap;
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 2.25rem;
}
.step h3 { margin: 0.8rem 0 0.4rem; font-size: 1.15rem; }
.step p { margin: 0; color: #A9B7CC; font-size: 0.98rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.16);
  color: var(--sg-accent);
  font-weight: 700;
  font-family: var(--sg-mono);
}

/* Page heads */
.page-head {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.07), transparent);
  padding: clamp(2.5rem, 6vh, 4rem) 0 1.5rem;
  border-bottom: 1px solid var(--sg-line);
}
.page-head h1 { margin: 0 0 0.4rem; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.page-sub { color: var(--sg-muted); max-width: 640px; margin: 0 0 1rem; }
.page-note { color: var(--sg-ink-soft); }

.page-narrow {
  width: min(100% - 2.5rem, 760px);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vh, 4rem) 0 4rem;
}
.page-narrow h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-top: 0; }

/* Progress */
.progress-line {
  height: 8px;
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  overflow: hidden;
  max-width: 480px;
}
.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sg-accent), var(--sg-accent-deep));
  border-radius: 999px;
  transition: width 400ms var(--sg-ease);
}
.progress-label { color: var(--sg-muted); font-size: 0.92rem; margin-top: 0.5rem; }

/* Curriculum */
.curriculum-module { padding: 1.75rem 0; border-bottom: 1px solid var(--sg-line); }
.curriculum-module-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: start;
}
.curriculum-module-head h2 { margin: 0 0 0.2rem; font-size: 1.3rem; }
.curriculum-module-head p { margin: 0; color: var(--sg-muted); }
.quiz-state {
  font-size: 0.8rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}
.quiz-state.is-passed { background: rgba(22, 163, 74, 0.14); color: var(--sg-success); }

.lesson-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0 0 0 2.4rem;
}
.lesson-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
}
.lesson-row a { color: var(--sg-ink-soft); font-weight: 500; }
.lesson-row a:hover { color: var(--sg-accent-deep); }
.lesson-row.is-done a { color: var(--sg-muted); }
.lesson-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--sg-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
}
.is-done .lesson-check { background: var(--sg-success); border-color: var(--sg-success); }
.lesson-meta { color: var(--sg-muted); font-size: 0.85rem; display: inline-flex; gap: 0.6rem; align-items: center; }
.lesson-video {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sg-accent-deep);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
}
.lesson-row-quiz a { color: var(--sg-accent-deep); font-weight: 600; }

.exam-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 2.5rem 0 1rem;
  padding: 1.6rem 1.8rem;
  border-radius: var(--sg-radius);
  background:
    radial-gradient(500px 200px at 90% 0%, rgba(59, 130, 246, 0.25), transparent 65%),
    var(--sg-bg-deep);
  color: #CBD5E1;
}
.exam-callout h2 { margin: 0 0 0.3rem; color: #fff; font-size: 1.25rem; }
.exam-callout p { margin: 0; }
.exam-callout.is-certified {
  background:
    radial-gradient(500px 200px at 90% 0%, rgba(22, 163, 74, 0.3), transparent 65%),
    var(--sg-bg-deep);
}

/* Lesson page */
.lesson-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 3rem;
  padding: 2.25rem 0 4rem;
  align-items: start;
}
.lesson-sidebar {
  position: sticky;
  top: calc(var(--sg-header-h) + 1.25rem);
  max-height: calc(100vh - var(--sg-header-h) - 2.5rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}
.sidebar-toggle { display: none; }
.sidebar-module { margin-bottom: 1.4rem; }
.sidebar-module-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sg-muted);
  margin: 0 0 0.4rem;
}
.sidebar-module ul { list-style: none; margin: 0; padding: 0; }
.sidebar-module li { border-left: 2px solid var(--sg-line); }
.sidebar-module li a {
  display: block;
  padding: 0.32rem 0.8rem;
  color: var(--sg-ink-soft);
  font-size: 0.92rem;
}
.sidebar-module li a:hover { color: var(--sg-accent-deep); }
.sidebar-module li.is-active { border-left-color: var(--sg-accent); }
.sidebar-module li.is-active a { color: var(--sg-accent-deep); font-weight: 600; }
.sidebar-module li.is-done a { color: var(--sg-muted); }
.sidebar-module li.is-done a::after { content: " ✓"; color: var(--sg-success); }
.sidebar-quiz a { font-weight: 600; }

.lesson-main { min-width: 0; max-width: 760px; }
.lesson-crumb { color: var(--sg-muted); font-size: 0.9rem; margin: 0 0 0.6rem; }
.lesson-crumb a { color: var(--sg-muted); }
.lesson-crumb a:hover { color: var(--sg-accent-deep); }
.lesson-main h1 { margin: 0 0 0.4rem; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.lesson-summary { color: var(--sg-muted); margin: 0 0 1.6rem; }

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--sg-radius);
  overflow: hidden;
  background: var(--sg-bg-deep);
  box-shadow: var(--sg-shadow);
  margin-bottom: 2rem;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.prose { color: var(--sg-ink-soft); }
.prose h2 { margin-top: 2.2rem; font-size: 1.4rem; }
.prose h3 { margin-top: 1.6rem; font-size: 1.15rem; }
.prose pre {
  background: var(--sg-bg-deep);
  color: #DBEAFE;
  padding: 1rem 1.25rem;
  border-radius: var(--sg-radius);
  overflow-x: auto;
  font-family: var(--sg-mono);
  font-size: 0.88rem;
  line-height: 1.55;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; }
.prose th, .prose td { border: 1px solid var(--sg-line); padding: 0.5rem 0.75rem; text-align: left; }
.prose th { background: rgba(59, 130, 246, 0.06); }
.prose img { max-width: 100%; border-radius: var(--sg-radius); }
.prose blockquote {
  margin: 1.25rem 0;
  padding: 0.6rem 1.1rem;
  border-left: 3px solid var(--sg-accent);
  background: rgba(59, 130, 246, 0.06);
  border-radius: 0 var(--sg-radius) var(--sg-radius) 0;
}

.lesson-actions { margin: 2.25rem 0; }
.lesson-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--sg-success);
  font-weight: 600;
}
.lesson-done-badge::before { content: "✓"; }

.lesson-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--sg-line);
  padding-top: 1.5rem;
}
.pager-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--sg-ink);
  font-weight: 600;
  max-width: 46%;
}
.pager-link span {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sg-muted);
}
.pager-next { text-align: right; margin-left: auto; }
.pager-link:hover { color: var(--sg-accent-deep); }

/* Quiz + exam */
.quiz-form { margin-top: 2rem; }
.quiz-question {
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  background: var(--sg-bg-elevated);
  padding: 1.25rem 1.4rem;
  margin: 0 0 1.25rem;
}
.quiz-question legend {
  font-weight: 600;
  padding: 0 0.4rem;
  color: var(--sg-ink);
}
.q-num { color: var(--sg-accent-deep); font-family: var(--sg-mono); margin-right: 0.25rem; }
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--sg-ink-soft);
}
.quiz-option:hover { background: rgba(59, 130, 246, 0.06); }
.quiz-option input { margin-top: 0.3rem; accent-color: var(--sg-accent); }

.exam-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.exam-topbar h1 { margin: 0; }
.exam-timer {
  font-family: var(--sg-mono);
  font-weight: 500;
  color: var(--sg-ink);
  background: var(--sg-bg-elevated);
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  padding: 0.45rem 0.9rem;
  position: sticky;
  top: calc(var(--sg-header-h) + 0.75rem);
}
.exam-timer.is-low { color: var(--sg-danger); border-color: var(--sg-danger); }

.score-panel {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-line);
  background: var(--sg-bg-elevated);
  margin: 1.5rem 0;
}
.score-panel p { margin: 0; color: var(--sg-muted); }
.score-value {
  font-size: 2.2rem;
  font-weight: 700;
  font-family: var(--sg-mono);
}
.score-panel.is-pass .score-value { color: var(--sg-success); }
.score-panel.is-fail .score-value { color: var(--sg-danger); }

.review-list { color: var(--sg-ink-soft); }
.review-list li { margin-bottom: 0.4rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.unlock-list { list-style: none; padding: 0; margin: 1.25rem 0; }
.unlock-list li {
  padding: 0.65rem 0 0.65rem 2rem;
  position: relative;
  color: var(--sg-ink-soft);
  border-bottom: 1px solid var(--sg-line);
}
.unlock-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.85rem;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--sg-line);
}
.unlock-list li.is-done { color: var(--sg-muted); }
.unlock-list li.is-done::before {
  content: "✓";
  color: #fff;
  background: var(--sg-success);
  border-color: var(--sg-success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.exam-gate {
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  background: var(--sg-bg-elevated);
  padding: 1.6rem 1.75rem;
  margin-top: 1.5rem;
}
.exam-gate p { margin-top: 0; color: var(--sg-ink-soft); }

/* Auth */
.is-auth main {
  min-height: calc(100vh - var(--sg-header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(800px 380px at 85% -5%, rgba(59, 130, 246, 0.14), transparent 60%),
    var(--sg-bg);
  padding: 3rem 1.25rem;
}
.auth-shell { width: 100%; display: flex; justify-content: center; }
.auth-panel {
  width: min(100%, 440px);
  background: var(--sg-bg-elevated);
  border: 1px solid var(--sg-line);
  border-radius: calc(var(--sg-radius) + 4px);
  box-shadow: var(--sg-shadow);
  padding: 2.25rem 2.25rem 1.75rem;
}
.auth-panel h1 { margin: 0 0 0.3rem; font-size: 1.6rem; }
.auth-form { display: flex; flex-direction: column; margin-top: 1.5rem; }
.auth-form label { font-weight: 600; font-size: 0.92rem; margin: 0.9rem 0 0.3rem; }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  font: inherit;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--sg-line);
  border-radius: var(--sg-radius);
  background: #fff;
  color: var(--sg-ink);
  transition: border-color 140ms var(--sg-ease), box-shadow 140ms var(--sg-ease);
}
.auth-form input:focus {
  outline: none;
  border-color: var(--sg-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.auth-form .btn { margin-top: 1.5rem; }
.check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500 !important;
  margin-top: 1rem !important;
  cursor: pointer;
}
.check-label input { accent-color: var(--sg-accent); }
.field-error { color: var(--sg-danger); font-size: 0.85rem; }
.form-errors { color: var(--sg-danger); font-size: 0.92rem; }
.form-errors ul { margin: 0; padding-left: 1.1rem; }
.auth-switch { text-align: center; color: var(--sg-muted); margin-top: 1.4rem; font-size: 0.95rem; }

/* Certificate */
.is-certificate main { background: var(--sg-bg); }
.certificate-page {
  width: min(100% - 2rem, 900px);
  margin-inline: auto;
  padding: 3rem 0 4rem;
}
.certificate {
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--sg-shadow);
}
.certificate-border {
  border: 2px solid var(--sg-navy);
  outline: 1px solid rgba(59, 130, 246, 0.45);
  outline-offset: -10px;
  margin: 14px;
  padding: clamp(2rem, 6vw, 4rem);
  text-align: center;
}
.certificate-mark { margin-bottom: 1rem; }
.certificate-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  color: var(--sg-muted);
  margin: 0 0 1rem;
}
.certificate-name {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--sg-navy);
  margin: 0 0 1rem;
}
.certificate-body { color: var(--sg-ink-soft); margin: 0 0 0.75rem; }
.certificate-course {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--sg-accent-deep);
  margin: 0 0 2.25rem;
}
.certificate-foot {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4rem);
  flex-wrap: wrap;
  border-top: 1px solid var(--sg-line);
  padding-top: 1.5rem;
}
.certificate-foot > div { display: flex; flex-direction: column; gap: 0.15rem; }
.certificate-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--sg-muted);
}
.certificate-code { font-family: var(--sg-mono); font-weight: 500; }
.certificate-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.verify-note { color: var(--sg-muted); margin: 0; flex: 1 1 100%; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--sg-line);
  background: var(--sg-navy);
  color: #B6C2D6;
  margin-top: 3rem;
}
.is-landing .site-footer, .is-auth .site-footer { margin-top: 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem 0 1.5rem;
}
.site-footer .brand-name { color: #fff; }
.footer-tagline { color: #8FA0B8; margin: 0.6rem 0 0; font-size: 0.95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; }
.footer-links a { color: #B6C2D6; font-size: 0.95rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding: 1rem 0 1.25rem;
  font-size: 0.85rem;
  color: #8FA0B8;
}
.footer-bottom p { margin: 0; }

/* Reveal motion */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--sg-ease), transform 600ms var(--sg-ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 900px) {
  .lesson-shell { grid-template-columns: 1fr; gap: 1.5rem; }
  .lesson-sidebar {
    position: static;
    max-height: none;
    border: 1px solid var(--sg-line);
    border-radius: var(--sg-radius);
    background: var(--sg-bg-elevated);
    padding: 0;
  }
  .sidebar-toggle {
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    font-weight: 600;
    background: none;
    border: none;
    padding: 0.9rem 1.1rem;
    cursor: pointer;
    color: var(--sg-ink);
  }
  .sidebar-toggle::after { content: " ▾"; color: var(--sg-muted); }
  .sidebar-nav { display: none; padding: 0 1.1rem 1rem; }
  .lesson-sidebar.is-open .sidebar-nav { display: block; }
  .steps { grid-template-columns: 1fr; gap: 1.75rem; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .is-landing .nav-toggle-bar, .is-exam .nav-toggle-bar { color: #E2E8F0; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--sg-header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--sg-bg-elevated);
    border-bottom: 1px solid var(--sg-line);
    padding: 0.75rem 1.25rem 1.25rem;
    box-shadow: var(--sg-shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav .nav-link { padding: 0.7rem 0.15rem; border-bottom: 1px solid var(--sg-line); color: var(--sg-ink-soft); }
  .site-nav .nav-cta { margin-top: 0.9rem; text-align: center; }
  .module-row { grid-template-columns: auto 1fr; }
  .module-row .module-meta { grid-column: 2; justify-self: start; }
  .curriculum-module-head { grid-template-columns: auto 1fr; }
  .curriculum-module-head .module-meta { grid-column: 2; }
  .lesson-list { padding-left: 0.5rem; }
  .lesson-row { grid-template-columns: 24px 1fr; }
  .lesson-row .lesson-meta { grid-column: 2; }
  .exam-callout { flex-direction: column; align-items: flex-start; }
  .auth-panel { padding: 1.75rem 1.4rem 1.4rem; }
}

/* Print (certificate) */
@media print {
  .site-header, .site-footer, .no-print, .skip-link { display: none !important; }
  body { background: #fff; }
  .certificate-page { width: 100%; padding: 0; }
  .certificate { box-shadow: none; }
}
