/* ============================================================
   HOMEPAGE v7 — "The Warm Folio"
   Self-contained stylesheet. No dependency on main.css.
   Fraunces (serif) + Plus Jakarta Sans (body)
   ============================================================ */


/* ============================================================
   S1: RESET, VARIABLES, TYPOGRAPHY
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --parchment: #FAF7F2;
  --parchment-dk: #F2EBE0;
  --paper: #FFFDF9;
  --paper-warm: #FFF9F0;
  --white: #FFFFFF;
  --ink: #1C1917;
  --ink-2: #57534E;
  --ink-3: #A8A29E;
  --ink-4: #D6D3D1;
  --ink-5: #E7E5E4;
  --forest: #1B4332;
  --forest-mid: #2D6A4F;
  --forest-light: #D8F3DC;
  --forest-glow: rgba(45,106,79,.08);
  --hp-forest: #2D6A4F;
  --sienna: #C4532B;
  --sienna-dk: #A3401F;
  --sienna-lt: rgba(196,83,43,.08);
  --sienna-glow: rgba(196,83,43,.12);
  --gold: #B8860B;
  --gold-lt: rgba(184,134,11,.06);
  --gold-border: rgba(184,134,11,.25);
  --navy: #264673;
  --navy-lt: rgba(38,70,115,.08);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  --mono: var(--sans);
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 9999px;
  --sh-sm: 0 1px 3px rgba(28,25,23,.04);
  --sh-md: 0 4px 12px rgba(28,25,23,.06);
  --sh-lg: 0 12px 32px rgba(28,25,23,.08);
  --sh-xl: 0 20px 50px rgba(28,25,23,.10);
  --ease: cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Grain texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a { color: var(--forest-mid); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--sienna); }

section, .feed, .hiw, .proof, .premium, .faq, .cta, .newsletter {
  scroll-margin-top: 80px;
}


/* ============================================================
   S2: NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 56px;
  background: rgba(250,247,242,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(28,25,23,.06);
  box-shadow: 0 1px 12px rgba(28,25,23,.04);
}

.nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav__wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.nav__wordmark .g { font-weight: 600; color: var(--ink); }
.nav__wordmark .c { font-weight: 500; font-style: italic; color: var(--sienna); margin-left: 0.02em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
  padding: 0.25rem 0;
  transition: color .15s var(--ease);
}

.nav__link:hover { color: var(--ink); }

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1.5px;
  background: var(--sienna);
  transform: scaleX(0);
  transition: transform .25s var(--ease);
  transform-origin: center;
}

.nav__link:hover::after { transform: scaleX(1); }

.nav__auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1.5rem;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all .2s var(--ease);
}

.btn-ghost {
  padding: 0.4rem 1rem;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--ink-2);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
}

.btn-ghost:hover { color: var(--ink); background: rgba(28,25,23,.04); }

.btn-primary {
  padding: 0.42rem 1.2rem;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--white);
  background: var(--sienna);
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
}

.btn-primary:hover {
  background: var(--sienna-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,83,43,.2);
}


/* ============================================================
   S3: HERO
   ============================================================ */
.hero {
  position: relative;
  padding: calc(56px + 4rem) 0 3rem;
  background: linear-gradient(180deg,
    var(--parchment-dk) 0%,
    var(--parchment) 25%,
    var(--paper-warm) 65%,
    var(--white) 100%
  );
  overflow: hidden;
}

.hero__deco {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: 520px;
  height: 520px;
  pointer-events: none;
  opacity: 0.035;
}

.hero__deco svg { width: 100%; height: 100%; }

.hero__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sienna);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(140, 50, 40, 0.07);
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8c3228;
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}

.hero__title em {
  display: block;
  font-style: italic;
  color: var(--sienna);
  font-weight: 600;
}

.hero__sub {
  font-size: 1.125rem;
  color: var(--ink-2);
  max-width: 540px;
  margin: 0 auto 1.5rem;
  line-height: 1.65;
}

.hero__trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
}

.hero__trust-item svg { flex-shrink: 0; }

/* Quiz Card */
.quiz-card {
  background: var(--paper);
  border-radius: var(--r-xl);
  box-shadow: 0 12px 32px rgba(28,25,23,.08), inset 0 0 60px rgba(250,247,242,0.4);
  padding: 2.5rem 2.5rem 2rem;
  max-width: 780px;
  margin: 0 auto;
  border: 1px solid rgba(28,25,23,.03);
  position: relative;
  overflow: hidden;
}

.quiz-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--forest-mid),
    var(--sienna),
    var(--gold),
    var(--sienna),
    var(--forest-mid)
  );
  background-size: 200% 100%;
  animation: shimmer 4s ease-in-out infinite;
}

.quiz-card__header {
  text-align: center;
  margin-bottom: 2rem;
}

.quiz-card__header h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.quiz-card__header p {
  font-size: 0.9375rem;
  color: var(--ink-3);
}

.quiz-card__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quiz-type {
  background: var(--parchment);
  border: 2px solid rgba(28,25,23,0.06);
  border-radius: var(--r-lg);
  padding: 1.75rem 1.5rem;
  cursor: pointer;
  transition: all .3s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  position: relative;
}

.quiz-type:hover {
  border-color: var(--sienna);
  background: var(--paper-warm);
  box-shadow: 0 6px 20px rgba(196,83,43,.08);
  transform: translateY(-3px);
}

.quiz-type::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--sienna);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  opacity: 0;
  transition: opacity .25s var(--ease);
}

.quiz-type:hover::before { opacity: 1; }

.quiz-type__icon {
  width: 54px;
  height: 54px;
  background: var(--sienna-lt);
  color: var(--sienna);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s var(--ease);
}

.quiz-type:hover .quiz-type__icon {
  background: var(--sienna-glow);
  transform: scale(1.05);
}

.quiz-type h4 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
}

.quiz-type p {
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.4;
}

.quiz-type__details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.quiz-type__detail {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.quiz-type__detail svg { color: var(--forest-mid); flex-shrink: 0; }

.quiz-type__detail--highlight {
  color: var(--forest);
  font-weight: 600;
}

.quiz-type__arrow {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  color: var(--ink-4);
  transition: all .25s var(--ease);
}

.quiz-type:hover .quiz-type__arrow {
  color: var(--sienna);
  transform: translateX(4px);
}

/* Hero Stats */
.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
  padding: 1.75rem 2.5rem;
  background: rgba(250,247,242,.6);
  border-radius: var(--r-lg);
  border: 1px solid rgba(28,25,23,.04);
}

.hero__stat { text-align: center; }

.hero__stat-num {
  font-family: var(--serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero__stat-num--live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero__stat-lbl {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero__stat-div {
  width: 1px;
  height: 40px;
  background: var(--ink-4);
}

.hero__explore {
  margin-top: 1.75rem;
  text-align: center;
}

.hero__explore-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.75rem;
  color: var(--white);
  background: var(--forest-mid);
  border: none;
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all .2s var(--ease);
}

.hero__explore-link:hover {
  background: var(--forest-mid);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45,106,79,.2);
}

.hero__explore-link svg { transition: transform .2s var(--ease); }
.hero__explore-link:hover svg { transform: translateX(3px); }

.hero__explore-note {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}


/* ============================================================
   S4: DIVIDERS & SECTION TRANSITIONS
   ============================================================ */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 3.5rem 2rem;
}

.divider__line {
  flex: 1;
  max-width: 200px;
  height: 1.5px;
  background: var(--ink-3);
  opacity: 0.4;
}

.divider svg { opacity: 0.28; flex-shrink: 0; }

.section-transition {
  height: 48px;
  pointer-events: none;
}

.section-transition--feed-to-hiw {
  background: linear-gradient(180deg, var(--parchment) 0%, var(--white) 100%);
}

.section-transition--hiw-to-proof {
  background: linear-gradient(180deg, var(--white) 0%, var(--parchment) 100%);
}

.section-transition--proof-to-premium {
  background: linear-gradient(180deg, var(--parchment) 0%, var(--white) 100%);
}

.section-transition--premium-to-faq {
  background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment) 100%);
}

.section-transition--faq-to-cta {
  background: linear-gradient(180deg, var(--parchment) 0%, var(--white) 100%);
}

.section-transition--cta-to-newsletter {
  background: linear-gradient(180deg, var(--white) 0%, var(--forest) 100%);
}


/* ============================================================
   S5: FEED LAYOUT, SIDEBAR, FILTERS
   ============================================================ */
.feed {
  padding: 0 2rem 4rem;
  background: var(--parchment);
}

.feed__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: calc(56px + 1.5rem);
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--sh-sm);
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.sidebar__header h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.sidebar__reset {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: color .15s var(--ease);
  background: none;
  border: none;
}

.sidebar__reset:hover { color: var(--sienna); }

.filter-group {
  margin-bottom: 1rem;
}

.filter-group__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.filter-group__input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--parchment);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  color: var(--ink);
  font-family: var(--sans);
  transition: all .15s var(--ease);
}

.filter-group__input:focus {
  outline: none;
  border-color: var(--forest-mid);
  box-shadow: 0 0 0 3px var(--forest-glow);
  background: var(--white);
}

.filter-group__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pill-btn {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--parchment);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.pill-btn:hover { border-color: var(--ink-4); color: var(--ink-2); }

.pill-btn--active,
.filter-btn.active {
  background: var(--forest-mid);
  color: var(--white);
  border-color: var(--forest-mid);
  box-shadow: 0 2px 6px rgba(45,106,79,.18);
}

.filter-group__select {
  width: 100%;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  background: var(--parchment);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  color: var(--ink);
  font-family: var(--sans);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A8A29E' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

.sidebar__bookmarks {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-5);
}

.sidebar__bookmarks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar__bookmarks-header h4 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0;
}

.sidebar__bookmarks-header h4 svg { color: var(--sienna); }

.sidebar__bookmark-count {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--sienna);
  background: var(--sienna-lt);
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-full);
}

.sidebar__bookmarks-empty,
.no-bookmarks {
  font-size: 0.75rem;
  color: var(--ink-3);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.no-bookmarks p {
  margin: 0;
}

/* Bookmark items in sidebar */
.bookmark-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--ink-5);
  cursor: pointer;
  transition: background .1s var(--ease);
}

.bookmark-item:last-child {
  border-bottom: none;
}

.bookmark-item:hover {
  background: var(--parchment);
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: var(--r-sm);
}

.bookmark-info {
  flex: 1;
  min-width: 0;
}

.bookmark-info h5 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bookmark-info p {
  font-size: 0.6875rem;
  color: var(--forest-mid);
  font-weight: 500;
  margin: 0.1rem 0 0;
}

.bookmark-remove {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--ink-4);
  cursor: pointer;
  border-radius: var(--r-full);
  transition: all .15s var(--ease);
  flex-shrink: 0;
  padding: 0;
}

.bookmark-remove:hover {
  background: rgba(220,38,38,.06);
  color: #dc2626;
}

.bookmark-remove i,
.bookmark-remove svg {
  width: 14px;
  height: 14px;
}

.bookmarks-list {
  margin-top: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}

/* Results main */
.results {
  min-width: 0;
}

.results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.results__header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.results__count {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-top: 0.15rem;
}

.results__sort {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.results__sort label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
}

.results__sort select {
  padding: 0.35rem 2rem 0.35rem 0.6rem;
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  color: var(--ink);
  font-family: var(--sans);
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A8A29E' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}


/* ============================================================
   S6: MOCKUP CARD / TAG BASE STYLES (reference/fallback)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all .25s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  background: var(--sienna);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transform: scaleY(0);
  transition: all .25s var(--ease);
  transform-origin: center;
}

.card:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.card:hover {
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(28,25,23,.08), 0 0 0 1px rgba(28,25,23,.05);
  transform: translateY(-2px);
  border-color: rgba(196,83,43,0.12);
}

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__amount {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--forest-mid);
  letter-spacing: -0.01em;
}

.card__deadline {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-3);
  padding: 0.15rem 0.5rem;
  background: var(--parchment);
  border-radius: var(--r-full);
}

.card__deadline--urgent {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  color: #dc2626;
  background: rgba(220,38,38,.07);
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-full);
  letter-spacing: 0.01em;
}

.card__title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.card__title {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.card__org {
  font-size: 0.75rem;
  color: var(--ink-3);
  padding-left: 1rem;
}

.card__tip {
  font-size: 0.8125rem;
  color: var(--ink-2);
  line-height: 1.5;
  padding: 0.6rem 0.75rem;
  background: var(--gold-lt);
  border-left: 2px solid var(--gold-border);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.tag {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-full);
}

.tag--grant { background: rgba(45,106,79,.08); color: var(--forest-mid); }
.tag--federal { background: rgba(38,70,115,.08); color: #264673; }
.tag--tax-credit { background: rgba(38,70,115,.08); color: #264673; }
.tag--industry { background: var(--parchment); color: var(--ink-3); }
.tag--level { background: var(--parchment); color: var(--ink-2); }

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ink-5);
  margin-top: 0.25rem;
}

.card__details {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--forest-mid);
}

.card:hover .card__details { color: var(--sienna); text-decoration: underline; text-underline-offset: 3px; }

.card__save {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: var(--r-full);
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.card__save:hover {
  background: var(--sienna-lt);
  color: var(--sienna);
}

/* Premium blur card */
.card--premium {
  position: relative;
  min-height: 200px;
}

.card--premium .card__blur {
  filter: blur(4px);
  opacity: 0.5;
  pointer-events: none;
}

.card__premium-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255,253,249,.7);
  border-radius: var(--r-lg);
  z-index: 2;
  text-align: center;
  padding: 1.5rem;
}

.card__premium-overlay svg { color: var(--forest-mid); }
.card__premium-overlay strong { font-size: 0.9375rem; color: var(--ink); }
.card__premium-overlay span { font-size: 0.8125rem; color: var(--ink-2); }

.card__premium-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.5rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(45,106,79,0.2);
  margin-top: 0.25rem;
  transition: all .15s var(--ease);
}

.card__premium-cta:hover {
  background: var(--forest);
  color: var(--white);
  transform: translateY(-1px);
}

/* Pagination (mockup version) */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-5);
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.pagination__btn:hover { border-color: var(--forest-mid); color: var(--forest-mid); }
.pagination__btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination__info {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-3);
}


/* ============================================================
   S7: HOW IT WORKS
   ============================================================ */
.hiw {
  padding: 4.5rem 2rem;
  background: var(--white);
}

.hiw__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.section-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sienna);
  background: rgba(140, 50, 40, 0.06);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.hiw__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hiw__sub {
  font-size: 1rem;
  color: var(--ink-3);
  margin-bottom: 3.5rem;
}

.hiw__steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.hiw__step { text-align: center; padding: 1rem; }

.hiw__step-num {
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
  background: var(--sienna-lt);
  color: var(--sienna);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
}

.hiw__step-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest-mid);
}

.hiw__step h3 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: 0;
}

.hiw__step p {
  font-size: 0.875rem;
  color: var(--ink-3);
  line-height: 1.55;
}

.hiw__arrow {
  width: 28px;
  color: var(--ink-4);
}

.hiw__arrow svg { width: 100%; height: auto; }

.hiw__cta { margin-top: 2.5rem; }

.hiw__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2.25rem;
  background: var(--sienna);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.hiw__cta-btn:hover {
  background: var(--sienna-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,83,43,.2);
}

.hiw__cta-note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}


/* ============================================================
   S8: TESTIMONIALS
   ============================================================ */
.proof {
  padding: 4.5rem 2rem;
  background: var(--parchment);
}

.proof__inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.proof__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 2.5rem;
}

.proof__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: left;
}

.proof__card {
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all .25s var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(28,25,23,.04);
}

.proof__card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

.proof__card:nth-child(1) { border-left: 3px solid var(--sienna); }
.proof__card:nth-child(2) { border-left: 3px solid var(--forest-mid); }
.proof__card:nth-child(3) { border-left: 3px solid var(--gold); }

.proof__stars {
  color: var(--gold);
  font-size: 1.125rem;
  letter-spacing: 3px;
}

.proof__quote {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.7;
  flex: 1;
  font-style: italic;
  position: relative;
  padding-left: 1.5rem;
}

.proof__quote::before {
  content: '\201C';
  position: absolute;
  top: -0.15rem;
  left: -0.1rem;
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.2;
  line-height: 1;
}

.proof__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ink-5);
}

.proof__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.proof__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  font-style: normal;
}

.proof__role {
  font-size: 0.75rem;
  color: var(--ink-3);
  display: block;
}


/* ============================================================
   S9: PREMIUM
   ============================================================ */
.premium {
  padding: 4.5rem 2rem;
  background: linear-gradient(180deg, var(--white) 0%, var(--parchment) 100%);
  border-top: 1px solid var(--ink-5);
  position: relative;
  overflow: hidden;
}

.premium::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(45,106,79,.04) 0%, transparent 70%);
  pointer-events: none;
}

.premium__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.premium__badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest-mid);
  background: var(--forest-glow);
  padding: 0.35rem 1rem;
  border-radius: var(--r-full);
  margin-bottom: 1rem;
}

.premium__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.premium__sub {
  font-size: 1.0625rem;
  color: var(--ink-2);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.premium__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.premium__card {
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all .25s var(--ease);
}

.premium__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}

.premium__card--hero {
  border-left: 3px solid var(--forest-mid);
  background: linear-gradient(180deg, rgba(45,106,79,.03) 0%, var(--white) 100%);
  box-shadow: 0 2px 12px rgba(45,106,79,.06);
}

.premium__card--hero:hover {
  box-shadow: 0 8px 24px rgba(45,106,79,.1);
}

.premium__card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium__card-icon--roadmap { background: var(--sienna-lt); color: var(--sienna); }
.premium__card-icon--draft { background: var(--forest-glow); color: var(--forest-mid); }
.premium__card-icon--scores { background: var(--gold-lt); color: var(--gold); }
.premium__card-icon--tips { background: var(--navy-lt); color: var(--navy); }

.premium__card h3 {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: 0;
}

.premium__card p {
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.5;
}

.premium__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 2rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 1rem;
  font-weight: 600;
  transition: all .15s var(--ease);
}

.premium__cta:hover {
  background: var(--forest);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,67,50,.2);
}

.premium__fine {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-top: 0.75rem;
}


/* ============================================================
   S10: FAQ
   ============================================================ */
.faq {
  padding: 4.5rem 2rem;
  background: var(--parchment);
}

.faq__inner {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
}

.faq__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.faq__sub {
  font-size: 1rem;
  color: var(--ink-3);
  margin-bottom: 2.5rem;
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.faq__item {
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow .25s var(--ease);
}

.faq__item[open] { box-shadow: var(--sh-sm); }

.faq__item summary {
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color .15s var(--ease);
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--ink-3);
  flex-shrink: 0;
}

.faq__item[open] summary::after {
  content: '\2212';
  color: var(--sienna);
}

.faq__item summary:hover { color: var(--sienna); }

.faq__answer {
  padding: 0 1.5rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.65;
}


/* ============================================================
   S11: FINAL CTA
   ============================================================ */
.cta {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, var(--white) 0%, var(--paper-warm) 40%, var(--parchment) 100%);
  text-align: center;
  border-top: 1px solid var(--ink-5);
  position: relative;
  overflow: hidden;
}

.cta__deco {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.035;
  pointer-events: none;
}

.cta__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.cta__sub {
  font-size: 1rem;
  color: var(--ink-3);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.cta__primary {
  padding: 0.9rem 2.5rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 1.0625rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
  box-shadow: 0 4px 12px rgba(27,67,50,.15);
  font-family: var(--sans);
}

.cta__primary:hover {
  background: var(--forest);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27,67,50,.25);
}

.cta__secondary {
  padding: 0.75rem 2rem;
  color: var(--ink-2);
  border: 1.5px solid var(--ink-5);
  border-radius: var(--r-full);
  font-size: 1rem;
  font-weight: 600;
  transition: all .15s var(--ease);
  font-family: var(--sans);
  background: transparent;
  cursor: pointer;
}

.cta__secondary:hover { border-color: var(--ink-4); color: var(--ink); }


/* ============================================================
   S12: NEWSLETTER
   ============================================================ */
.newsletter {
  padding: 6rem 2rem;
  background: var(--forest);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 24px 24px;
}

.newsletter__inner {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.newsletter__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.newsletter__sub {
  font-size: 1rem;
  opacity: 0.75;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.newsletter__form {
  display: flex;
  gap: 0.5rem;
  max-width: 460px;
  margin: 0 auto;
}

.newsletter__input {
  flex: 1;
  padding: 0.85rem 1.15rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-full);
  color: var(--white);
  font-size: 1rem;
  font-family: var(--sans);
}

.newsletter__input::placeholder { color: rgba(255,255,255,.5); }

.newsletter__btn {
  padding: 0.85rem 1.75rem;
  background: var(--sienna);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.newsletter__btn:hover {
  background: var(--sienna-dk);
  transform: translateY(-1px);
}

.newsletter__trust {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  opacity: 0.45;
  letter-spacing: 0.01em;
}


/* ============================================================
   S13: FOOTER
   ============================================================ */
.footer {
  padding: 3rem 2rem 2rem;
  background: var(--forest);
  color: rgba(255,255,255,.7);
}

.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
}

.footer__brand { max-width: 320px; }

.footer__brand-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.footer__brand-name {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--white);
}

.footer__brand-name .g { font-weight: 600; }
.footer__brand-name .c { font-weight: 500; font-style: italic; color: var(--sienna); margin-left: 0.02em; }

.footer__brand p {
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.footer__col h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer__col a {
  display: block;
  font-size: 0.8125rem;
  color: rgba(255,255,255,.6);
  padding: 0.2rem 0;
  transition: color .15s var(--ease);
}

.footer__col a:hover { color: var(--white); }

.footer__bottom {
  grid-column: 1 / -1;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 1rem;
}

.footer__bottom p {
  font-size: 0.75rem;
  opacity: 0.5;
  line-height: 1.6;
}

.footer__bottom a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ============================================================
   S14: RESPONSIVE (mockup breakpoints)
   ============================================================ */
@media (max-width: 1024px) {
  .feed__inner { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .premium__grid { grid-template-columns: repeat(2, 1fr); }
  .hiw__steps { grid-template-columns: 1fr; gap: 1rem; }
  .hiw__arrow { display: none; }
  .proof__grid { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  .hero { padding: calc(56px + 2.5rem) 0 2rem; }
  .hero__title { font-size: clamp(1.75rem, 7vw, 2.5rem); }
  .hero__trust { flex-direction: column; gap: 0.5rem; }
  .quiz-card { padding: 1.5rem 1.25rem 1.25rem; }
  .quiz-card__options { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }

  /* Mobile filter collapse */
  .sidebar {
    position: relative;
    top: auto;
    border: none;
    padding: 0;
    background: var(--parchment);
    box-shadow: none;
    overflow: hidden;
    z-index: 2;
  }

  .sidebar__header {
    background: var(--white);
    border: 1px solid var(--ink-5);
    border-radius: var(--r-lg);
    padding: 0.85rem 1.25rem;
    margin-bottom: 0;
    cursor: pointer;
  }

  .sidebar__header h3::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--ink-3);
    border-bottom: 2px solid var(--ink-3);
    transform: rotate(45deg);
    margin-left: 0.5rem;
    transition: transform .2s var(--ease);
    vertical-align: 1px;
  }

  .sidebar.sidebar--open .sidebar__header h3::after {
    transform: rotate(-135deg);
  }

  .sidebar__filters {
    display: none;
    background: var(--white);
    border: 1px solid var(--ink-5);
    border-radius: var(--r-lg);
    padding: 1rem 1.25rem;
    margin-top: 0.5rem;
  }

  .sidebar.sidebar--open .sidebar__filters {
    display: block;
  }

  .sidebar__bookmarks {
    display: none;
  }

  .sidebar.sidebar--open .sidebar__bookmarks {
    display: block;
  }

  .sidebar.sidebar--open {
    overflow: visible;
  }

  .results__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .results__header h2 {
    font-size: 1.125rem;
  }

  /* Mobile touch target improvements (44px min) */
  .hp-card__bookmark {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  .hp-card__hide {
    min-width: 44px;
    min-height: 44px;
    opacity: 0.5; /* always visible on mobile (no hover) */
  }

  .nav__hamburger,
  .mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .results__sort select {
    min-height: 44px;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
  }

  .pagination__btn {
    min-height: 44px;
    padding: 0.6rem 1.25rem;
  }

  /* Modal header: flex-shrink:0 already keeps it visible.
     Removed position:sticky — causes iOS Safari rendering glitch
     where sticky + overflow:hidden on parent makes header disappear. */
  .modal-header {
    flex-shrink: 0;
    background: var(--paper);
  }

  /* Trim hero subtitle on mobile */
  .hero__sub {
    font-size: 1rem;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .proof__grid { grid-template-columns: 1fr; }
  .premium__grid { grid-template-columns: 1fr; }
  .newsletter__form { flex-direction: column; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__stats {
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
  }
  .hero__stat-num { font-size: 1.5rem; }
  .section-transition { height: 32px; }
  .cta { padding: 5rem 2rem; }
  .cta__deco { display: none; }
}

@media (max-width: 480px) {
  .hero__inner { padding: 0 1rem; }
  .quiz-card { padding: 1rem; }
  .hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1rem; }
  .hero__stat-div { display: none; }
}


/* ============================================================
   S15: MOBILE STICKY CTA
   ============================================================ */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: var(--forest-mid);
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(28,25,23,.12);
}

.mobile-sticky-cta button {
  width: 100%; height: 100%;
  color: var(--white);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  background: none; border: none; cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-sticky-cta { display: flex; align-items: center; justify-content: center; }
  body { padding-bottom: 56px; }
  .pill-btn { min-height: 40px; padding: 0.5rem 0.85rem; }
}


/* ============================================================
   S16: GRANT CARDS (hp-card) — JS-rendered cards
   ============================================================ */

/* Container: the grant list uses #grantsList / .grants-list */
.grants-list,
#grantsList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.hp-card {
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all .25s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.hp-card::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  background: var(--sienna);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transform: scaleY(0);
  transition: all .25s var(--ease);
  transform-origin: center;
}

.hp-card:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.hp-card:hover {
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(28,25,23,.08), 0 0 0 1px rgba(28,25,23,.05);
  transform: translateY(-2px);
  border-color: rgba(196,83,43,0.12);
}

.hp-card--closed {
  opacity: 0.55;
  background: var(--parchment);
}

.hp-card--closed:hover {
  opacity: 0.7;
  background: var(--parchment-dk);
}

.hp-card--premium-blur {
  position: relative;
  min-height: 200px;
}

.hp-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hp-card__amount {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--forest-mid);
  letter-spacing: -0.01em;
  margin-top: 0.3rem;
  padding-left: 1.05rem;
}

.hp-card__deadline {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-3);
  padding: 0.15rem 0.5rem;
  background: var(--parchment);
  border-radius: var(--r-full);
}

.hp-card__deadline--urgent {
  color: #dc2626;
  background: rgba(220,38,38,.07);
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hp-card__deadline--closed {
  color: var(--ink-3);
  background: var(--ink-5);
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-full);
  font-size: 0.6875rem;
  font-weight: 600;
}

/* Card header: title row + deadline badge */
.hp-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.hp-card__title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.hp-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.hp-card__title {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.hp-card__org {
  font-size: 0.75rem;
  color: var(--ink-3);
  padding-left: 1.05rem;
  margin-top: 0.15rem;
}

.hp-card__tip {
  font-size: 0.8125rem;
  color: var(--ink-2);
  line-height: 1.5;
  padding: 0.6rem 0.75rem;
  background: var(--gold-lt);
  border-left: 2px solid var(--gold-border);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.hp-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.hp-card__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--ink-5);
  margin-top: 0.35rem;
}

.hp-card__details-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--forest-mid);
  cursor: pointer;
  transition: color .15s var(--ease);
  background: none;
  border: none;
  font-family: var(--sans);
  margin-right: auto;
}

.hp-card:hover .hp-card__details-link {
  color: var(--sienna);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hp-card__bookmark {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: var(--r-full);
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.hp-card__bookmark:hover {
  background: var(--sienna-lt);
  color: var(--sienna);
}

.hp-card__bookmark--active {
  color: var(--sienna);
  background: var(--sienna-lt);
}

.hp-card__bookmark--active:hover {
  background: var(--sienna-glow);
}

/* ── Hide grant button (in actions row) ── */
.hp-card__hide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: var(--ink-4);
  cursor: pointer;
  border-radius: var(--r-full);
  transition: all .15s var(--ease);
  opacity: 0;
  padding: 0;
  flex-shrink: 0;
}

.hp-card:hover .hp-card__hide {
  opacity: 0.7;
}

.hp-card__hide:hover {
  opacity: 1;
  background: rgba(28,25,23,.06);
  color: var(--ink-2);
}

.hp-card__hide + .hp-card__bookmark {
  margin-left: 0.25rem;
}

.hp-card__hide svg {
  width: 13px;
  height: 13px;
}

/* ── Card meta row (amount + deadline) ── */
.hp-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.hp-card__meta-sep {
  color: var(--ink-4);
  font-size: 0.75rem;
}

/* ── Inline hidden confirmation overlay ── */
.hp-card__hidden-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--parchment);
  border-radius: var(--r-lg);
  z-index: 3;
  color: var(--ink-3);
  animation: fadeIn .2s var(--ease);
}

.hp-card__hidden-overlay svg {
  width: 20px;
  height: 20px;
  opacity: 0.4;
}

.hp-card__hidden-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
}

.hp-card__undo {
  background: none;
  border: none;
  color: var(--forest-mid);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-full);
  transition: all .15s var(--ease);
  font-family: var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hp-card__undo:hover {
  color: var(--sienna);
  background: var(--sienna-lt);
  text-decoration: none;
}

/* Premium blur content inside card */
.hp-card__blur-content {
  filter: blur(4px);
  opacity: 0.5;
  pointer-events: none;
}

.hp-card__premium-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255,253,249,.7);
  border-radius: var(--r-lg);
  z-index: 2;
  text-align: center;
  padding: 1.5rem;
}

.hp-card__premium-overlay svg { color: var(--forest-mid); }
.hp-card__premium-overlay strong { font-size: 0.9375rem; color: var(--ink); }
.hp-card__premium-overlay span { font-size: 0.8125rem; color: var(--ink-2); }

.hp-card__premium-overlay a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.5rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(45,106,79,0.2);
  margin-top: 0.25rem;
  transition: all .15s var(--ease);
}

.hp-card__premium-overlay a:hover {
  background: var(--forest);
  color: var(--white);
  transform: translateY(-1px);
}


/* ============================================================
   S17: GRANT PILLS (hp-pill) — JS-rendered pills/tags
   ============================================================ */
.hp-pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-full);
  white-space: nowrap;
  font-family: var(--sans);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-pill--grant { background: rgba(45,106,79,.08); color: var(--forest-mid); }
.hp-pill--tax-credit { background: rgba(38,70,115,.08); color: var(--navy); }
.hp-pill--award { background: var(--gold-lt); color: var(--gold); border: 1px solid var(--gold-border); }
.hp-pill--program { background: var(--parchment); color: var(--ink-2); }
.hp-pill--loan { background: var(--parchment); color: var(--ink-2); }
.hp-pill--forgivable-loan { background: var(--parchment); color: var(--ink-2); }
.hp-pill--level { background: var(--parchment); color: var(--ink-2); }
.hp-pill--industry { background: var(--parchment); color: var(--ink-3); }
.hp-pill--federal { background: rgba(38,70,115,.08); color: var(--navy); }
.hp-pill--provincial { background: rgba(45,106,79,.08); color: var(--forest-mid); }
.hp-pill--municipal { background: var(--sienna-lt); color: var(--sienna); }
.hp-pill--private { background: var(--gold-lt); color: var(--gold); }


/* ============================================================
   S18: GRANT DETAIL MODAL (hp-modal)
   ============================================================ */
.hp-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(28,25,23,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hp-modal-overlay.active {
  display: flex;
}

.hp-modal {
  background: var(--white);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: modalSlideUp .25s var(--ease);
}

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

.hp-modal__header {
  padding: 1.75rem 2rem 1.25rem;
  border-bottom: 1px solid var(--ink-5);
  flex-shrink: 0;
}

.hp-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--parchment);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  transition: all .15s var(--ease);
  z-index: 1;
}

.hp-modal__close:hover {
  background: var(--ink-5);
  color: var(--ink);
}

.hp-modal__amount {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--forest-mid);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.hp-modal__approval-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.hp-modal__approval-badge svg {
  color: var(--ink-3);
}

.hp-modal__approval-badge .dots {
  display: flex;
  gap: 3px;
}

.hp-modal__approval-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-4);
}

.hp-modal__approval-badge .dot--filled {
  background: var(--forest-mid);
}

.hp-modal__title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 0.35rem;
  padding-right: 2.5rem;
}

.hp-modal__org {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.hp-modal__body {
  padding: 1.5rem 2rem;
  overflow-y: auto;
  flex: 1;
}

.hp-modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.hp-modal__section {
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--ink-5);
}

.hp-modal__section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.hp-modal__section-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  margin-bottom: 0.6rem;
}

.hp-modal__desc {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.7;
}

.hp-modal__tip {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.65;
  padding: 1rem 1.25rem;
  background: var(--gold-lt);
  border-left: 3px solid var(--gold-border);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.hp-modal__tip-section {
  margin-top: 1.25rem;
}

.hp-modal__elig {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hp-modal__elig-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.hp-modal__elig-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--forest-mid);
  margin-top: 1px;
}

.hp-modal__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.hp-modal__grid-item {
  background: var(--parchment);
  border-radius: var(--r-md);
  padding: 1rem;
  text-align: center;
  position: relative;
}

.hp-modal__grid-item--premium {
  position: relative;
}

.hp-modal__grid-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 0.35rem;
}

.hp-modal__grid-value {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.hp-modal__premium-blur {
  filter: blur(4px);
  opacity: 0.5;
  user-select: none;
}

.hp-modal__lock-icon {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  color: var(--ink-4);
  width: 14px;
  height: 14px;
}

.hp-modal__premium-gate {
  background: linear-gradient(180deg, rgba(45,106,79,.04) 0%, var(--parchment) 100%);
  border: 1px solid var(--forest-glow);
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: center;
  margin-top: 1.5rem;
}

.hp-modal__premium-gate p {
  font-size: 0.9375rem;
  color: var(--ink-2);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.hp-modal__premium-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 2rem;
  background: var(--hp-forest);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.hp-modal__premium-cta:hover {
  background: var(--forest);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,67,50,.2);
}

.hp-modal__premium-fine {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-top: 0.5rem;
}

.hp-modal__footer {
  padding: 1rem 2rem;
  border-top: 1px solid var(--ink-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  background: var(--white);
}

.hp-modal__bookmark {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: 1.5px solid var(--ink-5);
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.hp-modal__bookmark:hover {
  border-color: var(--sienna);
  color: var(--sienna);
  background: var(--sienna-lt);
}

.hp-modal__bookmark.bookmarked {
  border-color: var(--sienna);
  color: var(--sienna);
  background: var(--sienna-lt);
}

.hp-modal__apply {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.75rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
  text-decoration: none;
  font-family: var(--sans);
}

.hp-modal__apply:hover {
  background: var(--forest);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,67,50,.2);
}


/* ============================================================
   S18b: PRODUCTION MODAL CLASSES (grant detail modal uses these)
   The grant detail modal HTML uses production class names, not hp-modal.
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(28,25,23,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
  animation: modalFadeIn .25s var(--ease);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.modal-content {
  background: var(--paper);
  border-radius: var(--r-xl);
  max-width: 680px;
  width: 100%;
  max-height: 78vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-xl), 0 0 0 1px rgba(28,25,23,.04);
  animation: modalSlideUp .3s var(--ease);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 1.75rem 1rem;
  border-bottom: 1px solid var(--ink-5);
  background: var(--paper);
  flex-shrink: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.modal-header h3 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  padding-right: 2rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0.5rem;
  transition: all .15s var(--ease);
  border-radius: var(--r-md);
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--parchment);
  color: var(--ink);
}

.modal-close svg, .modal-close i {
  width: 20px;
  height: 20px;
  display: block;
}

.modal-body {
  padding: 1.25rem 1.75rem 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

.modal-grant-info {
  margin-bottom: 1.5rem;
}

.modal-amount {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--forest-mid);
  margin-bottom: 0;
  letter-spacing: -0.01em;
}

.modal-organization {
  font-size: 0.9375rem;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.modal-description {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 1.5rem;
}

/* Insider tip in modal */
#modalTipSection {
  margin-bottom: 1.5rem;
}

#modalTipSection h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  margin-bottom: 0.5rem;
}

#modalInsiderTip {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.65;
  padding: 0.75rem 1rem;
  background: var(--gold-lt);
  border-left: 2.5px solid var(--gold-border);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.modal-details {
  background: var(--parchment);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--ink-5);
}

.detail-section {
  margin-bottom: 1.25rem;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  margin-bottom: 0.75rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.75rem;
  background: var(--white);
  border-radius: var(--r-md);
  border: 1px solid var(--ink-5);
}

.detail-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-item span:last-child {
  font-size: 0.8125rem;
  color: var(--ink);
  font-weight: 500;
}

/* Premium blur in modal */
.hp-modal__premium-blur {
  filter: blur(5px);
  opacity: 0.5;
  user-select: none;
}

.hp-modal__grid-item--premium {
  position: relative;
}

.hp-modal__elig-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.5;
  padding: 0.3rem 0;
}

.hp-modal__elig-check {
  color: var(--forest-mid);
  font-weight: 700;
  flex-shrink: 0;
}

/* Premium gate in modal */
#modalPremiumGate {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(45,106,79,.04) 0%, var(--parchment) 100%);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  margin-bottom: 1.5rem;
}

#modalPremiumGate p {
  font-size: 0.9375rem;
  color: var(--ink-2);
  margin-bottom: 0.5rem;
}

#modalPremiumGate a {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.5rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all .15s var(--ease);
}

#modalPremiumGate a:hover {
  background: var(--forest);
  color: var(--white);
  transform: translateY(-1px);
}

/* Modal actions (sticky bottom bar) */
.modal-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--ink-5);
  background: var(--paper);
  flex-shrink: 0;
}

.modal-actions .bookmark-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  background: var(--parchment);
  color: var(--ink-2);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.modal-actions .bookmark-btn:hover {
  background: var(--sienna-lt);
  color: var(--sienna);
  border-color: rgba(196,83,43,.2);
}

.modal-actions .bookmark-btn.bookmarked {
  background: var(--sienna-lt);
  color: var(--sienna);
  border-color: rgba(196,83,43,.2);
}

.modal-actions .bookmark-btn svg,
.modal-actions .bookmark-btn i {
  width: 16px;
  height: 16px;
}

.modal-actions .apply-btn {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.modal-actions .apply-btn:hover {
  background: var(--forest);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,67,50,.2);
}

.modal-actions .apply-btn svg,
.modal-actions .apply-btn i {
  width: 16px;
  height: 16px;
}

/* Auth modal overrides */
.auth-modal {
  display: flex;
  flex-direction: row;
  max-width: 780px;
  overflow: hidden;
}

.auth-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.auth-modal-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--forest);
  color: var(--white);
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-sidebar-content { display: flex; flex-direction: column; gap: 1.25rem; }

.auth-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--white);
}

.auth-sidebar-heading,
#authSidebarHeading {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.25;
}

.auth-sidebar-sub {
  font-size: 0.875rem;
  opacity: 0.8;
  line-height: 1.55;
}

.auth-sidebar-features {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  opacity: 0.9;
}

.auth-feature i, .auth-feature svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.auth-sidebar-trust {
  font-size: 0.75rem;
  opacity: 0.6;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
}

.auth-modal-form {
  flex: 1;
  padding: 2.5rem 2rem;
  overflow-y: auto;
}

.auth-form-header {
  margin-bottom: 1.5rem;
}

.auth-form-header h2,
#authFormTitle {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.auth-form-header p,
#authFormSubtitle {
  font-size: 0.875rem;
  color: var(--ink-3);
}

.auth-method-btn.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--white);
  border: 1.5px solid var(--ink-5);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.auth-method-btn.google-btn:hover {
  border-color: var(--ink-4);
  box-shadow: var(--sh-sm);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--ink-4);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ink-5);
}

.email-form .form-group {
  margin-bottom: 1rem;
}

.email-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.35rem;
}

.email-form input[type="email"],
.email-form input[type="password"],
.email-form input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--parchment);
  border: 1.5px solid var(--ink-5);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  color: var(--ink);
  font-family: var(--sans);
  transition: all .15s var(--ease);
}

.email-form input:focus {
  outline: none;
  border-color: var(--forest-mid);
  box-shadow: 0 0 0 3px var(--forest-glow);
  background: var(--white);
}

.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0.25rem;
}

.password-toggle i, .password-toggle svg {
  width: 18px;
  height: 18px;
}

.submit-btn {
  width: 100%;
  padding: 0.7rem;
  background: var(--forest-mid);
  color: var(--white);
  border: none;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
  margin-top: 0.5rem;
}

.submit-btn:hover {
  background: var(--forest);
  transform: translateY(-1px);
}

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.auth-footer .link-btn {
  background: none;
  border: none;
  color: var(--forest-mid);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--sans);
}

.auth-footer .link-btn:hover {
  color: var(--sienna);
  text-decoration: underline;
}

/* Modal responsive */
@media (max-width: 768px) {
  .modal { padding: 1rem; }
  .modal-content { max-height: 92vh; }
  .modal-header { padding: 1.25rem 1.5rem 1rem; }
  .modal-body { padding: 1.25rem 1.5rem 1.5rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column; }

  .auth-modal { flex-direction: column; }
  .auth-modal-sidebar { width: 100%; padding: 1.5rem; }
  .auth-modal-form { padding: 1.5rem; }
}


/* ============================================================
   S19: QUIZ FUNCTIONAL ELEMENTS
   ============================================================ */

/* Quiz mode selection */
.quiz-selection-container {
  display: none;
}

.quiz-selection-container.active {
  display: block;
}

.finder-header {
  text-align: center;
  margin-bottom: 2rem;
  width: 100%;
}

.finder-header h3 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.finder-header p {
  font-size: 0.9375rem;
  color: var(--ink-3);
  line-height: 1.5;
}

.quiz-options-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quiz-type-option {
  background: var(--parchment);
  border: 2px solid rgba(28,25,23,0.06);
  border-radius: var(--r-lg);
  padding: 1.75rem 1.5rem;
  cursor: pointer;
  transition: all .3s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.quiz-type-option:hover {
  border-color: var(--sienna);
  background: var(--paper-warm);
  box-shadow: 0 6px 20px rgba(196,83,43,.08);
  transform: translateY(-3px);
}

.quiz-type-option::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--sienna);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  opacity: 0;
  transition: opacity .25s var(--ease);
}

.quiz-type-option:hover::before { opacity: 1; }

.quiz-type-icon {
  width: 54px;
  height: 54px;
  background: var(--sienna-lt);
  color: var(--sienna);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s var(--ease);
}

.quiz-type-option:hover .quiz-type-icon {
  background: var(--sienna-glow);
  transform: scale(1.05);
}

.quiz-type-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.quiz-type-content h4 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
}

.quiz-type-content p {
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.4;
}

.quiz-type-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.quiz-detail {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  padding-left: 1.1rem;
}

.quiz-detail::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--forest-mid);
  font-weight: 700;
  font-size: 0.7rem;
}

.quiz-detail svg { color: var(--forest-mid); flex-shrink: 0; }

.quiz-type-arrow {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  color: var(--ink-4);
  transition: all .25s var(--ease);
}

.quiz-type-option:hover .quiz-type-arrow {
  color: var(--sienna);
  transform: translateX(4px);
}

/* Quiz steps */
.quiz-container {
  display: none;
}

.quiz-container.active {
  display: block !important;
}

/* Ensure precision quiz stacks header above content */
.quiz-container.advanced-quiz .finder-header {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}

.quiz-step {
  display: none;
}

.quiz-step.active {
  display: block;
  animation: fadeIn .3s var(--ease);
}

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

.quiz-step h3 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  margin-bottom: 0.5rem;
}

.quiz-step p {
  font-size: 0.9375rem;
  color: var(--ink-3);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Quiz question label */
.quiz-label {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.25rem;
  text-align: center;
  line-height: 1.3;
}

.multi-select-hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-3);
  text-align: center;
  margin-top: -0.75rem;
  margin-bottom: 1rem;
}

/* Back to quiz selection */
.back-to-selection-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-full);
  transition: all .15s var(--ease);
  font-family: var(--sans);
  margin-bottom: 1rem;
}

.back-to-selection-btn:hover {
  color: var(--sienna);
  background: var(--sienna-lt);
}

.back-to-selection-btn i,
.back-to-selection-btn svg {
  width: 14px;
  height: 14px;
}

/* Quiz options — default 2-column compact grid */
.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.quiz-options[data-multi="true"] {
  grid-template-columns: repeat(2, 1fr);
}

/* Quiz option — horizontal card with text left */
.quiz-option {
  background: var(--white);
  border: 1.5px solid var(--ink-5);
  border-radius: var(--r-md);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: all .15s var(--ease);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  position: relative;
  text-align: left;
  min-height: auto;
}

.quiz-option:hover {
  border-color: rgba(196,83,43,.35);
  background: var(--paper-warm);
  box-shadow: 0 2px 8px rgba(196,83,43,.06);
}

.quiz-option.selected {
  border-color: var(--sienna);
  background: var(--sienna-lt);
}

/* Selected checkmark */
.quiz-option.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  background: var(--sienna);
  color: var(--white);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

/* Option icon — small, inline */
.quiz-option .option-icon,
.option-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  border-radius: var(--r-sm);
  background: var(--parchment);
  flex-shrink: 0;
  transition: all .15s var(--ease);
}

.quiz-option .option-icon i,
.quiz-option .option-icon svg {
  width: 18px;
  height: 18px;
}

.quiz-option.selected .option-icon {
  color: var(--sienna);
  background: var(--sienna-glow);
}

.quiz-option:hover .option-icon {
  color: var(--sienna);
  background: var(--sienna-lt);
}

/* Option content */
.option-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-right: 20px;
  min-width: 0;
}

.option-title {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.option-desc {
  font-size: 0.6875rem;
  color: var(--ink-3);
  line-height: 1.3;
}

/* Compact grid — 3 columns for province/industry (hides descriptions) */
.quiz-options.compact-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.quiz-options.compact-grid .quiz-option {
  padding: 0.55rem 0.75rem;
  justify-content: center;
  text-align: center;
  min-height: 44px;
}

.quiz-options.compact-grid .option-icon {
  display: none;
}

.quiz-options.compact-grid .option-content {
  padding-right: 0;
  align-items: center;
}

.quiz-options.compact-grid.multi-select .option-content {
  padding-right: 18px;
}

.quiz-options.compact-grid .option-desc {
  display: none;
}

.quiz-options.compact-grid .option-title {
  white-space: normal;
  line-height: 1.25;
  font-size: 0.8125rem;
}

.quiz-options.compact-grid .quiz-option.selected::after {
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  font-size: 9px;
}

/* Multi-select with checkboxes */
.quiz-options.multiple-select .quiz-option {
  padding-right: 2.5rem;
}

.option-checkbox {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink-4);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s var(--ease);
}

/* Hide the Lucide check icon inside checkbox by default */
.option-checkbox i,
.option-checkbox svg {
  display: none;
}

/* Show checkmark only when selected */
.quiz-option.selected .option-checkbox {
  border-color: var(--sienna);
  background: var(--sienna);
}

.quiz-option.selected .option-checkbox i,
.quiz-option.selected .option-checkbox svg {
  display: block;
  width: 12px;
  height: 12px;
  color: var(--white);
  stroke-width: 3;
}

.quiz-option.selected .option-checkbox::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg);
  margin-top: -2px;
}

/* Quiz navigation */
.quiz-navigation,
.quick-quiz-nav,
.advanced-quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--ink-5);
  gap: 1rem;
}

.quiz-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  background: transparent;
  border: 1.5px solid var(--ink-5);
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.quiz-back:hover {
  border-color: var(--ink-4);
  color: var(--ink);
}

.quiz-next {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.5rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.quiz-next:hover {
  background: var(--forest);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,67,50,.2);
}

.quiz-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.quiz-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.progress-fill {
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: var(--ink-5);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--sienna), var(--sienna-dk));
  border-radius: 4px;
  transition: width .3s var(--ease);
}

.progress-text {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-3);
}

/* Quiz results */
.quiz-results {
  text-align: center;
}

.results-header {
  margin-bottom: 2rem;
}

.results-header h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.results-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.view-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  margin: 1rem auto 0;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
  width: fit-content;
}

.view-all-btn:hover {
  background: var(--forest);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,67,50,.2);
}

#quizMatchCount,
#quizFundingTotal {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 0.25rem;
}

#quizSignupCta {
  background: linear-gradient(135deg, var(--sienna-lt), rgba(196,83,43,.04));
  border: 1px solid rgba(196,83,43,.15);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
}

#quizSignupCta h4 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

#quizSignupCta p {
  font-size: 0.875rem;
  color: var(--ink-2);
  margin-bottom: 1rem;
}

#quizSignupCta button,
#quizSignupCta .btn-primary {
  padding: 0.6rem 1.75rem;
  background: var(--sienna);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

#quizSignupCta button:hover,
#quizSignupCta .btn-primary:hover {
  background: var(--sienna-dk);
  transform: translateY(-1px);
}

/* ── Quiz Auth Gate (dynamically injected by main.js) ── */
.quiz-auth-gate {
  background: linear-gradient(180deg, rgba(196,83,43,.05) 0%, var(--parchment) 100%);
  border: 1.5px solid rgba(196,83,43,.12);
  border-radius: var(--r-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.quiz-auth-gate__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 420px;
  margin: 0 auto;
}

.quiz-auth-gate__icon {
  color: var(--ink-3);
  margin-bottom: 0.25rem;
}

.quiz-auth-gate__icon svg {
  width: 32px;
  height: 32px;
}

.quiz-auth-gate__content h3,
.quiz-auth-gate__content strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.quiz-auth-gate__content p {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}

.quiz-auth-gate__google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 320px;
  padding: 0.75rem 1.5rem;
  background: var(--forest-mid);
  color: var(--white);
  border: none;
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
  margin-top: 0.5rem;
}

.quiz-auth-gate__google:hover {
  background: var(--forest);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,67,50,.2);
}

.quiz-auth-gate__google img,
.quiz-auth-gate__google svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.quiz-auth-gate__email {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--forest-mid);
  text-decoration: none;
  transition: color .15s var(--ease);
}

.quiz-auth-gate__email:hover {
  color: var(--sienna);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quiz-auth-gate__free {
  font-size: 0.75rem !important;
  color: var(--ink-3) !important;
  margin-top: 0.25rem !important;
}

/* "No thanks" dismiss — intentionally subtle, NOT a primary CTA */
.quiz-auth-gate__dismiss {
  display: inline-block !important;
  margin-top: 0.75rem;
  padding: 0.4rem 0 !important;
  background: none !important;
  border: none !important;
  color: var(--ink-3) !important;
  font-size: 0.75rem !important;
  font-weight: 400 !important;
  cursor: pointer;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  transition: color .15s var(--ease);
  font-family: var(--sans);
}

.quiz-auth-gate__dismiss:hover {
  color: var(--ink-2);
}

/* ── Quiz Results Action Buttons (Retake Quiz / Browse All Grants) ── */
.results-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink-5);
}

.results-actions .btn,
.results-actions .secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--ink-5);
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.results-actions .btn:hover,
.results-actions .secondary-btn:hover {
  border-color: var(--ink-4);
  color: var(--ink);
  background: var(--parchment);
}

.results-actions .btn i,
.results-actions .btn svg {
  width: 14px;
  height: 14px;
}

/* Quick quiz auth gate variant */
.quick-quiz-auth-gate {
  margin: 1rem 0;
  padding: 2rem 1.5rem;
}

@media (max-width: 768px) {
  .quiz-auth-gate {
    padding: 1.75rem 1.25rem;
  }

  .quiz-auth-gate__content h3,
  .quiz-auth-gate__content strong {
    font-size: 1.125rem;
  }

  .results-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .results-actions .btn,
  .results-actions .secondary-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Quiz funding highlight (results header) */
.quiz-funding-highlight {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--parchment);
  border-radius: var(--r-lg);
  border: 1px solid var(--ink-5);
}

.quiz-funding-amount {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--sienna);
  display: block;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.quiz-funding-label {
  font-size: 0.875rem;
  color: var(--ink-2);
  display: block;
  line-height: 1.5;
}

.quiz-funding-sublabel {
  font-size: 0.8125rem;
  color: var(--ink-3);
  display: block;
  margin-top: 0.25rem;
}

.results-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  color: var(--forest-mid);
}

.results-icon svg {
  width: 100%;
  height: 100%;
}

/* Precision quiz results banner */
.results-summary-banner {
  background: var(--parchment);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.results-banner-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(45,106,79,.06) 0%, transparent 70%);
  pointer-events: none;
}

.results-banner-inner {
  position: relative;
  z-index: 1;
}

.results-banner-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--forest-mid);
  margin-bottom: 0.75rem;
}

.results-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--forest-mid);
  animation: pulse 2s ease-in-out infinite;
}

.results-banner-headline {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

#resultsSummaryText {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.results-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* Stats use .results-stat > .stat-num + .stat-label (from main.js) */
.results-stat {
  text-align: center;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.15rem !important;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
}

.results-stat .stat-num,
.results-stats-row .stat-value {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
  line-height: 1.1;
}

.results-stat .stat-label,
.results-stats-row .stat-label {
  font-size: 0.6275rem;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

/* Quiz signup bar */
.quiz-signup-bar {
  background: linear-gradient(135deg, var(--sienna-lt), rgba(196,83,43,.04));
  border: 1px solid rgba(196,83,43,.15);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin-top: 1rem;
  text-align: center;
}

/* Tier grants container */
.tier-grants-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* Advanced quiz results */
.tiered-results {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.result-tier {
  text-align: left;
}

.tier-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ink-5);
}

.tier-header h4 {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
}

.tier-badge {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: var(--r-full);
  letter-spacing: 0.02em;
}

.tier-badge--perfect {
  background: rgba(45,106,79,.1);
  color: var(--forest-mid);
}

.tier-badge--strong {
  background: rgba(45,106,79,.06);
  color: var(--forest);
}

.tier-badge--good {
  background: var(--gold-lt);
  color: var(--gold);
}

.unified-quiz-results {
  text-align: left;
}

.quiz-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}


/* ============================================================
   S20: QUIZ RESULT CARDS
   ============================================================ */
.quiz-result-card {
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all .25s var(--ease);
  position: relative;
  text-align: left;
  cursor: pointer;
}

/* Override .quiz-step p { text-align: center } for result card elements */
.quiz-result-card p,
.quiz-result-card h4,
.quiz-result-card span,
.quiz-result-card div {
  text-align: left !important;
}

.quiz-result-card:hover {
  box-shadow: 0 8px 24px rgba(28,25,23,.08);
  transform: translateY(-2px);
  border-color: rgba(196,83,43,.12);
  cursor: pointer;
}

.quiz-result-card--blurred {
  filter: blur(4px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.quiz-result-card--hidden {
  display: none;
}

.quiz-result-card__rank {
  position: absolute;
  top: -0.5rem;
  left: -0.5rem;
  width: 28px;
  height: 28px;
  background: var(--sienna);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(196,83,43,.3);
}

.quiz-result-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-result-card__score {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: var(--r-full);
}

.quiz-result-card__score--perfect {
  background: rgba(45,106,79,.1);
  color: var(--forest-mid);
}

.quiz-result-card__score--strong {
  background: rgba(45,106,79,.06);
  color: var(--forest);
}

.quiz-result-card__score--good {
  background: var(--gold-lt);
  color: var(--gold);
}

.quiz-result-card__title {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.quiz-result-card__org {
  font-size: 0.75rem;
  color: var(--ink-3);
}

.quiz-result-card__desc {
  font-size: 0.8125rem;
  color: var(--ink-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quiz-result-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ink-5);
  margin-top: auto;
}

.quiz-result-card__amount {
  font-family: var(--serif);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--forest-mid);
}

.quiz-result-card__deadline {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-3);
}

.quiz-result-card__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quiz-result-card__save {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: var(--r-full);
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.quiz-result-card__save:hover {
  background: var(--sienna-lt);
  color: var(--sienna);
}

.quiz-result-card__save.saved {
  color: var(--sienna);
  background: var(--sienna-lt);
}

.quiz-result-card__details {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--forest-mid);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: var(--r-full);
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.quiz-result-card__details:hover {
  color: var(--sienna);
  background: var(--sienna-lt);
}

/* Level badge */
.level-badge {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-full);
  display: inline-block;
}

.level-badge.federal { background: rgba(38,70,115,.08); color: var(--navy); }
.level-badge.provincial { background: rgba(45,106,79,.08); color: var(--forest-mid); }
.level-badge.municipal { background: var(--sienna-lt); color: var(--sienna); }
.level-badge.private { background: var(--gold-lt); color: var(--gold); }
.level-badge.territorial { background: var(--parchment-dk); color: var(--ink-2); }


/* ============================================================
   S21: QUICK QUIZ CARDS
   ============================================================ */
.qr-card {
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all .25s var(--ease);
  position: relative;
  text-align: left;
}

.qr-card p, .qr-card h4, .qr-card span, .qr-card div {
  text-align: left !important;
}

.qr-card:hover {
  box-shadow: 0 8px 24px rgba(28,25,23,.08);
  transform: translateY(-2px);
  border-color: rgba(196,83,43,.12);
  cursor: pointer;
}

.qr-card--blurred {
  filter: blur(4px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.qr-card--hidden {
  display: none;
}

.qr-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.qr-card-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.qr-card-amount {
  font-family: var(--serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--forest-mid);
}

.qr-card-title {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.qr-card-org {
  font-size: 0.75rem;
  color: var(--ink-3);
}

.qr-card-desc {
  font-size: 0.8125rem;
  color: var(--ink-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qr-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ink-5);
  margin-top: auto;
}

.qr-card-deadline {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-3);
}

.qr-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qr-card-save {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: var(--r-full);
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.qr-card-save:hover {
  background: var(--sienna-lt);
  color: var(--sienna);
}

.qr-card-save.saved {
  color: var(--sienna);
  background: var(--sienna-lt);
}

.qr-card-details {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--forest-mid);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: var(--r-full);
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.qr-card-details:hover {
  color: var(--sienna);
  background: var(--sienna-lt);
}

.match-badge {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: var(--r-full);
  background: rgba(45,106,79,.1);
  color: var(--forest-mid);
}

.qr-card-empty {
  background: var(--parchment);
  border: 2px dashed var(--ink-5);
  border-radius: var(--r-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.875rem;
}


/* ============================================================
   S22: AUTH MODAL
   ============================================================ */
#loginModal.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(28,25,23,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#loginModal.modal.active,
#loginModal.modal[style*="flex"] {
  display: flex;
}

.modal-content.auth-modal {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl);
  max-width: 840px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
  position: relative;
  animation: modalSlideUp .25s var(--ease);
}

.auth-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(28,25,23,.06);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  transition: all .15s var(--ease);
  z-index: 2;
}

.auth-modal-close:hover {
  background: var(--ink-5);
  color: var(--ink);
}

/* Auth sidebar (left panel) */
.auth-modal-sidebar {
  background: var(--forest);
  color: var(--white);
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.auth-sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-sidebar-logo svg {
  width: 28px;
  height: 28px;
}

.auth-sidebar-heading {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.25;
}

.auth-sidebar-sub {
  font-size: 0.875rem;
  opacity: 0.75;
  line-height: 1.5;
}

.auth-sidebar-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  opacity: 0.85;
}

.auth-feature svg {
  flex-shrink: 0;
  color: var(--forest-light);
}

.auth-sidebar-trust {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-top: auto;
}

/* Auth form (right panel) */
.auth-modal-form {
  padding: 2.5rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form-header {
  margin-bottom: 1.5rem;
}

#authFormTitle {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

#authFormSubtitle {
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* Google + email methods */
.auth-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-method-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.auth-method-btn.google-btn {
  background: var(--white);
  border: 1.5px solid var(--ink-5);
  color: var(--ink);
}

.auth-method-btn.google-btn:hover {
  border-color: var(--ink-4);
  box-shadow: var(--sh-sm);
}

.auth-method-btn.google-btn svg,
.auth-method-btn.google-btn img {
  width: 20px;
  height: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ink-5);
}

/* Email form */
.email-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  font-family: var(--sans);
}

.form-group input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--parchment);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  color: var(--ink);
  font-family: var(--sans);
  transition: all .15s var(--ease);
}

.form-group input:focus {
  outline: none;
  border-color: var(--forest-mid);
  box-shadow: 0 0 0 3px var(--forest-glow);
  background: var(--white);
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  padding-right: 2.5rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s var(--ease);
}

.password-toggle:hover {
  color: var(--ink-2);
}

.submit-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--forest-mid);
  color: var(--white);
  border: none;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
  margin-top: 0.25rem;
}

.submit-btn:hover {
  background: var(--forest);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,67,50,.2);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.link-btn {
  background: none;
  border: none;
  color: var(--forest-mid);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--sans);
  text-decoration: none;
  transition: color .15s var(--ease);
}

.link-btn:hover {
  color: var(--sienna);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ============================================================
   S23: USER MENU & DROPDOWN
   ============================================================ */
.user-menu {
  display: none;
  position: relative;
}

.user-menu.active {
  display: flex;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-full);
  transition: background .15s var(--ease);
  font-family: var(--sans);
}

.user-btn:hover {
  background: rgba(28,25,23,.04);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--forest-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--forest-mid);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 32px rgba(28,25,23,.1);
  min-width: 210px;
  padding: 0.5rem;
  z-index: 1100;
}

.user-dropdown.active,
.user-dropdown.show,
.user-menu:hover .user-dropdown {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .1s var(--ease);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--parchment);
  color: var(--ink);
}

.dropdown-item i,
.dropdown-item svg { flex-shrink: 0; color: var(--ink-3); width: 15px; height: 15px; }

.dropdown-item:hover i,
.dropdown-item:hover svg { color: var(--sienna); }

.logout-item {
  color: #dc2626;
  border-top: 1px solid var(--ink-5);
  margin-top: 0.25rem;
  padding-top: 0.75rem;
}

.logout-item:hover {
  background: rgba(220,38,38,.05);
  color: #dc2626;
}

/* Auth buttons (pre-auth state) */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all .15s var(--ease);
  border: none;
  border-radius: var(--r-full);
}

.login-btn {
  padding: 0.4rem 1rem;
  color: var(--ink-2);
  background: transparent;
}

.login-btn:hover { color: var(--ink); background: rgba(28,25,23,.04); }

.signup-btn {
  padding: 0.4rem 1.2rem;
  color: var(--white);
  background: var(--forest-mid);
}

.signup-btn:hover {
  background: var(--forest);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,67,50,.2);
}


/* ============================================================
   S24: SEARCH SUGGESTIONS
   ============================================================ */
#searchSuggestions,
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: var(--sh-md);
  max-height: 260px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

#searchSuggestions.active,
.search-suggestions.active {
  display: block;
}

#searchSuggestions .suggestion-item,
.search-suggestions .suggestion-item {
  padding: 0.6rem 0.85rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .1s var(--ease);
  font-family: var(--sans);
}

#searchSuggestions .suggestion-item:hover,
.search-suggestions .suggestion-item:hover {
  background: var(--parchment);
  color: var(--ink);
}

#searchSuggestions .suggestion-item mark,
.search-suggestions .suggestion-item mark {
  background: var(--gold-lt);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* Make the search wrapper relative for suggestions positioning */
.filter-group:has(.filter-group__input) {
  position: relative;
}


/* ============================================================
   S25: LOADING & PAGINATION (functional)
   ============================================================ */
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  min-height: 200px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--ink-5);
  border-top-color: var(--forest-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Pagination — functional version matching production class names */
.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.pagination-btn:hover { border-color: var(--forest-mid); color: var(--forest-mid); }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination-info {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* Zero results state */
.no-results,
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--ink-3);
}

.no-results h3,
.empty-state h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.no-results p,
.empty-state p {
  font-size: 0.9375rem;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}


/* ============================================================
   S26: MOBILE MENU
   ============================================================ */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
}

.mobile-menu-toggle .menu-open { display: block; }
.mobile-menu-toggle .menu-close { display: none; }
.mobile-menu-toggle.active .menu-open { display: none; }
.mobile-menu-toggle.active .menu-close { display: block; }

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(28,25,23,.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
  display: block;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--white);
  z-index: 1200;
  box-shadow: var(--sh-xl);
  transition: right .3s var(--ease);
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-link {
  display: block;
  padding: 0.85rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--ink-5);
  transition: color .15s var(--ease);
  text-decoration: none;
}

.mobile-menu-link:hover {
  color: var(--sienna);
}

.mobile-menu-divider {
  height: 1px;
  background: var(--ink-5);
  margin: 0.5rem 0;
}

.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.mobile-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
  width: 100%;
}

.mobile-auth-btn.primary {
  background: var(--forest-mid);
  color: var(--white);
  border: none;
}

.mobile-auth-btn.primary:hover {
  background: var(--forest);
}

.mobile-auth-btn.secondary {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--ink-5);
}

.mobile-auth-btn.secondary:hover {
  border-color: var(--ink-4);
  color: var(--ink);
}

.mobile-menu-section-label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
}

body.mobile-menu-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
}


/* ============================================================
   S27: NAV DROPDOWN
   ============================================================ */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color .15s var(--ease);
  font-family: var(--sans);
}

.nav-dropdown-toggle:hover { color: var(--ink); }

.nav-dropdown-toggle svg {
  transition: transform .2s var(--ease);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: -12px;
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 32px rgba(28,25,23,.1);
  min-width: 230px;
  padding: 0.5rem;
  z-index: 1050;
}

/* Show on hover (desktop) AND on JS click toggle */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu.is-open {
  display: block;
}

.nav-dropdown:hover .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: all .1s var(--ease);
  text-decoration: none;
}

.nav-dropdown-item:hover {
  background: var(--parchment);
  color: var(--ink);
}

.nav-dropdown-item svg {
  color: var(--ink-3);
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.nav-dropdown-item:hover svg {
  color: var(--sienna);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--ink-5);
  margin: 0.35rem 0.75rem;
}


/* ============================================================
   S28: ADDITIONAL RESPONSIVE for functional elements
   ============================================================ */
@media (max-width: 1024px) {
  .grants-list,
  #grantsList {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-modal__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-content.auth-modal {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .auth-modal-sidebar {
    display: none;
  }

  .quiz-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .grants-list,
  #grantsList {
    grid-template-columns: 1fr;
  }

  .hp-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    margin-top: auto;
  }

  .hp-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .hp-modal__header {
    padding: 1.25rem 1.25rem 1rem;
  }

  .hp-modal__body {
    padding: 1.25rem;
  }

  .hp-modal__footer {
    padding: 0.75rem 1.25rem;
  }

  .hp-modal__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .hp-modal__title {
    font-size: 1.25rem;
  }

  .hp-modal__amount {
    font-size: 1.125rem;
  }

  .modal-content.auth-modal {
    grid-template-columns: 1fr;
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }

  .auth-modal-sidebar {
    display: none;
  }

  .auth-modal-form {
    padding: 2rem 1.5rem;
  }

  .quiz-options {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .quiz-options.compact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }

  .quiz-options.compact-grid .quiz-option {
    padding: 0.5rem 0.6rem;
    min-height: 40px;
  }

  .quiz-options.compact-grid .option-title {
    font-size: 0.75rem;
  }

  .quiz-options-container {
    grid-template-columns: 1fr;
  }

  .quiz-label {
    font-size: 1.0625rem;
  }

  .quiz-navigation,
  .quick-quiz-nav,
  .advanced-quiz-nav {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .quiz-progress {
    order: -1;
    width: 100%;
  }

  .results-preview {
    grid-template-columns: 1fr;
  }

  .quiz-funding-amount {
    font-size: 1.5rem;
  }

  .results-summary-banner {
    padding: 1.25rem;
  }

  .results-stats-row {
    gap: 1rem;
  }

  .user-dropdown {
    position: fixed;
    top: 56px;
    right: 1rem;
    left: auto;
    width: 260px;
  }
}

@media (max-width: 480px) {
  .hp-card {
    padding: 1.125rem;
  }

  .hp-card__tip {
    font-size: 0.75rem;
    padding: 0.5rem 0.6rem;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .quiz-option {
    padding: 0.75rem;
    flex-direction: row;
    text-align: left;
    gap: 0.75rem;
  }

  .quiz-option .option-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .hp-modal__grid {
    grid-template-columns: 1fr 1fr;
  }

  .hp-modal__footer {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hp-modal__bookmark,
  .hp-modal__apply {
    width: 100%;
    justify-content: center;
  }

  .cta__actions {
    flex-direction: column;
  }
}


/* ============================================================
   S29: MISC / AUTH GATE / REENTRY
   ============================================================ */
.quiz-auth-reentry {
  background: linear-gradient(135deg, var(--forest-glow), rgba(45,106,79,.03));
  border: 1px solid rgba(45,106,79,.12);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quiz-auth-reentry p {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.quiz-auth-reentry strong {
  color: var(--ink);
}

.quiz-auth-reentry button {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  background: var(--forest-mid);
  color: var(--white);
  border: none;
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.quiz-auth-reentry button:hover {
  background: var(--forest);
  transform: translateY(-1px);
}

/* Dynamic auth gate elements */
#quizAuthGate,
#quizOnboarding,
#quizOnboardingPitch {
  background: linear-gradient(135deg, var(--sienna-lt), rgba(196,83,43,.03));
  border: 1px solid rgba(196,83,43,.12);
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: center;
  margin-top: 1.5rem;
}

#quizAuthGate h3,
#quizOnboarding h3,
#quizOnboardingPitch h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

#quizAuthGate p,
#quizOnboarding p,
#quizOnboardingPitch p {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 1rem;
}

#quizAuthGate button,
#quizOnboarding button,
#quizOnboardingPitch button {
  padding: 0.65rem 1.75rem;
  background: var(--sienna);
  color: var(--white);
  border: none;
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

#quizAuthGate button:hover,
#quizOnboarding button:hover,
#quizOnboardingPitch button:hover {
  background: var(--sienna-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,83,43,.2);
}

/* Toast / notification */
.toast,
.gc-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--sh-lg);
  z-index: 3000;
  opacity: 0;
  transition: all .3s var(--ease);
  font-family: var(--sans);
  white-space: nowrap;
}

.toast.show,
.gc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Verification banner */
.verification-banner {
  background: var(--gold-lt);
  border-bottom: 1px solid var(--gold-border);
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ink-2);
  position: sticky;
  top: 56px;
  z-index: 999;
}

.verification-banner a {
  font-weight: 600;
  color: var(--forest-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--forest-mid);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  transition: top .2s var(--ease);
}

.skip-link:focus {
  top: 0.5rem;
  color: var(--white);
}

/* Screen reader only */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible for keyboard nav */
*:focus-visible {
  outline: 2px solid var(--forest-mid);
  outline-offset: 2px;
}


/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ============================================================
   S31: ROADMAP PROGRESS TRACKER
   Injected by main.js after precision quiz for logged-in users.
   ============================================================ */
.rm-progress-tracker {
  background: var(--white);
  border: 1px solid var(--ink-5);
  border-radius: var(--r-xl);
  padding: 2rem;
  margin: 1.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.rm-progress-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ink-5);
}

.rm-progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--forest-mid), var(--sienna));
  width: 0%;
  transition: width 1s var(--ease);
}

.rm-progress-content {
  position: relative;
}

.rm-progress-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rm-progress-header__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sienna-lt);
  border-radius: var(--r-md);
  color: var(--sienna);
  flex-shrink: 0;
}

.rm-progress-header__icon svg {
  width: 20px;
  height: 20px;
}

.rm-progress-header__text h3 {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  text-align: left;
}

.rm-progress-header__text p {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin: 0.15rem 0 0;
  text-align: left;
}

.rm-progress-stages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
  margin: 0 auto 1.5rem;
}

.rm-progress-stage {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-md);
  transition: all .3s var(--ease);
}

.rm-progress-stage--active {
  background: var(--forest-glow);
}

.rm-progress-stage--pending {
  opacity: 0.4;
}

.rm-progress-stage--complete {
  opacity: 1;
}

.rm-progress-stage--complete .rm-progress-stage__indicator {
  background: var(--forest-mid);
  color: var(--white);
}

.rm-progress-stage__indicator {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--parchment);
  border-radius: var(--r-full);
  color: var(--ink-3);
  flex-shrink: 0;
}

.rm-progress-stage__indicator svg {
  width: 14px;
  height: 14px;
}

.rm-progress-stage__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  text-align: left;
}

/* CTA (shown when roadmap is ready) */
.rm-progress-cta {
  display: none;
  padding-top: 1rem;
  border-top: 1px solid var(--ink-5);
}

.rm-progress-cta.visible,
.rm-progress-tracker--complete .rm-progress-cta {
  display: block;
}

.rm-progress-cta__title {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.rm-progress-cta__subtitle {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

.rm-progress-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.75rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.rm-progress-cta__btn:hover {
  background: var(--forest);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,67,50,.2);
}

.rm-progress-cta__btn svg {
  width: 16px;
  height: 16px;
}

/* Error state */
.rm-progress-error {
  display: none;
  padding-top: 1rem;
  border-top: 1px solid var(--ink-5);
}

.rm-progress-error.visible,
.rm-progress-tracker--error .rm-progress-error {
  display: block;
}

/* Hide stages when complete/error */
.rm-progress-tracker--complete .rm-progress-stages,
.rm-progress-tracker--error .rm-progress-stages {
  display: none;
}

.rm-progress-error__text {
  font-size: 0.875rem;
  color: var(--ink-2);
  margin-bottom: 0.75rem;
}

.rm-progress-error__retry {
  padding: 0.5rem 1.25rem;
  background: transparent;
  color: var(--sienna);
  border: 1.5px solid var(--sienna);
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.rm-progress-error__retry:hover {
  background: var(--sienna-lt);
}

@media (max-width: 768px) {
  .rm-progress-tracker {
    padding: 1.5rem 1.25rem;
  }

  .rm-progress-header {
    flex-direction: column;
    text-align: center;
  }

  .rm-progress-header__text h3,
  .rm-progress-header__text p {
    text-align: center;
  }
}


/* ============================================================
   S32: DYNAMIC UI COMPONENTS (injected by main.js under specific conditions)
   These only appear for authenticated users, after quiz completion,
   or during specific interactions. ALL must have CSS or they render raw.
   ============================================================ */

/* ── Quick Quiz Premium Teaser (after 3+ results, upsell to premium) ── */
.qr-premium-teaser {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
  background: var(--gold-lt);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-lg);
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.qr-premium-teaser svg { flex-shrink: 0; color: var(--gold); margin-top: 2px; }
.qr-premium-teaser a { color: var(--forest-mid); font-weight: 600; margin-left: 0.25rem; }
.qr-premium-teaser a:hover { color: var(--sienna); }

/* ── Precision Quiz Premium CTA (between result tiers) ── */
.quiz-premium-cta {
  margin: 1.5rem 0;
}

.quiz-premium-cta-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--forest-glow), rgba(45,106,79,.03));
  border: 1px solid rgba(45,106,79,.12);
  border-radius: var(--r-lg);
}

.quiz-premium-cta-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest-glow);
  border-radius: var(--r-md);
  color: var(--forest-mid);
  flex-shrink: 0;
}

.quiz-premium-cta-icon i,
.quiz-premium-cta-icon svg { width: 18px; height: 18px; }

.quiz-premium-cta-text { flex: 1; }
.quiz-premium-cta-text strong { display: block; font-size: 0.875rem; color: var(--ink); margin-bottom: 0.2rem; }
.quiz-premium-cta-text span { font-size: 0.8125rem; color: var(--ink-3); }

.quiz-premium-cta-btn {
  padding: 0.5rem 1.25rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s var(--ease);
}

.quiz-premium-cta-btn:hover { background: var(--forest); color: var(--white); }

/* ── Precision Quiz Signup CTA (for guests, after results) ── */
.precision-quiz-signup-cta {
  margin: 1.5rem 0;
}

.precision-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--sienna-lt);
  border: 1px solid rgba(196,83,43,.12);
  border-radius: var(--r-lg);
}

.precision-cta-left h4 {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.2rem;
}

.precision-cta-left p {
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin: 0;
}

.precision-cta-right { text-align: center; flex-shrink: 0; }

.precision-cta-signup-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.5rem;
  background: var(--sienna);
  color: var(--white);
  border: none;
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
}

.precision-cta-signup-btn:hover { background: var(--sienna-dk); }
.precision-cta-signup-btn i,
.precision-cta-signup-btn svg { width: 14px; height: 14px; }

.precision-cta-note { display: block; font-size: 0.6875rem; color: var(--ink-3); margin-top: 0.35rem; }

/* ── Quiz Onboarding Tracker (post-signup, 3-step progress) ── */
.quiz-onboarding {
  margin-bottom: 1.5rem;
}

.quiz-onboarding__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.quiz-onboarding__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  opacity: 0.4;
}

.quiz-onboarding__step.active,
.quiz-onboarding__step.complete { opacity: 1; }

.quiz-onboarding__dot {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--parchment);
  color: var(--ink-3);
  border: 2px solid var(--ink-5);
}

.quiz-onboarding__step.complete .quiz-onboarding__dot {
  background: var(--forest-mid);
  color: var(--white);
  border-color: var(--forest-mid);
}

.quiz-onboarding__step.active .quiz-onboarding__dot {
  border-color: var(--sienna);
  color: var(--sienna);
}

.quiz-onboarding__label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
}

.quiz-onboarding__connector {
  width: 40px;
  height: 2px;
  background: var(--ink-5);
  margin-bottom: 1.25rem;
}

.quiz-onboarding__connector.active { background: var(--forest-mid); }

/* ── Quiz Onboarding Pitch (premium upsell after 3 bookmarks) ── */
.quiz-onboarding-pitch {
  margin-bottom: 1.5rem;
}

.quiz-onboarding-pitch__content {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(196,83,43,.04), var(--parchment));
  border: 1px solid rgba(196,83,43,.12);
  border-radius: var(--r-lg);
  text-align: center;
}

.quiz-onboarding-pitch__content h4 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.quiz-onboarding-pitch__content p {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 0.75rem;
}

.quiz-onboarding-pitch__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.quiz-onboarding-pitch__list li {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--white);
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-full);
  border: 1px solid var(--ink-5);
}

.quiz-onboarding-pitch__cta { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

.quiz-onboarding-pitch__btn {
  display: inline-flex;
  padding: 0.6rem 1.5rem;
  background: var(--sienna);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s var(--ease);
}

.quiz-onboarding-pitch__btn:hover { background: var(--sienna-dk); color: var(--white); }

.quiz-onboarding-pitch__guarantee { font-size: 0.6875rem; color: var(--ink-3); }

.quiz-onboarding-pitch__dismiss {
  background: none;
  border: none;
  color: var(--ink-3);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--sans);
}

/* ── Guest Bookmark Modal (prompt to sign up when guest bookmarks) ── */
.guest-bookmark-modal {
  position: fixed;
  inset: 0;
  background: rgba(28,25,23,.5);
  backdrop-filter: blur(4px);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: modalFadeIn .25s var(--ease);
}

.guest-bookmark-content {
  background: var(--paper);
  border-radius: var(--r-xl);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: var(--sh-xl);
  animation: modalSlideUp .3s var(--ease);
}

.close-guest-modal {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--r-full);
  transition: background .15s var(--ease);
}

.close-guest-modal:hover { background: var(--parchment); }
.close-guest-modal i,
.close-guest-modal svg { width: 18px; height: 18px; }

.guest-modal-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sienna-lt);
  border-radius: var(--r-full);
  color: var(--sienna);
}

.guest-modal-icon i,
.guest-modal-icon svg { width: 24px; height: 24px; }

.guest-bookmark-content h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.guest-bookmark-content > p {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.guest-modal-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  text-align: left;
}

.guest-modal-benefits li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
  padding: 0.3rem 0;
}

.guest-modal-benefits li i,
.guest-modal-benefits li svg { width: 16px; height: 16px; color: var(--forest-mid); flex-shrink: 0; }

.guest-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guest-signup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem;
  background: var(--forest-mid);
  color: var(--white);
  border: none;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s var(--ease);
  font-family: var(--sans);
  width: 100%;
}

.guest-signup-btn:hover { background: var(--forest); }
.guest-signup-btn i,
.guest-signup-btn svg { width: 16px; height: 16px; }

.guest-login-btn,
.guest-continue-btn {
  background: none;
  border: none;
  color: var(--ink-3);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.4rem;
  font-family: var(--sans);
  transition: color .15s var(--ease);
}

.guest-login-btn:hover,
.guest-continue-btn:hover { color: var(--ink); }

/* ── Roadmap Ready State (green checkmark variant) ── */
.rm-progress-tracker--ready .rm-progress-header__icon {
  background: rgba(34,197,94,.1);
  color: #16a34a;
}

.rm-progress-ready-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  background: var(--forest-mid);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.75rem;
  transition: all .15s var(--ease);
}

.rm-progress-ready-link:hover { background: var(--forest); color: var(--white); }
.rm-progress-ready-link svg { width: 16px; height: 16px; }

/* ── Error message (generic, used by auth flows) ── */
.error-message {
  padding: 0.75rem 1rem;
  background: rgba(220,38,38,.06);
  border: 1px solid rgba(220,38,38,.15);
  border-radius: var(--r-md);
  color: #dc2626;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
}

/* ── Responsive for dynamic components ── */
@media (max-width: 768px) {
  .quiz-premium-cta-inner { flex-direction: column; text-align: center; }
  .precision-cta-inner { flex-direction: column; text-align: center; }
  .quiz-onboarding__steps { flex-wrap: wrap; }
  .quiz-onboarding__connector { width: 20px; }
  .guest-bookmark-content { padding: 1.5rem; }
}


/* ============================================================
   S30: EMAIL-CAPTURE COMPATIBILITY
   email-capture.css uses main.css CSS variables. Since v7 doesn't
   load main.css, provide the missing variable values here.
   ============================================================ */
:root {
  /* Spacing tokens used by email-capture.css */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius tokens */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Color tokens */
  --gray-50: #FAFBFC;
  --gray-100: #F4F6F8;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;

  /* Transition tokens */
  --transition-fast: 150ms cubic-bezier(0.4,0,0.2,1);
  --transition-base: 250ms cubic-bezier(0.4,0,0.2,1);

  /* Shadow tokens */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);

  /* Text size tokens */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  /* Primary/Accent tokens used by email-capture */
  --primary: #2D6A4F;
  --primary-dark: #1B4332;
  --primary-light: rgba(45,106,79,.08);
  --accent: #C4532B;
  --accent-dark: #A3401F;
  --success: #16a34a;
  --success-light: rgba(22,163,74,.08);
  --error: #dc2626;
  --error-light: rgba(220,38,38,.06);
}

/* Override email-capture content box to use v7 radius */
.email-capture-content {
  border-radius: var(--r-xl) !important;
}

/* Fix email-capture form field spacing */
.email-capture-form {
  display: flex;
  gap: 0.5rem;
}

.email-capture-form input[type="email"] {
  border-radius: var(--r-full) !important;
  padding: 0.75rem 1.15rem !important;
}

.email-capture-form button[type="submit"] {
  border-radius: var(--r-full) !important;
  padding: 0.75rem 1.5rem !important;
  white-space: nowrap;
}

/* Exit-intent modal dark theme overrides for v7 */
.exit-intent-modal .email-capture-content {
  border-radius: var(--r-xl) !important;
}

.exit-intent-modal .email-capture-form {
  gap: 0.5rem;
}

.exit-intent-modal .email-capture-form input[type="email"] {
  border-radius: var(--r-md) !important;
}

.exit-intent-modal .email-capture-form button[type="submit"] {
  border-radius: var(--r-md) !important;
}
