/* ==========================================================================
   base.css · 基础层
   --------------------------------------------------------------------------
   顺序：Reset → 排版 → 行业母题 → 布局栅格
   本文件不含任何「组件」样式，只有元素级与原子级规则。
   ========================================================================== */

/* ==========================================================================
   1. Reset —— 只做必要的归零，不做全面 normalize
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ff-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink-700);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }

a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--navy-800); }

button, input, select, textarea { font: inherit; color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* 键盘焦点统一环：只在键盘导航时出现，鼠标点击不出现 */
:focus-visible { outline: 3px solid rgba(27, 87, 165, .35); outline-offset: 2px; }

/* ==========================================================================
   2. 排版
   --------------------------------------------------------------------------
   命名规则：.t-* = 文字风格（typography），.c-* = 颜色（color）
   原则：颜色与字号解耦，可以自由组合。
   ========================================================================== */

/* --- 标题层级 --- */
.t-display {
  font-family: var(--ff-display);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -.01em;
}
.t-h1 { font-family: var(--ff-display); font-size: var(--fs-h1); line-height: var(--lh-head); font-weight: 700; color: var(--navy-900); }
.t-h2 { font-family: var(--ff-display); font-size: var(--fs-h2); line-height: var(--lh-head); font-weight: 600; color: var(--navy-900); }
.t-h3 { font-size: var(--fs-h3); line-height: var(--lh-head); font-weight: 700; color: var(--navy-900); }
.t-h4 { font-size: var(--fs-h4); line-height: var(--lh-head); font-weight: 700; color: var(--ink-900); }

/* --- 正文层级 --- */
.t-lead { font-size: 17px; line-height: 1.7; color: var(--ink-500); }
.t-sm   { font-size: var(--fs-sm); line-height: 1.7; }
.t-xs   { font-size: var(--fs-xs); line-height: 1.65; }

/* --- 数据字体：编号 / 金额 / 日期 / 单号 一律用它 --- */
.t-mono {
  font-family: var(--ff-mono);
  font-variant-numeric: tabular-nums;  /* 等宽数字，防止倒计时跳动 */
}

/* --- 语义色 --- */
.c-navy  { color: var(--navy-800); }
.c-red   { color: var(--red-600); }
.c-gold  { color: var(--gold-600); }
.c-green { color: var(--green-600); }
.c-muted { color: var(--ink-500); }
.c-ink   { color: var(--ink-900); }

/* ==========================================================================
   3. 行业母题 ·「报关单栏位编号」(Declaration Field Motif)
   --------------------------------------------------------------------------
   这是整套视觉的签名元素，提取自报关单本身的形态语言。
   规则：每个内容区块左上角带一个「— 01」式的等宽栏位号 + 短横线。
   作用：让页面一眼可辨认出「报关行业出具的」，而不是通用考试模板。
   ========================================================================== */

.field-no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-mono);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--navy-600);
  text-transform: uppercase;
}
.field-no::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--navy-600);
  display: block;
}

/* 铅封纹分隔线：细双线，模拟报关单据的铅封压印 */
.seal-rule {
  height: 5px;
  border: 0;
  margin: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

/* ==========================================================================
   4. 布局栅格
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* --- 区块（Section）--- */
.sec        { padding: var(--sp-9) 0; }
.sec--tight { padding: var(--sp-8) 0; }
.sec--canvas { background: var(--canvas); }
.sec--paper  { background: var(--paper); }
.sec--navy   { background: var(--navy-900); color: #DCE6F5; }
.sec--navy .t-h2,
.sec--navy .t-h3 { color: #fff; }

.sec-head { margin-bottom: var(--sp-7); }
.sec-head .t-h2 { margin: var(--sp-3) 0 var(--sp-3); }
.sec-sub { max-width: 62ch; color: var(--ink-500); }
.sec--navy .sec-sub { color: #9FB4D4; }

/* --- Grid --- */
.grid { display: grid; gap: var(--sp-5); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --- Flex 原子 --- */
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.row   { display: flex; align-items: center; gap: var(--sp-3); }
.row--between { justify-content: space-between; }

/* ==========================================================================
   5. 响应式（基础层部分）
   --------------------------------------------------------------------------
   断点策略：1080px（平板横屏）→ 860px（平板竖屏）→ 560px（手机）
   ========================================================================== */

@media (max-width: 1080px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .g-3, .g-2 { grid-template-columns: 1fr; }
  .sec { padding: var(--sp-7) 0; }
}

@media (max-width: 560px) {
  .g-4 { grid-template-columns: 1fr; }
  .wrap { padding: 0 var(--sp-4); }
}

/* ==========================================================================
   6. 动效偏好
   --------------------------------------------------------------------------
   系统开启「减少动态效果」时全站降为瞬时切换（保留状态变化，去掉过程）。
   ========================================================================== */

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