:root {
  --bg: #f4f7fb;
  --bg-soft: #e8eef5;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-strong: rgba(255, 255, 255, 0.88);
  --border: rgba(31, 58, 95, 0.12);
  --border-strong: rgba(31, 58, 95, 0.22);
  --text: #1b2634;
  --text-soft: #4a5a6e;
  --text-muted: #6b7a8d;
  --primary: #1f3a5f;
  --primary-2: #2f5a8a;
  --accent: #f2c14e;
  --accent-2: #e8a93a;
  --accent-soft: rgba(242, 193, 78, 0.16);
  --link: #24507e;
  --shadow-sm: 0 2px 8px rgba(20, 36, 58, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 36, 58, 0.1);
  --shadow-lg: 0 24px 60px rgba(20, 36, 58, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1120px;
  --header-h: 68px;
  --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, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1520;
    --bg-soft: #111c2a;
    --surface: #16222f;
    --surface-glass: rgba(22, 34, 47, 0.66);
    --surface-glass-strong: rgba(22, 34, 47, 0.86);
    --border: rgba(232, 238, 245, 0.12);
    --border-strong: rgba(232, 238, 245, 0.24);
    --text: #e8eef5;
    --text-soft: #b9c6d6;
    --text-muted: #8fa0b4;
    --primary: #2f5a8a;
    --primary-2: #3d6fa3;
    --accent: #f2c14e;
    --accent-2: #ffd873;
    --accent-soft: rgba(242, 193, 78, 0.14);
    --link: #9cc4ef;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

*,
*::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: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(242, 193, 78, 0.14), transparent 60%),
    radial-gradient(1000px 520px at 92% 0%, rgba(47, 90, 138, 0.18), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a:hover,
a:focus-visible {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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

h1 {
  font-size: clamp(1.7rem, 4.4vw, 2.6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  padding-bottom: 0.5em;
  margin-bottom: 1em;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
}

h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: var(--text);
  margin-top: 1.6em;
}

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

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

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--accent-2);
}

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

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.2em;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  font-style: normal;
}

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

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

header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 12px clamp(16px, 4vw, 40px);
  min-height: var(--header-h);
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

header .brand svg {
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(31, 58, 95, 0.28);
  transition: transform 0.5s var(--ease);
}

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

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

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

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav a:hover,
header nav a:focus-visible {
  color: var(--primary);
  background: var(--accent-soft);
  border-color: rgba(242, 193, 78, 0.45);
  text-decoration: none;
  transform: translateY(-1px);
}

@media (prefers-color-scheme: dark) {
  header nav a:hover,
  header nav a:focus-visible {
    color: var(--accent-2);
  }
}

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

main {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 32px) clamp(40px, 6vw, 80px);
}

main > section {
  position: relative;
  margin-bottom: clamp(22px, 3.6vw, 40px);
  padding: clamp(20px, 3.4vw, 38px);
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: riseIn 0.7s var(--ease) both;
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

main > section > :last-child {
  margin-bottom: 0;
}

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

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

/* ---------- Hero ---------- */

#hero {
  overflow: hidden;
  color: #f4f8fd;
  background:
    radial-gradient(900px 420px at 8% 0%, rgba(242, 193, 78, 0.34), transparent 58%),
    radial-gradient(760px 420px at 96% 12%, rgba(120, 190, 255, 0.28), transparent 60%),
    linear-gradient(135deg, #16283f 0%, #1f3a5f 42%, #2f5a8a 78%, #3d6fa3 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 70px rgba(15, 30, 50, 0.34);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 193, 78, 0.34), transparent 68%);
  filter: blur(6px);
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite alternate;
}

@keyframes floatGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-40px, 30px, 0) scale(1.12);
  }
}

#hero h1,
#hero h2,
#hero h3 {
  color: #ffffff;
  position: relative;
}

#hero h1 {
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.28);
}

#hero h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 5px;
  margin-top: 16px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), rgba(242, 193, 78, 0.1));
}

#hero p {
  color: rgba(240, 246, 253, 0.9);
  max-width: 74ch;
  position: relative;
}

#hero figure {
  position: relative;
  margin: 26px 0 0;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

#hero figure svg {
  border-radius: 12px;
  width: 100%;
  height: auto;
  transition: transform 0.8s var(--ease);
}

#hero figure:hover svg {
  transform: scale(1.02);
}

#hero figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: rgba(232, 238, 245, 0.78);
  text-align: center;
  letter-spacing: 0.01em;
}

/* ---------- Breadcrumb ---------- */

main > nav[aria-label="面包屑导航"] {
  margin-bottom: clamp(16px, 2.4vw, 26px);
}

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

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

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

main > nav[aria-label="面包屑导航"] a {
  font-weight: 500;
}

/* ---------- Articles ---------- */

#articles article {
  position: relative;
  margin: 0 0 18px;
  padding: 20px 22px 18px;
  background: var(--surface-glass-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  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);
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.85;
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(242, 193, 78, 0.5);
}

#articles article h3 {
  margin-top: 0;
  padding-left: 6px;
}

#articles article p {
  padding-left: 6px;
}

#articles article p:first-of-type {
  display: inline-block;
  margin-bottom: 0.7em;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--primary);
  background: var(--accent-soft);
  border-radius: 999px;
}

@media (prefers-color-scheme: dark) {
  #articles article p:first-of-type {
    color: var(--accent-2);
  }
}

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

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--primary);
}

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

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

@media (prefers-color-scheme: dark) {
  #articles article a {
    color: var(--accent-2);
  }
}

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

#faq h3 {
  margin: 1.4em 0 0.4em;
  padding: 12px 16px;
  font-size: 1.02rem;
  background: var(--surface-glass-strong);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq h3:hover {
  transform: translateX(4px);
  background: var(--accent-soft);
}

#faq p {
  padding-left: 4px;
}

/* ---------- HowTo ---------- */

#howto ol {
  counter-reset: howto;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  position: relative;
  counter-increment: howto;
  margin-bottom: 12px;
  padding: 12px 16px 12px 54px;
  background: var(--surface-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(howto);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1b2634;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(242, 193, 78, 0.4);
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: rgba(242, 193, 78, 0.5);
}

/* ---------- Contact / Sitemap / Links lists ---------- */

#contact ul,
#sitemap ul,
#links ul,
#news ul {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 10px;
}

#contact ul {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

#news ul {
  grid-template-columns: 1fr;
}

#contact li,
#sitemap li,
#links li,
#news li {
  margin: 0;
  padding: 12px 16px;
  background: var(--surface-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

#contact li:hover,
#sitemap li:hover,
#links li:hover,
#news li:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 193, 78, 0.5);
  box-shadow: var(--shadow-md);
}

#news li strong {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary);
  background: var(--accent-soft);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

@media (prefers-color-scheme: dark) {
  #news li strong {
    color: var(--accent-2);
  }
}

#sitemap a,
#links a {
  font-weight: 500;
}

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

footer {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(18px, 3vw, 32px);
  max-width: var(--maxw);
  margin: 0 auto clamp(24px, 4vw, 48px);
  padding: clamp(24px, 4vw, 44px) clamp(16px, 4vw, 32px);
  color: var(--text-soft);
  background:
    radial-gradient(600px 280px at 90% 0%, rgba(242, 193, 78, 0.16), transparent 60%),
    linear-gradient(160deg, rgba(31, 58, 95, 0.94), rgba(18, 32, 50, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 40%);
  pointer-events: none;
}

footer section {
  position: relative;
  padding: 0;
  margin: 0;
}

footer h2 {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 0.7em;
  padding-bottom: 0.5em;
}

footer h2::after {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

footer p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(232, 238, 245, 0.78);
  margin: 0 0 0.8em;
}

footer > p:last-child {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  text-align: center;
  color: rgba(232, 238, 245, 0.62);
  letter-spacing: 0.01em;
}

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

footer a:hover {
  color: #ffffff;
}

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

@media (max-width: 900px) {
  header {
    padding: 10px clamp(14px, 4vw, 24px);
  }

  header nav ul {
    gap: 2px 4px;
  }

  header nav a {
    padding: 6px 10px;
    font-size: 0.86rem;
  }
}

@media (max-width: 640px) {
  :root {
    --radius-lg: 20px;
    --radius: 14px;
  }

  body {
    font-size: 15px;
    line-height: 1.72;
  }

  header {
    gap: 8px;
    align-items: center;
  }

  header .brand {
    font-size: 1.02rem;
  }

  header .brand svg {
    width: 32px;
    height: 32px;
  }

  header nav {
    order: 3;
    flex-basis: 100%;
    margin: 0 -4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

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

  header nav ul {
    flex-wrap: nowrap;
    width: max-content;
    padding: 2px 4px;
  }

  header nav a {
    white-space: nowrap;
    font-size: 0.84rem;
    padding: 6px 11px;
    background: var(--surface-glass-strong);
    border-color: var(--border);
  }

  main {
    padding-top: 18px;
  }

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

  #hero figure {
    padding: 8px;
  }

  #hero figcaption {
    font-size: 0.8rem;
  }

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

  #articles article::before {
    top: 12px;
    bottom: 12px;
  }

  #faq h3 {
    padding: 10px 12px;
    font-size: 0.98rem;
  }

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

  #howto ol li::before {
    left: 12px;
    width: 24px;
    height: 24px;
  }

  #contact ul,
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }

  footer {
    margin-left: 12px;
    margin-right: 12px;
    padding: 22px 16px;
    gap: 16px;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 1.5rem;
  }

  header .brand span {
    display: none;
  }
}

/* ---------- Print ---------- */

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

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

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    animation: none;
    break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}