/* ===== 字体：Archivo 只负责拉丁字母与数字，中文回落到系统字体 ===== */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212;
}

/* ===== 设计令牌 ===== */
:root {
  --brand: #004592;          /* 取自中瑞天成标识 */
  --brand-hover: #003a7c;
  --brand-press: #00316a;
  --brand-deep: #032c5e;
  --brand-tint: #f0f5fc;
  --brand-tint-2: #dfe9f8;
  --brand-line: #c9d8ee;
  --on-brand: #dfe9f8;       /* 品牌蓝上的正文 */
  --on-brand-2: #bcd0ee;     /* 品牌蓝上的次要文字 */
  --hl: #ffe45e;             /* 荧光笔：只用来标出“入表的那一行” */
  --hl-hover: #ffec8a;

  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --line: #e4e8ef;
  --line-2: #d3d9e3;
  --ink: #0e1626;
  --ink-2: #344054;
  --ink-3: #566174;

  --ok: #12704a;  --ok-bg: #e8f5ef;  --ok-line: #b9dfcb;
  --warn: #8a5100; --warn-bg: #fff5e1; --warn-line: #f1d595;
  --err: #b42318; --err-bg: #fdeeec; --err-line: #f5c2bc;

  --font: "Archivo", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
  --gutter: clamp(20px, 4.4vw, 64px);
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --sh-1: 0 1px 2px rgba(14, 22, 38, 0.05);
  --sh-2: 0 10px 28px -10px rgba(14, 22, 38, 0.16);
  --sh-3: 0 30px 80px -24px rgba(3, 20, 52, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms; --t: 240ms; --t-slow: 640ms;
  --z-sticky: 10; --z-nav: 20; --z-popover: 40; --z-toast: 60;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--hl); color: var(--ink); }

.fig { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -48px; z-index: var(--z-toast); background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); transition: top var(--t) var(--ease); }
.skip-link:focus { top: 12px; }

/* 荧光笔标记：从左向右划过 */
.hl {
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat; background-position: 0 85%; background-size: 0% 72%;
  transition: background-size var(--t-slow) var(--ease);
  padding: 0 2px; margin: 0 -2px; border-radius: 2px;
}
.hl.is-on { background-size: 100% 72%; }

/* 标识底座：标识内部透明，深色背景上需要白底 */
.logo-badge { width: 36px; height: 36px; flex: none; display: grid; place-items: center; background: #fff; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(14, 22, 38, 0.06); }
.logo-badge img { width: 24px; height: 24px; }

/* ===== 按钮 ===== */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 16px;
  border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: #bfc7d4; }
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; flex: none; transition: transform var(--t) var(--ease); }
.btn:hover .i-go { transform: translateX(3px); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn--primary:active { background: var(--brand-press); }
.btn--hl { background: var(--hl); border-color: var(--hl); color: var(--ink); }
.btn--hl:hover { background: var(--hl-hover); border-color: var(--hl-hover); }
.btn--line-on-brand { background: transparent; border-color: rgba(255, 255, 255, 0.42); color: #fff; }
.btn--line-on-brand:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn--danger:hover { background: var(--err-bg); border-color: var(--err-line); color: var(--err); }
.btn--lg { --h: 52px; padding: 0 22px; font-size: 15px; }
.btn--sm { --h: 34px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--line); border-color: var(--line); color: #8a93a3; cursor: not-allowed; transform: none; }

/* ===== 标签 ===== */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; }
.chip svg { width: 12px; height: 12px; }
.chip--brand { background: var(--brand-tint); border-color: var(--brand-line); color: var(--brand); }
.chip--ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.chip--warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.dot--live { animation: live 2s var(--ease) infinite; }
@keyframes live { 50% { opacity: 0.35; } }

/* ===== 输入框 ===== */
.field { display: grid; gap: 6px; }
.field__label { font-size: 13px; font-weight: 600; }
.field__error { font-size: 12px; color: var(--err); }
.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.input::placeholder { color: #7b8494; }
.input:hover { border-color: #bfc7d4; }
.input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0, 69, 146, 0.12); }
.input[aria-invalid="true"] { border-color: var(--err); }
input[type="checkbox"] { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; flex: none; }

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