/* Four personal palettes. Homepage composition lives in home-personalities*.css.
   The existing shared adapters consume these tokens on articles and tools. */
html[data-site-theme="press"] {
  --theme-bg:#f4f1e9; --theme-surface:#faf8f2; --theme-surface-alt:#eae5da;
  --theme-text:#26231f; --theme-muted:#625b52; --theme-border:#cbc3b5;
  --theme-accent:#a9362a; --theme-accent-hover:#7e241b; --theme-on-accent:#ffffff;
  --theme-soft:#f0dfd8; --theme-radius:0px; --theme-radius-small:0px;
  --theme-shadow:none; --theme-hero-bg:#26231f; --theme-hero-text:#faf8f2;
  --theme-hero-muted:#d6cfc2; --theme-color-scheme:light;
  --theme-font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --theme-display-font:"Songti SC","Noto Serif CJK SC","SimSun",Georgia,serif;
}
html[data-site-theme="index"] {
  --theme-bg:#f7f7f4; --theme-surface:#ffffff; --theme-surface-alt:#eeeee9;
  --theme-text:#24282c; --theme-muted:#626963; --theme-border:#d2d6cf;
  --theme-accent:#a64b25; --theme-accent-hover:#7d3519; --theme-on-accent:#ffffff;
  --theme-soft:#ecede7; --theme-radius:2px; --theme-radius-small:2px;
  --theme-shadow:none; --theme-hero-bg:#24282c; --theme-hero-text:#f7f7f4;
  --theme-hero-muted:#c9cbc7; --theme-color-scheme:light;
  --theme-font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --theme-display-font:var(--theme-font);
}
html[data-site-theme="notebook"] {
  --theme-bg:#f5f0e5; --theme-surface:#faf6ed; --theme-surface-alt:#ebe4d6;
  --theme-text:#3d352d; --theme-muted:#6b6054; --theme-border:#d0c5b4;
  --theme-accent:#666b4f; --theme-accent-hover:#494f35; --theme-on-accent:#ffffff;
  --theme-soft:#e8eadd; --theme-radius:2px; --theme-radius-small:2px;
  --theme-shadow:none; --theme-hero-bg:#4d5140; --theme-hero-text:#faf6ed;
  --theme-hero-muted:#dddccf; --theme-color-scheme:light;
  --theme-font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --theme-display-font:"Songti SC","Noto Serif CJK SC","SimSun",Georgia,serif;
}
html[data-site-theme="afterdark"] {
  --theme-bg:#1b1d21; --theme-surface:#24272b; --theme-surface-alt:#2a2e32;
  --theme-text:#e8e3d8; --theme-muted:#bbb8ae; --theme-border:#4b4d4b;
  --theme-accent:#e09570; --theme-accent-hover:#edaa87; --theme-on-accent:#211e1a;
  --theme-soft:#34332f; --theme-radius:3px; --theme-radius-small:3px;
  --theme-shadow:none; --theme-hero-bg:#282d2b; --theme-hero-text:#e8e3d8;
  --theme-hero-muted:#bdc5b9; --theme-color-scheme:dark;
  --theme-font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --theme-display-font:var(--theme-font);
}

/* The switcher remains usable while its samples suggest each composition. */
html:is([data-site-theme="press"],[data-site-theme="index"],[data-site-theme="notebook"],[data-site-theme="afterdark"]) :is(.site-theme-toggle,.site-theme-close,.site-theme-choice,.site-theme-reset) {
  border-radius:var(--theme-radius-small); box-shadow:none;
}
html:is([data-site-theme="press"],[data-site-theme="index"],[data-site-theme="notebook"],[data-site-theme="afterdark"]) .site-theme-dialog { border-radius:4px; }
.site-theme-swatch[data-theme="press"] { background:#f4f1e9; border-radius:0; align-items:flex-start; gap:6px; border-top:3px double #26231f; }
.site-theme-swatch[data-theme="press"] i { border-radius:0; border:0; background:#cbc3b5; height:27px; width:26%; }
.site-theme-swatch[data-theme="press"] i:first-child { background:#a9362a; width:37%; }
.site-theme-swatch[data-theme="press"] i:last-child { border-left:1px solid #26231f; background:transparent; }
.site-theme-swatch[data-theme="index"] { background:#f7f7f4; border-radius:0; align-items:center; }
.site-theme-swatch[data-theme="index"] i { border-radius:0; border:0; height:3px; width:28%; background:#626963; }
.site-theme-swatch[data-theme="index"] i:first-child { width:22px; height:34px; background:#a64b25; }
.site-theme-swatch[data-theme="notebook"] { background:#f5f0e5; border-radius:0; align-items:center; justify-content:center; gap:7px; }
.site-theme-swatch[data-theme="notebook"] i { border-radius:0; border:0; width:7px; height:29px; background:#d0c5b4; }
.site-theme-swatch[data-theme="notebook"] i:nth-child(2) { width:54px; height:3px; background:#666b4f; }
.site-theme-swatch[data-theme="notebook"] i:last-child { width:15px; background:transparent; border-left:1px solid #d0c5b4; }
.site-theme-swatch[data-theme="afterdark"] { background:#1b1d21; border-radius:2px; align-items:center; gap:6px; }
.site-theme-swatch[data-theme="afterdark"] i { border-radius:0; border:0; height:29px; width:24%; background:#4b4d4b; }
.site-theme-swatch[data-theme="afterdark"] i:first-child { width:46%; background:#e09570; }
.site-theme-swatch[data-theme="afterdark"] i:last-child { background:#a0b3a3; height:15px; }

/* Dark semantic colors: chart meaning, chess sides and physical card faces stay
   distinct. These small exceptions extend the existing midnight adaptations. */
html[data-site-theme="afterdark"] body:not(.home-refresh) .highlight { background:var(--theme-surface-alt); color:var(--theme-text); }
html[data-site-theme="afterdark"] .highlight :is(.c,.c1,.cm,.cp,.cs,.ch,.sd) { color:#acb1ad; }
html[data-site-theme="afterdark"] .highlight :is(.k,.kc,.kd,.kn,.kp,.kr,.kt,.o,.ow) { color:#e6ac91; }
html[data-site-theme="afterdark"] .highlight :is(.s,.s1,.s2,.sb,.sc,.sh,.si,.sr,.ss,.sx) { color:#b4d0b3; }
html[data-site-theme="afterdark"] .highlight :is(.m,.mb,.mf,.mh,.mi,.mo,.il,.nv,.vc,.vg,.vi) { color:#e8c28c; }
html[data-site-theme="afterdark"] .highlight :is(.na,.nb,.nc,.nf,.nn,.nt,.nx) { color:#b5c8d7; }
html[data-site-theme="afterdark"] .highlight :is(.err,.gd) { background:#492c32; color:#ffd0d4; }
html[data-site-theme="afterdark"] .highlight .gi { background:#263d30; color:#c3e3bc; }
html[data-site-theme="afterdark"] body.xiangqi-app :is(.move-record .record-piece,.is-check .game-status strong) { color:#ff9a96; }
html[data-site-theme="afterdark"] body.xiangqi-app .move-record.black .record-piece { color:var(--theme-text); }
html[data-site-theme="afterdark"] body.card-memory-app .answers .answer-right { background:#203c32; border-color:#77b79b; }
html[data-site-theme="afterdark"] body.card-memory-app .answers .answer-wrong { background:#422e32; border-color:#d48784; }
html[data-site-theme="afterdark"] body.card-memory-app :is(td.good,#saveStatus:not(.error)) { color:#9bd4ae; }
html[data-site-theme="afterdark"] body.card-memory-app :is(td.bad,#saveStatus.error) { color:#f2a095; }
html[data-site-theme="afterdark"] body.options-lab-app { --red:#ff8793; --red-soft:#422b38; --green:#6bd4b0; --green-soft:#1c3837; }
html[data-site-theme="afterdark"] body.options-lab-app :is(.warning,.noscript-message,.status-message.warning,.ledger-report-status.warning) { background:#3c3424; color:#f2cc81!important; border-color:#78633c; }
html[data-site-theme="afterdark"] body.options-lab-app :is(.error,.status-message.error,.ledger-report-status.error,#operationStatus.error,#calculationStatus.error,#timelineStatus.error) { background:#422b38; color:#ff9ba7!important; border-color:#80505f; }
html[data-site-theme="afterdark"] body.options-lab-app :is(.success,.status-message.success,.ledger-report-status.success,#operationStatus.success,#calculationStatus.success,#timelineStatus.success) { background:#1c3837; color:#8edabb!important; border-color:#417c69; }
html[data-site-theme="afterdark"] :is(body.codebreaker-app,body.eat-today-app) :is(.notice,.hint-box,.caution,.account-access-warning,.daily-protein.unknown,.meal-nutrient.low,.meal-nutrient.high,.meal-nutrient.unknown,.noscript) { background:#3c3424; color:#f2cc81; border-color:#78633c; }
html[data-site-theme="afterdark"] body.eat-today-app :is(#editLegacyModes,.selected-prep-check) { background:#3c3424; color:#f2cc81; }
html[data-site-theme="afterdark"] :is(body.codebreaker-app,body.eat-today-app) :is(.error,.cloud-message.error,.toast.error) { background:#422b38; color:#ff9ba7; border-color:#80505f; }
html[data-site-theme="afterdark"] :is(body.codebreaker-app,body.eat-today-app) :is(.danger,.form-error,.required) { color:#ff9ba7!important; }
html[data-site-theme="afterdark"] #g24 :is(.g24-feedback[data-kind=error],.g24-nojs) { background:#3c3424; color:#f2cc81; border-color:#78633c; }
html[data-site-theme="afterdark"] #poker .pkr-notice { background:#3c3424; color:#f2cc81; }
html[data-site-theme="afterdark"] #poker :is(.pkr-slot:not(.is-filled),.pkr-outcome-bar) { background:var(--theme-surface-alt); }
html[data-site-theme="afterdark"] #poker progress::-webkit-progress-bar { background:var(--theme-surface-alt); }
html[data-site-theme="afterdark"] #poker :is(.is-positive,.pkr-positive) { color:#8edabb; }
html[data-site-theme="afterdark"] #poker :is(.is-negative,.pkr-negative) { color:#ff9ba7; }
html[data-site-theme="afterdark"] #poker .pkr-suit-tabs .pkr-suit-tab[aria-pressed=true] { background:#ffffff; }
