/* Free calculators (/tools). Uses the tokens from site.css. */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.calc-in { padding: clamp(20px, 3vw, 36px); display: grid; gap: 18px; align-content: start; }
.calc-f label { display: block; font-weight: 700; font-size: .9375rem; margin-bottom: 6px; }
.calc-box { position: relative; }
.calc-box input { width: 100%; font: 600 1.125rem/1.2 var(--font); color: var(--text); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--soft); font-variant-numeric: tabular-nums; }
.calc-box input:focus { border-color: var(--purple); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(124,58,237,.18); }
.calc-pre input { padding-left: 30px; }
.calc-post input { padding-right: 34px; }
.calc-pre::before, .calc-post::after { content: attr(data-unit); position: absolute; top: 50%; transform: translateY(-50%); color: var(--mute); font-weight: 600; pointer-events: none; }
.calc-pre::before { left: 14px; }
.calc-post::after { right: 14px; }
.calc-help { margin-top: 5px; color: var(--mute); font-size: .8438rem; }

.calc-out { background: linear-gradient(160deg, var(--navy), var(--midnight)); color: #fff; padding: clamp(20px, 3vw, 36px); display: grid; align-content: start; gap: 18px; }
.calc-res { display: grid; gap: 0; margin: 0; }
.calc-r { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 13px; border-top: 1px solid var(--line-dark); }
.calc-r:first-child { border-top: 0; }
.calc-r dt { color: var(--on-dark); font-size: .9375rem; }
.calc-r dd { margin: 0; font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-r-first { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 0; }
.calc-r-first dd { font-size: clamp(2.25rem, 4.5vw, 3.25rem); letter-spacing: -.03em; line-height: 1.05; }
.calc-bad dd { color: #FDA4AF; }
.calc-good dd { color: #7DD3FC; }
.calc-out .calc-note { color: var(--on-dark); }
.calc-note { font-size: .8438rem; color: var(--mute); margin-top: 14px; }
.calc-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.calc-out .btn-outline { color: #fff; border-color: rgba(255,255,255,.45); background: transparent; }
.calc-out .btn-outline:hover { border-color: #fff; }

.calc-cta { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 24px 40px; align-items: center; }
.calc-cta-text { margin-top: 12px; color: var(--mute); max-width: 40em; }
.calc-how { display: grid; gap: 10px; margin-top: 16px; max-width: 46em; }
.calc-how li { padding-left: 18px; position: relative; color: var(--mute); }
.calc-how li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--purple); }

.tool-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.tool-card { position: relative; display: grid; gap: 8px; align-content: start; padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--shadow); }
.tool-card:hover { border-color: var(--purple); }
.tool-card:focus-within { outline: 3px solid var(--cyan); outline-offset: 2px; }
.tool-card a { text-decoration: none; }
.tool-card a::after { content: ""; position: absolute; inset: 0; }
.tool-card a:focus-visible { outline: none; }
.tool-ico { width: 34px; height: 34px; color: var(--purple); margin-bottom: 6px; }
.tool-for { font-size: .8438rem; font-weight: 700; color: var(--blue); }
.tool-go { margin-top: 6px; font-weight: 700; color: var(--purple); }

@media (max-width: 860px) {
  .calc, .calc-cta { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .top, .foot, .draftbar, .rail-side, .calc-acts, .sec-tint, .final-cta, .page-head .crumbs, [class*="family"], iframe { display: none !important; }
  .page-head { background: none; color: #000; padding-block: 0 12px; }
  .page-head .lead { color: #333; }
  .calc { box-shadow: none; }
  .calc-out { background: #fff; color: #000; border-left: 1px solid #ccc; }
  .calc-r dt, .calc-out .calc-note { color: #333; }
  .calc-bad dd, .calc-good dd { color: #000; }
  .calc-r { border-color: #ddd; }
}
