header nav>div{align-items:center;flex-wrap:wrap}.theme-toggle{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;padding:8px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#f1f5f9;color:#26364b;font:inherit;font-size:14px;font-weight:700;cursor:pointer}.theme-toggle:hover{background:#e2e8f0}.theme-toggle #theme-icon{font-size:20px;line-height:1}.theme-toggle:focus-visible{outline:3px solid #2981d0;outline-offset:3px}
/* Daylight: retain the workspace structure, using low-glare light surfaces. */
:root[data-theme=light] .tool-tab.selected{background:#fff;color:#a5273b;border-color:#c7d0db;border-bottom-color:#fff}
:root[data-theme=light] .workspace:has(.document-drop){background:#fff;color:#172238;border-color:#cbd5e1}
:root[data-theme=light] .document-drop{background:#f3f6fa;border-color:#7999ba}
:root[data-theme=light] .document-drop.active{background:#e4effb;border-color:#2365bc}
:root[data-theme=light] .document-drop #empty-drop strong,:root[data-theme=light] .document-drop #empty-drop .drop-icon{color:#245386}
:root[data-theme=light] .document-drop #empty-drop span,:root[data-theme=light] .workspace .note,:root[data-theme=light] .workspace .merge-hint,:root[data-theme=light] .file-summary{color:#475569}
:root[data-theme=light] .workspace .document-queue li{background:#fff;border-color:#cbd5e1}
:root[data-theme=light] .document-preview{background:#e9eef4}
:root[data-theme=light] .document-meta{color:#475569}
:root[data-theme=light] .workspace .document-queue li button{background:#eef3f8;border-color:#c0ccda;color:#24364c}
:root[data-theme=light] .workspace .document-queue li button.remove-file{color:#a72e3b}
:root[data-theme=light] .workspace:has(.document-drop) label:not(.upload-button),:root[data-theme=light] .workspace:has(.document-drop) #status{color:#172238}
:root[data-theme=light] .workspace:has(.document-drop) #run:disabled{background:#dbe3ec;color:#475569;opacity:.8}
/* Dark: all surrounding content uses the same accessible, muted palette. */
:root[data-theme=dark] body{background:#151b23;color:#e5edf6}
:root[data-theme=dark] header{background:#20262e;border-color:#344251}
:root[data-theme=dark] header nav div a,:root[data-theme=dark] .brand{color:#e6edf7}
:root[data-theme=dark] .red{color:#ff8d9a}
:root[data-theme=dark] a{color:#ff9eaa}
:root[data-theme=dark] .theme-toggle{background:#343f4c;border-color:#536579;color:#eef3fa}
:root[data-theme=dark] .theme-toggle:hover{background:#415165}
:root[data-theme=dark] .home-tool-heading p,:root[data-theme=dark] .toolhead p,:root[data-theme=dark] .sectionhead p,:root[data-theme=dark] .card p,:root[data-theme=dark] .home-trust{color:#b7c6d8}
:root[data-theme=dark] .tool-tabs{scrollbar-color:#64809a #20262e}
:root[data-theme=dark] .tool-tab{background:#2c3643;color:#dce6f3;border-color:#445364}
:root[data-theme=dark] .tool-tab.selected{background:#20262e;color:#ffb4a0;border-color:#58697a;border-bottom-color:#20262e}
:root[data-theme=dark] .card,:root[data-theme=dark] .info{background:#202932;border-color:#384758;color:#e5edf6}
:root[data-theme=dark] .card:hover{border-color:#ff9eaa}
:root[data-theme=dark] .action{color:#ff9eaa}
:root[data-theme=dark] .links a{background:#303d4b;color:#ffd0d6}
:root[data-theme=dark] footer{background:#10151c;color:#c3d0df}
:root[data-theme=dark] footer a{color:#e8edf5}
:root[data-theme=dark] .workspace:has(.document-drop) #pages,:root[data-theme=dark] .workspace:has(.document-drop) select{background:#313d4a;color:#edf4fa;border-color:#63788b}
/* Never invert actual document/image thumbnails, even when dark mode is on. */
.document-preview img{filter:none}
@media(max-width:600px){header nav>div{gap:12px;justify-content:space-between;width:100%}.theme-toggle{padding:6px 9px;font-size:13px}}
