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

:root { --f-accent: #22c55e; }

#f-root {
  font-family: 'Space Grotesk', sans-serif;
  background: #0a0a0f;
  color: #f0f0f5;
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
  position: relative;
  z-index: 1;
}

/* ── BG ── */
.f-bg {
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  pointer-events: none;
  z-index: 0;
  background: #0a0a0f;
  overflow: hidden;
}
.f-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.1;
  will-change: transform;
}
.f-bg-blob:nth-child(1) {
  width: 500px; height: 500px;
  background: #22c55e;
  top: -150px; left: -100px;
  animation: f-blob 25s ease-in-out infinite;
}
.f-bg-blob:nth-child(2) {
  width: 350px; height: 350px;
  background: #16a34a;
  bottom: 10%; right: -80px;
  animation: f-blob 30s ease-in-out infinite reverse;
}
@keyframes f-blob {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(30px,-40px) scale(1.1); }
}

/* ── NAV ── */
.f-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.f-nav a { color: #22c55e; text-decoration: none; font-size: 0.9rem; font-weight: 600; }

/* ── HERO ── */
.f-hero { text-align: center; margin-bottom: 2rem; }
.f-eyebrow { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: #22c55e; margin-bottom: 0.75rem; font-weight: 600; }
.f-h1 {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 700; line-height: 1.2; margin: 0 0 1rem;
  background: linear-gradient(135deg, #fff 0%, #86efac 40%, #22c55e 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.f-sub { color: #888899; font-size: 1rem; max-width: 480px; margin: 0 auto; line-height: 1.65; }

/* ── FORM ── */
.f-form {
  background: rgba(17,17,24,0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.f-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.25rem; }
@media(max-width:560px){ .f-form-grid { grid-template-columns: 1fr; } }

.f-field { display: flex; flex-direction: column; gap: 0.45rem; }
.f-field label { font-size: 0.75rem; color: #888899; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.f-field input, .f-field select {
  background: rgba(10,10,15,0.8);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 0.75rem 0.9rem;
  color: #f0f0f5; font-size: 0.95rem; font-family: inherit;
  color-scheme: dark; transition: border-color 0.2s;
}
.f-field input:focus, .f-field select:focus {
  outline: none; border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

/* Target age slider */
.f-slider-wrap { margin-bottom: 1.25rem; }
.f-slider-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.f-slider-label { font-size: 0.75rem; color: #888899; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.f-slider-val { font-size: 1.2rem; font-weight: 700; color: #22c55e; }
#f-target-age { width: 100%; accent-color: #22c55e; cursor: pointer; height: 6px; }
.f-slider-scale { display: flex; justify-content: space-between; font-size: 0.65rem; color: #888899; margin-top: 0.3rem; }

/* Advanced toggle */
.f-advanced-toggle {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: #888899; cursor: pointer;
  margin-bottom: 1rem; padding: 0.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1rem; margin-top: 0.25rem;
}
.f-advanced-toggle:hover { color: #22c55e; }
.f-advanced-content { display: none; margin-bottom: 1rem; }
.f-advanced-content.open { display: block; }

/* Buttons */
#f-btn {
  width: 100%;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #0a0a0f !important; -webkit-text-fill-color: #0a0a0f !important;
  border: none; border-radius: 12px; padding: 1rem;
  font-size: 1rem; font-weight: 700; font-family: inherit;
  cursor: pointer; text-transform: uppercase; letter-spacing: 0.05em;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(34,197,94,0.35);
  margin-bottom: 0.75rem; position: relative; overflow: hidden;
}
#f-btn::after {
  content: ''; position: absolute;
  top: -50%; left: -60%; width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg); transition: left 0.6s;
}
#f-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(34,197,94,0.5); }
#f-btn:hover::after { left: 160%; }
#f-btn:disabled { opacity: 0.7; cursor: wait; }

#f-reset {
  width: 100%; background: transparent;
  color: #888899 !important; -webkit-text-fill-color: #888899 !important;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 0.7rem; font-size: 0.85rem; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all 0.2s;
}
#f-reset:hover { border-color: rgba(255,255,255,0.2); color: #f0f0f5 !important; -webkit-text-fill-color: #f0f0f5 !important; }

/* ── OUTPUT ── */
.f-hidden { display: none !important; }

@keyframes f-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.f-header {
  background: rgba(17,17,24,0.9);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: 18px; padding: 1.75rem;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap;
  gap: 1.5rem; margin-bottom: 0.75rem;
  animation: f-fade-up 0.5s both;
}
.f-fire-date { }
.f-fire-year { font-size: 3.5rem; font-weight: 700; color: #22c55e; line-height: 1; }
.f-fire-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: #888899; margin-top: 0.3rem; }
.f-fire-sub { font-size: 0.88rem; color: #b0b0c0; margin-top: 0.2rem; }

.f-health-score { text-align: center; }
.f-score-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: #888899; margin-top: 0.3rem; }
.f-score-grade { font-size: 0.82rem; font-weight: 700; margin-top: 0.1rem; }

/* Metrics */
.f-metrics-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 0.65rem;
  margin-bottom: 0.75rem;
}
@media(max-width:560px){ .f-metrics-grid { grid-template-columns: repeat(2,1fr); } }

.f-metric-card {
  background: rgba(17,17,24,0.85);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; padding: 1.1rem;
  border-top: 3px solid var(--f-accent, #22c55e);
  animation: f-fade-up 0.5s both;
  transition: transform 0.2s, box-shadow 0.2s;
}
.f-metric-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.f-metric-icon { font-size: 1.3rem; margin-bottom: 0.5rem; }
.f-metric-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--f-accent, #22c55e); font-weight: 700; margin-bottom: 0.3rem; }
.f-metric-value { font-size: 1.1rem; font-weight: 700; color: #f0f0f5; margin-bottom: 0.2rem; }
.f-metric-sub { font-size: 0.7rem; color: #888899; line-height: 1.4; }

/* Sections */
.f-section {
  background: rgba(17,17,24,0.85);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 1.4rem;
  margin-bottom: 0.75rem;
  animation: f-fade-up 0.5s both;
}
.f-section-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #888899; margin-bottom: 1rem; }

/* Progress */
.f-progress-wrap { margin-bottom: 1rem; }
.f-progress-bar-bg { background: rgba(255,255,255,0.06); border-radius: 100px; height: 10px; overflow: hidden; margin-bottom: 0.4rem; }
.f-progress-bar-fill { height: 100%; background: linear-gradient(90deg, #16a34a, #22c55e); border-radius: 100px; animation: f-bar-grow 1s ease both; }
@keyframes f-bar-grow { from { width: 0 !important; } }
.f-progress-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: #888899; }

.f-fire-types { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem; }
.f-fire-type { display: flex; align-items: center; gap: 0.5rem; }
.f-fire-type-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.f-fire-type-name { font-size: 0.72rem; color: #888899; }
.f-fire-type-val { font-size: 0.88rem; font-weight: 700; color: #f0f0f5; }

/* Three paths */
.f-paths { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.65rem; }
@media(max-width:500px){ .f-paths { grid-template-columns: 1fr; } }
.f-path-card {
  border: 1px solid; border-radius: 14px; padding: 1.1rem; text-align: center;
  transition: transform 0.2s;
}
.f-path-card:hover { transform: translateY(-2px); }
.f-path-icon { font-size: 1.4rem; margin-bottom: 0.4rem; }
.f-path-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-bottom: 0.5rem; }
.f-path-year { font-size: 1.8rem; font-weight: 700; color: #f0f0f5; line-height: 1; }
.f-path-age { font-size: 0.75rem; color: #888899; margin-bottom: 0.4rem; }
.f-path-saved { font-size: 0.8rem; }

/* Insight grid */
.f-insight-section { border-color: rgba(34,197,94,0.15) !important; }
.f-insight-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.65rem; }
@media(max-width:480px){ .f-insight-grid { grid-template-columns: 1fr; } }
.f-insight-card { background: rgba(10,10,15,0.6); border-radius: 12px; padding: 1rem; text-align: center; }
.f-insight-num { font-size: 1.5rem; font-weight: 700; color: #22c55e; margin-bottom: 0.3rem; }
.f-insight-label { font-size: 0.78rem; font-weight: 600; color: #f0f0f5; margin-bottom: 0.2rem; }
.f-insight-sub { font-size: 0.68rem; color: #888899; }

/* Steps */
.f-steps { display: flex; flex-direction: column; gap: 0.65rem; }
.f-step { display: flex; align-items: flex-start; gap: 0.75rem; }
.f-step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: #22c55e; color: #0a0a0f;
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 0.05rem;
}
.f-step-text { font-size: 0.85rem; color: #b0b0c0; line-height: 1.55; }

/* Share */
.f-share { text-align: center; }
.f-share-label { font-size: 0.75rem; color: #888899; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; font-weight: 600; }
.f-share-btns { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.f-share-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.55rem 1.1rem; border-radius: 100px;
  font-size: 0.82rem; font-weight: 600; font-family: inherit;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform 0.15s, opacity 0.15s;
}
.f-share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.f-share-tw { background: #000; color: #fff; }
.f-share-tg { background: #229ED9; color: #fff; }
.f-share-wa { background: #25D366; color: #fff; }

/* SEO */
.f-seo { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 3rem; padding-top: 2rem; }
.f-seo h2 { font-size: 1.2rem; font-weight: 700; color: #f0f0f5; margin: 0 0 1rem; }
.f-seo h3 { font-size: 0.95rem; font-weight: 600; color: #f0f0f5; margin: 1.5rem 0 0.5rem; }
.f-seo p { font-size: 0.88rem; color: #888899; line-height: 1.75; margin: 0 0 0.75rem; }
.f-faq-item { border-bottom: 1px solid rgba(255,255,255,0.05); padding: 0.9rem 0; }
.f-faq-q { font-size: 0.88rem; font-weight: 600; color: #f0f0f5; margin-bottom: 0.35rem; }
.f-faq-a { font-size: 0.82rem; color: #888899; line-height: 1.7; }

/* ── ENHANCEMENTS v2 ── */

/* JetBrains Mono for numbers */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

.f-fire-year,
.f-metric-value,
.f-insight-num,
.f-path-year {
  font-family: 'JetBrains Mono', 'Space Grotesk', monospace;
  font-variant-numeric: tabular-nums;
}

/* Button pulse when form ready */
#f-btn.f-btn-ready {
  animation: f-btn-pulse 2s ease-in-out infinite;
}
@keyframes f-btn-pulse {
  0%,100% { box-shadow: 0 4px 24px rgba(34,197,94,0.35); }
  50%      { box-shadow: 0 4px 40px rgba(34,197,94,0.7), 0 0 60px rgba(34,197,94,0.25); }
}

/* Countdown */
.f-countdown-wrap {
  font-size: 0.75rem;
  color: #22c55e;
  margin-top: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}

/* Confetti keyframe */
@keyframes f-confetti-fall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── CRITICAL FIXES ── */

/* Input text always white */
#f-root input,
#f-root select {
  color: #f0f0f5 !important;
  -webkit-text-fill-color: #f0f0f5 !important;
  background: rgba(10,10,15,0.8) !important;
}

/* Number inputs spinner color */
#f-root input[type="number"] {
  color-scheme: dark;
}

/* Main calculate button — always dark text */
#f-btn {
  color: #0a0a0f !important;
  -webkit-text-fill-color: #0a0a0f !important;
}

/* Results sections always visible */
.f-section,
.f-metric-card,
.f-path-card,
.f-insight-card,
.f-header {
  opacity: 1 !important;
  visibility: visible !important;
  color: #f0f0f5 !important;
}

/* Fix bg not covering content */
.f-bg { z-index: -1 !important; }

/* Related calculators */
.wp-block-latest-posts li {
  background: #111118 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px !important;
  padding: 1rem !important;
}
