:root {
  --primary: #FFB300;
  --primary-dark: #F59E0B;
  --primary-deep: #D97706;
  --primary-light: #FFE082;
  --accent: #7C3AED;
  --accent-2: #06B6D4;
  --bg: #FFFBF2;
  --bg-alt: #FFF8E1;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.55);
  --border: rgba(62, 39, 35, 0.1);
  --text: #2B2118;
  --text-soft: #5D4E3F;
  --text-muted: #8A7A66;
  --shadow-sm: 0 2px 8px rgba(120, 80, 20, 0.06);
  --shadow-md: 0 8px 28px rgba(120, 80, 20, 0.1);
  --shadow-lg: 0 20px 60px rgba(120, 80, 20, 0.14);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 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: dark) {
  :root {
    --bg: #14100B;
    --bg-alt: #1B1610;
    --surface: rgba(38, 31, 22, 0.72);
    --surface-solid: #221B13;
    --surface-glass: rgba(38, 31, 22, 0.55);
    --border: rgba(255, 200, 100, 0.14);
    --text: #F5EDE0;
    --text-soft: #D8C9B4;
    --text-muted: #A6957E;
    --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 60px rgba(0, 0, 0, 0.55);
    --primary-light: #7A5A12;
  }
}

*, *::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.8;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 8% -10%, rgba(255, 179, 0, 0.16), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(124, 58, 237, 0.1), transparent 55%),
    radial-gradient(800px 600px at 50% 120%, rgba(6, 182, 212, 0.08), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(255, 179, 0, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

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

h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.85rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
  box-shadow: 0 0 18px rgba(255, 179, 0, 0.5);
}

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

h4 {
  font-size: 1.03rem;
  color: var(--primary-deep);
}

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

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

li {
  margin-bottom: 0.45em;
}

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

::selection {
  background: rgba(255, 179, 0, 0.35);
  color: var(--text);
}

/* ---------- Header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(120, 80, 20, 0.06);
}

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

header > div > a[href="#top"] {
  font-weight: 900;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transition: transform 0.3s var(--ease);
}

header > div > a[href="#top"]::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #FFD54F, var(--primary), var(--primary-deep));
  box-shadow: 0 4px 14px rgba(255, 179, 0, 0.45);
  flex: none;
  transition: transform 0.4s var(--ease);
}

header > div > a[href="#top"]:hover {
  transform: translateY(-1px);
}

header > div > a[href="#top"]:hover::before {
  transform: rotate(-12deg) scale(1.08);
}

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

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

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

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

header nav[aria-label="主导航"] a:hover,
header nav[aria-label="主导航"] a:focus-visible {
  background: rgba(255, 179, 0, 0.16);
  color: var(--primary-deep);
  transform: translateY(-1px);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 0 1 auto;
}

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"] {
  width: 172px;
  max-width: 42vw;
  padding: 9px 16px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: width 0.3s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

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

header form[role="search"] input[type="search"]:focus {
  width: 220px;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 179, 0, 0.18);
  outline: none;
}

header form[role="search"] button,
header > div > button {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

header form[role="search"] button {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #2B2118;
  box-shadow: 0 4px 14px rgba(255, 179, 0, 0.4);
}

header form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 179, 0, 0.5);
}

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

header > div > button {
  background: var(--surface);
  color: var(--text-soft);
  border-color: var(--border);
}

header > div > button:hover {
  background: rgba(255, 179, 0, 0.16);
  color: var(--primary-deep);
  transform: translateY(-2px);
}

header > div > button[aria-label="打开移动菜单"] {
  display: none;
}

/* ---------- Main layout ---------- */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 40px;
}

main > nav[aria-label="面包屑导航"] {
  padding: 18px 0 4px;
}

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

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

main > nav[aria-label="面包屑导航"] li:not(:last-child)::after {
  content: "/";
  color: var(--text-muted);
  opacity: 0.6;
}

main > nav[aria-label="面包屑导航"] a {
  color: var(--text-muted);
  font-weight: 600;
}

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

/* ---------- Sections ---------- */

main > section {
  position: relative;
  margin: 26px 0;
  padding: clamp(22px, 4vw, 40px);
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: rise-in 0.8s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 179, 0, 0.28);
}

@supports not (animation-timeline: view()) {
  main > section {
    animation: none;
  }
}

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

/* Hero */

main > section[aria-labelledby="hero-title"] {
  margin-top: 14px;
  padding: clamp(28px, 5vw, 56px);
  background:
    radial-gradient(700px 340px at 88% -10%, rgba(124, 58, 237, 0.22), transparent 60%),
    radial-gradient(600px 320px at 0% 110%, rgba(6, 182, 212, 0.18), transparent 60%),
    linear-gradient(135deg, rgba(255, 213, 79, 0.92) 0%, rgba(255, 179, 0, 0.9) 45%, rgba(245, 158, 11, 0.92) 100%);
  border: none;
  color: #2B2118;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

main > section[aria-labelledby="hero-title"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.45) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.35) 0 2px, transparent 3px),
    radial-gradient(circle at 45% 85%, rgba(255, 255, 255, 0.3) 0 2px, transparent 3px);
  background-size: 120px 120px, 160px 160px, 200px 200px;
  opacity: 0.5;
  pointer-events: none;
}

main > section[aria-labelledby="hero-title"] > * {
  position: relative;
  z-index: 1;
}

main > section[aria-labelledby="hero-title"] h1 {
  color: #2B2118;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.35);
  max-width: 20em;
}

main > section[aria-labelledby="hero-title"] h1::after {
  content: "";
  display: block;
  width: 84px;
  height: 6px;
  margin-top: 18px;
  border-radius: 6px;
  background: linear-gradient(90deg, #2B2118, rgba(43, 33, 24, 0.2));
}

main > section[aria-labelledby="hero-title"] p {
  color: rgba(43, 33, 24, 0.86);
  font-size: 1.02rem;
  max-width: 62em;
}

main > section[aria-labelledby="hero-title"] figure {
  margin: 26px 0 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(120, 60, 0, 0.22);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

main > section[aria-labelledby="hero-title"] figure:hover {
  transform: translateY(-6px) scale(1.005);
  box-shadow: 0 28px 60px rgba(120, 60, 0, 0.28);
}

main > section[aria-labelledby="hero-title"] figure svg {
  width: 100%;
  border-radius: var(--radius-sm);
}

main > section[aria-labelledby="hero-title"] figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 0.84rem;
  color: rgba(43, 33, 24, 0.7);
  font-weight: 600;
}

/* ---------- News articles ---------- */

main article {
  position: relative;
  margin: 20px 0;
  padding: 22px 24px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

main article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

main article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 179, 0, 0.32);
}

main article:hover::before {
  opacity: 1;
}

main article h3 {
  margin-bottom: 0.35em;
  transition: color 0.25s var(--ease);
}

main article:hover h3 {
  color: var(--primary-deep);
}

main article > p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 0.7em;
}

main article > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 179, 0, 0.14);
  color: var(--primary-deep);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

main article > a::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}

main article > a:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #2B2118;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 179, 0, 0.4);
}

main article > a:hover::after {
  transform: translateX(3px);
}

main article > div[id] {
  margin-top: 16px;
  padding: 16px 18px;
  background: var(--bg-alt);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  animation: rise-in 0.6s var(--ease) both;
}

main article > div[id] p {
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- FAQ ---------- */

main details {
  margin: 12px 0;
  padding: 0;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

main details:hover {
  border-color: rgba(255, 179, 0, 0.34);
  box-shadow: var(--shadow-md);
}

main details[open] {
  border-color: rgba(255, 179, 0, 0.5);
  box-shadow: var(--shadow-md);
}

main details summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 16px 54px 16px 20px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  user-select: none;
}

main details summary::-webkit-details-marker {
  display: none;
}

main details summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--primary-deep);
  border-bottom: 2.5px solid var(--primary-deep);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s var(--ease);
}

main details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

main details summary:hover {
  background: rgba(255, 179, 0, 0.1);
  color: var(--primary-deep);
}

main details[open] summary {
  background: rgba(255, 179, 0, 0.12);
  color: var(--primary-deep);
}

main details > p {
  margin: 0;
  padding: 4px 22px 20px;
  font-size: 0.95rem;
  color: var(--text-soft);
  animation: fade-in 0.35s var(--ease) both;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- HowTo ordered list ---------- */

main > section[aria-labelledby="howto-title"] ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

main > section[aria-labelledby="howto-title"] ol > li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 58px;
  margin-bottom: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

main > section[aria-labelledby="howto-title"] ol > li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #2B2118;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(255, 179, 0, 0.4);
}

main > section[aria-labelledby="howto-title"] ol > li:hover {
  transform: translateX(4px);
  border-color: rgba(255, 179, 0, 0.4);
  box-shadow: var(--shadow-md);
}

/* ---------- Contact & lists ---------- */

main > section[aria-labelledby="contact-title"] ul,
main > section[aria-labelledby="sitemap-title"] ul,
main > section[aria-labelledby="links-title"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

main > section[aria-labelledby="contact-title"] ul {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

main > section[aria-labelledby="contact-title"] ul > li {
  margin: 0;
  padding: 14px 18px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

main > section[aria-labelledby="contact-title"] ul > li:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 179, 0, 0.4);
  box-shadow: var(--shadow-md);
}

main > section[aria-labelledby="sitemap-title"] ul,
main > section[aria-labelledby="links-title"] ul {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

main > section[aria-labelledby="sitemap-title"] ul > li,
main > section[aria-labelledby="links-title"] ul > li {
  margin: 0;
}

main > section[aria-labelledby="sitemap-title"] ul a,
main > section[aria-labelledby="links-title"] ul a {
  display: block;
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  text-align: center;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

main > section[aria-labelledby="sitemap-title"] ul a:hover,
main > section[aria-labelledby="links-title"] ul a:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #2B2118;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 179, 0, 0.38);
}

/* ---------- Legal ---------- */

main > section[aria-labelledby="legal-title"] h3 {
  margin-top: 1.4em;
  padding-bottom: 0.35em;
  border-bottom: 1px dashed var(--border);
}

main > section[aria-labelledby="legal-title"] h3:first-of-type {
  margin-top: 0.4em;
}

/* ---------- Footer ---------- */

footer {
  position: relative;
  margin-top: 40px;
  padding: 44px 20px 32px;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(255, 179, 0, 0.16), transparent 60%),
    var(--bg-alt);
  border-top: 1px solid var(--border);
}

footer > p {
  max-width: var(--maxw);
  margin: 0 auto 10px;
  font-size: 0.86rem;
  color: var(--text-muted);
  text-align: center;
}

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

footer nav[aria-label="页脚导航"] {
  max-width: var(--maxw);
  margin: 20px auto 18px;
}

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

footer nav[aria-label="页脚导航"] li {
  margin: 0;
}

footer nav[aria-label="页脚导航"] a {
  display: inline-block;
  padding: 7px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

footer nav[aria-label="页脚导航"] a:hover {
  background: rgba(255, 179, 0, 0.16);
  color: var(--primary-deep);
  transform: translateY(-2px);
}

footer > a[href="#top"] {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 10px 26px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2B2118;
  background: linear-gradient(135deg, var(--primary-light), var(--primary), var(--primary-deep));
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 22px rgba(255, 179, 0, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

footer > a[href="#top"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(255, 179, 0, 0.5);
  color: #2B2118;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  header nav[aria-label="主导航"] a {
    padding: 6px 9px;
    font-size: 0.85rem;
  }

  header form[role="search"] input[type="search"] {
    width: 140px;
  }

  header form[role="search"] input[type="search"]:focus {
    width: 170px;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 60px;
  }

  header > div {
    padding: 10px 16px;
    gap: 10px;
  }

  header nav[aria-label="主导航"] {
    order: 4;
    flex-basis: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  header nav[aria-label="主导航"]::-webkit-scrollbar {
    display: none;
  }

  header nav[aria-label="主导航"] ul {
    flex-wrap: nowrap;
    gap: 4px;
  }

  header nav[aria-label="主导航"] a {
    white-space: nowrap;
  }

  header form[role="search"] {
    margin-left: auto;
  }

  header > div > button[aria-label="打开移动菜单"] {
    display: inline-block;
  }

  main {
    padding: 0 16px 32px;
  }

  main > section {
    margin: 18px 0;
    border-radius: var(--radius);
  }

  main > section[aria-labelledby="hero-title"] {
    padding: 26px 20px;
  }

  main > section[aria-labelledby="hero-title"] h1::after {
    margin-top: 14px;
  }

  main article {
    padding: 18px 18px;
  }

  footer {
    padding: 32px 16px 26px;
  }
}

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

  header > div > a[href="#top"] {
    font-size: 1rem;
  }

  header > div > a[href="#top"]::before {
    width: 26px;
    height: 26px;
  }

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

  header form[role="search"] input[type="search"] {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
  }

  header form[role="search"] input[type="search"]:focus {
    width: 100%;
  }

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

  header > div > button {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 4px;
  }

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

  main > section[aria-labelledby="hero-title"] {
    padding: 22px 16px;
  }

  main > section[aria-labelledby="hero-title"] p {
    font-size: 0.96rem;
  }

  main details summary {
    padding: 14px 46px 14px 16px;
    font-size: 0.93rem;
  }

  main details summary::after {
    right: 16px;
  }

  main details > p {
    padding: 2px 16px 16px;
    font-size: 0.92rem;
  }

  main article {
    padding: 16px;
    border-radius: var(--radius-sm);
  }

  main > section[aria-labelledby="howto-title"] ol > li {
    padding: 12px 14px 12px 50px;
  }

  main > section[aria-labelledby="howto-title"] ol > li::before {
    left: 12px;
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
  }

  main > section[aria-labelledby="sitemap-title"] ul,
  main > section[aria-labelledby="links-title"] ul {
    grid-template-columns: repeat(2, 1fr);
  }

  main > section[aria-labelledby="contact-title"] ul {
    grid-template-columns: 1fr;
  }

  footer nav[aria-label="页脚导航"] ul {
    gap: 6px 4px;
  }
}

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

@media print {
  header, footer, main > section[aria-labelledby="hero-title"] figure, main article > a {
    display: none !important;
  }

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

  main > section, main article, main details {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}