:root {
  --brand: #6d3bbd;
  --brand-2: #9b5de5;
  --brand-3: #f15bb5;
  --brand-dark: #2c1a4d;
  --brand-light: #f3eefc;
  --accent: #ffd166;
  --accent-pink: #ff8fab;
  --accent-blue: #8ecae6;
  --accent-green: #b5e48c;
  --text: #1f1b2e;
  --text-muted: #5c5470;
  --text-soft: #7a7290;
  --bg: #ffffff;
  --bg-soft: #faf8ff;
  --bg-card: #ffffff;
  --border: #e6e0f2;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 8px 32px rgba(44, 26, 77, 0.12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 24px rgba(44, 26, 77, 0.08);
  --shadow-hover: 0 16px 40px rgba(109, 59, 189, 0.18);
  --gradient-brand: linear-gradient(135deg, #6d3bbd 0%, #9b5de5 45%, #f15bb5 100%);
  --gradient-soft: linear-gradient(135deg, #f3eefc 0%, #fdf2f8 55%, #eef7ff 100%);
  --gradient-hero: linear-gradient(125deg, #2c1a4d 0%, #6d3bbd 40%, #9b5de5 70%, #f15bb5 100%);
  --max-width: 1120px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

body.dark-mode {
  --text: #ece8f7;
  --text-muted: #b6aecb;
  --text-soft: #948cae;
  --bg: #14101f;
  --bg-soft: #1c1630;
  --bg-card: #1f1836;
  --border: #332a4d;
  --brand-light: #241a3d;
  --glass-bg: rgba(31, 24, 54, 0.68);
  --glass-border: rgba(155, 93, 229, 0.22);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 16px 40px rgba(155, 93, 229, 0.28);
  --gradient-soft: linear-gradient(135deg, #241a3d 0%, #2a1a3d 55%, #1a2038 100%);
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--brand-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 9999;
  background: var(--gradient-brand);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow-hover);
}

.skip-link:hover {
  color: #fff;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  transition: box-shadow var(--transition), background var(--transition);
}

.site-header.is-sticky {
  box-shadow: var(--glass-shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
  transition: transform var(--transition);
}

.brand:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.brand-logo {
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(109, 59, 189, 0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}

.brand:hover .brand-logo {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 8px 22px rgba(241, 91, 181, 0.4);
}

.brand-name {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand);
}

.main-nav {
  flex: 1;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
}

.main-nav a {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
  position: relative;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

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

.main-nav a:hover {
  color: var(--brand);
  background: var(--brand-light);
  text-decoration: none;
  transform: translateY(-1px);
}

.main-nav a:hover::after {
  width: 60%;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-soft);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.site-search:focus-within {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(155, 93, 229, 0.18);
  background: var(--bg);
}

.site-search input {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 14px;
  font-size: 0.85rem;
  width: 160px;
  outline: none;
  font-family: inherit;
}

.site-search input::placeholder {
  color: var(--text-soft);
}

.site-search button,
.theme-toggle,
.menu-toggle,
.hero-prev,
.hero-next,
.back-to-top {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--gradient-brand);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  white-space: nowrap;
}

.site-search button {
  border-radius: 0;
  padding: 8px 16px;
  background: transparent;
  color: var(--brand);
}

.site-search button:hover {
  background: var(--brand-light);
}

.theme-toggle,
.menu-toggle {
  background: var(--bg-soft);
  color: var(--brand);
  border: 1px solid var(--border);
}

.theme-toggle:hover,
.menu-toggle:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "›";
  color: var(--brand-2);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--brand);
  text-decoration: none;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
}

section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

section:last-of-type {
  border-bottom: 0;
}

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

h1 {
  font-size: 2rem;
  margin: 0 0 18px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand);
}

h2 {
  font-size: 1.5rem;
  margin: 0 0 20px;
  padding-left: 16px;
  position: relative;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 4px;
  background: var(--gradient-brand);
  box-shadow: 0 0 12px rgba(155, 93, 229, 0.5);
}

h3 {
  font-size: 1.14rem;
  margin: 26px 0 12px;
  color: var(--brand);
}

body.dark-mode h3 {
  color: var(--brand-2);
}

h4 {
  font-size: 1rem;
  margin: 18px 0 8px;
  color: var(--text-muted);
}

p {
  margin: 0 0 16px;
  color: var(--text);
}

ul,
ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

li {
  margin-bottom: 8px;
}

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

.hero {
  position: relative;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: heroGradientShift 14s ease infinite;
  border-radius: var(--radius-lg);
  margin-top: 24px;
  padding: 40px 36px 32px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(109, 59, 189, 0.28);
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.35) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatBlob 10s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -15%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(241, 91, 181, 0.32) 0%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatBlob 13s ease-in-out infinite reverse;
}

@keyframes heroGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

.hero-slides {
  position: relative;
  min-height: 200px;
  z-index: 1;
}

.hero-slide {
  display: none;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  animation: fadeSlideIn 0.6s ease both;
}

.hero-slide.is-active {
  display: flex;
}

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

.hero-art {
  flex-shrink: 0;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
  transition: transform var(--transition);
}

.hero-slide:hover .hero-art {
  transform: scale(1.05) rotate(2deg);
}

.hero-title {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3);
}

.hero-text {
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  font-size: 1rem;
}

.hero-controls {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}

.hero-prev,
.hero-next {
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
}

.hero-prev:hover,
.hero-next:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}

.stat {
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.stat:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
}

.intro {
  padding-top: 44px;
}

.page-h1 {
  margin-top: 0;
}

.intro-lead {
  font-size: 1.05rem;
  padding: 20px 24px;
  background: var(--gradient-soft);
  border-radius: var(--radius);
  border-left: 4px solid var(--brand-2);
  box-shadow: var(--shadow);
}

.anchor-nav {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 12px 0 0;
  box-shadow: var(--shadow);
}

.anchor-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.anchor-nav a {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}

.anchor-nav a:hover {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(109, 59, 189, 0.3);
}

.timeline {
  list-style: none;
  padding-left: 0;
}

.timeline li {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--border);
  padding-bottom: 14px;
}

.timeline li:last-child {
  border-left-color: transparent;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: 0 0 0 4px var(--brand-light), 0 0 12px rgba(155, 93, 229, 0.6);
  transition: transform var(--transition);
}

.timeline li:hover::before {
  transform: scale(1.3);
}

.timeline strong {
  color: var(--brand);
}

body.dark-mode .timeline strong {
  color: var(--brand-2);
}

.section-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-soft);
  border-radius: 999px;
  margin-bottom: 18px;
}

article {
  margin-bottom: 20px;
}

.article-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand-2);
}

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

.article-card h3 {
  margin-top: 0;
}

.article-meta {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.read-more {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brand);
  padding: 6px 0;
  position: relative;
  transition: transform var(--transition);
}

.read-more::after {
  content: " →";
  transition: margin var(--transition);
}

.read-more:hover {
  text-decoration: none;
  transform: translateX(4px);
}

blockquote {
  margin: 0 0 16px;
  padding: 18px 22px;
  border-left: 4px solid var(--accent-pink);
  background: var(--gradient-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

blockquote::before {
  content: "“";
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 3rem;
  color: var(--accent-pink);
  opacity: 0.4;
  line-height: 1;
  font-family: Georgia, serif;
}

blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-muted);
}

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--bg-soft);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

details:hover {
  border-color: var(--brand-2);
}

details[open] {
  border-color: var(--brand-2);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 32px;
  transition: color var(--transition);
}

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

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

summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
  font-size: 1rem;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}

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

details p {
  margin: 12px 0 0;
  color: var(--text-muted);
  animation: fadeSlideIn 0.4s ease both;
}

.contact-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.contact-list li {
  margin-bottom: 0;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), border-color var(--transition);
}

.contact-list li:hover {
  transform: translateX(4px);
  border-color: var(--brand-2);
}

.contact-list strong {
  color: var(--brand);
}

body.dark-mode .contact-list strong {
  color: var(--brand-2);
}

.sitemap-list,
.friend-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.sitemap-list li,
.friend-links li {
  margin-bottom: 0;
}

.sitemap-list a,
.friend-links a {
  display: inline-block;
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.sitemap-list a:hover,
.friend-links a:hover {
  background: var(--brand-light);
  border-color: var(--brand-2);
  text-decoration: none;
  transform: translateY(-2px);
}

.page-meta {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.site-footer {
  background: linear-gradient(135deg, #1a1030 0%, #2c1a4d 55%, #3a1f5e 100%);
  color: #e8e2f5;
  margin-top: 30px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(155, 93, 229, 0.22) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 24px;
  font-size: 0.88rem;
  position: relative;
  z-index: 1;
}

.footer-inner p {
  color: rgba(232, 226, 245, 0.85);
  margin-bottom: 8px;
}

.site-footer a {
  color: #d9cff0;
  transition: color var(--transition);
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  box-shadow: 0 8px 24px rgba(109, 59, 189, 0.4);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), box-shadow var(--transition);
}

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

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(241, 91, 181, 0.45);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

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

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

@media (max-width: 960px) {
  .header-inner {
    gap: 12px;
  }
  .main-nav {
    order: 4;
    flex-basis: 100%;
    display: none;
    animation: fadeSlideIn 0.3s ease both;
  }
  .main-nav.is-open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 2px;
    padding-top: 8px;
  }
  .main-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
  }
  .main-nav a::after {
    display: none;
  }
  .menu-toggle {
    display: inline-block;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .site-search input {
    width: 120px;
  }
  .hero {
    padding: 32px 24px 26px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
    line-height: 1.75;
  }
  h1 {
    font-size: 1.55rem;
  }
  h2 {
    font-size: 1.25rem;
    padding-left: 14px;
  }
  h3 {
    font-size: 1.05rem;
  }
  .header-inner {
    padding: 10px 16px;
  }
  .brand-name {
    font-size: 1rem;
  }
  .header-tools {
    flex-wrap: wrap;
    gap: 6px;
  }
  .site-search {
    order: 3;
    flex-basis: 100%;
    margin-top: 4px;
  }
  .site-search input {
    width: 100%;
    flex: 1;
  }
  .breadcrumb {
    padding: 12px 16px 0;
  }
  main {
    padding: 0 16px 40px;
  }
  section {
    padding: 30px 0;
  }
  .hero {
    padding: 24px 18px 22px;
    border-radius: var(--radius);
    margin-top: 16px;
  }
  .hero-slide {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .hero-title {
    font-size: 1.2rem;
  }
  .hero-text {
    font-size: 0.92rem;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat {
    padding: 12px 8px;
  }
  .stat-num {
    font-size: 1.2rem;
  }
  .stat-label {
    font-size: 0.76rem;
  }
  .intro-lead {
    padding: 16px 18px;
    font-size: 0.98rem;
  }
  .anchor-nav {
    padding: 14px 16px;
  }
  .anchor-nav a {
    font-size: 0.82rem;
    padding: 5px 11px;
  }
  .article-card {
    padding: 16px 18px;
  }
  details {
    padding: 14px 16px;
  }
  .contact-list li {
    padding: 10px 14px;
  }
  .back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 8px 14px;
    font-size: 0.8rem;
  }
  .footer-inner {
    padding: 28px 16px;
  }
}

@media (max-width: 380px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
  .brand-name {
    display: none;
  }
}

@media (hover: none) {
  .article-card:hover,
  .stat:hover,
  .anchor-nav a:hover,
  .contact-list li:hover,
  blockquote:hover {
    transform: none;
  }
}

::selection {
  background: rgba(155, 93, 229, 0.28);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-soft);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-3) 100%);
  border-radius: 999px;
  border: 2px solid var(--bg-soft);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brand-2) 0%, var(--brand-3) 100%);
}

@media print {
  .site-header,
  .back-to-top,
  .hero-controls,
  .anchor-nav,
  .site-footer nav,
  .theme-toggle,
  .menu-toggle {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .hero {
    background: #f3eefc !important;
    color: #000;
    box-shadow: none;
  }
}