:root {
  --brand: #ff6b35;
  --brand-light: #ff8c42;
  --brand-lighter: #ffa94d;
  --brand-lightest: #ffc078;
  --brand-soft: #fff7f2;
  --brand-glow: rgba(255, 107, 53, 0.35);
  --bg: #fffaf7;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #2b2118;
  --text-soft: #6b5d52;
  --text-muted: #97897d;
  --border: rgba(255, 107, 53, 0.16);
  --border-soft: rgba(43, 33, 24, 0.08);
  --shadow-sm: 0 2px 8px rgba(43, 33, 24, 0.06);
  --shadow-md: 0 8px 28px rgba(255, 107, 53, 0.12);
  --shadow-lg: 0 18px 50px rgba(255, 107, 53, 0.18);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --blur: saturate(180%) blur(16px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --maxw: 1180px;
  --header-h: 72px;
  --gradient-brand: linear-gradient(135deg, #ff6b35 0%, #ff8c42 45%, #ffa94d 100%);
  --gradient-banner: linear-gradient(120deg, #ff6b35 0%, #ff8c42 40%, #ffb347 70%, #ffd28a 100%);
  --gradient-soft: linear-gradient(160deg, #fff7f2 0%, #fff1e6 55%, #ffe9d6 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110d;
    --bg-alt: #1e1712;
    --surface: rgba(38, 28, 22, 0.72);
    --surface-solid: #241b15;
    --text: #f6ece4;
    --text-soft: #cfc0b3;
    --text-muted: #a49385;
    --border: rgba(255, 140, 66, 0.24);
    --border-soft: rgba(255, 236, 224, 0.09);
    --brand-soft: #2a1d15;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 55px rgba(0, 0, 0, 0.55);
    --gradient-soft: linear-gradient(160deg, #211710 0%, #261a12 55%, #2c1e14 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", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(255, 140, 66, 0.16), transparent 42%),
    radial-gradient(circle at 92% 4%, rgba(255, 169, 77, 0.14), transparent 38%),
    radial-gradient(circle at 50% 120%, rgba(255, 107, 53, 0.08), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  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,
a:focus-visible {
  color: var(--brand-light);
}

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

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

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.85rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.4rem, 1.05rem + 1.5vw, 2rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 5px;
  border-radius: 4px;
  background: var(--gradient-brand);
  box-shadow: 0 0 14px var(--brand-glow);
}

h3 {
  font-size: clamp(1.1rem, 0.98rem + 0.6vw, 1.32rem);
  color: var(--text);
}

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

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

li {
  margin-bottom: 0.45em;
}

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

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

blockquote {
  margin: 0 0 1.2em;
  padding: 20px 22px 18px 26px;
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

blockquote::before {
  content: "\201C";
  position: absolute;
  top: 2px;
  right: 18px;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--brand);
  opacity: 0.18;
  font-family: Georgia, serif;
}

blockquote:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-light);
}

blockquote p {
  margin-bottom: 0.6em;
  color: var(--text);
}

blockquote footer {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: normal;
}

figure {
  margin: 1.6em 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

figure:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

figure svg {
  width: 100%;
  border-radius: var(--radius);
}

figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
  color: var(--text-muted);
}

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--border);
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  letter-spacing: 0.02em;
}

body > a[href="#main-content"] {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--gradient-brand);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: top 0.3s var(--ease);
}

body > a[href="#main-content"]:focus {
  top: 16px;
  color: #fff;
}

header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(255, 107, 53, 0.08);
}

header[role="banner"] > div {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

header[role="banner"] > div strong {
  font-size: 1.18rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

header[role="banner"] > div span {
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

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

header[role="banner"] nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

header[role="banner"] nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 6px 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[role="banner"] nav[aria-label="主导航"] a:hover {
  color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-2px);
}

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

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

header[role="banner"] form[role="search"] input[type="search"] {
  width: clamp(140px, 18vw, 220px);
  padding: 9px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.3s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

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

header[role="banner"] form[role="search"] input[type="search"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
  outline: none;
  width: clamp(160px, 22vw, 260px);
}

header[role="banner"] form[role="search"] button {
  padding: 9px 20px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-brand);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 4px 14px var(--brand-glow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

header[role="banner"] form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--brand-glow);
  filter: brightness(1.05);
}

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

nav[aria-label="面包屑导航"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 40px) 0;
}

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

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

nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--text-muted);
  opacity: 0.55;
}

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

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 60px;
}

main > section {
  margin: 0 0 28px;
  padding: clamp(22px, 3.4vw, 40px);
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
  animation: riseIn 0.7s var(--ease) both;
}

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

@media (prefers-color-scheme: dark) {
  main > section::after {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 40%);
  }
}

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

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

main > section:first-of-type {
  margin-top: 22px;
  padding: clamp(26px, 4vw, 52px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 242, 0.82)),
    var(--gradient-banner);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-lg);
}

@media (prefers-color-scheme: dark) {
  main > section:first-of-type {
    background:
      linear-gradient(135deg, rgba(36, 27, 21, 0.92), rgba(42, 29, 21, 0.86)),
      var(--gradient-banner);
    border-color: rgba(255, 140, 66, 0.3);
  }
}

main > section:first-of-type h1 {
  background: linear-gradient(120deg, #e8501f 0%, #ff6b35 40%, #ff9d4d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand);
  margin-bottom: 0.5em;
}

@media (prefers-color-scheme: dark) {
  main > section:first-of-type h1 {
    background: linear-gradient(120deg, #ff8c42 0%, #ffb347 60%, #ffd28a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

main > section:first-of-type p {
  font-size: 1.02rem;
  color: var(--text-soft);
  max-width: 76ch;
}

nav[aria-label="页面内锚点导航"] {
  margin: 0 0 28px;
  padding: clamp(18px, 2.6vw, 28px);
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: riseIn 0.7s var(--ease) both;
}

nav[aria-label="页面内锚点导航"] h2 {
  font-size: 1.05rem;
  margin-bottom: 0.9em;
}

nav[aria-label="页面内锚点导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav[aria-label="页面内锚点导航"] li {
  margin: 0;
}

nav[aria-label="页面内锚点导航"] a {
  display: inline-block;
  padding: 6px 15px;
  font-size: 0.86rem;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all 0.28s var(--ease);
}

nav[aria-label="页面内锚点导航"] a:hover {
  color: #fff;
  background: var(--gradient-brand);
  border-color: transparent;
  box-shadow: 0 6px 18px var(--brand-glow);
  transform: translateY(-2px);
}

main > section > h3 {
  margin-top: 1.5em;
}

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

main > section > ul,
main > section > ol {
  padding-left: 1.4em;
}

#company ul,
#contact ul,
#howto ul,
#howto ol {
  list-style: none;
  padding-left: 0;
}

#company ul li,
#contact ul li {
  position: relative;
  padding: 10px 16px 10px 40px;
  margin-bottom: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

#company ul li::before,
#contact ul li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-brand);
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.14);
}

#company ul li:hover,
#contact ul li:hover {
  transform: translateX(4px);
  border-color: var(--brand-light);
  box-shadow: var(--shadow-sm);
}

#howto ul li,
#howto ol li {
  position: relative;
  padding: 10px 16px 10px 44px;
  margin-bottom: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  counter-increment: step;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

#howto ul {
  counter-reset: step;
}

#howto ul li::before {
  content: "\2713";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-brand);
  border-radius: 50%;
}

#howto ol {
  counter-reset: step;
  list-style: none;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-brand);
  border-radius: 50%;
  box-shadow: 0 3px 10px var(--brand-glow);
}

#howto ul li:hover,
#howto ol li:hover {
  transform: translateX(4px);
  border-color: var(--brand-light);
  box-shadow: var(--shadow-sm);
}

#news article,
#articles article {
  position: relative;
  padding: 20px 22px;
  margin-bottom: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  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);
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--gradient-brand);
  opacity: 0.85;
  transition: opacity 0.3s var(--ease), top 0.3s var(--ease), bottom 0.3s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-light);
}

#news article:hover::before,
#articles article:hover::before {
  opacity: 1;
  top: 12px;
  bottom: 12px;
}

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

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

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

#articles article a[href^="#article"] {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  border: 1px solid var(--border);
  transition: all 0.28s var(--ease);
}

#articles article a[href^="#article"]:hover {
  color: #fff;
  background: var(--gradient-brand);
  border-color: transparent;
  box-shadow: 0 6px 18px var(--brand-glow);
  transform: translateY(-2px);
}

#reviews blockquote {
  margin-bottom: 16px;
}

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

#faq details:hover {
  border-color: var(--brand-light);
  box-shadow: var(--shadow-md);
}

#faq details[open] {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

#faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 54px 16px 22px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  user-select: none;
}

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

#faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.32s var(--ease);
}

#faq details[open] summary {
  color: var(--brand);
  background: var(--brand-soft);
}

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

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

#faq details p {
  margin: 0;
  padding: 4px 22px 20px;
  font-size: 0.95rem;
  color: var(--text-soft);
  animation: fadeIn 0.4s var(--ease) both;
}

#knowledge h3 {
  position: relative;
  padding-left: 16px;
}

#knowledge h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  bottom: 0.3em;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient-brand);
  opacity: 0.7;
}

#sitemap-title ~ ul,
#links-title ~ ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding-left: 0;
}

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

#sitemap-title ~ ul a,
#links-title ~ ul a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.86rem;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  transition: all 0.28s var(--ease);
}

#sitemap-title ~ ul a:hover,
#links-title ~ ul a:hover {
  color: #fff;
  background: var(--gradient-brand);
  border-color: transparent;
  box-shadow: 0 6px 16px var(--brand-glow);
  transform: translateY(-2px);
}

footer[role="contentinfo"] {
  background:
    linear-gradient(160deg, rgba(255, 107, 53, 0.06), rgba(255, 169, 77, 0.03)),
    var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: clamp(32px, 5vw, 56px) clamp(16px, 4vw, 40px) 28px;
}

footer[role="contentinfo"] section {
  max-width: var(--maxw);
  margin: 0 auto 22px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border-soft);
}

footer[role="contentinfo"] section:last-of-type {
  border-bottom: none;
}

footer[role="contentinfo"] h2 {
  font-size: 1.02rem;
  padding-left: 14px;
  margin-bottom: 0.7em;
}

footer[role="contentinfo"] h2::before {
  width: 4px;
}

footer[role="contentinfo"] p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.4em;
}

footer[role="contentinfo"] > p {
  max-width: var(--maxw);
  margin: 26px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

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

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

@supports (animation-timeline: view()) {
  main > section,
  nav[aria-label="页面内锚点导航"],
  #news article,
  #articles article,
  #faq details {
    animation: riseIn 0.7s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }
}

@media (max-width: 900px) {
  header[role="banner"] {
    gap: 10px 16px;
    padding: 10px 16px;
  }

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

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

  header[role="banner"] nav[aria-label="主导航"] ul {
    flex-wrap: nowrap;
    width: max-content;
  }

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

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

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

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

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

  header[role="banner"] form[role="search"] input[type="search"] {
    width: 120px;
    padding: 8px 12px;
    font-size: 0.84rem;
  }

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

  header[role="banner"] form[role="search"] button {
    padding: 8px 14px;
    font-size: 0.84rem;
  }

  main {
    padding-left: 12px;
    padding-right: 12px;
  }

  main > section {
    padding: 18px 16px;
    margin-bottom: 18px;
    border-radius: 16px;
  }

  main > section:first-of-type {
    padding: 22px 18px;
  }

  h2 {
    padding-left: 15px;
  }

  h2::before {
    width: 4px;
  }

  nav[aria-label="页面内锚点导航"] {
    padding: 16px 14px;
  }

  nav[aria-label="页面内锚点导航"] a,
  #sitemap-title ~ ul a,
  #links-title ~ ul a {
    font-size: 0.8rem;
    padding: 5px 12px;
  }

  #company ul li,
  #contact ul li,
  #howto ul li,
  #howto ol li {
    padding: 9px 12px 9px 38px;
  }

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

  #faq summary::after {
    right: 18px;
  }

  #faq details p {
    padding: 2px 16px 16px;
    font-size: 0.9rem;
  }

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

  figure {
    padding: 12px;
  }

  footer[role="contentinfo"] {
    padding: 28px 16px 22px;
  }
}

@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;
  }
}

@media print {
  header[role="banner"],
  nav[aria-label="页面内锚点导航"],
  body > a[href="#main-content"],
  footer[role="contentinfo"] {
    display: none;
  }

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

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