/* Styles for the static reference pages written by tools/gen_content_pages.mjs. */
:root{color-scheme:light dark;--bg:#fff;--fg:#12161c;--muted:#5a6472;--line:#d5dae1;--soft:#f3f5f8;--link:#0e5a8a;--accent:#c4501b;--accent-fg:#fff}
@media (prefers-color-scheme:dark){:root{--bg:#12161c;--fg:#e6eaf0;--muted:#a3adbd;--line:#333d4a;--soft:#1b222b;--link:#6cb6e6;--accent:#e0743c;--accent-fg:#12161c}}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--fg);font:17px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
a{color:var(--link)}
a:focus-visible,button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.skip{position:absolute;left:-999px;top:8px}
.skip:focus{left:8px;background:var(--bg);padding:6px 10px;z-index:2}
header.site,main,footer.site{max-width:48rem;margin:0 auto;padding:0 16px}
header.site{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 20px;padding-top:16px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.brand{font-weight:800;font-size:20px;text-decoration:none;color:var(--fg)}
header.site ul,footer.site ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 18px}
header.site a{text-decoration:none;font-weight:600}
/* The nine reference card sections sit under one label in the header. Every link stays visible. */
header.site .nav-refs{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;padding:2px 10px;border-left:2px solid var(--line)}
header.site .nav-refs-label{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
header.site .nav-refs ul{gap:4px 14px}
main{padding-top:8px;padding-bottom:32px}
.crumbs ol{list-style:none;padding:0;margin:16px 0 0;display:flex;flex-wrap:wrap;gap:4px;font-size:14px;color:var(--muted)}
.crumbs li+li::before{content:"›";margin-right:4px}
h1{font-size:clamp(26px,5vw,34px);line-height:1.2;margin:16px 0 8px;text-wrap:balance}
h2{font-size:22px;line-height:1.3;margin:36px 0 8px;padding-top:12px;border-top:1px solid var(--line)}
h3{font-size:18px;margin:24px 0 6px}
p,ul,ol{margin:0 0 14px}
ul,ol{padding-left:1.3em}
li{margin:4px 0}
.lead{font-size:19px}
.meta,.updated,.source,.note{color:var(--muted);font-size:15px}
.cta{display:inline-block;background:var(--accent);color:var(--accent-fg);font-weight:700;text-decoration:none;padding:10px 18px;border-radius:8px}
.cta:hover{filter:brightness(1.08)}
code{font:0.9em ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:var(--soft);padding:1px 4px;border-radius:4px}
.scroll{overflow-x:auto;margin:0 0 16px;border:1px solid var(--line);border-radius:8px}
table{border-collapse:collapse;width:100%;font-size:15px}
th,td{text-align:left;vertical-align:top;padding:8px 10px;border-bottom:1px solid var(--line)}
thead th{background:var(--soft);font-weight:700}
tbody tr:last-child>*{border-bottom:0}
tbody th{font-weight:600;width:45%}
figure.equation{margin:16px 0 8px;padding:14px 12px;background:var(--soft);border-radius:8px;overflow-x:auto}
figure.equation math{font-size:1.15em}
figcaption{margin-top:10px;font-size:15px}
ul.calcs{list-style:none;padding:0}
ul.calcs li{padding:10px 0;border-bottom:1px solid var(--line);margin:0}
ul.calcs a{font-weight:700;display:block}
ul.calcs span{color:var(--muted);font-size:15px}
ul.toc{columns:2 14rem;padding-left:1.1em}
footer.site{border-top:1px solid var(--line);padding-top:16px;padding-bottom:40px;font-size:14px;color:var(--muted)}
footer.site ul{margin-bottom:10px}
.consent-link{background:none;border:0;padding:0;font:inherit;color:var(--link);text-decoration:underline;cursor:pointer}
.static-intro{max-width:48rem;margin:0 auto;padding:16px}
.ad-slot{min-height:90px;margin:16px 0}
@media print{header.site nav,footer.site ul,.cta,.ad-slot,.adsbygoogle,ins{display:none!important}body{font-size:12pt}a{color:inherit}}

/* Process Pitfalls (/pitfalls/). Colors pass 4.5:1 on the page background in all three modes. */
:root{--cat-instruments:#0b5cad;--cat-design:#9a4500;--cat-models:#6a3d9a;--cat-people:#1b7340}
@media (prefers-color-scheme:dark){:root{--cat-instruments:#6cb6e6;--cat-design:#f0a050;--cat-models:#b99af5;--cat-people:#5fd08a}}
:root[data-theme="light"]{color-scheme:light;--bg:#fff;--fg:#12161c;--muted:#5a6472;--line:#d5dae1;--soft:#f3f5f8;--link:#0e5a8a;--accent:#c4501b;--accent-fg:#fff;--cat-instruments:#0b5cad;--cat-design:#9a4500;--cat-models:#6a3d9a;--cat-people:#1b7340}
:root[data-theme="control-room"]{color-scheme:dark;--bg:#0c0f12;--fg:#e9eef2;--muted:#9fb0bd;--line:#2c3640;--soft:#161b21;--link:#35d6ff;--accent:#ffb000;--accent-fg:#0c0f12;--cat-instruments:#35d6ff;--cat-design:#ffb52e;--cat-models:#c4a1ff;--cat-people:#4fe08a}
[data-category="instruments"]{--cat:var(--cat-instruments)}
[data-category="design"]{--cat:var(--cat-design)}
[data-category="models"]{--cat:var(--cat-models)}
[data-category="people"]{--cat:var(--cat-people)}
body.wide header.site,body.wide main,body.wide footer.site{max-width:72rem}
svg.pitfall-icon{width:64px;height:64px;flex:none;color:var(--fg)}
svg.pitfall-icon .accent{stroke:var(--cat);color:var(--cat)}
.pitfall-tagline{font-size:20px;font-weight:700;margin:0 0 12px;color:var(--accent)}
.pitfall-num{font:700 12px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.04em;color:var(--cat);border:1px solid var(--cat);border-radius:4px;padding:3px 6px;background:var(--bg)}
.pitfall-legend{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:6px 18px;font-size:15px}
.pitfall-legend li{margin:0}
.pitfall-legend .swatch{display:inline-block;width:12px;height:12px;border-radius:3px;background:var(--cat);margin-right:6px}
.pitfall-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.pitfall-filters[hidden],.poster-tools[hidden]{display:none}
.pitfall-chip,.pitfall-tools button,.pitfall-copy,.pitfall-panel button{font:inherit;font-size:15px;font-weight:600;padding:6px 12px;border-radius:999px;border:2px solid var(--cat,var(--fg));background:var(--bg);color:var(--fg);cursor:pointer}
.pitfall-chip[aria-pressed="true"],.pitfall-tools button[aria-pressed="true"]{background:var(--cat,var(--fg));color:var(--bg)}
.pitfall-status{min-height:1.4em;font-size:15px;color:var(--muted);margin:0 0 4px}
.pitfall-tools{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:12px 0 0;font-size:14px;color:var(--muted)}
.pitfall-tools button{font-size:14px;padding:3px 10px}
.pitfall-grid{list-style:none;margin:8px 0 28px;padding:0;display:grid;grid-template-columns:1fr;gap:14px}
.pitfall-grid>li{margin:0}
.pitfall-grid>li[hidden]{display:none}
@media (min-width:30rem){.pitfall-grid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:48rem){.pitfall-grid{grid-template-columns:repeat(3,1fr)}}
@media (min-width:64rem){.pitfall-grid{grid-template-columns:repeat(4,1fr)}}
.pitfall-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;height:100%;padding:38px 12px 14px;border:1px solid var(--line);border-top:6px solid var(--cat);border-radius:10px;background:var(--bg);color:var(--fg);text-decoration:none;text-align:center;overflow:hidden}
.pitfall-card:hover,.pitfall-card:focus-visible{border-color:var(--cat);background:var(--soft)}
.pitfall-card .pitfall-num{position:absolute;top:10px;left:10px}
.pitfall-title{font-weight:700;line-height:1.3}
.pitfall-summary{font-size:14px;line-height:1.4;color:var(--muted)}
@media (hover:hover){
  .pitfall-card{height:15rem}
  .pitfall-card svg.pitfall-icon{transition:width .18s,height .18s}
  .pitfall-card .pitfall-summary{max-height:0;opacity:0;overflow:hidden;transition:opacity .18s,max-height .18s}
  .pitfall-card:hover svg.pitfall-icon,.pitfall-card:focus-visible svg.pitfall-icon{width:40px;height:40px}
  .pitfall-card:hover .pitfall-summary,.pitfall-card:focus-visible .pitfall-summary{max-height:9rem;opacity:1}
}
@media (hover:hover) and (prefers-reduced-motion:reduce){.pitfall-card svg.pitfall-icon,.pitfall-card .pitfall-summary{transition:none}}
.pitfall-head{display:flex;gap:18px;align-items:center;margin:16px 0 8px}
.pitfall-head svg.pitfall-icon{width:96px;height:96px}
@media (max-width:30rem){.pitfall-head{flex-direction:column;align-items:flex-start}}
.pitfall-kicker{font-size:14px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);margin:0}
.pitfall-cat{color:var(--cat)}
.pitfall h1,.pitfall .pitfall-h1{margin:4px 0}
.pitfall-tldr{margin:6px 0}
.pitfall-cousin{color:var(--muted);font-size:15px;margin:0}
.pitfall-case{border:1px solid var(--line);border-left:6px solid var(--cat);border-radius:8px;padding:4px 16px 8px;margin:28px 0 0;background:var(--soft)}
.pitfall-case summary{cursor:pointer}
.pitfall-case summary h2{display:inline;border:0;padding:0;margin:0;font-size:22px}
.pitfall-fix{border:2px solid var(--cat);border-radius:8px;padding:4px 16px 8px;margin:28px 0 0}
.pitfall-fix h2{border:0;padding-top:0;margin-top:12px}
.pitfall-mini{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(13rem,1fr));gap:10px}
.pitfall-mini li{margin:0}
.pitfall-mini a{display:flex;align-items:center;gap:10px;height:100%;padding:10px;border:1px solid var(--line);border-left:5px solid var(--cat);border-radius:8px;text-decoration:none;color:var(--fg);font-weight:600}
.pitfall-mini svg.pitfall-icon{width:40px;height:40px}
.pitfall-share{margin-top:28px;font-size:15px;color:var(--muted)}
.pitfall-copy{font-size:14px;padding:3px 10px;margin-right:6px}
.pitfall-pager{display:flex;flex-wrap:wrap;gap:12px;margin:18px 0}
.pitfall-pager a{display:block;flex:1 1 14rem;padding:10px 12px;border:1px solid var(--line);border-radius:8px;text-decoration:none;font-weight:600}
.pitfall-pager a[rel="next"]{text-align:right}
.pitfall-pager span{display:block;font-size:13px;font-weight:400;text-transform:uppercase;color:var(--muted)}
.pitfall-panel{position:fixed;inset:0 0 0 auto;margin:0;width:min(34rem,100%);max-width:100%;height:100%;max-height:100%;padding:0;border:0;border-left:1px solid var(--line);background:var(--bg);color:var(--fg);box-shadow:-8px 0 24px rgba(0,0,0,.3)}
.pitfall-panel::backdrop{background:rgba(0,0,0,.5)}
.pitfall-panel[open]{animation:pitfall-slide .22s ease-out}
@keyframes pitfall-slide{from{transform:translateX(28px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.pitfall-panel[open]{animation:none}}
@media (max-width:48rem){.pitfall-panel{width:100%;border-left:0}}
.pitfall-panel-bar{position:sticky;top:0;z-index:1;display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 16px;background:var(--bg);border-bottom:1px solid var(--line)}
.pitfall-panel-bar .spacer{flex:1}
.pitfall-panel-bar a{font-size:15px;font-weight:600}
.pitfall-panel-body{padding:0 18px 28px}
body.panel-open{overflow:hidden}
.poster{border:1px solid var(--line);border-radius:8px;padding:16px;background:var(--bg);color:var(--fg);--u:1}
.poster-head{text-align:center;margin-bottom:8px}
.poster-head h2{border:0;margin:0;padding:0;font-size:32px}
.poster-head p{margin:0;font-size:18px;font-weight:700;color:var(--accent)}
.poster-row h2{border:0;padding:0;margin:14px 0 6px;font-size:18px;color:var(--cat)}
.poster-tiles{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(9.5rem,1fr));gap:8px}
@media (min-width:64rem){.poster-tiles{grid-template-columns:repeat(6,1fr)}}
.poster-tiles li{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;margin:0;padding:26px 8px 8px;border:1px solid var(--line);border-top:5px solid var(--cat);border-radius:6px;text-align:center;font-size:12px;line-height:1.3}
.poster-tiles .pitfall-num{position:absolute;top:6px;left:6px;font-size:10px}
.poster-tiles svg.pitfall-icon{width:44px;height:44px}
.poster-tiles span:last-child{color:var(--muted)}
.poster-foot{margin-top:10px;text-align:center;font-weight:700}
.poster-tools{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;margin:0 0 14px}
@page poster-letter{size:11in 8.5in;margin:.3in}
@page poster-tabloid{size:17in 11in;margin:.4in}
@page poster-ansid{size:34in 22in;margin:.8in}
@media print{
  body.poster-page{background:#fff;color:#000}
  body.poster-page header.site,body.poster-page footer.site,body.poster-page .crumbs,body.poster-page h1,body.poster-page .poster-intro,body.poster-page .poster-tools,body.poster-page .pitfall-tools,body.poster-page .skip{display:none!important}
  body.poster-page main{max-width:none;padding:0}
  .poster{page:poster-letter;--u:1;--bg:#fff;--fg:#12161c;--muted:#3b4350;--line:#9aa3af;--soft:#f3f5f8;--accent:#a03c0f;--cat-instruments:#0b5cad;--cat-design:#9a4500;--cat-models:#6a3d9a;--cat-people:#1b7340;border:0;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;break-inside:avoid}
  body.poster-tabloid .poster{page:poster-tabloid;--u:1.4}
  body.poster-ansid .poster{page:poster-ansid;--u:2.7}
  .poster-head{margin-bottom:calc(3pt*var(--u))}
  .poster-head h2{font-size:calc(22pt*var(--u))}
  .poster-head p{font-size:calc(10pt*var(--u))}
  .poster-row{break-inside:avoid}
  .poster-row h2{font-size:calc(10pt*var(--u));margin:calc(5pt*var(--u)) 0 calc(2pt*var(--u))}
  .poster-tiles{grid-template-columns:repeat(6,1fr);gap:calc(4pt*var(--u))}
  .poster-tiles li{padding:calc(14pt*var(--u)) calc(4pt*var(--u)) calc(4pt*var(--u));gap:calc(2pt*var(--u));font-size:calc(6pt*var(--u));border-radius:calc(3pt*var(--u));border-top-width:calc(3pt*var(--u))}
  .poster-tiles strong{font-size:calc(8pt*var(--u));line-height:1.15}
  .poster-tiles .pitfall-num{font-size:calc(6pt*var(--u));top:calc(3pt*var(--u));left:calc(3pt*var(--u));padding:calc(1.5pt*var(--u)) calc(3pt*var(--u))}
  .poster-tiles svg.pitfall-icon{width:calc(24pt*var(--u));height:calc(24pt*var(--u))}
  .poster-foot{font-size:calc(8pt*var(--u));margin-top:calc(3pt*var(--u))}
  .pitfall-grid,.pitfall-panel{display:none}
}
.pitfall-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- Rules of Thumb ---------- */
/* Rule categories use the four pitfall color slots, in order. Contrast is already checked for them. */
[data-category="flow"]{--cat:var(--cat-instruments)}
[data-category="machines"]{--cat:var(--cat-design)}
[data-category="vessels"]{--cat:var(--cat-models)}
[data-category="heat"]{--cat:var(--cat-people)}
/* Firmness badge: text plus border style, so color is never the only cue. */
.rule-firm{display:inline-block;font-size:12px;font-weight:700;line-height:1;padding:4px 8px;border-radius:999px;border:2px solid var(--fg);color:var(--fg);background:var(--bg);white-space:nowrap}
.rule-firm[data-firmness="firm"]{border-style:solid}
.rule-firm[data-firmness="typical"]{border-style:dashed}
.rule-firm[data-firmness="rough"]{border-style:dotted}
.rule-card .rule-firm{position:absolute;top:8px;right:8px}
.rule-card .rule-nick{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-top:-4px}
.rule-card .rule-us,.rule-card .rule-si{font-size:15px;line-height:1.35}
.rule-card .rule-us{font-weight:700}
.rule-card .rule-si{color:var(--muted)}
.rule-tag{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.05em;padding:1px 5px;border:1px solid var(--line);border-radius:4px;color:var(--muted);vertical-align:1px}
.rule-card svg.pitfall-icon{width:56px;height:56px}
@media (hover:hover){
  .rule-card{height:22rem}
  .rule-card .rule-si{max-height:0;opacity:0;overflow:hidden;transition:opacity .18s,max-height .18s}
  .rule-card:hover .rule-si,.rule-card:focus-visible .rule-si{max-height:5rem;opacity:1}
  .rule-card:hover svg.pitfall-icon,.rule-card:focus-visible svg.pitfall-icon{width:36px;height:36px}
  .rule-card .pitfall-summary{max-height:0;flex-shrink:0}
  .rule-card:hover .pitfall-summary,.rule-card:focus-visible .pitfall-summary{max-height:7rem}
}
@media (hover:hover) and (prefers-reduced-motion:reduce){.rule-card .rule-si{transition:none}}
/* Rule callout: the rule in US units first, then SI. Both sit side by side on wide screens. */
.rule-callout{display:grid;gap:10px 28px;margin:18px 0 8px;padding:14px 18px;border:1px solid var(--line);border-left:6px solid var(--cat);border-radius:8px;background:var(--soft)}
@media (min-width:40rem){.rule-callout{grid-template-columns:1fr 1fr}.rule-callout .rule-val[data-unit="both"]{grid-column:1/-1}}
.rule-val{margin:0;font-size:21px;line-height:1.3}
.rule-unit{display:block;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:2px}
:root[data-units="us"] .rule-val[data-unit="si"],:root[data-units="si"] .rule-val[data-unit="us"]{display:none}
:root[data-units="us"] .rule-callout,:root[data-units="si"] .rule-callout{grid-template-columns:1fr}
.rule-units-bar{min-height:36px;display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;margin:14px 0 0;font-size:14px;color:var(--muted)}
.rule-units-bar button{font:inherit;font-size:14px;font-weight:600;padding:4px 12px;border-radius:999px;border:2px solid var(--cat,var(--fg));background:var(--bg);color:var(--fg);cursor:pointer}
.rule-units-bar button[aria-pressed="true"]{background:var(--fg);color:var(--bg)}
.rule-nick{margin:0 0 6px}
.rule-breaks{margin:22px 0;padding:2px 18px 6px;border-left:4px solid var(--cat);background:var(--soft);border-radius:0 8px 8px 0}
.rule-breaks h2{border:0;margin-top:14px}
.rule-try{margin:16px 0;padding:14px 16px;border:2px solid var(--cat);border-radius:8px;background:var(--bg)}
.rule-try label{display:block;font-weight:600;margin:8px 0 2px}
.rule-try input,.rule-try select{font:inherit;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--fg);max-width:100%}
.rule-try button{margin-top:12px}
.rule-try output{display:block;margin-top:12px;font-weight:700}
.rule-try .rule-try-error{color:var(--fg);font-weight:600;margin-top:4px}
/* Rules poster tiles: US value bold, SI under it, firmness letter in the corner. */
.rules-poster .poster-tiles li{padding-top:30px}
.poster-firm{position:absolute;top:5px;right:6px;width:20px;height:20px;line-height:17px;text-align:center;font-size:11px;font-weight:700;border:2px solid var(--fg);border-radius:50%}
.poster-us{color:var(--fg)!important;font-weight:700}
.poster-us b,.poster-si b{font-size:.85em;letter-spacing:.04em;margin-right:2px}
.poster-foot span+span{margin-left:1.5em}
/* Rules poster: 7 columns so the 6, 4, 7 and 7 rule rows each take one row of tiles. */
@media (min-width:64rem){.rules-poster .poster-tiles{grid-template-columns:repeat(7,1fr)}}
@media print{
  .rules-poster .poster-tiles{grid-template-columns:repeat(7,1fr)}
  .rules-poster .poster-tiles li{padding-top:calc(13pt*var(--u));font-size:calc(5.5pt*var(--u))}
  .rules-poster .poster-tiles strong{font-size:calc(6.8pt*var(--u))}
  .rules-poster .poster-tiles svg.pitfall-icon{width:calc(20pt*var(--u));height:calc(20pt*var(--u))}
  .rules-poster .poster-firm{width:calc(11pt*var(--u));height:calc(11pt*var(--u));line-height:calc(9pt*var(--u));font-size:calc(6pt*var(--u));top:calc(3pt*var(--u));right:calc(3pt*var(--u))}
}

/* ---------- Fluid Failures ---------- */
/* Failure categories use the four pitfall color slots, in order. Contrast is already checked for them. */
[data-category="pumps"]{--cat:var(--cat-instruments)}
[data-category="transients"]{--cat:var(--cat-design)}
[data-category="vapor"]{--cat:var(--cat-models)}
[data-category="fluids"]{--cat:var(--cat-people)}
/* Consequence badge: text plus border style (double, solid, dashed), so color is never the only cue. */
.ff-cons{display:inline-block;font-size:12px;font-weight:700;line-height:1;padding:4px 8px;border-radius:999px;border:2px solid var(--fg);color:var(--fg);background:var(--bg);white-space:nowrap}
.ff-cons[data-consequence="safety"]{border-style:double;border-width:4px;padding:2px 8px}
.ff-cons[data-consequence="damage"]{border-style:solid}
.ff-cons[data-consequence="performance"]{border-style:dashed}
.rule-card .ff-cons{position:absolute;top:8px;right:8px}
.ff-nick{margin:0 0 6px}
.ff-signs{margin:22px 0;padding:2px 18px 6px;border-left:4px solid var(--cat);background:var(--soft);border-radius:0 8px 8px 0}
.ff-signs h2{border:0;margin-top:14px}
/* Failures poster tiles: US value bold, SI under it, consequence letter in the corner. */
.ff-poster .poster-tiles li{padding-top:30px}
/* Failure key numbers can run longer than rule values, so the fixed card height and reveal room are larger. */
@media (hover:hover){
  .ff-card{height:25rem}
  .ff-card:hover .pitfall-summary,.ff-card:focus-visible .pitfall-summary{max-height:9rem}
}
/* Failures poster: four rows of six use the standard 6 column print layout, with a little more room for the key numbers. */
@media print{
  .ff-poster .poster-tiles li{font-size:calc(6.4pt*var(--u));padding-top:calc(14.5pt*var(--u))}
  .ff-poster .poster-firm{width:calc(11pt*var(--u));height:calc(11pt*var(--u));line-height:calc(9pt*var(--u));font-size:calc(6pt*var(--u));top:calc(3pt*var(--u));right:calc(3pt*var(--u))}
}

/* ---------- Equipment Distress Signals ---------- */
/* Signal categories use the four pitfall color slots, in order. Contrast is already checked for them. */
[data-category="columns"]{--cat:var(--cat-instruments)}
[data-category="firing"]{--cat:var(--cat-design)}
[data-category="rotating"]{--cat:var(--cat-models)}
[data-category="beds"]{--cat:var(--cat-people)}
/* First clue badge: text plus border style (solid, dashed, dotted, double), so color is never the only cue. */
.ds-clue{display:inline-block;font-size:12px;font-weight:700;line-height:1;padding:4px 8px;border-radius:999px;border:2px solid var(--fg);color:var(--fg);background:var(--bg);white-space:nowrap}
.ds-clue[data-clue="pressure"]{border-style:solid}
.ds-clue[data-clue="temperature"]{border-style:dashed}
.ds-clue[data-clue="flow"]{border-style:dotted;border-width:3px;padding:3px 8px}
.ds-clue[data-clue="look"]{border-style:double;border-width:4px;padding:2px 8px}
.rule-card .ds-clue{position:absolute;top:8px;right:8px}
.ds-nick{margin:0 0 6px}
.ds-confirm{margin:22px 0;padding:2px 18px 6px;border-left:4px solid var(--cat);background:var(--soft);border-radius:0 8px 8px 0}
.ds-confirm h2{border:0;margin-top:14px}
.ds-poster .poster-tiles li{padding-top:30px}
@media (hover:hover){
  .ds-card{height:25rem}
  .ds-card:hover .pitfall-summary,.ds-card:focus-visible .pitfall-summary{max-height:9rem}
}
@media print{
  .ds-poster .poster-tiles li{font-size:calc(6.4pt*var(--u));padding-top:calc(14.5pt*var(--u))}
  .ds-poster .poster-firm{width:calc(11pt*var(--u));height:calc(11pt*var(--u));line-height:calc(9pt*var(--u));font-size:calc(6pt*var(--u));top:calc(3pt*var(--u));right:calc(3pt*var(--u))}
}

/* ---------- Thermodynamic Traps ---------- */
/* Trap categories use the four pitfall color slots, in order. Contrast is already checked for them. */
[data-category="phase"]{--cat:var(--cat-instruments)}
[data-category="energy"]{--cat:var(--cat-design)}
[data-category="expansion"]{--cat:var(--cat-models)}
[data-category="mixtures"]{--cat:var(--cat-people)}
/* Consequence badge: text plus border style (double, solid, dashed), so color is never the only cue. */
.tt-cons{display:inline-block;font-size:12px;font-weight:700;line-height:1;padding:4px 8px;border-radius:999px;border:2px solid var(--fg);color:var(--fg);background:var(--bg);white-space:nowrap}
.tt-cons[data-consequence="safety"]{border-style:double;border-width:4px;padding:2px 8px}
.tt-cons[data-consequence="equipment"]{border-style:solid}
.tt-cons[data-consequence="capacity"]{border-style:dashed}
.rule-card .tt-cons{position:absolute;top:8px;right:8px}
.tt-nick{margin:0 0 6px}
.tt-warning{margin:22px 0;padding:2px 18px 6px;border-left:4px solid var(--cat);background:var(--soft);border-radius:0 8px 8px 0}
.tt-warning h2{border:0;margin-top:14px}
/* Traps poster tiles: US value bold, SI under it, consequence letter in the corner. */
.tt-poster .poster-tiles li{padding-top:30px}
@media (hover:hover){
  .tt-card{height:25rem}
  .tt-card:hover .pitfall-summary,.tt-card:focus-visible .pitfall-summary{max-height:9rem}
}
@media print{
  .tt-poster .poster-tiles li{font-size:calc(6.6pt*var(--u));padding-top:calc(14.5pt*var(--u))}
  .tt-poster .poster-firm{width:calc(11pt*var(--u));height:calc(11pt*var(--u));line-height:calc(9pt*var(--u));font-size:calc(6pt*var(--u));top:calc(3pt*var(--u));right:calc(3pt*var(--u))}
}
/* ---------- Control Strategies ---------- */
/* Strategy categories use the four pitfall color slots, in order. Contrast is already checked for them. */
[data-category="loops"]{--cat:var(--cat-instruments)}
[data-category="selectors"]{--cat:var(--cat-design)}
[data-category="tuning"]{--cat:var(--cat-models)}
[data-category="supervisory"]{--cat:var(--cat-people)}
/* Level badge: text plus border style (solid, dashed, double), so color is never the only cue. */
.ctl-level{display:inline-block;font-size:12px;font-weight:700;line-height:1;padding:4px 8px;border-radius:999px;border:2px solid var(--fg);color:var(--fg);background:var(--bg);white-space:nowrap}
.ctl-level[data-level="basic"]{border-style:solid}
.ctl-level[data-level="intermediate"]{border-style:dashed}
.ctl-level[data-level="advanced"]{border-style:double;border-width:4px;padding:2px 8px}
.rule-card .ctl-level{position:absolute;top:8px;right:8px}
.ctl-nick{margin:0 0 6px}
.ctl-field{margin:22px 0;padding:2px 18px 6px;border-left:4px solid var(--cat);background:var(--soft);border-radius:0 8px 8px 0}
.ctl-field h2{border:0;margin-top:14px}
/* Loop sketch: an instrument diagram. Lines use the text color, the control signal path uses the category color. */
.ctl-sketch{margin:18px auto;padding:10px 12px;max-width:480px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}
.ctl-sketch svg{display:block;width:100%;height:auto;color:var(--fg)}
.ctl-sketch svg .accent{stroke:var(--cat);color:var(--cat)}
.ctl-sketch svg text{fill:var(--fg);stroke:none;font-family:inherit;font-weight:600}
.ctl-sketch figcaption{margin-top:6px;font-size:14px;color:var(--muted);text-align:center}
.ctl-poster .poster-tiles li{padding-top:30px}
@media (hover:hover){
  .ctl-card{height:25rem}
  .ctl-card:hover .pitfall-summary,.ctl-card:focus-visible .pitfall-summary{max-height:9rem}
}
@media print{
  .ctl-sketch svg,.ctl-sketch svg .accent{color:#000;stroke:#000}
  .ctl-sketch svg text{fill:#000}
  .ctl-poster .poster-tiles li{font-size:calc(6.8pt*var(--u));padding-top:calc(14.5pt*var(--u))}
  .ctl-poster .poster-firm{width:calc(11pt*var(--u));height:calc(11pt*var(--u));line-height:calc(9pt*var(--u));font-size:calc(6pt*var(--u));top:calc(3pt*var(--u));right:calc(3pt*var(--u))}
}
/* ---------- Material Selection Mishaps ---------- */
/* Mishap categories use the four pitfall color slots, in order. Contrast is already checked for them. */
[data-category="cracking"]{--cat:var(--cat-instruments)}
[data-category="pitting"]{--cat:var(--cat-design)}
[data-category="metalloss"]{--cat:var(--cat-models)}
[data-category="extremes"]{--cat:var(--cat-people)}
/* Warning badge: text plus border style (solid, dashed, double), so color is never the only cue. */
.mm-badge{display:inline-block;font-size:12px;font-weight:700;line-height:1;padding:4px 8px;border-radius:999px;border:2px solid var(--fg);color:var(--fg);background:var(--bg);white-space:nowrap}
.mm-badge[data-warning="sudden"]{border-style:solid}
.mm-badge[data-warning="localized"]{border-style:dashed}
.mm-badge[data-warning="gradual"]{border-style:double;border-width:4px;padding:2px 8px}
.rule-card .mm-badge{position:absolute;top:8px;right:8px}
.mm-nick{margin:0 0 6px}
.mm-field{margin:22px 0;padding:2px 18px 6px;border-left:4px solid var(--cat);background:var(--soft);border-radius:0 8px 8px 0}
.mm-field h2{border:0;margin-top:14px}
.mm-poster .poster-tiles li{padding-top:30px}
@media (hover:hover){
  .mm-card{height:25rem}
  .mm-card:hover .pitfall-summary,.mm-card:focus-visible .pitfall-summary{max-height:9rem}
}
@media print{
  .mm-poster .poster-tiles li{font-size:calc(6.6pt*var(--u));padding-top:calc(14.5pt*var(--u))}
  .mm-poster .poster-tiles strong{font-size:calc(7pt*var(--u))}
  .mm-poster .poster-tiles svg.pitfall-icon{width:calc(20pt*var(--u));height:calc(20pt*var(--u))}
  .mm-poster .poster-firm{width:calc(11pt*var(--u));height:calc(11pt*var(--u));line-height:calc(9pt*var(--u));font-size:calc(6pt*var(--u));top:calc(3pt*var(--u));right:calc(3pt*var(--u))}
}
/* ---------- Green Engineering Paradoxes ---------- */
/* Green Paradoxes categories use the four pitfall color slots, in order. Contrast is already checked for them. */
[data-category="waste"]{--cat:var(--cat-instruments)}
[data-category="integration"]{--cat:var(--cat-design)}
[data-category="electric"]{--cat:var(--cat-models)}
[data-category="fuels"]{--cat:var(--cat-people)}
/* Penalty badge: text plus border style (solid, dashed, double), so color is never the only cue. */
.gp-badge{display:inline-block;font-size:12px;font-weight:700;line-height:1;padding:4px 8px;border-radius:999px;border:2px solid var(--fg);color:var(--fg);background:var(--bg);white-space:nowrap}
.gp-badge[data-penalty="hazard"]{border-style:solid}
.gp-badge[data-penalty="uptime"]{border-style:dashed}
.gp-badge[data-penalty="footprint"]{border-style:double;border-width:4px;padding:2px 8px}
.rule-card .gp-badge{position:absolute;top:8px;right:8px}
.gp-nick{margin:0 0 6px}
.gp-field{margin:22px 0;padding:2px 18px 6px;border-left:4px solid var(--cat);background:var(--soft);border-radius:0 8px 8px 0}
.gp-field h2{border:0;margin-top:14px}
.gp-poster .poster-tiles li{padding-top:30px}
@media (hover:hover){
  .gp-card{height:25rem}
  .gp-card:hover .pitfall-summary,.gp-card:focus-visible .pitfall-summary{max-height:9rem}
}
@media print{
  .gp-poster .poster-tiles li{font-size:calc(6.6pt*var(--u));padding-top:calc(14.5pt*var(--u))}
  .gp-poster .poster-tiles strong{font-size:calc(7pt*var(--u))}
  .gp-poster .poster-tiles svg.pitfall-icon{width:calc(20pt*var(--u));height:calc(20pt*var(--u))}
  .gp-poster .poster-firm{width:calc(11pt*var(--u));height:calc(11pt*var(--u));line-height:calc(9pt*var(--u));font-size:calc(6pt*var(--u));top:calc(3pt*var(--u));right:calc(3pt*var(--u))}
}
/* ---------- Solids Handling Frustrations ---------- */
/* Solids Handling categories use the four pitfall color slots, in order. Contrast is already checked for them. */
[data-category="bins"]{--cat:var(--cat-instruments)}
[data-category="fluidbeds"]{--cat:var(--cat-design)}
[data-category="conveying"]{--cat:var(--cat-models)}
[data-category="feeders"]{--cat:var(--cat-people)}
/* Result badge: text plus border style (solid, dashed, double), so color is never the only cue. */
.sh-badge{display:inline-block;font-size:12px;font-weight:700;line-height:1;padding:4px 8px;border-radius:999px;border:2px solid var(--fg);color:var(--fg);background:var(--bg);white-space:nowrap}
.sh-badge[data-result="stall"]{border-style:solid}
.sh-badge[data-result="harm"]{border-style:dashed}
.sh-badge[data-result="loss"]{border-style:double;border-width:4px;padding:2px 8px}
.rule-card .sh-badge{position:absolute;top:8px;right:8px}
.sh-nick{margin:0 0 6px}
.sh-field{margin:22px 0;padding:2px 18px 6px;border-left:4px solid var(--cat);background:var(--soft);border-radius:0 8px 8px 0}
.sh-field h2{border:0;margin-top:14px}
.sh-poster .poster-tiles li{padding-top:30px}
@media (hover:hover){
  .sh-card{height:25rem}
  .sh-card:hover .pitfall-summary,.sh-card:focus-visible .pitfall-summary{max-height:9rem}
}
@media print{
  .sh-poster .poster-tiles li{font-size:calc(6.6pt*var(--u));padding-top:calc(14.5pt*var(--u))}
  .sh-poster .poster-tiles strong{font-size:calc(7pt*var(--u))}
  .sh-poster .poster-tiles svg.pitfall-icon{width:calc(20pt*var(--u));height:calc(20pt*var(--u))}
  .sh-poster .poster-firm{width:calc(11pt*var(--u));height:calc(11pt*var(--u));line-height:calc(9pt*var(--u));font-size:calc(6pt*var(--u));top:calc(3pt*var(--u));right:calc(3pt*var(--u))}
}
