:root {
  --bg: #0b0e1a;
  --bg-soft: #121629;
  --bg-card: rgba(26, 31, 54, 0.65);
  --bg-card-solid: #1a1f36;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f8;
  --text-soft: #b6bdd1;
  --text-mute: #8a92a8;
  --primary: #e94560;
  --primary-soft: #ff6b84;
  --accent: #4f8cff;
  --accent-2: #8b5cf6;
  --star: #f2f2f2;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(233, 69, 96, 0.35), 0 8px 28px rgba(233, 69, 96, 0.25);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --glass-blur: 14px;
  --maxw: 1180px;
  --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;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fc;
    --bg-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-card-solid: #ffffff;
    --border: rgba(20, 26, 50, 0.08);
    --border-strong: rgba(20, 26, 50, 0.16);
    --text: #161b2e;
    --text-soft: #3c4560;
    --text-mute: #66708c;
    --primary: #d92b48;
    --primary-soft: #e94560;
    --accent: #2f6bff;
    --accent-2: #7b3ff2;
    --star: #2a3350;
    --shadow-sm: 0 4px 16px rgba(28, 38, 70, 0.08);
    --shadow-md: 0 14px 36px rgba(28, 38, 70, 0.14);
    --shadow-glow: 0 0 0 1px rgba(217, 43, 72, 0.25), 0 10px 30px rgba(217, 43, 72, 0.16);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(1000px 520px at 0% 0%, rgba(79, 140, 255, 0.18), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(233, 69, 96, 0.14), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

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

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);
  letter-spacing: 0.01em;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
  background: linear-gradient(100deg, var(--text) 20%, var(--primary-soft) 55%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  position: relative;
  padding-left: 16px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--accent-2));
  box-shadow: 0 0 14px rgba(233, 69, 96, 0.55);
}

h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--text);
}

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

/* ============ Header ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 26, 0.62);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: light) {
  header {
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 6px 24px rgba(28, 38, 70, 0.08);
  }
}

header > div {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

header > div > a[href="/"] {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, rgba(233, 69, 96, 0.22), rgba(79, 140, 255, 0.22));
  border: 1px solid var(--border-strong);
  white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

header > div > a[href="/"]:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-glow);
  background: linear-gradient(120deg, rgba(233, 69, 96, 0.35), rgba(79, 140, 255, 0.35));
  color: var(--text);
}

header nav {
  flex: 1 1 320px;
}

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

header nav ul li a {
  display: inline-block;
  padding: 7px 12px;
  font-size: 0.9rem;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav ul li a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

header nav ul li a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

header nav ul li a:hover::after {
  transform: scaleX(1);
}

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

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[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

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

header form[role="search"] input[type="search"]:focus {
  outline: none;
  border-color: var(--primary-soft);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.18);
}

header form[role="search"] button {
  padding: 9px 18px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent-2));
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  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 22px rgba(233, 69, 96, 0.4);
  filter: brightness(1.08);
}

header form[role="search"] button:active {
  transform: translateY(0);
}

/* ============ Breadcrumb ============ */
body > nav[aria-label="面包屑导航"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 20px 0;
}

body > nav[aria-label="面包屑导航"] ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-mute);
}

body > nav[aria-label="面包屑导航"] ol li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body > nav[aria-label="面包屑导航"] ol li + li::before {
  content: "›";
  color: var(--text-mute);
  font-size: 1rem;
  line-height: 1;
}

body > nav[aria-label="面包屑导航"] ol li a {
  color: var(--text-soft);
}

body > nav[aria-label="面包屑导航"] ol li a:hover {
  color: var(--primary-soft);
}

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

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

main > section {
  position: relative;
  margin: 26px 0;
  padding: clamp(20px, 3.4vw, 38px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
  animation: fadeUp 0.7s var(--ease) both;
  overflow: hidden;
}

main > section::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.07), transparent 32%);
  opacity: 0.7;
}

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

main > section > * {
  position: relative;
  z-index: 1;
}

/* ============ Hero ============ */
#hero {
  padding: clamp(26px, 4.5vw, 56px);
  background:
    linear-gradient(135deg, rgba(233, 69, 96, 0.16), rgba(79, 140, 255, 0.14) 45%, rgba(139, 92, 246, 0.18)),
    var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
}

#hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.35), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite alternate;
}

#hero h1 {
  max-width: 20em;
  margin-bottom: 0.5em;
}

#hero p {
  max-width: 62em;
  font-size: 1rem;
}

#hero figure {
  margin: 26px 0 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  background: #1a1a2e;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero figure:hover {
  transform: scale(1.012);
  box-shadow: 0 18px 48px rgba(233, 69, 96, 0.28);
}

#hero figure svg {
  width: 100%;
  height: auto;
  display: block;
}

#hero figcaption {
  padding: 12px 18px;
  font-size: 0.85rem;
  color: var(--text-soft);
  background: rgba(0, 0, 0, 0.28);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ============ Typography blocks ============ */
main > section > p:last-child {
  margin-bottom: 0;
}

main > section h3:first-of-type {
  margin-top: 0.4em;
}

/* ============ Lists ============ */
main ul {
  margin: 0 0 1em;
  padding-left: 1.3em;
  color: var(--text-soft);
}

main ul li {
  margin: 0.35em 0;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

main ul li:hover {
  color: var(--text);
  transform: translateX(3px);
}

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

main ol li {
  margin: 0.5em 0;
  padding-left: 0.2em;
}

main ol li::marker {
  color: var(--primary-soft);
  font-weight: 700;
}

/* ============ Articles ============ */
#articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

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

#articles article {
  margin: 0 0 16px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

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

#articles article:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

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

#articles article h3 {
  margin-bottom: 0.35em;
  font-size: 1.08rem;
}

#articles article h3 a {
  color: var(--text);
}

#articles article p {
  margin: 0 0 0.5em;
  font-size: 0.92rem;
}

#articles article p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

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

#articles article a[href^="/articles/"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-soft);
  padding: 4px 0;
}

#articles article a[href^="/articles/"]::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

#articles article a[href^="/articles/"]:hover::after {
  transform: translateX(4px);
}

/* ============ FAQ / Details ============ */
#faq details {
  margin: 0 0 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  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);
  background: rgba(255, 255, 255, 0.06);
}

#faq details[open] {
  border-color: rgba(233, 69, 96, 0.4);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

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

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--primary-soft);
  border-radius: 50%;
  background: rgba(233, 69, 96, 0.12);
  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-soft);
}

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

/* ============ Blockquote ============ */
blockquote {
  margin: 0 0 14px;
  padding: 16px 20px 16px 24px;
  position: relative;
  background: rgba(79, 140, 255, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

blockquote::before {
  content: "“";
  position: absolute;
  top: 2px;
  left: 8px;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.35;
  font-family: Georgia, serif;
}

blockquote:hover {
  transform: translateX(4px);
  background: rgba(79, 140, 255, 0.14);
  border-left-color: var(--primary-soft);
}

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

/* ============ Address ============ */
address {
  font-style: normal;
  padding: 20px 22px;
  margin: 0 0 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 6px;
}

address p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-soft);
}

address p:first-child {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

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

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 10px 14px 10px 46px;
  margin: 0 0 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent-2));
  border-radius: 50%;
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
}

#knowledge h3 {
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}

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

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.88rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: transform 0.28s var(--ease), color 0.28s var(--ease), border-color 0.28s var(--ease), background 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  transform: translateY(-3px);
  color: var(--text);
  border-color: var(--primary-soft);
  background: rgba(233, 69, 96, 0.12);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.2);
}

#links ul li a {
  color: var(--accent);
}

/* ============ Legal ============ */
#legal h3 {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--text);
}

#legal h3:nth-of-type(2) {
  background: rgba(79, 140, 255, 0.14);
  border-color: rgba(79, 140, 255, 0.3);
}

#legal h3:nth-of-type(3) {
  background: rgba(233, 69, 96, 0.14);
  border-color: rgba(233, 69, 96, 0.3);
}

#legal h3:nth-of-type(4) {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.3);
}

/* ============ Footer ============ */
footer {
  position: relative;
  margin-top: 40px;
  padding: 40px 20px 32px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
  border-top: 1px solid var(--border);
  text-align: center;
}

@media (prefers-color-scheme: light) {
  footer {
    background: linear-gradient(180deg, transparent, rgba(28, 38, 70, 0.05));
  }
}

footer > p {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: var(--text-mute);
}

footer > p:first-child {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.92rem;
}

footer nav[aria-label="页脚导航"] {
  margin-top: 18px;
}

footer nav[aria-label="页脚导航"] ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

footer nav[aria-label="页脚导航"] ul li a {
  font-size: 0.86rem;
  color: var(--text-mute);
  position: relative;
  padding: 4px 2px;
  transition: color 0.25s var(--ease);
}

footer nav[aria-label="页脚导航"] ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--primary-soft);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}

footer nav[aria-label="页脚导航"] ul li a:hover {
  color: var(--primary-soft);
}

footer nav[aria-label="页脚导航"] ul li a:hover::after {
  transform: scaleX(1);
}

/* ============ Animations ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatGlow {
  from {
    transform: translate(0, 0) scale(1);
    opacity: 0.85;
  }
  to {
    transform: translate(-40px, 30px) scale(1.15);
    opacity: 1;
  }
}

/* Staggered entrance for main sections */
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.1s; }
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.3s; }
main > section:nth-of-type(9) { animation-delay: 0.34s; }
main > section:nth-of-type(10) { animation-delay: 0.38s; }
main > section:nth-of-type(11) { animation-delay: 0.42s; }
main > section:nth-of-type(12) { animation-delay: 0.46s; }
main > section:nth-of-type(13) { animation-delay: 0.5s; }
main > section:nth-of-type(14) { animation-delay: 0.54s; }
main > section:nth-of-type(15) { animation-delay: 0.58s; }
main > section:nth-of-type(16) { animation-delay: 0.62s; }
main > section:nth-of-type(17) { animation-delay: 0.66s; }
main > section:nth-of-type(18) { animation-delay: 0.7s; }

/* Scroll-driven reveal where supported */
@supports (animation-timeline: view()) {
  main > section {
    animation: fadeUp 0.8s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  header > div {
    gap: 12px;
  }

  header nav {
    order: 3;
    flex-basis: 100%;
  }

  header nav ul {
    justify-content: center;
  }

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

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

  header > div {
    padding: 10px 14px;
  }

  header > div > a[href="/"] {
    font-size: 1.1rem;
    padding: 5px 12px;
  }

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

  header nav {
    order: 3;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  header nav::-webkit-scrollbar {
    display: none;
  }

  header nav ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

  header nav ul li a {
    white-space: nowrap;
    font-size: 0.84rem;
    padding: 6px 10px;
  }

  body > nav[aria-label="面包屑导航"] {
    padding: 12px 14px 0;
  }

  main {
    padding: 4px 14px 28px;
  }

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

  #hero {
    padding: 24px 18px;
  }

  #hero figure {
    margin-top: 18px;
  }

  #hero figcaption {
    font-size: 0.78rem;
    padding: 10px 12px;
  }

  h2 {
    padding-left: 13px;
  }

  h2::before {
    width: 4px;
  }

  #articles article {
    padding: 14px 16px;
  }

  #faq summary {
    padding: 13px 42px 13px 16px;
    font-size: 0.94rem;
  }

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

  #howto ol li {
    padding: 10px 12px 10px 42px;
  }

  address {
    padding: 16px;
  }

  footer {
    padding: 30px 14px 26px;
  }
}

@media (max-width: 420px) {
  header > div > a[href="/"] {
    font-size: 1rem;
  }

  header form[role="search"] button {
    padding: 9px 14px;
  }

  #sitemap ul,
  #links ul {
    gap: 8px;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 7px 13px;
    font-size: 0.82rem;
  }

  blockquote {
    padding: 14px 16px 14px 20px;
  }
}

/* ============ Accessibility & 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:hover {
    transform: none;
  }
}

@media print {
  header,
  footer,
  body > nav[aria-label="面包屑导航"],
  form[role="search"] {
    display: none;
  }

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

  main > section {
    box-shadow: none;
    border: 1px solid #ddd;
    background: #fff;
    animation: none;
  }
}