/* ============================================================================
   汇赢国际 (Huiying International) — Shared Design System
   static/css/style.css

   This is the ONLY stylesheet for all 7 pages. It defines design tokens
   (colors, spacing) as CSS custom properties, base/reset styles, and a
   library of reusable component classes. Component class names are meant
   to be self-explanatory — read the one-line comment above each group
   before inventing a new class; if something you need isn't here, extend
   this file rather than writing page-specific inline styles.

   Contents
   --------
   1.  Design Tokens (:root custom properties)
   2.  Reset & Base Elements
   3.  Layout / Utility Classes
   4.  Site Header & Navigation        .site-header / .nav / .nav-toggle
   5.  Breadcrumb                      .breadcrumb
   6.  Hero                            .hero / .hero--compact
   7.  Buttons                         .btn
   8.  Info Chain                      .info-chain
   9.  Diagram Atoms                   .chain-step / .decision-node
   10. Article Full (long-form)        .article-full
   11. Article Card & Card Grid        .article-card / .card-grid
   12. Timeline                        .timeline
   13. Compare Table                   .compare-table
   14. Tabs                            .tabs / .tab-buttons / .tab-panel
   15. FAQ Accordion                   .faq
   16. Risk Badge                      .risk-badge
   17. Disclaimer Box                  .disclaimer-box
   18. Company Box                     .company-box
   19. Download Entry / Grid           .download-entry / .download-grid
   20. Site Footer                     .site-footer
   21. Back To Top                     .back-to-top
   22. Responsive Notes
   ========================================================================= */


/* ----------------------------------------------------------------------
   1. Design Tokens — brand colors (exact values, keep in sync with SVGs)
   ---------------------------------------------------------------------- */
:root {
  /* Required brand tokens (exact hex values — also hard-coded inside the
     static/images/*.svg files, since SVG cannot read external CSS vars) */
  --color-bg: #F7F5F0;          /* 暖白 page background */
  --color-surface: #FFFFFF;     /* card / panel background */
  --color-primary: #0B3D5C;     /* 深海蓝 — headers, nav, primary buttons, links */
  --color-primary-dark: #082A40;
  --color-teal: #0E9494;        /* 贸易青 — secondary accent, icons, tags */
  --color-graphite: #3A3F44;    /* body text */
  --color-muted: #6B7280;       /* secondary text */
  --color-border: #E3DED3;
  --color-green: #2F9E5B;       /* 供应链绿 — positive / low-risk */
  --color-orange: #D9822B;      /* 风险橙 — warnings / high-risk ONLY, use sparingly */
  --color-orange-bg: #FBEEDD;

  /* Derived tokens — tints/shades built from the brand colors above, for
     badges, hovers and subtle fills. Not part of the required brand list,
     but kept consistent with it. */
  --color-primary-tint: #E8EEF2;
  --color-teal-tint: #E3F3F3;
  --color-green-tint: #E6F5EC;
  --color-muted-tint: #EEF0F2;
  --color-primary-rgb: 11, 61, 92;
  --color-teal-rgb: 14, 148, 148;
  --color-green-rgb: 47, 158, 91;
  --color-orange-rgb: 217, 130, 43;
  --color-muted-rgb: 107, 114, 128;

  /* Typography */
  --font-family-base: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-size-base: 16px;
  --line-height-prose: 1.8;

  /* Layout */
  --max-width: 1200px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;

  /* Misc */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(11, 61, 92, 0.06);
  --shadow-md: 0 4px 16px rgba(11, 61, 92, 0.08);
  --header-height: 72px;
}


/* ----------------------------------------------------------------------
   2. Reset & Base Elements
   ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  color: var(--color-graphite);
  background: var(--color-bg);
  line-height: 1.6;
  /* Defensive backstop: no component below should cause page-level
     horizontal scroll, but this guarantees it even if content agents
     add something unexpected (wide tables must still use .compare-table). */
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-2);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-primary);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }

p { margin: 0 0 var(--space-2); }

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

ul, ol { margin: 0 0 var(--space-2); padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }

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

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

button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-4) 0;
}

blockquote {
  margin: 0 0 var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-left: 4px solid var(--color-teal);
  background: var(--color-surface);
  color: var(--color-muted);
}

code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  background: var(--color-primary-tint);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}


/* ----------------------------------------------------------------------
   3. Layout / Utility Classes — .container, flex/grid helpers, spacing
   ---------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.grid { display: grid; }

.gap-sm { gap: var(--space-1); }
.gap-md { gap: var(--space-2); }
.gap-lg { gap: var(--space-4); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.text-teal { color: var(--color-teal); }

.section { padding: var(--space-5) 0; }
.section + .section { border-top: 1px solid var(--color-border); }


/* ----------------------------------------------------------------------
   4. Site Header & Navigation — .site-header / .nav / .nav-toggle
   Markup contract:
   <header class="site-header">
     <div class="container flex items-center justify-between">
       <a class="logo" href="index.html"><img src="static/images/logo.svg" alt="汇赢国际"></a>
       <button class="nav-toggle" aria-label="打开菜单" aria-expanded="false">
         <span></span><span></span><span></span>
       </button>
       <nav class="nav">
         <ul>
           <li><a href="index.html" class="is-current">汇赢国际官网</a></li>
           <li><a href="trade.html">汇赢国际贸易</a></li>
           <li><a href="tariff.html">汇赢国际关税</a></li>
           <li><a href="customs.html">汇赢国际报关</a></li>
           <li><a href="supply.html">汇赢国际供应链</a></li>
           <li><a href="ai.html">汇赢国际AI</a></li>
           <li><a href="app.html">汇赢国际App</a></li>
         </ul>
       </nav>
     </div>
   </header>
   JS toggles `.is-open` on .nav when .nav-toggle is clicked (below ~900px).
   ---------------------------------------------------------------------- */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  height: var(--header-height);
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo img, .logo svg { height: 36px; width: auto; }

.nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}
.nav a {
  color: var(--color-graphite);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav a:hover,
.nav a.is-current,
.nav a[aria-current="page"] {
  color: var(--color-primary);
  text-decoration: none;
}
.nav a.is-current,
.nav a[aria-current="page"] { font-weight: 700; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 899px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav.is-open { max-height: 32rem; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 0; }
  .nav a { display: block; padding: 0.85rem 1.5rem; }
}


/* ----------------------------------------------------------------------
   5. Breadcrumb — .breadcrumb
   Markup: <nav class="breadcrumb"><a href="index.html">首页</a>
     <span class="breadcrumb-sep">›</span>
     <span class="breadcrumb-current">汇赢国际关税</span></nav>
   ---------------------------------------------------------------------- */
.breadcrumb {
  padding: var(--space-2) 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .breadcrumb-sep { margin: 0 0.5rem; color: var(--color-border); }
.breadcrumb .breadcrumb-current { color: var(--color-graphite); font-weight: 600; }


/* ----------------------------------------------------------------------
   6. Hero — .hero / .hero--compact (page-top intro block)
   Markup: <section class="hero"[--compact]><div class="container hero-inner">
     <img class="hero-icon" src="static/images/hero-trade-ai.svg" alt="...">
     <div class="hero-content"><h1>...</h1><p class="hero-lead">...</p></div>
   </div></section>
   Use plain .hero on index.html, .hero--compact on the 6 inner pages.
   ---------------------------------------------------------------------- */
.hero {
  padding: var(--space-5) 0 var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.hero .hero-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.hero-icon { width: 140px; flex-shrink: 0; }
.hero-content { flex: 1 1 320px; min-width: 0; }
.hero h1 { font-size: 2.25rem; margin-bottom: var(--space-2); }
.hero .hero-lead {
  font-size: 1.125rem;
  color: var(--color-graphite);
  line-height: var(--line-height-prose);
  max-width: 68ch;
  margin-bottom: 0;
}

.hero--compact { padding: var(--space-4) 0 var(--space-3); }
.hero--compact .hero-icon { width: 84px; }
.hero--compact h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.hero--compact .hero-lead { font-size: 1rem; }


/* ----------------------------------------------------------------------
   7. Buttons — .btn (generic CTA, used in hero/download/company sections)
   Modifiers: .btn-primary (solid), .btn-outline (bordered), .btn-teal
   ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid transparent;
  background: var(--color-primary);
  color: #fff;
  line-height: 1.2;
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; color: #fff; }
.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-tint); color: var(--color-primary); }
.btn-teal { background: var(--color-teal); }
.btn-teal:hover { background: #0b7a7a; }


/* ----------------------------------------------------------------------
   8. Info Chain — .info-chain (labeled step flow with arrows)
   For sequences like Product → Classification → ... → Trade Decision.
   Markup: <div class="info-chain">
     <div class="info-chain-step"><strong>产品</strong><span>...</span></div>
     <div class="info-chain-step">...</div>
   </div>
   Arrows are pure-CSS (::after) — do not add arrow markup by hand.
   Degrades to a vertical stack (arrows become ↓) below 640px.
   ---------------------------------------------------------------------- */
.info-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.info-chain-step {
  position: relative;
  flex: 1 1 140px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin: 0 1.75rem 1.5rem 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.info-chain-step strong {
  display: block;
  color: var(--color-primary);
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}
.info-chain-step span { color: var(--color-muted); font-size: 0.8125rem; }
.info-chain-step:last-child { margin-right: 0; }
.info-chain-step:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  top: 50%;
  right: -1.6rem;
  transform: translateY(-50%);
  color: var(--color-teal);
  font-weight: 700;
  font-size: 1.25rem;
}

@media (max-width: 640px) {
  .info-chain { flex-direction: column; }
  .info-chain-step { margin: 0 0 2rem; }
  .info-chain-step:not(:last-child)::after {
    content: '\2193';
    top: auto;
    bottom: -1.65rem;
    right: auto;
    left: 1.1rem;
    transform: none;
  }
}


/* ----------------------------------------------------------------------
   9. Diagram Atoms — .chain-step / .decision-node
   Small building blocks for hand-built HTML/CSS diagrams (e.g. an HS
   decision tree or attribute list) when a content agent wants something
   lighter than a full SVG. Combine freely with .flex/.grid utilities.
   ---------------------------------------------------------------------- */
.chain-step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--color-graphite);
}
.chain-step--teal { border-color: var(--color-teal); color: var(--color-teal); }

.decision-node {
  display: inline-block;
  min-width: 8rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: center;
}
.decision-node--branch { border-color: var(--color-teal); color: var(--color-teal); }
.decision-node--result { border-color: var(--color-green); color: var(--color-green); background: var(--color-green-tint); }
.decision-node--risk { border-color: var(--color-orange); color: var(--color-orange); background: var(--color-orange-bg); }


/* ----------------------------------------------------------------------
   10. Article Full — .article-full (long-form article, optional collapse)
   Markup:
   <article class="article-full" data-collapsible>
     <header>
       <span class="article-category">关税政策</span>
       <h1>标题</h1>
       <time class="article-date" datetime="2026-08-01">2026-08-01</time>
     </header>
     <div class="article-body">
       <h3>子标题</h3><p>...</p><ul>...</ul>
       <div class="compare-table"><table>...</table></div>
     </div>
     <button class="read-more-btn">展开全文</button>
   </article>
   `data-collapsible` + `.read-more-btn` are optional; omit both for a
   plain, always-fully-visible article. When present, JS toggles
   `.is-expanded` on <article class="article-full">; the selector below
   reacts to that ancestor class to remove the clip on .article-body.
   The full text must always exist in the raw HTML — this only visually
   clips it (never use this to hide content from crawlers).
   ---------------------------------------------------------------------- */
.article-full {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.article-full > header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
}
.article-full .article-category {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--color-teal-tint);
  color: var(--color-teal);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.article-full > header h1,
.article-full > header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.625rem;
}
.article-full .article-date {
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.article-full .article-body h3 {
  margin-top: var(--space-4);
  color: var(--color-primary-dark);
  font-size: 1.1875rem;
}
.article-full .article-body p,
.article-full .article-body ul,
.article-full .article-body ol {
  line-height: var(--line-height-prose);
  color: var(--color-graphite);
  margin-bottom: var(--space-2);
}
.article-full .article-body table {
  font-size: 0.9375rem;
}

/* Collapsible variant: the clip lives on .article-body so the
   read-more-btn (a sibling, placed after it) always stays visible. */
.article-full[data-collapsible] .article-body {
  position: relative;
  max-height: 32rem;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.article-full[data-collapsible] .article-body::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--color-surface) 85%);
  pointer-events: none;
}
.article-full[data-collapsible].is-expanded .article-body {
  max-height: none;
}
.article-full[data-collapsible].is-expanded .article-body::after {
  content: none;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: var(--space-3);
  background: none;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
}
.read-more-btn:hover { background: var(--color-primary-tint); }


/* ----------------------------------------------------------------------
   11. Article Card & Card Grid — .article-card / .card-grid
   Markup: <div class="card-grid">
     <article class="article-card">
       <span class="article-card-tag">供应链</span>
       <h3 class="article-card-title"><a href="...">标题</a></h3>
       <time class="article-card-date">2026-08-01</time>
       <p class="article-card-excerpt">1-3 行摘要…</p>
       <a class="article-card-link" href="...">阅读全文 →</a>
     </article>
     ... (repeat) ...
   </div>
   ---------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card-grid--2col { grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid--2col { grid-template-columns: repeat(2, 1fr); } }

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  height: 100%;
}
.article-card-tag {
  align-self: flex-start;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--color-teal-tint);
  color: var(--color-teal);
  font-size: 0.75rem;
  font-weight: 700;
}
.article-card-title {
  font-size: 1.0625rem;
  margin: 0.75rem 0 0.4rem;
}
.article-card-title a { color: var(--color-primary); }
.article-card-date {
  color: var(--color-muted);
  font-size: 0.8125rem;
}
.article-card-excerpt {
  color: var(--color-graphite);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin: 0.75rem 0;
  flex-grow: 1;
}
.article-card-link {
  color: var(--color-teal);
  font-weight: 600;
  font-size: 0.9375rem;
}


/* ----------------------------------------------------------------------
   12. Timeline — .timeline (dated horizontal steps, scrolls on overflow)
   Markup: <div class="timeline">
     <div class="timeline-item" data-state="superseded">
       <span class="timeline-date">2024-01-01</span>
       <span class="timeline-label">旧税率</span>
       <div class="timeline-body">...</div>
     </div>
     <div class="timeline-item" data-state="current">...</div>
     <div class="timeline-item" data-state="future">...</div>
   </div>
   data-state: current | superseded | future (color-codes the marker).
   ---------------------------------------------------------------------- */
.timeline {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 2rem 0.25rem 1rem;
}
.timeline-item {
  position: relative;
  flex: 0 0 220px;
  padding-top: 1.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--color-muted);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 1px var(--color-border);
}
.timeline-item::after {
  content: '';
  position: absolute;
  top: 6px; left: 14px;
  width: calc(220px + 2rem - 14px);
  height: 2px;
  background: var(--color-border);
}
.timeline-item:last-child::after { display: none; }
.timeline-item .timeline-date {
  display: block;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}
.timeline-item .timeline-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}
.timeline-item .timeline-body {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-graphite);
}

.timeline-item[data-state="current"]::before { background: var(--color-teal); box-shadow: 0 0 0 1px var(--color-teal); }
.timeline-item[data-state="current"] .timeline-date { color: var(--color-teal); }
.timeline-item[data-state="superseded"] { opacity: 0.7; }
.timeline-item[data-state="superseded"]::before { background: var(--color-muted); }
.timeline-item[data-state="future"]::before { background: var(--color-surface); border-color: var(--color-orange); box-shadow: 0 0 0 1px var(--color-orange); }
.timeline-item[data-state="future"] .timeline-date { color: var(--color-orange); }
.timeline-item[data-state="future"] .timeline-body { color: var(--color-muted); }


/* ----------------------------------------------------------------------
   13. Compare Table — .compare-table (horizontally-scrollable wrapper)
   Markup: <div class="compare-table"><table>...</table></div>
   Always wrap raw <table> markup in this div — never let a wide table
   cause page-level horizontal scroll.
   ---------------------------------------------------------------------- */
.compare-table {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}
.compare-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}
.compare-table th, .compare-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9375rem;
}
.compare-table th {
  background: var(--color-bg);
  color: var(--color-primary);
  font-weight: 700;
  white-space: nowrap;
}
.compare-table tr:last-child td { border-bottom: none; }


/* ----------------------------------------------------------------------
   14. Tabs — .tabs / .tab-buttons / .tab-panel (generic switcher)
   Markup: <div class="tabs">
     <div class="tab-buttons">
       <button data-tab="a" class="is-active">供应商 A</button>
       <button data-tab="b">供应商 B</button>
     </div>
     <div class="tab-panel is-active" data-tab-panel="a">...</div>
     <div class="tab-panel" data-tab-panel="b">...</div>
   </div>
   One generic JS controller drives every .tabs block on a page (HS
   attribute selector, tariff timeline switcher, supplier comparison,
   supply-chain node filter, AI query demo — same markup contract).
   Mark one button/panel pair `is-active` by default in the HTML.
   ---------------------------------------------------------------------- */
.tabs {
  display: block;
  margin-bottom: var(--space-4);
}
.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-3);
}
.tab-buttons [data-tab] {
  padding: 0.625rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-muted);
}
.tab-buttons [data-tab]:hover { color: var(--color-primary); }
.tab-buttons [data-tab].is-active {
  color: var(--color-primary);
  border-bottom-color: var(--color-teal);
  font-weight: 700;
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }


/* ----------------------------------------------------------------------
   15. FAQ Accordion — .faq / .faq-item / .faq-question / .faq-answer
   Markup: <div class="faq">
     <div class="faq-item">
       <button class="faq-question" aria-expanded="false">问题？</button>
       <div class="faq-answer"><p>答案文本（始终存在于 HTML 中）。</p></div>
     </div>
     ... (repeat, many independent .faq blocks per page are fine) ...
   </div>
   ---------------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  text-align: left;
}
.faq-question::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-teal);
  transition: transform 0.2s ease;
}
.faq-item.is-open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.25rem;
  color: var(--color-graphite);
  line-height: var(--line-height-prose);
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.is-open .faq-answer {
  max-height: 60rem;
  padding: 0 1.25rem 1.25rem;
}


/* ----------------------------------------------------------------------
   16. Risk Badge — .risk-badge (small inline tag, e.g. "政策风险：高")
   Modifiers: .risk-badge--low (green) .risk-badge--medium (muted)
              .risk-badge--high (orange — reserve for real risk flags)
   ---------------------------------------------------------------------- */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.risk-badge--low {
  color: var(--color-green);
  background: var(--color-green-tint);
  border-color: rgba(var(--color-green-rgb), 0.3);
}
.risk-badge--medium {
  color: var(--color-muted);
  background: var(--color-muted-tint);
  border-color: rgba(var(--color-muted-rgb), 0.3);
}
.risk-badge--high {
  color: var(--color-orange);
  background: var(--color-orange-bg);
  border-color: rgba(var(--color-orange-rgb), 0.35);
}


/* ----------------------------------------------------------------------
   17. Disclaimer Box — .disclaimer-box (standard disclaimer text)
   ---------------------------------------------------------------------- */
.disclaimer-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-muted);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: var(--line-height-prose);
}
.disclaimer-box strong { color: var(--color-graphite); }
.disclaimer-box p:last-child { margin-bottom: 0; }


/* ----------------------------------------------------------------------
   18. Company Box — .company-box (About / company info block)
   Markup: <div class="company-box"><h2>...</h2><dl>
     <dt>公司名称</dt><dd>上海汇赢国际贸易ai有限公司</dd> ...</dl></div>
   ---------------------------------------------------------------------- */
.company-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.company-box h2, .company-box h3 { margin-top: 0; }
.company-box dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.6rem 1.5rem;
  margin: 0;
}
.company-box dt { color: var(--color-muted); font-weight: 600; }
.company-box dd { margin: 0; color: var(--color-graphite); }

@media (max-width: 480px) {
  .company-box dl { grid-template-columns: 1fr; gap: 0.15rem 0; }
  .company-box dt { margin-top: 0.6rem; }
}


/* ----------------------------------------------------------------------
   19. Download Entry / Grid — .download-entry / .download-grid
   For app.html platform entries. Status pill is deliberately styled as
   NOT a working button — a dashed, disabled-looking pill, never a solid
   CTA — since no real APK/App Store listing exists yet.
   Markup: <div class="download-grid">
     <div class="download-entry">
       <img src="static/images/android-entry.svg" alt="Android">
       <div class="download-platform">Android</div>
       <p class="download-note">...</p>
       <span class="download-status">即将上线</span>
     </div>
   </div>
   ---------------------------------------------------------------------- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
}
.download-entry {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.download-entry img, .download-entry svg { width: 48px; height: 48px; margin: 0 auto 1rem; }
.download-platform { font-weight: 700; color: var(--color-primary); font-size: 1.0625rem; margin-bottom: 0.4rem; }
.download-note { color: var(--color-muted); font-size: 0.875rem; line-height: 1.6; margin-bottom: 1rem; }
.download-status {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: default;
}


/* ----------------------------------------------------------------------
   20. Site Footer — .site-footer (multi-column: nav / company / compliance)
   Markup: <footer class="site-footer"><div class="container">
     <div class="site-footer-grid">
       <div><h4>网站导航</h4><ul><li><a href="...">...</a></li></ul></div>
       <div><h4>公司信息</h4><ul>...</ul></div>
       <div><h4>合规声明</h4><ul>...</ul></div>
     </div>
     <div class="site-footer-meta">
       <span>沪ICP备20260287231号-1</span>
       <span>更新日期：2026-08-27</span>
     </div>
   </div></footer>
   ---------------------------------------------------------------------- */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.82);
  margin-top: var(--space-5);
}
.site-footer .container { padding-top: var(--space-5); padding-bottom: var(--space-3); }
.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.site-footer h4,
.site-footer h2 {
  color: #fff;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.site-footer a { color: rgba(255, 255, 255, 0.75); font-size: 0.875rem; }
.site-footer a:hover { color: #fff; }
.site-footer p { color: rgba(255, 255, 255, 0.75); font-size: 0.875rem; line-height: 1.7; margin-bottom: 0.6rem; }

.site-footer-meta {
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
}


/* ----------------------------------------------------------------------
   21. Back To Top — .back-to-top (paired with main.js scroll listener)
   Markup: <button class="back-to-top" aria-label="返回顶部">↑</button>
   Hidden by default; JS adds `.is-visible` after the scroll threshold.
   ---------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 1.25rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 90;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--color-primary); color: #fff; }


/* ----------------------------------------------------------------------
   22. Responsive Notes
   Breakpoints exercised throughout this file: 360/375/390/430 (phones,
   fluid/no fixed breakpoint needed below 640px), 640px (card-grid 2col),
   768px (tablet), 900px (nav switches from hamburger to full row),
   1024px (card-grid 3col / desktop). No selector above should introduce
   page-level horizontal scroll; wide content must scroll in its own
   container (.compare-table, .timeline).
   ---------------------------------------------------------------------- */
@media (min-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
}


/* ----------------------------------------------------------------------
   23. Figure Clean — .figure-clean (added by supply.html content pass)
   Resets the browser default <figure> margin (normally ~1em 40px) for
   image+caption pairs used inline in article bodies and grids, so they
   align flush with surrounding prose instead of picking up unexpected
   side indentation on narrow viewports.
   Markup: <figure class="figure-clean"><img ...><figcaption>...</figcaption></figure>
   ---------------------------------------------------------------------- */
.figure-clean { margin: 0; }
.figure-clean figcaption { margin-top: 0.5rem; font-size: 0.875rem; }
