:root {
  --brand: #6d28d9;
  --brand-light: #8b5cf6;
  --brand-dark: #5b21b6;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #f8f7fc;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-strong: rgba(255, 255, 255, 0.88);
  --text: #1f1b2e;
  --text-secondary: #5c5470;
  --text-muted: #8a8199;
  --border: rgba(109, 40, 217, 0.12);
  --border-strong: rgba(109, 40, 217, 0.24);
  --shadow-sm: 0 2px 8px rgba(31, 27, 46, 0.06);
  --shadow-md: 0 8px 28px rgba(31, 27, 46, 0.1);
  --shadow-lg: 0 18px 48px rgba(31, 27, 46, 0.14);
  --shadow-brand: 0 12px 32px rgba(109, 40, 217, 0.28);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --header-h: 72px;
  --max-w: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gradient-brand: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 45%, #a78bfa 100%);
  --gradient-hero: linear-gradient(135deg, #4c1d95 0%, #6d28d9 40%, #8b5cf6 70%, #c4b5fd 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
}

html.dark-mode {
  --bg: #0f0c18;
  --bg-elevated: #1a1526;
  --bg-glass: rgba(26, 21, 38, 0.72);
  --bg-glass-strong: rgba(26, 21, 38, 0.9);
  --text: #f1eef8;
  --text-secondary: #b8b0cc;
  --text-muted: #857c9c;
  --border: rgba(167, 139, 250, 0.16);
  --border-strong: rgba(167, 139, 250, 0.32);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);
  --shadow-brand: 0 12px 32px rgba(109, 40, 217, 0.45);
  --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 40%, #6d28d9 75%, #7c3aed 100%);
  --gradient-glass: linear-gradient(135deg, rgba(40,32,58,0.85), rgba(26,21,38,0.6));
}

*,
*::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: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(139, 92, 246, 0.1), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.08), transparent 38%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

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

h1 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
h4 { font-size: clamp(1.02rem, 2vw, 1.15rem); }

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

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

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

html.dark-mode a {
  color: var(--brand-light);
}

html.dark-mode a:hover {
  color: #c4b5fd;
}

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

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

li {
  margin-bottom: 0.4em;
}

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

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--brand);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
}

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

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

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

:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(139, 92, 246, 0.3);
  color: var(--text);
}

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease),
    background-color 0.35s var(--ease);
}

#site-header.is-sticky {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-md);
}

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

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

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

.brand-logo {
  border-radius: 12px;
  box-shadow: var(--shadow-brand);
  transition: transform 0.4s var(--ease);
}

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

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

.main-nav {
  flex: 1;
  min-width: 0;
}

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

.main-nav li {
  margin: 0;
}

.main-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.main-nav a:hover {
  color: var(--brand);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-1px);
}

html.dark-mode .main-nav a:hover {
  background: rgba(167, 139, 250, 0.14);
  color: #c4b5fd;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-search {
  display: flex;
  align-items: center;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-search:focus-within {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

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

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

.site-search button {
  border: 0;
  background: var(--gradient-brand);
  color: #fff;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.25s var(--ease);
}

.site-search button:hover {
  filter: brightness(1.1);
}

#theme-toggle,
#menu-toggle {
  border: 1px solid var(--border);
  background: var(--bg-glass-strong);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  border-color: var(--brand-light);
  color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

#menu-toggle {
  display: none;
}

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

main > section,
main > nav {
  margin-bottom: 32px;
  padding: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease),
    background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}

main > section:hover,
main > nav:hover {
  box-shadow: var(--shadow-md);
}

main > section > h2:first-child,
main > nav > h2:first-child {
  position: relative;
  padding-left: 18px;
}

main > section > h2:first-child::before,
main > nav > h2:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
}

/* ============ Hero ============ */
.hero {
  margin-top: 28px;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.hero:hover {
  box-shadow: none !important;
}

.carousel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--gradient-hero);
  box-shadow: var(--shadow-brand);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20, 12, 44, 0.55) 100%);
  pointer-events: none;
  z-index: 1;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease),
    visibility 0.7s var(--ease);
  z-index: 0;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

.slide-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  opacity: 0.9;
  z-index: -1;
}

.slide-text {
  position: relative;
  z-index: 3;
}

.slide-text h2 {
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin-bottom: 0.4em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.slide-text p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-size: 0.95rem;
  max-width: 46ch;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.carousel-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}

.carousel-controls .prev,
.carousel-controls .next {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s var(--ease);
}

.carousel-controls .prev:hover,
.carousel-controls .next:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
}

.dots {
  display: flex;
  gap: 6px;
  margin-left: 4px;
}

.dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.dot.is-active {
  width: 24px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

.hero-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px;
  border-radius: var(--radius-xl);
  background: var(--gradient-glass);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.hero-intro h1 {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 0.5em;
}

html.dark-mode .hero-intro h1 {
  background: linear-gradient(135deg, #c4b5fd, #a78bfa, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-intro .lead {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 8px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.stat-num {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.1;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

html.dark-mode .stat-num {
  background: linear-gradient(135deg, #c4b5fd, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.update-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  padding: 14px 24px !important;
  background: var(--bg-glass) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.breadcrumb li {
  margin: 0;
  color: var(--text-muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ============ TOC ============ */
.toc {
  background: var(--gradient-glass) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin: 0;
}

.toc a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}

.toc a:hover {
  color: #fff;
  background: var(--gradient-brand);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

/* ============ Info / Contact lists ============ */
.info-list,
.contact-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.info-list li,
.contact-list li {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.info-list li:hover,
.contact-list li:hover {
  border-color: var(--border-strong);
  transform: translateX(3px);
}

/* ============ News ============ */
.news-item {
  padding: 20px 0;
  border-bottom: 1px dashed var(--border);
}

.news-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.news-item:first-of-type {
  padding-top: 4px;
}

.news-item h3 {
  margin-bottom: 0.3em;
  transition: color 0.25s var(--ease);
}

.news-item:hover h3 {
  color: var(--brand);
}

html.dark-mode .news-item:hover h3 {
  color: var(--brand-light);
}

.meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6em;
}

/* ============ Article cards ============ */
.article-card {
  position: relative;
  padding: 22px 24px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease), background-color 0.35s var(--ease);
  overflow: hidden;
}

.article-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

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

.article-card:hover::before {
  opacity: 1;
}

.article-card h3 {
  margin-bottom: 0.35em;
  font-size: 1.1rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card:hover h3 a {
  color: var(--brand);
}

html.dark-mode .article-card:hover h3 a {
  color: var(--brand-light);
}

.article-card .summary {
  font-size: 0.9rem;
  margin-bottom: 0.8em;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  padding: 4px 0;
  transition: gap 0.25s var(--ease), color 0.25s var(--ease);
}

.read-more::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}

.read-more:hover {
  gap: 8px;
}

.read-more:hover::after {
  transform: translateX(3px);
}

html.dark-mode .read-more {
  color: var(--brand-light);
}

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

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

#faq details[open] {
  border-color: var(--brand-light);
  box-shadow: var(--shadow-sm);
  background: var(--bg-elevated);
}

#faq summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 48px;
  transition: color 0.25s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--brand);
  transition: transform 0.3s var(--ease), color 0.25s var(--ease);
  line-height: 1;
}

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

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

html.dark-mode #faq summary:hover {
  color: var(--brand-light);
}

#faq details p {
  padding: 0 20px 18px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.8;
  animation: fadeIn 0.4s var(--ease);
}

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

/* ============ Sitemap / Friend links ============ */
#sitemap ul,
#friend-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
}

#sitemap li,
#friend-links li {
  margin: 0;
}

#sitemap a,
#friend-links a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.3s var(--ease);
}

#sitemap a:hover,
#friend-links a:hover {
  color: var(--brand);
  border-color: var(--brand-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

html.dark-mode #sitemap a:hover,
html.dark-mode #friend-links a:hover {
  color: var(--brand-light);
}

/* ============ Footer ============ */
#site-footer {
  position: relative;
  padding: 56px 24px 40px;
  background: linear-gradient(180deg, transparent, rgba(109, 40, 217, 0.06));
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

#site-footer > section,
#site-footer > p {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

#site-footer section {
  margin-bottom: 24px;
  padding: 22px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#site-footer section:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

#site-footer h2 {
  font-size: 1.05rem;
  margin-bottom: 0.5em;
  color: var(--text);
}

#site-footer p {
  font-size: 0.85rem;
  line-height: 1.8;
  margin: 0;
}

.footer-meta {
  max-width: var(--max-w);
  margin: 28px auto 0 !important;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
}

/* ============ Back to top ============ */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  border: 0;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-brand);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    visibility 0.35s var(--ease), filter 0.25s var(--ease);
}

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

#back-to-top:hover {
  filter: brightness(1.12);
  transform: translateY(-3px) scale(1.03);
}

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

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

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .carousel {
    min-height: 360px;
  }

  .hero-intro {
    padding: 28px;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 20px;
    gap: 12px;
  }

  .main-nav {
    order: 3;
    flex-basis: 100%;
    display: none;
    padding-bottom: 8px;
  }

  .main-nav.is-open {
    display: block;
    animation: fadeIn 0.3s var(--ease);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .main-nav a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
  }

  #menu-toggle {
    display: inline-block;
  }

  .site-search input {
    width: 120px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  main {
    padding: 0 16px 48px;
  }

  main > section,
  main > nav {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }
}

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

  .header-inner {
    padding: 10px 14px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .header-tools {
    gap: 8px;
  }

  .site-search {
    display: none;
  }

  #theme-toggle,
  #menu-toggle {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .hero {
    margin-top: 16px;
    gap: 16px;
  }

  .carousel {
    min-height: 300px;
    border-radius: var(--radius-lg);
  }

  .slide {
    padding: 22px;
  }

  .slide-text h2 {
    font-size: 1.2rem;
  }

  .slide-text p {
    font-size: 0.85rem;
  }

  .carousel-controls {
    right: 14px;
    bottom: 14px;
    gap: 6px;
  }

  .carousel-controls .prev,
  .carousel-controls .next {
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .hero-intro {
    padding: 22px;
    border-radius: var(--radius-lg);
  }

  .hero-intro .lead {
    font-size: 0.88rem;
  }

  .hero-stats {
    gap: 8px;
  }

  .stat {
    padding: 10px 6px;
  }

  .stat-label {
    font-size: 0.66rem;
  }

  .breadcrumb {
    padding: 10px 16px !important;
  }

  .article-card {
    padding: 18px;
  }

  .info-list,
  .contact-list {
    grid-template-columns: 1fr;
  }

  #back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 10px 14px;
    font-size: 0.76rem;
  }

  #site-footer {
    padding: 36px 14px 28px;
  }

  #site-footer section {
    padding: 18px;
  }
}

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

/* ============ Accessibility / motion ============ */
@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 print {
  #site-header,
  #back-to-top,
  .carousel-controls,
  #theme-toggle,
  #menu-toggle,
  .site-search {
    display: none !important;
  }

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

  main > section,
  main > nav {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}