:root {
  --brand: #3d5afe;
  --brand-2: #7c4dff;
  --brand-3: #00bcd4;
  --accent: #ffd54f;
  --bg: #f4f6fb;
  --bg-soft: #ffffff;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --text: #1b2133;
  --text-soft: #4a5468;
  --text-muted: #6b7488;
  --line: rgba(27, 33, 51, 0.1);
  --shadow-sm: 0 2px 8px rgba(24, 34, 66, 0.06);
  --shadow-md: 0 10px 30px rgba(24, 34, 66, 0.1);
  --shadow-lg: 0 24px 60px rgba(24, 34, 66, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --header-h: 72px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --glass-border: rgba(255, 255, 255, 0.55);
  --blur: 16px;
}

html[data-theme="dark"] {
  --brand: #7c8cff;
  --brand-2: #a78bfa;
  --brand-3: #22d3ee;
  --accent: #ffd54f;
  --bg: #0c101c;
  --bg-soft: #131a2b;
  --bg-elev: rgba(23, 31, 51, 0.72);
  --text: #eef2ff;
  --text-soft: #c2cbe3;
  --text-muted: #8e9ab8;
  --line: rgba(255, 255, 255, 0.12);
  --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);
  --glass-border: rgba(255, 255, 255, 0.14);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -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", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(61, 90, 254, 0.14), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(124, 77, 255, 0.12), transparent 55%),
    radial-gradient(900px 600px at 50% 120%, rgba(0, 188, 212, 0.1), transparent 60%);
  background-attachment: fixed;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  overflow-x: hidden;
}

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

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

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

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

h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 800;
}

h3 {
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  font-weight: 700;
}

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

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

li {
  margin-bottom: 0.4em;
}

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

blockquote {
  margin: 0 0 1em;
  padding: 1em 1.25em;
  border-left: 4px solid var(--brand);
  background: var(--bg-elev);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-sm);
}

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

time {
  font-size: 0.85em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.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);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

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

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

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

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

.brand svg {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(61, 90, 254, 0.35);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.brand > a:hover svg {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 10px 26px rgba(124, 77, 255, 0.45);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--brand), var(--brand-2), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand);
}

.brand-slogan {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 14px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

#main-nav {
  flex: 1;
  min-width: 0;
}

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

#main-nav li {
  margin: 0;
}

#main-nav a {
  display: inline-block;
  padding: 7px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: 999px;
  position: relative;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

#main-nav a:hover {
  color: var(--brand);
  background: rgba(61, 90, 254, 0.08);
  transform: translateY(-1px);
}

#main-nav a:hover::after {
  width: 40%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

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

#site-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(61, 90, 254, 0.16);
}

#search-input {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  width: 190px;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  border-radius: 999px;
}

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

#site-search button {
  border: 0;
  cursor: pointer;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  border-radius: 999px;
  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 16px rgba(61, 90, 254, 0.4);
  filter: brightness(1.05);
}

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

#theme-toggle:hover,
#menu-toggle:hover {
  transform: translateY(-2px) rotate(6deg);
  background: rgba(61, 90, 254, 0.1);
  box-shadow: var(--shadow-sm);
}

#menu-toggle {
  display: none;
}

/* ============ Main layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 60px;
}

main > section {
  margin-bottom: 26px;
  padding: clamp(20px, 3vw, 40px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

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

/* 滚动进入动画 */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ Hero ============ */
#hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(61, 90, 254, 0.94), rgba(124, 77, 255, 0.9) 55%, rgba(0, 188, 212, 0.85)),
    var(--bg-soft);
  border: none;
  color: #fff;
  padding: clamp(26px, 4vw, 52px);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.28), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -40% -12%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at center, rgba(255, 213, 79, 0.28), transparent 62%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatGlow 15s ease-in-out infinite reverse;
}

@keyframes floatGlow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-30px, 24px, 0) scale(1.08); }
}

.hero-slider {
  position: relative;
  z-index: 1;
}

.slide {
  display: none;
  animation: fadeSlide 0.6s var(--ease);
}

.slide:first-child,
.slide.is-active {
  display: block;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

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

#hero p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 62ch;
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
}

#hero strong {
  color: var(--accent);
  font-weight: 800;
}

.cta {
  display: inline-block;
  margin: 6px 10px 6px 0;
  padding: 12px 26px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1b2133;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}

.cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
  color: var(--brand);
}

.cta-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.slider-dots {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.slider-dots button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.slider-dots button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.3);
}

.slider-dots button[aria-selected="true"] {
  background: var(--accent);
  color: #1b2133;
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(255, 213, 79, 0.5);
}

.hero-stats {
  position: relative;
  z-index: 1;
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hero-stats .stat {
  padding: 16px 12px;
  text-align: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease);
}

.hero-stats .stat:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.22);
}

.stat-num {
  display: block;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.stat-num::after {
  content: "+";
  font-size: 0.6em;
  margin-left: 2px;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.86);
  margin-top: 2px;
}

/* ============ Breadcrumb ============ */
#breadcrumb {
  padding: 12px 20px;
  margin-bottom: 26px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-sm);
}

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

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

#breadcrumb li + li::before {
  content: "›";
  color: var(--text-muted);
  font-size: 1.05em;
}

#breadcrumb a {
  color: var(--text-soft);
  font-weight: 600;
}

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

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

/* ============ Content blocks ============ */
main > section > p:first-of-type {
  font-size: 1.02rem;
}

main > section > h2 {
  position: relative;
  padding-left: 18px;
}

main > section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2), var(--brand-3));
}

main > section > h3 {
  margin-top: 1.6em;
  color: var(--text);
}

main > section > h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  vertical-align: middle;
  transform: translateY(-2px);
}

/* 列表卡片化 */
#products ul,
#solutions ul,
#howto ul,
#howto ol,
#knowledge ul,
#contact ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

#products ul li,
#howto ul li,
#howto ol li,
#knowledge ul li,
#contact ul li {
  position: relative;
  padding: 12px 16px 12px 40px;
  margin: 0;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#products ul li:hover,
#howto ul li:hover,
#howto ol li:hover,
#knowledge ul li:hover,
#contact ul li:hover {
  transform: translateX(4px);
  border-color: rgba(61, 90, 254, 0.4);
  box-shadow: var(--shadow-sm);
}

#products ul li::before,
#howto ul li::before,
#knowledge ul li::before {
  content: "✦";
  position: absolute;
  left: 14px;
  top: 12px;
  color: var(--brand);
  font-size: 0.9rem;
}

#howto ol {
  counter-reset: step;
}

#howto ol li {
  counter-increment: step;
  padding-left: 48px;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 12px rgba(61, 90, 254, 0.35);
}

#contact ul {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

#contact ul li::before {
  content: "•";
  position: absolute;
  left: 16px;
  top: 10px;
  color: var(--brand);
  font-size: 1.2rem;
}

/* 案例 */
#cases blockquote {
  position: relative;
  margin: 0 0 14px;
  padding: 18px 20px 18px 52px;
  border-left: 0;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

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

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

/* 新闻 */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.news-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  padding: 14px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.news-list li:hover {
  transform: translateX(4px);
  border-color: rgba(61, 90, 254, 0.4);
  box-shadow: var(--shadow-sm);
}

.news-list time {
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(61, 90, 254, 0.1);
}

/* 文章卡片 */
#articles {
  display: block;
}

#articles > article {
  position: relative;
  margin-bottom: 16px;
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  overflow: hidden;
}

#articles > article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

#articles > article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(124, 77, 255, 0.35);
}

#articles > article:hover::before {
  transform: scaleX(1);
}

#articles > article h3 {
  margin-top: 0;
  font-size: 1.08rem;
}

#articles > article h3::before {
  display: none;
}

#articles > article p:first-of-type {
  margin-bottom: 0.5em;
}

#articles > article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(61, 90, 254, 0.1);
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s var(--ease);
}

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

#articles > article a:hover {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  transform: translateY(-2px);
}

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

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

#faq details:hover {
  border-color: rgba(61, 90, 254, 0.35);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  border-color: rgba(61, 90, 254, 0.5);
  box-shadow: var(--shadow-md);
}

#faq summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 20px;
  font-weight: 700;
  color: var(--text);
  transition: background-color 0.3s var(--ease), color 0.3s 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;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(61, 90, 254, 0.12);
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease), color 0.35s var(--ease);
}

#faq details[open] summary {
  background: linear-gradient(120deg, rgba(61, 90, 254, 0.1), rgba(124, 77, 255, 0.08));
  color: var(--brand);
}

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

#faq summary:hover {
  background: rgba(61, 90, 254, 0.06);
}

#faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-soft);
  animation: fadeSlide 0.4s var(--ease);
}

/* 网站地图 & 友情链接 */
#sitemap ul,
#links ul {
  grid-template-columns: repeat(auto-fill, minmax(160px, 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-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 24px rgba(61, 90, 254, 0.35);
}

/* ============ Footer ============ */
#site-footer {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto 30px;
  padding: clamp(24px, 3.5vw, 44px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-sm);
  margin-left: 20px;
  margin-right: 20px;
}

@media (min-width: 1240px) {
  #site-footer {
    margin-left: auto;
    margin-right: auto;
  }
}

.footer-col h3 {
  font-size: 1rem;
  margin-bottom: 0.6em;
  color: var(--text);
}

.footer-col h3::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  vertical-align: middle;
}

.footer-col p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-bottom a {
  font-weight: 700;
  color: var(--brand);
}

/* 返回顶部 */
#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(61, 90, 254, 0.45);
  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.35s var(--ease);
}

#back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 18px 36px rgba(124, 77, 255, 0.5);
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .brand-slogan {
    display: none;
  }

  #search-input {
    width: 150px;
  }

  #main-nav a {
    padding: 6px 9px;
    font-size: 0.86rem;
  }
}

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

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
  }

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

  #main-nav {
    order: 3;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease);
    opacity: 0;
  }

  #main-nav.is-open {
    max-height: 520px;
    opacity: 1;
  }

  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }

  #main-nav a {
    display: block;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
  }

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

  .header-actions {
    margin-left: auto;
  }

  #site-search {
    display: none;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  main {
    padding: 18px 16px 50px;
  }

  main > section {
    border-radius: var(--radius);
  }
}

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

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

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

  #hero {
    padding: 22px 18px;
  }

  #hero p {
    font-size: 0.94rem;
  }

  .cta {
    display: block;
    text-align: center;
    margin-right: 0;
    padding: 12px 20px;
  }

  .hero-stats {
    gap: 10px;
  }

  .hero-stats .stat {
    padding: 12px 8px;
  }

  #breadcrumb {
    padding: 10px 14px;
  }

  #breadcrumb ol {
    font-size: 0.8rem;
  }

  #contact ul {
    grid-template-columns: 1fr;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #articles > article {
    padding: 16px;
  }

  #faq summary {
    padding: 14px 46px 14px 16px;
    font-size: 0.95rem;
  }

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

  #site-footer {
    margin-left: 16px;
    margin-right: 16px;
    padding: 22px 18px;
  }
}

@media (max-width: 380px) {
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }
}

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

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

/* ============ Print ============ */
@media print {
  #site-header,
  #back-to-top,
  .slider-dots,
  .header-actions {
    display: none !important;
  }

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

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