/* ============================================================
   FinWise — style.css
   Pure CSS, no build tools required. Works directly in browser.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   1. CSS VARIABLES
   ============================================================ */
:root {
  --primary:           hsl(253, 87%, 62%);
  --primary-dark:      hsl(253, 87%, 52%);
  --primary-light:     hsl(253, 100%, 97%);
  --primary-border:    hsl(253, 87%, 54%);
  --accent:            hsl(38, 100%, 56%);
  --accent-dark:       hsl(38, 100%, 46%);
  --background:        hsl(0, 0%, 99%);
  --foreground:        hsl(240, 10%, 10%);
  --muted:             hsl(240, 5%, 96%);
  --muted-fg:          hsl(240, 4%, 46%);
  --border:            hsl(240, 6%, 90%);
  --card:              hsl(0, 0%, 100%);
  --secondary:         hsl(253, 100%, 97%);
  --secondary-fg:      hsl(253, 87%, 40%);
  --green:             hsl(152, 75%, 40%);
  --green-light:       hsl(152, 75%, 95%);
  --red:               hsl(0, 84%, 60%);
  --red-light:         hsl(0, 84%, 97%);
  --amber-light:       hsl(38, 100%, 95%);
  --amber-dark:        hsl(38, 100%, 30%);
  --radius:            0.875rem;
  --radius-sm:         0.5rem;
  --radius-lg:         1.25rem;
  --radius-full:       9999px;
  --font:              'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-sm:         0 2px 8px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.03);
  --shadow:            0 4px 16px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.03);
  --shadow-md:         0 8px 24px rgba(0,0,0,.07), 0 4px 8px rgba(0,0,0,.04);
  --shadow-lg:         0 16px 40px rgba(0,0,0,.09), 0 6px 12px rgba(0,0,0,.05);
  --transition:        0.2s ease;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; }

/* ============================================================
   3. LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container--narrow { max-width: 820px; }
.container--mid    { max-width: 960px; }
section { padding: 5rem 0; }

/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), hsl(329, 86%, 62%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-muted  { color: var(--muted-fg); }
.text-primary { color: var(--primary); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 900; }

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.925rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.btn--primary {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: linear-gradient(135deg, #6d28d9, #7e22ce); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: #9333ea;
}
.btn--outline:hover { background: var(--primary-light); }
.btn--white {
  background: #fff;
  color: #6d28d9;
  border-color: transparent;
  box-shadow: var(--shadow);
}
.btn--white:hover { background: #f5f3ff; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
}
.btn--ghost:hover { background: var(--primary-light); }
.btn--muted {
  background: var(--muted);
  color: var(--foreground);
  border-color: var(--border);
}
.btn--muted:hover { background: var(--border); }
.btn--lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn--sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ============================================================
   6. NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(253, 253, 253, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.navbar__inner {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.navbar__logo svg { color: var(--primary); width: 1.5rem; height: 1.5rem; }
.navbar__logo-text { font-weight: 700; font-size: 1.2rem; color: var(--foreground); }
.navbar__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.navbar__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
  padding: 0.5rem 0;
}
.navbar__link:hover { color: var(--primary); }
.navbar__link.active { color: var(--primary); }
.navbar__link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, #9333ea);
  border-radius: 2px 2px 0 0;
}
.navbar__cta { margin-left: 0.5rem; }
.navbar__mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  padding: 0.5rem;
}
.navbar__mobile-toggle svg { width: 1.5rem; height: 1.5rem; }
.navbar__mobile-menu {
  display: none;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  border-bottom: 1px solid transparent;
  background: var(--background);
}
.navbar__mobile-menu.open { max-height: 24rem; border-bottom-color: var(--border); }
.navbar__mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1rem 1.25rem 1.25rem;
}
.navbar__mobile-link {
  display: block;
  padding: 0.625rem 0;
  font-weight: 500;
  font-size: 1rem;
  color: var(--foreground);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.navbar__mobile-link:last-of-type { border-bottom: none; }
.navbar__mobile-link.active { color: var(--primary); }
.navbar__mobile-cta { margin-top: 1rem; }

/* ============================================================
   7. FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(240,240,248,0.4), rgba(240,240,248,0.7));
  margin-top: auto;
}
.footer__inner {
  padding: 3.5rem 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
.footer__brand svg { color: var(--primary); width: 1.5rem; height: 1.5rem; }
.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.footer__logo-text { font-weight: 700; font-size: 1.2rem; }
.footer__tagline { font-size: 0.875rem; color: var(--muted-fg); line-height: 1.7; max-width: 320px; }
.footer__heading { font-weight: 600; font-size: 0.9rem; margin-bottom: 1rem; }
.footer__links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer__links a { font-size: 0.875rem; color: var(--muted-fg); text-decoration: none; transition: color var(--transition); }
.footer__links a:hover { color: var(--primary); }
.footer__bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted-fg);
}

/* ============================================================
   8. CARDS
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header { padding: 1.5rem 1.5rem 0.75rem; }
.card-body   { padding: 0 1.5rem 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--muted); }

/* ============================================================
   9. BADGE / PILL
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge svg { width: 1rem; height: 1rem; }
.badge--gradient-border {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  padding: 1px;
  border-radius: var(--radius-full);
}
.badge--gradient-border .badge-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--background);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
}
.badge--gradient-border .badge-inner svg { width: 1rem; height: 1rem; }
.badge--violet { background: hsl(253,100%,97%); color: hsl(253,87%,40%); }
.badge--amber  { background: hsl(38,100%,95%);  color: hsl(38,100%,30%); }
.badge--green  { background: hsl(152,75%,95%);  color: hsl(152,75%,30%); }
.badge--blue   { background: hsl(221,100%,95%); color: hsl(221,87%,40%); }

/* ============================================================
   10. PROGRESS BAR
   ============================================================ */
.progress-wrap { width: 100%; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar  { height: 100%; border-radius: var(--radius-full); transition: width 0.4s ease; }
.progress-wrap--sm .progress-bar { height: 8px; }
.progress-wrap--md .progress-bar { height: 12px; }
.progress-wrap--lg .progress-bar { height: 16px; }
.progress-bar--violet  { background: linear-gradient(90deg, #7c3aed, #9333ea); }
.progress-bar--green   { background: linear-gradient(90deg, #10b981, #059669); }
.progress-bar--amber   { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress-bar--red     { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* ============================================================
   11. TABS
   ============================================================ */
.tabs-list {
  display: grid;
  gap: 0.25rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}
.tabs-list--3 { grid-template-columns: repeat(3, 1fr); }
.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted-fg);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.tab-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.tab-btn:hover { color: var(--foreground); background: var(--muted); }
.tab-btn.active--violet { background: linear-gradient(135deg, #7c3aed, #9333ea); color: #fff; box-shadow: var(--shadow-sm); }
.tab-btn.active--amber  { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; box-shadow: var(--shadow-sm); }
.tab-btn.active--green  { background: linear-gradient(135deg, #10b981, #0d9488); color: #fff; box-shadow: var(--shadow-sm); }
.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-panel.active { display: block; }
.tab-label-full { display: none; }
.tab-label-short { display: inline; }

/* ============================================================
   12. INPUTS
   ============================================================ */
.input-group { margin-bottom: 1.25rem; }
.input-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--foreground); }
.input-wrap { position: relative; }
.input-prefix {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-fg);
  font-weight: 500;
  pointer-events: none;
}
.input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--foreground);
  background: var(--card);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }
.input--dollar { padding-left: 1.75rem; }
.input--lg { font-size: 1rem; padding: 0.75rem 0.75rem 0.75rem 1.75rem; }

/* ============================================================
   13. RANGE SLIDER
   ============================================================ */
.slider-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.slider-row label { font-size: 0.875rem; font-weight: 500; }
.slider-row span   { font-weight: 700; color: var(--accent-dark); font-size: 0.9rem; }
input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
  height: 2px;
  margin: 0.75rem 0 0.25rem;
}
.slider-note { font-size: 0.75rem; color: var(--muted-fg); }

/* ============================================================
   14. MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
  position: relative;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-top-bar { height: 8px; width: 100%; background: linear-gradient(90deg, #7c3aed, #9333ea); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.modal-title { font-size: 1.5rem; font-weight: 800; }
.modal-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  color: var(--foreground);
}
.modal-close svg { width: 1rem; height: 1rem; }
.modal-close:hover { background: var(--border); }
.modal-body { padding: 1.75rem 1.5rem; }

/* ============================================================
   15. SCROLL REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@keyframes fadeIn     { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInScale{ from { opacity: 0; scale: 0.94; } to { opacity: 1; scale: 1; } }
@keyframes slideRight { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================================
   16. HOME PAGE — HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 7rem;
  background: linear-gradient(135deg, #f5f3ff 0%, #fdfcfe 50%, #fdf2f8 100%);
  text-align: center;
}
.hero__dot-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(124,58,237,0.15) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  z-index: 0;
}
.hero__content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero__badge-wrap { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1.5rem;
}
.hero__sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--muted-fg);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ============================================================
   17. HOME — WHY SECTION
   ============================================================ */
.why-section { background: rgba(240,240,248,0.35); }
.why-section h2, .learn-section h2, .steps-section h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.section-subtitle { color: var(--muted-fg); max-width: 520px; margin: 0 auto 3.5rem; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.cards-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  border-left-width: 4px;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.feature-icon svg { width: 1.4rem; height: 1.4rem; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p  { font-size: 0.875rem; color: var(--muted-fg); line-height: 1.6; }
/* Individual card colors */
.card--violet { border-left-color: #7c3aed; }
.card--violet .feature-icon { background: #ede9fe; color: #7c3aed; }
.card--emerald { border-left-color: #10b981; }
.card--emerald .feature-icon { background: #d1fae5; color: #059669; }
.card--amber { border-left-color: #f59e0b; }
.card--amber .feature-icon { background: #fef3c7; color: #b45309; }
.card--pink { border-left-color: #ec4899; }
.card--pink .feature-icon { background: #fce7f3; color: #be185d; }
.card--blue { border-left-color: #3b82f6; }
.card--blue .feature-icon { background: #dbeafe; color: #1d4ed8; }
.card--rose { border-left-color: #f43f5e; }
.card--rose .feature-icon { background: #ffe4e6; color: #be123c; }

/* ============================================================
   18. HOME — WHAT YOU CAN LEARN
   ============================================================ */
.learn-section-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.learn-section-row > div h2 { margin-bottom: 0.5rem; }
.cards-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.big-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: 2.5rem;
  border: 1px solid;
  text-decoration: none;
  display: block;
  transition: box-shadow var(--transition), transform var(--transition);
}
.big-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.big-card--violet {
  background: linear-gradient(135deg, #ede9fe, #f3e8ff);
  border-color: #c4b5fd;
}
.big-card--amber {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #fcd34d;
}
.big-card__bg-icon {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2rem;
  opacity: 0.15;
  transition: opacity var(--transition), transform 0.5s ease;
}
.big-card:hover .big-card__bg-icon { opacity: 0.25; transform: scale(1.1); }
.big-card__bg-icon svg { width: 8rem; height: 8rem; }
.big-card__content { position: relative; z-index: 1; }
.big-card__content h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--foreground); }
.big-card__content p  { color: rgba(30,20,60,0.75); margin-bottom: 1.5rem; max-width: 300px; font-size: 0.95rem; }
.big-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.85);
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: var(--shadow-sm);
}
.big-card__pill svg { width: 1rem; height: 1rem; }
.big-card--violet .big-card__pill { color: #6d28d9; }
.big-card--amber  .big-card__pill { color: #b45309; }
.big-card--violet .big-card__bg-icon svg { color: #7c3aed; }
.big-card--amber  .big-card__bg-icon svg { color: #d97706; }

/* ============================================================
   19. HOME — HOW FINWISE HELPS
   ============================================================ */
.steps-section {
  background: linear-gradient(135deg, #7c3aed, #9333ea, #4f46e5);
  color: #fff;
}
.steps-section h2 { color: #fff; }
.steps-section .section-subtitle { color: rgba(255,255,255,0.8); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; position: relative; }
.steps-grid::before {
  content: '';
  position: absolute;
  top: 3rem;
  left: 20%;
  right: 20%;
  height: 2px;
  background: rgba(255,255,255,0.2);
}
.step-item { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 1; }
.step-circle {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--radius-full);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: #6d28d9;
  margin-bottom: 1.5rem;
  border: 6px solid rgba(109,40,217,0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.step-item h3 { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.step-item p  { font-size: 0.875rem; color: rgba(255,255,255,0.8); max-width: 220px; line-height: 1.6; }
.steps-cta { text-align: center; margin-top: 3.5rem; }

/* ============================================================
   20. LEARN PAGE
   ============================================================ */
.page-header { padding: 3.5rem 0 2.5rem; }
.page-header h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.page-header p   { color: var(--muted-fg); font-size: 1.05rem; max-width: 560px; }
.page-bg { background: rgba(240,240,248,0.3); min-height: 100vh; }

.module-section { margin-bottom: 3rem; }
.module-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.module-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.module-icon svg { width: 1.4rem; height: 1.4rem; color: #fff; }
.module-icon--violet  { background: linear-gradient(135deg, #7c3aed, #9333ea); }
.module-icon--blue    { background: linear-gradient(135deg, #3b82f6, #0ea5e9); }
.module-icon--emerald { background: linear-gradient(135deg, #34d399, #0d9488); }
.module-icon--amber   { background: linear-gradient(135deg, #fbbf24, #f97316); }
.module-icon--rose    { background: linear-gradient(135deg, #fb7185, #ec4899); }
.module-header-text h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.2rem; }
.module-header-text p  { font-size: 0.875rem; color: var(--muted-fg); }

.lessons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-left: 0; }
.lesson-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.lesson-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lesson-card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.lesson-card__title { font-size: 1rem; font-weight: 700; }
.lesson-card__arrow {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.lesson-card__arrow svg { width: 1rem; height: 1rem; }
.lesson-card:hover .lesson-card__arrow { background: var(--primary-light); color: var(--primary); transform: translateX(3px); }
.lesson-card__desc { font-size: 0.8rem; color: var(--muted-fg); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Module border colours (lesson cards) */
.lesson-card--violet  { border-left-color: #7c3aed; }
.lesson-card--blue    { border-left-color: #3b82f6; }
.lesson-card--emerald { border-left-color: #10b981; }
.lesson-card--amber   { border-left-color: #f59e0b; }
.lesson-card--rose    { border-left-color: #f43f5e; }
.lesson-card--violet:hover  { border-color: #7c3aed; }
.lesson-card--blue:hover    { border-color: #3b82f6; }
.lesson-card--emerald:hover { border-color: #10b981; }
.lesson-card--amber:hover   { border-color: #f59e0b; }
.lesson-card--rose:hover    { border-color: #f43f5e; }

/* Modal content styles */
.lesson-explanation { font-size: 1.05rem; line-height: 1.75; color: var(--foreground); margin-bottom: 1.75rem; }
.example-box {
  background: var(--amber-light);
  border: 1px solid hsl(38,100%,80%);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}
.example-box__label { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: hsl(38,100%,30%); font-size: 0.9rem; margin-bottom: 0.75rem; }
.example-box__label svg { width: 1.1rem; height: 1.1rem; }
.example-box p { color: hsl(38,80%,25%); font-size: 0.95rem; line-height: 1.6; }
.key-points__label { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.05rem; margin-bottom: 1rem; }
.key-points__label svg { width: 1.2rem; height: 1.2rem; color: var(--primary); }
.key-points li { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; font-size: 0.95rem; color: var(--muted-fg); }
.key-points li svg { width: 1.1rem; height: 1.1rem; color: var(--primary); flex-shrink: 0; margin-top: 0.15rem; }
.modal-divider { border: none; border-top: 1px solid var(--border); margin: 1.75rem 0; }
.mini-quiz { background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.mini-quiz__label { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; margin-bottom: 1.25rem; }
.mini-quiz__label svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.mini-quiz__question { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; }
.quiz-option {
  width: 100%;
  text-align: left;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}
.quiz-option:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-light); }
.quiz-option.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }
.quiz-option.correct { border-color: var(--green); background: var(--green-light); color: hsl(152,75%,20%); }
.quiz-option.wrong   { border-color: var(--red); background: var(--red-light); color: hsl(0,84%,30%); }
.quiz-option.dimmed  { opacity: 0.45; pointer-events: none; }
.quiz-option svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.quiz-option:disabled { cursor: default; }
.quiz-submit { margin-top: 1rem; }
.quiz-result {
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  animation: fadeIn 0.3s ease;
}
.quiz-result--correct { background: var(--green-light); border: 1px solid hsl(152,75%,70%); }
.quiz-result--wrong   { background: var(--red-light);   border: 1px solid hsl(0,84%,75%); }
.quiz-result__status  { font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.375rem; }
.quiz-result__status svg { width: 1rem; height: 1rem; }
.quiz-result--correct .quiz-result__status { color: hsl(152,75%,25%); }
.quiz-result--wrong   .quiz-result__status { color: hsl(0,84%,35%); }
.quiz-result p { font-size: 0.875rem; line-height: 1.55; }
.quiz-result-close-btn { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.08); }

/* ============================================================
   21. TOOLS PAGE
   ============================================================ */
.tools-header { display: flex; align-items: center; gap: 0.75rem; }
.tools-header svg { width: 2.25rem; height: 2.25rem; color: var(--primary); }
.calc-card { position: relative; }
.calc-card__top-bar { position: absolute; top: 0; left: 0; width: 100%; height: 6px; border-radius: var(--radius) var(--radius) 0 0; }
.calc-card__top-bar--violet  { background: linear-gradient(90deg, #7c3aed, #9333ea); }
.calc-card__top-bar--amber   { background: linear-gradient(90deg, #fbbf24, #f97316); }
.calc-card__top-bar--emerald { background: linear-gradient(90deg, #34d399, #0d9488); }
.calc-card-header { padding: 2rem 1.75rem 1rem; border-bottom: 1px solid var(--border); background: var(--muted); }
.calc-card-header h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.3rem; }
.calc-card-header p  { color: var(--muted-fg); font-size: 0.9rem; }
.calc-card-body { padding: 2rem 1.75rem; }
.calc-grid-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.calc-grid-wide { display: grid; grid-template-columns: 5fr 7fr; gap: 2.5rem; align-items: start; }
.budget-summary {
  background: var(--secondary);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.budget-summary h3 { font-size: 1.1rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.summary-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.summary-tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; text-align: center; box-shadow: var(--shadow-sm); }
.summary-tile--green  { background: linear-gradient(135deg, #d1fae5, #ecfdf5); border-color: #a7f3d0; }
.summary-tile--yellow { background: linear-gradient(135deg, #fef9c3, #fffde7); border-color: #fde68a; }
.summary-tile--red    { background: linear-gradient(135deg, #fee2e2, #fff1f2); border-color: #fecaca; }
.summary-tile p { font-size: 0.75rem; font-weight: 500; color: var(--muted-fg); margin-bottom: 0.25rem; }
.summary-tile .tile-value { font-size: 1.5rem; font-weight: 900; color: var(--foreground); }
.savings-rate-row { display: flex; justify-content: space-between; font-size: 0.825rem; font-weight: 600; margin-bottom: 0.5rem; }
.savings-note { font-size: 0.8rem; color: var(--muted-fg); text-align: center; margin-top: 0.625rem; }

.compound-result {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}
.compound-result p  { font-size: 0.8rem; font-weight: 500; color: rgba(255,255,255,0.8); margin-bottom: 0.25rem; }
.compound-result .future-value { font-size: 2.5rem; font-weight: 900; color: #fff; margin-bottom: 0.375rem; }
.compound-result .contribution-note { font-size: 0.8rem; color: rgba(255,255,255,0.9); }
.compound-result .contribution-note strong { color: #fff; }
.compound-result .contribution-note .interest-amount { color: #fcd34d; font-weight: 700; }
.chart-container { height: 280px; position: relative; }

.savings-result { background: var(--secondary); border: 1px solid var(--primary-border); border-radius: var(--radius); padding: 2rem; text-align: center; }
.savings-result p.preamble { color: var(--muted-fg); margin-bottom: 0.75rem; }
.savings-result .months-value { font-size: 3.5rem; font-weight: 900; line-height: 1; margin-bottom: 0.25rem; }
.savings-result .months-value span.unit { font-size: 1.25rem; font-weight: 700; color: var(--muted-fg); margin-left: 0.25rem; }
.savings-result .years-note { font-size: 0.8rem; color: var(--muted-fg); margin-bottom: 2rem; }
.goal-reached { font-size: 1.75rem; font-weight: 800; color: var(--green); margin-bottom: 1.5rem; }
.progress-labels { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; }
.progress-pct { font-size: 0.875rem; font-weight: 700; color: hsl(152,75%,35%); margin-top: 0.5rem; }

/* ============================================================
   22. QUIZ PAGE (full-page)
   ============================================================ */
.quiz-start-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 580px;
  margin: 0 auto 4rem;
  box-shadow: var(--shadow-md);
}
.quiz-start-icon {
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.quiz-start-icon svg { width: 2.5rem; height: 2.5rem; color: #fff; }
.quiz-start-card h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 1.5rem; }
.quiz-start-info { margin: 0 0 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.quiz-start-info li { font-size: 1rem; color: var(--muted-fg); }

.quiz-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.875rem;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #9333ea);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}
.quiz-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-fg);
  margin-bottom: 1.25rem;
}
.quiz-question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}
.quiz-question-text {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 1.5rem;
}
.quiz-nav { display: flex; justify-content: flex-end; margin-top: 1.25rem; }

/* Feedback box used in quiz */
#quiz-feedback {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
#quiz-feedback.correct { background: var(--green-light); border: 1px solid hsl(152,75%,70%); color: hsl(152,75%,20%); }
#quiz-feedback.wrong   { background: var(--red-light);   border: 1px solid hsl(0,84%,75%);   color: hsl(0,84%,30%); }

/* Results */
.quiz-results-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 540px;
  margin: 0 auto 4rem;
  box-shadow: var(--shadow-md);
  animation: fadeInScale 0.4s ease;
}
.quiz-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  line-height: 1;
}
.quiz-results-card h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 1rem; }
.quiz-score-display {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1;
}
#quiz-results-msg { color: var(--muted-fg); margin-bottom: 2rem; font-size: 1rem; }
.quiz-results-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   23. RESOURCES PAGE
   ============================================================ */
.resources-section { margin-bottom: 3.5rem; }
.resources-section__title {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.resources-section__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.resources-section__icon svg { width: 1.1rem; height: 1.1rem; }
.resources-section__icon--violet  { background: #ede9fe; color: #7c3aed; }
.resources-section__icon--blue    { background: #dbeafe; color: #1d4ed8; }
.resources-section__icon--emerald { background: #d1fae5; color: #059669; }
.resources-section__icon--amber   { background: #fef3c7; color: #b45309; }
.resources-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.resource-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  color: var(--foreground);
  text-decoration: none;
}
.resource-card:hover { box-shadow: var(--shadow-md); border-color: rgba(124,58,237,0.3); transform: translateY(-2px); }
.resource-card--no-link { cursor: default; }
.resource-card--no-link:hover { transform: none; }
.resource-card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.resource-card__top svg { width: 1rem; height: 1rem; color: var(--muted-fg); flex-shrink: 0; margin-top: 0.15rem; }
.resource-card h3 { font-size: 0.95rem; font-weight: 700; flex: 1; }
.resource-card p  { font-size: 0.825rem; color: var(--muted-fg); line-height: 1.55; }
.resource-author  { font-size: 0.775rem; font-weight: 600; color: var(--primary); }
.resource-tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--muted);
  color: var(--muted-fg);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ============================================================
   24. ABOUT PAGE
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.about-card h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.875rem; }
.about-card p  { font-size: 0.9rem; color: var(--muted-fg); line-height: 1.7; margin-bottom: 0.75rem; }
.about-card p:last-child { margin-bottom: 0; }
.about-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.about-card__icon svg { width: 1.4rem; height: 1.4rem; color: #fff; }
.about-card__icon--violet  { background: linear-gradient(135deg, #7c3aed, #9333ea); }
.about-card__icon--emerald { background: linear-gradient(135deg, #34d399, #0d9488); }
.about-card__icon--amber   { background: linear-gradient(135deg, #fbbf24, #f97316); }
.about-card__icon--rose    { background: linear-gradient(135deg, #fb7185, #ec4899); }
.about-list { display: flex; flex-direction: column; gap: 0.5rem; padding-left: 0; }
.about-list li { font-size: 0.9rem; color: var(--muted-fg); line-height: 1.6; }
.about-cta-block {
  background: linear-gradient(135deg, #f5f3ff, #faf5ff);
  border: 1px solid #c4b5fd;
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 4rem;
}
.about-cta-block h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.about-cta-block p  { color: var(--muted-fg); margin-bottom: 1.75rem; font-size: 1rem; }

/* ============================================================
   25. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cards-grid-4 { grid-template-columns: 1fr 1fr; }
  .calc-grid-wide { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }
}

@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  .navbar__links  { display: none; }
  .navbar__cta    { display: none; }
  .navbar__mobile-toggle { display: flex; }
  .navbar__mobile-menu   { display: block; }
  .footer__grid  { grid-template-columns: 1fr; gap: 2rem; }
  .cards-grid-2  { grid-template-columns: 1fr; }
  .cards-grid-3  { grid-template-columns: 1fr 1fr; }
  .cards-grid-4  { grid-template-columns: 1fr 1fr; }
  .lessons-grid  { grid-template-columns: 1fr; }
  .steps-grid    { grid-template-columns: 1fr; gap: 2rem; }
  .calc-grid-inputs { grid-template-columns: 1fr; }
  .summary-tiles { grid-template-columns: 1fr 1fr; }
  .calc-card-body { padding: 1.5rem 1.25rem; }
  .modal { border-radius: var(--radius); }
  .modal-body { padding: 1.25rem; }
  .hero { padding: 4rem 0 5rem; }
  .big-card { padding: 2rem; }
  .tab-label-full  { display: none; }
  .tab-label-short { display: inline; }
  .about-grid { grid-template-columns: 1fr; }
  .resources-grid { grid-template-columns: 1fr; }
  .quiz-question-card { padding: 1.5rem 1.25rem; }
}

@media (max-width: 480px) {
  .cards-grid-3 { grid-template-columns: 1fr; }
  .cards-grid-4 { grid-template-columns: 1fr; }
  .summary-tiles { grid-template-columns: 1fr; }
  .hero__ctas { flex-direction: column; align-items: center; }
  .hero__ctas .btn { width: 100%; max-width: 300px; }
  .learn-section-row { flex-direction: column; align-items: flex-start; }
  .quiz-results-actions { flex-direction: column; align-items: stretch; }
}
