/* ═══════════════════════════════════════════
   Money Talks — Financial Literacy for Young Adults
   styles.css — Dark Editorial Theme
   ═══════════════════════════════════════════ */

/* ── Custom Properties ── */
:root {
  --bg:           #0b0d0d;
  --bg-alt:       #111414;
  --surface:      #161919;
  --card:         #1c1f1f;
  --card-hover:   #232828;
  --border:       #272c2c;

  --gold:         #f0b429;
  --gold-dim:     #c8941f;
  --mint:         #3ecf8e;
  --blue:         #6f8dff;
  --red:          #ff5c5c;

  --text:         #edeae0;
  --text-2:       #9ba8a8;
  --text-3:       #5a6464;

  --needs-clr:    #f0b429;
  --wants-clr:    #3ecf8e;
  --savings-clr:  #6f8dff;

  --radius:       16px;
  --radius-sm:    10px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', monospace;

  --easing:       cubic-bezier(0.22, 1, 0.36, 1);
  --transition:   0.35s var(--easing);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
input, button { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }
canvas { display: block; }

body.modal-open {
  overflow: hidden;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ─────────────────────────────────────────
   SCROLL PROGRESS BAR
───────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--mint));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ─────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 13, 13, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
}
.hamburger:hover { background: rgba(255,255,255,0.08); }
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.5rem 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--easing);
}
.mobile-nav.open { max-height: 400px; }
.mob-link {
  display: block;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s, padding-left 0.2s;
  border-bottom: 1px solid var(--border);
}
.mob-link:last-child { border-bottom: none; }
.mob-link:hover { color: var(--gold); padding-left: 2.5rem; }

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 2rem 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-dots {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(240, 180, 41, 0.12) 1px, transparent 0);
  background-size: 44px 44px;
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.glow-1 {
  width: 500px; height: 500px;
  top: -100px; left: -100px;
  background: radial-gradient(circle, rgba(240,180,41,0.12) 0%, transparent 70%);
  animation: floatGlow 8s ease-in-out infinite alternate;
}
.glow-2 {
  width: 400px; height: 400px;
  bottom: 0; right: -80px;
  background: radial-gradient(circle, rgba(62,207,142,0.1) 0%, transparent 70%);
  animation: floatGlow 10s ease-in-out infinite alternate-reverse;
}
.glow-3 {
  width: 300px; height: 300px;
  top: 50%; left: 55%;
  background: radial-gradient(circle, rgba(111,141,255,0.08) 0%, transparent 70%);
  animation: floatGlow 12s ease-in-out infinite alternate;
}

@keyframes floatGlow {
  from { transform: translate(0,0); }
  to   { transform: translate(30px, 20px); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
}

.hero-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}
.hero-heading span {
  display: block;
  opacity: 0;
}
.gold-text { color: var(--gold); font-style: italic; }

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-2);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  opacity: 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-3);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 1;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-3), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--gold);
  color: #0b0d0d;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 100px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-gold:hover {
  background: #ffc533;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(240,180,41,0.35);
}
.btn-gold:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.btn-ghost:hover {
  border-color: var(--text-2);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

.btn-ghost-small {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.5rem;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}
.btn-ghost-small:hover { border-color: var(--text-2); color: var(--text); }

/* ─────────────────────────────────────────
   STATS BAR
───────────────────────────────────────── */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem;
}
.stats-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.stat {
  text-align: center;
  flex: 1;
  min-width: 140px;
  opacity: 0;
}
.stat-top {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.1rem;
  margin-bottom: 0.4rem;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.8rem;
  color: var(--gold);
  line-height: 1;
}
.stat-sym {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--gold);
}
.stat p {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.4;
  max-width: 130px;
  margin: 0 auto;
}
.stat-sep {
  width: 1px;
  height: 50px;
  background: var(--border);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   SECTIONS (shared)
───────────────────────────────────────── */
.section {
  padding: 100px 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.dark-section {
  max-width: 100%;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 100px 2rem;
}
.dark-section > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

.section-head { text-align: center; margin-bottom: 4rem; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  opacity: 0;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  opacity: 0;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto;
  opacity: 0;
}

/* ─────────────────────────────────────────
   CHALLENGE CARDS
───────────────────────────────────────── */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.c-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
  opacity: 0;
}
.c-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(240,180,41,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.c-card > * {
  position: relative;
  z-index: 1;
}
.c-card:hover {
  border-color: rgba(240,180,41,0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.c-card:hover::before { opacity: 1; }

.c-card--wide {
  grid-column: 1 / -1;
}
.c-card--wide .c-body ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
}

.c-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.c-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1;
}
.c-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.c-preview {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

/* Hidden challenge body used inside modal */
.c-body {
  display: none;
}
.c-body p { font-size: 0.9rem; color: var(--text-2); margin-bottom: 0.9rem; line-height: 1.65; }
.c-body p strong { color: var(--text); }
.c-body ul { margin: 0.6rem 0 1rem 0; }
.c-body li {
  font-size: 0.875rem;
  color: var(--text-2);
  padding: 0.35rem 0 0.35rem 1.2rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.c-body li:last-child { border-bottom: none; }
.c-body li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.8rem;
}
.c-body li strong { color: var(--text); }

.c-takeaway {
  background: rgba(240,180,41,0.07);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.85rem 1rem;
  margin-top: 1rem;
}
.kt-tag {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}
.c-takeaway p {
  font-size: 0.875rem !important;
  color: var(--text) !important;
  margin: 0 !important;
  font-style: italic;
}

.c-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold);
  transition: gap 0.2s;
  position: relative;
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
}
.c-toggle:hover { gap: 0.6rem; }
.c-arrow {
  display: inline-block;
  transition: transform 0.35s var(--easing);
}
.c-toggle:hover .c-arrow { transform: translate(2px, -2px); }

/* Challenge resources */
.challenge-resources {
  margin-top: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  opacity: 0;
}
.challenge-resources__head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.75rem;
}
.challenge-resources__eyebrow {
  opacity: 1;
  margin-bottom: 0.8rem;
}
.challenge-resources__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.challenge-resources__desc {
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.7;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.resource-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.resource-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240,180,41,0.32);
  box-shadow: 0 12px 36px rgba(0,0,0,0.24);
}
.resource-card__icon { font-size: 1.6rem; }
.resource-card__meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.resource-card h4 {
  font-size: 1.02rem;
  line-height: 1.35;
}
.resource-card p {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.65;
  flex: 1;
}
.resource-card__cta {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.88rem;
}

/* Challenge modal */
.challenge-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.challenge-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.challenge-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 8, 8, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.challenge-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: linear-gradient(180deg, rgba(28,31,31,0.98), rgba(17,20,20,0.98));
  border: 1px solid rgba(240,180,41,0.18);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
  padding: 2rem 2rem 1.8rem;
}
.challenge-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}
.challenge-modal__close:hover {
  background: rgba(255,255,255,0.12);
  transform: scale(1.04);
}
.challenge-modal__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.challenge-modal__hero {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.challenge-modal__number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-3);
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.challenge-modal__icon { font-size: 2rem; }
.challenge-modal__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
}
.challenge-modal__preview {
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.4rem;
}
.challenge-modal__content p {
  font-size: 0.98rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.challenge-modal__content p strong,
.challenge-modal__content li strong {
  color: var(--text);
}
.challenge-modal__content ul {
  margin: 0.8rem 0 1rem;
  display: grid;
  gap: 0.35rem;
}
.challenge-modal__content li {
  color: var(--text-2);
  padding: 0.55rem 0 0.55rem 1.35rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.challenge-modal__content li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gold);
}
.challenge-modal__content .c-takeaway {
  margin-top: 1.2rem;
}

/* ─────────────────────────────────────────
   TOOL SECTIONS (shared)
───────────────────────────────────────── */
.tool-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
  opacity: 0;
}
.tool-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.optional-note {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-3);
}
.form-group input[type="number"],
.form-group input[type="text"] {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.12);
}
.form-group input::placeholder { color: var(--text-3); }

.input-prefix-wrap {
  position: relative;
}
.input-prefix {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 1rem;
  font-weight: 600;
  pointer-events: none;
}
.input-prefix-wrap input { padding-left: 1.8rem; }

/* ─────────────────────────────────────────
   BUDGET TOOL
───────────────────────────────────────── */
.sliders-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.sliders-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 1rem;
}
.slider-row {
  margin-bottom: 1rem;
}
.slider-row:last-child { margin-bottom: 0; }
.slider-row label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.5rem;
}
.pct-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-weight: 600;
}
.needs-badge  { background: rgba(240,180,41,0.15); color: var(--needs-clr); }
.wants-badge  { background: rgba(62,207,142,0.15); color: var(--wants-clr); }
.savings-badge { background: rgba(111,141,255,0.15); color: var(--savings-clr); }

/* Range Sliders */
.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s;
}
.custom-range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.needs-range { background: linear-gradient(to right, var(--needs-clr) 0%, var(--needs-clr) 50%, var(--border) 50%); }
.needs-range::-webkit-slider-thumb { background: var(--needs-clr); }
.wants-range { background: linear-gradient(to right, var(--wants-clr) 0%, var(--wants-clr) 30%, var(--border) 30%); }
.wants-range::-webkit-slider-thumb { background: var(--wants-clr); }

/* Savings read-only bar */
.savings-readonly-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin: 0.5rem 0 0.3rem;
}
.savings-readonly-fill {
  height: 100%;
  background: var(--savings-clr);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.savings-auto-note {
  font-size: 0.72rem;
  color: var(--text-3);
  font-style: italic;
}

.split-warning {
  background: rgba(255,92,92,0.1);
  border: 1px solid rgba(255,92,92,0.3);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  color: var(--red);
  margin-bottom: 1rem;
}

/* Budget Chart Output */
.tool-output {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.chart-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  flex-shrink: 0;
}
.chart-center-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
#chartCenterLabel {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-2);
}

.budget-legend { width: 100%; }
.legend-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.legend-row:last-child { border-bottom: none; }
.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.needs-dot   { background: var(--needs-clr); }
.wants-dot   { background: var(--wants-clr); }
.savings-dot { background: var(--savings-clr); }

.legend-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}
.legend-label {
  font-size: 0.85rem;
  color: var(--text-2);
}
.legend-amount {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.legend-hint {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-2);
  padding: 0.75rem;
  background: rgba(62,207,142,0.07);
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid rgba(62,207,142,0.15);
}
.legend-hint strong { color: var(--mint); }

/* ─────────────────────────────────────────
   SAVINGS TOOL
───────────────────────────────────────── */
.savings-result {
  display: none;
  text-align: center;
}
.savings-result.visible { display: block; }
.savings-placeholder {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-3);
}
.placeholder-icon { font-size: 3rem; margin-bottom: 1rem; }
.savings-placeholder p { font-size: 0.9rem; line-height: 1.6; }
.savings-placeholder strong { color: var(--gold); }

.sr-goal-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-months-display {
  margin-bottom: 0.5rem;
}
.sr-months-num {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.sr-months-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}
.sr-target-date {
  font-size: 0.9rem;
  color: var(--mint);
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.sr-progress-track {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.sr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--mint));
  border-radius: 4px;
  transition: width 1s var(--easing);
}
.sr-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-3);
  margin-bottom: 1.5rem;
}
.sr-breakdown {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sr-bd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.sr-bd-row:last-child { border-bottom: none; }
.sr-bd-row span { color: var(--text-2); }
.sr-bd-row strong { font-family: var(--font-mono); font-size: 0.9rem; }
.accent-row strong { color: var(--mint); }
.total-row { background: rgba(240,180,41,0.07); }
.total-row strong { color: var(--gold); font-size: 1rem; }

/* ─────────────────────────────────────────
   QUIZ
───────────────────────────────────────── */
.quiz-box {
  max-width: 680px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  opacity: 0;
}

.quiz-meta { margin-bottom: 1.5rem; }
.quiz-counter {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.6rem;
}
.quiz-prog-track {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.quiz-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--mint));
  border-radius: 2px;
  transition: width 0.5s var(--easing);
}

.quiz-question {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1.75rem;
  min-height: 2.8rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.quiz-opt {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  text-align: left;
  font-size: 0.95rem;
  color: var(--text);
  width: 100%;
}
.quiz-opt:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(240,180,41,0.05);
  transform: translateX(3px);
}
.quiz-opt:disabled { cursor: default; }
.quiz-opt.correct {
  border-color: var(--mint);
  background: rgba(62,207,142,0.1);
}
.quiz-opt.wrong {
  border-color: var(--red);
  background: rgba(255,92,92,0.08);
}
.opt-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  flex-shrink: 0;
  transition: background 0.2s;
}
.quiz-opt.correct .opt-letter { background: var(--mint); color: #0b0d0d; }
.quiz-opt.wrong   .opt-letter { background: var(--red);  color: #fff; }

.quiz-feedback {
  min-height: 1.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  transition: opacity 0.3s;
}
.quiz-feedback.correct { color: var(--mint); }
.quiz-feedback.wrong   { color: var(--red);  }

.quiz-next-btn {
  margin-top: 0.5rem;
  animation: fadeSlideIn 0.3s ease;
}

/* Quiz Result */
.quiz-result { text-align: center; padding: 1rem 0; }
.result-ring {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 1.75rem;
}
.result-ring-inner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.result-score-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.result-score-den {
  font-size: 1rem;
  color: var(--text-3);
}
.result-grade {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.result-msg {
  color: var(--text-2);
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────
   TIPS GRID
───────────────────────────────────────── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.tip-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.3s;
  opacity: 0;
}
.tip-card:hover {
  border-color: rgba(240,180,41,0.25);
  transform: translateY(-3px);
}
.tip-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  line-height: 1;
}
.tip-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.tip-card p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 5rem 2rem 2rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.footer-logo span { color: var(--gold); }
.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 280px;
}
.footer-col h5 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1.25rem;
}
.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-2);
  padding: 0.3rem 0;
  transition: color 0.2s, padding-left 0.2s;
}
.footer-col a:hover { color: var(--gold); padding-left: 4px; }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ─────────────────────────────────────────
   REVEAL ANIMATIONS
───────────────────────────────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--easing), transform 0.75s var(--easing);
  transition-delay: var(--d, 0s);
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1024px) {
  .challenges-grid { grid-template-columns: repeat(2, 1fr); }
  .c-card--wide { grid-column: 1 / -1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: flex; }

  .hero-heading { font-size: clamp(2.5rem, 10vw, 4rem); }

  .stats-container { flex-direction: column; gap: 1.5rem; }
  .stat-sep { width: 60px; height: 1px; }

  .challenges-grid { grid-template-columns: 1fr; }
  .c-card--wide .c-body ul { grid-template-columns: 1fr; }

  .tool-wrap { grid-template-columns: 1fr; }
  .chart-wrap { margin: 0 auto; }

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

  .quiz-box { padding: 1.75rem; }
  .quiz-question { font-size: 1.15rem; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1; }

  .hero-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 500px) {
  .tips-grid { grid-template-columns: 1fr; }
  .hero { padding: 100px 1.25rem 60px; }
  .section { padding: 70px 1.25rem; }
  .dark-section { padding: 70px 1.25rem; }
  .section-title { font-size: 2rem; }
  .quiz-box { padding: 1.25rem; }
  .tool-panel { padding: 1.25rem; }
}


@media (max-width: 900px) {
  .challenge-resources__head,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .challenge-modal__dialog {
    padding: 1.5rem 1.2rem 1.3rem;
    border-radius: 20px;
  }
}

@media (max-width: 640px) {
  .challenge-modal {
    padding: 0.9rem;
  }

  .challenge-modal__title {
    font-size: 1.7rem;
  }

  .challenge-modal__preview,
  .challenge-modal__content p,
  .challenge-modal__content li {
    font-size: 0.92rem;
  }
}
