/* NRI Money Map calculators — directory grid (screenshot layout) + calculator UI.
   Inherits the theme's warm tokens with fallbacks. */

.nmmc-dir, .nmmc-app, .nmmc {
  --_bg:      var(--bg, #F8F5F0);
  --_surface: var(--surface, #fff);
  --_surf2:   var(--surface-2, #F2EFE9);
  --_ink:     var(--ink, #1A1916);
  --_ink2:    var(--ink-2, #3A3733);
  --_muted:   var(--muted, #8A8680);
  --_line:    var(--faint, #C4C0BB);
  --_accent:  var(--gold, var(--accent, #B7791F));
  --_serif:   var(--serif, Georgia, serif);
  --_sans:    var(--sans, system-ui, -apple-system, Segoe UI, Roboto, sans-serif);
  font-family: var(--_sans);
  color: var(--_ink);
}
.nmmc-dir *, .nmmc-app *, .nmmc * { box-sizing: border-box; }

/* ---- Directory header ---- */
.nmmc-crumbs { font-size: .85rem; color: var(--_muted); margin-bottom: .9rem; }
.nmmc-crumbs a { color: var(--_muted); text-decoration: none; }
.nmmc-crumbs a:hover { color: var(--_accent); }
.nmmc-crumbs span { margin: 0 .35rem; }

.nmmc-count {
  display: inline-block;
  background: var(--_accent);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  padding: .25rem .8rem;
  border-radius: 999px;
  margin-bottom: .9rem;
}
.nmmc-dir__title { font-family: var(--_serif); font-weight: 400; font-size: clamp(2rem, 1.2rem + 2.5vw, 3rem); line-height: 1.1; margin: 0 0 .6rem; }
.nmmc-dir__desc { color: var(--_muted); font-size: 1.05rem; line-height: 1.6; max-width: 60ch; margin: 0 0 1.8rem; }

/* ---- Tabs ---- */
.nmmc-tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.8rem; }
.nmmc-tab {
  font-family: var(--_sans);
  font-size: .9rem;
  padding: .5rem 1rem;
  border: 1px solid var(--_line);
  border-radius: 999px;
  background: var(--_surface);
  color: var(--_ink2);
  cursor: pointer;
  transition: all .15s ease;
}
.nmmc-tab:hover { border-color: var(--_accent); color: var(--_accent); }
.nmmc-tab.is-active { background: var(--_ink); border-color: var(--_ink); color: #fff; }

/* ---- Card grid ---- */
.nmmc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.nmmc-card {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  background: var(--_surface);
  border: 1px solid var(--_line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--_ink);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.nmmc-card:hover { border-color: var(--_accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,25,22,.06); }
.nmmc-card__icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--_surf2);
  color: var(--_accent);
}
.nmmc-card__body { display: flex; flex-direction: column; gap: .2rem; }
.nmmc-card__title { font-weight: 600; font-size: 1rem; line-height: 1.25; }
.nmmc-card__sub { font-size: .85rem; color: var(--_muted); line-height: 1.4; }

/* ---- Calculator app ---- */
.nmmc-app { margin: 0 0 2rem; }
.nmmc {
  background: var(--_surf2);
  border: 1px solid var(--_line);
  border-radius: 16px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.nmmc-field { display: flex; flex-direction: column; gap: .35rem; }
.nmmc-label { font-weight: 600; font-size: .92rem; }
.nmmc-hint { font-size: .8rem; color: var(--_muted); }
.nmmc-input {
  font-family: var(--_sans);
  font-size: 1rem;
  padding: .75rem .9rem;
  border: 1.5px solid var(--_line);
  border-radius: 10px;
  background: var(--_surface);
  color: var(--_ink);
}
.nmmc-input:focus { outline: none; border-color: var(--_accent); box-shadow: 0 0 0 3px rgba(183,121,31,.15); }
.nmmc-toggle { display: flex; align-items: center; gap: .55rem; font-size: .92rem; color: var(--_ink2); }

.nmmc-result {
  background: var(--_surface);
  border: 1px solid var(--_line);
  border-radius: 12px;
  padding: 1.2rem 1.3rem;
}
.nmmc-result__headline { font-family: var(--_serif); font-size: 1.3rem; margin-bottom: .6rem; }
.nmmc-result__lines { list-style: none; margin: 0; padding: 0; }
.nmmc-result__lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--_line); font-size: .95rem; }
.nmmc-result__lines li:last-child { border-bottom: none; }
.nmmc-result__lines strong { white-space: nowrap; }
.nmmc-result__note { font-size: .9rem; color: var(--_ink2); line-height: 1.55; margin: .8rem 0 0; }

.nmmc-badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .9rem; font-weight: 700; color: #fff; }
.nmmc-badge--ok { background: #2E7D32; }
.nmmc-badge--warn { background: #B26A00; }
.nmmc-badge--info { background: var(--_accent); }

.nmmc-disclaimer, .nmmc-updated { font-size: .8rem; color: var(--_muted); line-height: 1.5; }
.nmmc-disclaimer { margin: .2rem 0 0; }
.nmmc-updated { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--_line); }

@media (max-width: 520px) {
  .nmmc-grid { grid-template-columns: 1fr; }
}
