/* ═══════════════════════════════════════════════════
   GAMIFICATION v5 — Mobile-native, Inter, minimal
═══════════════════════════════════════════════════ */

/* ─────────────────────────────────────
   ANIMATIONS
───────────────────────────────────── */
@keyframes slideInRight {
  from { transform: translateX(28px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideInLeft {
  from { transform: translateX(-28px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes popIn {
  0%   { transform: scale(0.86) translateY(8px); opacity: 0; }
  70%  { transform: scale(1.03) translateY(0); }
  100% { transform: scale(1) translateY(0);     opacity: 1; }
}

.fc-enter-right { animation: slideInRight var(--t-card) both; }
.fc-enter-left  { animation: slideInLeft  var(--t-card) both; }

/* ─────────────────────────────────────
   CARD SHELL — flex column, fills stage
───────────────────────────────────── */
.fc-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--ob-bg);
  overflow: hidden;
}

/* ─────────────────────────────────────
   FC-BODY — scrollable content area
───────────────────────────────────── */
.fc-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 40px var(--card-px) 24px;
  /* Content starts at top */
  display: flex;
  flex-direction: column;
}

/* Centered body for splash / interstitials / survival */
.fc-body.centered {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 24px;
  padding-bottom: 24px;
}

/* ─────────────────────────────────────
   FC-NAV — fixed bottom CTA
───────────────────────────────────── */
.fc-nav {
  flex-shrink: 0;
  padding: 14px var(--card-px);
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--ob-bg);
  border-top: 1px solid var(--ob-divider);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─────────────────────────────────────
   SPLASH
───────────────────────────────────── */
.fc-splash-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--ob-accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  box-shadow: 0 8px 24px rgba(124,58,237,0.22);
}

.fc-splash-headline {
  font-size: 28px;
  font-weight: 700;
  color: var(--ob-text);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.fc-splash-sub {
  font-size: 15px;
  color: var(--ob-muted);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* ─────────────────────────────────────
   INTENT — two-option selector
───────────────────────────────────── */
.fc-intent-heading {
  font-size: 26px;
  font-weight: 700;
  color: var(--ob-text);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 6px;
}

.fc-intent-sub {
  font-size: 14px;
  color: var(--ob-muted);
  margin-bottom: 28px;
}

.fc-intent-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fc-intent-opt {
  width: 100%;
  background: var(--ob-bg);
  border: 1.5px solid var(--ob-border);
  border-radius: 16px;
  padding: 18px 16px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  transition: border-color var(--t-fast), background var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

.fc-intent-opt:active { transform: scale(0.985); }

.fc-intent-opt.selected {
  border-color: var(--ob-accent);
  background: var(--ob-accent-bg);
}

.fc-opt-icon {
  font-size: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}

.fc-opt-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ob-text);
  line-height: 1.35;
  margin-bottom: 3px;
}

.fc-opt-desc {
  font-size: 13px;
  color: var(--ob-muted);
  line-height: 1.4;
}

.fc-opt-badge {
  margin-top: 8px;
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--ob-accent-bg);
  color: var(--ob-accent-text);
  letter-spacing: 0.02em;
}

.fc-opt-time {
  font-size: 12px;
  color: var(--ob-subtle);
  font-family: var(--font-mono);
  display: inline-block;
  margin-left: 6px;
}

/* ─────────────────────────────────────
   FIELD CARD CONTENT
───────────────────────────────────── */
.fc-card-icon {
  font-size: 28px;
  line-height: 1;
  display: block;
  margin-bottom: 16px;
}

.fc-heading {
  font-size: 26px;
  font-weight: 700;
  color: var(--ob-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}

.fc-why {
  font-size: 14px;
  color: var(--ob-muted);
  line-height: 1.55;
  margin-bottom: 36px;
}

/* ─────────────────────────────────────
   INPUTS — underline style
───────────────────────────────────── */
.fc-fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fc-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ob-muted);
}

/* INR (₹) input row */
.fc-inr-wrap {
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--ob-border);
  padding-bottom: 8px;
  gap: 4px;
  transition: border-color 200ms;
}

.fc-inr-wrap:focus-within {
  border-bottom-color: var(--ob-accent);
}

.fc-inr-prefix {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--ob-subtle);
  flex-shrink: 0;
  line-height: 1;
  margin-bottom: 2px;
}

.fc-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 500;
  color: var(--ob-text);
  caret-color: var(--ob-accent);
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

.fc-input::placeholder { color: var(--ob-border-2); }

/* Standalone (non-INR) number input */
.fc-input-standalone {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--ob-border);
  outline: none;
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 500;
  color: var(--ob-text);
  caret-color: var(--ob-accent);
  padding-bottom: 8px;
  transition: border-color 200ms;
  -webkit-appearance: none;
  appearance: none;
}

.fc-input-standalone:focus {
  border-bottom-color: var(--ob-accent);
}

.fc-input-standalone::placeholder { color: var(--ob-border-2); }

/* Suffix (%, yrs) inline */
.fc-sfx-wrap {
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--ob-border);
  padding-bottom: 8px;
  gap: 6px;
  transition: border-color 200ms;
}

.fc-sfx-wrap:focus-within { border-bottom-color: var(--ob-accent); }

.fc-input-sfx {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--ob-subtle);
  flex-shrink: 0;
}

/* ─────────────────────────────────────
   PILLS — full-width option cards
───────────────────────────────────── */
.fc-pills {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.fc-pill {
  width: 100%;
  text-align: left;
  background: var(--ob-bg);
  border: 1.5px solid var(--ob-border);
  border-radius: 14px;
  padding: 16px 18px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ob-text);
  cursor: pointer;
  transition: border-color 130ms, background 130ms;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.3;
}

.fc-pill:active { transform: scale(0.985); }

.fc-pill.selected {
  border-color: var(--ob-accent);
  background: var(--ob-accent-bg);
  color: var(--ob-accent-text);
}

/* ─────────────────────────────────────
   STEPPER — +/− for dependents
───────────────────────────────────── */
.fc-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--ob-border);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 8px;
}

.fc-step-btn {
  width: 52px;
  height: 52px;
  border: none;
  background: var(--ob-surface);
  color: var(--ob-text);
  font-size: 22px;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 100ms;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.fc-step-btn:active { background: var(--ob-border); }

.fc-step-val {
  min-width: 68px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--ob-text);
  padding: 0 10px;
  border-left: 1.5px solid var(--ob-border);
  border-right: 1.5px solid var(--ob-border);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────
   LIVE HINT
───────────────────────────────────── */
.fc-live-hint {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 10px;
  min-height: 16px;
  transition: all 200ms;
  color: transparent;
}

.fc-live-hint:empty {
  padding: 0;
  min-height: 0;
  margin-top: 0;
}

.fc-live-hint.good   { background: var(--ob-safe-bg);   color: var(--ob-safe);   }
.fc-live-hint.warn   { background: var(--ob-warn-bg);   color: var(--ob-warn);   }
.fc-live-hint.danger { background: var(--ob-danger-bg); color: var(--ob-danger); }
.fc-live-hint.info   { background: var(--ob-info-bg);   color: var(--ob-info);   }

/* ─────────────────────────────────────
   BUTTONS
───────────────────────────────────── */
.fc-btn-next,
.fc-btn-primary {
  width: 100%;
  height: 54px;
  background: var(--ob-accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background var(--t-fast), transform 80ms;
  -webkit-tap-highlight-color: transparent;
}

.fc-btn-next:active,
.fc-btn-primary:active {
  background: var(--ob-accent-2);
  transform: scale(0.98);
}

.fc-btn-analyze {
  width: 100%;
  height: 56px;
  background: var(--ob-accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(124,58,237,0.28);
  transition: box-shadow var(--t-fast), transform 80ms;
  -webkit-tap-highlight-color: transparent;
}

.fc-btn-analyze:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(124,58,237,0.2);
}

.fc-btn-skip {
  width: 100%;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ob-muted);
  cursor: pointer;
  padding: 4px 0;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--t-fast);
}

.fc-btn-skip:hover,
.fc-btn-skip:active { color: var(--ob-text); }

/* In-card back — hidden, header handles it */
.fc-btn-back { display: none !important; }

/* ─────────────────────────────────────
   INTERSTITIALS
───────────────────────────────────── */
.fc-interstitial-icon {
  font-size: 52px;
  margin-bottom: 20px;
  animation: popIn 0.5s 0.1s both;
  display: block;
}

.fc-interstitial-heading {
  font-size: 24px;
  font-weight: 700;
  color: var(--ob-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.fc-interstitial-sub {
  font-size: 15px;
  color: var(--ob-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.fc-interstitial-insight {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  margin-bottom: 12px;
  line-height: 1.4;
  max-width: 300px;
}

.fc-interstitial-insight.good   { background: var(--ob-safe-bg);   color: var(--ob-safe);   }
.fc-interstitial-insight.warn   { background: var(--ob-warn-bg);   color: var(--ob-warn);   }
.fc-interstitial-insight.danger { background: var(--ob-danger-bg); color: var(--ob-danger); }
.fc-interstitial-insight.info   { background: var(--ob-info-bg);   color: var(--ob-info);   }

/* ─────────────────────────────────────
   SURVIVAL REVEAL
───────────────────────────────────── */
.fc-survival-icon {
  font-size: 60px;
  margin-bottom: 16px;
  animation: popIn 0.5s 0.1s both;
  display: block;
}

.fc-survival-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ob-muted);
  margin-bottom: 8px;
}

.fc-survival-number {
  font-family: var(--font-mono);
  font-size: 88px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
  animation: popIn 0.5s 0.2s both;
}

.fc-survival-number.good   { color: var(--ob-safe);   }
.fc-survival-number.warn   { color: var(--ob-warn);   }
.fc-survival-number.danger { color: var(--ob-danger); }

.fc-survival-unit {
  font-size: 16px;
  color: var(--ob-text-2);
  margin-bottom: 16px;
}

.fc-survival-verdict {
  font-size: 14px;
  color: var(--ob-muted);
  line-height: 1.6;
  max-width: 260px;
  margin: 0 auto;
}

/* ─────────────────────────────────────
   REVIEW CARD
───────────────────────────────────── */
.fc-review-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ob-text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.fc-review-sub {
  font-size: 14px;
  color: var(--ob-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.fc-review-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.rv-prev-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--ob-surface);
  border: 1px solid var(--ob-border);
  color: var(--ob-text-2);
  font-weight: 500;
}

.rv-prev-pill.ok   { background: var(--ob-safe-bg);   color: var(--ob-safe);   border-color: transparent; }
.rv-prev-pill.warn { background: var(--ob-warn-bg);   color: var(--ob-warn);   border-color: transparent; }
.rv-prev-pill.bad  { background: var(--ob-danger-bg); color: var(--ob-danger); border-color: transparent; }

.rv-section-card {
  border: 1.5px solid var(--ob-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 8px;
}

.rv-section-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--ob-surface);
  border-bottom: 1px solid var(--ob-border);
}

.rv-section-icon { font-size: 14px; }

.rv-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ob-muted);
}

.rv-fields-grid {
  display: flex;
  flex-direction: column;
}

.rv-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ob-divider);
  gap: 12px;
}

.rv-field:last-child { border-bottom: none; }

.rv-field-label {
  font-size: 13px;
  color: var(--ob-muted);
  flex-shrink: 0;
}

.rv-field-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ob-text);
  text-align: right;
  cursor: pointer;
  transition: color var(--t-fast);
}

.rv-field-value:hover { color: var(--ob-accent); }
.rv-field-value:empty::after { content: '—'; color: var(--ob-subtle); }

.rv-inline-input {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ob-accent);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ob-accent);
  outline: none;
  text-align: right;
  width: 80px;
  padding: 0 0 2px;
}

.rv-status {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  margin: 4px 0 16px;
}

.rv-status-ok   { background: var(--ob-safe-bg);   color: var(--ob-safe);   }
.rv-status-warn { background: var(--ob-warn-bg);   color: var(--ob-warn);   }

/* ─────────────────────────────────────
   RESULTS DARK OVERRIDES
───────────────────────────────────── */
.sb-cursor            { box-shadow: 0 0 0 2px var(--color-accent) !important; }
.wil-simulated        { border-color: rgba(124,58,237,0.2) !important; }
#biggest-impact       { border-left: 4px solid var(--color-accent) !important; }
.lcr-note             { border-left-color: var(--color-accent) !important; }
.ep-why               { border-left-color: var(--color-accent) !important; background: rgba(124,58,237,0.04) !important; }
.dd-option.dd-primary { border-color: var(--color-accent) !important; background: rgba(124,58,237,0.04) !important; }
.dd-primary-tag       { background: rgba(124,58,237,0.15) !important; color: var(--color-accent-3) !important; }
.dd-primary .dd-num   { border-color: var(--color-accent) !important; color: var(--color-accent-3) !important; }
.dd-star, .dd-header  { color: var(--color-accent-3) !important; }
.metric-card::after   { background: var(--color-accent) !important; }
.metric-card:hover .mc-icon,
.metric-card.active   .mc-icon { color: var(--color-accent-3) !important; }
.wil-range::-webkit-slider-thumb,
.sim-range::-webkit-slider-thumb { background: var(--color-accent) !important; }
.wil-range::-moz-range-thumb,
.sim-range::-moz-range-thumb { background: var(--color-accent) !important; }

/* ─────────────────────────────────────
   RESPONSIVE
───────────────────────────────────── */
@media (max-width: 390px) {
  .fc-heading          { font-size: 23px; }
  .fc-input,
  .fc-input-standalone { font-size: 30px; }
  .fc-inr-prefix       { font-size: 22px; }
  .fc-survival-number  { font-size: 72px; }
}

@media (max-height: 650px) {
  .fc-body             { padding-top: 24px; }
  .fc-splash-logo      { width: 56px; height: 56px; font-size: 26px; margin-bottom: 20px; }
  .fc-survival-number  { font-size: 68px; }
  .fc-interstitial-icon{ font-size: 40px; margin-bottom: 12px; }
  .fc-heading          { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .fc-enter-right, .fc-enter-left,
  .fc-interstitial-icon, .fc-survival-icon,
  .fc-survival-number { animation: none !important; }
}
