@charset "utf-8";
/* ============================================================
   跨境电商合规库 · 全站样式
   设计原则：单文件、零外部依赖、首屏无阻塞、移动优先
   ============================================================ */

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

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #0d1b2a;
  --ink-2: #31465c;
  --muted: #657a8f;
  --line: #e3e9f0;
  --line-strong: #cfd9e4;
  --brand: #0b4f7a;
  --brand-600: #0e639c;
  --brand-50: #eef6fb;
  --teal: #0f766e;
  --teal-50: #ecfdf7;
  --amber: #b45309;
  --amber-50: #fffbeb;
  --red: #b42318;
  --red-50: #fef3f2;
  --green: #15803d;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, .05);
  --shadow: 0 1px 2px rgba(13, 27, 42, .04), 0 10px 28px -14px rgba(13, 27, 42, .18);
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.35; margin: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.35em; }
li { margin: .35em 0; }
li::marker { color: var(--muted); }
strong { color: var(--ink); font-weight: 650; }
code { font-family: var(--mono); font-size: .9em; background: #eef2f6; padding: .1em .4em; border-radius: 4px; }

.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  min-height: 66px;
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand) 0%, var(--teal) 100%);
  color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .5px;
  box-shadow: 0 4px 10px -4px rgba(11, 79, 122, .5);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: .2px; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .6px; }

.nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto; overflow-x: auto; scrollbar-width: none; min-width: 0;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  white-space: nowrap; color: var(--ink-2);
  font-size: 14px; padding: 8px 11px; border-radius: 8px;
}
.nav a:hover { background: #f1f5f9; color: var(--brand); text-decoration: none; }
.nav a.is-active { color: var(--brand); background: var(--brand-50); font-weight: 600; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 56px;
  background:
    radial-gradient(900px 340px at 12% -10%, #dceefb 0%, rgba(220, 238, 251, 0) 62%),
    radial-gradient(700px 300px at 88% 0%, #d9f2ec 0%, rgba(217, 242, 236, 0) 60%),
    #f7fafc;
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(13, 27, 42, .035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(13, 27, 42, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .5), transparent 78%);
}
.hero > .wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px; font-size: 13px; font-weight: 600;
  color: var(--teal); letter-spacing: .8px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 0 4px rgba(15, 118, 110, .14);
}

.hero h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  letter-spacing: -.5px; font-weight: 750;
  margin-bottom: 18px;
}
.hero__lead {
  max-width: 720px; font-size: 17px; color: var(--ink-2);
  margin-bottom: 30px;
}

.search { position: relative; max-width: 620px; display: flex; gap: 10px; }
.search input {
  flex: 1; min-width: 0;
  height: 52px; min-height: 52px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; font: inherit; font-size: 15px; color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus {
  outline: none; border-color: var(--brand-600);
  box-shadow: 0 0 0 4px rgba(14, 99, 156, .12);
}
.search button {
  height: 52px; padding: 0 24px; border: 0; border-radius: 10px;
  background: var(--brand); color: #fff; font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.search button:hover { background: var(--brand-600); }
.search__panel {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 40px -18px rgba(13, 27, 42, .35);
  overflow: hidden;
}
.search__panel a {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 16px; font-size: 14px; color: var(--ink);
  border-bottom: 1px solid #f1f5f9;
}
.search__panel a:last-child { border-bottom: 0; }
.search__panel a:hover { background: var(--brand-50); text-decoration: none; }
.search__panel span { color: var(--muted); font-size: 12px; flex: none; }
.search__empty { padding: 14px 16px; font-size: 14px; color: var(--muted); }

.stats {
  display: flex; flex-wrap: wrap; gap: 14px 48px;
  margin-top: 34px; padding-top: 26px; border-top: 1px dashed var(--line-strong);
}
.stat { display: flex; align-items: baseline; gap: 8px; }
.stat b { font-size: 26px; font-weight: 700; letter-spacing: -.5px; color: var(--brand); }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- 区块 ---------- */
.section { padding: 56px 0; }
.section--tight { padding: 40px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 26px; flex-wrap: wrap;
}
.section-head h2 { font-size: 24px; letter-spacing: -.3px; }
.section-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.section-head .more { font-size: 14px; color: var(--brand-600); }

/* ---------- 卡片 ---------- */
.cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
}
.card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 22px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--brand);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); text-decoration: none; }
.card--epr::before { background: var(--teal); }
.card--ce::before { background: #6d28d9; }
.card--customs::before { background: var(--amber); }
.card--tools::before { background: #0369a1; }

.card__tag {
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  color: var(--muted); text-transform: uppercase;
}
.card__title { font-size: 17px; font-weight: 650; color: var(--ink); }
.card__value { font-size: 13px; color: var(--ink-2); }
.card__more { margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--brand-600); }

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); max-width: 100%;
}
table.data {
  width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px;
}
table.data caption {
  caption-side: top; text-align: left; padding: 14px 16px 0;
  font-size: 12px; color: var(--muted);
}
table.data th, table.data td {
  padding: 12px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid #eef2f6;
}
table.data th {
  font-size: 12.5px; font-weight: 650; color: var(--ink-2);
  background: #f4f7fa; white-space: nowrap;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #fafcfe; }
table.data td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .muted { color: var(--muted); font-size: 13px; }

/* ---------- 面包屑 ---------- */
.crumb { padding: 18px 0 0; font-size: 13px; color: var(--muted); }
.crumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumb li { margin: 0; display: flex; align-items: center; gap: 6px; }
.crumb li + li::before { content: "/"; color: var(--line-strong); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand-600); }
.crumb [aria-current] { color: var(--ink-2); }

/* ---------- 文章页 ---------- */
.article-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 296px;
  gap: 56px; padding: 30px 0 72px; align-items: start;
}
.article-grid > *,
.prose,
.sidebar,
.factbox > *,
.calc-row > *,
.calc-result > * {
  min-width: 0;
}

.article-grid--full { grid-template-columns: minmax(0, 1fr); }

.article-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.article-head .eyebrow { margin-bottom: 12px; }
.article-head h1 {
  font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.4px; margin-bottom: 14px;
}
.article-head .lead { font-size: 16.5px; color: var(--ink-2); margin-bottom: 18px; }
.meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: 12.5px; color: var(--muted);
}
.meta b { font-weight: 600; color: var(--ink-2); }
.meta .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px; background: var(--teal-50); color: var(--teal);
  font-weight: 600;
}

/* 速览卡 */
.factbox {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  margin: 0 0 32px;
}
.factbox > div { background: #fff; padding: 16px 18px; }
.factbox span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.factbox strong { font-size: 17px; font-weight: 650; letter-spacing: -.2px; }

/* 正文排版 */
.prose { max-width: 760px; }
.prose h2 {
  font-size: 22px; letter-spacing: -.3px;
  margin: 44px 0 14px; padding-top: 6px; scroll-margin-top: 90px;
}
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: 17px; margin: 28px 0 10px; scroll-margin-top: 90px; }
.prose p { color: var(--ink-2); }
.prose table { margin: 18px 0 24px; }
.prose .table-wrap { margin: 18px 0 26px; }

/* 提示框 */
.callout {
  margin: 24px 0; padding: 16px 18px 16px 20px;
  border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0;
  background: var(--brand-50);
}
.callout__t {
  margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .4px;
  color: var(--brand);
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout ul { font-size: 14.5px; }
.callout--warn { border-color: var(--red); background: var(--red-50); }
.callout--warn .callout__t { color: var(--red); }
.callout--tip { border-color: var(--teal); background: var(--teal-50); }
.callout--tip .callout__t { color: var(--teal); }
.callout--note { border-color: var(--amber); background: var(--amber-50); }
.callout--note .callout__t { color: var(--amber); }

/* 步骤 */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 20px 0 26px; }
.steps li {
  position: relative; padding: 0 0 20px 46px; margin: 0;
  border-left: 1px solid var(--line); margin-left: 14px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: -14px; top: -2px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line-strong);
  font-size: 13px; font-weight: 700; color: var(--brand);
}
.steps strong { display: block; margin-bottom: 2px; }
.steps p { margin: 0; font-size: 14.5px; }

/* FAQ */
.faq { margin: 22px 0 8px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 15px 30px 15px 0; position: relative;
  font-weight: 600; font-size: 15px; color: var(--ink); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 18px; font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 16px; font-size: 14.5px; color: var(--ink-2); }

/* 相关链接 */
.related { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.related h2 { font-size: 16px; margin-bottom: 12px; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related li { margin: 0; }
.related a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; color: var(--ink); }
.related a:hover { border-color: var(--line-strong); text-decoration: none; background: #fbfdff; }
.related a span { color: var(--muted); font-size: 12px; }

/* ---------- 侧栏 ---------- */
.sidebar { position: sticky; top: 88px; display: grid; gap: 18px; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.toc__title { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .8px; color: var(--muted); text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { margin: 0; counter-increment: t; font-size: 13px; }
.toc li a {
  display: block; padding: 5px 0 5px 0; color: var(--ink-2);
  border-left: 2px solid transparent; padding-left: 10px; margin-left: -10px;
}
.toc li a:hover { color: var(--brand-600); text-decoration: none; }
.toc li a.is-current { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }

.side-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.side-box__t { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink); }
.side-box p { font-size: 13px; color: var(--muted); margin: 0 0 8px; line-height: 1.65; }
.side-box p:last-child { margin-bottom: 0; }
.side-box--accent { background: var(--brand-50); border-color: #d5e8f5; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #0d1b2a; color: #93a6b8; font-size: 13.5px;
  margin-top: 40px; padding: 52px 0 28px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-footer h3 { color: #fff; font-size: 13px; letter-spacing: .6px; margin-bottom: 12px; font-weight: 650; }
.site-footer a { color: #93a6b8; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 7px 0; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand .brand-mark { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
.footer-brand strong { color: #fff; font-size: 15px; }
.footer-note { max-width: 300px; line-height: 1.75; margin: 0; }
.legal {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  padding-top: 22px; font-size: 12.5px; color: #6f8499;
}

/* ---------- 工具页 ---------- */
.calc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; margin: 24px 0 30px; box-shadow: var(--shadow-sm);
}
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select {
  height: 46px; padding: 0 14px; font: inherit; font-size: 15px;
  border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(14, 99, 156, .1);
}
.calc-result {
  margin-top: 22px; padding: 20px 22px; border-radius: 10px;
  background: var(--brand-50); border: 1px solid #d5e8f5;
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.calc-result div { display: flex; flex-direction: column; gap: 2px; }
.calc-result span { font-size: 12px; color: var(--muted); }
.calc-result strong { font-size: 22px; font-weight: 700; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.calc-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }

/* ---------- 交替色带与来源列表 ---------- */
.band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sources { font-size: 14.5px; }
.sources li { margin: .5em 0; }
.sources a { font-weight: 600; }

/* 首页卡片内直接放说明时的高度对齐 */
.card .card__value + .card__value { margin-top: 2px; }

/* ---------- 通用 ---------- */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: #eef2f6; color: var(--ink-2);
}
.badge--ok { background: var(--teal-50); color: var(--teal); }
.badge--soon { background: #f1f5f9; color: var(--muted); }

.page-head { padding: 34px 0 0; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.4px; margin-bottom: 12px; }
.page-head .lead { font-size: 16.5px; color: var(--ink-2); max-width: 760px; margin-bottom: 0; }

.timeline { list-style: none; padding: 0; margin: 24px 0 0; }
.timeline li {
  display: grid; grid-template-columns: 108px 1fr; gap: 20px;
  padding: 18px 0; border-top: 1px solid var(--line); margin: 0;
}
.timeline time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.timeline p { margin: 4px 0 0; font-size: 14.5px; }

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .article-grid { grid-template-columns: 1fr; gap: 34px; }
  .sidebar { position: static; order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .brand-text small { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .wrap { width: calc(100% - 30px); }
  .header-inner { gap: 14px; min-height: 60px; }
  .brand-mark { width: 34px; height: 34px; font-size: 16px; }
  .brand-text strong { font-size: 15px; }
  .nav { gap: 2px; }
  .nav a { font-size: 13px; padding: 7px 9px; }
  .hero { padding: 46px 0 40px; }
  .hero__lead { font-size: 15.5px; }
  .search { flex-direction: column; }
  .search button { width: 100%; }
  .stats { gap: 12px 28px; margin-top: 26px; padding-top: 20px; }
  .stat b { font-size: 22px; }
  .section { padding: 40px 0; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .calc { padding: 20px; }
  .calc-row { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .article-grid { padding-bottom: 48px; }
  .factbox strong { font-size: 15.5px; }
  .prose { width: 100%; }
  .table-wrap { width: 100%; }
  .site-footer li { margin: 0; }
  .site-footer li a { display: inline-flex; align-items: center; min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .sidebar, .site-footer, .search { display: none; }
  body { background: #fff; }
  .article-grid { grid-template-columns: 1fr; }
}
