:root {
  --primary: #1f6feb;
  --primary-dark: #1550b8;
  --primary-light: #4a8df5;
  --accent: #ff7a45;
  --accent-2: #722ed1;
  --accent-3: #13c2c2;
  --success: #52c41a;
  --bg: #f5f8ff;
  --bg-alt: #ffffff;
  --bg-soft: #eef4ff;
  --text: #1a2233;
  --text-soft: #4a5568;
  --text-muted: #7a869a;
  --border: #e2e9f5;
  --card-bg: #ffffff;
  --shadow-sm: 0 2px 8px rgba(31, 111, 235, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 111, 235, 0.1);
  --shadow-lg: 0 16px 48px rgba(31, 111, 235, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --gradient: linear-gradient(135deg, #1f6feb 0%, #4a8df5 40%, #722ed1 100%);
  --gradient-soft: linear-gradient(135deg, #eef4ff 0%, #f0e6ff 100%);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --header-height: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #4a8df5;
    --primary-dark: #1f6feb;
    --primary-light: #6ba3ff;
    --bg: #0d1117;
    --bg-alt: #161b24;
    --bg-soft: #1a2130;
    --text: #e6edf7;
    --text-soft: #b0bccf;
    --text-muted: #7d8aa0;
    --border: #263042;
    --card-bg: #161b24;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --gradient: linear-gradient(135deg, #1f6feb 0%, #4a8df5 40%, #722ed1 100%);
    --gradient-soft: linear-gradient(135deg, #141c2b 0%, #1a1430 100%);
    --glass-bg: rgba(22, 27, 36, 0.72);
    --glass-border: rgba(255, 255, 255, 0.08);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
}

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 {
  color: var(--primary-dark);
}

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

ul,
ol {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 16px;
}

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

h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  margin: 1.5rem 0 0.6rem;
}

h4 {
  font-size: 1rem;
  margin: 1rem 0 0.4rem;
  color: var(--primary);
}

p {
  margin-bottom: 0.9rem;
  color: var(--text-soft);
}

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

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

.topbar {
  background: var(--gradient);
  color: #fff;
  text-align: center;
  padding: 6px 16px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.topbar p {
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

header nav > a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  flex-shrink: 0;
}

header nav > a svg {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

header nav > a:hover svg {
  transform: rotate(-6deg) scale(1.05);
}

header nav > a span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

header nav ul li a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
  position: relative;
  transition: all var(--transition);
}

header nav ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

header nav ul li a:hover {
  color: var(--primary);
  background: var(--bg-soft);
}

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

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

/* ===== Sections ===== */
main > section {
  margin: 48px 0;
  padding: 32px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-timeline: view();
  animation-range: entry 0% cover 30%;
}

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

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

/* ===== Intro / Banner ===== */
#intro {
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 56px 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

#intro::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#intro::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#intro h1 {
  color: #fff;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

#intro p {
  color: rgba(255, 255, 255, 0.92);
  position: relative;
  z-index: 1;
  max-width: 820px;
}

#intro strong {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  padding: 1px 6px;
  border-radius: 6px;
}

#intro figure {
  margin: 28px 0;
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 8px;
}

#intro figure svg {
  border-radius: var(--radius-sm);
}

#intro figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 0 4px;
}

#intro nav[aria-label="页面内锚点导航"] {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
}

#intro nav[aria-label="页面内锚点导航"] h2 {
  color: #fff;
  font-size: 1rem;
  padding-left: 0;
  margin-bottom: 12px;
}

#intro nav[aria-label="页面内锚点导航"] h2::before {
  display: none;
}

#intro nav[aria-label="页面内锚点导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#intro nav[aria-label="页面内锚点导航"] ul li a {
  display: block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #fff;
  font-size: 0.85rem;
  transition: all var(--transition);
}

#intro nav[aria-label="页面内锚点导航"] ul li a:hover {
  background: #fff;
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* ===== Lists in sections ===== */
main section ul:not([class]) {
  padding-left: 0;
}

main section > ul > li,
main section > ol > li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  color: var(--text-soft);
}

main section > ul > li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient);
}

main section > ol {
  counter-reset: step;
}

main section > ol > li {
  padding-left: 38px;
  counter-increment: step;
}

main section > ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ===== Blockquote ===== */
blockquote {
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--gradient-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  position: relative;
}

blockquote p {
  margin-bottom: 10px;
  color: var(--text);
  font-style: italic;
  position: relative;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ===== Articles ===== */
#articles {
  background: var(--bg-alt);
}

article {
  padding: 24px;
  margin-bottom: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
  position: relative;
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

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

article:hover::before {
  transform: scaleY(1);
}

article h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--text);
  transition: color var(--transition);
}

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

article > p:nth-of-type(1) {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

article > p:nth-of-type(1)::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

article > p:nth-of-type(2) {
  color: var(--text-soft);
}

article > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 18px;
  background: var(--gradient);
  color: #fff;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(31, 111, 235, 0.25);
}

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

article > a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(31, 111, 235, 0.4);
}

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

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

#faq details:hover {
  border-color: var(--primary-light);
}

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

#faq summary {
  padding: 16px 48px 16px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  position: relative;
  transition: background var(--transition), color var(--transition);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  transition: all var(--transition);
}

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

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

#faq summary:hover {
  background: var(--bg-soft);
}

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

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

/* ===== Contact ===== */
#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px 24px;
}

#contact ul li a {
  display: inline-block;
  padding: 4px 0;
  border-bottom: 1px dashed transparent;
  transition: all var(--transition);
}

#contact ul li a:hover {
  border-bottom-color: var(--primary);
  transform: translateX(4px);
}

/* ===== Footer ===== */
footer[role="contentinfo"] {
  margin-top: 56px;
  padding: 40px 20px 32px;
  background: var(--gradient);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer[role="contentinfo"]::before {
  content: "";
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

footer[role="contentinfo"] p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

footer[role="contentinfo"] a {
  color: #fff;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background var(--transition);
}

footer[role="contentinfo"] a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  header nav {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 20px;
    gap: 12px;
  }

  header nav ul {
    width: 100%;
    order: 3;
  }

  :root {
    --header-height: 112px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  main {
    padding: 0 14px;
  }

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

  #intro {
    padding: 36px 22px;
    border-radius: var(--radius);
  }

  #intro figure {
    padding: 6px;
  }

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

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

  article {
    padding: 18px;
  }

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

  blockquote {
    padding: 16px 18px;
  }

  .topbar {
    font-size: 0.72rem;
  }

  footer[role="contentinfo"] {
    padding: 32px 16px 24px;
  }
}

@media (max-width: 480px) {
  header nav > a span {
    font-size: 1rem;
  }

  header nav ul li a {
    padding: 6px 9px;
    font-size: 0.82rem;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 4px;
  }

  #faq summary {
    padding: 14px 44px 14px 16px;
    font-size: 0.92rem;
  }

  article > a {
    width: 100%;
    justify-content: center;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Print ===== */
@media print {
  header[role="banner"],
  footer[role="contentinfo"],
  .topbar {
    display: none;
  }

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

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
</parameter>