/* ============================================================================
   SSR 页共用的「跟随全站皮肤」基础层（2026-11-06）
   ---------------------------------------------------------------------------
   背景：/pricing、/sprint、/sprint/book 是服务端渲染的独立页，页面里的 nav 与
   site-foot 由 pageShell 内联样式给出，而内联样式只写了浅色。全站皮肤开关存在
   localStorage.kaoyan_home_theme（light / dark / comfort / system），由 theme-boot
   在 <head> 里先落到 <html data-theme>，这里按这个属性把 nav/footer/底色换掉。

   🔴 只在这几个页面加载。别的 SSR 页（博客、真题索引、法务）正文是写死浅色的，
      贸然全局上暗色会把它们弄坏 —— 这也是为什么没有直接把这段塞进 pageShell。
   🔴 变量名统一 site-*，不要跟客户端 styles.css 的 --bg/--text 混用：
      两边同时加载时后者会把前者覆盖成浅色。
   ========================================================================== */

:root {
  --site-bg: #fcfcfb;
  --site-surface: #ffffff;
  --site-soft: #f5f5f4;
  --site-text: #1a1a1a;
  --site-text-2: #424245;
  --site-muted: #717171;
  --site-border: rgba(26, 26, 26, 0.10);
  --site-border-strong: rgba(26, 26, 26, 0.18);
  --site-accent: #17a673;
  --site-accent-soft: rgba(23, 166, 115, 0.10);
  --site-primary: #0f766e;
  --site-primary-strong: #115e59;
  --site-on-primary: #ffffff;
  --site-warn: #b45309;
  --site-radius: 12px;
  --site-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --site-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", Georgia, serif;
  --site-ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --site-bg: #000000;
  --site-surface: #101012;
  --site-soft: #1c1c1e;
  --site-text: #f5f5f7;
  --site-text-2: #d2d2d7;
  --site-muted: #a1a1a6;
  --site-border: rgba(255, 255, 255, 0.15);
  --site-border-strong: rgba(255, 255, 255, 0.26);
  --site-accent: #2ecf9a;
  --site-accent-soft: rgba(46, 207, 154, 0.14);
  --site-primary: #17a08c;
  --site-primary-strong: #1cb49c;
  --site-on-primary: #04120d;
  --site-warn: #f0a05a;
  color-scheme: dark;
}

html[data-theme="comfort"] {
  --site-bg: #f7f4ea;
  --site-surface: #fffdf6;
  --site-soft: #efe9d9;
  --site-text: #25271f;
  --site-text-2: #3d4034;
  --site-muted: #73705f;
  --site-border: rgba(77, 70, 45, 0.16);
  --site-border-strong: rgba(77, 70, 45, 0.28);
  --site-accent: #5f8d62;
  --site-accent-soft: rgba(95, 141, 98, 0.14);
  --site-primary: #5f7f3a;
  --site-primary-strong: #4c682c;
  --site-on-primary: #ffffff;
  --site-warn: #a4592f;
  color-scheme: light;
}

html[data-theme="dark"] body { background: #000; color: #f5f5f7; }
html[data-theme="comfort"] body { background: #f7f4ea; color: #25271f; }

/* ── 全站导航（pageShell 内联样式是浅色写死的，这里补深色/护眼）───────── */
html[data-theme="dark"] .nav {
  background: rgb(6 6 8 / 82%);
  border-bottom-color: rgb(255 255 255 / 15%);
}
html[data-theme="dark"] .nav a { color: #c7c7cc; }
html[data-theme="dark"] .nav-home { color: #f5f5f7 !important; }
html[data-theme="dark"] .nav-home.primary { color: #0b0b0d !important; background: #f5f5f7; }
html[data-theme="dark"] .nav-links a:hover { background: rgb(255 255 255 / 8%); }
html[data-theme="dark"] .brand-copy small { color: #a1a1a6; }
html[data-theme="dark"] .nav-toggle { background: #1c1c1e; border-color: rgb(255 255 255 / 18%); }
html[data-theme="dark"] .nav-toggle-bars > span { background: #f5f5f7; }

html[data-theme="comfort"] .nav {
  background: rgb(250 246 236 / 86%);
  border-bottom-color: rgb(77 70 45 / 14%);
}
html[data-theme="comfort"] .nav a { color: #5a5a4a; }
html[data-theme="comfort"] .nav-home { color: #25271f !important; }
html[data-theme="comfort"] .nav-home.primary { color: #fffdf6 !important; background: #3d4034; }
html[data-theme="comfort"] .nav-links a:hover { background: rgb(77 70 45 / 8%); }
html[data-theme="comfort"] .brand-copy small { color: #73705f; }
html[data-theme="comfort"] .nav-toggle { background: #fffdf6; border-color: rgb(77 70 45 / 18%); }
html[data-theme="comfort"] .nav-toggle-bars > span { background: #25271f; }

/* ── 全站页脚 ───────────────────────────────────────────────────────────── */
html[data-theme="dark"] .site-foot { background: #060608; border-top-color: rgb(255 255 255 / 12%); }
html[data-theme="dark"] .site-foot-brand strong { color: #f5f5f7; }
html[data-theme="dark"] .site-foot-brand p,
html[data-theme="dark"] .site-foot-col a { color: #a1a1a6; }
html[data-theme="dark"] .site-foot-col h2 { color: #f5f5f7; }
html[data-theme="dark"] .site-foot-brand small { color: #7c7c82; }
html[data-theme="dark"] .site-foot-col a:hover { color: #f5f5f7; }

html[data-theme="comfort"] .site-foot { background: #f2ecdc; border-top-color: rgb(77 70 45 / 14%); }
html[data-theme="comfort"] .site-foot-brand strong { color: #25271f; }
html[data-theme="comfort"] .site-foot-brand p,
html[data-theme="comfort"] .site-foot-col a { color: #73705f; }
html[data-theme="comfort"] .site-foot-col h2 { color: #25271f; }
html[data-theme="comfort"] .site-foot-brand small { color: #8b8674; }
html[data-theme="comfort"] .site-foot-col a:hover { color: #25271f; }

/* 无障碍基线：键盘焦点始终可见（页面自己的按钮会覆盖颜色，这里兜底） */
html[data-theme] a:focus-visible,
html[data-theme] button:focus-visible,
html[data-theme] summary:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
