:root{color-scheme:light;--ink:#142f39;--muted:#435e68;--paper:#f7f8f4;--white:#fff;--line:#c6d5d2;--teal:#006c63;--teal-dark:#00534e;--mint:#dceee7;--navy:#112f3b;--lime:#d6ed9a;--amber:#fff0ce;--focus:#a13b00;--radius:16px;--max:1180px}*{box-sizing:border-box}html{scroll-padding-top:1rem}body{margin:0;background:var(--paper);color:var(--ink);font:1.03rem/1.65 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}a{color:var(--teal-dark);text-underline-offset:.2em;text-decoration-thickness:.08em}a:hover{text-decoration-thickness:.16em}a:focus-visible,button:focus-visible,select:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid var(--focus);outline-offset:4px}button,select,input{font:inherit}button{cursor:pointer}h1,h2,h3,h4,p{margin-top:0}h1,h2,h3,h4{line-height:1.15;letter-spacing:-.025em}h1{font-size:clamp(2.6rem,5.6vw,5rem);max-width:17ch;margin-bottom:1.2rem}h2{font-size:clamp(1.7rem,3.4vw,2.65rem);margin-bottom:.85rem}h3{font-size:1.25rem;margin-bottom:.6rem}h4{font-size:1.08rem;margin-bottom:.45rem}p{margin-bottom:1rem}ul,ol{padding-inline-start:1.4em}li+li{margin-top:.35em}small,.small{font-size:.88rem;line-height:1.5;color:var(--muted)}.wrap{max-width:var(--max);margin-inline:auto;padding-inline:clamp(1rem,4vw,2.5rem)}.skip{position:absolute;top:0;left:1rem;transform:translateY(-200%);background:white;color:#142f39;padding:1rem;z-index:100}.skip:focus{transform:none}.draftbar{background:var(--lime);font-size:.84rem;font-weight:650;padding:.48rem 0}.draftbar .wrap{display:flex;justify-content:space-between;gap:.5rem 1rem;flex-wrap:wrap}.masthead{background:var(--white);border-bottom:1px solid var(--line)}.masthead .wrap{display:flex;align-items:center;justify-content:space-between;gap:1.2rem;padding-block:1rem;flex-wrap:wrap}.brand{display:inline-flex;align-items:center;gap:.65rem;text-decoration:none;color:var(--ink);font-weight:800;line-height:1.15;letter-spacing:-.02em}.brand svg{width:40px;height:40px;flex:none}.brand span{font-size:1.1rem}.brand small{display:block;font-size:.71rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;margin-top:.18rem}.nav{display:flex;flex-wrap:wrap;gap:.2rem .8rem;align-items:center}.nav a{color:var(--ink);text-decoration:none;font-size:.91rem;padding:.5rem .2rem;border-bottom:3px solid transparent;font-weight:650}.nav a[aria-current=page]{border-color:var(--teal)}.nav a:hover{text-decoration:underline}.hero{background:var(--navy);color:#fff;padding:clamp(2.6rem,6vw,5.2rem) 0}.hero .layout{display:grid;grid-template-columns:minmax(0,1.06fr) minmax(0,1fr);gap:clamp(2rem,4vw,4rem);align-items:center}.hero h1{color:white}.hero p{color:#e1eceb;font-size:1.15rem;max-width:58ch}.eyebrow{font-weight:800;font-size:.76rem;letter-spacing:.12em;text-transform:uppercase;color:var(--teal-dark);margin-bottom:.8rem}.hero .eyebrow{color:var(--lime)}.lede{font-size:1.19rem;max-width:76ch;color:var(--muted)}.actions{display:flex;gap:.7rem;flex-wrap:wrap;margin-top:1.4rem}.btn{display:inline-block;padding:.76rem 1.05rem;border:2px solid var(--teal-dark);background:var(--teal-dark);color:white;border-radius:7px;font-weight:750;text-decoration:none;line-height:1.3;text-align:center}.btn:hover{background:#003d37;color:white}.hero .btn{border-color:var(--lime);background:var(--lime);color:var(--navy)}.hero .btn:hover{background:white;border-color:white}.btn.secondary{background:transparent;color:var(--teal-dark)}.hero .btn.secondary{color:white;border-color:#9ab5b7;background:transparent}.hero .btn.secondary:hover{background:white;color:var(--navy)}.section{padding:clamp(2.3rem,5vw,4.5rem) 0}.section+.section{border-top:1px solid var(--line)}.section.tinted{background:var(--mint)}.section.white{background:white}.section h2{max-width:26ch}.section-intro{max-width:80ch;margin-bottom:1.6rem}.grid{display:grid;gap:1rem;grid-template-columns:repeat(3,minmax(0,1fr))}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.card{padding:1.45rem;border:1px solid var(--line);background:white;border-radius:var(--radius);min-width:0;overflow-wrap:anywhere}.card p:last-child,.card ul:last-child{margin-bottom:0}.card h3 a{color:var(--ink)}.card-index{font-weight:800;color:var(--teal);font-size:.82rem;letter-spacing:.08em;margin-bottom:.8rem}.card-accent{border-top:4px solid var(--teal)}.tag{display:inline-block;color:#174a43;background:#e4f2ec;border:1px solid #a9c9bd;border-radius:4px;padding:.12rem .45rem;font-size:.76rem;font-weight:750;margin:.15rem .18rem .15rem 0}.tag.gap{color:#694310;background:var(--amber);border-color:#dfc58b}.tag.neutral{color:#42545c;background:#edf0f1;border-color:#c7d0d3}.tagline{font-size:1.32rem;font-weight:700;line-height:1.35;max-width:60ch}.callout{border-left:5px solid var(--teal);background:var(--mint);padding:1.15rem 1.4rem;border-radius:0 10px 10px 0;margin-block:1.4rem}.callout p:last-child{margin-bottom:0}.warning{border-left-color:#9b630d;background:#fff4db}.pagehead{padding:2.9rem 0 2.2rem;border-bottom:1px solid var(--line);background:white}.pagehead h1{font-size:clamp(2rem,4.6vw,3.7rem);max-width:23ch;margin-bottom:.65rem;overflow-wrap:break-word}.pagehead .lede{margin-bottom:0}.crumb{font-size:.85rem;margin-bottom:1rem}.sectionlinks{display:flex;flex-wrap:wrap;gap:.45rem 1.2rem;font-size:.9rem;margin-top:1.2rem}.sectionlinks a{font-weight:650}.diagram{margin:0;border:1px solid var(--line);border-radius:var(--radius);padding:1.2rem;background:white;color:var(--ink)}.diagram figcaption{font-size:.86rem;color:var(--muted);margin-top:1rem}.hero .diagram{border-color:#53737a;background:#173f4a;color:white}.hero .diagram figcaption{color:#d3e3e0}.diagram h3{font-size:1rem;letter-spacing:0;text-align:center;margin-bottom:.6rem}.diagram-block{border:1px solid #8eb8a9;background:#e2f1eb;padding:.8rem;border-radius:8px;text-align:center;color:var(--ink)}.diagram-block strong{display:block;line-height:1.2}.diagram-block span{display:block;font-size:.8rem;line-height:1.4;margin-top:.3rem}.diagram-block.dark{background:#204c58;border-color:#83a5a9;color:white}.diagram-block.light{background:white;border-color:var(--line)}.diagram-block.shared{background:var(--lime);color:var(--ink);border-color:#b5d178}.diagram-block.accent{background:var(--navy);color:white;border-color:#6d989a}.diagram-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}.diagram-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.connector{text-align:center;font-size:1.35rem;line-height:1.35;font-weight:700;color:var(--teal);padding:.15rem}.hero .connector{color:var(--lime)}.mini-diagram{display:grid;gap:.5rem}.mini-diagram .diagram-block{text-align:left}.layout-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:2rem;align-items:start}.stack-layer{border:1px solid var(--line);border-radius:10px;padding:1rem;background:white}.stack-layer h3{margin-bottom:.6rem}.pillgrid{display:flex;gap:.35rem;flex-wrap:wrap}.pillgrid span{font-size:.86rem;background:var(--mint);padding:.4rem .65rem;border-radius:5px;color:#174a43}.federation-node{border:1px solid #a7bdb7;border-radius:10px;padding:.75rem;background:#fff}.federation-node h3{font-size:1rem;text-align:left}.federation-node .diagram-block{margin-top:.4rem}.federation-node p{font-size:.85rem;line-height:1.45;margin-bottom:.4rem}.steps{counter-reset:step;display:grid;gap:.9rem;padding:0;list-style:none}.steps li{position:relative;padding:1rem 1.1rem 1rem 4rem;background:white;border:1px solid var(--line);border-radius:10px;counter-increment:step;margin:0}.steps li::before{content:counter(step,decimal-leading-zero);position:absolute;left:1rem;top:1rem;font-size:1.2rem;font-weight:800;color:var(--teal)}.steps strong{display:block}.tablewrap{overflow:auto;max-width:100%;border:1px solid var(--line);border-radius:10px;background:white}.tablewrap:focus-visible{outline:3px solid var(--focus);outline-offset:3px}table{width:100%;border-collapse:collapse;font-size:.94rem}caption{text-align:left;font-weight:700;padding:.8rem 1rem;color:var(--ink)}th,td{text-align:left;vertical-align:top;padding:.7rem .9rem;border-bottom:1px solid var(--line)}th{background:#e3eee9;font-size:.85rem}tbody tr:last-child td,tbody tr:last-child th{border-bottom:0}.filters{display:flex;flex-wrap:wrap;gap:1rem;align-items:end;margin:1.2rem 0}.field{display:grid;gap:.35rem;min-width:0}.field label{font-weight:700;font-size:.9rem}select,input[type=search]{background:white;border:1px solid #688580;border-radius:6px;padding:.65rem .75rem;width:100%;color:var(--ink);min-height:44px}.filters .field{flex:1 1 230px;max-width:420px}.block-card{display:flex;flex-direction:column;gap:.25rem}.block-card .statusline{margin-bottom:.25rem}.block-card .card-title{margin:0 0 .3rem}.block-card .details{margin-top:auto;padding-top:.7rem;border-top:1px solid var(--line)}.block-card .details p{margin-bottom:.65rem;font-size:.92rem}.block-card .details h4{font-size:.81rem;text-transform:uppercase;letter-spacing:.045em;color:var(--muted)}.block-card .candidates{padding-left:1.2em;margin-top:.3rem;font-size:.92rem}.block-card .candidates small{display:block}.block-card .reqs{font-size:.86rem;color:var(--muted)}[hidden]{display:none!important}.scenario{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:1.2rem;align-items:start}.config-form{padding:1.4rem;background:white;border:1px solid var(--line);border-radius:var(--radius)}.config-form fieldset{border:0;margin:0;padding:0}.config-form legend{font-weight:750;font-size:1.15rem;margin-bottom:1rem}.config-form .field{margin-bottom:1rem}.config-output{display:grid;gap:.9rem}.choice-list{list-style:none;margin:0;padding:0;display:grid;gap:.65rem}.choice-list li{background:white;padding:.8rem 1rem;border:1px solid var(--line);border-radius:8px;margin:0}.choice-list li strong{display:block}.status-message{font-size:.92rem;line-height:1.45}.gap-card{border-top:4px solid #9b630d}.gap-card h3{margin:.5rem 0}.gap-card p{font-size:.98rem}.gap-card .small{margin-bottom:.3rem}.gap-card dl{margin:0;font-size:.93rem}.gap-card dt{font-weight:750;margin-top:.6rem}.gap-card dd{margin-left:0}.audience{border-left:4px solid var(--teal)}.rule{border:0;border-top:1px solid var(--line);margin:1.2rem 0}.footer{background:var(--navy);color:#e0ece9;padding:2.4rem 0}.footer a{color:#d7f0a0}.footer .grid{grid-template-columns:1.2fr 1fr 1fr}.footer p{font-size:.92rem}.footer h2{font-size:1.3rem;color:white}.footer h3{font-size:1rem;color:white}.footer small{color:#d7e3df}.footer ul{padding:0;list-style:none}.footer li{font-size:.91rem}.footer .bottom{border-top:1px solid #587077;margin-top:1.2rem;padding-top:1.1rem;font-size:.8rem}.source-list{padding-left:1.2em}.source-list li{margin-bottom:.65rem}.source-list small{display:block}.no-js{background:var(--amber);padding:.8rem;border:1px solid #dfc58b}.status-inline{font-size:.82rem;font-weight:750;color:var(--muted)}@media(max-width:920px){.hero .layout,.layout-split,.scenario{grid-template-columns:1fr}.grid,.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.hero h1{max-width:20ch}.masthead .wrap{align-items:flex-start}.nav{width:100%}}@media(max-width:550px){.grid,.grid.two,.grid.four,.footer .grid{grid-template-columns:1fr}.diagram-grid{grid-template-columns:1fr}.diagram-grid.two{grid-template-columns:1fr}.diagram-block{padding:.65rem}.card{padding:1.15rem}.hero .layout{gap:1.5rem}.nav{gap:.1rem .65rem}.nav a{padding:.5rem .1rem}.actions .btn{width:100%}.federation-node .diagram-block{text-align:left}.pagehead{padding-top:2rem}.filters .field{max-width:none}.section{padding-block:2.2rem}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}@media(forced-colors:active){.tag,.btn,.diagram-block,.card,.callout,.federation-node{border:1px solid CanvasText}.nav a[aria-current=page]{border-bottom:3px solid LinkText}.brand svg{forced-color-adjust:auto}a:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid Highlight}}@media print{.nav,.draftbar,.actions,.filters,.skip,.footer{display:none}.hero,.pagehead,.section{padding:1rem 0;background:white;color:black}.hero h1,.hero p,.hero .eyebrow{color:black}.card,.diagram,.stack-layer{break-inside:avoid}.grid,.grid.two,.grid.four{display:block}.card{margin-bottom:1rem}}
.brand img{flex:none;width:40px;height:40px}.diagram+.grid{margin-top:1.2rem}.diagram+p{margin-top:1.2rem}.card .diagram{margin-block:.8rem 1rem}.btn:disabled{cursor:not-allowed;opacity:.65}.status-message{margin-top:1rem;font-weight:650}a:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible{outline-offset:4px}.hero a:focus-visible,.footer a:focus-visible{outline-color:var(--lime)}

/* Commissioned SVG illustrations (assets/illustrations, metadata in data/illustrations.json) */
.occ-illustration{margin:1.75rem 0 0;max-width:100%}
.occ-illustration img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper)}
.occ-illustration figcaption{margin-block:.8rem 0;color:var(--muted);font-size:.92rem;max-width:78ch}
.occ-illustration figcaption a{display:inline-block;margin-top:.35rem;font-weight:650}
.occ-illustration details{margin-block:.7rem 0 0;border:1px solid var(--line);border-radius:12px;background:var(--white);padding:.65rem .95rem;max-width:78ch}
.occ-illustration summary{cursor:pointer;font-weight:650}
.occ-illustration details p{margin:.6rem 0 0;font-size:.95rem}
.prose{max-width:74ch}

/* Secondary flow diagrams (disclosure) and the side-by-side comparison page */
.alt-view{margin-top:1.1rem;border:1px solid var(--line);border-radius:12px;background:var(--white);padding:.7rem 1rem}
.alt-view summary{cursor:pointer;font-weight:650}
.alt-view .diagram{margin:1rem 0 0;border:0;padding:0;background:transparent;max-width:860px}
.alt-note{color:var(--muted);font-size:.9rem;max-width:80ch}
.section.compare-wide .wrap{max-width:min(1500px,100%)}
.compare-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem;align-items:start;margin:1.2rem 0 .4rem}
.compare-pair h2{margin-top:2rem}
.compare-cell{min-width:0}
.compare-cell h3{font-size:.95rem;margin:0 0 .6rem}
.compare-cell > img{width:100%;height:auto;display:block;border:1px solid var(--line);border-radius:12px}
.compare-cell .diagram{margin:0}
.compare-meta{font-size:.8rem;color:var(--muted);margin:.5rem 0 0}
.compare-note{color:var(--muted);font-size:.9rem;max-width:92ch;margin:0 0 2rem}
@media (max-width:900px){.compare-pair{grid-template-columns:1fr}}
.footer .small{color:#d7e3df}
/* Reflow guards for grid and figure content at 320px */
.layout-split>*{min-width:0;max-width:100%}
.diagram,.diagram-grid,.diagram-block,.tablewrap{min-width:0;max-width:100%}

/* Dark mode: phase 1, page chrome and components. SVG figures remain light
   paper insets until their self-theming phase. */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]){
    --ink: #e8f0ed;
    --muted: #b6c7c2;
    --paper: #0f171a;
    --white: #182327;
    --line: #33474c;
    --teal: #6fd0c1;
    --teal-dark: #8fe0d3;
    --mint: #16282b;
    --navy: #0b1417;
    --lime: #cfe89a;
    --amber: #3a2f18;
    --focus: #ffb86b;
    color-scheme: dark;
  }
:root:not([data-theme="light"]) body{ background: var(--paper); color: var(--ink); }
:root:not([data-theme="light"]) .draftbar{ background: #0b1417; color: #e8f0ed; border-bottom: 1px solid var(--line); }
:root:not([data-theme="light"]) .draftbar a{ color: #cfe89a; }
:root:not([data-theme="light"]) .masthead{ background: var(--paper); border-color: var(--line); }
:root:not([data-theme="light"]) .brand span{ color: var(--ink); }
:root:not([data-theme="light"]) .brand small{ color: var(--muted); }
:root:not([data-theme="light"]) .nav a{ color: var(--ink); }
:root:not([data-theme="light"]) .nav a[aria-current=page]{ color: #cfe89a; }
:root:not([data-theme="light"]) .hero{ background: var(--navy); }
:root:not([data-theme="light"]) .pagehead{ background: var(--paper); }
:root:not([data-theme="light"]) .pagehead h1, :root:not([data-theme="light"]) .pagehead .lede{ color: var(--ink); }
:root:not([data-theme="light"]) .section{ background: var(--paper); color: var(--ink); }
:root:not([data-theme="light"]) .section.white{ background: var(--white); }
:root:not([data-theme="light"]) .section.tinted{ background: var(--mint); }
:root:not([data-theme="light"]) .section-intro, :root:not([data-theme="light"]) .lede, :root:not([data-theme="light"]) .small, :root:not([data-theme="light"]) .muted, :root:not([data-theme="light"]) .occ-illustration figcaption, :root:not([data-theme="light"]) .alt-note, :root:not([data-theme="light"]) .compare-note, :root:not([data-theme="light"]) .compare-meta{ color: var(--muted); }
:root:not([data-theme="light"]) .card{ background: var(--white); border-color: var(--line); color: var(--ink); }
:root:not([data-theme="light"]) .card h3, :root:not([data-theme="light"]) .card h4, :root:not([data-theme="light"]) .card-title{ color: var(--ink); }
:root:not([data-theme="light"]) .callout{ background: var(--white); border-color: var(--line); color: var(--ink); }
:root:not([data-theme="light"]) .callout.warning{ background: var(--amber); border-color: #b99a48; color: #f3e6c8; }
:root:not([data-theme="light"]) .callout.warning strong{ color: #fff4d6; }
:root:not([data-theme="light"]) .btn{ background: var(--teal); border-color: var(--teal); color: #08110f; }
:root:not([data-theme="light"]) .btn:hover{ background: #8fe0d3; color: #08110f; }
:root:not([data-theme="light"]) .btn.secondary{ background: transparent; color: var(--teal); border-color: var(--teal); }
:root:not([data-theme="light"]) .btn.secondary:hover{ background: #16323a; color: var(--lime); }
:root:not([data-theme="light"]) .tag{ background: var(--mint); border-color: var(--line); color: var(--ink); }
:root:not([data-theme="light"]) .tag.neutral{ background: #223236; color: #dfe9e5; }
:root:not([data-theme="light"]) .tag.gap{ background: #2b2415; color: #f1dfb4; border-color: #6a5a2c; }
:root:not([data-theme="light"]) .filters{ background: var(--white); border-color: var(--line); }
:root:not([data-theme="light"]) select, :root:not([data-theme="light"]) input[type=search], :root:not([data-theme="light"]) input[type=text]{ background: #0f171a; color: var(--ink); border-color: #688580; }
:root:not([data-theme="light"]) .tablewrap{ background: var(--white); border-color: var(--line); }
:root:not([data-theme="light"]) table{ color: var(--ink); }
:root:not([data-theme="light"]) th, :root:not([data-theme="light"]) td{ border-color: var(--line); }
:root:not([data-theme="light"]) thead th{ background: #223236; color: var(--ink); }
:root:not([data-theme="light"]) .footer{ background: #0b1417; color: #e0ece9; }
:root:not([data-theme="light"]) .footer a{ color: #d7f0a0; }
:root:not([data-theme="light"]) .footer h2, :root:not([data-theme="light"]) .footer h3{ color: #ffffff; }
:root:not([data-theme="light"]) .footer .small{ color: #d7e3df; }
:root:not([data-theme="light"]) .skip{ background: var(--white); color: var(--ink); }
:root:not([data-theme="light"]) .occ-illustration details{ background: var(--white); border-color: var(--line); }
:root:not([data-theme="light"]) .occ-illustration img{ border-color: var(--line); }
:root:not([data-theme="light"]) .alt-view{ background: var(--white); border-color: var(--line); }
:root:not([data-theme="light"]) .nav a:focus-visible, :root:not([data-theme="light"]) a:focus-visible, :root:not([data-theme="light"]) button:focus-visible, :root:not([data-theme="light"]) select:focus-visible, :root:not([data-theme="light"]) summary:focus-visible, :root:not([data-theme="light"]) input:focus-visible{ outline-color: var(--focus); }
:root:not([data-theme="light"]) /* Light paper insets: CSS diagrams and their captions keep light colours for contrast. */
  .diagram{ background: #ffffff; color: #142f39; border-color: #c6d5d2; }
:root:not([data-theme="light"]) .diagram figcaption{ color: #435e68; }
}
/* Manual dark theme overrides the OS preference. */
:root[data-theme="dark"]{
    --ink: #e8f0ed;
    --muted: #b6c7c2;
    --paper: #0f171a;
    --white: #182327;
    --line: #33474c;
    --teal: #6fd0c1;
    --teal-dark: #8fe0d3;
    --mint: #16282b;
    --navy: #0b1417;
    --lime: #cfe89a;
    --amber: #3a2f18;
    --focus: #ffb86b;
    color-scheme: dark;
  }
:root[data-theme="dark"] body{ background: var(--paper); color: var(--ink); }
:root[data-theme="dark"] .draftbar{ background: #0b1417; color: #e8f0ed; border-bottom: 1px solid var(--line); }
:root[data-theme="dark"] .draftbar a{ color: #cfe89a; }
:root[data-theme="dark"] .masthead{ background: var(--paper); border-color: var(--line); }
:root[data-theme="dark"] .brand span{ color: var(--ink); }
:root[data-theme="dark"] .brand small{ color: var(--muted); }
:root[data-theme="dark"] .nav a{ color: var(--ink); }
:root[data-theme="dark"] .nav a[aria-current=page]{ color: #cfe89a; }
:root[data-theme="dark"] .hero{ background: var(--navy); }
:root[data-theme="dark"] .pagehead{ background: var(--paper); }
:root[data-theme="dark"] .pagehead h1, :root[data-theme="dark"] .pagehead .lede{ color: var(--ink); }
:root[data-theme="dark"] .section{ background: var(--paper); color: var(--ink); }
:root[data-theme="dark"] .section.white{ background: var(--white); }
:root[data-theme="dark"] .section.tinted{ background: var(--mint); }
:root[data-theme="dark"] .section-intro, :root[data-theme="dark"] .lede, :root[data-theme="dark"] .small, :root[data-theme="dark"] .muted, :root[data-theme="dark"] .occ-illustration figcaption, :root[data-theme="dark"] .alt-note, :root[data-theme="dark"] .compare-note, :root[data-theme="dark"] .compare-meta{ color: var(--muted); }
:root[data-theme="dark"] .card{ background: var(--white); border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .card h3, :root[data-theme="dark"] .card h4, :root[data-theme="dark"] .card-title{ color: var(--ink); }
:root[data-theme="dark"] .callout{ background: var(--white); border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .callout.warning{ background: var(--amber); border-color: #b99a48; color: #f3e6c8; }
:root[data-theme="dark"] .callout.warning strong{ color: #fff4d6; }
:root[data-theme="dark"] .btn{ background: var(--teal); border-color: var(--teal); color: #08110f; }
:root[data-theme="dark"] .btn:hover{ background: #8fe0d3; color: #08110f; }
:root[data-theme="dark"] .btn.secondary{ background: transparent; color: var(--teal); border-color: var(--teal); }
:root[data-theme="dark"] .btn.secondary:hover{ background: #16323a; color: var(--lime); }
:root[data-theme="dark"] .tag{ background: var(--mint); border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .tag.neutral{ background: #223236; color: #dfe9e5; }
:root[data-theme="dark"] .tag.gap{ background: #2b2415; color: #f1dfb4; border-color: #6a5a2c; }
:root[data-theme="dark"] .filters{ background: var(--white); border-color: var(--line); }
:root[data-theme="dark"] select, :root[data-theme="dark"] input[type=search], :root[data-theme="dark"] input[type=text]{ background: #0f171a; color: var(--ink); border-color: #688580; }
:root[data-theme="dark"] .tablewrap{ background: var(--white); border-color: var(--line); }
:root[data-theme="dark"] table{ color: var(--ink); }
:root[data-theme="dark"] th, :root[data-theme="dark"] td{ border-color: var(--line); }
:root[data-theme="dark"] thead th{ background: #223236; color: var(--ink); }
:root[data-theme="dark"] .footer{ background: #0b1417; color: #e0ece9; }
:root[data-theme="dark"] .footer a{ color: #d7f0a0; }
:root[data-theme="dark"] .footer h2, :root[data-theme="dark"] .footer h3{ color: #ffffff; }
:root[data-theme="dark"] .footer .small{ color: #d7e3df; }
:root[data-theme="dark"] .skip{ background: var(--white); color: var(--ink); }
:root[data-theme="dark"] .occ-illustration details{ background: var(--white); border-color: var(--line); }
:root[data-theme="dark"] .occ-illustration img{ border-color: var(--line); }
:root[data-theme="dark"] .alt-view{ background: var(--white); border-color: var(--line); }
:root[data-theme="dark"] .nav a:focus-visible, :root[data-theme="dark"] a:focus-visible, :root[data-theme="dark"] button:focus-visible, :root[data-theme="dark"] select:focus-visible, :root[data-theme="dark"] summary:focus-visible, :root[data-theme="dark"] input:focus-visible{ outline-color: var(--focus); }
:root[data-theme="dark"] /* Light paper insets: CSS diagrams and their captions keep light colours for contrast. */
  .diagram{ background: #ffffff; color: #142f39; border-color: #c6d5d2; }
:root[data-theme="dark"] .diagram figcaption{ color: #435e68; }


/* Dark mode phase 1 corrections: remaining literal light surfaces. */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .steps li, :root:not([data-theme="light"]) .config-form, :root:not([data-theme="light"]) .choice-list li, :root:not([data-theme="light"]) .federation-node, :root:not([data-theme="light"]) .block-card, :root:not([data-theme="light"]) .scenario{
    background: var(--white);
    color: var(--ink);
    border-color: var(--line);
  }
:root:not([data-theme="light"]) th{ background: #223236; color: var(--ink); }
:root:not([data-theme="light"]) td{ color: var(--ink); }
:root:not([data-theme="light"]) .tablewrap table{ background: var(--white); }
:root:not([data-theme="light"]) .diagram-block, :root:not([data-theme="light"]) .diagram-block.light, :root:not([data-theme="light"]) .stack-layer{ color: #142f39; }
:root:not([data-theme="light"]) .diagram-block.light, :root:not([data-theme="light"]) .stack-layer{ background: #ffffff; }
:root:not([data-theme="light"]) .diagram-block.shared{ background: #cfe89a; color: #142f39; }
:root:not([data-theme="light"]) .diagram-block.dark{ background: #204c58; color: #ffffff; }
:root:not([data-theme="light"]) .diagram-block{ background: #e2f1eb; border-color: #8eb8a9; }
:root:not([data-theme="light"]) .hero .diagram{ background: #173f4a; color: #ffffff; }
:root:not([data-theme="light"]) .hero .btn:hover{ background: #cfe89a; color: #08110f; }
:root:not([data-theme="light"]) .card .small, :root:not([data-theme="light"]) .card .reqs, :root:not([data-theme="light"]) .path-card .small{ color: var(--muted); }
}
/* Manual dark theme overrides the OS preference. */
:root[data-theme="dark"] .steps li, :root[data-theme="dark"] .config-form, :root[data-theme="dark"] .choice-list li, :root[data-theme="dark"] .federation-node, :root[data-theme="dark"] .block-card, :root[data-theme="dark"] .scenario{
    background: var(--white);
    color: var(--ink);
    border-color: var(--line);
  }
:root[data-theme="dark"] th{ background: #223236; color: var(--ink); }
:root[data-theme="dark"] td{ color: var(--ink); }
:root[data-theme="dark"] .tablewrap table{ background: var(--white); }
:root[data-theme="dark"] .diagram-block, :root[data-theme="dark"] .diagram-block.light, :root[data-theme="dark"] .stack-layer{ color: #142f39; }
:root[data-theme="dark"] .diagram-block.light, :root[data-theme="dark"] .stack-layer{ background: #ffffff; }
:root[data-theme="dark"] .diagram-block.shared{ background: #cfe89a; color: #142f39; }
:root[data-theme="dark"] .diagram-block.dark{ background: #204c58; color: #ffffff; }
:root[data-theme="dark"] .diagram-block{ background: #e2f1eb; border-color: #8eb8a9; }
:root[data-theme="dark"] .hero .diagram{ background: #173f4a; color: #ffffff; }
:root[data-theme="dark"] .hero .btn:hover{ background: #cfe89a; color: #08110f; }
:root[data-theme="dark"] .card .small, :root[data-theme="dark"] .card .reqs, :root[data-theme="dark"] .path-card .small{ color: var(--muted); }


/* Open-source health snapshot: a scannable label, not a certification. */
.health-line { margin:.35rem 0 .6rem; font-size:.86rem; }
.health-line a { font-weight:650; }
.health-score { display:inline-block; min-width:5.2rem; padding:.18rem .5rem; border-radius:999px; font-size:.82rem; font-weight:750; text-align:center; border:1px solid var(--line); color:var(--ink); background:var(--white); }
.health-score.strong { background:#d6ed9a; border-color:#7d9c3f; color:#142f39; }
.health-score.moderate { background:#fff0ce; border-color:#c9a53d; color:#142f39; }
.health-score.limited { background:#ffe0c2; border-color:#b26a2b; color:#142f39; }
.health-score.weak { background:#f6d6d0; border-color:#a3412f; color:#142f39; }
.health-score.unknown { background:transparent; color:var(--muted); font-weight:600; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .health-score.strong{ background:#2f4a1f; border-color:#9ab86a; color:#e8f0ed; }
:root:not([data-theme="light"]) .health-score.moderate{ background:#3a2f18; border-color:#b99a48; color:#f3e6c8; }
:root:not([data-theme="light"]) .health-score.limited{ background:#3d2a1b; border-color:#c07a3e; color:#f3e6c8; }
:root:not([data-theme="light"]) .health-score.weak{ background:#3d211d; border-color:#c06a5a; color:#f3e6c8; }
}
/* Manual dark theme overrides the OS preference. */
:root[data-theme="dark"] .health-score.strong{ background:#2f4a1f; border-color:#9ab86a; color:#e8f0ed; }
:root[data-theme="dark"] .health-score.moderate{ background:#3a2f18; border-color:#b99a48; color:#f3e6c8; }
:root[data-theme="dark"] .health-score.limited{ background:#3d2a1b; border-color:#c07a3e; color:#f3e6c8; }
:root[data-theme="dark"] .health-score.weak{ background:#3d211d; border-color:#c06a5a; color:#f3e6c8; }

.tag.dpg { background:#d6ed9a; border-color:#7d9c3f; color:#142f39; font-weight:750; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .tag.dpg{ background:#2f4a1f; border-color:#9ab86a; color:#e8f0ed; }
}
/* Manual dark theme overrides the OS preference. */
:root[data-theme="dark"] .tag.dpg{ background:#2f4a1f; border-color:#9ab86a; color:#e8f0ed; }


/* Three-state theme selector: system, light, dark. */
#theme-selector{display:inline-flex;gap:2px;border:1px solid var(--line);border-radius:8px;padding:2px;background:var(--white)}
#theme-selector[hidden]{display:none}
.theme-mode-btn{display:inline-flex;align-items:center;gap:.3rem;padding:.42rem .55rem;border:2px solid transparent;border-radius:6px;background:transparent;color:var(--muted);font-size:.82rem;font-weight:650;min-height:40px}
.theme-mode-btn:hover{background:var(--mint);color:var(--ink)}
.theme-mode-btn[aria-pressed="true"]{border-color:var(--teal);background:var(--mint);color:var(--ink)}
.theme-mode-btn:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
@media (prefers-reduced-motion: reduce){.theme-mode-btn{transition:none}}
@media (forced-colors: active){#theme-selector{border:1px solid CanvasText}.theme-mode-btn[aria-pressed="true"]{border:2px solid Highlight;background:Highlight;color:HighlightText;forced-color-adjust:none}}
.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}
/* Hero diagrams keep their dark inset in both automatic and manual dark themes. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero .diagram figcaption { color: #d3e3e0; }
}
:root[data-theme="dark"] .hero .diagram figcaption { color: #d3e3e0; }
/* Commands and code must wrap at narrow widths instead of forcing page scroll. */
pre{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}
pre code,code{overflow-wrap:anywhere}

/* Nutrition score as a visual card badge. */
.software-card { position: relative; padding-bottom: 5.75rem; }
.nutrition-badge {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  min-width: 6.5rem;
  padding: .55rem .75rem;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  font-size: .95rem;
  text-align: center;
  z-index: 1;
}
a.tag.dpg { text-decoration: none; }
a.tag.dpg:hover { text-decoration: underline; }
a.tag.dpg:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (max-width: 560px) {
  .software-card { padding-bottom: 6.25rem; }
  .nutrition-badge { right: .8rem; bottom: .8rem; padding: .45rem .65rem; }
}
@media (forced-colors: active) {
  .health-score.nutrition-badge {
    border: 2px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    forced-color-adjust: none;
  }
}

/* Review feedback: tags that filter, readable journey facts, mobile health table. */
.filter-tag { font: inherit; cursor: pointer; text-align: left; }
.filter-tag:disabled { cursor: default; opacity: .8; }
.filter-tag:hover:not(:disabled) { background: #d3e9df; }
:root[data-theme="dark"] .filter-tag:hover:not(:disabled) { background: #244a42; }
.journey-facts { margin: 1rem 0 0; }
.journey-facts dt { font-size: 1.08rem; font-weight: 800; color: var(--ink); margin-top: 1.1rem; }
.journey-facts dt:first-child { margin-top: 0; }
.journey-facts dd { margin: .25rem 0 0; color: var(--muted); }
.table-note { display: none; font-weight: 500; font-size: .84rem; color: var(--muted); }
@media (max-width: 640px) {
  .health-table { table-layout: fixed; font-size: .88rem; }
  .health-table th, .health-table td { padding: .5rem .4rem; overflow-wrap: anywhere; }
  .health-table th:nth-child(1), .health-table td:nth-child(1) { width: 50%; }
  .health-table th:nth-child(2), .health-table td:nth-child(2) { width: 32%; }
  .health-table th:nth-child(8), .health-table td:nth-child(8) { width: 18%; }
  .health-table .health-score { font-size: .78rem; padding: .15rem .35rem; }
  .health-table th:nth-child(3), .health-table td:nth-child(3),
  .health-table th:nth-child(4), .health-table td:nth-child(4),
  .health-table th:nth-child(5), .health-table td:nth-child(5),
  .health-table th:nth-child(6), .health-table td:nth-child(6),
  .health-table th:nth-child(7), .health-table td:nth-child(7),
  .health-table th:nth-child(9), .health-table td:nth-child(9) { display: none; }
  .health-table .table-note { display: block; margin-top: .35rem; }
}
.health-signals { margin: -.2rem 0 .6rem; color: var(--muted); }
.health-score.nutrition-badge { display: flex; flex-direction: column; gap: .1rem; line-height: 1.15; }
.nutrition-badge strong { font-size: 1.05rem; font-weight: 850; }
