:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --accent: #0f172a;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Hiragino Kaku Gothic ProN", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: fixed; left: 16px; top: 16px; z-index: 1000; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex-shrink: 0; }

.primary-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.primary-nav a { color: var(--muted); font-weight: 500; font-size: 0.95rem; white-space: nowrap; }
.primary-nav a[aria-current="page"], .primary-nav a:hover { color: var(--primary); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface);
  user-select: none;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  min-width: 140px;
}
.lang-switch li a {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
}
.lang-switch li a:hover { background: var(--surface-alt); text-decoration: none; }
.lang-switch li a[aria-current="true"] { font-weight: 700; color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 72px 0 64px;
}
.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.2; margin: 0 0 16px; }
.hero p.lede { font-size: 1.1rem; color: #cbd5e1; max-width: 760px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.stat-item strong { display: block; font-size: 1.7rem; color: #38bdf8; }
.stat-item span { font-size: 0.9rem; color: #cbd5e1; }

/* Sections & Grids */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); margin: 0 0 8px; }
.section-head p { color: var(--muted); margin: 0; max-width: 720px; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card-link { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 0.92rem; }

.case-card { padding: 0; overflow: hidden; }
.case-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
  background: var(--surface-alt);
}
.case-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.case-meta { font-size: 0.82rem; color: var(--primary); font-weight: 600; }
.case-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.case-body h3 a { color: var(--text); }
.case-body h3 a:hover { color: var(--primary); }

/* Page Header & Article */
.page-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 32px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: #94a3b8; }
.page-banner h1 { margin: 0 0 12px; font-size: clamp(1.6rem, 3vw, 2.35rem); line-height: 1.25; }
.page-banner p.lede { margin: 0; color: var(--muted); max-width: 780px; font-size: 1.05rem; }

.article-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.article-body h2 { margin-top: 28px; margin-bottom: 12px; font-size: 1.4rem; }
.article-body h3 { margin-top: 22px; margin-bottom: 10px; font-size: 1.15rem; }
.article-body p { margin: 0 0 16px; }
.article-body img { margin: 18px auto; }
.article-body figure { margin: 20px 0; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 16px; }

/* Filter pills */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* FAQ */
.faq-list { display: grid; gap: 14px; max-width: 860px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.faq-item summary { font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 10px 0 0; color: var(--muted); }

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 48px 0 28px;
  margin-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #94a3b8; font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  color: #94a3b8;
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .primary-nav.open { display: flex; }
  .article-body { padding: 20px; }
}
