/* 易HS·归类通 — 税则目录静态页（SEO / GEO） */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #1e86fc;
  --brand-dark: #1565c0;
  --brand-soft: #e8f3ff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --font: "Microsoft YaHei", "微软雅黑", "PingFang SC", "苹方", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", ui-monospace, monospace;
  --header-h: 3.5rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--ink); }
.logo img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.site-nav a {
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover {
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
}
.site-nav a.current {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  flex: 1;
  width: 100%;
}

.crumbs {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.7;
}
.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0;
}
.crumbs li { display: inline; }
.crumbs li:not(:last-child)::after {
  content: ">";
  margin: 0 0.45rem;
  color: #94a3b8;
}
.crumbs a { color: var(--brand-dark); }
.crumbs [aria-current="page"] { color: var(--ink); }

h1 {
  font-size: 1.45rem;
  line-height: 1.35;
  margin: 0 0 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lead {
  background: var(--brand-soft);
  border: 1px solid #d7e9ff;
  border-radius: var(--radius);
  padding: 0.9rem 1.05rem;
  margin: 0 0 1.35rem;
  color: var(--ink);
}
.lead p { margin: 0; }

.note {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 0.7rem 0.95rem;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1.25rem;
}

h2 {
  font-size: 1.12rem;
  margin: 1.6rem 0 0.7rem;
  font-weight: 700;
}
h2 .count {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.9rem;
  margin-left: 0.35rem;
}

h3 {
  font-size: 1rem;
  margin: 0 0 0.55rem;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.15rem 1.05rem;
  margin: 0 0 1rem;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.4rem;
}
.toc a {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 0.18rem 0.65rem;
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
}
.toc a:hover { background: #d6e9ff; text-decoration: none; }

.heading-block {
  margin: 0 0 1.1rem;
  padding-top: 0.35rem;
}
.heading-block > h2 {
  margin-top: 0;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: var(--header-h);
  background: var(--bg);
  z-index: 5;
}

.code-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.code-list li {
  border-top: 1px solid var(--line);
  margin: 0;
}
.code-list li:first-child { border-top: none; }
.code-list a {
  display: grid;
  grid-template-columns: 8.2rem 1fr;
  gap: 0.75rem;
  padding: 0.45rem 0.85rem;
  color: inherit;
  text-decoration: none;
}
.code-list a:hover { background: var(--brand-soft); text-decoration: none; }
.code-list .hs {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--brand-dark);
  letter-spacing: 0.01em;
}
.code-list .nm {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.section-list, .chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.section-list > li, .chapter-list > li { margin: 0 0 0.85rem; }
.section-list h2 { margin: 0 0 0.45rem; }
.chapter-list a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.chapter-list a:hover { background: var(--brand-soft); text-decoration: none; }
.chapter-list .ch-title { font-weight: 600; color: var(--ink); }
.chapter-list .ch-count { color: var(--muted); font-size: 0.88rem; }

.vacant {
  padding: 0.5rem 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--line);
}

.facts {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.facts th, .facts td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.85rem;
  border-top: 1px solid var(--line);
  font-weight: 400;
}
.facts tr:first-child th, .facts tr:first-child td { border-top: none; }
.facts th {
  width: 9.5rem;
  color: var(--muted);
  font-weight: 500;
  background: #f8fbff;
  white-space: nowrap;
}
.facts td { overflow-wrap: anywhere; }
.facts .hs-value {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-dark);
}
.facts .declares {
  font-family: var(--mono);
  font-size: 0.88rem;
  background: #f8fbff;
  border: 1px solid #d7e9ff;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  overflow-wrap: anywhere;
  font-weight: 600;
  color: #0f3f7a;
}
.examples {
  margin: 0;
  padding-left: 1.15rem;
}
.examples li { margin: 0.15rem 0; }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1.35rem 0 0.4rem;
  font-size: 0.95rem;
}
.pager a { font-weight: 500; }

.tool-link {
  display: inline-block;
  margin-top: 1.1rem;
  background: var(--brand);
  color: #fff !important;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  text-decoration: none !important;
}
.tool-link:hover { background: var(--brand-dark); }

.site-footer {
  text-align: center;
  padding: 1rem 1.25rem 1.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
.site-footer strong { color: var(--ink); font-weight: 700; }
.footer-company {
  color: inherit;
  text-decoration: none;
  margin-left: 0.6rem;
}
.footer-company:hover {
  color: var(--brand);
  text-decoration: none;
}
.source {
  margin: 0.45rem auto 0;
  max-width: 42rem;
  line-height: 1.65;
}
.source a { color: var(--brand-dark); }

@media (max-width: 720px) {
  .header-inner { padding: 0.55rem 0.9rem; gap: 0.7rem; }
  .wrap { padding: 1rem 0.9rem 2rem; }
  h1 { font-size: 1.25rem; }
  .code-list a { grid-template-columns: 1fr; gap: 0.1rem; padding: 0.5rem 0.75rem; }
  .facts th { width: 7.2rem; white-space: normal; font-size: 0.88rem; }
  .logo span { font-size: 0.95rem; }
}
