/* Free calculators (/tools and /tools/embed). Loaded after styles.css and pages.css on the tool pages, alone on the
   embeddable versions; every rule is scoped to .calc*, .tool-*, .cite-box, .formula or body.embed. The colour variables
   repeat styles.css so the embeds (which don't load it) look the same. */
:root{--ink:#0a0d0f;--paper:#f2efe6;--paper2:#e9e5da;--muted:#676b68;--line:rgba(10,13,15,.15);--cyan:#05e4fd;--lime:#7aea0f}
.calc,.calc *,.calc-results *,.tool-card,.cite-box,.cite-box *,body.embed,body.embed *{box-sizing:border-box}
.calc-offscreen{position:fixed;left:-9999px;top:0;width:1px;height:1px;opacity:0}

/* the form */
.calc{margin:0 0 26px;padding:24px;border:1px solid var(--ink);background:#fff}
.calc-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 20px}
.calc-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.calc-field.calc-full{grid-column:1/-1}
.calc-field label,.calc-field .calc-label{font-size:15px;line-height:1.3;font-weight:800;color:var(--ink)}
.calc-hint{margin:0;font-size:13px;line-height:1.4;color:#555851}
.calc-field input,.calc-field select,.calc-field textarea{width:100%;min-height:46px;padding:10px 12px;border:1px solid var(--ink);border-radius:0;background:var(--paper);font:inherit;font-size:17px;line-height:1.4;color:var(--ink)}
.calc-field textarea{min-height:92px;resize:vertical}
.calc-field input:focus-visible,.calc-field select:focus-visible,.calc-field textarea:focus-visible,.calc-btn:focus-visible,.cite-box textarea:focus-visible,.tool-card:focus-visible{outline:3px solid var(--cyan);outline-offset:2px}
.calc-field [aria-invalid="true"]{border-color:#b3261e;background:#fdecea}
.calc fieldset{margin:0;padding:16px 18px 18px;min-width:0;border:1px solid var(--line)}
.calc fieldset+fieldset{margin-top:14px}
.calc legend{padding:0 8px;font:900 12px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.12em;text-transform:uppercase;color:#555851}
.calc-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:20px}
.calc-btn{padding:14px 17px;border:1px solid var(--ink);border-radius:0;background:#fff;color:var(--ink);font-family:inherit;font-weight:950;font-size:11px;line-height:1;letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
.calc-btn.dark{background:var(--ink);color:#fff}
.calc-btn:hover{background:var(--paper2)}
.calc-btn.dark:hover{background:#262a2d}
.calc-copied{font-size:14px;color:#2f312d;min-height:1.4em}

/* the result */
.calc-results{margin:0 0 40px;min-height:150px}
.calc-out{padding:24px 28px;border:1px solid var(--ink);border-left:8px solid var(--lime);background:#fff;color:var(--ink)}
.calc-out-error{border-left-color:#b3261e;background:#fdecea}
.calc-kicker{margin:0 0 6px;font:900 11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em;text-transform:uppercase;color:#555851}
.calc-big{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin:6px 0 8px}
.calc-num{font-size:clamp(46px,8vw,76px);line-height:1;letter-spacing:-.05em;font-weight:900}
.calc-unit{font-size:clamp(17px,2vw,21px);font-weight:700;color:#2f312d}
.calc-verdict{margin:0 0 10px;font-size:19px;line-height:1.35;font-weight:800}
.calc-note{margin:0 0 14px;font-size:17px;line-height:1.5;color:#2f312d}
.calc-warn{margin:0 0 16px;padding:12px 16px;list-style:none;border:1px solid #b08900;background:#fff7d6;font-size:15px;line-height:1.5;color:#3d3200}
.calc-warn li+li{margin-top:8px}
.calc-errors{margin:8px 0 0;padding-left:20px;font-size:16px;line-height:1.5;color:#7a1712}
.calc-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:0 28px;margin:6px 0 4px}
.calc-facts div{padding:10px 0;border-top:1px solid var(--line)}
.calc-facts dt{margin:0 0 3px;font:900 11px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em;text-transform:uppercase;color:#555851}
.calc-facts dd{margin:0;font-size:16px;line-height:1.4;font-weight:600}
.calc-working{margin:14px 0 0;padding:12px 14px;background:var(--paper);font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;color:#2f312d;overflow-wrap:anywhere}
.calc-working span{display:block}
.calc-working .calc-working-title{margin-bottom:4px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#555851}
.calc-reading{margin-top:18px;padding-top:6px;border-top:1px solid var(--line)}
.calc-reading-title{margin:14px 0 8px;font:900 11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em;text-transform:uppercase;color:#555851}
.calc-reading p{margin:0 0 12px;font-size:16px;line-height:1.55;color:#2f312d}

/* page parts */
.formula{margin:0 0 20px;padding:14px 18px;border-left:4px solid var(--cyan);background:rgba(10,13,15,.04);font:600 16px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--ink);overflow-x:auto}
.formula span{display:block}
table.compare.tool-table{min-width:0;width:100%}
table.compare.tool-table th,table.compare.tool-table td{font-variant-numeric:tabular-nums}
.guide-body pre.brief-example{margin:0 0 22px;padding:16px 18px;border:1px solid var(--line);background:#fff;font:13.5px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
.cite-box{margin:0 0 22px;padding:16px 18px;border:1px solid var(--line);background:#fff}
.cite-box h3{margin:0 0 8px}
.cite-box p{margin:0 0 10px}
.cite-box textarea{display:block;width:100%;min-height:96px;margin:0 0 10px;padding:10px 12px;border:1px solid var(--line);border-radius:0;background:var(--paper);font:13px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--ink);resize:vertical}
.cite-box .calc-actions{margin-top:0}
.guide-body .calc-btn{text-decoration:none}
.tool-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px;margin:0 0 44px}
.tool-card{display:flex;flex-direction:column;gap:10px;padding:24px;border:1px solid var(--line);background:#fff;color:var(--ink);text-decoration:none;transition:border-color .2s ease}
.tool-card:hover{border-color:var(--ink)}
.tool-card h2{margin:0;font-size:clamp(22px,2.2vw,28px);line-height:1.1;letter-spacing:-.035em}
.tool-card p{margin:0;font-size:16px;line-height:1.5;color:#2f312d}
.tool-card-more{margin-top:auto;padding-top:12px;border-top:1px solid var(--line);display:flex;justify-content:space-between;font:900 11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em;text-transform:uppercase}
.tool-card-more:after{content:"\2192"}
.guide-body .tool-card h2{margin:0}

/* pricing calculators: the data box, file field, check box, charts and tables */
.calc-field textarea[name="data"]{font:14px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;min-height:150px}
.calc-field input[type="file"]{min-height:0;padding:9px 10px;font-size:15px;background:#fff}
.calc-check{justify-content:center}
.calc-field .calc-checklabel{display:flex;align-items:flex-start;gap:10px;font-weight:600;font-size:15px;line-height:1.4;cursor:pointer}
.calc-field .calc-checklabel input{flex:none;width:20px;min-height:0;height:20px;margin:1px 0 0;accent-color:var(--ink)}
.calc-out-empty{border-left-color:var(--cyan);background:rgba(255,255,255,.7)}
.calc-banner{margin:0 0 14px;padding:10px 14px;border:1px solid #b08900;background:#fff7d6;font-weight:800;font-size:14px;line-height:1.4;color:#3d3200}
.calc-figure{margin:18px 0 6px}
.calc-chart{display:block;width:100%;height:auto;overflow:visible}
.calc-chart text{font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,sans-serif;fill:#2f312d}
.calc-chart .c-axis{font-size:12px}
.calc-chart .c-title{font-size:12px;font-weight:700;fill:#555851}
.calc-chart .c-grid{stroke:rgba(10,13,15,.12);stroke-width:1}
.calc-chart .c-tick,.calc-chart .c-base{stroke:#555851;stroke-width:1}
.calc-chart .c-tc,.calc-chart .c-te,.calc-chart .c-ch,.calc-chart .c-ex,.calc-swatch .c-tc,.calc-swatch .c-te,.calc-swatch .c-ch,.calc-swatch .c-ex{stroke-linejoin:round;stroke-linecap:round}
.c-tc{stroke:#0a6b7a;stroke-width:3}
.c-ch{stroke:#0a6b7a;stroke-width:2.5;stroke-dasharray:7 5}
.c-ex{stroke:#a34a00;stroke-width:2.5;stroke-dasharray:7 5}
.c-te{stroke:#a34a00;stroke-width:3}
.calc-chart .c-dot{fill:#0a6b7a;stroke:#fff;stroke-width:1.5}
.calc-chart .c-mark circle{fill:var(--ink);stroke:#fff;stroke-width:2}
.calc-chart .c-mark text{fill:#fff;font-size:11px;font-weight:800}
.calc-legend{display:flex;flex-wrap:wrap;gap:6px 22px;margin:8px 0 0;padding:0;list-style:none;font-size:14px;line-height:1.4;color:#2f312d}
.calc-legend li{display:flex;align-items:center;gap:8px}
.calc-swatch{width:28px;height:10px;flex:none;overflow:visible}
.calc-swatch line{fill:none}
.c-num{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:var(--ink);color:#fff;font:800 11px/1 ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;flex:none}
.calc-details{margin:14px 0 0}
.calc-details summary{cursor:pointer;font-weight:800;font-size:15px;padding:6px 0}
.calc-details summary:focus-visible{outline:3px solid var(--cyan);outline-offset:2px}
.calc-out .table-scroll{margin:10px 0 6px}
.calc-out table.compare{min-width:0;font-size:14px}
.calc-out table.compare th,.calc-out table.compare td{padding:9px 12px}
.calc-out tr.calc-best th,.calc-out tr.calc-best td{background:rgba(122,234,15,.16)}
.calc-static{min-height:0}

/* the question bank */
.qb-item{margin:0 0 22px;padding:20px 22px;border:1px solid var(--line);background:#fff;scroll-margin-top:90px}
.guide-body .qb-item h3{margin:0 0 10px}
.qb-wording{margin:0 0 14px;padding:12px 16px;border-left:4px solid var(--cyan);background:rgba(10,13,15,.04);font-size:18px;line-height:1.5;font-weight:650;color:var(--ink)}
.qb-label,.qb-facts dt{margin:0 0 4px;font:900 11px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.1em;text-transform:uppercase;color:#555851}
.guide-body ul.qb-scale{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px;padding:0;list-style:none}
.guide-body .qb-scale li{margin:0;padding:5px 10px;border:1px solid var(--line);background:var(--paper);font-size:15px;line-height:1.3}
.qb-scale-range{margin:0 0 8px;font-size:15px}
.qb-facts{margin:12px 0 4px}
.qb-facts div{padding:10px 0;border-top:1px solid var(--line)}
.qb-facts dd{margin:0;font-size:16px;line-height:1.55}
.qb-tag{display:inline-block;margin-right:6px;padding:2px 8px;border:1px solid var(--ink);font:900 10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--ink);background:var(--paper)}
.qb-item .calc-actions{margin-top:12px}

/* the embeddable versions: no site chrome, compact */
body.embed{margin:0;padding:16px;background:#fff;color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.4}
body.embed main{max-width:720px;margin:0 auto}
body.embed main:focus{outline:none}
body.embed h1{margin:0 0 14px;font-size:22px;line-height:1.15;letter-spacing:-.03em}
body.embed .calc{margin:0 0 14px;padding:0;border:0}
body.embed .calc-grid{gap:14px 16px}
body.embed .calc-results{margin:0 0 6px;min-height:0}
body.embed .calc-out{padding:16px 18px}
body.embed .calc-num{font-size:clamp(38px,9vw,56px)}
body.embed .calc-note{font-size:15px}
body.embed .calc-facts{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
body.embed .calc-reading p{font-size:15px}
body.embed .calc-working{display:none}
body.embed .embed-credit{margin:18px 0 0;padding-top:12px;border-top:1px solid var(--line);font-size:14px;font-weight:700}
body.embed .embed-credit a{color:var(--ink);text-decoration:underline;text-underline-offset:3px}
body.embed .embed-note{margin:12px 0 0;font-size:13px;color:#555851}

@media(max-width:760px){
  .calc{padding:18px 16px}
  .calc-grid{grid-template-columns:1fr}
  .calc-out{padding:20px 18px}
  .calc-results{min-height:120px}
  .tool-grid{grid-template-columns:1fr}
}
@media print{.calc-actions,.cite-box .calc-actions{display:none}}
