:root{--ink:#0f172a;--soft:#334155;--muted:#64748b;--line:#e2e8f0;--bg:#f8fafc;--card:#fff;--green:#22c55e;--green2:#4ade80;--shadow:0 18px 50px rgba(15,23,42,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--ink);background:radial-gradient(circle at top left,#ecfdf5,transparent 28%),linear-gradient(#fff,var(--bg));}a{color:inherit;text-decoration:none}.wrap{max-width:1180px;margin:0 auto;padding:0 22px}.site-header{position:sticky;top:0;z-index:10;background:rgba(255,255,255,.86);backdrop-filter:blur(16px);border-bottom:1px solid rgba(226,232,240,.8)}.header-inner{height:76px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:12px;align-items:center}.brand-icon{width:46px;height:46px;border-radius:16px;background:linear-gradient(145deg,#111827,#263241);box-shadow:0 12px 28px rgba(15,23,42,.24);display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;place-items:center;gap:0;color:#fff;padding:7px;font-weight:900;font-size:13px;line-height:1;overflow:hidden}.brand-icon span:nth-child(4){color:var(--green)}.brand strong{font-size:24px;letter-spacing:-.04em}.brand strong span{color:var(--green)}.brand small{display:block;text-transform:uppercase;letter-spacing:.18em;font-size:10px;color:var(--muted);margin-top:2px}.top-nav{display:flex;gap:24px;color:var(--soft);font-weight:600;font-size:14px}.hero{display:grid;grid-template-columns:1.25fr .75fr;gap:34px;align-items:center;padding-top:58px;padding-bottom:46px}.eyebrow{display:inline-flex;padding:8px 13px;border:1px solid var(--line);background:#fff;border-radius:999px;font-weight:700;font-size:13px;color:var(--soft);box-shadow:0 6px 20px rgba(15,23,42,.04)}h1{font-size:clamp(42px,6vw,72px);line-height:.95;letter-spacing:-.07em;margin:16px 0}h2{letter-spacing:-.04em}.lead{font-size:19px;line-height:1.7;color:var(--soft);max-width:720px}.search-box{margin-top:28px;background:#fff;border:1px solid var(--line);border-radius:22px;padding:6px;box-shadow:var(--shadow)}.search-box input{width:100%;border:0;outline:0;padding:17px 18px;font-size:16px;border-radius:18px}.hero-card{background:#fff;border:1px solid rgba(226,232,240,.85);border-radius:32px;padding:30px;box-shadow:var(--shadow)}.card-label,.section-head p{color:var(--muted)}.primary{border:0;background:var(--ink);color:#fff;border-radius:16px;padding:13px 18px;font-weight:800;cursor:pointer;box-shadow:0 10px 24px rgba(15,23,42,.16)}.primary:hover{background:#111827}.popular-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:34px}.popular-card{border:1px solid var(--line);background:#fff;border-radius:24px;padding:18px;text-align:left;cursor:pointer;box-shadow:0 8px 30px rgba(15,23,42,.04)}.popular-card:hover,.tool-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.popular-card strong{display:block}.popular-card small{color:var(--muted)}.app-layout{display:grid;grid-template-columns:260px 1fr;gap:26px;align-items:start}.sidebar{position:sticky;top:96px}.category-list{display:grid;gap:8px}.cat-btn{width:100%;border:1px solid var(--line);background:#fff;color:var(--soft);border-radius:16px;padding:12px 13px;text-align:left;font-weight:700;cursor:pointer;display:flex;justify-content:space-between}.cat-btn.active{background:var(--ink);color:#fff;border-color:var(--ink)}.section-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:16px}.count{font-size:13px;font-weight:600;color:var(--muted)}.tool-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.tool-card{background:#fff;border:1px solid var(--line);border-radius:24px;padding:18px;min-height:154px;text-align:left;cursor:pointer;transition:.18s ease}.tool-card .tag{display:inline-flex;background:#ecfdf5;color:#15803d;border-radius:999px;font-size:11px;font-weight:800;padding:5px 8px;margin-bottom:12px}.tool-card h3{margin:0 0 8px}.tool-card p{margin:0;color:var(--muted);font-size:14px;line-height:1.5}.ad-wrap{margin-top:10px;margin-bottom:34px}.ad{border:1px solid var(--line);background:rgba(255,255,255,.75);border-radius:28px;min-height:96px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#94a3b8;box-shadow:0 8px 30px rgba(15,23,42,.035)}.ad.slim{min-height:72px}.ad.rectangle{min-height:280px;margin-top:22px}.ad small{text-transform:uppercase;letter-spacing:.18em;font-size:10px;margin-bottom:8px}.about{padding:34px 22px 70px}.about h2{font-size:36px}.about-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.about-grid div{background:#fff;border:1px solid var(--line);border-radius:26px;padding:22px;box-shadow:0 8px 30px rgba(15,23,42,.035)}footer{border-top:1px solid var(--line);padding:24px 0;color:var(--muted);font-size:13px;background:#fff}.modal{position:fixed;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(8px);display:none;align-items:center;justify-content:center;padding:22px;z-index:40}.modal.open{display:flex}.modal-card{width:min(920px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:32px;padding:26px;box-shadow:0 30px 80px rgba(0,0,0,.25);position:relative}.close{position:absolute;right:20px;top:16px;border:0;background:#f1f5f9;border-radius:14px;width:38px;height:38px;font-size:24px;cursor:pointer}.calc-title{padding-right:42px;margin-top:2px}.calc-desc{color:var(--muted);line-height:1.6}.calc-layout{display:grid;grid-template-columns:1fr 280px;gap:20px;margin-top:20px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.field label{display:block;font-weight:800;font-size:13px;margin-bottom:7px;color:var(--soft)}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:16px;padding:13px 14px;font-size:15px;outline:0;background:#fff}.field textarea{min-height:90px}.full{grid-column:1/-1}.result-box{background:linear-gradient(145deg,#111827,#1f2937);border-radius:24px;padding:22px;color:#fff;box-shadow:0 18px 50px rgba(15,23,42,.2);border-bottom:5px solid var(--green)}.result-box small{color:#cbd5e1;text-transform:uppercase;letter-spacing:.12em}.result-box strong{display:block;font-size:31px;margin:8px 0;word-break:break-word}.formula{margin-top:14px;padding:15px;border:1px solid var(--line);border-radius:18px;background:#f8fafc;color:var(--soft);line-height:1.55}.button-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.secondary{border:1px solid var(--line);background:#fff;border-radius:14px;padding:11px 14px;font-weight:800;cursor:pointer}.note{font-size:13px;color:var(--muted);line-height:1.5;margin-top:14px}.mini-ad{margin-top:18px}.hidden{display:none}@media(max-width:980px){.hero,.app-layout,.calc-layout{grid-template-columns:1fr}.sidebar{position:static}.tool-grid,.popular-grid,.about-grid{grid-template-columns:repeat(2,1fr)}.desktop{display:none}.top-nav{display:none}}@media(max-width:640px){.tool-grid,.popular-grid,.about-grid,.form-grid{grid-template-columns:1fr}h1{font-size:44px}.modal-card{padding:20px;border-radius:24px}}
.install-btn{margin-left:auto;margin-right:18px;border:1px solid var(--line);background:#fff;color:var(--soft);border-radius:14px;padding:9px 14px;font-weight:800;font-size:13px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;box-shadow:0 6px 20px rgba(15,23,42,.06)}
.install-btn:hover{background:var(--ink);color:#fff;border-color:var(--ink)}
.install-btn[hidden]{display:none}
.ios-steps{color:var(--soft);line-height:1.9;padding-left:20px;margin:14px 0}
.ios-steps strong{color:var(--ink)}
@media(max-width:980px){.install-btn{margin-right:0;font-size:12px;padding:8px 11px}}

/* ---- calculator layout, rebuilt around the ANSWER ------------------------
   The previous order put the formula and the legal disclaimer between the
   inputs and the result. On an iPhone 14 viewport that pushed the answer
   entirely below the fold: you pressed Calculate and the screen did not
   appear to change. Named grid areas let one DOM order serve both layouts --
   result in the right column on desktop, directly under the inputs on mobile,
   with the ad last in both.                                                */
.calc-layout{display:grid;grid-template-columns:1fr 280px;gap:20px;margin-top:20px;
  grid-template-areas:
    "form    result"
    "actions result"
    "formula result"
    "note    result"
    "ad      ad";}
.calc-layout>.form-grid{grid-area:form}
.calc-layout>.result-col{grid-area:result}
.calc-layout>.button-row{grid-area:actions}
.calc-layout>.formula{grid-area:formula}
.calc-layout>.note{grid-area:note}
.calc-layout>.mini-ad{grid-area:ad;margin-top:4px}

/* Collapsed by default: useful to the curious, never between a user and their
   answer. */
.formula{border:1px solid var(--line);border-radius:18px;background:#f8fafc;padding:0}
.formula summary{cursor:pointer;padding:13px 15px;font-weight:800;color:var(--soft);font-size:14px;list-style:none}
.formula summary::-webkit-details-marker{display:none}
.formula summary::after{content:" ▾";color:var(--muted)}
.formula[open] summary::after{content:" ▴"}
.formula .formula-body{padding:0 15px 14px;color:var(--soft);line-height:1.55}

/* The result should feel like it updated, without being distracting. */
.result-box{transition:box-shadow .18s ease}
@media (prefers-reduced-motion:no-preference){
  .result-box strong{transition:color .12s ease}
}

@media(max-width:980px){
  .calc-layout{grid-template-columns:1fr;
    grid-template-areas:"form" "result" "actions" "formula" "note" "ad";}
  .result-col{position:sticky;top:8px;z-index:2}
}

/* ---- search results ------------------------------------------------------
   Typing something unmatched used to empty the grid with no explanation --
   a blank void reads as a broken site, not as "no matches".               */
.no-results{grid-column:1/-1;text-align:center;padding:44px 20px;border:1px dashed var(--line);border-radius:24px;background:#fff;color:var(--soft)}
.no-results strong{display:block;font-size:18px;color:var(--ink);margin-bottom:8px}
.no-results p{margin:0;color:var(--muted)}
.linky{border:0;background:none;padding:0;font:inherit;font-weight:800;color:var(--green);cursor:pointer;text-decoration:underline}

/* Novelty calculators keep their place on the site -- they attract links and
   searches the serious tools never will -- but behind a clear divider, so
   they are not sitting beside a home-affordability tool undercutting it. */
.fun-divider{grid-column:1/-1;margin:26px 0 4px;padding-top:22px;border-top:1px solid var(--line)}
.fun-divider h3{margin:0 0 4px;font-size:20px;letter-spacing:-.03em}
.fun-divider p{margin:0;color:var(--muted);font-size:14px}

/* ---- per-calculator page copy -------------------------------------------
   A page that is only a form gives Google ~40 words and no reason to rank it
   over Bankrate. This is where the explanation, worked example and FAQs live. */
.calc-copy{margin-top:34px;max-width:760px}
.calc-copy h2{font-size:26px;letter-spacing:-.03em;margin:0 0 10px}
.calc-copy h3{font-size:18px;margin:24px 0 8px}
.calc-copy p{color:var(--soft);line-height:1.75;margin:0 0 12px}
.calc-copy ol{color:var(--soft);line-height:1.9;padding-left:22px;margin:0}
.faq{margin:0}
.faq dt{font-weight:800;margin-top:16px}
.faq dd{margin:6px 0 0;color:var(--soft);line-height:1.7}
.related{list-style:none;padding:0;margin:8px 0 0;display:flex;flex-wrap:wrap;gap:10px}
.related a{display:inline-block;border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 14px;font-weight:700;font-size:14px;color:var(--soft)}
.related a:hover{background:var(--ink);color:#fff;border-color:var(--ink)}
/* The cards are anchors, not buttons, so crawlers can follow them and
   cmd-click opens a new tab. These four declarations are what <button>
   gave for free and <a> does not: no underline, no link colour, block
   layout, inherited type. */
.tool-card,.popular-card{display:block;text-decoration:none;color:inherit;font:inherit}

/* Category accordion. The panel opens directly under the button that was
   clicked, so the feedback lands where the eye already is. */
.cat-panel{display:none}
.cat-panel.open{display:grid;gap:2px;margin:2px 0 6px 8px;padding:4px 0 4px 8px;border-left:2px solid var(--line)}
.cat-link{display:block;padding:7px 10px;border-radius:10px;color:var(--soft);text-decoration:none;font-size:14px;font-weight:600;line-height:1.35}
.cat-link:hover{background:#f1f5f9;color:var(--ink)}
.cat-btn[aria-expanded="true"]{border-color:var(--ink)}

/* Status line for the grid: what you are looking at, plus a real way back. */
.section-status{display:flex;align-items:center;gap:10px}
.showall{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:999px;
  padding:5px 12px;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}
.showall:hover{background:var(--ink);color:#fff;border-color:var(--ink)}
.showall[hidden]{display:none}

/* ---- Mobile density -------------------------------------------------------
   Measured on a 375x812 phone, the first calculator card sat 2553px down --
   3.1 full screens of scrolling. Everything collapsed to ONE column at 640px,
   so the eight Popular cards alone were 780px and the category list 580px.
   These rules target the three worst offenders without touching desktop. */
@media(max-width:640px){
  /* Two-up instead of stacked: 780px -> ~390px. */
  .popular-grid{grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:22px}
  .popular-card{padding:13px;border-radius:18px}
  .popular-card strong{font-size:15px}
  .popular-card small{font-size:12px;line-height:1.4}

  /* Categories two-up; an open panel spans the full width beneath its row. */
  .category-list{grid-template-columns:repeat(2,1fr);gap:8px}
  .cat-btn{padding:11px 12px;font-size:14px}
  .cat-panel.open{grid-column:1/-1;margin:0 0 4px;padding:6px 0 6px 10px}
  .cat-link{padding:9px 10px}   /* stays a comfortable tap target */

  /* The hero ran 871px before any content. */
  .hero{padding-top:26px;padding-bottom:22px;gap:20px}
  .lead{font-size:15px;line-height:1.55}
  .section-head{flex-wrap:wrap;gap:8px}

  /* Apple asks for 44px minimum on touch targets; these two measured 36 and 39. */
  .install-btn,.secondary{min-height:44px}
}

/* ---- Ad slots -------------------------------------------------------------
   Reserved containers that render NOTHING until real ad code is inserted.
   :empty matches only an element with no children and no text nodes, so the
   markup must contain no whitespace: <div class="ad-slot"></div>. Once an
   AdSense <ins> is pasted inside, the slot stops being empty and appears,
   labelled. Nobody ever sees an empty grey box. */
.ad-slot:empty{display:none}
.ad-slot{margin:26px 0;min-height:0}
.ad-slot:not(:empty)::before{content:"Sponsored";display:block;
  text-transform:uppercase;letter-spacing:.18em;font-size:10px;
  color:var(--muted);margin-bottom:8px}
.ad-slot.rectangle:not(:empty){min-height:280px}
.ad-slot.slim:not(:empty){min-height:72px}
@media(max-width:640px){.ad-slot{margin:18px 0}}
