/* 星辰学会 · 设计变量（第一阶段）
   全站外观只由这里和 site.css 决定。施工方不得修改，也不得在组件里另写颜色、字号、间距。 */

:root {
  /* 纸与墨 */
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --surface-2: #F0EEE8;
  --ink: #1D2330;
  --ink-2: #4E5661;
  --ink-3: #5F6670;          /* 辅助文字，只用于 ≥14px；在白底和 --bg 上对比度都 ≥5:1 */
  --line: #E3E0D8;
  --line-strong: #CFCBC0;

  /* 品牌：夜蓝 + 星金 */
  --night: #1E2B4F;          /* 品牌字、主按钮、当前项 */
  --night-hover: #2C3D6B;
  --night-tint: #E9ECF4;
  --star: #B7801A;           /* 只表示"你的进度"和品牌星标；不用于小字 */
  --star-glow: #F6DFA4;
  --focus: #1F6FEB;
  --scrim: rgba(17, 22, 34, .78);

  /* 判题（2026-10-29）：与讲解视频一致，绿 = 对，红只用于错，金 = 答案。
     一律配图标和文字，不只靠颜色；文字色在白底和对应浅底上对比度都 ≥5:1 */
  --ok: #0B6E5F;   --ok-tint: #E8F4F0;   --ok-line: #5FAE9C;
  --bad: #B3261E;  --bad-tint: #FCEDEB;  --bad-line: #E3958D;
  --key: #8A5A00;  --key-tint: #FBF3E2;  --key-line: #D9A94B;

  /* 学科：只用于色点、色带、≥18px 粗体；小字一律用正文色 */
  --s-chinese: #B03A2E;   --s-chinese-tint: #F7EBEA;
  --s-math: #8A5A00;      --s-math-tint: #F3EFE6;
  --s-english: #437E06;   --s-english-tint: #ECF2E6;
  --s-physics: #5B3FB0;   --s-physics-tint: #EFECF7;
  --s-chemistry: #9C2BAE; --s-chemistry-tint: #F5EAF7;
  --s-morality: #2350C2;  --s-morality-tint: #E9EEF9;
  --s-history: #2F6B4F;   --s-history-tint: #EAF0ED;

  /* 字体与字号（最小 14px） */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
          "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --fs-14: 0.875rem;
  --fs-15: 0.9375rem;
  --fs-16: 1rem;
  --fs-17: 1.0625rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-22: 1.375rem;
  --fs-26: 1.625rem;
  --fs-28: 1.75rem;
  --fs-34: 2.125rem;
  --lh-tight: 1.3;
  --lh-title: 1.45;
  --lh-body: 1.75;
  --lh-stem: 1.9;

  /* 间距 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --gutter: 16px;
  --maxw: 1120px;
  --header-h: 56px;

  /* 形状与动效 */
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(29, 35, 48, .06);
  --shadow-2: 0 8px 24px rgba(29, 35, 48, .10);
  --t-fast: 160ms cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; }
}

/* 深色模式（P1）：跟随系统 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161A;
    --surface: #1C1F24;
    --surface-2: #23272D;
    --ink: #E8E6E1;
    --ink-2: #B9B6AF;
    --ink-3: #9A978F;
    --line: #2C3036;
    --line-strong: #3B4048;
    --night: #AFC0EA;
    --night-hover: #C9D5F3;
    --night-tint: #222A3C;
    --star: #E2B65A;
    --star-glow: #5A4A22;
    --scrim: rgba(0, 0, 0, .7);
    --ok: #6FD3BC;  --ok-tint: #17302B;  --ok-line: #2F7F70;
    --bad: #F28B82; --bad-tint: #3A1E1C; --bad-line: #8C3A33;
    --key: #E9B95A; --key-tint: #33291A; --key-line: #8A6A2A;
    --s-chinese: #E07A6E;   --s-chinese-tint: #2D2120;
    --s-math: #E0B050;      --s-math-tint: #2B261B;
    --s-english: #8CC152;   --s-english-tint: #21281B;
    --s-physics: #A08CE8;   --s-physics-tint: #25222F;
    --s-chemistry: #D78AE6; --s-chemistry-tint: #2A202D;
    --s-morality: #7EA2F0;  --s-morality-tint: #1E2433;
    --s-history: #6FB394;   --s-history-tint: #1D2723;
  }
}
