:root {
  --brand: #f5a623;
  --brand-dark: #d98a0b;
  --brand-soft: rgba(245, 166, 35, 0.14);
  --accent: #4a90d9;
  --accent-green: #5cb85c;
  --bg: #f7f8fa;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-strong: rgba(255, 255, 255, 0.88);
  --text: #23272f;
  --text-soft: #5b6270;
  --text-muted: #8a91a0;
  --border: rgba(35, 39, 47, 0.1);
  --border-strong: rgba(35, 39, 47, 0.18);
  --shadow-sm: 0 2px 8px rgba(28, 32, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 32, 40, 0.1);
  --shadow-lg: 0 24px 60px rgba(28, 32, 40, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 72px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grad-hero: linear-gradient(135deg, #f5a623 0%, #f77f00 38%, #4a90d9 100%);
  --grad-soft: linear-gradient(135deg, rgba(245, 166, 35, 0.16), rgba(74, 144, 217, 0.14));
  --grad-line: linear-gradient(90deg, #f5a623, #4a90d9, #5cb85c);
  color-scheme: light;
}

html[data-theme="dark"],
body.dark {
  --bg: #0f1218;
  --bg-elevated: #171b23;
  --bg-glass: rgba(23, 27, 35, 0.66);
  --bg-glass-strong: rgba(23, 27, 35, 0.86);
  --text: #eef1f6;
  --text-soft: #b3bac7;
  --text-muted: #7e8798;
  --border: rgba(238, 241, 246, 0.12);
  --border-strong: rgba(238, 241, 246, 0.22);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --grad-hero: linear-gradient(135deg, #b87400 0%, #8a4b00 40%, #1d3f66 100%);
  --grad-soft: linear-gradient(135deg, rgba(245, 166, 35, 0.14), rgba(74, 144, 217, 0.12));
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 8% -8%, rgba(245, 166, 35, 0.16), transparent 62%),
    radial-gradient(800px 480px at 96% 4%, rgba(74, 144, 217, 0.14), transparent 60%),
    radial-gradient(700px 420px at 50% 100%, rgba(92, 184, 92, 0.1), transparent 65%);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

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

a {
  color: var(--brand-dark);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

html[data-theme="dark"] a,
body.dark a {
  color: var(--brand);
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

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

.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;
}

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

#site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--grad-line);
  opacity: 0.7;
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.brand svg {
  flex: 0 0 auto;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(245, 166, 35, 0.35);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.brand a:hover svg {
  transform: rotate(-8deg) scale(1.08);
  box-shadow: 0 10px 26px rgba(245, 166, 35, 0.5);
}

.brand-name {
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}

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

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

.nav-list a {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-soft);
  white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--text);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  transform: scaleX(1);
}

/* ============ Search ============ */
.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.site-search input[type="search"] {
  width: 190px;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: width 0.35s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.site-search input[type="search"]::placeholder {
  color: var(--text-muted);
}

.site-search input[type="search"]:focus {
  width: 240px;
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.site-search button {
  padding: 9px 18px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(245, 166, 35, 0.34);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    filter 0.25s var(--ease);
}

.site-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(245, 166, 35, 0.46);
  filter: brightness(1.05);
}

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

/* ============ Theme & Menu buttons ============ */
.theme-toggle,
.menu-toggle {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text);
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
    border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.theme-toggle:hover,
.menu-toggle:hover {
  transform: translateY(-2px) rotate(6deg);
  border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(245, 166, 35, 0.28);
}

.menu-toggle {
  display: none;
}

/* ============ Main layout ============ */
main {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 24px 80px;
}

main > section {
  position: relative;
  margin: 0 0 40px;
  padding: 36px clamp(20px, 3.4vw, 44px);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: rise 0.8s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 26%;
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease),
    transform 0.4s var(--ease);
}

main > section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-line);
  opacity: 0.55;
}

main > section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section > h2 {
  position: relative;
  margin: 0 0 26px;
  padding-left: 18px;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  box-shadow: 0 0 14px rgba(245, 166, 35, 0.5);
}

section h3 {
  margin: 30px 0 12px;
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--text);
}

section h3:first-of-type {
  margin-top: 0;
}

section h4 {
  margin: 20px 0 8px;
  font-size: 1rem;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

section p {
  margin: 0 0 14px;
  color: var(--text-soft);
  max-width: 78ch;
}

section strong {
  color: var(--text);
}

/* ============ Hero ============ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding: clamp(24px, 3.4vw, 44px) !important;
  background: var(--grad-hero) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border: none !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 0 30px 70px rgba(217, 138, 11, 0.32) !important;
  color: #fff;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 300px at 12% 10%, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(500px 320px at 88% 88%, rgba(0, 0, 0, 0.22), transparent 62%);
  pointer-events: none;
}

.hero::before {
  display: none;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s var(--ease), transform 1.2s var(--ease);
  pointer-events: none;
}

.hero-slider .slide.active {
  position: relative;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slider .slide svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero-text h1 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 3.1vw, 2.2rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}

.hero-text p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 62ch;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px !important;
}

.hero-stats .stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 18px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.hero-stats .stat:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.hero-stats .stat strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  margin: 0 0 28px;
  padding: 12px 20px;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 0.88rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--text-muted);
  opacity: 0.6;
}

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

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

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

/* ============ Lists ============ */
section ul,
section ol {
  margin: 0 0 18px;
  padding-left: 1.4em;
  color: var(--text-soft);
}

section ul li,
section ol li {
  margin: 0 0 10px;
  padding-left: 4px;
}

section ul li::marker {
  color: var(--brand);
}

section ol li::marker {
  color: var(--accent);
  font-weight: 700;
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0 0 0 26px !important;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--accent), var(--accent-green));
  opacity: 0.7;
}

.timeline li {
  position: relative;
  margin: 0 0 16px !important;
  padding: 14px 18px !important;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 22px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.timeline li:hover {
  transform: translateX(6px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

/* ============ Cards: news / articles ============ */
#news article,
#articles article {
  position: relative;
  margin: 0 0 18px;
  padding: 22px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

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

#news article h3,
#articles article h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
  transition: color 0.25s var(--ease);
}

#news article:hover h3,
#articles article:hover h3 {
  color: var(--brand-dark);
}

html[data-theme="dark"] #news article:hover h3,
html[data-theme="dark"] #articles article:hover h3,
body.dark #news article:hover h3,
body.dark #articles article:hover h3 {
  color: var(--brand);
}

#news time,
#articles time {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] #news time,
html[data-theme="dark"] #articles time,
body.dark #news time,
body.dark #articles time {
  color: var(--brand);
}

#articles article p {
  font-size: 0.94rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-dark);
  transition: gap 0.3s var(--ease), color 0.25s var(--ease);
}

html[data-theme="dark"] #articles article a,
body.dark #articles article a {
  color: var(--brand);
}

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

#articles article a:hover {
  gap: 10px;
  color: var(--accent);
}

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

/* ============ Blockquote / testimonials ============ */
#testimonials blockquote {
  position: relative;
  margin: 0 0 18px;
  padding: 24px 26px 20px 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

#testimonials blockquote::before {
  content: "“";
  position: absolute;
  top: 2px;
  right: 18px;
  font-size: 4rem;
  line-height: 1;
  color: var(--brand);
  opacity: 0.16;
  font-family: Georgia, serif;
}

#testimonials blockquote:hover {
  transform: translateY(-4px);
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md);
}

#testimonials blockquote p {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--text);
}

#testimonials blockquote footer {
  font-size: 0.86rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ============ FAQ details ============ */
#faq details {
  margin: 0 0 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}

#faq details:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

#faq details[open] {
  border-color: var(--brand);
  box-shadow: 0 12px 32px rgba(245, 166, 35, 0.18);
}

#faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background 0.3s var(--ease), color 0.25s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

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

html[data-theme="dark"] #faq details[open] summary,
body.dark #faq details[open] summary {
  color: var(--brand);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: linear-gradient(135deg, var(--accent), #2f6ba8);
}

#faq details p {
  margin: 0;
  padding: 4px 20px 20px;
  font-size: 0.94rem;
  animation: fadeIn 0.45s var(--ease);
}

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

/* ============ Contact / address ============ */
#contact address {
  font-style: normal;
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 22px 24px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

#contact address p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.94rem;
}

#contact address p::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 0.62em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

#contact a {
  word-break: break-all;
}

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

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

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

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  color: var(--brand-dark);
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] #sitemap a:hover,
html[data-theme="dark"] #links a:hover,
body.dark #sitemap a:hover,
body.dark #links a:hover {
  color: var(--brand);
}

/* ============ Footer ============ */
#site-footer {
  position: relative;
  margin-top: 20px;
  padding: 44px 24px 56px;
  text-align: center;
  color: var(--text-soft);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid var(--border);
}

#site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-line);
  opacity: 0.7;
}

#site-footer p {
  margin: 0 auto 8px;
  max-width: 720px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

#site-footer nav {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 6px;
}

#site-footer nav a {
  padding: 6px 14px;
  font-size: 0.86rem;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease), transform 0.25s var(--ease);
}

#site-footer nav a:hover {
  color: var(--brand-dark);
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-2px);
}

html[data-theme="dark"] #site-footer nav a:hover,
body.dark #site-footer nav a:hover {
  color: var(--brand);
}

/* ============ Back to top ============ */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 120;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(245, 166, 35, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    filter 0.3s var(--ease);
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 18px 40px rgba(245, 166, 35, 0.55);
  filter: brightness(1.06);
}

.back-to-top:active {
  transform: translateY(-1px) scale(0.98);
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .header-inner {
    gap: 14px;
  }

  .nav-list a {
    padding: 8px 9px;
    font-size: 0.88rem;
  }

  .site-search input[type="search"] {
    width: 150px;
  }

  .site-search input[type="search"]:focus {
    width: 190px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .header-inner {
    padding: 0 18px;
  }

  .menu-toggle {
    display: inline-flex;
    order: 5;
  }

  nav[aria-label="主导航"] {
    order: 10;
    flex: 1 1 100%;
    display: none;
    padding: 10px 0 16px;
    border-top: 1px solid var(--border);
  }

  #site-header.menu-open nav[aria-label="主导航"] {
    display: block;
    animation: fadeIn 0.35s var(--ease);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-list a {
    display: block;
    padding: 11px 14px;
    font-size: 0.95rem;
    background: var(--bg-glass-strong);
    border: 1px solid transparent;
  }

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

  .nav-list a:hover {
    border-color: var(--border-strong);
  }

  .site-search {
    order: 6;
    flex: 1 1 100%;
    padding-bottom: 4px;
  }

  .site-search input[type="search"],
  .site-search input[type="search"]:focus {
    width: 100%;
  }

  .site-search button {
    flex: 0 0 auto;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  main {
    padding: 24px 18px 64px;
  }

  main > section {
    padding: 28px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 28px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
    line-height: 1.72;
  }

  .brand-name {
    font-size: 1.05rem;
  }

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

  .theme-toggle,
  .menu-toggle {
    width: 38px;
    height: 38px;
  }

  .hero {
    border-radius: var(--radius-lg) !important;
    gap: 18px;
  }

  .hero-stats {
    gap: 8px;
  }

  .hero-stats .stat {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

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

  .breadcrumb {
    padding: 10px 16px;
    font-size: 0.82rem;
  }

  section > h2 {
    padding-left: 14px;
    margin-bottom: 20px;
  }

  section > h2::before {
    width: 5px;
  }

  #news article,
  #articles article {
    padding: 18px 18px;
  }

  #testimonials blockquote {
    padding: 20px 20px 16px 22px;
  }

  #faq summary {
    padding: 14px 48px 14px 16px;
    font-size: 0.94rem;
  }

  #faq details p {
    padding: 2px 16px 16px;
  }

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

  .back-to-top {
    right: 16px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  #site-footer {
    padding: 34px 18px 46px;
  }
}

@media (max-width: 380px) {
  .header-inner {
    padding: 0 14px;
  }

  main {
    padding: 18px 14px 56px;
  }

  main > section {
    padding: 22px 16px;
  }
}

/* ============ Motion preferences ============ */
@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;
  }

  main > section {
    animation: none !important;
  }
}

/* ============ Print ============ */
@media print {
  #site-header,
  .back-to-top,
  .site-search,
  .theme-toggle,
  .menu-toggle,
  #site-footer nav {
    display: none !important;
  }

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

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