/* Theme switch: dark is the default; light is an explicit reader preference. */
.theme-toggle{display:none;align-items:center;gap:9px;min-height:44px;padding:7px 12px;border:1px solid #687587;border-radius:999px;background:#202b39;color:#f3dfbf;font-family:inherit;font-size:.875rem;font-weight:600;line-height:1.2;cursor:pointer;white-space:nowrap}
.theme-toggle[data-ready]{display:inline-flex}.theme-toggle:focus-visible{outline:2px solid #f4ba79;outline-offset:4px}.theme-toggle:hover{border-color:#f4ba79}
.theme-track{width:32px;height:19px;border-radius:20px;background:#b98b49;position:relative;flex-shrink:0}.theme-track::after{content:"";position:absolute;top:3px;left:3px;width:13px;height:13px;border-radius:50%;background:#fff3d9;transition:transform .18s ease}.theme-toggle[aria-checked="true"] .theme-track::after{transform:translateX(13px)}
.error-theme{position:absolute;top:20px;right:20px}
@media(max-width:620px){nav[aria-label="Primary navigation"]{flex-wrap:wrap;padding:13px 0;gap:10px}.nav-links{justify-content:flex-end;gap:4px}.nav-links .theme-toggle{font-size:.8rem;padding:7px 10px}}
html[data-theme="light"]{color-scheme:light;--paper2:#edf1f5;--paper:#fff;--ink:#1b2c3c;--navy:#172f47;--muted:#445569;--line:#bac7d3;--blue:#235c8b;--soft:#e1e9f1;--warm:#82500f}
html[data-theme="light"] body{background:#edf1f5;color:#1b2c3c;--project-accent:#285d8a;--project-glow:#dce9f6}
html[data-theme="light"] body[data-project="hyper-v-cluster"]{--project-accent:#176052;--project-glow:#d7ebe5}
html[data-theme="light"] body[data-project="legacy-app-automation"]{--project-accent:#68417e;--project-glow:#e7def0}
html[data-theme="light"] body[data-project="virtual-printer-automation"]{--project-accent:#825026;--project-glow:#f1e1ce}
html[data-theme="light"] body[data-project="infrastructure-modernisation"]{--project-accent:#80521d;--project-glow:#e2e9ef}
html[data-theme="light"] :is(.site-header,.project-header){background:linear-gradient(115deg,#f8fafc,var(--project-glow));border-color:#c1cdd8}
html[data-theme="light"] nav{border-bottom-color:#bcc9d6}
html[data-theme="light"] :is(.brand,.project-header nav .brand,.project-header .nav-link,.nav-link){color:#20394f}
html[data-theme="light"] .brand small{color:#485d70}
html[data-theme="light"] .nav-link:hover{background:#dce6ef;color:#172f47;border-color:#a5b8c9}
html[data-theme="light"] :is(.hero h1,.project-hero h1){color:#172b3f}
html[data-theme="light"] .hero h1 em{color:#865211}
html[data-theme="light"] :is(.kicker,.field-label){color:#80521d}
html[data-theme="light"] :is(.hero .subline,.project-hero .factual-title){color:#2b4258}
html[data-theme="light"] :is(.hero-copy,.project-hero .lead,.section-head p,.crumb){color:#40566b}
html[data-theme="light"] .theme-toggle{background:#fff9ee;color:#513816;border-color:#b19c7c;font-family:inherit}
html[data-theme="light"] .theme-track{background:#90652c}
html[data-theme="light"] .note-card{--card-accent:#265e89;background:#e0eaf4;border-color:#abc2d6;border-top-color:var(--card-accent);box-shadow:0 6px 18px #172f4709}
html[data-theme="light"] .note-card:nth-child(3){--card-accent:#176052;background:#deece7;border-color:#a7c9bc;border-top-color:var(--card-accent)}
html[data-theme="light"] .note-card:nth-child(4){--card-accent:#68417e;background:#eae2f0;border-color:#c4b2d1;border-top-color:var(--card-accent)}
html[data-theme="light"] .note-card:nth-child(5){--card-accent:#825026;background:#f0e3d5;border-color:#d0b596;border-top-color:var(--card-accent)}
html[data-theme="light"] .note-card.featured{background:#d4dfe9;border-color:#aebfce;border-left-color:#ba7e30}
html[data-theme="light"] .note-card.featured:hover{background:#dde6ee}
html[data-theme="light"] .note-card h3{color:#192f43}
html[data-theme="light"] .note-card .factual{color:#2b4053}
html[data-theme="light"] .note-card .aside{color:#3d5062}
html[data-theme="light"] .disclosure{color:#48596a;border-color:#a18254}
html[data-theme="light"] .aside-box{background:#e1e7ee;border-color:#bac6d2;border-top-color:#a77534}
html[data-theme="light"] .nationality strong{color:#724b1e}
html[data-theme="light"] :is(.nationality span,.linkedin-aside p){color:#3f5266}
html[data-theme="light"] .linkedin-aside a{color:#21567f}
html[data-theme="light"] footer{background:#dce4ec;border-color:#b7c5d2;color:#41556a}
html[data-theme="light"] footer a{color:#244c70}
html[data-theme="light"] .project-meta{background:#b7c5d2;border-color:#b7c5d2}
html[data-theme="light"] .meta-item{background:#e3eaf1}
html[data-theme="light"] .meta-item span{color:#33495d}
html[data-theme="light"] .field-story{background:#f7f9fb;color:#23384b;border-color:#b9c8d5;border-top-color:var(--project-accent);color-scheme:light}
html[data-theme="light"] .field-section h2{color:#172f47}
html[data-theme="light"] :is(.field-section p,.field-section ul){color:#263d51}
html[data-theme="light"] .field-section+.field-section{border-color:#c4d0db}
html[data-theme="light"] .margin-note{background:#e1e9f0;color:#2c4357}
html[data-theme="light"] .quote-note{color:#2c4357}
html[data-theme="light"] .diagram{background:linear-gradient(135deg,var(--project-glow),#edf1f5);border-color:#a9bccb;border-top-color:var(--project-accent);color:#1c3347;box-shadow:0 8px 20px #172f4708}
html[data-theme="light"] :is(.diagram .caption,.flow-step span){color:#354e62}
html[data-theme="light"] .flow-step{background:#ffffff70;border-color:#aebfcf}
html[data-theme="light"] .under-bonnet{background:#e4ebf2;border-color:#b2c3d1}
html[data-theme="light"] .under-bonnet h2{color:#1c3347}
html[data-theme="light"] .tech{background:#d4dfea;color:#27465e}
html[data-theme="light"] .pdf-cta{background:#e3e9ef;border-color:#b7c5d3;border-left-color:var(--project-accent)}
html[data-theme="light"] .pdf-cta h2{color:#79501c}
html[data-theme="light"] .pdf-cta p{color:#3c5267}
html[data-theme="light"] .field-pagination a{background:#e1e9f1;border-color:#afc0cf}
html[data-theme="light"] .field-pagination a:hover{background:#d6e2ed;border-color:var(--project-accent)}
html[data-theme="light"] .field-pagination a span{color:#40586c}
html[data-theme="light"] a:focus-visible{outline-color:#705019}
html[data-theme="light"] .error{background:#edf1f5;color:#172f47}
html[data-theme="light"] .error p{color:#40566b}
@media(prefers-reduced-motion:reduce){.theme-track::after{transition:none}}

html[data-theme="light"] .project-hero .field-label{color:var(--project-accent)}

/* Language links are ordinary page links, including when JavaScript is unavailable. */
.language-menu{position:relative;font-size:.875rem;color:#e4e7ed;flex-shrink:0}
.language-menu summary{display:flex;align-items:center;gap:12px;min-height:44px;padding:8px 12px;cursor:pointer;border:1px solid #687587;border-radius:999px;list-style:none;font-weight:600;background:#202b39}
.language-menu summary::-webkit-details-marker{display:none}
.language-menu summary:hover{border-color:#f4ba79}.language-menu summary:focus-visible{outline:2px solid #f4ba79;outline-offset:4px}
.language-menu ul{position:absolute;right:0;top:calc(100% + 8px);z-index:30;min-width:160px;padding:6px;margin:0;list-style:none;border:1px solid #687587;border-radius:12px;background:#202b39;box-shadow:0 12px 30px #0005}
.language-menu a{display:block;padding:10px 12px;border-radius:7px;text-decoration:none;color:#edf0f5}
.language-menu a:hover,.language-menu a[aria-current]{background:#354457;color:#ffdaa4}
html[data-theme="light"] .language-menu summary{background:#f8fafc;color:#20394f;border-color:#a3b6c7}
html[data-theme="light"] .language-menu ul{background:#f8fafc;border-color:#a3b6c7}
html[data-theme="light"] .language-menu a{color:#20394f}
html[data-theme="light"] .language-menu a:hover,html[data-theme="light"] .language-menu a[aria-current]{background:#dce6ef;color:#61400f}
.pdf-actions{min-width:0;max-width:100%}.pdf-actions .button{white-space:normal;text-align:center}
nav[aria-label]:not(.field-pagination){flex-wrap:wrap;padding-block:12px}
.nav-links{max-width:100%;justify-content:flex-end}.nav-links .theme-toggle{flex-shrink:0}
.reader-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex-shrink:0;max-width:100%}
@media(max-width:820px){.nav-links{width:100%;gap:6px;justify-content:flex-start}.nav-links .nav-link:not(:last-child){display:inline-flex}.nav-links .nav-link[href="#aside"]{display:none}.language-menu{margin-left:auto}.language-menu summary{padding:8px 10px}}
@media(max-width:480px){.nav-links .nav-link{font-size:.82rem;padding:7px}.language-menu{font-size:.82rem}.theme-toggle{font-size:.8rem}.nav-links{gap:5px}.language-menu{margin-left:0}}

/* Keep dropdown hit targets above the introduction stacking context. */
.site-header nav,.project-header nav{z-index:5}
.language-menu a{cursor:pointer}

/* Direct language selection: flags, short labels and full accessible names. */
.language-buttons{display:flex;align-items:center;gap:6px;flex-shrink:0}
.language-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:62px;min-height:44px;padding:8px;border:1px solid #687587;border-radius:9px;background:#202b39;color:#edf0f5;text-decoration:none;font-size:.8rem;font-weight:650;line-height:1;transition:background .18s ease,border-color .18s ease}
.language-button img{width:24px;height:16px;object-fit:cover;border-radius:2px;box-shadow:0 0 0 1px #ffffff25}
.language-button:hover{background:#354457;border-color:#f4ba79}
.language-button[aria-current="page"]{background:#3c3428;color:#ffe0ab;border:2px solid #f4ba79;padding:7px}
.language-button:focus-visible{outline:2px solid #f4ba79;outline-offset:3px}
html[data-theme="light"] .language-button{background:#f8fafc;border-color:#a3b6c7;color:#20394f}
html[data-theme="light"] .language-button:hover{background:#e2eaf2;border-color:#916228}
html[data-theme="light"] .language-button[aria-current="page"]{background:#f5e6cf;border-color:#916228;color:#513815}
html[data-theme="light"] .language-button:focus-visible{outline-color:#705019}
@media(max-width:480px){.reader-controls{gap:10px}.language-button{min-width:60px}.language-buttons{gap:5px}}
