/* P1 tools page glue (small; design system lives in styles.css TOOLS ADDITIONS) */
/* PW-299: tool pages had a real late Geist swap (roth-conversion 375 CLS 0.0036, unit-economics 1280 CLS 0.0001) when geist-latin.woff2 landed after first paint. Same fix as /tools (PW-285, PW-288): page-only optional copy of the preloaded sans file, so there is no late swap and the metric-matched fallback stays on a slow load. interview-drill (#d-app) is excluded for now: styles.css reserves the Geist height in lh for #d-text and #d-paste-msg, which would show a blank line while the optional fallback stays. comps-builder was excluded too until PW-303 removed its lh reserves (PW-277, PW-282, PW-284, PW-286, PW-262), which are not needed once a pageview never swaps fonts. Same woff2 URLs, so no extra download; the preload still makes a normal load render Geist. Geist Mono stays on swap: only sie-study-planner preloads the mono file, so an optional mono face painted the system fallback on normal loads; mono delayed alone shifts nothing. --font-display is set too because styles.css resolves it to var(--font-sans) at :root. */
@font-face{font-family:"Geist Page";font-style:normal;font-weight:400 600;font-display:optional;src:url(fonts/geist-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
body[data-page="tools"]:not(:has(#d-app)){--font-sans:"Geist Page","Geist Fallback",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;--font-display:"Geist Page","Geist Fallback",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
.t-select{min-height:48px;width:100%;background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--r-control);padding:0 12px;font:500 16px var(--font-sans);color:var(--ink)}
.t-select:focus{outline:none;border-color:var(--focus);box-shadow:var(--shadow-focus)}
.t-field label:has(input[type=checkbox]){display:flex;align-items:center;min-height:44px;gap:8px}
.t-field input[type=checkbox]{width:18px;height:18px;flex:none;accent-color:var(--fairway)}
.t-card{display:grid;gap:10px;align-content:start;text-decoration:none;color:inherit;transition:transform .2s,box-shadow .2s}
.t-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-lift)}
.t-card h2{font-size:var(--fs-h3,24px);letter-spacing:-.02em}
.t-card .data-badge{justify-self:start}
.t-list{display:grid;gap:8px;padding-left:20px;max-width:49.725em}
.t-section p{max-width:49.725em}
.t-section p.pf-formula{max-width:45em}/* PW-262: Geist Mono paragraph, was 75ch at 0.6em per ch, so it keeps its 630px at 14px */
.t-section a,.sec-head .label a{color:var(--fairway)}
/* PW-012/013: small inline links get a 24px+ hit area; vertical padding on inline boxes does not change layout */
.sec-head .label a,main .tv-attr a:not([class]),main .tv-fallback a:not([class]){padding-block:10px}
.t-result.feature .t-delta{color:var(--cta-ink)}
.t-table{min-width:0}
.t-disc{display:grid;gap:8px;background:var(--mist)}
/* P3 case studies */
.cs{display:grid;gap:16px}
.cs-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.cs h2{font-size:clamp(26px,4vw,36px);letter-spacing:-.03em}
.cs h3{font-size:16px;font-weight:600;margin-bottom:6px}
.cs-out{background:var(--mist);border-radius:var(--r-control);padding:20px;align-content:start;align-self:start}
.cs-out .t-kv{border-top:0;padding-top:0;grid-template-columns:1fr;gap:20px}
.cs-num{font-size:clamp(30px,5vw,44px);line-height:1;margin-bottom:6px}
.cs-toc{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.cs-toc a{padding:8px 14px;border-radius:var(--r-pill);background:var(--mist);color:var(--ink);text-decoration:none;font-size:14px;display:inline-flex;align-items:center;min-height:44px}
.cs-toc a:hover{background:var(--fairway-soft)}
.t-card:focus-visible{border-radius:var(--r-md);outline-offset:4px}
@media (prefers-reduced-motion:reduce){.reveal.pending{opacity:1;transform:none}}
.cs-shot{margin:0;display:grid;gap:8px}.cs-shot img{width:100%;height:auto;border:1px solid var(--line);border-radius:var(--r-control)}
.mm-ph{background:var(--mist);border:1px dashed var(--line-strong);border-radius:4px;padding:0 4px;color:var(--ink-muted)}
.mm-todo{background:var(--opinion-bg);color:var(--ink);border:1px solid var(--opinion-line);border-radius:4px;padding:0 4px;font-weight:600}
.mm-issue{display:grid;gap:16px;max-width:860px}.mm-issue h2{margin-top:24px}.mm-issue .mm-charts{margin:8px 0}
.mm-sample{display:grid;gap:6px}
.mm-archive{list-style:none;padding:0;margin:0;display:grid;gap:12px}
.is-stale{opacity:.4;pointer-events:none}
.t-input:has([aria-invalid=true]){border-color:var(--danger,#a3261b)}
.t-input:focus-within{border-color:var(--focus);box-shadow:0 0 0 3px rgba(23,96,58,.35)}
.t-table-wrap:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
#mm-sens-rows th[scope=row],#mm-sens-head th:first-child{position:sticky;left:0;background:var(--surface);z-index:1}
.t-pills{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.t-pills a{display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;border-radius:var(--r-pill);background:var(--mist);color:var(--ink);text-decoration:none;font-size:14px}
.mm-bars{display:grid;gap:8px}
.mm-bar-row{display:grid;grid-template-columns:minmax(92px,auto) 1fr auto;gap:10px;align-items:center;font-size:14px}
.mm-bar-l{color:var(--ink-muted)}.mm-bar-v{font:600 14px/1 var(--font-mono);color:var(--ink)}
.mm-bar-t{display:block;height:20px}.mm-bar{display:block;height:20px;border-radius:5px;background:var(--mm-matcha)}
.mm-bar-row.top .mm-bar{background:var(--mm-foam);outline:2px solid var(--mm-matcha);outline-offset:-2px}
@media (max-width:900px){.mm-tool>#mm-results{order:-1}}

/* P4 design review items 2 to 9 */
.mm-sticky th:first-child,.mm-sticky td:first-child{position:sticky;left:0;background:var(--surface);z-index:1}
.mm-score-head{justify-content:flex-end}
.hit-rate.is-empty{background:var(--mist);color:var(--ink)}
.data-badge.opinion.wrap{white-space:normal;height:auto;line-height:1.4;padding-block:6px;display:inline-block}
.mm-issue > p.label a{display:inline-flex;align-items:center;min-height:44px}
.mm-archive li{position:relative}.mm-archive a::after{content:"";position:absolute;inset:0}
@media(min-width:901px){.comps-hint{display:none}}
/* P5 design review items 5, 6 */
.comps td{font-variant-numeric:tabular-nums}
.comps tr.target th{background:var(--fairway-soft)}
/* P6 design review: chart sizing */
.p6-charts{display:grid;gap:16px}
.p6-charts .t-chart svg,.mm-issue figure.t-chart:not(.ff) svg{max-width:640px}
.mm-issue figure.t-chart:not(.ff) svg text{font-size:18px!important}
.ff-scroll{overflow-x:auto}.ff-scroll svg{min-width:560px}
/* P7 design review */
.p6-charts .t-chart svg text,.t-grid.two .t-chart svg text{font-size:18px!important}
.recruiters details summary{min-height:44px;display:flex;align-items:center}
@media screen{.resume-contact a{min-height:44px;display:inline-flex;align-items:center}}
/* PW-129 one-page printed web resume (Letter). Spec for the print block below:
   1. Type (pt): name 17 / section heads 10.5 bold with hairline rule / body, bullets, contact 9.5 (line-height 1.25) / dates and URL suffix 9.
   2. Spacing: sections 8pt apart, items 4pt apart, bullets 1pt apart, head rule 5pt under the contact line.
   3. Margins: .4in all round via named page `resume` (other pages keep .5in and body 10pt/1.3). The 48px .t-section screen margin was 36pt of dead space on the page, so it is zeroed in print.
   4. Palette: black on white, existing green accent on links only (no change from styles.css).
   5. Alternatives tried: A .4in + 9.5pt (fits with about 2 lines to spare), B 10pt + .45in (2 pages), B2 10pt + .4in + line-height 1.2 (fits with zero slack, fragile if fonts fall back). Chose A.
   All overrides are scoped to .resume so recruiters/index.html print (assets/print-recruiters.css) is untouched. */
@media print{
 .t-stack,.t-section,.resume,.resume-sec,.resume-item{display:block!important}
 .t-section:has(>.resume){margin-top:0!important}
 body{font-size:10pt;line-height:1.3}
 .resume{font-size:9.5pt;line-height:1.25}
 .t-section:has(>.resume){page:resume}
 .resume{gap:0!important}
 .resume-head{padding-bottom:5pt!important}
 .resume-head h2{font-size:17pt!important;line-height:1.15!important;margin:0!important}
 .resume-contact{font-size:9.5pt!important;line-height:1.25!important;margin-top:2pt}
 .resume-sec{margin-top:8pt!important}
 .resume-sec h3{font-size:10.5pt!important;line-height:1.2!important;margin:0 0 3pt!important;padding-bottom:1.5pt;border-bottom:.5pt solid #999;break-after:avoid}
 .resume-item{margin-top:4pt!important}
 .resume-item:first-of-type{margin-top:0!important}
 .resume-item p,.resume-item ul{font-size:9.5pt!important;line-height:1.25!important;margin:0}
 .resume-item ul{padding-left:14pt;display:block!important}
 .resume-item li+li{margin-top:1pt}
 .resume-item .ri-date{font-size:9pt!important}
 .resume-sec>p{font-size:9.5pt!important;line-height:1.25!important;margin:0}
 .resume-contact a[href^="/"]::after{content:" (www.ashtoncapesvarisano.space" attr(href) ")";font-size:9pt}
 .mm-todo{display:none}
 @page{margin:.5in}
}
@page resume{size:Letter;margin:.4in}
/* D-001 Roth conversion bracket filler: bracket bar */
.rb-track{display:flex;height:40px;border:1px solid var(--line-strong);border-radius:var(--r-xs);overflow:hidden;background:var(--surface)}
.rb-seg{display:block;height:100%}
.rb-have,i.rb-have{background:var(--line-strong)}
.rb-conv,i.rb-conv{background:var(--fairway)}
.rb-room,i.rb-room{background:var(--fairway-soft)}
.rb-ticks{position:relative;height:44px;margin-top:6px;font:500 12px/1.3 var(--font-mono);color:var(--ink-muted)}
.rb-tick{position:absolute;top:0;transform:translateX(0);white-space:nowrap;border-left:1px solid var(--line-strong);padding-left:4px}
.rb-tick.end{left:100%;transform:translateX(-100%);border-left:0;border-right:1px solid var(--line-strong);padding:0 4px 0 0;text-align:right}
.rb-key{display:flex;flex-wrap:wrap;gap:6px 16px;margin:8px 0 0;padding:0;list-style:none;font-size:var(--fs-sm);color:var(--ink-muted)}
.rb-key i{display:inline-block;width:12px;height:12px;border:1px solid var(--line-strong);border-radius:2px;margin-right:6px;vertical-align:-1px}
.t-kv .num{margin:0;font:500 20px/1.2 var(--font-sans);font-variant-numeric:tabular-nums}
#sie-rows td:first-child,#sie-foot th:first-child{white-space:nowrap}
/* PW-080, PW-087: radios in tool option pills are 24px (WCAG 2.5.8); the wrapping label stays 44px tall, so no layout shift */
:is(.wc-opt,.bd-opt,.ts-opt,.os-opt,.cc-opt,.ct-opt,.pl-opt) input[type=radio]{width:24px;height:24px;flex:none}
/* PW-092, PW-491: checkboxes (incl. paper-lbo #pl-interest) match the 24px radios; beats the generic .t-field input min-height:44px so the box stays square */
:is(.cc-opt,.cr-opt,.pl-opt,.t-field) input[type=checkbox]{width:24px;height:24px;min-height:24px;margin:0;flex:none}
/* Tool guides (quick start, tap-to-define terms, how-to video player). Spec in docs/tool-ux-audit.md. Easing cubic-bezier(.2,.8,.2,1). */
.tg-qs{margin-top:20px;padding:16px;border:1px solid var(--line);border-radius:var(--r-control);background:var(--mist);max-width:960px}
.tg-body{display:grid;gap:12px}
.tg-fold>summary{display:none}
/* PW-167: the fold ships open in the HTML, so desktop (and no-JS) shows the guide before paint in every browser. On phones with scripting on, the body is
   hidden by CSS until tool-guide.js closes the fold and adds .tg-ready (summary is 44px either way, so no shift). Needs no ::details-content. */
.tg-dl{display:grid;gap:10px;margin:0}
.tg-dl dt{font:500 12px/16px var(--font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-muted)}
.tg-dl dd{margin:2px 0 0;font-size:15px;line-height:1.5;color:var(--ink);max-width:49.725em}
@media (min-width:768px){.tg-dl{grid-template-columns:1fr 1fr;gap:24px}}
/* PW-303: the PW-262 reserve (min-height:6em on the comps-builder quick-start definitions, 768 to 824px) is gone. It held the 4 Geist lines because Geist wraps the second dd to 4 lines and the fallback to 3 from about 805px, but with the optional Geist Page face a pageview never swaps fonts, so the reserve only left a blank line (1.1 line gap) in the fallback from 808 to 824px. */
.tg-row{display:flex;flex-wrap:wrap;gap:8px}
.tg-row .btn{background:var(--surface);border-color:var(--line-strong,var(--line))}
.tg-terms{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0;font-size:14px}
.tg-terms-h{color:var(--ink-muted);margin-right:2px}
.tg-term{min-height:36px;padding:0 12px;border:1px dashed var(--line-strong,var(--ink-muted));border-radius:999px;background:var(--surface);color:var(--ink);font:500 14px var(--font-sans);cursor:help}
.tg-term:hover{border-color:var(--fairway)}
/* PW-118: 44px tap targets on phones for glossary chips and the inline All calculators link; desktop unchanged */
@media (max-width:640px){.tg-term{display:inline-flex;align-items:center;min-height:44px}.t-section p a[href="/builds#tools"]{display:inline-block;padding-block:11px;margin-block:-11px}}
/* PW-120/PW-121: 44px tap areas on phones without growing line or row height. Padding adds the hit area, an equal negative margin cancels it in layout. Desktop unchanged. */
@media (max-width:640px){.sec-head .label a[href="/builds#tools"]{display:inline-block;padding-block:14px;margin-block:-14px}footer nav a[href="/builds#tools"]{min-height:44px;margin-block:-6px}}
.tg-term:focus-visible,.tg-dlg button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.tg-pop{display:none;max-width:min(380px,calc(100vw - 32px));padding:16px;border:1px solid var(--line);border-radius:var(--r-control);background:var(--surface);color:var(--ink);box-shadow:var(--shadow-lift);font-size:15px;line-height:1.5}
.tg-pop.tg-open{display:block;position:fixed;inset:0;margin:auto;height:fit-content;z-index:90}
.tg-pop:popover-open{display:block}
.tg-pop p{margin:0 0 12px}
.tg-pop::backdrop{background:rgba(14,26,19,.18)}
.tg-dlg{width:min(960px,calc(100vw - 32px));max-width:none;padding:0;border:1px solid var(--line);border-radius:var(--r-control);background:var(--surface);color:var(--ink);box-shadow:var(--shadow-lift)}
.tg-dlg::backdrop{background:rgba(14,26,19,.6)}
.tg-dlg-head{display:flex;align-items:center;gap:12px;padding:8px 8px 8px 16px}
.tg-dlg-head h2{margin:0;font-size:17px;line-height:1.3;letter-spacing:-.01em}
.tg-dlg video{display:block;width:100%;height:auto;aspect-ratio:16/9;background:#0E1A13}
.tg-dlg .t-hint{margin:0;padding:10px 16px 14px}
/* PW-356: .bt-score is flex:none, so its box grew when the small label parsed. Measured with fonts loaded (375 and 1280): the five example scores are 129.6 to 146px wide depending on font load state (141 and 145.1 seen for the first card), digits only about 28 to 48px. Reserve 152px, above the widest. Left aligned on purpose: right aligned text moves its left edge when the small label arrives, which counts as a shift in row layout (the column layout under 481px is full width). */
@media (min-width:481px){.bt-score{min-width:152px}}
@media (prefers-reduced-motion:no-preference){.tg-dlg[open]{animation:tg-in 240ms cubic-bezier(.2,.8,.2,1)}}
@keyframes tg-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media print{.tg-qs{display:none}}
/* PW-094: on phones the quick-start box is a closed native details (44px summary) so the tool starts above the fold.
   Chevron turns with transform only; reduced motion drops the transition. Desktop keeps the open box, summary hidden. */
@media (max-width:640px){
 .tg-qs{margin-top:12px;padding:0}
 .tg-fold>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:0 16px;list-style:none;cursor:pointer;font:600 15px var(--font-sans);color:var(--ink)}
 .tg-fold>summary::-webkit-details-marker{display:none}
 .tg-fold>summary::after{content:"";width:8px;height:8px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg) translateY(-2px);flex:none;margin-left:auto}
 /* PW-356: with the summary text unparsed the chevron sat at the left; pin it right so it does not jump. */
 .tg-fold.tg-ready[open]>summary::after{transform:rotate(225deg) translateY(-2px)}
 .tg-fold>summary:focus-visible{outline:2px solid var(--focus);outline-offset:-2px;border-radius:var(--r-control)}
 .tg-fold .tg-body{padding:0 16px 16px}
}
/* PW-179: if tool-guide.js is blocked or fails, the hidden body reveals itself after 2s (CSS only, no ::details-content). visibility/height keep layout identical to display:none until then. */
@media (max-width:640px) and (scripting:enabled){
 .tg-fold:not(.tg-ready)>.tg-body{visibility:hidden;height:0;overflow:hidden;padding-block:0;animation:tg-late 0s 2s forwards}
 .tg-fold:not(.tg-ready)[open]>summary::after{animation:tg-chev 0s 2s forwards}
}
@keyframes tg-late{to{visibility:visible;height:auto;overflow:visible;padding-block:0 16px}}
@keyframes tg-chev{to{transform:rotate(225deg) translateY(-2px)}}
/* JS off: the fold stays open and the chevron matches. */
@media (max-width:640px) and (scripting:none){.tg-fold[open]>summary::after{transform:rotate(225deg) translateY(-2px)}}
@media (max-width:640px) and (prefers-reduced-motion:no-preference){.tg-fold>summary::after{transition:transform 200ms cubic-bezier(.2,.8,.2,1)}}
/* PW-160: desktop header padding matched at parse time (styles.css needs :has(h1), which only matches once the h1 is parsed). Same values as its rule. */
main>section.t-page>div.sec-head:first-child{padding-block:clamp(48px,8vw,90px) clamp(28px,4vw,44px);margin-bottom:0;max-width:950px;gap:20px}
/* PW-094: tighter tool header on phones. Same words, smaller top padding, gap and intro type; h1 size is left alone. */
@media (max-width:640px){
 main>section.t-page>div.sec-head:first-child{padding-block:12px 4px;gap:8px}
 main>section.t-page>div.sec-head:first-child .lead{font-size:16px;line-height:1.45}
 main>section.t-page>div.sec-head:first-child>p:not(.label):not(.lead){font-size:15px;line-height:1.45}
}
/* PW-432: on paper a table cannot scroll sideways, so the screen min-width pushed wide tables past the page edge (comps 732px, unit
   economics 150px). In print the scroll wraps stop clipping, tables fill the page width and may wrap their cells, and the type steps
   down to 8pt (never under 7pt). Numbers stay right-aligned, no column is hidden. Print media only, so screen is untouched. */
@media print{
  .t-table-wrap,.tablewrap,.comps-wrap{overflow:visible!important;container-type:normal!important;display:block!important;max-width:100%!important}
  .t-table-wrap::after{display:none!important}
  .t-table,.ue-tbl,.comps{min-width:0!important;width:100%!important;max-width:100%!important;table-layout:auto;font-size:8pt!important}
  .t-table :is(th,td),.ue-tbl :is(th,td),.comps :is(th,td){white-space:normal!important;overflow-wrap:break-word;padding:3pt 4pt!important;font-size:8pt!important;position:static!important;box-shadow:none!important;min-width:0!important}
  .t-table caption{position:static!important;max-width:none!important;font-size:9pt}
}
