:root {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --text: #1a1a2e;
  --text-soft: #4a4a63;
  --text-muted: #7a7a92;
  --line: rgba(26, 26, 46, 0.1);
  --brand: #e94560;
  --brand-2: #4ecdc4;
  --brand-3: #ffd93d;
  --accent: #6c5ce7;
  --grad: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
  --grad-brand: linear-gradient(135deg, #e94560 0%, #6c5ce7 100%);
  --grad-soft: linear-gradient(135deg, rgba(233, 69, 96, 0.12), rgba(78, 205, 196, 0.12));
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow: 0 8px 28px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 18px 48px rgba(26, 26, 46, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --blur: saturate(160%) blur(14px);
  --header-h: 132px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-theme="dark"],
body.dark {
  --bg: #0e0e1a;
  --bg-soft: #16162a;
  --bg-elev: rgba(30, 30, 52, 0.66);
  --text: #eef0ff;
  --text-soft: #c3c6e0;
  --text-muted: #8a8db0;
  --line: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
  --grad-soft: linear-gradient(135deg, rgba(233, 69, 96, 0.2), rgba(78, 205, 196, 0.16));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 90% -10%, rgba(233, 69, 96, 0.12), transparent 70%),
    radial-gradient(800px 460px at -10% 10%, rgba(78, 205, 196, 0.12), transparent 70%);
  background-attachment: fixed;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
  color: var(--brand);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: 0.2px;
}

h1 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
h4 { font-size: 1.05rem; }

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.4em;
}

strong {
  color: var(--text);
  font-weight: 700;
}

blockquote {
  margin: 0 0 1em;
  padding: 14px 18px;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--grad-soft);
  color: var(--text-soft);
}

blockquote p { margin: 0; color: var(--text-soft); }

time {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

:focus-visible {
  outline: 3px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elev);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: background 0.35s var(--ease), box-shadow 0.3s var(--ease);
}

#site-header.scrolled {
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px clamp(16px, 4vw, 40px);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.86);
  background: var(--grad);
  letter-spacing: 0.3px;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px clamp(16px, 4vw, 24px);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.brand svg {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(233, 69, 96, 0.28);
  transition: transform 0.4s var(--ease);
}

.brand:hover svg {
  transform: rotate(-8deg) scale(1.06);
}

.brand:hover {
  color: var(--brand);
}

nav[aria-label="主导航"] {
  flex: 1 1 auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  display: block;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  font-weight: 500;
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--brand);
  background: var(--grad-soft);
}

.main-nav a:hover::after {
  width: 60%;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-search:focus-within {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.18);
}

.site-search input {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: var(--text);
  width: 200px;
  border-radius: 999px;
  outline: none;
  font-family: inherit;
}

.site-search input::placeholder {
  color: var(--text-muted);
}

.site-search button {
  border: 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

.site-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.4);
  filter: brightness(1.06);
}

.site-search button:active {
  transform: translateY(0) scale(0.97);
}

#menu-toggle,
#theme-toggle {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#theme-toggle {
  display: inline-flex;
}

#menu-toggle:hover,
#theme-toggle:hover {
  transform: translateY(-2px) rotate(-6deg);
  box-shadow: var(--shadow);
  background: var(--grad-soft);
}

/* ============ Main / Sections ============ */
main {
  display: block;
}

section {
  max-width: var(--maxw);
  margin: 0 auto 28px;
  padding: clamp(20px, 3.4vw, 38px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--grad-brand);
  opacity: 0.85;
}

section > h2:first-child {
  position: relative;
  padding-left: 16px;
}

section > h2:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 6px;
  border-radius: 6px;
  background: var(--grad-brand);
}

section h3 {
  margin-top: 1.4em;
  color: var(--text);
}

section h3::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 6px;
  border-radius: 3px;
  background: var(--grad-brand);
  opacity: 0.6;
}

/* ============ Hero ============ */
.hero {
  max-width: var(--maxw);
  margin: 24px auto 28px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
}

.hero::before { display: none; }

.banner-carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--shadow-lg);
  background: var(--grad);
  isolation: isolate;
}

.banner-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s var(--ease), transform 1.2s var(--ease);
  pointer-events: none;
}

.banner-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.banner-slide svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 44px 22px 18px;
  color: #fff;
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.4px;
  background: linear-gradient(to top, rgba(10, 10, 24, 0.85), rgba(10, 10, 24, 0));
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: clamp(18px, 3vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-text h1 {
  background: linear-gradient(120deg, var(--brand) 0%, var(--accent) 55%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand);
}

.hero-text p {
  font-size: 0.95rem;
  color: var(--text-soft);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  margin: 4px 8px 4px 0;
  border-radius: 999px;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.32);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), filter 0.28s var(--ease);
  position: relative;
  overflow: hidden;
}

.cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s var(--ease);
}

.cta:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(233, 69, 96, 0.42);
  filter: brightness(1.05);
}

.cta:hover::after {
  left: 130%;
}

.cta.ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--line);
  box-shadow: none;
}

.cta.ghost:hover {
  color: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.18);
}

.hero-stats {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  flex-wrap: wrap;
}

.hero-stats li {
  flex: 1 1 100px;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--grad-soft);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.hero-stats li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.hero-stats strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.2;
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand);
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  max-width: var(--maxw);
  margin: 0 auto 20px;
  padding: 0 clamp(16px, 4vw, 24px);
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-elev);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: 999px;
  flex-wrap: wrap;
}

.breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "›";
  color: var(--text-muted);
  opacity: 0.7;
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb [aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
}

/* ============ Timeline ============ */
.timeline {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand), var(--brand-2));
  opacity: 0.35;
  border-radius: 2px;
}

.timeline li {
  position: relative;
  padding: 10px 14px 10px 34px;
  margin: 0 0 8px;
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.15);
}

.timeline li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.timeline strong {
  color: var(--brand);
  margin-right: 6px;
}

/* ============ Cards (articles, news, cases) ============ */
#news article,
#articles article {
  padding: 18px 20px;
  margin: 0 0 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease), border-color 0.32s var(--ease);
  overflow: hidden;
}

#news article::after,
#articles article::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--grad-brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(233, 69, 96, 0.35);
}

#news article:hover::after,
#articles article:hover::after {
  transform: scaleY(1);
}

#news article h3,
#articles article h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

#news article h3::after,
#articles article h3::after {
  display: none;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

#articles article a::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}

#articles article a:hover {
  color: #fff;
  background: var(--grad-brand);
  transform: translateX(3px);
  border-color: transparent;
}

#articles article a:hover::after {
  transform: translateX(3px);
}

#articles article[id^="article-"] {
  background: var(--grad-soft);
  border-left: 4px solid var(--brand-2);
}

#articles article[id^="article-"] h4 {
  color: var(--brand);
  margin-top: 0;
}

/* ============ Cases ============ */
#cases blockquote {
  position: relative;
  padding: 16px 20px 16px 46px;
  border-left: 0;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#cases blockquote::before {
  content: "“";
  position: absolute;
  left: 12px;
  top: 2px;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--brand);
  opacity: 0.5;
  font-family: Georgia, serif;
}

#cases blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* ============ HowTo ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 58px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

#howto ol li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
  border-color: rgba(78, 205, 196, 0.4);
}

/* ============ FAQ ============ */
#faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  margin-bottom: 10px;
  padding: 0 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
  overflow: hidden;
}

#faq details[open] {
  border-color: rgba(233, 69, 96, 0.4);
  box-shadow: var(--shadow);
  background: var(--grad-soft);
}

#faq details:hover {
  border-color: rgba(78, 205, 196, 0.5);
}

#faq summary {
  cursor: pointer;
  padding: 15px 34px 15px 0;
  font-weight: 600;
  color: var(--text);
  position: relative;
  list-style: none;
  font-size: 0.97rem;
  transition: color 0.25s var(--ease);
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--grad-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

#faq details[open] summary {
  color: var(--brand);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: var(--grad-brand);
  color: #fff;
}

#faq details p {
  margin: 0 0 16px;
  padding-top: 2px;
  animation: fadeIn 0.4s var(--ease);
}

/* ============ Knowledge ============ */
#knowledge h3 {
  margin-top: 1.2em;
}

/* ============ Contact ============ */
#contact p {
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--grad-soft);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

#contact p:last-child {
  margin-bottom: 0;
}

#contact br {
  display: block;
  content: "";
  margin-top: 2px;
}

/* ============ Sitemap & Links ============ */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.9rem;
  text-align: center;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), color 0.28s var(--ease), background 0.28s var(--ease), border-color 0.28s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(233, 69, 96, 0.32);
}

/* ============ Footer ============ */
footer {
  margin-top: 34px;
  padding: clamp(28px, 4vw, 46px) clamp(16px, 4vw, 40px) 40px;
  background: var(--grad);
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(233, 69, 96, 0.28), transparent 70%),
    radial-gradient(600px 300px at 85% 100%, rgba(78, 205, 196, 0.24), transparent 70%);
  pointer-events: none;
}

footer > * {
  position: relative;
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

.footer-meta p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.footer-meta p:first-child {
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.4px;
}

footer nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 18px 0 22px;
}

footer nav li {
  margin: 0;
}

footer nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  position: relative;
  padding-bottom: 3px;
}

footer nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--brand-3);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}

footer nav a:hover {
  color: #fff;
}

footer nav a:hover::after {
  width: 100%;
}

footer section {
  max-width: none;
  margin: 0 0 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: none;
  overflow: visible;
}

footer section::before {
  display: none;
}

footer section h3 {
  color: #fff;
  font-size: 0.98rem;
  margin: 0 0 6px;
}

footer section h3::after {
  display: none;
}

footer section p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.7;
}

/* ============ Back to top ============ */
#back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--grad-brand);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), box-shadow 0.3s var(--ease);
  z-index: 90;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 34px rgba(233, 69, 96, 0.5);
}

#back-to-top:active {
  transform: translateY(0) scale(0.96);
}

/* ============ Scroll reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .banner-carousel {
    min-height: 280px;
  }

  .site-search input {
    width: 160px;
  }

  .main-nav a {
    padding: 7px 9px;
    font-size: 0.86rem;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 120px;
  }

  #menu-toggle {
    display: inline-flex;
  }

  nav[aria-label="主导航"] {
    order: 5;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
  }

  nav[aria-label="主导航"].open {
    max-height: 520px;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 4px;
  }

  .main-nav a {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
  }

  .main-nav a::after {
    display: none;
  }

  .site-search {
    order: 4;
    flex: 1 1 100%;
    margin-top: 4px;
  }

  .site-search input {
    width: 100%;
    flex: 1;
  }

  .topbar {
    justify-content: center;
    text-align: center;
    font-size: 0.72rem;
  }

  section {
    border-radius: var(--radius);
    margin-left: 12px;
    margin-right: 12px;
  }

  .hero {
    margin-left: 12px;
    margin-right: 12px;
  }

  .breadcrumb {
    padding: 0 12px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .brand span {
    font-size: 1rem;
  }

  .brand svg {
    width: 34px;
    height: 34px;
  }

  .banner-carousel {
    min-height: 200px;
  }

  .banner-slide figcaption {
    padding: 30px 14px 12px;
    font-size: 0.82rem;
  }

  .hero-text {
    padding: 18px 16px;
  }

  .cta {
    width: 100%;
    margin-right: 0;
    padding: 12px 18px;
  }

  .hero-stats {
    gap: 8px;
  }

  .hero-stats li {
    flex: 1 1 30%;
    padding: 10px 8px;
    font-size: 0.74rem;
  }

  .hero-stats strong {
    font-size: 1.2rem;
  }

  section {
    padding: 18px 16px;
    margin-bottom: 18px;
  }

  #news article,
  #articles article {
    padding: 14px 15px;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }

  #howto ol li {
    padding: 12px 14px 12px 50px;
  }

  #howto ol li::before {
    left: 10px;
    width: 26px;
    height: 26px;
    font-size: 0.82rem;
  }

  footer nav ul {
    gap: 8px 14px;
  }

  #back-to-top {
    right: 14px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  #site-header,
  #back-to-top,
  .banner-carousel,
  .site-search,
  #menu-toggle,
  #theme-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  section {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  footer {
    background: #fff;
    color: #000;
  }

  footer section p,
  .footer-meta p {
    color: #333;
  }
}