:root {
  --primary: #5b3df5;
  --primary-dark: #4a2fd0;
  --primary-light: #8f7bff;
  --primary-soft: #c4b8ff;
  --accent: #ff5e8a;
  --accent-2: #00c2a8;
  --bg: #f7f5ff;
  --bg-elevated: #ffffff;
  --bg-soft: #f0ecff;
  --text: #1c1830;
  --text-soft: #4a4566;
  --text-muted: #767293;
  --border: rgba(91, 61, 245, 0.14);
  --border-strong: rgba(91, 61, 245, 0.28);
  --shadow-sm: 0 2px 8px rgba(60, 40, 140, 0.08);
  --shadow-md: 0 8px 28px rgba(60, 40, 140, 0.12);
  --shadow-lg: 0 20px 56px rgba(60, 40, 140, 0.18);
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --maxw: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

html[data-theme="dark"],
body.dark-mode {
  --bg: #0e0b1e;
  --bg-elevated: #17132e;
  --bg-soft: #1e1938;
  --text: #f2efff;
  --text-soft: #c8c2e6;
  --text-muted: #948fb8;
  --border: rgba(143, 123, 255, 0.22);
  --border-strong: rgba(143, 123, 255, 0.42);
  --glass-bg: rgba(30, 25, 56, 0.62);
  --glass-border: rgba(143, 123, 255, 0.25);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(91, 61, 245, 0.12), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 94, 138, 0.10), transparent 55%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

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

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); }

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

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

li { margin-bottom: 0.5em; }

li::marker { color: var(--primary); }

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

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

blockquote {
  margin: 0 0 1.2em;
  padding: 1.1em 1.4em;
  border-left: 4px solid var(--primary);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
}

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

figure { margin: 0; }

figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.8em;
}

/* ---------- Header ---------- */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(60, 40, 140, 0.06);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

header[role="banner"] > div {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

header[role="banner"] > div > a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

header[role="banner"] > div > a:hover { transform: translateY(-2px); }

header[role="banner"] > div > a svg {
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease);
}

header[role="banner"] > div > a:hover svg { transform: rotate(-6deg) scale(1.05); }

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

header nav[aria-label="主导航"] ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

header nav[aria-label="主导航"] li { margin: 0; }

header nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav[aria-label="主导航"] a:hover {
  color: var(--primary);
  background: rgba(91, 61, 245, 0.1);
  transform: translateY(-2px);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 1 300px;
  min-width: 0;
}

header form[role="search"] label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

header form[role="search"] input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

header form[role="search"] input::placeholder { color: var(--text-muted); }

header form[role="search"] input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.15);
  outline: none;
}

header form[role="search"] button {
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

header form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(91, 61, 245, 0.35);
  filter: brightness(1.05);
}

header button[data-action="toggle-theme"],
header button[data-action="toggle-menu"] {
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s var(--ease);
}

header button[data-action="toggle-theme"]:hover,
header button[data-action="toggle-menu"]:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(91, 61, 245, 0.08);
  transform: translateY(-2px);
}

header button[data-action="toggle-menu"] { display: none; }

/* ---------- Main ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ---------- Breadcrumb ---------- */
main > nav[aria-label="面包屑导航"] {
  font-size: 0.85rem;
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.9rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}

main > nav[aria-label="面包屑导航"] li {
  margin: 0;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
}

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--border-strong);
}

main > nav[aria-label="面包屑导航"] a { color: var(--text-soft); font-weight: 600; }
main > nav[aria-label="面包屑导航"] a:hover { color: var(--primary); }
main > nav[aria-label="面包屑导航"] li[aria-current="page"] { color: var(--primary); font-weight: 700; }

/* ---------- Sections (cards) ---------- */
main > section {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 1rem + 2vw, 2.8rem);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
  animation: fadeUp 0.7s var(--ease) both;
}

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

main > section > h2 {
  position: relative;
  padding-bottom: 0.5rem;
}

main > section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

main > section > h2 + p { margin-top: 1rem; }

/* staggered reveal */
main > section:nth-of-type(1)  { animation-delay: 0.02s; }
main > section:nth-of-type(2)  { animation-delay: 0.06s; }
main > section:nth-of-type(3)  { animation-delay: 0.10s; }
main > section:nth-of-type(4)  { animation-delay: 0.14s; }
main > section:nth-of-type(5)  { animation-delay: 0.18s; }
main > section:nth-of-type(6)  { animation-delay: 0.22s; }
main > section:nth-of-type(7)  { animation-delay: 0.26s; }
main > section:nth-of-type(8)  { animation-delay: 0.30s; }
main > section:nth-of-type(9)  { animation-delay: 0.34s; }
main > section:nth-of-type(10) { animation-delay: 0.38s; }

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

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

@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ---------- Hero ---------- */
#hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 3rem);
  align-items: start;
  background:
    radial-gradient(900px 400px at 0% 0%, rgba(255, 94, 138, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(0, 194, 168, 0.16), transparent 55%),
    linear-gradient(135deg, #5b3df5 0%, #7a5cff 45%, #b39dff 100%);
  border: none;
  color: #fff;
  overflow: hidden;
}

html[data-theme="dark"] #hero,
body.dark-mode #hero {
  background:
    radial-gradient(900px 400px at 0% 0%, rgba(255, 94, 138, 0.22), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(0, 194, 168, 0.18), transparent 55%),
    linear-gradient(135deg, #2a1a6e 0%, #3d2a9e 45%, #5b3df5 100%);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18), transparent 35%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.12), transparent 40%);
  pointer-events: none;
}

#hero > div { position: relative; z-index: 1; }

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
}

#hero p { color: rgba(255, 255, 255, 0.92); }

#hero p strong { color: #fff; }

#hero a {
  display: inline-block;
  margin: 0.4rem 0.6rem 0 0;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #3d2a9e;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#hero a + a {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#hero a:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  background: #fff;
  color: #3d2a9e;
}

#hero > div[aria-label="平台数据概览"] {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#hero > div[aria-label="平台数据概览"] ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#hero > div[aria-label="平台数据概览"] li {
  margin: 0;
  padding: 1rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  text-align: center;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#hero > div[aria-label="平台数据概览"] li:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

#hero > div[aria-label="平台数据概览"] strong {
  display: block;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

#hero > div[aria-label="平台数据概览"] span {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.25rem;
}

#hero figure {
  grid-column: 1 / -1;
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  animation: floatY 7s ease-in-out infinite;
}

#hero figure svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

#hero figcaption {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.18);
  padding: 0.6rem 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin: 0;
}

/* ---------- Intro ---------- */
#intro ul {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  padding: 0;
}

#intro ul li {
  margin: 0;
  padding: 0.95rem 1.1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#intro ul li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

/* ---------- Brand ---------- */
#brand ol {
  counter-reset: brand-step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

#brand ol li {
  margin: 0;
  counter-increment: brand-step;
  position: relative;
  padding: 0.9rem 1.1rem 0.9rem 3.2rem;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#brand ol li::before {
  content: counter(brand-step);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

#brand ol li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

#brand ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
  list-style: none;
  padding: 0;
}

#brand ul li {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#brand ul li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

/* ---------- Products ---------- */
#products h3 {
  margin-top: 1.6rem;
  padding-left: 0.9rem;
  border-left: 4px solid var(--primary);
}

#products ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  list-style: none;
  padding: 0;
}

#products ul li {
  margin: 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, var(--bg-soft), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#products ul li:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* ---------- Solutions ---------- */
#solutions h3 {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#solutions h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  flex-shrink: 0;
}

#solutions ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  list-style: none;
  padding: 0;
}

#solutions ul li {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#solutions ul li:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-sm);
}

/* ---------- Cases ---------- */
#cases h3 {
  margin-top: 1.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border-strong);
}

#cases blockquote {
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

#cases blockquote p::before {
  content: "“";
  font-size: 1.6rem;
  color: var(--primary);
  font-weight: 900;
  margin-right: 0.2rem;
  line-height: 0;
}

/* ---------- News ---------- */
#news {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  align-items: start;
}

#news > h2 { grid-column: 1 / -1; }

#news article {
  padding: 1.2rem 1.3rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

#news article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-2));
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

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

#news article:hover::before {
  opacity: 1;
  animation: shimmer 2s linear infinite;
}

#news article h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
#news article p { margin-bottom: 0.5rem; font-size: 0.92rem; }

/* ---------- Articles ---------- */
#articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  align-items: start;
}

#articles > h2,
#articles > p { grid-column: 1 / -1; }

#articles article {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.3rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  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);
}

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

#articles article h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
#articles article p { font-size: 0.92rem; flex: 1 1 auto; }

#articles article a {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(91, 61, 245, 0.1);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

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

#articles article a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateX(4px);
}

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

/* ---------- HowTo ---------- */
#howto ol {
  counter-reset: howto-step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

#howto ol li {
  margin: 0;
  counter-increment: howto-step;
  position: relative;
  padding: 1rem 1.1rem 1rem 3.4rem;
  background: linear-gradient(135deg, var(--bg-soft), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(howto-step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(91, 61, 245, 0.35);
}

#howto ol li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

#howto ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
  list-style: none;
  padding: 0;
}

#howto ul li {
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

#howto h3 { margin-top: 1.5rem; }

/* ---------- Knowledge ---------- */
#knowledge h3 {
  margin-top: 1.5rem;
  padding-left: 0.9rem;
  border-left: 4px solid var(--accent);
}

/* ---------- FAQ ---------- */
#faq details {
  margin-bottom: 0.7rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

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

#faq details[open] {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  background: var(--bg-elevated);
}

#faq summary {
  padding: 1rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 3rem;
  color: var(--text);
  transition: color 0.25s var(--ease);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(91, 61, 245, 0.12);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.05rem;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

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

#faq summary:hover { color: var(--primary); }

#faq details > p {
  padding: 0 1.2rem 1.1rem;
  margin: 0;
  font-size: 0.94rem;
  animation: fadeUp 0.4s var(--ease) both;
}

/* ---------- Notes ---------- */
#notes ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.7rem;
}

#notes ul li {
  margin: 0;
  padding: 0.9rem 1rem 0.9rem 2.6rem;
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#notes ul li::before {
  content: "!";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.3rem;
  height: 1.3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff9a5e);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

#notes ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Contact ---------- */
#contact ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.7rem;
}

#contact ul li {
  margin: 0;
  padding: 0.9rem 1.1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

#contact h3 { margin-top: 1.5rem; }

/* ---------- Sitemap & Links ---------- */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: all 0.3s var(--ease);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(91, 61, 245, 0.3);
}

/* ---------- Legal ---------- */
#legal h3 {
  margin-top: 1.5rem;
  padding-left: 0.9rem;
  border-left: 4px solid var(--primary-light);
}

/* ---------- Footer ---------- */
footer[role="contentinfo"] {
  position: relative;
  background: linear-gradient(160deg, #1c1830 0%, #2a1a6e 100%);
  color: rgba(255, 255, 255, 0.82);
  padding: 3rem 1.5rem 2rem;
  margin-top: 2rem;
}

footer[role="contentinfo"] > div {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

footer[role="contentinfo"] p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  margin: 0;
}

footer[role="contentinfo"] p strong {
  color: #fff;
  font-size: 1rem;
}

footer[role="contentinfo"] nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0.6rem 0;
}

footer[role="contentinfo"] nav li { margin: 0; }

footer[role="contentinfo"] nav a {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: all 0.3s var(--ease);
}

footer[role="contentinfo"] nav a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

footer button[data-action="back-to-top"] {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 90;
  padding: 0.7rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(91, 61, 245, 0.4);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

footer button[data-action="back-to-top"]:hover {
  box-shadow: 0 14px 36px rgba(91, 61, 245, 0.55);
  transform: translateY(-3px);
}

body.scrolled footer button[data-action="back-to-top"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

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

  #hero figure {
    grid-column: auto;
  }

  header[role="banner"] > div {
    gap: 0.8rem;
  }

  header form[role="search"] {
    flex: 1 1 220px;
  }

  header nav[aria-label="主导航"] ul {
    gap: 0.1rem;
  }

  header nav[aria-label="主导航"] a {
    padding: 0.4rem 0.55rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 860px) {
  header button[data-action="toggle-menu"] { display: inline-block; }

  header nav[aria-label="主导航"] {
    order: 10;
    flex: 1 1 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s var(--ease), opacity 0.35s var(--ease), margin 0.35s var(--ease);
  }

  header nav[aria-label="主导航"][aria-expanded="true"],
  header nav[aria-label="主导航"].open {
    max-height: 520px;
    opacity: 1;
    margin-top: 0.4rem;
  }

  header nav[aria-label="主导航"] ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.6rem;
    box-shadow: var(--shadow-md);
  }

  header nav[aria-label="主导航"] a {
    display: block;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
  }

  header form[role="search"] {
    flex: 1 1 100%;
    order: 11;
  }
}

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

  main {
    padding: 1rem 0.9rem 3rem;
    gap: 1.6rem;
  }

  main > section {
    border-radius: var(--radius-md);
    padding: 1.2rem 1rem;
  }

  #hero {
    padding: 1.5rem 1.1rem;
  }

  #hero a {
    display: block;
    text-align: center;
    margin: 0.5rem 0 0;
  }

  #hero > div[aria-label="平台数据概览"] ul {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  #hero > div[aria-label="平台数据概览"] li {
    padding: 0.8rem 0.5rem;
  }

  #hero > div[aria-label="平台数据概览"] span {
    font-size: 0.72rem;
  }

  #news,
  #articles {
    grid-template-columns: 1fr;
  }

  #brand ul,
  #products ul,
  #solutions ul,
  #howto ul,
  #notes ul,
  #contact ul {
    grid-template-columns: 1fr;
  }

  #faq summary {
    padding: 0.9rem 2.8rem 0.9rem 1rem;
    font-size: 0.95rem;
  }

  footer[role="contentinfo"] {
    padding: 2.2rem 1rem 1.6rem;
  }

  footer button[data-action="back-to-top"] {
    right: 0.9rem;
    bottom: 0.9rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.8rem;
  }

  main > nav[aria-label="面包屑导航"] ol {
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
  }
}

@media (max-width: 400px) {
  #hero > div[aria-label="平台数据概览"] ul {
    grid-template-columns: 1fr;
  }

  header[role="banner"] > div > a span {
    display: none;
  }
}

/* ---------- Motion / Accessibility ---------- */
@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 { opacity: 1; transform: none; }

  #hero figure { animation: none; }
}

@media (prefers-contrast: more) {
  :root {
    --border: rgba(91, 61, 245, 0.4);
    --border-strong: rgba(91, 61, 245, 0.6);
  }

  a { text-decoration: underline; }
}

@media print {
  header[role="banner"],
  footer button[data-action="back-to-top"],
  #hero figure {
    display: none;
  }

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

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

  a { color: #000; text-decoration: underline; }
}