/* ============================================================
   Money Moves — Hub theme
   Bolder than main site. Mobile-first. 390px+ viewport.
   ============================================================ */

:root {
  --mm-hype:         #6366f1;
  --mm-hype-light:   #e0e7ff;
  --mm-hype-dark:    #4338ca;
  --mm-push:         #d97706;
  --mm-push-light:   #fef3c7;
  --mm-reality:      #ef4444;
  --mm-reality-bg:   #1e293b;
  --mm-reality-light:#fee2e2;
  --mm-surface:      #ffffff;
  --mm-bg:           #f8fafc;
  --mm-border:       #e2e8f0;
  --mm-text:         #0f172a;
  --mm-muted:        #64748b;
  --mm-success:      #16a34a;
  --mm-radius:       12px;
}

/* ---- Answer-first, lead magnet — keep readable width ---- */
.mm-answer-first,
.mm-lead-magnet {
  max-width: 680px;
}

/* ---- Two-column calculator grid ---- */
.mm-calculator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1rem;
}

.mm-calc-right {
  position: sticky;
  top: 80px;
}

.mm-breadcrumb {
  font-size: 0.82rem;
  color: var(--mm-muted);
  margin-bottom: 1rem;
}
.mm-breadcrumb a {
  color: var(--mm-muted);
  text-decoration: none;
}
.mm-breadcrumb a:hover { color: var(--mm-hype); }

.mm-h1 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--mm-text);
  margin: 0 0 1rem;
}

/* ---- Hero: h1 + answer-first + emoji ---- */
.mm-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}
.mm-hero-icon {
  font-size: 7rem;
  line-height: 1;
  opacity: 0.88;
  user-select: none;
  flex-shrink: 0;
}

/* ---- Answer-first callout ---- */
.mm-answer-first {
  background: var(--mm-hype-light);
  border-left: 4px solid var(--mm-hype);
  border-radius: 0 var(--mm-radius) var(--mm-radius) 0;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 1.5rem;
  color: var(--mm-text);
}

/* ---- Calculator widget ---- */
.mm-calculator {
  background: var(--mm-surface);
  border: 1.5px solid var(--mm-border);
  border-radius: var(--mm-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ---- Input groups ---- */
.mm-input-group {
  margin-bottom: 1.25rem;
}

.mm-label {
  display: block;
  margin-bottom: 0.4rem;
  cursor: pointer;
}
.mm-label-hi {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--mm-text);
  line-height: 1.3;
}
.mm-label-en {
  display: block;
  font-size: 0.78rem;
  color: var(--mm-muted);
  font-weight: 400;
  margin-top: 1px;
}

.mm-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--mm-border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--mm-text);
  background: var(--mm-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.mm-input:focus {
  outline: none;
  border-color: var(--mm-hype);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.mm-currency-wrap,
.mm-percent-wrap,
.mm-number-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.mm-currency-sym,
.mm-percent-sym,
.mm-unit {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mm-muted);
  flex-shrink: 0;
  user-select: none;
}
.mm-currency-wrap .mm-input,
.mm-percent-wrap .mm-input,
.mm-number-wrap .mm-input {
  flex: 1;
}

.mm-help {
  font-size: 0.8rem;
  color: var(--mm-muted);
  margin: 0.3rem 0 0;
  font-style: italic;
}

.mm-input-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--mm-muted);
  margin: 0.2rem 0 0 0;
  min-height: 1em;
  letter-spacing: 0.01em;
}

/* ---- Toggle switch ---- */
.mm-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.mm-toggle-input {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: var(--mm-border);
  border-radius: 12px;
  transition: background 0.2s;
  border: none;
  outline: none;
}
.mm-toggle-input:checked {
  background: var(--mm-hype);
}
.mm-toggle-input::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.mm-toggle-input:checked::after {
  left: 23px;
}

/* ---- Addons ---- */
.mm-addons {
  border-top: 1px solid var(--mm-border);
  padding-top: 1rem;
  margin-top: 0.75rem;
}
.mm-addons-heading {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--mm-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.6rem;
}
.mm-addon-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--mm-text);
  line-height: 1.4;
}
.mm-addon-check {
  width: 18px;
  height: 18px;
  accent-color: var(--mm-hype);
  cursor: pointer;
  flex-shrink: 0;
}

/* ---- Result block ---- */
.mm-result {
  border-radius: var(--mm-radius);
  padding: 1.25rem 1.25rem 1rem;
  text-align: center;
  transition: background 0.3s, border-color 0.3s;
  border: 2px solid var(--mm-border);
}
.mm-result.mm-tone-hype    { background: var(--mm-hype-light);    border-color: var(--mm-hype); }
.mm-result.mm-tone-push    { background: var(--mm-push-light);    border-color: var(--mm-push); }
.mm-result.mm-tone-reality { background: var(--mm-reality-light); border-color: var(--mm-reality); }

.mm-mood-label {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--mm-text);
}
.mm-headline {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  color: var(--mm-text);
}
.mm-secondary {
  font-size: 0.9rem;
  color: var(--mm-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Progress bar */
.mm-readiness-bar-wrap {
  margin: 0.5rem 0 1rem;
}
.mm-readiness-bar {
  height: 10px;
  background: rgba(0,0,0,0.1);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.mm-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: var(--mm-hype);
  transition: width 0.5s ease;
}
.mm-tone-push    .mm-bar-fill { background: var(--mm-push); }
.mm-tone-reality .mm-bar-fill { background: var(--mm-reality); }
.mm-pct-label {
  font-size: 0.8rem;
  color: var(--mm-muted);
  font-weight: 700;
}

/* Share buttons */
.mm-share-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.mm-btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.mm-btn:hover  { opacity: 0.85; }
.mm-btn:active { transform: scale(0.97); }
.mm-btn-share     { background: var(--mm-hype);  color: #fff; }
.mm-btn-secondary { background: var(--mm-bg);    color: var(--mm-text); border: 1.5px solid var(--mm-border); }
.mm-btn-wa        { background: #25D366;          color: #fff; }

/* ---- Swaps strip ---- */
.mm-swaps {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 0.25rem;
}
.mm-swap-item {
  background: var(--mm-surface);
  border: 1.5px solid var(--mm-border);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  color: var(--mm-text);
  line-height: 1.4;
}

/* ---- Lead magnet ---- */
.mm-lead-magnet {
  background: var(--mm-bg);
  border: 1.5px solid var(--mm-border);
  border-radius: var(--mm-radius);
  padding: 1.5rem;
  margin: 1.25rem 0;
  text-align: center;
}
.mm-lead-headline-hi { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.2rem; color: var(--mm-text); }
.mm-lead-headline-en { font-size: 0.85rem; color: var(--mm-muted); margin-bottom: 1rem; }
.mm-lead-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 380px;
  margin: 0 auto;
}
.mm-lead-input {
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--mm-border);
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
  width: 100%;
  -webkit-appearance: none;
}
.mm-lead-input:focus {
  outline: none;
  border-color: var(--mm-hype);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.mm-lead-submit {
  padding: 0.65rem 1.5rem;
  background: var(--mm-hype);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.mm-lead-submit:hover { background: var(--mm-hype-dark); }
.mm-lead-submit:disabled { opacity: 0.6; cursor: default; }
.mm-lead-msg {
  font-size: 0.88rem;
  min-height: 1.3em;
  text-align: center;
}
.mm-lead-privacy {
  font-size: 0.73rem;
  color: var(--mm-muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* ---- SEO prose section ---- */
.mm-prose {
  line-height: 1.75;
  color: var(--mm-text);
  margin: 1.75rem 0;
}
.mm-prose h2 { font-size: 1.35rem; font-weight: 800; margin: 2rem 0 0.6rem; }
.mm-prose h3 { font-size: 1.1rem;  font-weight: 700; margin: 1.5rem 0 0.5rem; }
.mm-prose p  { margin: 0 0 1rem; }

/* ---- FAQ ---- */
.mm-faq { margin: 2rem 0; }
.mm-faq > h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 1rem; }
.mm-faq-item {
  border: 1.5px solid var(--mm-border);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.mm-faq-item summary {
  padding: 0.85rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.mm-faq-item summary::-webkit-details-marker { display: none; }
.mm-faq-item summary::after { content: '+'; font-size: 1.1rem; color: var(--mm-muted); flex-shrink: 0; }
.mm-faq-item[open] summary::after { content: '\2212'; }
.mm-faq-item p {
  padding: 0 1rem 1rem;
  color: var(--mm-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0;
}

/* ---- Related links ---- */
.mm-related { margin: 1.5rem 0; }
.mm-related > h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.mm-related-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mm-related-card {
  display: inline-block;
  padding: 0.38rem 0.85rem;
  background: var(--mm-hype-light);
  color: var(--mm-hype);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.mm-related-card:hover { background: var(--mm-hype); color: #fff; text-decoration: none; }

/* ---- CFP CTA box ---- */
.mm-cta-box {
  background: var(--mm-hype);
  color: #fff;
  border-radius: var(--mm-radius);
  padding: 1.5rem 1.5rem 1.25rem;
  text-align: center;
  margin: 2rem 0;
}
.mm-cta-box p { margin: 0 0 1rem; font-size: 1rem; line-height: 1.5; }
.mm-cta-link {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: #fff;
  color: var(--mm-hype);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.15s;
}
.mm-cta-link:hover { opacity: 0.88; text-decoration: none; color: var(--mm-hype); }

/* ---- Compliance footer ---- */
.mm-compliance {
  background: #f1f5f9;
  border-top: 1px solid var(--mm-border);
  border-radius: var(--mm-radius);
  padding: 1.1rem 1.25rem;
  margin: 2rem 0;
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.65;
}
.mm-compliance strong { color: var(--mm-text); }

/* ---- Hub page ---- */
.mm-hub-intro {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--mm-muted);
  margin-bottom: 1.75rem;
}
.mm-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
}
.mm-hub-card {
  background: var(--mm-surface);
  border: 1.5px solid var(--mm-border);
  border-top: 4px solid var(--mm-border);
  border-radius: var(--mm-radius);
  padding: 1.25rem 1.25rem 1rem;
  text-decoration: none;
  color: var(--mm-text);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.mm-hub-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-3px);
  text-decoration: none;
  color: var(--mm-text);
}
.mm-hub-card,
.mm-hub-card:hover,
.mm-hub-card * {
  text-decoration: none;
}
.mm-hub-card-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.3rem;
  display: block;
}
.mm-hub-card-name {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--mm-text);
}
.mm-hub-card-q {
  display: block;
  font-size: 0.83rem;
  color: var(--mm-muted);
  line-height: 1.45;
  flex: 1;
}
.mm-hub-card-cta {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mm-hype);
  margin-top: 0.6rem;
}

/* Engine-based top border colours */
.mm-hub-card--goal_gap             { border-top-color: var(--mm-hype); }
.mm-hub-card--leak_audit           { border-top-color: var(--mm-push); }
.mm-hub-card--buy_now_vs_save      { border-top-color: var(--mm-reality); }
.mm-hub-card--split_goal           { border-top-color: #10b981; }
.mm-hub-card--variable_income_goal { border-top-color: #8b5cf6; }

/* ---- Responsive ---- */
@media (max-width: 767px) {
  .mm-hero { grid-template-columns: 1fr; }
  .mm-hero-icon { display: none; }
  .mm-calculator {
    grid-template-columns: 1fr;
  }
  .mm-calc-right {
    position: static;
  }
}

@media (max-width: 480px) {
  .mm-h1       { font-size: 1.4rem; }
  .mm-headline { font-size: 1.25rem; }
  .mm-share-row { flex-direction: column; align-items: stretch; }
  .mm-share-row .mm-btn { text-align: center; }
  .mm-cta-box  { padding: 1.25rem 1rem; }
}
