:root[data-color-theme][data-effective-appearance],html[data-color-theme][data-effective-appearance] body{--canvas: var(--theme-canvas);--surface: var(--theme-surface);--surface-raised: var(--theme-raised);--text: var(--theme-text);--muted: var(--theme-muted);--text-muted: var(--theme-muted);--border: var(--theme-border);--berry: var(--theme-accent);--berry-soft: var(--theme-soft);--ink: var(--theme-text);--line: var(--theme-border);--panel: var(--theme-surface);--accent: var(--theme-primary);--accent-strong: color-mix(in srgb, var(--theme-primary) 85%, var(--theme-text));--ui-surface: var(--theme-surface);--ui-surface-elevated: var(--theme-surface);--ui-surface-0: var(--theme-canvas);--ui-surface-1: var(--theme-surface);--ui-surface-2: var(--theme-raised);--ui-surface-muted: var(--theme-raised);--ui-surface-soft: var(--theme-raised);--ui-input-bg: var(--theme-surface);--ui-border: var(--theme-border);--ui-border-subtle: var(--theme-border);--ui-border-soft: var(--theme-border);--ui-border-strong: var(--theme-borderStrong);--ui-text-main: var(--theme-text);--ui-text-primary: var(--theme-text);--ui-text-muted: var(--theme-muted);--ui-text-secondary: var(--theme-muted);--ui-text-subtle: var(--theme-muted);--ui-accent: var(--theme-accent);--ui-accent-main: var(--theme-accent);--ui-accent-contrast: var(--theme-accentContrast);--ui-accent-soft: var(--theme-soft);--ui-accent-soft-border: var(--theme-softBorder);--ui-action-bg: var(--theme-primary);--ui-action-text: var(--theme-primaryText);--ui-focus-ring: var(--theme-focus);--focus-ring: var(--theme-focus);--ui-selection-indicator: var(--theme-selection);--ui-secondary-accent: var(--theme-selection);--ui-secondary-text: color-mix(in srgb, var(--theme-selection) 75%, var(--theme-text));--ui-secondary-soft: color-mix(in srgb, var(--theme-selection) 10%, var(--theme-surface));--ui-secondary-border: color-mix(in srgb, var(--theme-selection) 45%, var(--theme-border));--ui-reader-bg: var(--theme-surface);--ui-reader-chrome: var(--theme-surface);--ui-reader-panel: var(--theme-surface);--ui-reader-canvas: var(--theme-canvas);--ui-reader-surface: var(--theme-surface);--ui-reader-border: var(--theme-border);--ui-reader-accent: var(--theme-accent);--panel-bg: var(--theme-surface);--card-bg: var(--theme-surface);--input-bg: var(--theme-surface);--bg-primary: var(--theme-surface);--hover-bg: var(--theme-raised);--border-color: var(--theme-border);--text-primary: var(--theme-text);--text-secondary: var(--theme-muted);--primary-color: var(--theme-accent);--accent-color: var(--theme-accent);--accent-color-hover: color-mix(in srgb, var(--theme-accent) 85%, var(--theme-text));--ui-primary: var(--theme-accent);--ui-text: var(--theme-text);--ui-accent-primary: var(--theme-accent);--ui-text-on-accent: var(--theme-accentContrast);--ui-surface-selected: var(--theme-soft);--ui-surface-hover: var(--theme-raised);--bg-secondary: var(--theme-raised);--bg-hover: var(--theme-raised);--ui-status-info-bg: var(--theme-soft);--ui-status-info-text: var(--theme-accent);--ui-status-info-border: var(--theme-softBorder);--ui-status-teal-bg: var(--theme-soft);--ui-status-teal-text: var(--theme-accent);--ui-status-teal-border: var(--theme-softBorder);--ui-status-purple-bg: var(--theme-soft);--ui-status-purple-text: var(--theme-accent);--ui-status-purple-border: var(--theme-softBorder);--dw-bg: var(--theme-canvas);--dw-panel: var(--theme-surface);--dw-ink: var(--theme-text);--dw-muted: var(--theme-muted);--dw-line: var(--theme-border);--dw-accent: var(--theme-accent);--dw-focus: var(--theme-focus)}:where(html[data-color-theme]) :where(button:not(:disabled),select:not(:disabled),textarea:not(:disabled),input:not(:disabled):not([type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=hidden],[type=image])){background-color:var(--ui-input-bg);color:var(--ui-text-main)}html[data-color-theme] :is(.btn-primary,.search-box button,.research-agent-send,.research-agent-approve,.research-agent-launcher,.local-button.primary,.document-close-dialog .primary){background:var(--ui-action-bg)!important;color:var(--ui-action-text)!important;border-color:var(--ui-action-bg)}html[data-color-theme] :focus-visible{outline:2px solid var(--ui-focus-ring)!important;outline-offset:3px}html[data-color-theme] :is(.nav-tab.active,.local-sidebar-nav-item.active,.local-sidebar-footer-action.active,.local-settings-nav-item.active){box-shadow:inset 3px 0 0 var(--ui-selection-indicator)}html[data-color-theme] .document-tab.active,html[data-color-theme] .settings-toc a[aria-current=page]{border-left-color:var(--ui-selection-indicator)}html[data-color-theme] .desktop-workspace-rail-link.is-active:before{background:var(--ui-selection-indicator)}.color-theme-choices{border:0;margin:22px 0;padding:0;min-width:0}.color-theme-choices legend{margin-bottom:10px;color:var(--ui-text-muted);font-size:13px;font-weight:700}.color-theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:660px}.color-theme-choice{display:grid;grid-template-columns:18px minmax(0,1fr);gap:9px;padding:12px;border:1px solid var(--ui-border-strong);border-radius:10px;cursor:pointer;min-width:0;background:var(--ui-surface);color:var(--ui-text-main)}.color-theme-choice:hover{background:var(--ui-surface-hover)}.color-theme-choice:has(input:checked){border-color:var(--ui-selection-indicator);box-shadow:inset 0 0 0 1px var(--ui-selection-indicator)}.color-theme-choice input{grid-column:1;grid-row:2;width:16px;height:16px;margin:2px 0 0;align-self:center;accent-color:var(--ui-accent)}.color-theme-preview{grid-column:1 / -1;grid-row:1;position:relative;display:block;height:54px;border:1px solid var(--ui-border-soft);border-radius:6px;background:var(--preview-bg);overflow:hidden}.color-theme-preview i{position:absolute;inset:0 auto 0 0;width:24%;background:var(--preview-panel);border-right:1px solid var(--ui-border-soft)}.color-theme-preview i:after{content:"";position:absolute;top:13px;left:8px;right:8px;height:3px;background:var(--preview-detail)}.color-theme-preview b{position:absolute;top:11px;left:31%;width:50%;height:3px;background:var(--preview-accent);box-shadow:0 8px var(--preview-panel)}.color-theme-preview em{position:absolute;right:10px;bottom:9px;width:30%;height:11px;border-radius:3px;background:var(--preview-accent)}.color-theme-label{grid-column:2;grid-row:2;display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}.color-theme-label strong{font-size:14px;font-weight:700}.color-theme-label small{flex-basis:100%;color:var(--ui-text-muted);font-size:12px;line-height:1.4}.color-theme-label .color-theme-default{flex-basis:auto;border:1px solid var(--ui-border-strong);border-radius:4px;padding:1px 5px;font-size:10px}@media(max-width:520px){.color-theme-grid{grid-template-columns:minmax(0,1fr)}.color-theme-choice{grid-template-columns:18px 72px minmax(0,1fr);align-items:center}.color-theme-choice input{grid-row:1}.color-theme-preview{grid-column:2;grid-row:1;height:48px}.color-theme-label{grid-column:3;grid-row:1}}html[data-color-theme] :is(.btn-save,.btn-read,.btn-upload-pdf,.btn-enrich,.btn-cite,.btn-abstract){background:var(--ui-accent-soft);color:var(--ui-accent-main);border-color:var(--ui-accent-soft-border)}html[data-color-theme] :is(.btn-save,.btn-read,.btn-upload-pdf,.btn-enrich,.btn-cite,.btn-abstract):hover{background:var(--ui-accent-soft-border)}html[data-color-theme] :is(.btn-save.active,.btn-read.active){background:var(--ui-accent-main);color:var(--ui-accent-contrast);border-color:var(--ui-accent-main)}html[data-color-theme] .btn-original:focus-visible{outline-color:var(--ui-focus-ring)}html[data-color-theme] .tier-badge{background:var(--ui-secondary-soft);color:var(--ui-secondary-text);border:1px solid var(--ui-secondary-border)}html[data-color-theme] :is(.btn-success,.upgrade-banner){background:var(--ui-action-bg);color:var(--ui-action-text)}html[data-color-theme] .btn-success:hover{background:color-mix(in srgb,var(--ui-action-bg) 90%,var(--ui-text-main))}html[data-color-theme] .upgrade-banner button{background:var(--ui-surface-1);color:var(--ui-accent-main)}html[data-color-theme] :is(.project-source-badge,.hist-badge-elig.now,.reader-preview-badge,.desk-badge.verified){background:var(--ui-secondary-soft);border-color:var(--ui-secondary-border);color:var(--ui-secondary-text)}html[data-color-theme] ::selection{background:var(--ui-secondary-soft);color:var(--ui-text-main)}html[data-color-theme] .reader-pdf-text-layer::selection,html[data-color-theme] .reader-pdf-text-layer span::selection{color:transparent;background:#0078d747;text-shadow:none}html[data-color-theme] .stat-card.selectable.active{background:var(--ui-accent-soft);border-color:var(--ui-accent-soft-border);color:var(--ui-accent-main)}html[data-effective-appearance=dark] .color-theme-preview{--preview-bg: var(--preview-dark-bg) !important;--preview-panel: var(--preview-dark-panel) !important;--preview-accent: var(--preview-dark-accent) !important;--preview-detail: var(--preview-dark-detail) !important}
