/* Palette overrides are keyed to the existing SiteLayout body classes. */
body.site-duanxiaodaili {
  --paper: #0d1416;
  --surface: #152022;
  --cool: #16292a;
  --soft: #101b1c;
  --ink: #e6efee;
  --muted: #8aa09e;
  --line: #243234;
  --strong-line: #5c7673;
  --brand: #35c0ae;
  --brand-dark: #25a394;
  --signal: #e0913c;
  --max: 1280px;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: var(--sans);
  --heading: var(--ink);
  --tag-radius: 4px;
  color-scheme: dark;
}

body.site-getglobalproxy {
  --paper: #f5f6f9;
  --surface: #fff;
  --cool: #e6e4f7;
  --soft: #eeeff6;
  --ink: #14142b;
  --muted: #5c6077;
  --line: #dddfea;
  --strong-line: #1e1f3a;
  --brand: #4a3fcc;
  --brand-dark: #352da0;
  --signal: #0e7a60;
  --max: 1280px;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: var(--sans);
}

body.site-kuajingguancha {
  --paper: #f4f6f8;
  --surface: #fff;
  --cool: #e4ebf2;
  --soft: #edf1f5;
  --ink: #101b2d;
  --muted: #5a6b80;
  --line: #dce3ea;
  --strong-line: #1b2a3f;
  --brand: #1d4e89;
  --brand-dark: #14375f;
  --signal: #a05600;
  --max: 1240px;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --tag-radius: 2px;
  --quote-border: var(--signal);
}

body.site-kuajingzhiku {
  --paper: #f6f4ee;
  --surface: #fff;
  --cool: #dde7df;
  --soft: #edeae1;
  --ink: #1a211c;
  --muted: #61695f;
  --line: #dedad0;
  --strong-line: #2a322b;
  --brand: #2c5f4f;
  --brand-dark: #1e4638;
  --signal: #9c4a2f;
  --max: 1200px;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* Keep navigation and card link behavior; apply reading styles inside content. */
body:is(.site-duanxiaodaili, .site-getglobalproxy, .site-kuajingguancha, .site-kuajingzhiku) {
  -webkit-font-smoothing: antialiased;

  & main :is(h1, h2, h3):not(.guide-shell h1, .guide-shell h2, .guide-shell h3) {
    color: var(--heading, var(--strong-line));
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: 0;
  }

  & :is(.summary, .standfirst, .post-meta, .post-summary, .definition, .crumb-sep) { color: var(--muted); }
  & .body a { color: var(--brand); }
  & .body a:hover { color: var(--brand-dark); text-decoration: underline; }
  & :is(hr, .divider) { border: 0; border-top: 1px solid var(--line); }
  & :is(.tag, .tags-row .pill) {
    background: var(--soft);
    color: var(--brand);
    border: 1px solid var(--line);
    border-radius: var(--tag-radius, 3px);
  }
  & :is(.tag, .tags-row .pill):hover { border-color: var(--brand); }
  & .tag--signal { color: var(--signal); border-color: var(--signal); }
  & .body blockquote {
    border-left: 3px solid var(--quote-border, var(--brand));
    background: var(--cool);
    color: var(--ink);
  }
  & .body table th {
    border-bottom: 2px solid var(--strong-line);
    color: var(--table-heading, var(--heading, var(--strong-line)));
  }
  & .body table td { border-bottom: 1px solid var(--line); }
  & .body table tr:nth-child(even) td { background: var(--soft); }
}

/* The dark palette reverses --ink; keep chrome and filled controls legible. */
body.site-duanxiaodaili {
  --table-heading: var(--brand);

  & :is(.utility, .site-footer, .guide-shell, .promo) { background: var(--soft); color: var(--ink); }
  & :is(.guide-card, .menu-button) { background: var(--surface); color: var(--ink); }
  & :is(.nav a.active, .nav a:hover, .pager a.active, .region-tabs a.active, .alpha a.active, .alpha a:hover) {
    background: var(--brand);
    color: var(--paper);
  }
  & :is(.pill:hover, .tags .tag:hover, .panel .pill:hover) { background: var(--ink); color: var(--paper); }
  & .body :is(code, pre) { background: var(--cool); color: var(--ink); }
  & .body :is(code .kw, .term) { color: var(--brand); }
  & .body .status--warn { color: var(--signal); }
}

body.site-getglobalproxy {
  & :is(.card, .guide-card) { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
  & :is(.card, .guide-card):hover { border-color: var(--brand); }
  & .metric { color: var(--brand); }
  & .metric--good { color: var(--signal); }
}

body.site-kuajingzhiku {
  & .step { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); }
  & .step__no { color: var(--brand); font-family: var(--serif); }
}
