/* ==========================================================================
   3-Phase Lean Academy - shared styles
   Clean, bright, modern. Lean Green + Navy scheme with warm amber accent.
   Edit this ONE file to restyle every module page, the landing page,
   and the certification exam.
   ========================================================================== */

:root {
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-alt: #eef3ef;
  --border: #dfe6e1;

  --text: #182a33;
  --text-muted: #55646b;
  --text-faint: #839097;

  --primary: #17804a;       /* lean green */
  --primary-dark: #0e5c33;
  --primary-light: #e6f4ec;

  --accent: #d97b06;        /* warm amber accent */
  --accent-light: #fdf2e2;

  --navy: #1b3a55;          /* deep navy, headings + diagrams */
  --navy-light: #e8eff5;

  --success: #1f9d55;
  --success-light: #e8f8ee;
  --error: #d64545;
  --error-light: #fdecec;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(24, 42, 51, 0.06);
  --shadow-lg: 0 12px 32px rgba(24, 42, 51, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Top bar (module pages) ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }

.topbar .home-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.topbar .home-link:hover { text-decoration: none; color: var(--primary); }

.logo-mark {
  display: inline-flex;
  flex: none;
  line-height: 0;
}
.logo-mark svg { display: block; }
.logo-mark-sm { width: 26px; height: 26px; }
.logo-mark-lg { width: 56px; height: 56px; margin-bottom: 14px; }

.topbar .module-meta {
  min-width: 0;
  overflow: hidden;
}
.topbar .module-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .module-sub {
  font-size: 12px;
  color: var(--text-faint);
}

.topbar-right { display: flex; align-items: center; gap: 10px; flex: none; }

.feedback-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--primary-light);
  white-space: nowrap;
  transition: background .12s ease;
}
.feedback-link:hover { background: var(--primary-light); text-decoration: none; }

.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  white-space: nowrap;
}
.chip.alt { background: var(--accent-light); color: #9a5804; }

@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; padding: 12px 16px; }
  .topbar-left { flex-wrap: wrap; width: 100%; row-gap: 4px; }
  .topbar .module-meta {
    flex-basis: 100%;
    overflow: visible;
  }
  .topbar .module-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .topbar .module-sub { white-space: normal; }
  .topbar-right { width: 100%; justify-content: flex-end; }
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .15s ease;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ---------- Slide deck shell ---------- */

.deck {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 140px;
  min-height: calc(100vh - 64px);
}

.slide {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 48px;
  min-height: 420px;
  animation: fadeIn .25s ease;
}
.slide.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

.slide h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}
.slide h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--text);
}
.slide h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 26px 0 10px;
  color: var(--primary-dark);
}
.slide p { margin: 0 0 14px; color: var(--text); }
.slide ul, .slide ol { margin: 0 0 14px; padding-left: 22px; }
.slide li { margin-bottom: 6px; }
.slide strong { color: var(--text); font-weight: 700; }
.slide table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 14px;
}
.slide th, .slide td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.slide th { background: var(--surface-alt); font-weight: 700; }

.title-slide {
  flex-direction: column;
  justify-content: center;
  text-align: left;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--surface) 60%);
}
/* Higher specificity than base .slide { display: none } so the title
   slide only ever renders when active. */
.slide.active.title-slide { display: flex; }

/* Accordions (native <details>/<summary>, closed by default) */
.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 20px;
}
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  overflow: hidden;
}
.accordion-item summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background .12s ease;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::marker { content: ""; }
.accordion-item summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  flex: none;
  width: 20px;
  text-align: center;
}
.accordion-item[open] summary::after { content: "\2212"; }
.accordion-item summary:hover { background: var(--primary-light); }
.accordion-item[open] summary {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.accordion-item .accordion-body {
  padding: 14px 16px 4px;
  background: var(--surface);
}
.accordion-item .accordion-body p:last-child,
.accordion-item .accordion-body ul:last-child { margin-bottom: 4px; }

.category-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--navy-light);
  padding: 3px 9px;
  border-radius: 999px;
  width: fit-content;
}
.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.title-slide .badge-row { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.title-slide h1 { font-size: 36px; }
.title-slide .subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 24px; }
.title-slide .outcomes-label { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-bottom: 10px; }
.title-slide ul { padding-left: 20px; }
.title-slide li { color: var(--text); }

/* Image / diagram slides */
.image-slide { text-align: center; }
.image-frame {
  display: flex;
  justify-content: center;
  margin: 10px 0 16px;
}
.image-frame img,
.image-frame svg {
  max-width: 100%;
  height: auto;
  max-height: 62vh;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.image-link { font-size: 14px; font-weight: 600; }
.figure-caption { font-size: 13px; color: var(--text-faint); margin-top: -6px; }

/* Key takeaways slide */
.takeaways-slide ul { list-style: none; padding-left: 0; }
.takeaways-slide li {
  position: relative;
  padding: 10px 14px 10px 40px;
  margin-bottom: 8px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}
.takeaways-slide li::before {
  content: "\2713";
  position: absolute;
  left: 14px;
  top: 10px;
  color: var(--success);
  font-weight: 800;
}

/* Quiz (in-module knowledge checks) */
.quiz-progress { font-size: 13px; color: var(--text-faint); margin-bottom: 6px; font-weight: 600; }
.quiz-question { font-size: 19px; font-weight: 700; margin: 4px 0 22px; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  text-align: left;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: all .12s ease;
}
.quiz-option:hover { border-color: var(--primary); background: var(--primary-light); }
.quiz-option.selected-correct { border-color: var(--success); background: var(--success-light); color: #0d5a30; font-weight: 600; }
.quiz-option.selected-wrong { border-color: var(--error); background: var(--error-light); color: #8a2626; font-weight: 600; }
.quiz-option.reveal-correct { border-color: var(--success); background: var(--success-light); }
.quiz-option[disabled] { cursor: default; }

.quiz-feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: none;
}
.quiz-feedback.show { display: block; }
.quiz-feedback.correct { background: var(--success-light); color: #0d5a30; }
.quiz-feedback.wrong { background: var(--error-light); color: #8a2626; }

.quiz-intro { text-align: center; padding-top: 40px; }
.quiz-intro .big-emoji { font-size: 44px; margin-bottom: 10px; }

.quiz-summary { text-align: center; padding-top: 30px; }
.quiz-summary .score { font-size: 48px; font-weight: 800; color: var(--primary); margin: 10px 0; }

/* ---------- Nav controls ---------- */

.deck-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
}
.deck-nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .15s ease;
  white-space: nowrap;
}
.nav-btn:hover { background: var(--primary-dark); }
.nav-btn:disabled { background: var(--border); color: var(--text-faint); cursor: not-allowed; }
.nav-btn.ghost { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.nav-btn.ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.progress-track {
  flex: 1;
  height: 6px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width .25s ease;
}

.slide-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
  min-width: 54px;
  text-align: center;
}

/* Slide jump drawer */
.jump-drawer {
  position: fixed;
  top: 0; right: -320px;
  width: 300px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  transition: right .2s ease;
  overflow-y: auto;
  padding: 20px;
}
.jump-drawer.open { right: 0; }
.jump-drawer h4 { margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.jump-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
}
.jump-item:hover { background: var(--surface-alt); }
.jump-item.current { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }
.jump-overlay {
  position: fixed; inset: 0; background: rgba(24,42,51,.25);
  z-index: 55; display: none;
}
.jump-overlay.show { display: block; }

/* ---------- Landing page ---------- */

.landing-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, var(--navy) 130%);
  color: #fff;
  padding: 56px 20px 48px;
  text-align: center;
}
.landing-header .eyebrow {
  font-size: 14px;
  font-weight: 600;
  opacity: .85;
  margin-bottom: 4px;
  letter-spacing: .02em;
}
.landing-header h1 { font-size: 36px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
.landing-header p { font-size: 16px; opacity: .92; max-width: 620px; margin: 0 auto; }

.landing-body { max-width: 1080px; margin: 0 auto; padding: 32px 20px 80px; }

.landing-tagline {
  font-size: 14px;
  color: var(--text-faint);
  margin: 0 0 28px;
}

.track-section { margin-bottom: 42px; }
.track-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.track-heading::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.module-number {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .04em;
}
.module-card h3 { margin: 0; font-size: 16px; color: var(--text); line-height: 1.35; }
.module-card .meta { font-size: 12.5px; color: var(--text-faint); margin-top: auto; }

.module-card.cert-card {
  border: 1.5px solid var(--accent);
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--surface) 55%);
}
.module-card.cert-card .module-number { color: var(--accent); }

.landing-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 40px;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
}

/* ---------- Certification exam ---------- */

.exam-rules { margin: 18px 0 22px; }
.exam-rules li { margin-bottom: 8px; }

.exam-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: all .12s ease;
}
.exam-option:hover { border-color: var(--primary); background: var(--primary-light); }
.exam-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--primary);
}

.exam-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 4px;
}
.palette-btn {
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s ease;
}
.palette-btn:hover { border-color: var(--primary); }
.palette-btn.answered { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.palette-btn.current { background: var(--primary); border-color: var(--primary); color: #fff; }

.exam-field { margin-bottom: 16px; text-align: left; }
.exam-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text-muted); }
.exam-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
}
.exam-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.field-note { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.field-error { font-size: 13px; color: var(--error); font-weight: 600; margin-top: 6px; display: none; }
.field-error.show { display: block; }

.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.btn-row .nav-btn { display: inline-flex; }

.result-score { font-size: 52px; font-weight: 800; margin: 8px 0 2px; }
.result-score.pass { color: var(--primary); }
.result-score.fail { color: var(--error); }
.result-sub { font-size: 15px; color: var(--text-muted); margin-bottom: 18px; }

.review-areas {
  text-align: left;
  max-width: 560px;
  margin: 0 auto 10px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 14.5px;
}
.review-areas ul { margin: 8px 0 0; padding-left: 20px; }
.review-areas li { margin-bottom: 5px; }

.cert-form { max-width: 440px; margin: 18px auto 0; }

.certificate-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 10px;
}
.certificate-wrap canvas {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

@media print {
  body * { visibility: hidden; }
  .cert-print-area, .cert-print-area * { visibility: visible; }
  .cert-print-area {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
  }
  .cert-print-area canvas {
    max-width: 100%;
    max-height: 100%;
    border: none;
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .deck { padding: 18px 12px 150px; }
  .slide { padding: 26px 20px; }
  .slide h1, .title-slide h1 { font-size: 24px; }
  .slide h2 { font-size: 20px; }
  .landing-header h1 { font-size: 28px; }
  .jump-drawer { width: 84vw; right: -84vw; }
}
/* ==========================================================================
   Academy Accounts (assets/account.js): auth UI, progress badges, account page
   ========================================================================== */

.account-nav { font-weight: 600; color: var(--primary); }
.account-pill {
  position: absolute; top: 18px; right: 20px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-weight: 600; font-size: 14px; color: var(--primary);
  text-decoration: none; box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.account-pill:hover { background: var(--primary-light); }

.module-card { position: relative; }
.module-card.is-complete { border-color: var(--success); }
.done-badge {
  position: absolute; top: 10px; right: 10px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--success); color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.account-progress-summary { text-align: center; color: var(--text-muted); font-size: 15px; margin-top: 8px; }

.account-toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(16px);
  background: var(--text); color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 100; max-width: 92vw; text-align: center;
}
.account-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.account-toast a { color: #fff; text-decoration: underline; }

.certified-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--success-light); border: 1px solid var(--success);
  border-radius: 12px; padding: 14px 20px; margin: 20px auto; max-width: 860px;
  font-weight: 600; color: var(--text);
}

.acct-wrap { max-width: 760px; margin: 40px auto 60px; padding: 0 20px; }
.acct-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px 30px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.acct-card h2 { margin: 0 0 12px; }
.acct-form-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 4px; }
.acct-form-row input {
  flex: 1 1 240px; padding: 12px 14px; font: inherit; font-size: 15px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
}
.acct-form-row input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.acct-note { min-height: 1.2em; font-size: 14px; margin: 10px 0 0; }
.acct-note-ok { color: var(--success); }
.acct-note-error { color: var(--error); }
.acct-fineprint { font-size: 13px; color: var(--text-faint); margin-top: 14px; }
.acct-header-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.acct-who { font-size: 14px; color: var(--text-muted); }
.acct-signout { background: none; border: none; color: var(--primary); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; padding: 0; }
.acct-course-card { border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-top: 16px; }
.acct-course-card h3 { margin: 0 0 10px; }
.acct-other-site { font-size: 13px; font-weight: 500; color: var(--text-faint); }
.acct-progress-row { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-muted); }
.acct-progress-track { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
.acct-progress-fill { height: 100%; border-radius: 999px; background: var(--primary); transition: width .3s; }
.acct-cert { margin-top: 12px; font-size: 14px; color: var(--text-muted); }
.acct-cert-earned { background: var(--success-light); border-radius: 8px; padding: 10px 14px; color: var(--text); }
.acct-visit { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; }
.acct-backlink { text-align: center; margin-top: 8px; }

/* ---- Signed-out CTAs + backfill (account.js additions, Aug 2026) ---- */

.account-banner {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  background: var(--primary-light); border-bottom: 1px solid var(--border);
  padding: 10px 20px; font-size: 14px; color: var(--text);
}
.account-banner-msg { font-weight: 500; }
.account-banner-form { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-banner-form input {
  padding: 8px 12px; font: inherit; font-size: 14px; min-width: 210px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.account-banner-form input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.account-banner-form input.input-error { border-color: var(--error); outline: 2px solid var(--error); }
.account-banner-form .nav-btn { padding: 8px 14px; font-size: 14px; }
.account-banner-dismiss {
  background: none; border: none; font-size: 20px; line-height: 1; cursor: pointer;
  color: var(--text-faint); padding: 4px 6px;
}
.account-banner-dismiss:hover { color: var(--text); }

.exam-cta {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--primary-light); border: 1px solid var(--primary);
  border-radius: 12px; padding: 16px 20px; margin: 20px auto; max-width: 860px;
  font-size: 15px; color: var(--text);
}

.backfill-card { max-width: 860px; margin: 20px auto; }
.backfill-card h3 { margin: 0 0 6px; }
.backfill-sub { margin: 0 0 12px; color: var(--text-muted); font-size: 14px; }
.backfill-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px 16px; margin: 10px 0 4px;
}
.backfill-item {
  display: flex; align-items: baseline; gap: 8px; font-size: 14px;
  color: var(--text); cursor: pointer; padding: 3px 0;
}
.backfill-item input { accent-color: var(--primary); }
.backfill-actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.backfill-wrap { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.backfill-toggle {
  background: none; border: none; padding: 0; font: inherit; font-size: 14px;
  color: var(--primary); cursor: pointer; text-decoration: underline;
}
