/* Shared controls and an explicit theme palette. Source images remain untouched. */
:root{color-scheme:light;--surface:#fcfbf8;--deep:#19273d;--accent-button:#941a1f}
.site-utilities{display:flex;align-items:center;gap:14px;flex-shrink:0;margin-left:auto;order:2}.site-header .nav{order:1}.menu-toggle{order:3}.header-inner{gap:24px}.language-switch{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:500;letter-spacing:.03em}.language-switch a{display:grid;place-items:center;min-width:27px;min-height:44px;text-decoration:none;color:var(--muted)}.language-switch a[aria-current]{color:var(--navy);font-weight:800}.language-switch>span{color:var(--line)}.theme-toggle{display:none;width:40px;height:40px;align-items:center;justify-content:center;background:transparent;border:1px solid var(--line);border-radius:50%;color:var(--navy);padding:0;flex:none}.js .theme-toggle{display:flex}.theme-toggle:hover{background:var(--paper)}.theme-toggle[aria-pressed=true]{background:var(--paper);border-color:var(--red)}.site-header .brand img{height:63px;object-fit:contain;mix-blend-mode:normal}
html[data-theme=dark]{color-scheme:dark;--navy:#edf0f5;--ink:#edf0f5;--muted:#b5c0cc;--paper:#1c2939;--line:#364455;--white:#142131;--red:#eaa1a4;--surface:#111a27;--deep:#142131;--accent-button:#941a1f}
html[data-theme=dark] body{background:var(--surface)}
html[data-theme=dark] .site-header{background:#111a27f5;border-color:var(--line)}
html[data-theme=dark] :is(.nav,.menu-toggle,.skip,dialog){background:var(--surface);color:var(--navy)}
html[data-theme=dark] .site-header .brand img{mix-blend-mode:normal}
html[data-theme=dark] :is(.education-ribbon,.site-footer,.academic-feature,.science-editorial,.contact-panel){background:var(--deep);color:#f5f3ef}
html[data-theme=dark] :is(.btn,.nav>a:last-child,.dialog-top button){background:var(--accent-button);border-color:var(--accent-button);color:#fff}
html[data-theme=dark] .btn:hover,html[data-theme=dark] .nav>a:last-child:hover{background:#772026;border-color:#772026}
html[data-theme=dark] .btn.light,html[data-theme=dark] .contact-panel .light{background:#e9e2d8;color:#19273d;border-color:#e9e2d8}
html[data-theme=dark] :is(.editorial-about,.final-invitation,.directory-tools){background:#172434}
html[data-theme=dark] :is(.directory-card,.certificates .gallery-link){background:var(--paper);border-color:var(--line)}
html[data-theme=dark] :is(.gallery-link:hover,.treatment-link:hover){background:#243347}
html[data-theme=dark] .treatment-link{border-color:var(--line)}
html[data-theme=dark] .area-watermark{color:#ffffff09}
html[data-theme=dark] .pill-link{border-color:#eaa1a460}
html[data-theme=dark] :is(.pill-link:hover,.round-link,.archive-seal){background:var(--accent-button);color:#fff}
html[data-theme=dark] .round-link:hover{background:#762027}
html[data-theme=dark] .original-photo-panel figcaption,html[data-theme=dark] .treatment-link .arrow{border-color:var(--line)}
html[data-theme=dark] .science-photo{color:#19273d}
html[data-theme=dark] .motion-toggle{background:#172434ed;color:#edf0f5;border-color:#46576b}
html[data-theme=dark] .directory-tools :is(input,select){background:#111a27;border-color:#566479;color:#edf0f5}
html[data-theme=dark] .directory-tools input::placeholder{color:#a8b6c6}
html[data-theme=dark] .surgical-detail{border-color:#172434}
html[data-theme=dark] :is(a,button,summary,input,select):focus-visible{outline-color:#eaa1a4}
@media(min-width:1181px){.site-header .brand{width:175px}.nav{gap:16px;font-size:11px}.header-inner{gap:20px}.nav>a:last-child{padding:12px 16px}.site-utilities{gap:9px}}
@media(max-width:1180px){.site-utilities{order:1}.menu-toggle{order:2}.site-header .nav{order:3}.header-inner{gap:18px}.site-header .brand{width:200px}}
@media(max-width:760px){.header-inner{min-height:80px;gap:10px}.site-header .brand{width:150px}.site-header .brand img{height:55px}.site-utilities{gap:8px}.language-switch{gap:3px;font-size:10px}.language-switch a{min-width:23px}.theme-toggle{width:36px;height:36px}.menu-toggle{width:38px;min-height:40px;padding:8px;justify-content:center}.menu-toggle span:first-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.site-header .nav{padding-inline:20px}}
@media(max-width:390px){.header-inner{gap:7px}.site-header .brand{width:128px}.site-utilities{gap:5px}.theme-toggle{width:33px;height:33px}.menu-toggle{width:34px}.language-switch a{min-width:22px}}
@media print{.site-utilities{display:none}html[data-theme=dark]{--navy:#19273d;--muted:#526071;--paper:#f5f4f1;--line:#dce0e4;--red:#941a1f}html[data-theme=dark] body{background:white;color:#19273d}}
