/*
 * 模块价值：沿用 FDE 绿色和系统字体，为三核心页提供深浅主题与可辨认的操作状态。
 * 职责：拥有文字、表面、装饰分隔、控件边界、焦点和紧凑间距令牌及基础控件。
 * 输入：根节点 data-theme、语义控件与状态类；输出：主题颜色、可读字号和键盘焦点。
 * 依赖：浏览器标准 CSS；无网络、存储或业务副作用。
 * 限制：颜色配对可计算验证；完整无障碍仍需真实浏览器、键盘和辅助技术验收。
 */
:root {
  --ink: #233831;
  --muted: #536c61;
  --accent: #176a50;
  --accent-hover: #10513d;
  --soft: #e5f1eb;
  --paper: #f5f8f6;
  --surface: #fff;
  --line: #d8e3dd;
  /* 装饰分隔不承担识别输入的职责；控件边界在表面和页面底色上均达到 3:1。 */
  --control-line: #70877b;
  --canvas: #f0f5f1;
  --dot: #c4d5cb;
  --warning: #865912;
  --warning-soft: #fff5df;
  --danger: #a13d33;
  --danger-soft: #fff0ee;
  --focus: #176a50;
  --on-accent: #fff;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --page-gutter: 24px;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  font-size: 15px;
  color: var(--ink);
  color-scheme: light;
}
:root[data-theme=dark] {
  --ink: #e5eee9;
  --muted: #a6bcb0;
  --accent: #52d2ab;
  --accent-hover: #71e1bd;
  --soft: #203f33;
  --paper: #111c17;
  --surface: #18271f;
  --line: #355042;
  --control-line: #719681;
  --canvas: #111e17;
  --dot: #344b3e;
  --warning: #efc77f;
  --warning-soft: #382e1d;
  --danger: #f09c92;
  --danger-soft: #3c2523;
  --focus: #71e1bd;
  --on-accent: #0c241a;
  color-scheme: dark;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--control-line) transparent; }
body { margin: 0; background: var(--paper); }
button,input,textarea,select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--accent); text-underline-offset: 4px; }
/* summary 和可聚焦容器也使用同一焦点契约；环宽 3px，避免只靠颜色提示操作位置。 */
:where(button,a,input,textarea,select,summary,audio,[tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
::selection { background: var(--soft); color: var(--ink); }
input,textarea { caret-color: var(--accent); }
h1,h2,h3,p { margin: 0; }
h1 { font-size: 1.65rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.4; }
h2 { font-size: 1.45rem; font-weight: 650; line-height: 1.5; }
h3 { font-size: 1rem; font-weight: 600; line-height: 1.5; }
p { line-height: 1.8; }
small { color: var(--muted); font-size: .8rem; line-height: 1.7; }
svg.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.button,.quiet-button {
  min-height: 44px; min-width: 44px;
  border: 1px solid var(--control-line); border-radius: 8px;
  padding: 8px 12px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; background: var(--surface); color: var(--ink); text-decoration: none;
  font-weight: 550; font-size: .87rem; line-height: 1.5;
  white-space: normal; overflow-wrap: anywhere;
}
.button:hover,.quiet-button:hover { background: var(--soft); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-hover); }
.quiet-button { background: transparent; border-color: transparent; color: var(--muted); padding: 8px 10px; font-weight: 500; }
.button.text { background: transparent; border-color: transparent; color: var(--accent); }
.button.small { padding: 6px 10px; font-size: .8rem; }
.muted { color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--warning); background: var(--warning-soft); border-radius: 6px; padding: 5px 8px; line-height: 1.4; }
.status-pill.verified { color: var(--accent); background: var(--soft); }
.status-pill.negative,.status-pill.conflict { color: var(--danger); background: var(--danger-soft); }
textarea,input,select { background: var(--surface); border: 1px solid var(--control-line); border-radius: 8px; padding: 10px 12px; min-width: 0; max-width: 100%; }
input:not([type=radio]):not([type=checkbox]),select { min-height: 44px; }
input[type=radio],input[type=checkbox] { accent-color: var(--accent); }
textarea { resize: vertical; line-height: 1.85; }
textarea::placeholder,input::placeholder { color: var(--muted); opacity: 1; }
[hidden] { display: none!important; }
@media (max-width:720px) { :root { --page-gutter: 16px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition: none!important; scroll-behavior: auto!important; } }
