:root {
  --bg: #f4f5fa;
  --bg-alt: #ffffff;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --text: #1a1a2e;
  --text-soft: #4a4a63;
  --text-mute: #7c7c93;
  --brand: #e94560;
  --brand-2: #7b2ff7;
  --brand-3: #00c2ff;
  --accent: #ffb703;
  --border: rgba(26, 26, 46, 0.09);
  --shadow: 0 10px 30px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 22px 60px rgba(26, 26, 46, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --header-h: 72px;
  --grad-hero: linear-gradient(135deg, #1a1a2e 0%, #3a1c71 42%, #7b2ff7 78%, #e94560 100%);
  --grad-btn: linear-gradient(135deg, #e94560 0%, #7b2ff7 100%);
  --grad-line: linear-gradient(90deg, #e94560, #7b2ff7, #00c2ff);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-theme="dark"] {
  --bg: #0d0d1a;
  --bg-alt: #15152a;
  --bg-elev: rgba(30, 30, 56, 0.62);
  --text: #eef0f8;
  --text-soft: #c3c6d8;
  --text-mute: #8b8fa8;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --grad-hero: linear-gradient(135deg, #0d0d1a 0%, #241447 45%, #4b1a8a 78%, #b3273f 100%);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0d0d1a;
    --bg-alt: #15152a;
    --bg-elev: rgba(30, 30, 56, 0.62);
    --text: #eef0f8;
    --text-soft: #c3c6d8;
    --text-mute: #8b8fa8;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
    --grad-hero: linear-gradient(135deg, #0d0d1a 0%, #241447 45%, #4b1a8a 78%, #b3273f 100%);
  }
}

*,
*::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", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1000px 520px at 12% -8%, rgba(123, 47, 247, 0.14), transparent 62%),
    radial-gradient(880px 480px at 92% 4%, rgba(233, 69, 96, 0.12), transparent 60%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  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);
}

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

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

h1 { font-size: clamp(1.7rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: clamp(1.08rem, 1.8vw, 1.28rem); }

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

li { margin-bottom: 0.35em; }

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

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

time {
  color: var(--text-mute);
  font-size: 0.86rem;
}

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

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

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

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

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

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

.logo svg {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.32);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.logo:hover svg {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 10px 26px rgba(123, 47, 247, 0.45);
}

.logo span {
  background: var(--grad-btn);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

.nav-list li { margin: 0; }

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

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

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--text);
  background: rgba(123, 47, 247, 0.1);
  transform: translateY(-1px);
}

.nav-list a:hover::after { width: 46%; }

.search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 14px;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  flex-shrink: 0;
}

.search-form:focus-within {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(123, 47, 247, 0.16);
}

.search-form input[type="search"] {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  padding: 6px 0;
  width: 150px;
  outline: none;
  font-family: inherit;
}

.search-form input::placeholder { color: var(--text-mute); }

.search-form button {
  border: 0;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--grad-btn);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  font-family: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

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

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

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

#menu-toggle { display: none; }

/* ============ HERO ============ */
#hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
  color: #fff;
  padding: clamp(56px, 9vw, 110px) 20px clamp(64px, 9vw, 120px);
  isolation: isolate;
}

#hero::before,
#hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  z-index: -1;
  animation: floatBlob 14s ease-in-out infinite alternate;
}

#hero::before {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #e94560, transparent 68%);
  top: -140px; right: -80px;
}

#hero::after {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #00c2ff, transparent 70%);
  bottom: -220px; left: -120px;
  animation-delay: -6s;
}

@keyframes floatBlob {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-28px, 32px, 0) scale(1.12); }
}

.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

#hero-title {
  color: #fff;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.5em;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.96rem, 1.5vw, 1.08rem);
  max-width: 820px;
  margin: 0 auto 2em;
  line-height: 1.85;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto 2.2em;
  max-width: 880px;
}

.stat {
  padding: 18px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.stat:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.17);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.stat .num {
  display: block;
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, #fff, #ffd6df 60%, #b9e6ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat .label {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 4px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, #fff 0%, #ffe3ea 100%);
  color: #1a1a2e;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.btn-primary:hover {
  color: #1a1a2e;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 44px rgba(233, 69, 96, 0.5);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 44px rgba(0, 194, 255, 0.35);
}

/* ============ MAIN LAYOUT ============ */
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

main > section:not(#hero) {
  margin-top: clamp(30px, 4.5vw, 54px);
  padding: clamp(24px, 3.4vw, 44px);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s var(--ease);
}

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

main > section:not(#hero):hover {
  box-shadow: var(--shadow-lg);
}

main > section > h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}

main > section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--grad-line);
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  margin: 22px auto 0;
  max-width: 1240px;
  font-size: 0.86rem;
}

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

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

.breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--text-mute);
  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; }

/* ============ ARTICLES & CARDS ============ */
#news article,
#articles article {
  padding: 22px 24px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

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

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

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

#news article h3,
#articles article h3 {
  margin-bottom: 0.35em;
  transition: color 0.3s var(--ease);
}

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

#news article > p:first-of-type,
#articles article > p:first-of-type {
  font-size: 0.86rem;
  color: var(--text-mute);
  margin-bottom: 0.7em;
}

#news article a,
#articles article a {
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(233, 69, 96, 0.1);
  color: var(--brand);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

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

/* ============ HOWTO ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 12px;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 58px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-soft);
  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;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.86rem;
  font-weight: 800;
  color: #fff;
  background: var(--grad-btn);
  box-shadow: 0 6px 16px rgba(233, 69, 96, 0.35);
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: rgba(123, 47, 247, 0.35);
  box-shadow: var(--shadow);
}

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

#faq details[open] {
  border-color: rgba(123, 47, 247, 0.4);
  box-shadow: var(--shadow);
}

#faq summary {
  cursor: pointer;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  position: relative;
  transition: color 0.3s var(--ease), background 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;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-btn);
  transition: transform 0.35s var(--ease);
}

#faq details[open] summary::after {
  transform: translateY(-50%) rotate(135deg);
}

#faq summary:hover {
  color: var(--brand);
  background: rgba(123, 47, 247, 0.06);
}

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

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

/* ============ CONTACT ============ */
#contact ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

#contact ul li {
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-soft);
  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);
  border-color: rgba(0, 194, 255, 0.4);
  box-shadow: var(--shadow);
}

/* ============ SITEMAP & LINKS ============ */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-soft);
  font-size: 0.9rem;
  transition: transform 0.28s var(--ease), background 0.28s var(--ease), color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-btn);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(123, 47, 247, 0.35);
}

/* ============ FOOTER ============ */
footer {
  margin-top: 40px;
  padding: clamp(34px, 5vw, 60px) 20px 26px;
  background: linear-gradient(180deg, transparent, rgba(123, 47, 247, 0.08));
  border-top: 1px solid var(--border);
}

footer > section {
  max-width: 1240px;
  margin: 0 auto 26px;
  padding: 0;
}

footer > section h2 {
  font-size: 1.05rem;
}

footer > section h3 {
  font-size: 0.94rem;
  color: var(--text-soft);
  margin-top: 1em;
}

footer > section p {
  font-size: 0.9rem;
  color: var(--text-mute);
}

footer address {
  font-style: normal;
  color: var(--text-mute);
  font-size: 0.9rem;
  line-height: 1.9;
}

footer address a { color: var(--text-soft); }
footer address a:hover { color: var(--brand); }

footer .copyright {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-mute);
}

/* ============ BACK TO TOP ============ */
#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--grad-btn);
  box-shadow: 0 12px 30px rgba(233, 69, 96, 0.42);
  display: grid;
  place-items: center;
  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);
  z-index: 90;
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 18px 42px rgba(123, 47, 247, 0.55);
}

/* ============ SCROLL REVEAL ============ */
.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: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  #hero::before, #hero::after { animation: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .header-inner { gap: 12px; }
  .search-form input[type="search"] { width: 120px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  #menu-toggle { display: inline-flex; }
  #theme-toggle { margin-left: auto; }

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

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

  .nav-list {
    flex-direction: column;
    gap: 2px;
    padding: 8px 0 12px;
  }

  .nav-list a {
    display: block;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
  }

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

  .search-form {
    order: 11;
    flex-basis: 100%;
    margin-top: 4px;
  }

  .search-form input[type="search"] {
    width: 100%;
    flex: 1 1 auto;
  }
}

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

  body { font-size: 15px; }

  .header-inner { padding: 8px 14px; }

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

  main { padding: 0 14px 30px; }

  main > section:not(#hero) {
    padding: 20px 18px;
    border-radius: 14px;
  }

  #hero { padding: 46px 16px 60px; }

  .hero-stats { gap: 10px; }

  .stat { padding: 14px 8px; }

  .hero-actions { flex-direction: column; }

  .btn-primary,
  .btn-secondary { width: 100%; }

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

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

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

@media (max-width: 380px) {
  .hero-stats { grid-template-columns: 1fr; }
  .logo span { display: none; }
}