/* 设计令牌：颜色、间距、排版、动效时长。整站唯一的一处配色。
   浅色面（白）配色来自数据可视化规范并通过校验器：
   阶段色带 5 槽在 #ffffff 上最相邻对 CVD ΔE 9.2（deutan）、正常视觉 ΔE 27.6；
   aqua/magenta 对比 2.8/2.7 属"需补救"，补救 = 色带上始终直接印阶段名 + 列表视图。
   状态色刻意只用绿/琥珀两档 + 两级消色灰：灰阶对色觉障碍天然安全，
   也不跟阶段色带抢色相通道；每个状态另带图形与文字，色永不是唯一通道。
   JS 与导出长图都从这里取色（app/static/js/paint.js 的 palette()），别再往别处硬写 hex。 */
:root {
  color-scheme: light;

  /* 面 */
  --page: #ffffff;
  --surface: #fcfcfb;
  --surface-2: #f5f5f7;
  --surface-3: #ebebef;
  --hairline: #d2d2d7;
  --axis: #a1a1a6;

  /* 墨 */
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #86868b;

  /* 单一主色 */
  --accent: #2a78d6;
  --accent-dim: #1c5cab;
  --accent-tint: rgba(42, 120, 214, .08);

  /* 状态（色 + 图形 + 文字三重编码） */
  --st-done: #0ca30c;
  --st-active: #fab219;
  --st-planned: #6e6d66;
  --st-shelved: #adaca5;
  /* 琥珀档在白面上只有 1.83:1（规范里 status 色不随主题改，靠 icon+label 兜底），
     所以"色块/描边"用 --st-active，而"琥珀色的字"必须用下面这档压深的 5.27:1。 */
  --st-active-ink: #96601a;
  --st-active-bg: #fdf3dd;

  /* 阶段色带槽位 */
  --band-1: #2a78d6;
  --band-2: #eb6834;
  --band-3: #1baf7a;
  --band-4: #4a3aa7;
  --band-5: #e87ba4;

  /* 后台反馈色（白底上读得清的深档） */
  --ok-ink: #0f7a0f;
  --ok-bg: #eaf6ea;
  --bad-ink: #b3261e;
  --bad-bg: #fbeceb;

  /* 间距 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* 圆角 */
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 12px;
  --r-4: 18px;

  /* 排版 */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --fs-hero: clamp(24px, 3.2vw, 34px);
  --fs-h2: clamp(17px, 2.2vw, 22px);
  --fs-body: 15px;
  --fs-small: 13px;
  --fs-tick: 11px;

  /* 动效 */
  --t-fast: 120ms;
  --t-med: 240ms;
  --t-slow: 520ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .05);
  --ring: 0 0 0 3px var(--accent-tint), 0 0 0 2px var(--accent);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; letter-spacing: -.014em; }
p { margin: 0 0 var(--sp-3); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-1); }

table { border-collapse: collapse; width: 100%; }
caption { text-align: left; color: var(--ink-3); font-size: var(--fs-small); padding-bottom: var(--sp-2); }

.muted { color: var(--ink-3); }
.small { font-size: var(--fs-small); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
