/* ═══════════════════════════════════════════════════════════
   Net Worth Rix — Calculator module v1.0
   Uses the same CSS variables as style.css (Customizer + dark mode)
════════════════════════════════════════════════════════════ */
.nwr-calc-wrap { max-width: 1120px; margin: 0 auto; color: var(--mw-tx, #1A1830); }
.nwr-calc-wrap *, .nwr-tiles * { box-sizing: border-box; }
.nwr-calc-wrap [hidden] { display: none !important; }
.nwr-lead { font-size: 17px; line-height: 1.65; color: var(--mw-tx2, #5A5680); margin: 0 0 18px; }

/* ── Top controls ── */
.nwr-topbar {
  display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end;
  background: var(--mw-sf, #fff); border: 2px solid var(--mw-bc, #DDD9FF); border-radius: var(--mw-r, 14px);
  padding: 14px 16px; margin-bottom: 18px;
}
.nwr-ctl { display: flex; flex-direction: column; gap: 5px; min-width: 200px; flex: 1 1 200px; }
.nwr-ctl span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--mw-tx2, #5A5680); }
.nwr-ctl em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--mw-tx3, #9B97B8); }
.nwr-calc-wrap select, .nwr-calc-wrap input[type=number], .nwr-calc-wrap input[type=text] {
  width: 100%; margin: 0; padding: 10px 12px; font-size: 16px; line-height: 1.3;
  border: 2px solid var(--mw-bc, #DDD9FF); border-radius: 10px; background: var(--mw-sf, #fff); color: var(--mw-tx, #1A1830);
}
.nwr-calc-wrap select:focus, .nwr-calc-wrap input:focus { outline: none; border-color: var(--mw-acc, #6C5CE7); box-shadow: 0 0 0 3px rgba(108,92,231,.18); }
.nwr-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mw-tx2, #5A5680); cursor: pointer; flex: 1 1 100%; }
.nwr-remember input { width: 17px; height: 17px; accent-color: var(--mw-acc, #6C5CE7); }

/* ── Layout ── */
.nwr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.nwr-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.nwr-col {
  background: var(--mw-sf, #fff); border: var(--mw-pbw, 3px) solid var(--mw-pbc, #6C5CE7);
  border-radius: calc(var(--mw-r, 14px) + 2px); padding: 16px; box-shadow: var(--mw-sh2, 0 2px 10px rgba(108,92,231,.08));
}
.nwr-col-title { margin: 0 0 12px; font-size: 18px; line-height: 1.25; color: var(--c, #6C5CE7); padding-bottom: 8px; border-bottom: 3px solid var(--c, #6C5CE7); }
.nwr-group { margin-bottom: 14px; }
.nwr-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nwr-group-head h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--mw-tx2, #5A5680); font-weight: 800; }
.nwr-gi { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--mw-sf2, #F0EEFF); font-size: 15px; }
.nwr-field { margin-bottom: 9px; }
.nwr-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--mw-tx, #1A1830); line-height: 1.3; }
.nwr-field label small { display: block; font-weight: 400; font-size: 12px; color: var(--mw-tx3, #9B97B8); }
.nwr-inwrap { position: relative; }
.nwr-inwrap .nwr-sym { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 14px; font-weight: 700; color: var(--mw-tx3, #9B97B8); pointer-events: none; }
.nwr-inwrap input { padding-left: 38px !important; }
.nwr-crow { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.nwr-x { width: 34px; height: 34px; border-radius: 8px; border: 2px solid var(--mw-bc, #DDD9FF); background: var(--mw-sf, #fff); color: var(--mw-red, #D63031); cursor: pointer; font-size: 14px; }
.nwr-add { width: 100%; padding: 10px; border: 2px dashed var(--mw-acc, #6C5CE7); background: transparent; color: var(--mw-acc, #6C5CE7); font-weight: 700; border-radius: 10px; cursor: pointer; font-size: 14px; }
.nwr-add:hover { background: var(--mw-db, #F0EEFF); }

/* ── Result ── */
.nwr-result { position: sticky; top: 16px; }
.nwr-result-card {
  background: linear-gradient(160deg, rgba(0,184,148,.10), rgba(108,92,231,.10)), var(--mw-sf, #fff);
  border: var(--mw-pbw, 3px) solid var(--mw-grn, #00B894); border-radius: calc(var(--mw-r, 14px) + 4px); padding: 18px; box-shadow: var(--mw-sh, 0 4px 24px rgba(108,92,231,.13));
}
.nwr-r-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .9px; color: var(--mw-tx2, #5A5680); }
.nwr-r-net { font-size: clamp(32px, 5vw, 44px); font-weight: 800; line-height: 1.1; margin: 4px 0 6px; color: var(--mw-tx, #1A1830); word-break: break-word; }
.nwr-r-net.is-pos { color: var(--mw-grn, #00B894); }
.nwr-r-net.is-neg { color: var(--mw-red, #D63031); }
.nwr-r-status { font-size: 14px; line-height: 1.5; color: var(--mw-tx2, #5A5680); margin-bottom: 12px; }
.nwr-r-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.nwr-r-split div { background: var(--mw-sf, #fff); border: 2px solid var(--mw-bc, #DDD9FF); border-radius: 10px; padding: 8px 10px; }
.nwr-r-split span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--mw-tx3, #9B97B8); }
.nwr-r-split strong { font-size: 16px; word-break: break-word; }
.nwr-r-block { border-top: 1px solid var(--mw-bc, #DDD9FF); padding-top: 10px; margin-top: 10px; }
.nwr-r-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; color: var(--mw-tx2, #5A5680); margin-bottom: 6px; }
.nwr-r-row strong { color: var(--mw-tx, #1A1830); }
.nwr-meter { position: relative; height: 10px; border-radius: 999px; background: var(--mw-sf2, #F0EEFF); border: 1px solid var(--mw-bc, #DDD9FF); overflow: hidden; }
.nwr-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #FDCB6E, var(--mw-red, #D63031)); transition: width .25s; }
.nwr-meter-g i { background: linear-gradient(90deg, var(--mw-acc2, #00CEC9), var(--mw-grn, #00B894)); }
.nwr-meter .nwr-meter-mark { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--mw-tx, #1A1830); opacity: .55; }
.nwr-mix { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--mw-sf2, #F0EEFF); border: 1px solid var(--mw-bc, #DDD9FF); }
.nwr-mix i { display: block; height: 100%; }
.nwr-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--mw-tx2, #5A5680); }
.nwr-legend li { display: flex; align-items: center; gap: 5px; margin: 0; }
.nwr-legend b { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.nwr-bench { font-size: 13px; line-height: 1.55; color: var(--mw-tx2, #5A5680); }
.nwr-bench p { margin: 0 0 6px; }
.nwr-bench .nwr-bench-main strong { color: var(--mw-tx, #1A1830); }
.nwr-bench-cmp { font-weight: 700; }
.nwr-bench-cmp.is-up { color: var(--mw-grn, #00B894); }
.nwr-bench-cmp.is-down { color: var(--mw-red, #D63031); }
.nwr-src { font-size: 12px; color: var(--mw-tx3, #9B97B8); margin: 6px 0 0; line-height: 1.5; }
.nwr-tier-link { display: inline-block; font-weight: 700; font-size: 14px; color: var(--mw-acc, #6C5CE7) !important; text-decoration: none !important; margin-top: 4px; }
.nwr-tier-link:hover { text-decoration: underline !important; }
.nwr-find { margin-top: 8px; display: grid; gap: 8px; }
.nwr-person { display: flex; align-items: center; gap: 10px; text-decoration: none !important; background: var(--mw-sf, #fff); border: 2px solid var(--mw-bc, #DDD9FF); border-radius: 10px; padding: 8px; }
.nwr-person:hover { border-color: var(--mw-acc, #6C5CE7); }
.nwr-person-ph { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: 0 0 44px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--mw-acc, #6C5CE7), var(--mw-acc3, #FD79A8)); color: #fff; font-weight: 800; }
.nwr-person-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nwr-person-tx { display: flex; flex-direction: column; min-width: 0; }
.nwr-person-tx strong { font-size: 14px; color: var(--mw-tx, #1A1830); }
.nwr-person-tx em { font-style: normal; font-size: 12px; color: var(--mw-grn, #00B894); font-weight: 700; }

.nwr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.nwr-btn { flex: 1 1 auto; padding: 10px 14px; border-radius: 10px; border: 2px solid var(--mw-acc, #6C5CE7); background: var(--mw-acc, #6C5CE7); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; line-height: 1.2; }
.nwr-btn:hover { filter: brightness(1.08); }
.nwr-btn-light { background: var(--mw-db, #F0EEFF); color: var(--mw-acc, #6C5CE7); }
.nwr-btn-ghost { background: transparent; color: var(--mw-tx2, #5A5680); border-color: var(--mw-bc, #DDD9FF); }
#nwrFind { width: 100%; }
.nwr-note { font-size: 12px; color: var(--mw-tx3, #9B97B8); text-align: center; margin: 10px 0 0; }
.nwr-note-end { margin-top: 28px; }

/* mobile floating total */
.nwr-bar { display: none; }

/* ── Article ── */
.nwr-article { margin-top: 40px; font-size: 17px; line-height: 1.8; color: var(--mw-tx, #1A1830); max-width: 860px; margin-left: auto; margin-right: auto; }
.nwr-article h2 { margin: 1.8em 0 .5em; font-size: clamp(22px, 3vw, 28px); line-height: 1.25; color: var(--mw-tx, #1A1830); }
.nwr-article p, .nwr-article li { color: var(--mw-tx, #1A1830); }
.nwr-article ul, .nwr-article ol { padding-left: 1.3em; margin: 0 0 1em; }
.nwr-article li { margin-bottom: .45em; }
.nwr-article a { color: var(--mw-acc, #6C5CE7); font-weight: 600; }
.nwr-formula { text-align: center; font-size: clamp(18px, 3vw, 24px); font-weight: 800; background: var(--mw-db, #F0EEFF); border: 2px solid var(--mw-bc, #DDD9FF); border-radius: var(--mw-r, 14px); padding: 14px; color: var(--mw-acc, #6C5CE7) !important; }
.nwr-tablewrap { overflow-x: auto; margin: 1em 0 .4em; }
.nwr-table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--mw-sf, #fff); }
.nwr-table th, .nwr-table td { padding: 10px 14px; border: 1px solid var(--mw-bc, #DDD9FF); text-align: left; }
.nwr-table th { background: var(--mw-acc, #6C5CE7); color: #fff; font-weight: 700; }
.nwr-table tr.nwr-total td { background: var(--mw-db, #F0EEFF); font-weight: 800; }
.nwr-faq { display: grid; gap: 8px; }
.nwr-q { background: var(--mw-sf2, #F0EEFF); border: 1.5px solid var(--mw-bc, #DDD9FF); border-radius: 10px; padding: 0 14px; }
.nwr-q summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.nwr-q p { margin: 0 0 12px; color: var(--mw-tx2, #5A5680); line-height: 1.65; }

/* ── Home tiles [nwr_sections] ── */
.nwr-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 10px 0; }
.nwr-tile {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none !important; padding: 18px;
  background: var(--mw-sf, #fff); border: var(--mw-pbw, 3px) solid var(--mw-pbc, #6C5CE7); border-radius: var(--mw-r, 14px);
  box-shadow: var(--mw-sh2, 0 2px 10px rgba(108,92,231,.08)); transition: transform .15s, box-shadow .15s;
}
.nwr-tile:hover { transform: translateY(-3px); box-shadow: var(--mw-sh, 0 4px 24px rgba(108,92,231,.13)); }
.nwr-tile:first-child { border-color: var(--mw-grn, #00B894); background: linear-gradient(160deg, rgba(0,184,148,.10), transparent), var(--mw-sf, #fff); }
.nwr-tile-ico { font-size: 30px; line-height: 1; }
.nwr-tile-title { font-size: 19px; font-weight: 800; color: var(--mw-tx, #1A1830); }
.nwr-tile-desc { font-size: 14px; line-height: 1.5; color: var(--mw-tx2, #5A5680); flex: 1; }
.nwr-tile-meta { font-size: 13px; font-weight: 800; color: var(--mw-acc, #6C5CE7); }

/* ── CTA box (net worth pages) ── */
.nwr-cta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; text-decoration: none !important; margin: 20px 0;
  background: linear-gradient(135deg, rgba(0,184,148,.14), rgba(108,92,231,.12)); border: 2px solid var(--mw-grn, #00B894);
  border-radius: var(--mw-r, 14px); padding: 14px 18px;
}
.nwr-cta-ico { font-size: 30px; }
.nwr-cta > span:nth-child(2) { flex: 1 1 240px; display: flex; flex-direction: column; }
.nwr-cta strong { font-size: 17px; color: var(--mw-tx, #1A1830); }
.nwr-cta em { font-style: normal; font-size: 13.5px; color: var(--mw-tx2, #5A5680); }
.nwr-cta b { background: var(--mw-acc, #6C5CE7); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 14px; }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .nwr-layout { grid-template-columns: 1fr; }
  .nwr-result { position: static; }
}
@media (max-width: 680px) {
  .nwr-inputs { grid-template-columns: 1fr; }
  .nwr-article { font-size: 16px; }
  .nwr-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; justify-content: space-between; align-items: center;
    padding: 10px 16px; background: var(--mw-acc, #6C5CE7); color: #fff; box-shadow: 0 -4px 16px rgba(0,0,0,.18);
  }
  .nwr-bar strong { font-size: 18px; }
}

@media print {
  .nwr-topbar, .nwr-add, .nwr-x, .nwr-actions, .nwr-article, .nwr-bar, .nwr-remember { display: none !important; }
  .nwr-layout { grid-template-columns: 1fr 320px; }
  .nwr-result { position: static; }
}

/* ═══ Tools module (tools.js) ═══ */
.nwr-inputs-one { grid-template-columns: 1fr !important; }
.nwr-suffix .nwr-sym { left: auto; right: 12px; }
.nwr-suffix input { padding-left: 12px !important; padding-right: 34px !important; }
.nwr-check { display: flex !important; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.nwr-check input { width: 18px; height: 18px; accent-color: var(--mw-acc, #6C5CE7); }
.nwr-field[hidden] { display: none !important; }
.nwr-r-net.is-mid { color: #E17055; }
.nwr-sugg { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 2px; background: var(--mw-sf, #fff); border: 2px solid var(--mw-acc, #6C5CE7); border-radius: 10px; max-height: 260px; overflow: auto; box-shadow: var(--mw-sh, 0 4px 24px rgba(108,92,231,.18)); }
.nwr-sugg[hidden] { display: none; }
.nwr-sugg-i { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; background: transparent; border: 0; border-bottom: 1px solid var(--mw-bc, #DDD9FF); cursor: pointer; color: var(--mw-tx, #1A1830); font-size: 14px; }
.nwr-sugg-i:hover { background: var(--mw-db, #F0EEFF); }
.nwr-sugg-i em { font-style: normal; font-weight: 700; color: var(--mw-grn, #00B894); white-space: nowrap; }
.nwr-sugg-none { padding: 10px 12px; font-size: 13px; color: var(--mw-tx3, #9B97B8); }
.nwr-table-sm { font-size: 13px; } .nwr-table-sm th, .nwr-table-sm td { padding: 7px 10px; }
.nwr-nn { background: var(--mw-sf, #fff); border: 2px solid var(--mw-bc, #DDD9FF); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.nwr-nn-top { display: flex; align-items: center; gap: 12px; }
.nwr-nn-num { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--mw-acc, #6C5CE7), var(--mw-acc3, #FD79A8)); }
.nwr-nn-t { display: flex; flex-direction: column; } .nwr-nn-t strong { font-size: 15px; } .nwr-nn-t em { font-style: normal; font-size: 12px; color: var(--mw-tx3, #9B97B8); }
.nwr-nn-short { margin: 8px 0 2px; font-weight: 700; font-size: 14px; } .nwr-nn-text { margin: 0 0 4px; font-size: 13px; line-height: 1.55; color: var(--mw-tx2, #5A5680); }
.nwr-more-title { max-width: 1120px; margin: 40px auto 14px; font-size: 24px; }
.nwr-tiles-tools { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.nwr-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
