/* financehomebase.com — tools section */
:root {
  --paper: #F1F3F2;
  --panel: #FFFFFF;
  --ink: #0F1A2E;
  --muted: #586274;
  --rule: #DDE2E3;
  --field: #E9EDEC;
  --accent: #0E8F78;
  --accent-soft: #E1F1EC;
  --gold: #B7862C;
  --loss: #B0442F;
  --navy: #111A2E;
  --radius: 18px;
  --serif: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
/* the calculator panels are dark, like the homepage */
.calc {
  --panel: #111A2E;
  --ink: #E9EEF5;
  --muted: #9AA7BA;
  --rule: #26324A;
  --field: #0B1324;
  --accent: #2BC6A6;
  --gold: #E3B457;
  --loss: #F08A74;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img, svg, canvas { max-width: 100%; }

.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); text-decoration: none; }
.logo { width: 34px; height: 34px; border-radius: 7px; background: var(--navy); color: #2BC6A6; display: grid; place-items: center; font-family: var(--sans); font-size: 18px; font-weight: 700; }
.site-nav a { margin-left: 28px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 16px; }
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav a:hover { color: var(--accent); }
.eyebrow { font-family: var(--mono); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 34px 0 10px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.ticker { border-bottom: 1px solid var(--rule); min-height: 46px; }

.crumbs { font-size: 14px; color: var(--muted); margin: 22px 0 6px; }
.crumbs a { color: var(--muted); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.12; }
.lede { font-size: 19px; color: var(--muted); max-width: 64ch; margin: 12px 0 28px; }

.calc { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; }
.inputs .field { margin-bottom: 16px; }
.inputs label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 5px; }
.inputs .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.inputs input, .inputs select {
  width: 100%; min-width: 0; font: inherit; font-family: var(--mono); color: inherit; padding: 9px 11px;
  background: var(--field); border: 1px solid var(--rule); border-radius: 7px;
}
.affix { display: flex; align-items: stretch; }
.affix span { display: flex; align-items: center; padding: 0 11px; background: var(--rule); border: 1px solid var(--rule); font-weight: 600; color: var(--muted); }
.affix span:first-child { border-radius: 7px 0 0 7px; }
.affix span:last-child { border-radius: 0 7px 7px 0; }
.affix input { border-radius: 0; }
.affix span:first-child + input { border-radius: 0 7px 7px 0; }
.affix input:first-child { border-radius: 7px 0 0 7px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 > * { min-width: 0; }
.row2 label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg { display: flex; border: 1px solid var(--rule); border-radius: 7px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: var(--field); color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 6px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--panel); }

.headline { font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); line-height: 1.25; margin: 0 0 6px; }
.headline strong { color: var(--accent); font-family: var(--mono); }
.subline { color: var(--muted); margin: 0 0 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--field); border-radius: 8px; padding: 12px 14px; }
.stat .k { display: block; font-size: 13px; color: var(--muted); }
.stat .v { display: block; font-family: var(--mono); font-size: 20px; font-weight: 600; }
.stat .v.good { color: var(--accent); }
.stat .v.bad { color: var(--loss); }
.chart { position: relative; height: 320px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }

details.table { margin-top: 18px; }
details.table summary { cursor: pointer; font-weight: 600; }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--muted); font-weight: 600; font-size: 14px; }

.content { max-width: 720px; margin: 48px 0 0; }
.content h2 { font-size: 28px; margin: 40px 0 12px; }
.content h3 { font-size: 21px; margin: 28px 0 8px; }
.content p, .content li { color: var(--ink); }
.content .example { border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 16px 18px; margin: 18px 0; }
.faq details { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; }
.faq details p { margin: 10px 0 0; }
.note { font-size: 14px; color: var(--muted); }
.disclaimer { margin: 40px 0; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--radius); font-size: 14px; color: var(--muted); max-width: 720px; }
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 0; }
.related a { display: block; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; }
.related a:hover { border-color: var(--accent); }
.related strong { display: block; font-family: var(--serif); font-size: 19px; margin-bottom: 4px; }
.calc .card { border-color: var(--rule); }
.calc .affix span { background: #1B2740; border-color: var(--rule); }
.related span { font-size: 14px; color: var(--muted); }

.hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 8px 0 0; }
.hub a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; min-height: 170px; }
.hub a:hover { border-color: var(--accent); }
.hub strong { font-family: var(--serif); font-size: 23px; }
.hub span { color: var(--muted); font-size: 15px; }
.hub em { margin-top: auto; font-style: normal; font-weight: 600; color: var(--accent); font-size: 15px; }

.site-foot { border-top: 1px solid var(--rule); margin-top: 56px; padding: 26px 0 40px; font-size: 14px; color: var(--muted); }
.site-foot a { color: var(--muted); margin-right: 16px; }

@media (max-width: 820px) {
  .calc { grid-template-columns: 1fr; }
  .chart { height: 260px; }
  .site-nav a { margin-left: 16px; font-size: 15px; }
  body { font-size: 16px; }
}
@media (max-width: 680px) {
  .site-nav a:not([aria-current]):not([data-nav="calculators"]) { display: none; }
}
