/* Appearance controls. Brand artwork and document/image/color outputs are never inverted. */
.theme-picker{position:relative;flex:none;margin-left:-18px}
/* Reserve the same header footprint before DOMContentLoaded initializes controls. */
.js .theme-picker[hidden]{display:block!important;visibility:hidden;pointer-events:none}
.theme-picker>summary{display:grid;place-items:center;width:42px;height:42px;list-style:none;border:1px solid var(--line);border-radius:8px;cursor:pointer;background:var(--surface);color:var(--ink)}
.theme-picker>summary::-webkit-details-marker{display:none}
.theme-picker>summary:hover{border-color:var(--fern)}
.theme-symbol{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-symbol .theme-moon{display:none}
[data-theme=dark] .theme-symbol .theme-sun{display:none}
[data-theme=dark] .theme-symbol .theme-moon{display:initial}
.theme-panel{position:absolute;right:0;top:calc(100% + 10px);z-index:30;width:210px;max-width:calc(100vw - 32px);padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);color:var(--ink)}
.theme-panel fieldset{padding:0;margin:0;border:0;min-width:0}
.theme-panel legend{font-size:12px;font-weight:650;padding:4px 8px 8px}
.theme-panel label{display:flex;align-items:center;gap:10px;padding:10px 8px;min-height:44px;border-radius:6px;font-size:13px;cursor:pointer}
.theme-panel label:hover{background:var(--paper)}
.theme-panel input{width:17px;height:17px;margin:0;accent-color:var(--fern)}
.theme-hint{font-size:11px;line-height:1.6;color:var(--muted);margin:10px 8px 2px}
@media(max-width:1060px){.theme-picker{margin-left:-12px}}
@media(max-width:760px){.theme-picker{order:3;margin-left:0}.header-inner{column-gap:9px}.theme-picker>summary{width:38px;height:38px}.theme-panel{right:-46px}.nav-toggle{width:38px;height:38px}.section-heading{flex-wrap:wrap}.section-heading>div{min-width:0;max-width:100%}}
@media(max-width:380px){.header-inner{column-gap:6px}.header-inner .brand{font-size:20px}.header-inner .brand-symbol{width:28px;height:28px}.theme-picker>summary,.nav-toggle{width:34px;height:36px}.language-switcher a{min-width:25px;font-size:9px}.theme-panel{right:-40px}:is(:lang(ko),:lang(ja)) .tool-card h3{overflow-wrap:anywhere;word-break:normal;min-width:0;max-width:100%}}
/* Screen-only overrides keep printed pages on their original light palette. */
@media screen {
  :root[data-theme=dark]{color-scheme:dark;--paper:#121713;--surface:#1b231e;--ink:#eff3eb;--muted:#adb9a9;--line:#3c4c40;--fern:#add99d;--sand:#302b24;--shadow:0 18px 55px rgb(0 0 0 / 30%);--raised:#27342b;--control-line:#72836f}
  :root[data-theme=dark] ::selection{background:var(--lime);color:#202821}
  :root[data-theme=dark] :is(.tool-card,.hero-workbench,.sidebar,.info-card,.tool-search,.directory-groups,.tw-drop-symbol,.tw-secondary,.ex-file-list button){background:var(--surface);border-color:var(--line)}
  :root[data-theme=dark] :is(.tool-card:hover,.theme-picker>summary:hover){border-color:var(--fern)}
  :root[data-theme=dark] :is(.tool-card-meta,.workbench-bar,.feature-card,.footer-bottom,.workflow-section,.directory-tool-list li,.wf-results,.wf-table,.wf-table th,.wf-table td){border-color:var(--line)}
  :root[data-theme=dark] :is(.tool-card-bottom,.footer-bottom,.footer-brand .footer-note,.prose,.step-card p,.wf-note,.wf-small){color:var(--muted)}
  :root[data-theme=dark] :is(.language-switcher a:hover,.language-switcher a[aria-current=page],.language-switcher a.active,.category-tabs button:hover,.directory-category[open]>summary,.directory-category>summary:hover,.tw-secondary:hover,.button.secondary:hover){background:var(--raised);color:var(--ink);border-color:var(--line)}
  :root[data-theme=dark] :is(.button.primary,.tw-run,.category-tabs button[aria-pressed=true],.skip-link){background:var(--lime);border-color:var(--lime);color:#202821}
  :root[data-theme=dark] :is(.button.primary:hover,.tw-run:hover){background:#e7ff91;border-color:#e7ff91;color:#202821}
  :root[data-theme=dark] .button.secondary{color:var(--ink);border-color:var(--control-line)}
  :root[data-theme=dark] .button.lime{color:#202821}
  :root[data-theme=dark] .hero-title em::after{background:#3b5130}
  :root[data-theme=dark] .eyebrow::before{box-shadow:0 0 0 4px #26392b}
  :root[data-theme=dark] .preview-image>span{color:#202821}
  :root[data-theme=dark] .floating-file{color:#202821;background:var(--lime);border-color:#c7df6a}
  :root[data-theme=dark] .file-check{background:#202821;color:var(--lime)}
  :root[data-theme=dark] .workbench-dots :is(i,span){background:var(--control-line)}
  :root[data-theme=dark] :is(.demo-slider,#hero-brightness){background:linear-gradient(to right,var(--fern) var(--range-progress,60%),var(--line) var(--range-progress,60%))}
  :root[data-theme=dark] :is(.tool-icon,.feature-icon){background:#293f2d;color:#b8dbaa}
  :root[data-theme=dark] .tool-card[data-category=image] .tool-icon{background:#293f2d;color:#b8dbaa}
  :root[data-theme=dark] .tool-card:is([data-category=pdf],[data-category=convert]) .tool-icon{background:#403727;color:#e1c290}
  :root[data-theme=dark] .tool-card:is([data-category=text],[data-category=qr]) .tool-icon{background:#26394a;color:#b3cceb}
  :root[data-theme=dark] .tool-card[data-category=developer] .tool-icon{background:#3d332b;color:#d7bda5}
  :root[data-theme=dark] .tool-card[data-category=color] .tool-icon{background:#42312e;color:#e2b3aa}
  :root[data-theme=dark] .tool-card[data-category=audio] .tool-icon{background:#3a2d47;color:#d2b9ec}
  :root[data-theme=dark] .tool-card[data-category=web] .tool-icon{background:#263e34;color:#a5dac1}
  :root[data-theme=dark] :is(.workflow-section,.site-footer){background:#18221b;border-color:var(--line)}
  :root[data-theme=dark] .step-number{background:var(--surface);border-color:var(--line)}
  :root[data-theme=dark] .step-card::after{background:var(--line)}
  :root[data-theme=dark] :is(.guide-visual,.guide-visual.tone-lime,.guide-visual.tone-green){background:#293d2a;color:#c6dfa5}
  :root[data-theme=dark] .guide-visual.tone-sand{background:#3b3327;color:#e2c698}
  :root[data-theme=dark] .guide-card:hover .guide-visual{background:#344a31}
  :root[data-theme=dark] .cta-panel{background:#293d23;border-color:#4b6340;color:var(--ink)}
  :root[data-theme=dark] .cta-panel p{color:#c4d5b6}
  :root[data-theme=dark] :is(.status-pill,.notice){background:#243626;color:#c0deb0;border-color:#556d4b}
  :root[data-theme=dark] .status-pill.planned{background:#3a3323;color:#e4c999;border-color:#756241}
  :root[data-theme=dark] .prose a{text-decoration-color:#688660}
  :root[data-theme=dark] .prose :is(code,pre,th){background:var(--raised)}
  :root[data-theme=dark] .prose pre code{background:none}
  :root[data-theme=dark] .prose blockquote{color:#bfceb7}
  :root[data-theme=dark] :is(.contact-form input,.contact-form textarea,.tw-field input:not([type=checkbox]):not([type=range]),.tw-field select,.tool-workspace textarea){background:#141c17;color:var(--ink);border-color:var(--control-line)}
  :root[data-theme=dark] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
  :root[data-theme=dark] :is(.tw-drop,.tw-empty){background:#16211a;border-color:var(--control-line)}
  :root[data-theme=dark] .tw-dragging{background:#2c4226;border-color:var(--fern)}
  :root[data-theme=dark] .tw-result-text{background:#141c17!important}
  :root[data-theme=dark] .tw-file-result{background:#2b3e23;border-color:#526642}
  :root[data-theme=dark] .tw-error{background:#3d2422;color:#ffb7a9!important;border-color:#9f6155}
  :root[data-theme=dark] .contact-errors{background:#3d2422;color:#ffb7a9;border-color:#9f6155}
  :root[data-theme=dark] .wf-table th{background:var(--raised)}
  :root[data-theme=dark] :is(.ex-files,.wf-controls input[type=file])::file-selector-button{background:var(--raised);color:var(--ink);border:1px solid var(--control-line);border-radius:6px;padding:8px}
  :root[data-theme=dark] :is(.wf-editor:focus-visible,.wf-table:focus-visible,.wf-controls button:focus-visible,.wf-results a:focus-visible){outline-color:var(--fern)}
  :root[data-theme=dark] .search-snippet-preview{background:var(--surface);border-color:var(--line)}
  :root[data-theme=dark] .search-snippet-preview :is(.snippet-url,small){color:var(--muted)}
  :root[data-theme=dark] .search-snippet-preview .snippet-title{color:#bac5ff}
}
