:root {
  --primary: #1f3a5f;
  --primary-light: #3a6ea5;
  --primary-dark: #14253d;
  --accent: #ff7a45;
  --accent-soft: #ffb088;
  --bg: #f4f7fb;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #1c2733;
  --text-soft: #4a5a6a;
  --text-muted: #7b8a99;
  --border: rgba(31, 58, 95, 0.12);
  --shadow-sm: 0 2px 10px rgba(20, 37, 61, 0.06);
  --shadow-md: 0 8px 28px rgba(20, 37, 61, 0.1);
  --shadow-lg: 0 18px 48px rgba(20, 37, 61, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --gradient-hero: linear-gradient(135deg, #1f3a5f 0%, #3a6ea5 55%, #5b9bd5 100%);
  --gradient-accent: linear-gradient(135deg, #ff7a45 0%, #ffb088 100%);
  --glass-blur: saturate(160%) blur(14px);
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #6ea8e0;
    --primary-light: #8ec2f0;
    --primary-dark: #0d1826;
    --accent: #ff8f5e;
    --accent-soft: #ffb088;
    --bg: #0d1520;
    --bg-alt: #121d2b;
    --surface: rgba(24, 38, 56, 0.66);
    --surface-solid: #16222f;
    --text: #e8eef5;
    --text-soft: #b6c4d2;
    --text-muted: #8a9bab;
    --border: rgba(142, 194, 240, 0.16);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
    --gradient-hero: linear-gradient(135deg, #0d1826 0%, #1a3352 55%, #2b5a8c 100%);
  }
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(
      circle at 12% 8%,
      rgba(58, 110, 165, 0.1),
      transparent 42%
    ),
    radial-gradient(circle at 88% 92%, rgba(255, 122, 69, 0.08), transparent 46%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

h1,
h2,
h3,
h4 {
  line-height: 1.32;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
}

h1 {
  font-size: clamp(1.6rem, 4.4vw, 2.6rem);
  margin: 0 0 1rem;
}

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

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--gradient-accent);
}

h3 {
  font-size: clamp(1.1rem, 2.4vw, 1.32rem);
  margin: 1.8rem 0 0.7rem;
  color: var(--primary);
}

h4 {
  font-size: 1.05rem;
  margin: 1.2rem 0 0.5rem;
  color: var(--text-soft);
}

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

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

li {
  margin-bottom: 0.4rem;
}

blockquote {
  margin: 1.2rem 0;
  padding: 1rem 1.4rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-soft);
  font-style: italic;
}

blockquote p {
  margin: 0.4rem 0;
}

/* ---------- Header ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: fadeDown 0.6s ease both;
}

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.5px;
}

.brand a:hover {
  color: var(--primary);
}

.brand svg {
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(31, 58, 95, 0.35);
  transition: transform var(--transition);
}

.brand a:hover svg {
  transform: rotate(-6deg) scale(1.06);
}

#site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#site-header nav a {
  display: inline-block;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: background var(--transition), color var(--transition),
    transform var(--transition);
}

#site-header nav a:hover,
#site-header nav a:focus-visible {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Layout ---------- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) 3rem;
}

main > nav[aria-label="面包屑导航"] {
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
}

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

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--text-muted);
  opacity: 0.6;
}

section {
  margin-bottom: clamp(1.6rem, 4vw, 3rem);
  padding: clamp(1.2rem, 3.5vw, 2.4rem);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.7s ease both;
  transition: box-shadow var(--transition), transform var(--transition),
    border-color var(--transition);
}

section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(58, 110, 165, 0.28);
}

/* Staggered entrance */
main > section:nth-of-type(1) { animation-delay: 0.05s; }
main > section:nth-of-type(2) { animation-delay: 0.1s; }
main > section:nth-of-type(3) { animation-delay: 0.15s; }
main > section:nth-of-type(4) { animation-delay: 0.2s; }
main > section:nth-of-type(5) { animation-delay: 0.25s; }
main > section:nth-of-type(6) { animation-delay: 0.3s; }
main > section:nth-of-type(7) { animation-delay: 0.35s; }
main > section:nth-of-type(8) { animation-delay: 0.4s; }

/* ---------- Hero ---------- */
#hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--gradient-hero);
  border: none;
  box-shadow: var(--shadow-lg);
  padding: clamp(1.6rem, 5vw, 3.2rem);
}

#hero::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.22),
    transparent 68%
  );
  pointer-events: none;
  animation: floatOrb 9s ease-in-out infinite;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
  position: relative;
  z-index: 1;
}

#hero p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 62ch;
  position: relative;
  z-index: 1;
}

#hero figure {
  margin: 1.6rem 0 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.12);
  padding: 0.5rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform var(--transition);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.01);
}

#hero figcaption {
  padding: 0.6rem 0.4rem 0.2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

/* ---------- Articles / News Cards ---------- */
#news article,
#articles article {
  position: relative;
  margin-bottom: 1.1rem;
  padding: 1.2rem 1.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

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

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 122, 69, 0.4);
}

#news article h3,
#articles article h3 {
  margin-top: 0;
}

#news article p:first-of-type,
#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

#news article a,
#articles article a {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.42rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-accent);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(255, 122, 69, 0.32);
  transition: transform var(--transition), box-shadow var(--transition),
    filter var(--transition);
}

#news article a:hover,
#articles article a:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 10px 24px rgba(255, 122, 69, 0.46);
}

/* ---------- FAQ ---------- */
#faq details {
  margin-bottom: 0.85rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}

#faq details[open] {
  border-color: rgba(58, 110, 165, 0.42);
  box-shadow: var(--shadow-md);
}

#faq details:hover {
  border-color: rgba(58, 110, 165, 0.3);
}

#faq summary {
  position: relative;
  cursor: pointer;
  padding: 1rem 3rem 1rem 1.3rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  transition: background var(--transition), color var(--transition);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--primary);
  background: rgba(58, 110, 165, 0.12);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition),
    color var(--transition);
}

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

#faq summary:hover {
  background: rgba(58, 110, 165, 0.06);
}

#faq details p {
  padding: 0 1.3rem 1.1rem;
  margin: 0;
  font-size: 0.95rem;
  animation: fadeIn 0.35s ease both;
}

/* ---------- Contact / Sitemap / Links lists ---------- */
#contact ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

#contact ul li {
  padding: 0.6rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform var(--transition), border-color var(--transition);
}

#contact ul li:hover {
  transform: translateX(4px);
  border-color: rgba(255, 122, 69, 0.4);
}

#sitemap ul,
#links ul {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

#sitemap ul a,
#links ul a {
  display: block;
  padding: 0.55rem 0.9rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: background var(--transition), color var(--transition),
    transform var(--transition), border-color var(--transition);
}

#sitemap ul a:hover,
#links ul a:hover {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 2rem;
  padding: clamp(1.4rem, 4vw, 2.6rem) clamp(1rem, 4vw, 2.5rem);
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.82);
  border-top: 1px solid var(--border);
}

footer section {
  max-width: var(--max-width);
  margin: 0 auto 1.4rem;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  animation: none;
}

footer h2 {
  color: #fff;
  font-size: 1.25rem;
}

footer h2::before {
  background: var(--gradient-accent);
}

footer h3 {
  color: var(--accent-soft);
  font-size: 1.02rem;
}

footer p,
footer li {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

footer a {
  color: var(--accent-soft);
}

footer a:hover {
  color: #fff;
}

footer > p:last-of-type {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-30px, 24px) scale(1.08);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  #site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  #site-header nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  #site-header nav ul {
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }

  #site-header nav a {
    white-space: nowrap;
  }
}

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

  section {
    border-radius: var(--radius-md);
    padding: 1.1rem 1rem;
  }

  #hero {
    padding: 1.3rem 1rem;
  }

  #hero figure {
    padding: 0.35rem;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 5px;
  }

  #faq summary {
    padding: 0.85rem 2.6rem 0.85rem 1rem;
    font-size: 0.95rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@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 {
  #site-header,
  footer,
  #hero::after {
    display: none;
  }

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

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