/* Fintech Frontiers — shared page chrome.
   Sticky nav, breadcrumb, scroll progress bar, and footer — identical across the
   landing, quiz, and topic pages. Built on shared/css/site.css design tokens.
   Page-type-specific sizing (h1, .lead, .btn, hero, section cards) stays in each
   page's own stylesheet — only the chrome lives here so it never drifts again.
   Linked by: module-NN/index.html, module-NN/quiz.html, module-NN/topics/*.html. */

/* ---- Sticky nav ---- */
.nav {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg-base) 80%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-default);
}
.nav.scrolled { border-bottom-color: var(--border-base); }
.nav-inner {
  max-width: 72rem; margin: 0 auto; padding: 0.875rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--text-primary); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.brand .dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--accent-gradient); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; font-size: 0.95rem; }
.nav-links a { color: var(--text-secondary); text-decoration: none; }
.nav-links a:hover { color: var(--text-primary); }
.theme-btn {
  background: transparent; border: 1px solid var(--border-base);
  border-radius: 0.5rem; padding: 0.4rem 0.6rem; cursor: pointer; color: var(--text-secondary);
}
.theme-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---- Scroll progress bar ---- */
.progress-bar {
  position: sticky; top: 3.25rem; z-index: 25;
  height: 3px; background: var(--accent); width: 0%;
  transition: width 200ms ease;
}

/* Mobile header: two-row nav (brand row, then full-width links row) at <=520px;
   the progress bar offset tracks the taller wrapped nav. */
@media (max-width: 520px) {
  .nav-inner { flex-wrap: wrap; row-gap: 0.3rem; padding: 0.75rem 1rem; }
  .nav-links { width: 100%; justify-content: space-between; gap: 0.75rem; font-size: 0.875rem; }
  .progress-bar { top: 5.25rem; }
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  max-width: 64rem; margin: 1.5rem auto 0; padding: 0 1.5rem;
  /* Was --text-tertiary (#A1A1AA = 2.46:1 on #FAFAFA), which FAILS WCAG AA for
     this 14px navigation text. --text-secondary is 7.41:1 light / 7.76:1 dark —
     same fix as footer below. */
  font-size: 0.875rem; color: var(--text-secondary);
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-strong); }
.breadcrumb span { color: var(--text-primary); }

/* ---- Footer ---- */
footer {
  max-width: 64rem; margin: 4rem auto 0; padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-base);
  font-size: 0.875rem;
  /* Was --text-tertiary, which is #A1A1AA on the #FAFAFA surface = 2.46:1 and
     FAILS WCAG 1.4.3 (AA needs 4.5:1). --text-secondary is 7.41:1 light /
     7.76:1 dark. This is every footer on the site, not just the credit. */
  color: var(--text-secondary);
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between;
}
footer a { color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--accent-strong); }

/* Institutional credit in the footer. Added 2026-08-04.
   The org line is one step QUIETER than the course name above it, not louder:
   before the base-colour fix above, .foot-org's --text-secondary sat on a
   --text-tertiary footer and the institution shouted over the course. */
footer .foot-brand { line-height: 1.6; }
footer .foot-org { color: var(--text-secondary); font-size: 0.8125rem; }

/* One-line variant for surfaces with a bespoke footer that is a navigation
   affordance rather than a colophon (the 12 interactives). Keyed off its own
   class because those 12 footers use 12 different class names. */
.foot-org--solo {
  display: block; margin: 1rem 0 0;
  font-size: 0.8125rem; line-height: 1.5;
  color: var(--text-secondary);
}
