/* Reading, input and accessibility refinements. */
:root{--muted:#526269}
html{scroll-padding-top:90px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[tabindex]:focus-visible{outline:3px solid #976521;outline-offset:4px}
button,a,input,select,textarea{scroll-margin-block:90px 30px}
button,.button,.small-button,.icon-button,.text-link,.source-chip,.case-subnav a,.sidebar nav a{min-height:44px}
.sidebar nav a{font-size:13px;line-height:1.4}
.sidebar nav a[data-nav="case"]:not(.active):after{display:none}
.edition,.small-label,.eyebrow,.case-metrics small,.case-identity small,.visual-heading,.visual-caption,.hero-footnote{letter-spacing:.07em}
.edition{line-height:1.6;white-space:normal}
.version{flex-wrap:wrap;gap:6px}
.topbar{height:auto;min-height:78px;gap:16px;padding-block:13px}
.topbar>div{min-width:0}
.top-actions{flex-shrink:0}
.small-button,.button,.segment-control button{font-size:13px}
.mission-copy>p,.case-paper>p,.case-pagehead>p,.case-brief-hero p,.definition-list dd,.test-block p,.control-list li,.artifact-example,.scenario-context,.scenario-question,.feedback p,.notes-card>p,.evidence-body>p{font-size:14px;line-height:1.75}
.case-paper h4,.definition-list dt,.artifact-section h4,.test-row strong,.artifact-list button,.schedule-controls label,.test-filters label{font-size:13px;line-height:1.5}
.artifact-instruction,.case-reference,.test-row>div>small,.gantt-task small,.gantt-axis{color:#52654c!important}
.case-status.fail{color:#81452f}
.case-status.pending{color:#705817}
.case-status.pass{color:#405e30}
.case-disclosure{line-height:1.6;flex-wrap:wrap}
.case-disclosure>span:last-child{margin-left:0;flex:1 1 320px}
.case-identity,.case-identity>div,.case-path-grid>a,.case-metrics>div{min-width:0}
.case-monogram{flex-shrink:0}
.case-identity h1{overflow-wrap:anywhere}
.case-subnav a{font-size:13px}
.case-paper,.case-content,.case-grid-two>*,.benefit-layout>*,.test-layout>*,.architecture-layout>*{min-width:0}
.case-path-grid p{font-size:13px;line-height:1.7}
.case-path-grid h3{font-size:18px}
.definition-list>div{grid-template-columns:minmax(95px,.7fr) minmax(0,1.6fr)}
.case-paper .button,.task-detail>.button{white-space:normal;line-height:1.5;justify-content:space-between}
.test-list{overflow:auto}
.test-row>div{min-width:0;overflow-wrap:anywhere}
.test-ownership{margin:22px 0;padding:17px;background:#edf0e7;border-radius:3px;font-size:13px}
.test-ownership>div+div{margin-top:12px}
.test-ownership dt{font-weight:600}
.test-ownership dd{margin:3px 0 0;color:var(--muted)}
.blocker-link{align-items:flex-start;min-width:0;padding-block:18px}
.blocker-link>span:first-child{min-width:0}
.blocker-link small{display:block;font-size:12px;font-weight:400;color:var(--muted);line-height:1.65;margin-top:6px}
.blocker-link>.case-status{margin-top:2px}
.gantt{min-width:740px}
.gantt-row,.gantt-axis{grid-template-columns:240px 1fr}
.gantt-row{height:auto;min-height:50px}
.gantt-task{font-size:13px;padding-block:10px;line-height:1.45}
.gantt-task small{min-width:29px}
.gantt-track{min-height:50px}
.gantt-track>i{top:50%;transform:translateY(-50%)}
.gantt-track>i.milestone{top:50%;transform:translate(-4px,-50%) rotate(45deg)}
.gantt-heading>span{flex-wrap:wrap;line-height:1.6}
.gantt-heading b{height:8px;background:repeating-linear-gradient(135deg,transparent,transparent 2px,#708868 2px,#708868 3px);border:1px solid #708868}
.evidence-item summary:after{margin-left:0}
input[type=range]{margin-inline:0;height:24px}
.input-row input{flex-shrink:0}
.architecture-canvas{overflow-x:auto}
.architecture-canvas .system-map{min-width:680px}
.map-node[role="button"]:focus-visible{outline:none}
.map-node[role="button"]:focus-visible rect{stroke:#f5ce7a;stroke-width:3}
.map-node[role="button"][aria-pressed="true"] rect{stroke:#c5d7ae;stroke-width:2}
.benefit-bars>div{grid-template-columns:120px minmax(50px,1fr) 90px;font-size:12px}
.benefit-bars strong{font-size:13px}
.source-chip{line-height:1.6}
.source-chip span{float:none;display:block}
.case-source-row>.source-chip>span{margin-left:0}
.case-code{font-size:13px;line-height:1.7}
.gate-nav button{min-width:0}
.gate-nav small{letter-spacing:.04em}
.gate-nav strong{font-size:13px}
.reader-tools{flex-wrap:wrap;gap:10px}
.reader-tools button,.reader-tools a{min-height:44px;display:inline-flex;align-items:center}
.reader-text{font-size:15px}
.reader-head{gap:20px}
.reader-head>div{min-width:0}
.reader-head h2{overflow-wrap:anywhere}
.recovery-notice{padding:20px;margin:20px 0;background:#f3ebd8;border:1px solid #d5c39a;line-height:1.7}
.recovery-notice .text-link{display:inline-flex;align-items:center;margin-left:8px}
/* Heading overflow safety */
h1,h2,h3,.scenario-panel h2,.release-verdict h2,.case-paper h3,.case-brief-hero h2,.gate-title h2,.section-head h2,.desk-heading h2{overflow-wrap:anywhere;word-break:break-word}
/* Extended contrast corrections — AA 4.5:1 normal text, 3:1 large text */
.artifact-list button small{color:#52654c}
.artifact-list button.selected small{color:#d4c292}
.artifact-section>div>span{color:#6b8259}
.case-path-grid>a>span{color:#6b8259}
.chapter-row .page-no,.chapter-row .arrow{color:#52654c}
.blocker-link b{color:#52654c}
.search-trigger kbd{color:#586662}
.version{color:#586662}
.volume-card .card-bottom{color:var(--muted)}
.scenario-list span{color:var(--muted)}
.control-list li:before{color:#52654c}
/* Touch and interaction feedback */
.button:active:not(:disabled),.small-button:active{transform:scale(.98)}
.volume-card:active{transform:translateY(-1px);box-shadow:0 4px 10px #172f3510}
.choice:active,.scenario-list button:active,.gate-nav button:active,.source-menu button:active,.artifact-list button:active,.test-row:active{opacity:.92}
/* Smooth mobile navigation scroll */
.sidebar nav{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.sidebar nav a{scroll-snap-align:start}
.case-subnav{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.case-subnav a{scroll-snap-align:start}
/* Safari backdrop-filter support */
dialog::backdrop{-webkit-backdrop-filter:blur(5px)}
/* Improved toast */
#toast{font-size:13px;line-height:1.5;text-align:center;min-width:200px}
@media(max-width:1200px){
 .case-grid-two,.benefit-layout,.architecture-layout{grid-template-columns:1fr}
 .architecture-canvas .system-map{max-width:900px;margin-inline:auto}
 .case-metrics small{min-height:36px}
 .case-disclosure>span:last-child{flex-basis:100%}
 .case-brief-hero{grid-template-columns:1fr}
 .mission-number{border-left:0;padding-left:0}
}
@media(max-width:980px){
 .schedule-layout,.test-layout{grid-template-columns:1fr}
 .test-detail{position:static}
 .sidebar nav a{font-size:13px}
 .case-subnav a{font-size:13px;padding:13px 16px}
 .case-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .case-metrics>div{padding:18px!important;border-bottom:1px solid var(--line)}
 .case-metrics>div:nth-child(even){border-right:0}
 .case-metrics.four>div:nth-child(2){border-right:0;border-bottom:1px solid var(--line)}
 .case-metrics.four>div:nth-child(3),.case-metrics.four>div:nth-child(4){border-bottom:0}
 .case-metrics small{min-height:auto}
 .task-detail{display:block}
}
/* Hamburger menu — mobile only */
.hamburger{display:none;width:44px;height:44px;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:0;flex-shrink:0}
.hamburger span{display:block;width:20px;height:2px;background:var(--ink);border-radius:1px;transition:transform .25s,opacity .25s}
.hamburger[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hamburger[aria-expanded="true"] span:nth-child(2){opacity:0}
.hamburger[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.mobile-dropdown{position:absolute;top:100%;left:0;right:0;background:var(--paper);border-bottom:1px solid var(--line);box-shadow:0 8px 24px #17313715;z-index:18;padding:12px 18px 18px;animation:menuDrop .2s ease-out}
.mobile-dropdown a{display:flex;align-items:center;gap:13px;padding:14px 12px;font-size:14px;border-radius:4px;min-height:48px}
.mobile-dropdown a span{font-size:12px;opacity:.5;font-variant-numeric:tabular-nums}
.mobile-dropdown a b{margin-left:auto;font-size:15px;font-weight:400;opacity:0}
.mobile-dropdown a:hover,.mobile-dropdown a:active{background:#e9ebe4}
.mobile-dropdown a.active{background:var(--ink);color:#fff}
.mobile-dropdown a.active b{opacity:1}
.mobile-dropdown .menu-search{display:flex;align-items:center;gap:10px;padding:14px 12px;margin-top:6px;border-top:1px solid var(--line);font-size:13px;color:var(--muted);min-height:48px}
.menu-overlay{position:fixed;inset:0;z-index:15;background:#0c242c33}
@keyframes menuDrop{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){
 .hamburger{display:flex}
 .sidebar{display:none!important}
 .topbar{position:sticky;top:0;z-index:20;box-shadow:0 2px 8px #17313718}
 .topbar{min-height:66px;padding:12px 18px;flex-wrap:wrap}
 .top-actions{gap:7px}
 .topbar .small-button{font-size:12px}
 .case-topline{align-items:flex-start;flex-wrap:wrap}
 .case-identity h1{font-size:26px}
 .case-topline>.small-button{margin-left:56px}
 .case-metrics.three{grid-template-columns:1fr}
 .case-metrics.three>div:nth-child(n){border-right:0;border-bottom:1px solid var(--line);padding-left:0!important;padding-right:0!important}
 .case-metrics.three>div:last-child{border-bottom:0}
 .mission-copy .button-row{flex-direction:column;align-items:stretch}
 .mission-copy .button{font-size:13px}
 .mission-copy>p{font-size:14px}
 .hero-footnote{align-items:flex-start;font-size:12px}
 .visual-heading{flex-wrap:wrap}
 .visual-heading span:last-child{text-align:left}
 .start-path{grid-template-columns:1fr}
 .start-path>a{font-size:13px;border-left:0;border-bottom:1px solid var(--line)}
 .start-path strong{font-size:14px}
 .case-paper>p,.definition-list dd,.control-list li,.artifact-example,.test-block p{font-size:14px}
 .definition-list>div,.task-detail .definition-list>div{grid-template-columns:1fr;gap:5px}
 .case-brief-hero h2{font-size:34px}
 .mission-number{flex-wrap:wrap}
 .test-list{max-height:440px}
 .test-row{padding:16px;gap:12px}
 .test-row strong{font-size:14px}
 .blocker-link{display:flex;flex-wrap:wrap;gap:9px}
 .blocker-link>span:first-child{flex-basis:100%}
 .benefit-bars>div{grid-template-columns:95px minmax(30px,1fr) 75px;gap:9px}
 .benefit-bars strong{font-size:12px}
 .benefit-toolbar{align-items:flex-start;flex-wrap:wrap}
 .segment-control{max-width:100%;flex-wrap:wrap}
 .case-paper .segment-control button{font-size:12px}
 .reader-text{font-size:14px;padding:20px;max-height:48vh}
 .reader-head{padding:22px}
 .reader-tools{padding:14px 20px}
 .gate-nav{grid-template-columns:repeat(2,minmax(0,1fr))}
 .artifact-toolbar>.button{width:100%;white-space:normal}
 .condition-strip a{min-height:34px}
 .gantt-scroll{-webkit-overflow-scrolling:touch}
 .architecture-canvas{-webkit-overflow-scrolling:touch}
 .sensitivity{grid-template-columns:1fr}
 .result-stats{grid-template-columns:1fr;gap:16px}
 .result-stats>div{display:flex;align-items:baseline;gap:12px}
 .visual-outcome>a{width:44px;height:44px}
}
@media(min-width:1201px) and (max-width:1359px){
 .architecture-layout{grid-template-columns:1fr}
 .architecture-canvas .system-map{max-width:900px;margin-inline:auto}
 .node-detail .control-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
}
@media(min-width:1360px){
 .architecture-layout{grid-template-columns:minmax(730px,1.6fr) minmax(245px,1fr)}
}
@media print{.sr-only,.recovery-notice{display:none!important}.gantt{min-width:0}.gantt-row,.gantt-axis{grid-template-columns:190px 1fr}.case-metrics{grid-template-columns:repeat(4,1fr)}}
