/* ExecWing appearance: light / dark / system. 12 Nov 2026.
   Variables on [data-theme-resolved=dark] also live in site.css so the first paint is correct. */
.themesw{position:relative;margin-inline-start:8px;flex:none}
.themesw-btn{display:inline-flex;align-items:center;gap:6px;height:40px;min-height:44px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:var(--white,#fff);color:var(--ink);font:inherit;font-size:.92rem;font-weight:600;cursor:pointer;line-height:1}
.themesw-btn:hover{border-color:var(--teal-d)}
.themesw-btn:focus-visible{outline:3px solid var(--teal-d);outline-offset:2px}
.themesw-btn svg{flex:none}
.themesw-cur{font-size:.85rem}
.themesw-list{position:absolute;top:calc(100% + 6px);right:0;z-index:80;min-width:14rem;margin:0;padding:8px;list-style:none;background:var(--white,#fff);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:var(--sh)}
html[dir=rtl] .themesw-list{right:auto;left:0}
.themesw-title{font-size:.8rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:var(--muted);padding:6px 10px 8px}
.themesw-list [data-theme-set]{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:2px;padding:10px 12px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;font-weight:600;text-align:start;cursor:pointer;min-height:44px}
.themesw-list [data-theme-set]:hover,.themesw-list [data-theme-set]:focus-visible{background:var(--bg-2)}
.themesw-list [data-theme-set]:focus-visible{outline:3px solid var(--teal-d);outline-offset:0}
.themesw-list [data-theme-set].is-on{box-shadow:inset 3px 0 0 var(--teal-d);background:var(--bg-2)}
.themesw-hint{font-size:.8rem;font-weight:500;color:var(--muted)}
.themesw-mobile{display:none;padding:8px 4px 16px}
@media (max-width: 880px){
  .hdr .themesw-desk{display:none}
  .themesw-mobile{display:block}
  .themesw-mobile .themesw-list{position:static;box-shadow:none;border:0;padding:0;min-width:0}
  .themesw-mobile .themesw-btn{width:100%;justify-content:flex-start}
}

/* ---- Dark theme surface ---- */
html[data-theme-resolved="dark"]{color-scheme:dark;background:#10161A}
html[data-theme-resolved="dark"] body{background:var(--bg,#10161A)!important;color:var(--ink,#E8EEF2)!important}
html[data-theme-resolved="dark"] a{color:var(--teal-d,#7FDDD6)}
html[data-theme-resolved="dark"] a:hover{color:#A8EBE6}
html[data-theme-resolved="dark"] header.site{background:rgba(16,22,26,.96);border-bottom-color:var(--line)}
html[data-theme-resolved="dark"] .menu a,
html[data-theme-resolved="dark"] .menu>li>a,
html[data-theme-resolved="dark"] .menu>li>button{color:var(--ink)}
html[data-theme-resolved="dark"] .mega,
html[data-theme-resolved="dark"] .mega-rest,
html[data-theme-resolved="dark"] .langsw-list{background:var(--bg-2,#1A2329);color:var(--ink);border-color:var(--line)}
html[data-theme-resolved="dark"] .mega a:hover,
html[data-theme-resolved="dark"] .opt:hover{background:#222C33}
html[data-theme-resolved="dark"] .card,
html[data-theme-resolved="dark"] .q,
html[data-theme-resolved="dark"] .note,
html[data-theme-resolved="dark"] .tbl,
html[data-theme-resolved="dark"] table,
html[data-theme-resolved="dark"] .faq details,
html[data-theme-resolved="dark"] .hsearch input,
html[data-theme-resolved="dark"] input,
html[data-theme-resolved="dark"] select,
html[data-theme-resolved="dark"] textarea,
html[data-theme-resolved="dark"] .btn.sec,
html[data-theme-resolved="dark"] .btn.ghost,
html[data-theme-resolved="dark"] .themesw-btn,
html[data-theme-resolved="dark"] .themesw-list{background:var(--bg-2,#1A2329);color:var(--ink);border-color:var(--line)}
html[data-theme-resolved="dark"] .hsearch input{color:var(--ink)}
html[data-theme-resolved="dark"] .hsearch input::placeholder{color:var(--muted)}
html[data-theme-resolved="dark"] .btn{color:#10161A}
html[data-theme-resolved="dark"] .btn.sec,.btn.ghost{color:var(--ink)}
html[data-theme-resolved="dark"] .page-hero,
html[data-theme-resolved="dark"] .bg{background:var(--bg,#10161A)}
html[data-theme-resolved="dark"] .bg-2,
html[data-theme-resolved="dark"] section.bg{background:var(--bg-2,#1A2329)}
html[data-theme-resolved="dark"] h1,html[data-theme-resolved="dark"] h2,html[data-theme-resolved="dark"] h3,
html[data-theme-resolved="dark"] h4,html[data-theme-resolved="dark"] h5,html[data-theme-resolved="dark"] .lead{color:var(--ink)}
html[data-theme-resolved="dark"] .muted,html[data-theme-resolved="dark"] .small.muted,html[data-theme-resolved="dark"] .eyebrow{color:var(--muted,#A8B2BA)}
html[data-theme-resolved="dark"] hr,html[data-theme-resolved="dark"] .line{border-color:var(--line)}
html[data-theme-resolved="dark"] thead th,html[data-theme-resolved="dark"] th{background:#1E282F;color:var(--ink)}
html[data-theme-resolved="dark"] tbody tr:nth-child(even){background:#161E24}
html[data-theme-resolved="dark"] tbody td{border-color:var(--line)}
html[data-theme-resolved="dark"] .skip:focus{background:var(--teal-d);color:#10161A}
html[data-theme-resolved="dark"] #hs-list,html[data-theme-resolved="dark"] #hs-list .hs-g,
html[data-theme-resolved="dark"] [role=listbox]{background:var(--bg-2);color:var(--ink);border-color:var(--line)}
html[data-theme-resolved="dark"] .burger{color:var(--ink);border-color:var(--line);background:transparent}
html[data-theme-resolved="dark"] .menu{background:var(--bg,#10161A)}
html[data-theme-resolved="dark"] .calc-out>div,html[data-theme-resolved="dark"] .slogan{background:var(--bg-2);border-color:var(--line);color:var(--ink)}
html[data-theme-resolved="dark"] .opt:has(input:checked),
html[data-theme-resolved="dark"] .btn[aria-pressed=true]{background:#163532;color:#7FDDD6;border-color:#7FDDD6}
html[data-theme-resolved="dark"] .calc-out .hl{background:#163532;border-color:#3E8E88}
/* Footer is already dark; lighten a touch so it stays distinct */
html[data-theme-resolved="dark"] footer.site{background:#0C1013;color:#A8B2BA;border-top:1px solid var(--line)}
html[data-theme-resolved="dark"] footer.site a{color:#D5DCE1}
html[data-theme-resolved="dark"] .dark{background:#0C1013;color:#D5DCE1}
/* Chat, search, forms */
html[data-theme-resolved="dark"] .ewc-panel,html[data-theme-resolved="dark"] .ewc-btn,
html[data-theme-resolved="dark"] .ews-list,html[data-theme-resolved="dark"] .ews-filters,
html[data-theme-resolved="dark"] dialog,html[data-theme-resolved="dark"] .modal,
html[data-theme-resolved="dark"] .palette,html[data-theme-resolved="dark"] #ewk-l{background:var(--bg-2)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-theme-resolved="dark"] .ewc-panel input,html[data-theme-resolved="dark"] .ewc-msg{background:#10161A;color:var(--ink);border-color:var(--line)}
/* Admin / portal cards */
html[data-theme-resolved="dark"] .wrap.narrow,html[data-theme-resolved="dark"] .filter a,
html[data-theme-resolved="dark"] nav.filter a{color:var(--ink)}
html[data-theme-resolved="dark"] nav.filter a[aria-current],html[data-theme-resolved="dark"] nav.filter a:hover{background:#163532;color:#7FDDD6}
html[data-theme-resolved="dark"] #admin5,html[data-theme-resolved="dark"] #admin4,html[data-theme-resolved="dark"] #adminx,
html[data-theme-resolved="dark"] #ipayroll,html[data-theme-resolved="dark"] .pp-card,html[data-theme-resolved="dark"] .an-card,
html[data-theme-resolved="dark"] .an-note,html[data-theme-resolved="dark"] .an-toolbar,
html[data-theme-resolved="dark"] .an-alert,html[data-theme-resolved="dark"] .an-empty,
html[data-theme-resolved="dark"] .an-err,html[data-theme-resolved="dark"] .an-shell{background:transparent;color:var(--ink)}
html[data-theme-resolved="dark"] .an-card,html[data-theme-resolved="dark"] .an-note{background:var(--bg-2);border:1px solid var(--line);border-radius:14px}
html[data-theme-resolved="dark"] .an-chart .line{stroke:#7FDDD6}
html[data-theme-resolved="dark"] .an-chart .bar{fill:#6BA8E0}
html[data-theme-resolved="dark"] .an-chart .bar-cmp{fill:#7FDDD6}
html[data-theme-resolved="dark"] .an-chart .grid{stroke:#2C3740}
html[data-theme-resolved="dark"] .an-chart text{fill:#A8B2BA}
html[data-theme-resolved="dark"] .an-funnel .bar{background:#145A96;color:#fff}
html[data-theme-resolved="dark"] .an-table,html[data-theme-resolved="dark"] .an-heat{background:var(--bg-2);color:var(--ink)}
html[data-theme-resolved="dark"] .an-kpi b,html[data-theme-resolved="dark"] .an-kpi{color:var(--ink)}
html[data-theme-resolved="dark"] .an-help{color:var(--muted)}
html[data-theme-resolved="dark"] .an-alert.up{background:#163532;border-color:#3E8E88}
html[data-theme-resolved="dark"] .an-alert.down{background:#3A1C1C;border-color:#C97A74;color:#F5D0CE}
/* Apps / wizards */
html[data-theme-resolved="dark"] .ewz-form,html[data-theme-resolved="dark"] .ewz-card,
html[data-theme-resolved="dark"] #view,html[data-theme-resolved="dark"] .ewapp,
html[data-theme-resolved="dark"] .app-shell{background:var(--bg);color:var(--ink)}
html[data-theme-resolved="dark"] .ewz-chip,html[data-theme-resolved="dark"] .ewz-bar{border-color:var(--line);color:var(--ink)}
html[data-theme-resolved="dark"] .ewz-errsum{background:#3A1C1C;color:#F5D0CE}
html[data-theme-resolved="dark"] .ewz-done{background:#163532;color:#A8EBE6}
/* Code / pre */
html[data-theme-resolved="dark"] code,html[data-theme-resolved="dark"] pre{background:#0C1013;color:#E8EEF2;border-color:var(--line)}
/* Images: keep logos visible */
html[data-theme-resolved="dark"] header.site .brand img,
html[data-theme-resolved="dark"] footer.site .flogo img{filter:saturate(1.05) brightness(1.12)}
/* Focus visible everywhere in dark */
html[data-theme-resolved="dark"] :focus-visible{outline-color:#7FDDD6}

.themesw-list ul{list-style:none;margin:0;padding:0}
.themesw-list [data-theme-set]{box-sizing:border-box}

/* Hardcoded light surfaces that must flip in dark (AA). */
html[data-theme-resolved="dark"] .pill-row li{background:var(--bg-2,#1A2329);color:var(--ink,#E8EEF2);border-color:var(--line,#2C3740)}
html[data-theme-resolved="dark"] .price,
html[data-theme-resolved="dark"] .price small{color:var(--ink,#E8EEF2)}
html[data-theme-resolved="dark"] .langsw>summary,
html[data-theme-resolved="dark"] .langsw-list,
html[data-theme-resolved="dark"] .langsw[open]>summary,
html[data-theme-resolved="dark"] .langsw>summary:hover{background:var(--bg-2,#1A2329);color:var(--ink,#E8EEF2);border-color:var(--line,#2C3740)}
html[data-theme-resolved="dark"] .langsw-cur{color:var(--ink,#E8EEF2)}
html[data-theme-resolved="dark"] .langsw-list a{color:var(--ink,#E8EEF2)}
html[data-theme-resolved="dark"] .langsw-list a:hover,
html[data-theme-resolved="dark"] .langsw-list a:focus-visible,
html[data-theme-resolved="dark"] .langsw-list a[aria-current=page]{background:#163532;color:#7FDDD6}
html[data-theme-resolved="dark"] .skip{background:var(--bg-2,#1A2329);color:var(--ink,#E8EEF2)}
html[data-theme-resolved="dark"] .skip:focus{background:#7FDDD6;color:#10161A}
html[data-theme-resolved="dark"] .i18n-note{background:var(--bg-2,#1A2329);color:var(--ink,#E8EEF2);border-color:var(--line)}
html[data-theme-resolved="dark"] .tier.card .price,
html[data-theme-resolved="dark"] [class*=price]{color:var(--ink,#E8EEF2)}
html[data-theme-resolved="dark"] .an-kicker{color:var(--muted,#A8B2BA)}
html[data-theme-resolved="dark"] header.site .langsw,
html[data-theme-resolved="dark"] header.site .themesw-btn{color:var(--ink,#E8EEF2)}

html[data-theme-resolved="dark"] .ewx-bar,
html[data-theme-resolved="dark"] .ewx-bar label,
html[data-theme-resolved="dark"] .ewx-bar .muted,
html[data-theme-resolved="dark"] .ewx-count,
html[data-theme-resolved="dark"] .ewx-count.muted{
  color:#C5CDD3;
}
html[data-theme-resolved="dark"] .ewx-bar{
  background:#1A2329;
  border:1px solid #2C3740;
  border-radius:8px;
  padding:6px 10px;
}
html[data-theme-resolved="dark"] .ewx-bar input,
html[data-theme-resolved="dark"] .ewx-bar select{
  background:#10161A;
  color:#E8EEF2;
  border:1px solid #2C3740;
}

/* Hero and other shorthand backgrounds that still ended in #fff. */
html[data-theme-resolved="dark"] .hero{
  background:radial-gradient(900px 480px at 92% -10%,rgba(95,208,201,.16),transparent 60%),
              radial-gradient(700px 400px at -10% 110%,rgba(107,168,224,.12),transparent 60%),
              #10161A;
  border-bottom-color:var(--line,#2C3740);
}
html[data-theme-resolved="dark"] .bg2{
  background:linear-gradient(180deg,var(--bg,#10161A) 0,var(--bg-2,#1A2329) 100%);
}
html[data-theme-resolved="dark"] .page-hero{
  background:var(--bg,#10161A);
  border-bottom-color:var(--line,#2C3740);
}
html[data-theme-resolved="dark"] ul.stats>li,
html[data-theme-resolved="dark"] .flogo,
html[data-theme-resolved="dark"] .hsearch,
html[data-theme-resolved="dark"] .hsearch kbd,
html[data-theme-resolved="dark"] .hsearch [role=listbox],
html[data-theme-resolved="dark"] .hsearch input,
html[data-theme-resolved="dark"] .ews-filters button,
html[data-theme-resolved="dark"] .ewc-panel,
html[data-theme-resolved="dark"] .ewc-bot,
html[data-theme-resolved="dark"] .ewc-chip{
  background:var(--bg-2,#1A2329);
  color:var(--ink,#E8EEF2);
  border-color:var(--line,#2C3740);
}
html[data-theme-resolved="dark"] header.site{
  background:rgba(16,22,26,.96);
}
