/* MoneyMindTool — Modern Fintech Theme (Navy + Emerald) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #0F172A;
  --navy-2: #1E293B;
  --navy-3: #334155;
  --emerald: #10B981;
  --emerald-2: #059669;
  --emerald-3: #047857;
  --bg: #F8FAFC;
  --bg-2: #F1F5F9;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --border-2: #CBD5E1;
  --text: #1E293B;
  --text-muted: #64748B;
  --danger: #DC2626;
  --warn: #D97706;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
  --shadow: 0 4px 12px rgba(15,23,42,0.06);
  --shadow-lg: 0 12px 32px rgba(15,23,42,0.10);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
header.mm-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mm-nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.mm-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.mm-logo span { color: var(--emerald); }

.mm-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mm-nav a, .mm-nav button {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}

.mm-nav a:hover, .mm-nav button:hover { color: var(--emerald); background: rgba(255,255,255,0.04); }

.mm-dropdown { position: relative; }

.mm-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  min-width: 260px;
  max-height: 70vh;
  overflow-y: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 1001;
  margin-top: 6px;
}

.mm-dropdown:hover .mm-dropdown-menu,
.mm-dropdown:focus-within .mm-dropdown-menu { display: block; }

.mm-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
}

.mm-dropdown-menu a:hover { background: var(--bg-2); color: var(--emerald-3); }

.mm-dropdown-menu .all { color: var(--emerald-3); font-weight: 700; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; }

/* ===== BREADCRUMB ===== */
.mm-breadcrumb {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mm-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.mm-breadcrumb a:hover { color: var(--emerald-3); text-decoration: underline; }
.mm-breadcrumb .current { color: var(--navy); font-weight: 600; }
.mm-breadcrumb .sep { margin: 0 6px; color: var(--border-2); }

/* ===== MAIN ===== */
main.mm-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  width: 100%;
  flex: 1;
}

/* ===== HERO ===== */
.mm-hero {
  text-align: center;
  padding: 24px 0 32px;
}

.mm-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.mm-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

.mm-hero .pill {
  display: inline-block;
  background: rgba(16,185,129,0.10);
  color: var(--emerald-3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ===== CARD ===== */
.mm-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.mm-card h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.mm-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy-2);
  margin: 16px 0 8px;
}

.mm-card p { color: var(--text); margin-bottom: 12px; }
.mm-card ul, .mm-card ol { padding-left: 20px; color: var(--text); margin-bottom: 12px; }
.mm-card li { margin-bottom: 6px; }
.mm-card a { color: var(--emerald-3); text-decoration: underline; }

/* Calculator form */
.mm-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.mm-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-2);
  margin-bottom: 6px;
}

.mm-field .hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.mm-input,
.mm-select {
  width: 100%;
  font-size: 1rem;
  padding: 11px 14px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  transition: border 0.15s, box-shadow 0.15s;
}

.mm-input:focus,
.mm-select:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

.mm-input:disabled { background: var(--bg-2); color: var(--text-muted); cursor: not-allowed; }

.mm-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.mm-checkbox-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--emerald); }
.mm-checkbox-row label { font-size: 0.9rem; font-weight: 500; color: var(--text); margin: 0; }

/* Buttons */
.mm-btn {
  display: inline-block;
  background: var(--emerald);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 32px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(16,185,129,0.25);
}
.mm-btn:visited { color: #fff; }
.mm-btn-secondary:visited { color: var(--navy); }

.mm-btn:hover { background: var(--emerald-2); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,185,129,0.35); }
.mm-btn:active { transform: translateY(0); }

.mm-btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border-2);
  box-shadow: none;
}

.mm-btn-secondary:hover { background: var(--bg-2); border-color: var(--navy-3); }

.mm-actions { text-align: center; margin-top: 24px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Results */
.mm-result-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
}

.mm-result-card .label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; margin-bottom: 8px; }
.mm-result-card .value { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; color: var(--emerald); letter-spacing: -0.02em; }
.mm-result-card .subline { margin-top: 14px; font-size: 0.95rem; opacity: 0.85; line-height: 1.9; }
.mm-result-card .subline div { display: flex; justify-content: space-between; max-width: 340px; margin: 0 auto; padding: 4px 0; }
.mm-result-card .subline span:last-child { font-weight: 600; color: #fff; }
.mm-result-card.hidden { display: none; }

/* Tables */
.mm-table-wrap { overflow-x: auto; margin: 12px 0; }
.mm-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.mm-table th, .mm-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.mm-table th { background: var(--bg-2); color: var(--navy); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.mm-table tr:hover td { background: var(--bg); }
.mm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mm-table .highlight { background: rgba(16,185,129,0.08); font-weight: 700; color: var(--emerald-3); }

/* FAQ */
.mm-faq { display: flex; flex-direction: column; gap: 4px; }
.mm-faq details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  background: #fff;
  transition: border-color 0.15s;
}
.mm-faq details[open] { border-color: var(--emerald); }
.mm-faq summary {
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.mm-faq summary::-webkit-details-marker { display: none; }
.mm-faq summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--emerald);
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s;
}
.mm-faq details[open] summary::after { content: "−"; }
.mm-faq details > div, .mm-faq details > p {
  padding: 0 18px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Related calcs */
.mm-related {
  background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(15,23,42,0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.mm-related h2 { color: var(--navy); font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; }

.mm-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.mm-related-grid a {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  color: var(--navy);
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.mm-related-grid a:hover { background: var(--emerald); color: #fff; border-color: var(--emerald); transform: translateY(-2px); }
.mm-related-grid a.primary { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.mm-related-grid a.primary:hover { background: var(--emerald-3); }

/* ===== FOOTER ===== */
footer.mm-footer {
  background: var(--navy);
  color: #fff;
  margin-top: auto;
  padding: 40px 20px 20px;
}

.mm-footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mm-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.mm-footer ul { list-style: none; padding: 0; }
.mm-footer li { margin-bottom: 8px; }
.mm-footer a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; transition: color 0.15s; }
.mm-footer a:hover { color: var(--emerald); }

.mm-footer .brand { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.mm-footer .brand span { color: var(--emerald); }
.mm-footer .tagline { font-size: 0.85rem; color: rgba(255,255,255,0.6); line-height: 1.7; }

.mm-copyright {
  max-width: 1200px;
  margin: 20px auto 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* ===== HERO STATS (homepage) ===== */
.mm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.mm-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.mm-stat .num { display: block; font-size: 1.7rem; font-weight: 800; color: var(--emerald); letter-spacing: -0.02em; line-height: 1; }
.mm-stat .lbl { display: block; font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; font-weight: 500; }

/* ===== FEATURE CALCULATOR CARDS ===== */
.mm-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.mm-calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-sm);
}
.mm-calc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--emerald); }
.mm-calc-card .icon { width: 40px; height: 40px; background: rgba(16,185,129,0.10); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 1.2rem; color: var(--emerald-3); font-weight: 700; }
.mm-calc-card h3 { font-size: 1.1rem; color: var(--navy); font-weight: 700; margin-bottom: 8px; }
.mm-calc-card p { font-size: 0.9rem; color: var(--text-muted); flex: 1; margin-bottom: 14px; }
.mm-calc-card .arrow { color: var(--emerald-3); font-weight: 600; font-size: 0.9rem; }
.mm-calc-card:hover .arrow { color: var(--emerald-2); }

/* ===== CATEGORY GRID ===== */
.mm-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.mm-cat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.mm-cat h3 { font-size: 1.05rem; color: var(--navy); font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.mm-cat h3 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); }
.mm-cat ul { list-style: none; padding: 0; }
.mm-cat li { margin-bottom: 8px; }
.mm-cat a { color: var(--text); text-decoration: none; font-size: 0.92rem; transition: color 0.15s; }
.mm-cat a:hover { color: var(--emerald-3); }

/* ===== BLOG CARDS ===== */
.mm-blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.mm-blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all 0.18s ease;
}
.mm-blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--emerald); }
.mm-blog-card .tag { font-size: 0.7rem; color: var(--emerald-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.mm-blog-card h3 { font-size: 1.05rem; color: var(--navy); font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.mm-blog-card p { font-size: 0.9rem; color: var(--text-muted); flex: 1; margin-bottom: 14px; }
.mm-blog-card a { color: var(--emerald-3); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.mm-blog-card a:hover { color: var(--emerald-2); }

/* ===== CTA BANNER ===== */
.mm-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  margin: 20px 0;
  box-shadow: var(--shadow-lg);
}
.mm-cta h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; margin-bottom: 10px; letter-spacing: -0.01em; }
.mm-cta p { color: rgba(255,255,255,0.85); max-width: 540px; margin: 0 auto 22px; }
.mm-cta .mm-btn { box-shadow: 0 6px 20px rgba(16,185,129,0.4); }

/* ===== SECTION HEAD ===== */
.mm-section-head { text-align: center; margin: 32px 0 20px; }
.mm-section-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--navy); font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.mm-section-head p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ===== MODAL ===== */
.mm-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.mm-modal.show { display: flex; }
.mm-modal-content {
  background: var(--card);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.mm-modal-content h3 { color: var(--navy); font-size: 1.3rem; font-weight: 700; margin-bottom: 14px; padding-right: 30px; }
.mm-modal-content p { color: var(--text); font-size: 0.95rem; }
.mm-modal-content a { color: var(--emerald-3); }
.mm-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--bg-2);
  border-radius: 8px;
  font-size: 1.3rem;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mm-modal-close:hover { background: var(--border); }

/* Utilities */
.mm-mobile-only { display: none; }

/* Responsive */
@media (max-width: 768px) {
  .mm-nav a, .mm-nav button { padding: 6px 8px; font-size: 0.85rem; }
  .mm-card { padding: 20px; border-radius: 14px; }
  .mm-hero h1 { font-size: 1.7rem; }
  .mm-result-card { padding: 24px 18px; }
  .mm-dropdown-menu { right: -10px; min-width: 220px; }
  .mm-mobile-hide { display: none; }
  .mm-mobile-only { display: inline; }
}
