.cd29-search-note{font-size:.9rem;margin:10px 0 0}.cd29-ai-button{white-space:nowrap}.cd29-ai-panel{margin-bottom:20px;scroll-margin-top:12px}.cd29-footer{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:.9rem;color:var(--muted);padding-top:0}.cd29-theme[hidden],#cd29-install[hidden]{display:none!important}.cd29-qr{margin:10px 0;max-width:100%;border:1px solid var(--line);padding:10px}.cd29-qr img{width:160px;height:160px;background:white;max-width:100%}.cd29-qr summary{cursor:pointer}.cd29-qr p{overflow-wrap:anywhere}.cd29-offline-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.cd29-offline-actions .btn{min-height:36px}
/* Dark mode changes portal chrome, never inverts photographs, drawings or PDFs. */
html[data-cd29-theme=dark]{color-scheme:dark;--bg:#141b25;--card:#1c2531;--text:#e5edf5;--muted:#aab8ca;--line:#3a495e;--accent:#8dbbff;--danger:#ff9b9f;--ok:#8ce2b3;--shadow:none}
html[data-cd29-theme=dark] body{background:var(--bg);color:var(--text)}
html[data-cd29-theme=dark] :is(.card,.tile,.cd24-search,.header-hero,.header-hero .cd24-navbar,.usercard .box){background:var(--card);color:var(--text);border-color:var(--line)}
html[data-cd29-theme=dark] .header-hero .overlay{background:linear-gradient(90deg,rgba(17,24,34,.93),rgba(17,24,34,.55) 60%,rgba(17,24,34,.18))}
html[data-cd29-theme=dark] .header-hero .brand .sub{color:#d5e0ee}
html[data-cd29-theme=dark] :is(.btn,.iconbtn,.cd24-choice,.cd28-toc,.cd24-filters,.archive-attachments,.cd24-note,.cd24-nested,.cd27-sources article,.cd27-quota,.cd27-consent,.cd14-editor,.cd14-toolbar,.editor,.cd26-lang a,.tag,.badge,.cd24-metrics>div){background:#222f40;color:var(--text);border-color:var(--line)}
html[data-cd29-theme=dark] :is(.btn.primary,.cd24-choice:has(input:checked),.cd24-navbar .btn[aria-current=page],.cd24-pagination [aria-current=page]){background:#315c97;color:#fff;border-color:#76a9ef}
html[data-cd29-theme=dark] .cd24-navbar .btn{border-bottom-color:transparent}
html[data-cd29-theme=dark] .cd24-navbar .btn[aria-current=page]{border-bottom-color:#a6ccff}
html[data-cd29-theme=dark] :is(.btn:hover,.cd24-navbar .btn:hover,.cd24-quick a:hover){background:#354a62;color:#fff}
html[data-cd29-theme=dark] :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select,textarea){background:#121c29;color:var(--text);border-color:var(--line)}
html[data-cd29-theme=dark] :is(a,.cd24-result .title a,.cd24-de-link){color:var(--accent)}
html[data-cd29-theme=dark] .cd24-result .img:not(img){background:#dce7f3!important;color:#24374f!important}
html[data-cd29-theme=dark] :is(.cd191-missing,.archive-missing,.cd27-caution,.badge.draft,.btn.danger){background:#40252b!important;color:#ffd2d4!important;border-color:#8c4d58!important}
html[data-cd29-theme=dark] .cd191-missing a{color:#ffc2c5!important}
html[data-cd29-theme=dark] :is(.badge.level-1,.cd14-ok){background:#193a31;color:#b1f1d0;border-color:#356353}
html[data-cd29-theme=dark] :is(.cd24-fav-active){background:#3a3220!important;color:#ffe1a0!important;border-color:#8b7545!important}
html[data-cd29-theme=dark] mark{background:#735b26;color:#fff6d8}
html[data-cd29-theme=dark] :is(a,button,input,textarea,select,summary):focus-visible{outline-color:#a9d0ff}
/* Legacy content sometimes has fixed inline colours; keep document interior white for accurate legibility. */
html[data-cd29-theme=dark] .cd26-article{background:#f8fafc;color:#142033;padding:12px;overflow-wrap:anywhere}
html[data-cd29-theme=dark] .cd26-article a{color:#245eae}
html[data-cd29-theme=dark] .cd26-article .muted{color:#52647a}
@media(max-width:520px){.cd29-ai-button{white-space:normal}.cd29-footer{padding:10px}.cd29-qr img{width:140px;height:140px}.cd29-offline-actions .btn{flex-grow:1}}
@media print{html[data-cd29-theme=dark]{color-scheme:light;--text:#000;--muted:#333;--card:#fff;--line:#bbb;--bg:#fff;--accent:#222}html[data-cd29-theme=dark] :is(body,.card,.tile,.cd26-article){background:#fff!important;color:#000!important}html[data-cd29-theme=dark] .cd26-article a{color:#222!important}.cd29-footer,.cd29-qr,.cd29-offline-actions,.cd29-ai-panel{display:none!important}}
/* Explicit portal chrome overrides for high-specificity V24/V25 rules. */
@media screen {
html[data-cd29-theme=dark] .container .cd24-search input[type=text],html[data-cd29-theme=dark] .container .cd24-search select,html[data-cd29-theme=dark] .container .cd24-search textarea{background:#121c29!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-cd29-theme=dark] .container .cd24-search input::placeholder{color:#aab8ca!important;opacity:1}
html[data-cd29-theme=dark] .container .cd24-search .btn:not(.primary){background:#222f40!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-cd29-theme=dark] .container .cd24-search .btn.primary,html[data-cd29-theme=dark] .header-hero .cd24-navbar .btn[aria-current=page]{background:#315c97!important;color:#fff!important;border-color:#76a9ef!important}
}
