/* White: ivory / forest / charcoal. Dark retains the existing brand palette. */
html:not(.dark){--cluster-bg:#18241f;--cluster-surface:#eef3ee;--theme-page:#f8faf7;--theme-panel:#fff;--theme-ink:#18241f;--theme-muted:#5a6860;--theme-line:#dce4dd;--theme-accent:#24594b;--cluster-ink:#24594b;--cluster-paper:#f8faf7;--cluster-body:#18241f;--cluster-muted:#5a6860}
.cluster-theme-toggle{display:grid;place-items:center;flex-shrink:0;width:40px;height:40px;border:1px solid currentColor;border-radius:8px;background:transparent;color:var(--cluster-ink);font-size:23px;cursor:pointer}
.cluster-theme-toggle:focus-visible{outline:3px solid #43816d;outline-offset:3px}
html:not(.dark) body.cluster-site,html:not(.dark) .cluster-site:has(.cluster-home) #main-content{background:var(--theme-page);color:var(--theme-ink)}
html:not(.dark) .cluster-site .cluster-chrome{background:#fff!important;border-bottom:1px solid var(--theme-line)}
html:not(.dark) .cluster-nav a,html:not(.dark) .cluster-connect,html:not(.dark) .cluster-menu{color:var(--theme-ink)}
html:not(.dark) .cluster-brand{color:var(--theme-ink)}
html:not(.dark) .cluster-logo{content:url("/static/images/cluster-vi-light.svg")}
html:not(.dark) .cluster-site .cluster-footer{background:#fff;color:var(--theme-ink);border-top:1px solid var(--theme-line)}
html:not(.dark) .cluster-footer-wordmark{color:var(--theme-ink)}
html:not(.dark) .cluster-footer-note{color:var(--theme-muted)}
html:not(.dark) .cluster-connect nav,html:not(.dark) .cluster-site #main-sidebar.cluster-mobile-nav{background:#fff;color:var(--theme-ink);border:1px solid var(--theme-line)}
html:not(.dark) .cluster-mobile-nav a{color:var(--theme-ink)}
html:not(.dark) .cluster-notice{background:#edf3ee;color:#344f40;border-bottom:1px solid #dce6de}
html:not(.dark) .cluster-home{color:var(--theme-ink)}
html:not(.dark) .cluster-title-tile{background:#e9f1e9;color:var(--theme-ink)}
html:not(.dark) .cluster-board-preview,html:not(.dark) .cluster-board-note,html:not(.dark) .cluster-tool-image{background:#eef3ee;color:var(--theme-ink)}
html:not(.dark) .cluster-board-links{background:#fff;color:var(--theme-ink)}
html:not(.dark) .cluster-live,html:not(.dark) .cluster-faq{background:#eff4ef;color:var(--theme-ink)}
html:not(.dark) .cluster-account>a,html:not(.dark) .cluster-action,html:not(.dark) .tool-button{background:var(--theme-accent);color:#fff;border-radius:7px}
html:not(.dark) .tool-metrics>div{background:#fff;color:var(--theme-ink);border:1px solid var(--theme-line)}
html:not(.dark) .tool-error{background:#fff1f2;color:#9f1239}
html:not(.dark) .humanizer-workspace{--hw-accent:#24594b;--hw-border:#dce4dd;--hw-muted:#5a6860}
html:not(.dark) .hw-tabs button[aria-selected=true],html:not(.dark) .hw-report-link{color:var(--theme-accent);border-color:var(--theme-accent)}
html:not(.dark) .humanizer-workspace .tool-button{background:var(--theme-accent);color:#fff}
html:not(.dark) .humanizer-workspace .tool-panel textarea,html:not(.dark) .humanizer-workspace .tool-panel input{background:#fff;border-color:var(--theme-line)}
html:not(.dark) .humanizer-workspace .hr-word.hr-rewritten{background:#e6f0e7;color:#24513e}
html:not(.dark) .humanizer-workspace .hr-word.hr-signal{background:#ffe0e4;color:#9d172c}
/* Keep the writing workspace usable when switching back to dark. */
html.dark .humanizer-workspace{color:#e2e8f0;--hw-border:#3a4560;--hw-muted:#b4bfd3}
html.dark .cluster-site:has(.humanizer-workspace) #main-content{background:#161e32;color:#e2e8f0}
html.dark .cluster-site .humanizer-workspace h1,html.dark .cluster-site .humanizer-workspace h2{color:#f1f5f9!important}
html.dark .humanizer-workspace :is(.tool-panel,.hw-toolbar,.hw-compare-heading,.hw-engine-result,.tool-metrics>div,.sr-change,.hw-result-note){background:#212b42;color:#e2e8f0;border-color:#3a4560}
html.dark .humanizer-workspace :is(textarea,input,select,.hr-picker){background:#182237;color:#e2e8f0;border-color:#52627b}
html.dark .humanizer-workspace :is(.hr-tools button,.hr-signal-panel button,.sr-controls button){background:#29364f;color:#e2e8f0;border-color:#52627b}
@media(max-width:540px){.cluster-site .cluster-chrome{padding:16px 12px!important}.cluster-brand{font-size:18px;gap:6px}.cluster-logo{width:26px;height:26px}.cluster-theme-toggle{width:34px;height:36px;font-size:21px}.cluster-connect summary{font-size:12px;padding:6px}.cluster-account>a{font-size:12px;padding:10px 8px}.cluster-menu{font-size:12px;padding:8px}.cluster-site .cluster-chrome{gap:6px!important}}

html.dark .cluster-chrome nav{background:transparent!important}
html.dark .humanizer-workspace :is(.tool-help,.hw-heading p,.hw-heading nav,.hw-field label,.tool-panel label,.hw-output-engine,.tool-form-footer,.tool-metrics span){color:#b8c4d8!important}
html.dark .humanizer-workspace .hw-tabs button{color:#b8c4d8}
html.dark .humanizer-workspace .hw-tabs button[aria-selected=true],html.dark .humanizer-workspace .hw-report-link{color:#a5b4fc;border-color:#a5b4fc}
html.dark .humanizer-workspace :is(textarea,input)::placeholder{color:#94a3b8;opacity:1}
html.dark .humanizer-workspace .hr-unchanged{color:#e2e8f0}

html:not(.dark) .tool-page,html:not(.dark) .tool-panel{color:var(--theme-ink)}
html:not(.dark) .humanizer-workspace :is(input,textarea,select){color:var(--theme-ink)}
html:not(.dark) .humanizer-workspace :is(input,textarea,select,button):focus-visible{outline-color:#24594b}
html:not(.dark) .humanizer-workspace .hr-key-rewritten{background:#e6f0e7;color:#24513e}
