/* ClearFigure - Everyday Finance Calculators
   Original stylesheet. No external fonts, frameworks, trackers or cookies. */

:root {
  --navy: #102a4c;
  --navy-2: #173b68;
  --blue: #2563c9;
  --blue-soft: #eaf1fd;
  --teal: #0d8f7e;
  --teal-soft: #e5f6f2;
  --ink: #17253a;
  --muted: #5b6b80;
  --line: #dfe6f0;
  --bg: #f5f8fc;
  --card: #ffffff;
  --warn-bg: #fff8e8;
  --warn-line: #f0d9a8;
  --shadow: 0 2px 6px rgba(16, 42, 76, .04), 0 12px 30px rgba(16, 42, 76, .06);
  --radius: 14px;
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.05rem); font-weight: 760; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 720; }
h3 { font-size: 1.17rem; font-weight: 700; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin-bottom: .4rem; }
strong { color: var(--navy); }

.wrap { width: min(var(--maxw), calc(100% - 40px)); margin-inline: auto; }
.narrow { max-width: 820px; }
.section { padding: 54px 0; }
.section--tight { padding: 34px 0; }
.section--alt { background: #fff; border-block: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; font-weight: 750; color: var(--teal); margin-bottom: .7rem; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 720px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 760; font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(145deg, var(--blue), var(--teal)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: #35455c; font-size: .92rem; font-weight: 560; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); text-decoration: none; }
.nav-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; color: var(--navy); font-size: .9rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #eef4fd 0%, #f5f8fc 100%); border-bottom: 1px solid var(--line); padding: 66px 0 58px; }
.hero h1 { max-width: 800px; }
.hero p { max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; font-size: .87rem; color: var(--muted); }
.trust-row span::before { content: "\2713"; color: var(--teal); font-weight: 800; margin-right: 7px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 660; font-size: .94rem;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1d50a8; color: #fff; text-decoration: none; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.btn-sm { padding: 8px 14px; font-size: .86rem; }

/* ---------- Ad units ---------- */
.ad-band { background: #fff; border-block: 1px solid var(--line); padding: 20px 0 18px; }
.ad-inner {
  width: min(970px, calc(100% - 28px)); margin-inline: auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ad-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #8797ad; font-weight: 650; }
.ad-unit { width: 100%; display: flex; justify-content: center; overflow: hidden; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.tool-card { display: flex; flex-direction: column; transition: transform .16s ease, box-shadow .16s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(16, 42, 76, .1); text-decoration: none; }
.tool-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; margin-bottom: 16px; }
.tool-icon--blue { background: var(--blue-soft); color: var(--blue); }
.tool-icon--teal { background: var(--teal-soft); color: var(--teal); }
.tool-icon--navy { background: #e9eef7; color: var(--navy-2); }
.tool-card h3 { margin-bottom: .45rem; }
.tool-card p { color: var(--muted); font-size: .93rem; margin-bottom: 18px; }
.tool-card .card-link { margin-top: auto; font-weight: 660; font-size: .9rem; }
.card-link::after { content: " \2192"; }
.feature-card h3 { font-size: 1.05rem; }
.feature-card p { color: var(--muted); font-size: .93rem; margin: 0; }
.num { font-size: 1.7rem; font-weight: 800; color: var(--blue); display: block; margin-bottom: 6px; }

/* ---------- Calculator shell ---------- */
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 40px 0 34px; }
.crumb { font-size: .83rem; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: var(--muted); }
.page-head h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.page-head .lead { margin-bottom: 0; }
.calc-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 22px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.panel h2 { font-size: 1.28rem; margin-bottom: 4px; }
.panel-sub { color: var(--muted); font-size: .89rem; margin-bottom: 20px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .87rem; font-weight: 650; color: #2c3d55; margin-bottom: 6px; }
.field .hint { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; margin-top: 4px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.prefix { position: absolute; left: 12px; color: var(--muted); font-size: .92rem; pointer-events: none; }
input[type="number"], input[type="text"], input[type="email"], select, textarea {
  width: 100%; font-family: inherit; font-size: .96rem; color: var(--ink);
  background: #fbfcfe; border: 1px solid #cfdaea; border-radius: 9px;
  padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input.with-prefix { padding-left: 27px; }
input[type="number"]:focus, input[type="text"]:focus, select:focus, textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 201, .12); background: #fff;
}
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); }
.check-field { display: flex; align-items: flex-start; gap: 9px; font-size: .88rem; color: #35455c; margin-bottom: 14px; }
.check-field input { margin-top: 4px; flex: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 16px; }
.chip { border: 1px solid #cfdaea; background: #fff; color: #35455c; border-radius: 999px; padding: 6px 15px; font-size: .86rem; font-weight: 620; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.stepper { display: flex; align-items: center; gap: 0; }
.stepper button { width: 38px; height: 40px; border: 1px solid #cfdaea; background: #f3f7fd; color: var(--navy); font-size: 1.1rem; cursor: pointer; }
.stepper button:first-child { border-radius: 9px 0 0 9px; }
.stepper button:last-child { border-radius: 0 9px 9px 0; }
.stepper input { border-radius: 0; text-align: center; border-inline: none; }

.result-panel { background: linear-gradient(165deg, #12325d 0%, #173f74 100%); color: #fff; border: none; }
.result-panel h2 { color: #fff; }
.result-panel .panel-sub { color: #b9cce7; }
.big-result { font-size: clamp(2.1rem, 4.4vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 2px; }
.result-caption { color: #b9cce7; font-size: .88rem; margin-bottom: 20px; }
.result-list { border-top: 1px solid rgba(255, 255, 255, .18); margin: 0; padding: 0; list-style: none; }
.result-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: .91rem; margin: 0; }
.result-list span:first-child { color: #c9d9ee; }
.result-list span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.result-list li.is-total span:last-child { color: #8ce6c7; }
.result-list li[hidden] { display: none; }
.disclaimer-inline { margin: 18px 0 0; font-size: .8rem; color: #b9cce7; line-height: 1.5; }
.bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.16); overflow: hidden; display: flex; margin: 18px 0 8px; }
.bar > span { display: block; height: 100%; }
.bar-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .78rem; color: #c9d9ee; }
.bar-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 13px 16px; font-size: .87rem; color: #6b551f; margin: 18px 0; }
.notice strong { color: #6b551f; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { padding: 10px 13px; text-align: right; border-bottom: 1px solid #edf1f7; white-space: nowrap; font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
thead th { background: #f3f7fc; color: var(--navy); font-weight: 700; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: none; }
.table-scroll { max-height: 330px; overflow-y: auto; }

/* ---------- Content / FAQ ---------- */
.prose { max-width: 800px; }
.prose h2 { margin-top: 2.1rem; }
.prose h3 { margin-top: 1.6rem; }
.prose p, .prose li { color: #3a4a60; }
.prose li { margin-bottom: .55rem; }
.prose a { text-decoration: underline; }
details.faq { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 18px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 650; color: var(--navy); padding: 14px 0; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; float: right; color: var(--blue); font-size: 1.15rem; line-height: 1.2; }
details.faq[open] summary::after { content: "\2212"; }
details.faq p { color: #3a4a60; font-size: .93rem; margin: 0 0 16px; }
.callout { background: var(--teal-soft); border-left: 4px solid var(--teal); border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 22px 0; font-size: .93rem; }
.formula { background: #f2f6fc; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .87rem; color: var(--navy); overflow-x: auto; }

/* ---------- Footer ---------- */
.site-footer { background: #0f2647; color: #b9c8dc; padding: 46px 0 0; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 34px; }
.site-footer h3 { color: #fff; font-size: .98rem; margin-bottom: 14px; }
.site-footer p { font-size: .88rem; max-width: 320px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: .88rem; }
.site-footer a { color: #b9c8dc; }
.site-footer a:hover { color: #fff; }
.footer-brand { color: #fff; font-weight: 760; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0 26px; font-size: .82rem; }
.footer-bottom p { max-width: none; margin-bottom: 6px; }
.footer-disclaimer { background: rgba(255,255,255,.06); border-radius: 8px; padding: 11px 14px; margin-top: 12px; color: #d8e3f1; font-size: .82rem; }

/* ---------- Misc ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pill { display: inline-block; background: var(--blue-soft); color: var(--blue); border-radius: 999px; padding: 4px 12px; font-size: .76rem; font-weight: 700; letter-spacing: .03em; }
.divider { height: 1px; background: var(--line); margin: 30px 0; }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .calc-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: min(var(--maxw), calc(100% - 28px)); }
  .grid-3, .grid-2, .field-row, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 38px 0; }
  .hero { padding: 44px 0 40px; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 14px 20px;
    flex-direction: column; align-items: flex-start; gap: 12px; box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .panel { padding: 20px; }
}
