
/* Keep the family typography and let the diagrams provide their own controls. */
.metis-v40{--mono:var(--sans);--m40-line:#d9dce2;--m40-green:#238047;overflow-anchor:none}
.metis-v40 svg text{font-family:var(--sans)!important}
.metis-v40 svg text[font-family*="mono"]{font-weight:500;letter-spacing:.025em}
.metis-v40 :is(pre,code,.m34-code){font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace!important}
.metis-v40 :is(button,a,summary,label:has(input),[role="button"]),.metis-v40 [role="button"] *{cursor:pointer}
.metis-v40 button:disabled{cursor:default;opacity:.4}
.metis-v40 #wheel [data-kind],.metis-v40 #wheel [data-kind] *{cursor:pointer!important}
.metis-v40 .m37-memory-panels{min-height:310px}
.metis-v40 #paper{background:#f2f5fa}
.metis-v40 #faq{background:#fff}
.metis-v40 #builder-reference{overflow-anchor:none}
.metis-v40 .m40-journey{margin-top:36px;border:1px solid var(--m40-line);border-radius:12px;background:#fff;padding:30px;overflow-anchor:none}
.m40-example-head{display:flex;justify-content:space-between;gap:24px;align-items:center}
.m40-case-heading{display:flex;align-items:center;gap:22px;min-width:0}
.m40-case-art{width:116px;height:82px;flex-shrink:0;display:block}
#journeyExampleTitle{font-size:30px}
#journeyExampleContext{font-size:14px;line-height:1.5;color:#62646a;margin:8px 0 0}
.metis-v40 .m40-label{font-family:var(--sans);font-size:13px;line-height:1.45;font-weight:500;letter-spacing:.02em;color:#62646a;margin:0 0 8px}
.m40-example-head h3{font-size:27px;font-weight:550;line-height:1.2;letter-spacing:-.02em;margin:0}
.m40-text-button{font:inherit;font-size:14px;min-height:44px;border:0;background:none;padding:10px 0;text-decoration:underline;text-underline-offset:4px;color:#55585e}
.m40-examples{display:flex;gap:8px;margin:24px 0 28px}
.m40-examples button{font:inherit;font-size:15px;padding:11px 18px;min-height:46px;border:1px solid #cbd0d8;border-radius:6px;background:#fff}
.m40-examples button[aria-pressed=true]{background:#282829;border-color:#282829;color:#fff}
.m40-progress{display:flex;list-style:none;margin:0;padding:8px 0;border-bottom:1px solid var(--m40-line);gap:8px;position:sticky;top:80px;z-index:7;background:#fff}
.m40-progress li{display:flex;flex:1;min-width:0}
.m40-progress button{display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;width:100%;font:inherit;font-size:15px;line-height:1.3;color:#56585d;background:#f5f6f7;border:1px solid transparent;border-radius:6px;padding:12px 14px}
.m40-progress button span{color:#777b82;font-size:13px}
.m40-progress button:hover{border-color:#b9bec6}
.m40-progress button[aria-pressed=true]{color:#a63c0e;background:#fff2e9;border-color:#d77f55;font-weight:550}
.m40-progress button[aria-pressed=true] span{color:#a63c0e}
.m40-progress button:focus-visible{outline:2px solid #ea4700;outline-offset:3px}
.m40-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:32px;padding:28px 0 24px;min-height:470px;scroll-margin-top:52px;position:relative}
.m40-stage:focus{outline:none}
.m40-anchor{position:absolute;top:0;width:0;height:0}
.m40-scene{border-radius:8px;background:#f4f6f9;min-width:0;height:360px;display:flex;align-items:center;justify-content:center}
.m40-scene>[data-art]{width:100%;min-width:0}
.metis-v40 .m40-scene figure{margin:0;padding:12px;background:transparent;border:0;border-radius:0;max-width:none}
.metis-v40 .m40-scene #loopfig{width:340px;max-width:100%;margin:auto;padding:6px}
.m40-scene svg{width:100%;height:auto;max-height:345px;display:block;overflow:visible}
.metis-v40 .m40-scene .m35-route-labels{font-size:12px;color:#55585e;gap:6px;padding:0;line-height:1.4}
.m40-content{min-width:0}
.m40-step-head h4{font-size:25px;line-height:1.2;font-weight:550;letter-spacing:-.02em;margin:0 0 10px}
.m40-step-head #journeyExplanation{font-size:16px;line-height:1.55;color:#62646a;margin:0 0 22px}
.m40-step-head .m40-label{color:#ba3f0e}
.m40-record{border-left:3px solid #ea4700;border-radius:0 7px 7px 0;background:#fff4ed;padding:18px 20px}
.m40-record blockquote{font-size:21px;line-height:1.4;letter-spacing:-.01em;margin:0 0 16px;font-weight:450}
.m40-record .m40-context{font-size:13px;line-height:1.5;margin:0;color:#62646a}
.m40-record-status{border-top:1px solid #eaded5;padding:12px 0 0;margin:12px 0 0;font-size:14px;line-height:1.45;color:#62646a}
.m40-record-status[data-confirmed=true]{color:#238047}
#confirmationControls{display:flex;gap:22px;margin-top:10px}
.m40-navigation{display:flex;align-items:center;gap:18px;border-top:1px solid var(--m40-line);padding:16px 0;background:#fff;position:sticky;bottom:0;z-index:6;box-shadow:0 -8px 12px #ffffffd9}
.m40-navigation p{font-size:14px;line-height:1.4;color:#62646a;margin:0 auto 0 0}
.m40-primary,.m40-back{font:inherit;font-size:15px;line-height:1.3;min-height:46px;border-radius:6px;padding:12px 18px;white-space:nowrap}
.m40-primary{background:#ea4700;color:#fff;border:1px solid #ea4700;font-weight:550}
.m40-primary:hover{background:#c93d00;border-color:#c93d00}
.m40-back{background:#fff;color:#282829;border:1px solid #bfc4cc}
.m40-back:hover{background:#f4f6f9}
.m40-journey input{accent-color:#238047}
.m40-journey fieldset{border:0;padding:0;margin:0;min-width:0}
.m40-journey legend,.m40-journey form>label{font-size:15px;font-weight:550;margin-bottom:10px}
.m40-review-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.m40-review-options label{display:flex;align-items:center;gap:8px;font-size:14px;min-height:46px;padding:10px 12px;border:1px solid #d0d4db;border-radius:6px;line-height:1.4;background:#fff}
.m40-review-options label.is-selected{border-color:#878c94;background:#f6f7f9}
.m40-journey input{flex-shrink:0}
#journeyReview{margin-top:22px}
#journeyVerdict{font-size:15px;line-height:1.55;color:#62646a;margin:14px 0 0}
.m40-detail{border-top:1px solid var(--m40-line);margin-top:20px}
.m40-detail>summary{font-size:14px;min-height:44px;padding:13px 0;color:#62646a}
.m40-detail .m37-authority-definitions{margin:0;padding:0;border:0}
.m40-journey .m37-authority-defs{margin:0}
.m40-journey .m37-authority-defs>div{grid-template-columns:80px 1fr;gap:12px}
.m40-journey .m37-authority-defs :is(dt,p){font-size:14px;line-height:1.5}
#journeyEditor{margin-top:20px}
#journeyEditor label{display:block}
#journeyEditor textarea{display:block;font:inherit;font-size:16px;line-height:1.5;width:100%;padding:12px;border:1px solid #9298a2;border-radius:6px;resize:vertical;box-sizing:border-box}
#journeyAccountError{font-size:14px;color:#a23215;min-height:0;margin:8px 0}
#journeyEditor .m40-text-button{margin-left:15px}
.m40-use-review{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #d9dce2;border-radius:7px;background:#fafafa}
.m40-use-review .m40-label{font-size:12px;margin:0 0 2px}
#journeyReviewStatus{font-size:16px;line-height:1.4;font-weight:550;color:#a34224;margin:0}
.m40-use-review[data-approved=true] #journeyReviewStatus{color:#238047}
#journeyReviewLink{font-size:13px;flex-shrink:0}
.m40-conditions-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:18px 0 4px}
.m40-conditions-head h5{font-size:15px;line-height:1.4;font-weight:550;margin:0}
#journeyConditionCount{font-size:13px;line-height:1.4;color:#62646a;margin:0;white-space:nowrap}
.m40-condition-list{border-top:1px solid #d9dce2}
.m40-condition-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) 22px;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #e4e6e9;min-height:62px}
.m40-condition-row label{font-size:14px;line-height:1.35;font-weight:500;cursor:pointer}
.m40-condition-row .m40-required{font-size:12px;line-height:1.35;color:#62646a;margin:3px 0 0}
.m40-condition-row select{font:inherit;font-size:16px;color:#282829;border:1px solid #bcc3cd;border-radius:5px;background:#fff;min-width:0;width:100%;min-height:44px;padding:8px;cursor:pointer}
.m40-condition-row select:focus-visible{outline:2px solid #c94c10;outline-offset:2px}
.m40-condition-row.is-mismatch select{border-color:#bd6039;background:#fff8f2}
.m40-condition-check{display:grid;place-items:center;color:#238047;font-size:16px;line-height:1;width:22px;height:22px;background:#ebf7ef;border:1px solid #add3b9;border-radius:4px}
.m40-condition-row.is-mismatch .m40-condition-check{color:#a34224;background:#fff1e9;border-color:#d7a58e}
.m40-result{background:#f4f6f9;border:1px solid #dce0e5;border-radius:7px;margin:20px 0 0;padding:18px}
.m40-result .m40-result-title{font-size:18px;font-weight:550;line-height:1.4;margin:0 0 8px;display:flex;gap:9px;align-items:baseline}
.m40-result-title:before{content:' ';display:inline-block;flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:#a34224}
.m40-result[data-route=allowed] .m40-result-title:before{background:#238047}
#journeyResultDetail{font-size:15px;line-height:1.5;color:#62646a;margin:0}
#journeyReturned{margin-top:16px;border-top:1px solid #d9dce2;padding-top:16px}
#journeyReturned blockquote{font-size:18px;line-height:1.45;margin:0 0 12px}
#journeyUses{padding-left:18px;font-size:14px;line-height:1.5;color:#62646a;margin:0}
#journeyUses li{margin:6px 0}
.m40-scene[data-route=allowed] .m36-gate>path:first-child{fill:#ebf7ef;stroke:#238047}
.m40-scene[data-route=allowed] .m36-allowed{stroke:#238047;display:block}
.m40-scene[data-route=allowed] .m36-withheld{display:none}
.m40-scene[data-route=blocked] .m36-allowed{display:none}
.m40-scene[data-route=blocked] .m36-withheld{display:block}
.m40-scene[data-route=blocked] :is(.m36-output-route,.m36-returned-memory){opacity:.2}
/* One material and light direction for the four context blocks. */
.metis-v40 .m38-gate-picture .m40-context-layer>rect{fill:#eef0f2;stroke:#a8adb5;stroke-width:1.4}
.metis-v40 .m38-gate-picture .m40-memory-top{fill:#f9fafb;stroke:#a8adb5;stroke-width:1.4}
.metis-v40 .m38-gate-picture .m40-memory-edge{fill:#c5cbd3;stroke:#a8adb5;stroke-width:1.4}
.metis-v40 .m38-gate-picture .m40-context-layer>text{fill:#282829}
.metis-v40 .m38-gate-picture .m36-returned-memory>rect{fill:#c43d08;stroke:#a93105}
.metis-v40 .m38-gate-picture .m36-returned-memory>.m40-memory-top{fill:#ea4700;stroke:#a93105}
.metis-v40 .m38-gate-picture .m36-returned-memory>.m40-memory-edge{fill:#98300b;stroke:#a93105}
.metis-v40 .m38-gate-picture .m36-returned-memory>text{fill:#fff}
.metis-v40 #loopfig .node[data-i="3"] .ic{color:#238047!important}
/* SVG text scales with the figure; give the step numbers enough size on phones. */
.metis-v40 #loopfig .node>.ic,.metis-v40 #loopfig .node>text:first-of-type{transform:translateY(-12px)}
.metis-v40 #loopfig .node>text:last-of-type{font-size:30px;font-weight:650;fill:#565b63;transform:translateY(6px)}
.metis-v40 #loopfig .node.on>text:last-of-type{fill:#b43e0a}
.metis-v40 #journeyStep{font-size:15px;font-weight:600;line-height:1.5}
.metis-v40 .m40-journey .m39-capture-depth{margin-top:24px}
/* Stack before either the diagram or its explanation becomes a narrow column. */
@media(max-width:1200px){
 .metis-v40 .m37-memory{grid-template-columns:minmax(0,1fr);gap:28px}
 .metis-v40 .m37-memory .m37-art{width:100%;max-width:580px;margin:0 auto}
 .metis-v40 .m37-memory-panels{width:100%;max-width:720px;min-height:0;margin:0 auto}
 .metis-v40 .m37-atlas-section .m36-atlas{grid-template-columns:minmax(0,1fr);gap:24px}
 .metis-v40 .m37-atlas-section .m36-wheel{width:100%;max-width:560px;margin:0 auto}
 .metis-v40 .m36-atlas-detail{width:100%;max-width:720px;margin:0 auto}
 .metis-v40 .m40-journey{padding:28px}
 .m40-stage{display:flex;flex-direction:column;width:100%;max-width:720px;margin:0 auto;gap:24px;min-height:0}
 .m40-content{display:contents}.m40-step-head{order:0}.m40-scene{order:1}.m40-content>:not(.m40-step-head){order:2}
 .m40-step-head #journeyExplanation{margin-bottom:0}
 .m40-scene{--m40-scene-height:clamp(280px,44vw,400px);width:100%;height:var(--m40-scene-height)}
 .m40-scene>[data-art]{max-width:620px}
 .metis-v40 .m40-scene #loopfig{width:clamp(260px,44vw,400px);padding:0}
 .m40-scene svg{max-height:calc(var(--m40-scene-height) - 24px)}
 .m40-scene #loopfig svg{max-height:var(--m40-scene-height)}
 .m40-scene .m38-gate-picture svg{max-height:calc(var(--m40-scene-height) - 72px)}
 .m40-journey[data-step="5"] #journeyReview{order:2;margin-top:0}
 .m40-journey[data-step="5"] #journeyRecord{order:3}
 #journeyResult{position:sticky;top:146px;z-index:5}
}
@media(max-width:700px){
 .metis-v40 .m40-journey{padding:20px 16px;margin-left:-8px;margin-right:-8px}
 .m40-example-head{gap:15px;align-items:start}.m40-example-head h3{font-size:24px;line-height:1.2}
 .m40-case-heading{gap:12px;align-items:flex-start}.m40-case-art{width:66px;height:52px}
 #journeyExampleTitle{font-size:24px}#journeyExampleContext{font-size:13px;margin-top:7px}
 .m40-example-head{position:relative;padding-right:0}#journeyReset{position:absolute;right:0;top:-4px}
 .m40-case-heading{padding-top:22px;min-height:98px}.m40-case-heading .m40-label{position:absolute;top:0;left:0;margin:0}
 #journeyReset{font-size:13px;white-space:nowrap;min-width:65px;padding-top:0}
 .m40-examples{gap:6px;margin:22px 0}.m40-examples button{font-size:14px;padding:9px 10px;flex:1;line-height:1.25}
 .m40-progress{gap:5px;padding:8px 0}.m40-progress button{font-size:12px;gap:5px;padding:10px 5px;min-height:48px}.m40-progress button span{font-size:11px}
 .m40-stage{display:flex;flex-direction:column;gap:18px;padding:20px 0;min-height:0}
 .m40-content{display:contents}.m40-step-head{order:0}.m40-scene{order:1}.m40-content>:not(.m40-step-head){order:2}
 .m40-scene{--m40-scene-height:clamp(235px,50vw,340px);width:100%}.metis-v40 .m40-scene #loopfig{width:clamp(230px,50vw,320px);padding:0}
 .metis-v40 .m40-scene #ladderfig{padding:5px}.metis-v40 .m40-scene .m38-gate-picture{padding:0 12px}
 .metis-v40 .m40-scene .m35-route-labels{font-size:12px}
 .m40-step-head .m40-label{font-size:13px;margin-bottom:6px}.m40-step-head h4{font-size:23px;margin-bottom:8px}
 .m40-step-head #journeyExplanation{font-size:15px;margin-bottom:0}
 .m40-record{padding:15px}.m40-record blockquote{font-size:19px;margin-bottom:12px}.m40-record .m40-context{font-size:13px}.m40-record-status{font-size:13px}
 .m40-journey[data-step="3"] #recordStatus:not([data-dismissed="true"]):not([data-confirmed="true"]){display:none}
 .m40-journey[data-step="5"] #journeyReview{order:2;margin-top:0}
 .m40-journey[data-step="5"] #journeyRecord{order:3}
 .m40-navigation{position:sticky;bottom:0;z-index:6;margin:0 -16px -1px;padding:12px 16px;gap:10px;box-shadow:0 -8px 12px #ffffffd9}
 .m40-navigation p{display:none}.m40-navigation .m40-primary{margin-left:auto}.m40-primary,.m40-back{font-size:14px;padding:12px 14px}
 .m40-journey .m40-label{font-size:13px}.m40-journey .m39-capture-depth{font-size:14px}
 .metis-v40 #builder-reference .m38-tabs{gap:8px}
}
@media(max-width:360px){.m40-case-heading{min-height:120px}#journeyExampleTitle{font-size:22px}}
@media(prefers-reduced-motion:reduce){.metis-v40 .m40-journey *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
/* Let the approved hero wording use the available phone text width. */
@media(max-width:600px){.metis-v40 .hero h1{max-width:100%}}
/* Keep the closing brand motif quiet against charcoal. */
.metis-v40 .closing .mark{opacity:.09}
.metis-v40 .closing .mark rect{fill:#fff}

