:root {
  --brand: #F5A623;
  --brand-deep: #E08E0B;
  --brand-soft: #FFF3DE;
  --accent: #4EC5A5;
  --accent-2: #7B6CF6;
  --ink: #1F2233;
  --ink-2: #2D3142;
  --text: #3A3F52;
  --text-soft: #6B7186;
  --line: rgba(31, 34, 51, 0.1);
  --bg: #FFFDF8;
  --bg-2: #FFFFFF;
  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.65);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --shadow-sm: 0 2px 8px rgba(31, 34, 51, 0.06);
  --shadow: 0 10px 30px rgba(31, 34, 51, 0.08);
  --shadow-lg: 0 20px 50px rgba(31, 34, 51, 0.14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 68px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grad-brand: linear-gradient(135deg, #F5A623 0%, #F7B84B 45%, #FF8A3D 100%);
  --grad-hero: linear-gradient(135deg, #FFF3DE 0%, #FFE3B8 30%, #FFD1A6 60%, #E8F6F1 100%);
  --grad-dark: linear-gradient(135deg, #1B1E2B 0%, #232838 50%, #2D3142 100%);
  --grad-accent: linear-gradient(135deg, #4EC5A5 0%, #3AA8C9 100%);
  --grad-violet: linear-gradient(135deg, #7B6CF6 0%, #B06CF6 100%);
  --focus: 0 0 0 3px rgba(245, 166, 35, 0.45);
}

*,
*::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;
  min-height: 100vh;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 8% 0%, rgba(245, 166, 35, 0.16), transparent 38%),
    radial-gradient(circle at 92% 6%, rgba(78, 197, 165, 0.14), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(123, 108, 246, 0.1), transparent 46%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.dark-mode {
  --ink: #F2F3F8;
  --ink-2: #E4E6EF;
  --text: #C9CCDA;
  --text-soft: #9AA0B4;
  --line: rgba(255, 255, 255, 0.12);
  --bg: #12141D;
  --bg-2: #1A1D29;
  --card: rgba(30, 34, 46, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --glass: rgba(26, 29, 41, 0.6);
  --glass-strong: rgba(26, 29, 41, 0.85);
  --brand-soft: rgba(245, 166, 35, 0.14);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  --grad-hero: linear-gradient(135deg, #1E2230 0%, #232838 40%, #2A2F42 70%, #1B2B2A 100%);
  background-image:
    radial-gradient(circle at 8% 0%, rgba(245, 166, 35, 0.12), transparent 38%),
    radial-gradient(circle at 92% 6%, rgba(78, 197, 165, 0.1), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(123, 108, 246, 0.1), transparent 46%);
}

::selection {
  background: rgba(245, 166, 35, 0.35);
  color: var(--ink);
}

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

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

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}

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

h1 { font-size: clamp(1.75rem, 4.2vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); }
h4 { font-size: clamp(1rem, 1.8vw, 1.15rem); }

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

li {
  margin-bottom: 0.4em;
}

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

#app {
  position: relative;
  width: 100%;
  overflow-x: hidden;
}

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

/* ============ Header ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-strong);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.logo:hover {
  transform: translateY(-1px) scale(1.02);
  color: var(--ink);
}

.logo svg {
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.35);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.logo:hover svg {
  transform: rotate(-4deg);
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.5);
}

header nav {
  flex: 1 1 auto;
  min-width: 0;
}

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

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

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

header nav a:hover {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

header nav a:hover::after {
  width: 60%;
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  flex-shrink: 0;
}

header form[role="search"]:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.18);
}

header input[type="search"] {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  font-size: 0.9rem;
  color: var(--ink);
  width: 150px;
  border-radius: 999px;
  font-family: inherit;
  transition: width 0.3s var(--ease);
}

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

header input[type="search"]:focus {
  outline: none;
  width: 190px;
}

header form[role="search"] button {
  border: 0;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.25s var(--ease), transform 0.25s var(--ease);
}

header form[role="search"] button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

#theme-toggle,
#menu-toggle {
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.25s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

#menu-toggle {
  display: none;
}

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

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

main > section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
  opacity: 0.9;
}

main > section:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 166, 35, 0.35);
}

main > section > h2 {
  position: relative;
  padding-left: 18px;
  margin-bottom: 1.1em;
}

main > section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.5);
}

main > section h3 {
  margin-top: 1.4em;
  padding-bottom: 0.35em;
  border-bottom: 1px dashed var(--line);
}

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

/* ============ Hero ============ */
#hero {
  background: var(--grad-hero);
  margin-top: 24px;
  padding: clamp(26px, 4.5vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.4), transparent 70%);
  filter: blur(30px);
  z-index: -1;
  animation: floatBlob 12s ease-in-out infinite;
}

#hero::before {
  height: 4px;
  background: linear-gradient(90deg, #F5A623, #4EC5A5, #7B6CF6, #F5A623);
  background-size: 300% 100%;
  animation: shimmer 6s linear infinite;
}

#hero h1 {
  background: linear-gradient(120deg, #E08E0B 0%, #F5A623 40%, #FF7A3D 70%, #4EC5A5 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 8s linear infinite;
  margin-bottom: 0.5em;
}

body.dark-mode #hero h1 {
  background: linear-gradient(120deg, #FFC55C 0%, #F5A623 40%, #FF9A5C 70%, #6FE0C4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#hero > p {
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  max-width: 880px;
  color: var(--text);
}

#hero > p strong {
  background: linear-gradient(transparent 62%, rgba(245, 166, 35, 0.35) 62%);
  padding: 0 2px;
}

/* ============ Carousel ============ */
.banner-carousel {
  position: relative;
  margin: 26px 0 30px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-2);
  aspect-ratio: 800 / 260;
  min-height: 180px;
}

.banner-carousel .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
  pointer-events: none;
}

.banner-carousel .slide:first-child {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.banner-carousel .slide svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-carousel .slide text {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.banner-carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.banner-carousel:hover button,
.banner-carousel button:focus-visible {
  opacity: 1;
}

.banner-carousel button:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.05);
}

.banner-carousel button[aria-label="上一张"] {
  left: 14px;
}

.banner-carousel button[aria-label="下一张"] {
  right: 14px;
}

/* ============ Stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.stat {
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(245, 166, 35, 0.4);
}

.stat:hover::after {
  transform: scaleX(1);
}

.stat .num {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #E08E0B, #F5A623 50%, #FF7A3D);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat > span:last-child {
  font-size: 0.82rem;
  color: var(--text-soft);
  font-weight: 500;
}

/* ============ Breadcrumb ============ */
main > nav[aria-label="面包屑导航"] {
  margin: 18px 0 0;
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 10px 16px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.86rem;
  width: fit-content;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}

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

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  color: var(--brand);
  font-weight: 700;
}

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

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

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

/* ============ Anchor nav ============ */
main > nav[aria-label="页面内锚点导航"] {
  margin: 22px 0;
  padding: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

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

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

main > nav[aria-label="页面内锚点导航"] a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

main > nav[aria-label="页面内锚点导航"] a:hover {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 166, 35, 0.35);
}

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

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(245, 166, 35, 0.35);
}

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

#news article h3,
#articles article h3 {
  margin-top: 0;
  border-bottom: 0;
  padding-bottom: 0;
  font-size: clamp(1.02rem, 1.9vw, 1.18rem);
}

#news article time,
#articles article time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-soft);
  background: var(--brand-soft);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-deep);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  transition: all 0.25s var(--ease);
}

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

#articles article a:hover {
  background: var(--grad-brand);
  color: #fff;
  transform: translateX(2px);
}

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

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

#faq details[open] {
  border-color: rgba(245, 166, 35, 0.45);
  box-shadow: var(--shadow-sm);
  background: var(--glass);
}

#faq summary {
  cursor: pointer;
  padding: 16px 50px 16px 20px;
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
  position: relative;
  list-style: none;
  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: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 1.15rem;
  font-weight: 700;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

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

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

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

/* ============ Contact / lists ============ */
#contact p,
#legal p {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

#contact p:last-child,
#legal p:last-child {
  border-bottom: 0;
}

#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: 7px 15px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-accent);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(78, 197, 165, 0.35);
}

#links a:hover {
  background: var(--grad-violet);
  box-shadow: 0 6px 16px rgba(123, 108, 246, 0.35);
}

/* ============ Footer ============ */
footer[role="contentinfo"] {
  max-width: var(--maxw);
  margin: 0 auto 26px;
  padding: 28px 24px;
  text-align: center;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  font-size: 0.88rem;
}

footer[role="contentinfo"] p {
  margin: 4px 0;
}

footer[role="contentinfo"] p:first-child {
  color: var(--ink);
  font-weight: 600;
}

/* ============ Back to top ============ */
#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: var(--grad-brand);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(245, 166, 35, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.35s var(--ease);
}

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

#back-to-top:hover {
  filter: brightness(1.08);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(245, 166, 35, 0.55);
}

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

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 26px) scale(1.12); }
}

/* Scroll reveal support */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .header-inner {
    gap: 10px;
  }
  header nav a {
    padding: 6px 8px;
    font-size: 0.86rem;
  }
  header input[type="search"] {
    width: 120px;
  }
  header input[type="search"]:focus {
    width: 150px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 60px;
  }
  .header-inner {
    padding: 8px 16px;
    min-height: var(--header-h);
    row-gap: 10px;
  }
  header nav {
    order: 5;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s var(--ease), opacity 0.35s var(--ease), margin 0.35s var(--ease);
  }
  header nav.is-open {
    max-height: 560px;
    opacity: 1;
    margin-top: 4px;
  }
  header nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  header nav a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
  }
  header nav a::after {
    display: none;
  }
  #menu-toggle {
    display: inline-block;
    margin-left: auto;
  }
  header form[role="search"] {
    order: 4;
    flex: 1 1 100%;
  }
  header input[type="search"],
  header input[type="search"]:focus {
    width: 100%;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .banner-carousel button {
    opacity: 1;
    padding: 7px 12px;
    font-size: 0.75rem;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }
  main {
    padding: 0 12px 30px;
  }
  main > section {
    padding: 20px 16px;
    margin: 18px 0;
    border-radius: var(--radius);
  }
  #hero {
    padding: 22px 16px;
  }
  .banner-carousel {
    min-height: 150px;
    border-radius: var(--radius);
  }
  .banner-carousel button[aria-label="上一张"],
  .banner-carousel button[aria-label="下一张"] {
    top: auto;
    bottom: 10px;
    transform: none;
  }
  .banner-carousel button[aria-label="上一张"] {
    left: 10px;
  }
  .banner-carousel button[aria-label="下一张"] {
    right: 10px;
  }
  .banner-carousel button:hover {
    transform: scale(1.04);
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 14px 10px;
  }
  main > nav[aria-label="面包屑导航"] ol {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  main > nav[aria-label="页面内锚点导航"] {
    padding: 10px;
  }
  main > nav[aria-label="页面内锚点导航"] a {
    padding: 5px 11px;
    font-size: 0.78rem;
  }
  #news article,
  #articles article {
    padding: 16px;
  }
  #faq summary {
    padding: 14px 46px 14px 16px;
    font-size: 0.95rem;
  }
  #faq details > p {
    padding: 0 16px 16px;
  }
  #sitemap a,
  #links a {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  #back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 9px 14px;
    font-size: 0.76rem;
  }
  footer[role="contentinfo"] {
    margin: 0 12px 20px;
    padding: 22px 16px;
    border-radius: var(--radius);
    font-size: 0.82rem;
  }
}

@media (max-width: 380px) {
  .logo span {
    font-size: 1rem;
  }
  .stat .num {
    font-size: 1.35rem;
  }
}

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

@media print {
  header[role="banner"],
  #back-to-top,
  .banner-carousel button,
  #theme-toggle,
  #menu-toggle {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  main > section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}