/* RFCheck Tool Reference — independent scoped layout, no horizontal clipping. */
.ref-page{background:#f1f5f9;color:#172033;min-width:0;overflow-x:clip}
.ref-main{max-width:1360px;margin:0 auto;padding:0 24px 68px}
.ref-hero{padding:52px 12px 36px;max-width:900px}
.ref-eyebrow,.ref-kicker{font-size:11px;letter-spacing:.105em;text-transform:uppercase;font-weight:850;color:#416991}
.ref-hero h1{font-size:clamp(30px,4.2vw,52px);line-height:1.09;letter-spacing:-.04em;margin:14px 0;max-width:850px}
.ref-hero p{font-size:16px;line-height:1.65;color:#5c6b7d;max-width:740px;margin:0}
.ref-hero-actions{display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin-top:24px;color:#64748b;font-size:13px}
.ref-primary{display:inline-flex;align-items:center;justify-content:center;min-height:43px;padding:10px 16px;border-radius:9px;background:#1768a3;color:white!important;text-decoration:none;font-weight:750;line-height:1.2}
.ref-primary:hover{background:#0d5186}
.ref-shell{display:grid;grid-template-columns:minmax(0,244px) minmax(0,1fr);gap:25px;align-items:start}
.ref-aside{position:sticky;top:14px;max-height:calc(100vh - 30px);min-width:0;overflow-y:auto;border:1px solid #d8e2ec;background:#fff;border-radius:14px;padding:18px 15px;box-shadow:0 6px 18px #1e416014}
.ref-aside-head{display:flex;flex-direction:column;gap:4px;padding:3px 5px 13px;border-bottom:1px solid #e5eaf0;margin-bottom:12px}
.ref-aside-head strong{font-size:15px}.ref-aside-head small{color:#63758a}
.ref-search-label{display:block;margin:0 5px 5px;color:#3a536b;font-size:12px;font-weight:750}
.ref-aside input{box-sizing:border-box;max-width:100%;width:100%;min-height:42px;padding:10px 11px;background:#f9fbfd;border:1px solid #cbd8e5;border-radius:9px;color:#13283c;font:inherit;font-size:13px}
.ref-aside input:focus-visible,.ref-toc a:focus-visible,.ref-end a:focus-visible,.ref-primary:focus-visible{outline:3px solid #3e8ecb;outline-offset:3px}
.ref-search-status{margin:8px 5px 13px;font-size:11px;color:#60758a}
.ref-toc{display:grid;gap:3px}
.ref-toc a{display:flex;gap:10px;align-items:baseline;text-decoration:none;color:#7990a8;font-size:11px;font-variant-numeric:tabular-nums;border-radius:8px;padding:8px 9px;min-width:0}
.ref-toc a span{color:#2a4159;font-size:12.5px;line-height:1.4;font-weight:650;overflow-wrap:anywhere}
.ref-toc a:hover,.ref-toc a[aria-current="location"]{background:#edf4fb;color:#1d6094}
.ref-toc a[aria-current="location"] span{color:#155889}
.ref-toc a[hidden],.ref-topic[hidden]{display:none!important}
.ref-aside-note{margin-top:18px;padding:12px;border-radius:10px;background:#f4f7fa;border:1px solid #e0e7ef;color:#516579;font-size:11.5px;line-height:1.6}
.ref-content{display:grid;gap:19px;min-width:0}
.ref-no-results{padding:24px;background:#fff;border:1px solid #d9e3ec;border-radius:13px;color:#3f5972}
.ref-topic{scroll-margin-top:86px;min-width:0;background:white;border:1px solid #d8e2eb;border-radius:16px;padding:clamp(19px,2.6vw,33px);box-shadow:0 4px 17px #20466b10}
.ref-topic h2{font-size:clamp(23px,2.8vw,30px);line-height:1.2;letter-spacing:-.025em;margin:9px 0 10px;overflow-wrap:anywhere}
.ref-topic p{font-size:14px;line-height:1.66;margin:13px 0;color:#43576a;overflow-wrap:anywhere}
.ref-topic .ref-lead{color:#2c425a;font-size:15px;max-width:780px;line-height:1.62;margin:0 0 20px}
.ref-topic b{color:#263d53}
.ref-example{border:1px solid #d7e5f0;border-left:3px solid #478bbb;border-radius:9px;background:#f6fafe;padding:15px 18px;margin:16px 0}
.ref-example>strong{color:#215c89;font-size:12px;letter-spacing:.015em}
.ref-example p{margin:6px 0 0}
.ref-example code{display:block;margin-top:10px;max-width:100%;padding:11px;border-radius:6px;background:#eaf1f8;color:#213f59;white-space:normal;overflow-wrap:anywhere;font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace}
.ref-equation{display:block;max-width:100%;margin:18px 0;background:#f4f7fa;border:1px solid #dce5ef;border-radius:10px;padding:17px 18px;font-size:clamp(14px,2vw,20px);line-height:1.5;color:#234b6b;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;word-break:normal}
.ref-equation sub{font-size:.65em}
.ref-boundary{margin:19px 0 0;border-top:1px solid #e7ebef;padding:15px 0 0;color:#55677c;font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.ref-boundary strong{display:inline-block;color:#8a4b24;margin-right:5px}
.ref-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}
.ref-grid>div{min-width:0;border:1px solid #dfe7f0;border-radius:10px;background:#fcfdfe;padding:13px 15px}
.ref-grid b{display:block;font-size:13px;margin-bottom:6px;overflow-wrap:anywhere}
.ref-grid span{color:#596e82;font-size:12.5px;line-height:1.55;display:block;overflow-wrap:anywhere}
.ref-diagram{display:flex;align-items:stretch;justify-content:center;gap:12px;min-width:0;border:1px solid #dce5ed;border-radius:12px;background:#f7fafc;padding:18px;margin:18px 0;box-sizing:border-box}
.ref-port{flex:1 1 0;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:6px}
.ref-port strong{color:#41617e;font-size:10px;letter-spacing:.06em}
.ref-port span{font-size:14px;color:#15588c;font-weight:700}
.ref-device{display:grid;place-items:center;text-align:center;min-width:0;flex:1 1 0;border:1px solid #91b6d4;background:#e7f2fa;border-radius:9px;padding:14px 11px;color:#285d84;font-size:12.5px;line-height:1.4}
.ref-smith{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.95fr);gap:15px;align-items:center;margin:16px 0;border:1px solid #dce5ed;border-radius:12px;background:#f7fafc;padding:12px}
.ref-smith svg{display:block;max-width:100%;width:100%;height:auto}
.ref-smith div{min-width:0}.ref-smith b{color:#294d6c}.ref-smith p{margin:8px 0}
.ref-marker-demo{align-items:center;flex-wrap:wrap;gap:7px}
.ref-marker-demo span{font-size:13px;color:#1e6191;font-weight:750;white-space:nowrap}
.ref-marker-line{height:2px;background:#6796b9;flex:1 1 24px;min-width:18px}
.ref-cascade-diagram{gap:8px;align-items:center}
.ref-cascade-diagram>span{font-size:11px;color:#4c6a84;overflow-wrap:anywhere;min-width:0}
.ref-cascade-diagram>.ref-device{padding:12px 9px;flex:1 1 0}
.ref-cascade-diagram>.ref-arrow{color:#1a70a9;font-size:17px}
.ref-end{border:1px solid #dbe5ef;border-radius:14px;background:#fff;padding:20px;display:flex;flex-wrap:wrap;gap:16px;align-items:center;min-width:0}
.ref-end>a:not(.ref-primary){color:#286896;text-decoration:none;font-size:13px;font-weight:700}
.ref-end p{flex-basis:100%;margin:0;color:#687b8e;font-size:12px;line-height:1.6}
@media(max-width:950px){.ref-main{padding:0 14px 46px}.ref-shell{grid-template-columns:210px minmax(0,1fr);gap:13px}.ref-aside{padding:14px 10px}.ref-toc a{padding:8px 6px}}
@media(max-width:700px){.ref-main{padding:0 10px 36px}.ref-hero{padding:30px 5px 26px}.ref-hero p{font-size:14px}.ref-shell{display:flex;flex-direction:column;gap:12px}.ref-aside{position:static;max-height:none;width:100%;box-sizing:border-box;overflow:visible}.ref-toc{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}.ref-toc a{padding:8px 6px}.ref-aside-note{display:none}.ref-content{width:100%}.ref-topic{padding:19px 16px}.ref-grid{grid-template-columns:1fr}.ref-smith{grid-template-columns:1fr}.ref-smith svg{max-height:210px}.ref-diagram{padding:12px 8px;gap:6px}.ref-port span{font-size:12px}.ref-device{padding:10px 5px;font-size:11px}.ref-equation{padding:13px;font-size:15px}.ref-marker-demo span{font-size:11px}.ref-cascade-diagram>span{font-size:9px}}
@media(max-width:370px){.ref-main{padding-left:8px;padding-right:8px}.ref-toc{grid-template-columns:1fr 1fr}.ref-toc a span{font-size:11.5px}.ref-topic{padding:17px 13px}.ref-diagram{padding:10px 5px;gap:4px}.ref-port span{font-size:11px}.ref-device{padding:9px 3px}.ref-cascade-diagram{flex-wrap:wrap}.ref-cascade-diagram>.ref-device{flex:1 1 65px}}
@media(prefers-reduced-motion:reduce){.ref-page *, .ref-page *::before,.ref-page *::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Preserve a narrow reference viewport: the shared desktop header pill is nonessential at 256 CSS px. */
@media(max-width:370px){.ref-page .topbar .local-pill{display:none}.ref-page .topbar{gap:8px;padding-inline:12px}}

/* In the zoom/narrow stress case a wrapped horizontal cascade reverses
   perceived flow. A vertical source-to-load stack preserves element order. */
@media(max-width:370px){
 .ref-cascade-diagram{flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:5px}
 .ref-cascade-diagram>span{text-align:center;font-size:11px}
 .ref-cascade-diagram>.ref-device{width:100%;flex:none;padding:11px 8px;font-size:12px}
 .ref-cascade-diagram>.ref-arrow{transform:rotate(90deg);align-self:center;line-height:1.1}
}


/* Two matched-port excitation cases: readable without SVG lettering or hover. */
.ref-matrix{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 17px;align-items:center}
.ref-matrix strong{grid-column:1/-1;font-size:clamp(17px,2.4vw,22px)}
.ref-matrix span{font-size:clamp(14px,1.9vw,19px);font-weight:650;overflow-wrap:anywhere}
.ref-wave-figure{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:14px}
.ref-wave-case{min-width:0;background:white;border:1px solid #d5e3ee;border-radius:10px;overflow:hidden}
.ref-wave-heading{padding:12px 14px;display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline;background:#edf5fc;border-bottom:1px solid #dce8f2}
.ref-wave-heading strong{font-size:13px;color:#244c70}.ref-wave-heading>span{font-size:11px;color:#53718b}
.ref-wave-path{display:grid;grid-template-columns:minmax(0,1fr) minmax(66px,.8fr) minmax(0,1fr);gap:7px;align-items:stretch;padding:14px 9px 9px}
.ref-wave-port{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:7px}
.ref-wave-port>span{display:flex;flex-direction:column;gap:2px;font-size:clamp(14px,1.55vw,18px);font-weight:760;color:#205a84;white-space:nowrap}
.ref-wave-port>span small{font-size:10px;font-weight:550;color:#648095;white-space:normal}
.ref-wave-port>b{font-size:9px;letter-spacing:.09em;color:#647b90}
.ref-wave-device{display:grid;place-items:center;border:1px solid #8cb2d0;border-radius:8px;background:#e4f1fb;padding:14px 4px;text-align:center;font-size:12px;line-height:1.4;color:#2e5b7f;font-weight:750;min-width:0}
.ref-wave-ratios{display:grid;gap:6px;border-top:1px solid #e5edf4;padding:11px 13px;font-size:11.5px;color:#4a657d;line-height:1.5}
.ref-wave-ratios span{overflow-wrap:anywhere}.ref-wave-ratios b{color:#205782}
.ref-db-cases b{font-size:14px}
@media(max-width:1050px){.ref-wave-figure{grid-template-columns:minmax(0,1fr)}.ref-wave-port>span{font-size:17px}}
@media(max-width:370px){.ref-matrix{grid-template-columns:minmax(0,1fr)}.ref-matrix strong{grid-column:1}.ref-wave-figure{padding:7px;gap:9px}.ref-wave-path{grid-template-columns:minmax(0,1fr) minmax(52px,.7fr) minmax(0,1fr);gap:4px;padding:11px 5px 8px}.ref-wave-port>span{font-size:13px}.ref-wave-port>span small{font-size:9px}.ref-wave-device{font-size:10px;padding:8px 3px}.ref-wave-heading{padding:10px}.ref-wave-ratios{padding:10px}}

/* At the 256 CSS-px stress width, wave labels may wrap inside their own
   port instead of overflowing the adjacent device or the other port. */
@media(max-width:370px){.ref-wave-port{min-width:0;overflow-wrap:anywhere}.ref-wave-port>span{white-space:normal;font-size:12px;line-height:1.3;overflow-wrap:anywhere}.ref-wave-port>span small{font-size:9px}.ref-wave-path{min-width:0}.ref-wave-case{min-width:0;overflow:hidden}}


/* R2.17 teaching-quality: stable two-port wave lanes and genuine MathML
   fractions. Each excitation uses the same physical Port 1 → DUT → Port 2
   orientation, with its own clearly defined input and output arrows. */
.ref-wave-figure{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.ref-wave-case{width:100%;box-sizing:border-box}
.ref-wave-heading{display:flex;align-items:baseline;gap:7px 18px;padding:13px 16px}
.ref-wave-path{display:grid;grid-template-columns:minmax(0,1fr) minmax(96px,.48fr) minmax(0,1fr);gap:12px;align-items:stretch;padding:17px 16px;min-width:0}
.ref-wave-port{display:grid;grid-template-rows:auto 1fr 1fr;gap:7px;min-width:0}
.ref-wave-port>b{align-self:start;letter-spacing:.06em;font-size:10px}
.ref-wave-track{display:grid;grid-template-columns:minmax(0,1fr) 28px;grid-template-rows:auto auto;align-items:center;gap:2px 7px;min-width:0;padding:7px 9px;background:#f5f9fc;border-radius:7px;border:1px solid #e2ebf2}
.ref-wave-symbol{font-size:clamp(17px,2.1vw,23px);font-weight:720;color:#225d8b;min-width:0;white-space:nowrap}
.ref-wave-arrow{font-size:23px;color:#166b9c;text-align:center;line-height:1}
.ref-wave-track small{grid-column:1/-1;font-size:11px;color:#61778a;line-height:1.25;white-space:normal}
.ref-wave-zero{background:#fbfcfd}.ref-wave-zero .ref-wave-symbol{font-size:17px;color:#6c7b88}.ref-wave-zero .ref-wave-arrow{color:#a0abb6}
.ref-wave-device{display:grid;place-items:center;min-width:0;text-align:center;font-size:14px;font-weight:750}
.ref-wave-ratios{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 14px;padding:12px 16px}
.ref-wave-ratio{display:flex;gap:10px;flex-wrap:wrap;align-items:center;min-width:0}
.ref-wave-ratio math{font-size:clamp(18px,2.5vw,25px);color:#214e74;display:inline-block;max-width:100%;line-height:1.3}
.ref-wave-ratio>span{font-size:12px;line-height:1.5}
.ref-wave-instructions{margin:12px 0}
.ref-chapter{scroll-margin-top:90px}
.ref-chapter h3{scroll-margin-top:90px;font-size:clamp(17px,2.2vw,22px);line-height:1.35;margin:30px 0 9px;color:#244866}
.ref-chapter-jumps{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0 25px}
.ref-chapter-jumps a{font-size:12px;padding:9px 11px;border:1px solid #d5e3ef;background:#f4f8fc;border-radius:8px;color:#215e8c;text-decoration:none;font-weight:700}
.ref-chapter-jumps a:hover{background:#e7f2fc}
.ref-equation-steps{display:grid;gap:9px;font-size:clamp(13px,1.7vw,18px);font-weight:660;overflow-wrap:anywhere}
.ref-equation-steps>span+span{border-top:1px solid #dde8f2;padding-top:9px}
/* Offline MathML steps: preserve readable separation when legacy text slabs are typeset. */
.ref-equation-steps>math+math{border-top:1px solid #dde8f2;padding-top:10px}
.ref-equation-steps>math{width:100%;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden}
.ref-data-table{border-collapse:collapse;width:100%;min-width:440px;font-size:12px;font-variant-numeric:tabular-nums}
.ref-table-wrap{max-width:100%;overflow-x:auto;border:1px solid #dce6ef;border-radius:10px;margin:17px 0}
.ref-data-table caption{caption-side:top;text-align:left;font-size:12px;padding:13px 14px;background:#f3f8fc;font-weight:750;color:#315574}
.ref-data-table th,.ref-data-table td{text-align:left;padding:10px 13px;white-space:nowrap;border-top:1px solid #e0e8f1}
.ref-data-table th{background:#edf4fa;color:#305778}
.ref-data-table td{color:#496075}
.ref-topology-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.ref-topology{min-width:0;border:1px solid #dce5ef;border-radius:11px;padding:13px;background:#fbfdff}
.ref-topology strong{display:block;font-size:14px;color:#245b83}
.ref-topology-figure{min-width:0;overflow-wrap:anywhere;margin:11px 0;background:#edf4fa;border:1px solid #d9e5f0;border-radius:8px;padding:12px;font:12px/1.9 ui-monospace,Consolas,monospace;color:#254763}
.ref-topology-figure span{display:block;overflow-wrap:anywhere}
.ref-topology p{margin:9px 0;font-size:13px}
.ref-adc-checklist{margin:15px 0}
@media(max-width:700px){.ref-topology-grid{grid-template-columns:minmax(0,1fr)}.ref-wave-figure{padding:8px}.ref-wave-path{grid-template-columns:minmax(0,1fr) minmax(65px,.55fr) minmax(0,1fr);gap:5px;padding:12px 7px}.ref-wave-track{grid-template-columns:minmax(0,1fr) 18px;padding:6px 5px;gap:1px 3px}.ref-wave-symbol{font-size:16px}.ref-wave-arrow{font-size:17px}.ref-wave-track small{font-size:10px}.ref-wave-device{font-size:12px}.ref-wave-ratios{padding:10px;gap:10px}}
@media(max-width:370px){.ref-wave-path{grid-template-columns:minmax(0,1fr) minmax(47px,.5fr) minmax(0,1fr);gap:3px;padding:8px 5px}.ref-wave-track{padding:5px 3px;grid-template-columns:minmax(0,1fr) 14px}.ref-wave-symbol{font-size:13px}.ref-wave-arrow{font-size:14px}.ref-wave-track small{font-size:9px}.ref-wave-device{font-size:10px;padding:5px 1px}.ref-wave-port>b{font-size:8.5px}.ref-wave-ratios{grid-template-columns:minmax(0,1fr)}.ref-equation-steps{font-size:13px}.ref-chapter-jumps a{flex:1 1 auto}.ref-chapter .ref-primary{white-space:normal;text-align:center}}


/* Narrow-only semantic reflow: a 256px view cannot fit two ports, DUT and
   wave arrows in one horizontal lane without clipping or microscopic text.
   Stack the same physical port order; each wave's own arrow keeps direction. */
@media(max-width:370px){
 .ref-wave-path{grid-template-columns:minmax(0,1fr);gap:9px;padding:10px}
 .ref-wave-port{grid-template-rows:auto auto auto;gap:6px}
 .ref-wave-port>b{font-size:10px}
 .ref-wave-track{grid-template-columns:minmax(0,1fr) 24px;gap:3px 8px;padding:8px 10px}
 .ref-wave-symbol,.ref-wave-zero .ref-wave-symbol{font-size:16px}
 .ref-wave-arrow{font-size:20px}
 .ref-wave-track small{font-size:10px}
 .ref-wave-device{min-height:52px;padding:8px;font-size:13px}
 .ref-wave-ratio math{font-size:21px}
}

/* MathML is natively typeset offline; each equation retains its canonical LaTeX source. */
.rf-math-slab{display:grid;gap:0}
.rf-math-line{display:block;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:5px 1px;scrollbar-width:thin}
.rf-math-line+.rf-math-line{border-top:1px solid #dde8f2;padding-top:14px}
math.rf-math{font-family:"Cambria Math","STIX Two Math",serif;font-size:clamp(17px,2vw,23px);font-weight:400;color:#173c63;max-width:100%;margin:0;line-height:1.5}
.ref-derivation{margin:23px 0;padding:20px;border:1px solid #bed7ed;border-left:4px solid #337cac;border-radius:11px;background:#f6faff}
.ref-derivation h4{font-size:18px;line-height:1.35;color:#1b4569;margin:0 0 12px}
.ref-derivation>p{font-size:14px;line-height:1.72;color:#385269;margin:12px 0}
.ref-derivation>.rf-math-line{background:#fff;border:1px solid #dbe6f0;border-radius:8px;margin:12px 0;padding:13px 9px}
@media(max-width:600px){.ref-derivation{padding:14px}.ref-derivation>.rf-math-line{padding:10px 6px}math.rf-math{font-size:17px}}

/* Engineering equations: real MathML structure and canonical LaTeX source. */
.ref-equation>math{display:block;max-width:100%;overflow-x:auto;font-family:"Cambria Math","STIX Two Math",serif;font-weight:400;font-size:clamp(17px,1.9vw,22px);line-height:1.55;color:#173d60}
@media(max-width:600px){.ref-equation>math{font-size:17px}}

/* Accessible math containment at narrow widths. Wide expressions scroll inside
   their own native MathML surface, never expand or clip the entire page. */
.ref-equation{box-sizing:border-box;min-width:0}
.ref-equation>math{width:100%;min-width:0;box-sizing:border-box;scrollbar-width:thin}
@media(max-width:370px){
 .ref-equation{padding:11px 8px}
 .ref-equation>math,.ref-equation-steps>math{font-size:16px}
}

.ref-derivation>summary{cursor:pointer;font-size:16px;font-weight:750;color:#1b4569;line-height:1.5}
.ref-derivation>summary:focus-visible{outline:3px solid #438fc1;outline-offset:4px}
html[data-theme="dark"] .ref-derivation>summary{color:#c2e3ff}
