.source-figure{margin:32px 0;border:1px solid var(--line);background:var(--panel-deep);padding:16px;border-radius:6px}
.source-figure img{display:block;max-width:100%;width:100%;height:auto}.source-figure figcaption{font-size:12px;color:var(--quiet);line-height:1.8;margin-top:14px}.source-figure a,.source-note a{color:var(--accent)}
.case-table-scroll{overflow-x:auto;margin:28px 0;border:1px solid var(--line);border-radius:6px}.case-table-scroll table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.8;text-align:left}.case-table-scroll th{background:var(--panel);color:var(--text);font-weight:500}.case-table-scroll th,.case-table-scroll td{padding:16px;vertical-align:top;border-bottom:1px solid var(--line);min-width:150px}.case-table-scroll td{color:var(--muted)}.case-table-scroll tr:last-child td{border-bottom:0}
.case-code{white-space:pre-wrap;overflow-wrap:anywhere;padding:24px;background:var(--panel-deep);border:1px solid var(--line);color:var(--muted);font:13px/1.9 var(--mono);border-radius:6px}.source-note{font-size:13px;color:var(--quiet)}.case-body h3{margin-top:38px;line-height:1.5}.case-body{scroll-margin-top:110px}.case-sections{flex-wrap:wrap}
@media(max-width:650px){.source-figure{padding:8px}.case-table-scroll th,.case-table-scroll td{padding:12px;min-width:145px;font-size:12px}.case-code{padding:16px;font-size:11px}.case-bottom{gap:24px;flex-wrap:wrap}}

/* Shared, numbered contents rail for the four work case studies. */
.case-layout{display:grid;grid-template-columns:205px minmax(0,1fr);gap:48px;border-top:1px solid var(--line);align-items:start}
.case-sidebar{align-self:stretch;min-width:0;border-right:1px solid var(--line);padding-right:22px}
.case-toc{position:sticky;top:110px;max-height:calc(100dvh - 140px);overflow-y:auto;padding:28px 0;scrollbar-width:thin}
.case-toc>.eyebrow{margin:0 0 18px;font-size:10px;color:var(--quiet)}
.case-toc>a{display:grid;grid-template-columns:20px 7px minmax(0,1fr);gap:8px;padding:12px 8px;color:var(--muted);font-size:12px;line-height:1.6;border-left:2px solid transparent;transition:color .2s,border-color .2s,background .2s}
.case-toc .toc-number{font-family:var(--mono);font-size:11px;color:var(--quiet)}
.case-toc>a:hover,.case-toc>a[aria-current=location]{color:var(--accent);border-left-color:var(--accent);background:#9cc4dc08}
.case-toc>a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.case-content{min-width:0}.case-content>.home-section:first-child{margin-top:0;padding-top:32px}.case-content>.evidence-section:first-child{padding-top:32px}
.case-content .evidence-section{gap:30px}.case-content .section-number{color:var(--accent);font-family:var(--mono);font-size:11px;letter-spacing:.04em}
@media(max-width:1200px){.case-layout{grid-template-columns:180px minmax(0,1fr);gap:30px}.case-content .evidence-section{grid-template-columns:1fr}}
@media(max-width:900px){.case-layout{display:block}.case-sidebar{border-right:0;border-bottom:1px solid var(--line);padding-right:0}.case-toc{position:static;max-height:none;padding:20px 0}.case-toc>a{padding:8px;font-size:12px}.case-toc>.eyebrow{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){.case-toc>a{transition:none}}

/* Portfolio narratives: one problem and the applicant's decisions at a time. */
.story-role{color:var(--muted);font-size:14px;line-height:1.8;margin-top:16px;max-width:850px}
.story-section{padding:40px 0 48px;border-bottom:1px solid var(--line)}
.story-section h2{font-size:clamp(25px,2.6vw,34px);line-height:1.5;margin:15px 0 24px;letter-spacing:-.035em}
.story-section>p{font-size:16px;line-height:1.95;margin:18px 0;color:var(--muted)}
.story-section strong{color:var(--text);font-weight:550}
.story-compare{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:28px 0}
.story-compare article{padding:24px;border:1px solid var(--line);border-radius:6px;background:var(--panel-deep)}
.story-compare article:last-child{border-top:2px solid var(--accent)}
.story-compare h3{margin:12px 0!important;font-size:19px;font-weight:500;line-height:1.5}
.story-compare p:not(.eyebrow){font-size:14px;line-height:1.9;color:var(--muted)}
.story-note{margin:26px 0;padding:20px 24px;border-left:2px solid var(--accent);background:var(--panel-deep)}
.story-note strong{font-size:14px}.story-note p{font-size:14px;line-height:1.9;color:var(--muted);margin:10px 0 0}
.story-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:20px;margin:30px 0}
.story-results article{border-top:1px solid var(--line);padding:20px 0}.story-results strong{display:block;color:var(--accent);font-size:30px;line-height:1.3}.story-results span{display:block;font-size:13px;margin-top:12px}.story-results p{color:var(--muted);font-size:12px;line-height:1.8;margin-top:8px}
.story-record{font-size:13px;color:var(--quiet);border-top:1px solid var(--line);margin:28px 0 0;padding:18px 0;line-height:1.9}.story-record summary{cursor:pointer;color:var(--muted)}.story-record a{color:var(--accent)}
.story-section .investigation-steps li{padding-bottom:26px}.story-section .investigation-steps p{line-height:1.9}
@media(max-width:650px){.story-compare{grid-template-columns:1fr}.story-section{padding:30px 0 36px}.story-section>p{font-size:15px}.story-compare article{padding:20px}.story-note{padding:18px}.story-results{grid-template-columns:1fr}.story-results strong{font-size:28px}}
.story-figure>.figure-heading{padding:6px 0 16px;line-height:1.6;font-size:13px;color:var(--accent)}
.story-figure>a{display:block;max-width:100%}
@media(max-width:650px){.story-figure picture{display:block}.story-figure img{width:100%;max-width:100%}}

/* KPI outcomes: compare averages with the threshold, then show trial counts. */
.kpi-chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:28px 0}
.kpi-result-chart,.kpi-count-chart{margin:0;padding:24px;border:1px solid var(--line);border-radius:7px;background:var(--panel-deep);min-width:0}
.kpi-result-chart>figcaption,.kpi-count-chart>figcaption{font-size:15px;color:var(--text);font-weight:500;line-height:1.6}
.kpi-value{font-size:35px;line-height:1.3;color:var(--accent);margin:20px 0 28px}.kpi-value small{font-size:16px}.kpi-value>span{display:block;font-size:11px;color:var(--quiet);line-height:1.7;margin-top:8px}
.kpi-axis-label,.kpi-axis{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted);line-height:1.6}.kpi-axis-label>span:last-child{color:var(--text)}
.kpi-threshold-bar{height:19px;background:#263039;position:relative;margin:12px 0 8px}.kpi-threshold-bar>span{display:block;height:100%;background:var(--accent)}.kpi-threshold-bar>i{position:absolute;right:0;top:-6px;bottom:-6px;width:2px;background:var(--text)}
.kpi-pass{padding-top:18px;margin:18px 0 0;border-top:1px solid var(--line);font-size:13px;color:var(--muted);line-height:1.8}
.kpi-count-chart{grid-column:1/-1}.kpi-count-chart>figcaption{display:flex;justify-content:space-between;gap:15px}.kpi-count-chart>figcaption>span{font-size:12px;color:var(--quiet);font-weight:400}
.kpi-count-bar{display:flex;min-height:42px;margin:20px 0 14px;font-size:13px;line-height:1.6;text-align:center}.kpi-count-bar>span{width:75%;display:grid;place-items:center;background:#264553;color:#dcebf4;padding:8px}.kpi-count-bar>b{width:25%;display:grid;place-items:center;background:#634a35;color:#f4e6d8;font-weight:400;padding:8px}
.kpi-count-chart>p{font-size:12px;color:var(--quiet);line-height:1.8;margin:0}
@media(max-width:650px){.kpi-chart-grid{grid-template-columns:1fr}.kpi-result-chart,.kpi-count-chart{padding:20px}.kpi-value{font-size:32px}.kpi-count-bar{font-size:12px}}
