/* ============================================================
   Citizen Math — Global Stylesheet
   Shared by: index.html, results.html, how-it-works.html
   ============================================================ */

/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  color: #222;
  line-height: 1.5;
}
h1 { font-family: 'Montserrat', sans-serif; }
h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-title);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
p { font-size: var(--fs-body); line-height: 1.7; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  /* ── Colors ─────────────────────────────────────── */
  --blue:     #5AA3D2;
  --red:      #F04944;
  --green:    #2EA889;
  --amber:    #D4845A;
  --orange:   #FB7931;
  --yellow:   #F5D06F;
  --purple:   #8F2C87;
  --dark:     #212D3A;
  --gray:     #73808A;
  --grey:     #73808A;
  --gray-lt:  #B4BBC2;
  --grey-lt:  #B4BBC2;
  --light-bg: #f7f5f0;
  --tan:      #e8e0d0;

  /* ── Type Scale: Section Titles ─────────────────── */
  --fs-display:   clamp(3.2rem, 7vw, 6rem);      /* Homepage hero h1 */
  --fs-title-xl:  clamp(2.4rem, 5vw, 3.6rem);    /* Interior hero h1 */
  --fs-title-lg:  clamp(2rem, 4vw, 3.2rem);      /* Final CTA, manifesto */
  --fs-title:     clamp(1.6rem, 3vw, 2.2rem);    /* Standard section h2 */
  --fs-title-sm:  clamp(1.3rem, 2.2vw, 1.7rem);  /* Sub-section headings */

  /* ── Type Scale: Body Text ─────────────────────── */
  --fs-body-lg:   clamp(1.25rem, 2.2vw, 1.5rem); /* Important body text */
  --fs-body:      1.15rem;                        /* Standard paragraphs */
  --fs-body-sm:   1rem;                           /* Compact text, cards */

  /* ── Type Scale: Eyebrow / UI ──────────────────── */
  --fs-eyebrow:   0.88rem;   /* Eyebrow labels */
  --fs-label:     0.80rem;   /* Nav, secondary buttons, sidebar items */
  --fs-caption:   0.72rem;   /* Card meta, tags, captions */

  /* ── Type Scale: Buttons ───────────────────────── */
  --fs-btn:       0.88rem;   /* CTA / primary buttons */
  --fs-btn-sm:    0.80rem;   /* Secondary / ghost buttons */

  /* ── Layout ────────────────────────────────────── */
  --content-max:     1380px;
  --content-narrow:  900px;
  --gutter:          60px;
  --gutter-mobile:   24px;

  /* Animation Toggle: set to 0 to disable all site animations */
  --use-animations: 1;
}

/* ─── Background Utility Classes ──────────────────────────────────────── */
.bg-gray      { background-color: var(--gray); }
.bg-grey      { background-color: var(--gray); }
.bg-gray-light { background-color: var(--gray-lt); }
.bg-grey-light { background-color: var(--gray-lt); }

/* ─── Animation Kill Switch ─────────────────────────────────────────────── */
/* Controlled by --use-animations above. Change 1 → 0 to disable.          */
body.no-animations .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
body.no-animations .aha-char {
  visibility: visible !important;
}
body.no-animations .aha-fade {
  opacity: 1 !important;
  transition: none !important;
}
body.no-animations .lesson-card {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
body.no-animations .ps-globe {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
body.no-animations #hero-bg {
  opacity: 0.55 !important;
  background-size: 705px 705px !important;
  animation: none !important;
}
body.no-animations #hero-svg {
  opacity: 1 !important;
  animation: none !important;
}
body.no-animations #hero-content h1,
body.no-animations #hero-content p,
body.no-animations #hero-content .btn-signUp,
body.no-animations .hero-line-1,
body.no-animations .hero-line-2 {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}
body.no-animations .hero-real {
  color: var(--blue) !important;
  transition: none !important;
}
body.no-animations #results-amber {
  display: none !important;
}
body.no-animations .resource-slide .resource-preview img,
body.no-animations .resource-slide .resource-preview--video video {
  transform: none !important;
  transition: none !important;
}
body.no-animations .steps-grid::before {
  transform: none !important;
  transition: none !important;
}
body.no-animations .mission-card-rotator.reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

/* ─── Eyebrow ────────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.eyebrow-hero  { margin-bottom: 20px; }
.eyebrow-red   { color: var(--red); }
.eyebrow-blue  { color: var(--blue); }
.eyebrow-white { color: rgba(255,255,255,0.6); }
.eyebrow-gray  { color: var(--gray); }
.eyebrow-grey  { color: var(--gray); }
.eyebrow-green { color: var(--green); }

/* ─── Pending-email banner ───────────────────────────────────────────────── */
.pending-email-banner {
  background: var(--green);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  text-align: center;
  padding: 10px 40px 10px 16px;
  position: relative;
}
.pending-email-banner-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
  line-height: 1;
}
.pending-email-banner-close:hover { opacity: 1; }

/* ─── Nav ────────────────────────────────────────────────────────────────── */
nav {
  background: var(--dark);
  border-bottom: none;
  position: relative;
  z-index: 200;
  padding: 0 40px;
}
nav .section-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 44px; width: auto; }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }
.nav-links a.active {
  border-bottom-color: var(--blue);
}

/* ─── Nav Dropdown (temporary Admin menu) ──────────────────────────────── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s;
}
.nav-dropdown-toggle:hover {
  background: #4a93c2;
  border-color: #4a93c2;
}
.nav-dropdown.open .nav-dropdown-toggle {
  background: #4a93c2;
  border-color: #4a93c2;
  border-radius: 4px 4px 0 0;
  border-bottom-color: transparent;
}
.nav-dropdown-toggle svg {
  width: 10px;
  height: 10px;
  opacity: 0.7;
  transition: transform 0.2s;
}
.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 100%;
  background: #4a93c2;
  border: 2px solid #4a93c2;
  border-top: none;
  border-radius: 4px 0 4px 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 110;
  padding: 4px 0;
}
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.nav-dropdown-menu a svg {
  flex-shrink: 0;
  order: 2;
}

.nav-auth { display: flex; gap: 12px; align-items: center; opacity: 0; animation: nav-auth-reveal 0s 1.5s forwards; }
.nav-auth.is-ready { opacity: 1; animation: none; }
@keyframes nav-auth-reveal { to { opacity: 1; } }

/* ─── Admin Nav (uses standard nav with color override) ────────────────── */
nav.is-admin-page {
  position: sticky;
  top: 0;
}
.admin-page-title {
  background: var(--green);
  padding: 14px 40px;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

/* ─── Admin Table Column Widths (percentage-based) ─────────────────────── */
/* Lessons table */
.col-lesson-title    { width: 25%; }
.col-lesson-course   { width: 13%; }
.col-lesson-topic    { width: 30%; }
.col-lesson-status   { width: 12%; }
.col-lesson-featured { width: 10%; }
.col-lesson-view     { display: none; }

/* Users table – widths now defined in admin.html */

/* ─── Hamburger Button ──────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; width: 36px; height: 36px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,0.85); border-radius: 1px;
  transition: background 0.2s;
}
.nav-hamburger:hover span { background: #fff; }

/* ─── Mobile Menu Panel ─────────────────────────────────────────────────── */
.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--dark); z-index: 300;
  display: flex; flex-direction: column; padding: 0 40px;
  opacity: 0; visibility: hidden; transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
}
.mobile-menu.is-open {
  opacity: 1; visibility: visible; transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px; flex-shrink: 0;
}
.mobile-menu-header .nav-logo img { height: 44px; width: auto; }
.mobile-menu-close {
  background: none; border: none;
  color: rgba(255,255,255,0.6); font-size: 2rem; line-height: 1;
  cursor: pointer; padding: 8px; transition: color 0.2s;
}
.mobile-menu-close:hover { color: #fff; }
.mobile-menu-links {
  list-style: none; margin: 0; padding: 24px 0 0; flex: 1;
}
.mobile-menu-links li { border-bottom: 1px solid rgba(255,255,255,0.1); }
.mobile-menu-links li:first-child { border-top: 1px solid rgba(255,255,255,0.1); }
.mobile-menu-links a {
  display: block; padding: 18px 0;
  font-family: 'Montserrat', sans-serif; font-size: var(--fs-body-sm);
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.8); transition: color 0.2s;
}
.mobile-menu-links a:hover { color: #fff; }
.mobile-menu-links a.active { color: var(--blue); }
.mobile-menu-auth {
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px 0 40px; flex-shrink: 0;
}
.mobile-menu-btn { display: block; text-align: center; width: 100%; padding: 14px 32px; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
/*
   Two standard tiers:
     Large CTA  → --fs-btn (0.88rem), padding 14px 32px, 2px border  ≈ 46px tall
     Small/Nav  → --fs-btn-sm (0.80rem), padding 12px 20px, 2px border ≈ 38px tall
   All buttons share: Montserrat, 700 weight, uppercase, line-height 1, border-radius 4px.
*/

/* ── Small / Nav buttons ── */
.btn-ghost {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn-sm); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; line-height: 1;
  color: rgba(255,255,255,0.8);
  padding: 12px 20px;
  border: 2px solid rgba(255,255,255,0.4); border-radius: 4px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: #fff; color: #fff; }

.btn-primary {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn-sm); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; line-height: 1;
  color: #fff; background: var(--red);
  padding: 12px 20px;
  border: 2px solid transparent; border-radius: 4px;
  transition: background 0.2s;
}
.btn-primary:hover { background: #d63e39; }

.btn-admin {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn-sm); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; line-height: 1;
  color: #fff; background: var(--green);
  padding: 12px 20px;
  border: 2px solid transparent; border-radius: 4px;
  transition: background 0.2s;
}
.btn-admin:hover { background: #279a7b; }

.btn-outline-dark {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn-sm); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; line-height: 1;
  color: var(--dark);
  padding: 12px 20px;
  border: 2px solid var(--dark); border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  align-self: center;
}
.btn-outline-dark:hover { background: var(--dark); color: #fff; }

/* ── Large CTA buttons ── */
.btn-signUp {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; line-height: 1;
  color: #fff; background: var(--red);
  padding: 14px 32px;
  border: 2px solid var(--red); border-radius: 4px;
  transition: background 0.2s;
}
.btn-signUp:hover { background: #d63e39; border-color: #d63e39; }

.btn-seeLessons {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; line-height: 1;
  color: #fff; background: var(--blue);
  padding: 14px 32px;
  border: 2px solid var(--blue); border-radius: 4px;
  transition: background 0.2s;
}
.btn-seeLessons:hover { background: #4a90b8; border-color: #4a90b8; }


/* ─── Page Hero (shared pattern for all interior pages) ──────────────────── */
/*
  Usage: wrap content in a <section class="page-hero">, then inside:
    <div class="page-hero-bg">   ← set background-image inline or per-page CSS
    <div class="page-hero-overlay">
    <div class="page-hero-content">
      <p class="eyebrow eyebrow-blue">...</p>
      <h1>...</h1>
      <p>...</p>
*/
.page-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  background: #0a1628;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.78);
}
.page-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1060px;
  padding: 72px 60px 48px;
}
.page-hero-content h1 {
  font-size: var(--fs-title-xl);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 20px;
}
.page-hero-content p:not(.eyebrow) {
  font-size: var(--fs-body);
  color: rgba(255,255,255,0.75);
  max-width: 720px;
  margin: 0 auto 32px;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: #f2f2f2;
  border-top: 1px solid #ddd;
  padding: 0 40px;
}
footer .section-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 40px 0;
  max-width: none;
}
.footer-logo img { height: 32px; width: auto; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  justify-content: center;
}
.footer-links a {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--blue); }
.footer-copy { font-size: var(--fs-label); color: #999; text-align: right; }
.footer-copy a { color: #999; text-decoration: underline; }

/* ─── Featured Lesson ────────────────────────────────────────────────────── */
.featured-lesson {
  border: 2px solid rgba(255,255,255,0.25);
  border-right: none;
  border-radius: 8px 0 0 8px;
  margin-bottom: 28px;
  padding: 28px 0 28px 0;
  position: relative;
}
.featured-lesson-close {
  position: absolute;
  top: 10px;
  left: 10px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
  z-index: 3;
}
.featured-lesson-close:hover { color: #fff; }

.featured-lesson::before,
.featured-lesson::after {
  content: '';
  position: absolute;
  right: 0;
  width: 6px;
  height: 6px;
  background: var(--dark);
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--dark);
}
.featured-lesson::before {
  top: -1px;
  transform: translate(50%, -50%);
}
.featured-lesson::after {
  bottom: -1px;
  transform: translate(50%, 50%);
}
.featured-lesson-inner {
  display: grid;
  grid-template-columns: repeat(3, 320px);
  gap: 28px;
  align-items: start;
  margin-left: -2px;   /* compensate for parent's 2px left border so col-3 aligns with grid */
}
/* Text/card slide toggles — opacity-based for fade transitions */
.featured-lesson-text-slides,
.featured-lesson-card-slides {
  position: relative;
}
.featured-lesson-text-slide,
.featured-lesson-card-slide {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.featured-lesson-text-slide:first-child,
.featured-lesson-card-slide:first-child {
  position: relative;
}
.featured-lesson-text-slide.active,
.featured-lesson-card-slide.active {
  opacity: 1;
  pointer-events: auto;
}
/* Text slides container — fixed height so nav stays put regardless of description length */
.featured-lesson-text-slides {
  height: 280px;
  overflow: hidden;
}
.featured-lesson-card-slides .lesson-card {
  animation: none;
  opacity: 1;
  transform: none;
  width: 320px;
}
.featured-lesson-text {
  grid-column: 1 / 3;
  padding: 50px 0 28px 28px;
}
.featured-lesson-text h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-title);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.1;
  margin-top: 0;
  margin-bottom: 16px;
}
.featured-lesson-description {
  font-size: var(--fs-body);
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 560px;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Carousel navigation */
.featured-lesson-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}
.featured-lesson-arrow {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 1.5rem;
  line-height: 1;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}
.featured-lesson-arrow:hover {
  color: #fff;
}
.featured-lesson-dots {
  display: flex;
  gap: 8px;
}
.featured-lesson-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.featured-lesson-dot.active {
  background: #fff;
}
.featured-lesson-dot:hover {
  background: rgba(255,255,255,0.5);
}
.featured-lesson-dot.active:hover {
  background: #fff;
}

@media (max-width: 1350px) {
  .featured-lesson-inner {
    grid-template-columns: 1fr 320px;
    margin-left: 0;
  }
  .featured-lesson-text {
    grid-column: 1;
  }
}
@media (max-width: 900px) {
  .featured-lesson {
    padding: 20px;
  }
  .featured-lesson-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-left: 0;
  }
  .featured-lesson-text {
    grid-column: 1;
  }
  .featured-lesson-card-slides .lesson-card {
    width: 320px;
    max-width: 100%;
  }
  .featured-lesson-slides {
    min-height: auto;
  }
}

/* ─── Component Typography ─────────────────────────────────────────────
   All font-size definitions live here. Per-page <style> blocks
   should only set color and layout properties.
   ─────────────────────────────────────────────────────────────────────── */

/* Homepage hero */
#hero-content h1 { font-size: var(--fs-display); font-weight: 900; line-height: 1.08; letter-spacing: 0.03em; text-transform: uppercase; }
#hero-content p { font-size: clamp(1.5rem, 2.7vw, 1.8rem); font-weight: 700; line-height: 1.6; letter-spacing: 0.12em; text-transform: uppercase; }
.c3-scroll-indicator span { font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
#banner { font-size: var(--fs-btn); text-transform: uppercase; }
#banner-close { font-size: 1.2rem; }
.signup-heading { font-size: var(--fs-title-sm); }

/* Buttons (page-specific → now global) — all Large CTA tier */
.btn-hero { font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }
.btn-outline { font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }
.btn-white { font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }
.btn-mission { font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }
.btn-signup-banner { font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }

/* Lesson cards (shared component) */
.lesson-card-title { font-size: 0.85rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.lesson-card-question { font-size: var(--fs-body-sm); line-height: 1.45; }
.lesson-card-course { font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.lesson-card-topic { font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.browse-link { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.browse-all { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.lesson-related-content .lesson-card-title { font-size: var(--fs-body-sm); }

/* Mission page */
.pop-footnote { font-size: var(--fs-label) !important; font-weight: 400; letter-spacing: 0.02em; }
.reason-label { font-size: var(--fs-title-sm); font-weight: 900; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.2; }
.reason-title { font-size: var(--fs-title-lg); font-weight: 900; letter-spacing: 0.02em; line-height: 1.12; }
.ps-col h3 { font-size: var(--fs-title-sm); letter-spacing: 0.03em; line-height: 1.2; }
.ps-col p:not(.eyebrow) { font-size: var(--fs-body); }
.ps-pull-quote { font-size: var(--fs-body-lg); font-weight: 400; font-style: italic; }
.mission-card-tag { font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.mission-card-title { font-size: var(--fs-body-sm); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.mission-card-question { font-size: var(--fs-body-sm); line-height: 1.5; }
.mission-card-meta { font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.mission-card-arrow { font-size: 1.2rem; line-height: 1; }
.r2-heading { font-size: var(--fs-title); font-weight: 900; letter-spacing: 0.02em; line-height: 1.1; }
.r2-intro { font-size: var(--fs-body); font-weight: 400; line-height: 1.7; }
.manifesto-title { font-size: var(--fs-title-lg); font-weight: 900; letter-spacing: 0.02em; line-height: 1.1; }
.manifesto-statement { font-size: var(--fs-body-lg); font-weight: 400; line-height: 1.65; }
.r2-video-heading { font-size: var(--fs-title-sm); font-weight: 900; letter-spacing: 0.02em; line-height: 1.15; }
.r2-video-quote p { font-size: var(--fs-body-lg); line-height: 1.65; }
.r2-video-quote cite { font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.r2-video-caption { font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

/* How It Works page */
.step-badge { font-size: var(--fs-body-sm); font-weight: 900; }
.step-col h3 { font-size: 0.95rem; line-height: 1.3; }
.video-placeholder { font-size: var(--fs-btn); }
.video-placeholder-icon { font-size: 2.5rem; }
.resource-tag { font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.resource-label h3 { font-size: var(--fs-body); letter-spacing: 0.05em; }
.anatomy-card h4 { font-size: var(--fs-eyebrow); font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.anatomy-card .phase-duration { font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.req-icon { font-size: 1.1rem; }
.req-item-text strong { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.req-item-text span { font-size: var(--fs-eyebrow); line-height: 1.5; }
.req-lesson-card-title { font-size: var(--fs-body-sm); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.req-lesson-card-question { font-size: var(--fs-body-sm); line-height: 1.5; }
.req-lesson-card-meta { font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
#lightbox-close { font-size: 1.6rem; }

/* Results page */
.body-copy { font-size: var(--fs-body); }
.cred-label { font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.cred-value { font-size: var(--fs-btn); line-height: 1.4; }
#big-aha .display-line { font-size: clamp(4rem, 12vw, 9rem); font-weight: 900; line-height: 1; letter-spacing: -0.01em; }
#big-aha .equals-line { font-size: var(--fs-body-lg); font-weight: 400; font-style: italic; }
#big-aha .body-copy { font-size: var(--fs-body-sm); }
#big-aha .study-link { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.stat-number { font-size: 4rem; font-weight: 900; line-height: 1; }
.teacher-quote { font-size: var(--fs-body); line-height: 1.65; }
.teacher-cite { font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* Final CTA (shared) */
#final-cta h2 { font-size: var(--fs-title-lg); font-weight: 900; letter-spacing: 0.02em; line-height: 1.15; }
#final-content h2 { font-size: var(--fs-title-lg); font-weight: 900; letter-spacing: 0.02em; line-height: 1.15; }

/* Sample Lesson page */
.lesson-hero h1 { font-size: var(--fs-title-xl); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; text-transform: uppercase; }
.lesson-hero-question { font-size: var(--fs-body-lg); line-height: 1.55; font-weight: 400; }
.lesson-hero-about { font-size: var(--fs-body); line-height: 1.7; font-weight: 400; }
.lesson-hero-cta { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.info-section-header h3 { font-size: var(--fs-eyebrow); }
.info-section p { font-size: var(--fs-body); line-height: 1.6; }
.info-section li { font-size: var(--fs-body); line-height: 1.6; }
.lesson-standards-label { font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.lesson-standards-value { font-size: var(--fs-body); line-height: 1.5; }
.sidebar-header h4 { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-teach-btn { font-size: var(--fs-btn); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; }
strong.resource-label { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-interactive-desc { font-size: var(--fs-label); font-weight: 400; margin-bottom: 16px; }
.sidebar-dl-text small { font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.sidebar-meta-label { font-size: var(--fs-caption); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.sidebar-meta-value { font-size: var(--fs-btn); font-weight: 600; }
/* sidebar-diff-text removed — replaced by unit alignment */
.lesson-related-content .eyebrow-dim { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

/* Lessons catalog page */
.lessons-header h1 { font-size: var(--fs-title-xl); font-weight: 900; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.1; }
.lessons-header-tagline { font-size: var(--fs-body); }
.sidebar-search { font-size: var(--fs-label); font-weight: 500; }
.sidebar-saved { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-all { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-grade { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-chevron { font-size: var(--fs-caption); }
.sidebar-topic { font-size: 0.85rem; letter-spacing: normal; text-transform: none; }

/* ─── Responsive (global) ────────────────────────────────────────────────── */

/* Tightened nav (tablets / narrow laptops) */
@media (max-width: 1300px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.72rem; letter-spacing: 0.05em; }
  .nav-auth { gap: 8px; }
  .btn-ghost, .nav-auth .btn-primary { font-size: 0.72rem; padding: 10px 14px; }

  /* Shorten "Our Mission" → "Mission" (CSS text replacement) */
  .nav-links a[href="mission.html"] { font-size: 0; }
  .nav-links a[href="mission.html"]::after {
    content: "MISSION";
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  /* Shorten "Sign Up for Free" → "Sign Up" */
  .nav-auth .btn-primary { font-size: 0; }
  .nav-auth .btn-primary::after {
    content: "SIGN UP";
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    font-weight: 700;
  }
}

/* Hamburger (phones) */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-auth  { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 900px) {
  #hero-content h1 { font-size: 3.2rem; }
}
@media (max-width: 600px) {
  :root {
    --gutter: var(--gutter-mobile);
  }
  nav { padding: 0 20px; }
  .admin-page-title { padding: 10px 20px; }
  .mobile-menu { padding: 0 20px; }
  .mobile-downloads-btn { display: none; }
  .page-hero-content { padding: 60px var(--gutter-mobile); }
  footer { padding: 0 20px; }
  footer .section-inner {
    padding: 32px 0;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 16px;
  }
  .footer-links { justify-content: center; }
  .footer-copy { text-align: center; }
  #hero-content h1 { font-size: 2.8rem; }
  .lesson-hero-about { font-size: var(--fs-body-sm); }
}


/* ── Hide signup CTAs when authenticated ── */
body.is-authed #signup-banner .btn-signup-banner,
body.is-authed #final-cta .btn-signUp { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   SIGN-UP MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Backdrop ── */
.signup-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(33, 45, 58, 0.85);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 10000;
  padding: 40px 20px;
  overflow-y: auto;
}
.signup-modal-backdrop.open {
  display: flex;
}

/* ── Modal container ── */
.signup-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 720px;
  width: 100%;
  height: 920px;
  display: flex;
  flex-direction: column;
  animation: signup-appear 0.25s ease;
  margin: auto 0;
  position: relative;
  padding-top: 40px;
  border: 1px solid var(--red);
}
@keyframes signup-appear {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Logo badge (overlapping top edge) ── */
.signup-modal-logo {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.signup-modal-logo img {
  width: 44px;
  height: auto;
  margin-top: 3px;
}

/* ── Header ── */
.signup-modal-header {
  padding: 8px 32px 0;
  text-align: center;
}
.signup-modal-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-title-sm);
  font-weight: 800;
  color: var(--blue);
  margin: 0;
}
.signup-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--gray);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.15s;
  z-index: 2;
}
.signup-modal-close:hover { color: var(--dark); }

/* ── Body (scrollable form area) ── */
.signup-modal-body {
  padding: 24px 32px 8px;
  flex: 1;
  overflow-y: auto;
}
/* Extra top breathing room on the initial auth screen */
#signup-screen-auth {
  padding-top: 40px;
}

/* ── Step visibility ── */
.signup-step { display: none; }
.signup-step.active { display: block; }

/* ── Form (flex to push footer to bottom) ── */
#signup-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ── Footer ── */
.signup-modal-footer {
  padding: 8px 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
/* Footer 1 now has its own Back button — no extra padding needed */
#signup-footer-1 {
  padding-bottom: 28px;
}

/* ── Field layout ── */
.signup-field {
  margin-bottom: 18px;
}
.signup-field + .signup-field,
.signup-field + .signup-row,
.signup-row + .signup-field,
.signup-row + .signup-row {
  padding-top: 5px;
}
.signup-row {
  display: flex;
  gap: 14px;
}
.signup-half {
  flex: 1;
}
.signup-row > .signup-field + .signup-field {
  padding-top: 0;
}

/* ── Labels ── */
.signup-label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 6px;
}
.signup-req {
  color: var(--red);
}
.signup-label-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--gray);
}

/* ── Inputs & Selects ── */
.signup-input,
.signup-select {
  display: block;
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  color: var(--dark);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.signup-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2373808A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
.signup-input::placeholder { color: var(--gray-lt); }
.signup-input:focus,
.signup-select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(90,163,210,0.10);
}
.signup-input-error {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(240,73,68,0.08) !important;
}

/* ── Textarea (mirrors .signup-input, taller + resizable) ── */
.signup-textarea {
  display: block;
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  color: var(--dark);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}
.signup-textarea::placeholder { color: var(--gray-lt); }
.signup-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(90,163,210,0.10);
}

/* ── Contact modal image attachments ── */
.contact-attach-field { margin-bottom: 10px; }
.contact-attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.contact-attach-grid:empty { margin-bottom: 0; }
.contact-attach-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f3ee;
  border: 1px solid #e8e5df;
}
.contact-attach-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.contact-attach-tile.is-error { border-color: var(--red); opacity: 0.6; }
.contact-attach-tile.is-uploading img { opacity: 0.5; }
.contact-attach-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(33,45,58,0.85);
  color: #fff;
  font-size: 15px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background 0.15s;
}
.contact-attach-remove:hover { background: var(--dark); }
.contact-attach-spinner {
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid rgba(33,45,58,0.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: contactAttachSpin 0.8s linear infinite;
}
@keyframes contactAttachSpin { to { transform: rotate(360deg); } }
.contact-attach-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  background: #fff;
  border: 1px dashed var(--gray-lt);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.contact-attach-add:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: rgba(90,163,210,0.05);
}
.contact-attach-add svg { width: 14px; height: 14px; }

/* ── Error / hint text ── */
.signup-error {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-caption);
  color: var(--red);
  margin-top: 4px;
  min-height: 0;
}
.signup-hint {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-caption);
  color: var(--gray);
  margin-top: 4px;
}

/* ── Searchable dropdown ── */
.signup-searchable {
  position: relative;
}
.signup-searchable-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.signup-searchable-list:not(:empty) {
  display: block;
}
.signup-searchable-option {
  padding: 10px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  color: var(--dark);
  cursor: pointer;
  border-bottom: 1px solid #f5f3ef;
  transition: background 0.1s;
}
.signup-searchable-option:hover {
  background: var(--light-bg);
}
.signup-searchable-option:last-child {
  border-bottom: none;
}

/* ── Checkbox group ── */
.signup-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.signup-checkbox-divider {
  width: 100%;
  height: 1px;
  background: #e8e5e0;
  margin: 4px 0;
}
.signup-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 0;
  min-width: 45%;
}
.signup-checkbox input {
  display: none;
}
.signup-checkbox-mark {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--gray-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.signup-checkbox input:checked + .signup-checkbox-mark {
  border-color: var(--green);
  background: var(--green);
}
.signup-checkbox input:checked + .signup-checkbox-mark::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.signup-checkbox-label {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  color: var(--dark);
  user-select: none;
}

/* ── Step 1: separator between bio fields and position ── */
#signup-position-wrap {
  padding-top: 32px !important;
  margin-top: 20px !important;
}

/* ── Step 2: Levels (single column) ── */
#signup-levels .signup-checkbox,
#acct-levels .signup-checkbox,
#um-levels .signup-checkbox {
  min-width: 0;
}
#signup-levels.signup-checkbox-group,
#acct-levels.signup-checkbox-group,
#um-levels.signup-checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  gap: 6px 16px;
}

/* ── Step 2: separator between levels and district/institution ── */
#signup-levels-wrap {
  padding-bottom: 20px;
  margin-bottom: 20px;
}

/* ── Buttons ── */
.signup-submit {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 280px;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  margin: 0 auto;
  line-height: 1;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--red);
  border-radius: 4px;
  padding: 14px 32px;
  cursor: pointer;
  transition: background 0.2s;
}
.signup-submit:hover { background: #d63e39; }

.signup-cancel {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  transition: color 0.15s;
}
.signup-cancel:hover { color: var(--dark); }

/* ── Contact modal variant (wider for email-style form) ── */
.signup-modal.signup-modal--contact {
  max-width: 560px;
  height: auto;
  padding-top: 40px;
}

/* ── Compact variant (success / check-email screens) ── */
.signup-modal.signup-modal--compact {
  max-width: 420px;
  height: auto;
  padding-top: 40px;
}

/* ── Success state ── */
.signup-success {
  text-align: center;
  padding: 8px 32px 32px;
}
.signup-success-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(46,168,137,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.signup-success-icon svg {
  width: 22px;
  height: 22px;
  color: var(--green);
}
.signup-success h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-title-sm);
  font-weight: 800;
  color: var(--blue);
  margin: 0 0 10px;
}
.signup-success p {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  color: var(--gray);
  line-height: 1.5;
  margin: 0 0 24px;
}

/* ── Welcome-modal lesson recommendations ── */
.signup-recs {
  margin: 0 0 24px;
}
.signup-recs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
/* Lesson-card overrides inside the welcome modal */
.signup-recs .signup-rec-card {
  position: relative;
  text-decoration: none;
  color: inherit;
  opacity: 1;
  transform: none;
  animation: none;
  max-width: 320px;
}
.signup-recs .signup-rec-card.lesson-card img {
  height: 150px;
}
.signup-recs .signup-rec-card .lesson-card-body {
  padding: 14px 16px 16px;
}
.signup-recs .signup-rec-card .lesson-card-question {
  margin-bottom: 12px;
}
.signup-recs .signup-rec-card .lesson-card-footer {
  padding-top: 10px;
}

/* ── Back button ── */
.signup-back {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  transition: color 0.15s;
}
.signup-back:hover { color: var(--dark); }

/* ── Tab bar (Sign Up / Log In toggle) ── */
.signup-tabs {
  display: flex;
  gap: 0;
  margin: 60px 32px 0;
  border-bottom: 2px solid var(--light);
}
.signup-tab {
  flex: 1;
  padding: 10px 0;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-align: center;
}
.signup-tab:hover { color: var(--dark); }
.signup-tab.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ── SSO buttons ── */
.signup-sso-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.signup-sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  font-weight: 400;
  color: #666;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.signup-sso-btn:hover {
  background: #fafafa;
  border-color: #bbb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.signup-sso-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── "or use email" divider ── */
.signup-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: var(--gray);
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: lowercase;
}
.signup-divider::before,
.signup-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ddd;
}

/* ── Email hint ── */
.signup-email-hint {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-eyebrow);
  color: var(--gray);
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Locked fields (SSO-provided, non-editable) ── */
.signup-input.signup-locked {
  background: var(--light);
  color: var(--gray);
  cursor: not-allowed;
  border-color: var(--light);
}

/* ── "Check your email" screen ── */
.signup-check-email {
  text-align: center;
  padding: 48px 32px;
}
.signup-check-email-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(234,85,80,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.signup-check-email-icon svg {
  width: 28px;
  height: 28px;
  color: var(--red);
}
.signup-check-email h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-title-sm);
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 10px;
}
.signup-check-email p {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  color: var(--gray);
  line-height: 1.5;
  margin: 0 0 8px;
}
.signup-check-email .signup-email-address {
  font-weight: 700;
  color: var(--dark);
}
.signup-code-input {
  font-family: 'Courier New', Courier, monospace;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 12px;
  text-align: center;
  width: 280px;
  max-width: 100%;
  padding: 14px 0;
  border: 2px solid #ddd;
  border-radius: 8px;
  color: var(--dark);
  background: #fff;
  box-sizing: border-box;
  display: block;
  margin: 0 auto;
  transition: border-color 0.2s;
}
.signup-code-input:focus {
  outline: none;
  border-color: var(--blue);
}
.signup-check-email .signup-submit {
  margin-top: 20px;
  margin-bottom: 24px;
}
.signup-code-links {
  margin-top: 0;
}
.signup-code-links a {
  color: var(--blue);
  text-decoration: none;
}
.signup-code-links a:hover {
  text-decoration: underline;
}

/* ── Nav auth state ── */
.nav-user-name {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-btn-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.8);
}
/* nav-signout inherits from .btn-ghost — no overrides needed */

/* ── Nav account dropdown ── */
/* ─── Avatar Trigger ──────────────────────────────────────────────────── */
.nav-account-popover-wrap {
  position: relative;
}
.nav-avatar-trigger {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
  cursor: pointer;
  padding: 0;
  background: none;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.nav-avatar-trigger:hover {
  border-color: rgba(255,255,255,0.5);
}
.nav-avatar-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-avatar-trigger span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--blue);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 0.9rem;
  line-height: 1;
}

/* ─── Popover ─────────────────────────────────────────────────────────── */
.nav-popover {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: var(--blue);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  z-index: 1000;
  overflow: hidden;
}
.nav-account-popover-wrap.open .nav-popover {
  display: block;
}

/* Popover header */
.nav-popover-header {
  padding: 18px 20px;
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.nav-popover-greeting {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}
.nav-popover-email {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Popover actions */
.nav-popover-actions {
  padding: 6px 0;
}
.nav-popover-actions a {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.nav-popover-actions a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.nav-popover-actions svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: rgba(255,255,255,0.5);
}
.nav-popover-actions a:hover svg {
  stroke: rgba(255,255,255,0.8);
}
.nav-popover-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 2px 0;
}
.nav-popover-signout {
  color: rgba(255,255,255,0.5) !important;
}
.nav-popover-signout:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.12) !important;
}
.nav-popover-signout:hover svg {
  stroke: #fff !important;
}

/* Admin variant */
.nav-account-popover-wrap.is-admin .nav-avatar-trigger span {
  background: var(--green);
}
.nav-account-popover-wrap.is-admin .nav-avatar-trigger {
  border-color: rgba(46,168,137,0.4);
}

/* --------------------------------------------------------------------------
   ADMIN STICKY FOOTER BAR  (lesson-create, faq-create)
   -------------------------------------------------------------------------- */
.admin-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 84px;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  gap: 12px;
  z-index: 99;
}
.admin-footer-cancel {
  display: inline-flex;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 22px;
  border: 2px solid rgba(255,255,255,0.25);
  background: transparent;
  color: rgba(255,255,255,0.6);
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
  height: 41px;
}
.admin-footer-cancel:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.4);
}

/* ── Toast ── */
.admin-toast {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.admin-toast.show {
  opacity: 1;
}

/* ── Footer Action Dropdown ── */
.admin-action-dropdown {
  position: relative;
  display: inline-flex;
}
.admin-action-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 20px;
  border: none;
  color: #fff;
  border-radius: 4px 0 0 4px;
  cursor: pointer;
  transition: background 0.3s, opacity 0.3s;
  white-space: nowrap;
  line-height: 1;
  height: 41px;
}
.admin-action-main svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.admin-action-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  border: none;
  color: #fff;
  border-radius: 0 4px 4px 0;
  border-left: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
  height: 41px;
}
.admin-action-caret svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}
.admin-action-dropdown.open .admin-action-caret svg {
  transform: rotate(180deg);
}
.admin-action-dropdown.open .admin-action-main {
  border-radius: 0 0 0 4px;
}
.admin-action-dropdown.open .admin-action-caret {
  border-radius: 0 0 4px 0;
}

/* Main button + caret color variants */
.admin-action-main--orange,
.admin-action-caret--orange { background: var(--orange); }
.admin-action-main--orange:hover,
.admin-action-caret--orange:hover { background: #c0764e; }
.admin-action-main--green,
.admin-action-caret--green { background: var(--green); }
.admin-action-main--green:hover,
.admin-action-caret--green:hover { background: #279a7b; }

.admin-action-main.admin-action-main--green[disabled] {
  background: #8fcdb8 !important;
  cursor: not-allowed;
  transition: background 0.3s, opacity 0.3s;
}
.admin-action-main.admin-action-main--green[disabled]:hover {
  background: #8fcdb8 !important;
}
.admin-action-main.admin-action-main--orange[disabled] {
  background: #f5b88a !important;
  cursor: not-allowed;
  transition: background 0.3s, opacity 0.3s;
}
.admin-action-main.admin-action-main--orange[disabled]:hover {
  background: #f5b88a !important;
}

/* ── Upward Menu ── */
.admin-action-menu {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  min-width: 100%;
  white-space: nowrap;
  background: var(--dark);
  border-radius: 4px 4px 0 0;
  z-index: 110;
  overflow: hidden;
}
.admin-action-dropdown.open .admin-action-menu {
  display: block;
}
.admin-action-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 20px;
  height: 41px;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: filter 0.15s;
  line-height: 1;
}
.admin-action-menu-item:hover {
  filter: brightness(0.85);
}
.admin-action-menu-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.85;
}
.admin-action-menu-item[disabled] {
  opacity: 0.4;
  pointer-events: none;
}
/* Menu item color variants */
.admin-action-menu-item--orange { background: var(--orange); }
.admin-action-menu-item--green { background: var(--green); }
.admin-action-menu-item--blue { background: var(--blue); }
.admin-action-menu-item--red { background: var(--red); }

/* ═══════════════════════════════════════════════════════════════════════════
   DELETE CONFIRMATION MODAL — Global master design
   Two variants:
     1. Click-to-confirm  → no input field, confirm button always enabled
     2. Type-to-confirm   → input field, confirm button disabled until match
   ═══════════════════════════════════════════════════════════════════════════ */

/* Backdrop */
.delete-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(38,50,56,0.65);
  padding: 24px;
}
.delete-modal-backdrop.open {
  display: flex;
}

/* Modal card */
.delete-modal {
  position: relative;
  background: #fff;
  border: 1px solid var(--red);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  padding: 56px 40px 72px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: visible;
  flex-shrink: 0;
  animation: deleteModalIn 0.2s ease;
  text-align: center;
}
@keyframes deleteModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Close button */
.delete-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--gray-lt);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.15s;
}
.delete-modal-close:hover { color: var(--dark); }

/* Icon */
.delete-modal-icon {
  position: relative;
  width: 64px;
  height: 72px;
  margin: 0 auto 20px;
}
.delete-modal-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Typography */
.delete-modal h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body);
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 8px;
  text-align: center;
}
.delete-modal p {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  color: var(--gray);
  line-height: 1.5;
  margin: 0 0 24px;
  text-align: center;
}
.delete-modal p strong {
  color: var(--red);
  font-weight: 700;
}

/* Input (type-to-confirm variant only) */
.delete-modal-input {
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-body-sm);
  color: var(--dark);
  border: 1px solid #e8e5df;
  border-radius: 6px;
  padding: 12px 16px;
  box-sizing: border-box;
  margin-bottom: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.delete-modal-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(240,73,68,0.10);
}

/* Action buttons */
.delete-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.delete-modal-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.delete-modal-btn--cancel {
  background: #f0ede8;
  color: var(--gray);
}
.delete-modal-btn--cancel:hover {
  background: #e5e2dc;
}
.delete-modal-btn--confirm {
  background: var(--red);
  color: #fff;
}
.delete-modal-btn--confirm:hover {
  background: #d32f2f;
}

/* Type-to-confirm: button starts disabled */
.delete-modal-btn--confirm.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Mobile responsive ── */
@media (max-width: 600px) {
  .delete-modal-backdrop { padding: 16px; }
  .delete-modal { padding: 40px 24px 40px; max-width: 100%; }
}


/* ── Mobile responsive ── */
@media (max-width: 600px) {
  .signup-modal-backdrop { padding: 20px 12px; }
  .signup-modal { height: auto; max-height: 90vh; }
  .signup-modal-header { padding: 20px 20px 0; }
  .signup-modal-body { padding: 18px 20px 4px; }
  .signup-modal-footer { padding: 4px 20px 20px; flex-direction: column; }
  .signup-submit { width: 100%; }
  .signup-row { flex-direction: column; gap: 0; }
  .signup-checkbox { min-width: 100%; }
  .signup-success { padding: 8px 20px 24px; }
  .signup-tabs { margin: 0 20px; }
  .signup-check-email { padding: 32px 20px; }
  .signup-recs-grid { grid-template-columns: 1fr; gap: 14px; }
  .signup-recs .signup-rec-card.lesson-card img { height: 120px; }
}
