/* Mortgage only: pieces the shared .iwd-tool layout does not cover. */
#iwd-mortgage .mg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#iwd-mortgage .mg-money { position: relative; margin-bottom: 14px; }
#iwd-mortgage .mg-money b { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--wp--preset--color--muted, #5A6A80); font-size: 20px; font-weight: 400; }
#iwd-mortgage .mg-money input { padding-left: 34px; }
#iwd-mortgage .iwd-tool__stats + .iwd-tool__stats { margin-top: 12px; }
#iwd-mortgage .mg-chart { grid-column: 1 / -1; min-width: 0; }
#iwd-mortgage .mg-chart svg { display: block; width: 100%; height: auto; }
#iwd-mortgage .mg-legend { margin: 8px 0 0; color: var(--wp--preset--color--muted, #5A6A80); font-size: 14px; }
#iwd-mortgage .mg-key { display: inline-block; width: 12px; height: 12px; margin: 0 4px 0 12px; border-radius: 3px; vertical-align: -1px; }
#iwd-mortgage .mg-key:first-child { margin-left: 0; }
#iwd-mortgage .mg-key--pi { background: #0B2545; }
#iwd-mortgage .mg-key--tax { background: #C9A227; }
#iwd-mortgage .mg-key--ins { background: #8AA3BD; }
#iwd-mortgage .mg-key--hoa { background: #5A6A80; }
#iwd-mortgage .mg-key--pmi { background: #B5483F; }
#iwd-mortgage .mg-source { grid-column: 1 / -1; margin: 0; color: var(--wp--preset--color--muted, #5A6A80); font-size: 14px; }
#iwd-mortgage .mg-live:empty { display: none; }
#iwd-mortgage [hidden] { display: none; }
/* The mode switch: one radio group, shown as two buttons. */
#iwd-mortgage .mg-mode { margin: 0; padding: 22px 0 6px; border: 0; min-width: 0; }
#iwd-mortgage .mg-mode legend { padding: 0; margin: 0 0 10px; color: var(--wp--preset--color--navy, #0B2545); font-weight: 700; }
#iwd-mortgage .mg-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#iwd-mortgage .mg-seg label { position: relative; margin: 0; cursor: pointer; font-weight: 400; }
#iwd-mortgage .mg-seg input { position: absolute; opacity: 0; }
#iwd-mortgage .mg-seg span { display: block; height: 100%; padding: 12px 14px; border: 1.5px solid var(--wp--preset--color--line, #DDE4EC); border-radius: 12px; font-size: 16px; line-height: 1.3; }
#iwd-mortgage .mg-seg input:checked + span { border-color: var(--wp--preset--color--navy, #0B2545); background: var(--wp--preset--color--mist, #EEF3F8); box-shadow: inset 0 0 0 1px var(--wp--preset--color--navy, #0B2545); color: var(--wp--preset--color--navy, #0B2545); font-weight: 700; }
#iwd-mortgage .mg-seg input:focus-visible + span { outline: 3px solid var(--wp--preset--color--gold, #C9A227); outline-offset: 2px; }
/* The result heading is an h2 (a section of the post, like its other h2s) that looks like the small result label. */
#iwd-mortgage h2.mg-result-title { margin: 0; padding: 0; border: 0; color: var(--wp--preset--color--mist, #EEF3F8); font: 400 15px/1.6 var(--iwd-body); letter-spacing: normal; text-transform: none; }
@media (max-width: 480px) { #iwd-mortgage .mg-seg { grid-template-columns: 1fr; } }
