:root {
  --brand: #f6a623;
  --brand-strong: #e08f0c;
  --brand-soft: rgba(246, 166, 35, 0.14);
  --accent: #3a7ca5;
  --accent-soft: rgba(58, 124, 165, 0.14);
  --green: #5a9e6f;
  --bg: #fdfaf5;
  --bg-alt: #f5efe6;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.66);
  --surface-glass-strong: rgba(255, 255, 255, 0.82);
  --text: #2b2b2b;
  --text-soft: #5c5c5c;
  --text-muted: #8a8a8a;
  --border: rgba(43, 43, 43, 0.1);
  --border-strong: rgba(43, 43, 43, 0.18);
  --shadow-sm: 0 2px 8px rgba(43, 43, 43, 0.06);
  --shadow-md: 0 8px 24px rgba(43, 43, 43, 0.08);
  --shadow-lg: 0 18px 48px rgba(43, 43, 43, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --header-h: 72px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --gradient-hero: linear-gradient(135deg, #fff4e0 0%, #ffe6c2 38%, #e8f4f8 100%);
  --gradient-brand: linear-gradient(135deg, #f6a623 0%, #f7c04a 55%, #3a7ca5 130%);
}

html[data-theme="dark"] {
  --brand: #f7b945;
  --brand-strong: #ffc95e;
  --brand-soft: rgba(247, 185, 69, 0.16);
  --accent: #6fb3d8;
  --accent-soft: rgba(111, 179, 216, 0.16);
  --green: #7cc092;
  --bg: #14161a;
  --bg-alt: #1b1e24;
  --surface: #1f232a;
  --surface-glass: rgba(31, 35, 42, 0.62);
  --surface-glass-strong: rgba(31, 35, 42, 0.85);
  --text: #eceae6;
  --text-soft: #bdbbb6;
  --text-muted: #8e8c88;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  --gradient-hero: linear-gradient(135deg, #2a2015 0%, #1e2a33 55%, #16202a 100%);
}

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

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

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, var(--brand-soft), transparent 42%),
    radial-gradient(circle at 88% 22%, var(--accent-soft), transparent 46%);
  background-attachment: fixed;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

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

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

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

h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.85rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h4 { font-size: 1.05rem; }

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

ul, ol {
  padding-left: 1.4em;
}

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

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

#site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

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

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

.brand svg {
  transition: transform 0.5s var(--ease);
}

.brand:hover svg {
  transform: rotate(12deg) 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 1 auto;
}

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

#main-nav a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a:hover,
#main-nav a:focus-visible {
  background: var(--brand-soft);
  color: var(--brand-strong);
  transform: translateY(-2px);
}

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

#site-search {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  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);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

#search-input {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 14px;
  font-size: 0.9rem;
  width: 190px;
  outline: none;
}

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

#site-search button,
#theme-toggle,
#menu-toggle {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  color: #fff;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

#site-search button {
  border-radius: 0;
  background: var(--brand);
  color: #2b2b2b;
}

#theme-toggle,
#menu-toggle {
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--border-strong);
}

#site-search button:hover,
#theme-toggle:hover,
#menu-toggle:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

#menu-toggle {
  display: none;
}

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

main > section,
main > nav {
  margin-bottom: 48px;
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  padding: 16px 0 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

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

/* ============ Hero ============ */
#hero {
  position: relative;
  margin-top: 24px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(246, 166, 35, 0.35), transparent 68%);
  filter: blur(10px);
  z-index: -1;
  animation: floatOrb 14s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -45% -12%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(58, 124, 165, 0.28), transparent 68%);
  filter: blur(12px);
  z-index: -1;
  animation: floatOrb 18s ease-in-out infinite reverse;
}

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

#hero-title {
  max-width: 22em;
}

.hero-lead {
  max-width: 62ch;
  font-size: 1.02rem;
  color: var(--text-soft);
}

/* Carousel */
.hero-carousel {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  background: var(--surface-glass-strong);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.hero-carousel .slide {
  display: none;
  margin: 0;
  animation: fadeSlide 0.6s var(--ease);
}

.hero-carousel .slide.is-active {
  display: block;
}

.hero-carousel .slide svg {
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 360;
  object-fit: cover;
}

.hero-carousel figcaption {
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-glass-strong);
  border-top: 1px solid var(--border);
}

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

.carousel-controls {
  position: absolute;
  right: 14px;
  bottom: 64px;
  display: flex;
  gap: 8px;
}

.carousel-controls button {
  border: 1px solid var(--border-strong);
  background: var(--surface-glass-strong);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.carousel-controls button:hover {
  transform: translateY(-2px);
  background: var(--brand);
  color: #2b2b2b;
}

/* Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-stats li {
  padding: 18px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.hero-stats li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.hero-stats strong {
  display: block;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============ TOC ============ */
#toc {
  padding: 24px clamp(18px, 3vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

#toc h2 {
  font-size: 1.1rem;
  margin-bottom: 14px;
}

#toc ol {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 18px;
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.92rem;
}

#toc a {
  color: var(--text-soft);
  display: inline-block;
  padding: 3px 0;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

#toc a:hover {
  color: var(--brand-strong);
  transform: translateX(3px);
}

/* ============ Sections ============ */
main > section {
  padding: clamp(22px, 3.5vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

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

#hero {
  background: var(--gradient-hero);
}

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

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

/* Section headings accent */
main > section > h2,
#toc h2 {
  position: relative;
  padding-left: 16px;
}

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

main > section > h3 {
  margin-top: 1.6em;
  color: var(--text);
}

main > section > h3::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 8px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  opacity: 0.7;
}

/* ============ Articles & News ============ */
#news article,
#articles article {
  position: relative;
  padding: 22px 24px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}

#news article h3,
#articles article h3 {
  margin-top: 0;
  transition: color 0.25s var(--ease);
}

#news article:hover h3,
#articles article:hover h3 {
  color: var(--brand-strong);
}

#news time,
#articles time {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-strong);
  background: var(--brand-soft);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-strong);
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

#articles article a:hover {
  background: var(--brand);
  color: #2b2b2b;
  transform: translateX(2px);
}

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

/* ============ Blockquote ============ */
blockquote {
  margin: 16px 0;
  padding: 16px 22px;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

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

/* ============ FAQ ============ */
#faq dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

#faq dt {
  font-weight: 700;
  color: var(--text);
  padding: 14px 18px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  position: relative;
  padding-left: 44px;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

#faq dt::before {
  content: "Q";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #2b2b2b;
  background: var(--brand);
  border-radius: 50%;
}

#faq dd {
  margin: 0 0 6px;
  padding: 14px 18px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-top: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  transition: background-color 0.25s var(--ease);
}

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

#faq dt:hover + dd {
  background: var(--brand-soft);
}

/* ============ Contact ============ */
#contact address {
  font-style: normal;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

#contact address p {
  margin: 0 0 8px;
}

#contact address p:last-child {
  margin-bottom: 0;
}

/* ============ Sitemap & Links ============ */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 20px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

#sitemap li,
#links li {
  padding: 0;
}

#sitemap a,
#links a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.92rem;
  transition: transform 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  color: var(--brand-strong);
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* ============ Footer ============ */
#site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 20px 24px;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px 36px;
}

#site-footer h2 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text);
}

#site-footer p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}

#site-footer a {
  color: var(--text-soft);
}

#site-footer a:hover {
  color: var(--brand-strong);
}

#site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

#site-footer nav a {
  font-size: 0.88rem;
  display: inline-block;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

#site-footer nav a:hover {
  transform: translateX(4px);
}

.copyright {
  grid-column: 1 / -1;
  margin: 12px 0 0 !important;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
}

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

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-lg);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .header-inner {
    gap: 12px;
  }

  #search-input {
    width: 150px;
  }

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

@media (max-width: 860px) {
  :root {
    --header-h: 64px;
  }

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

  #main-nav {
    order: 10;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease);
    opacity: 0;
  }

  #main-nav.is-open {
    max-height: 520px;
    opacity: 1;
  }

  #main-nav ul {
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
  }

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

  .header-tools {
    margin-left: auto;
  }

  #site-search {
    order: 3;
    flex-basis: 100%;
  }

  #search-input {
    flex: 1;
    width: auto;
  }

  .carousel-controls {
    bottom: 56px;
    right: 10px;
  }

  #hero {
    padding: 24px 18px;
  }

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

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

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

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

  .brand svg {
    width: 34px;
    height: 34px;
  }

  main {
    padding: 0 14px 48px;
  }

  main > section,
  main > nav {
    margin-bottom: 32px;
  }

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

  .hero-stats li {
    padding: 14px 10px;
  }

  .hero-carousel figcaption {
    font-size: 0.86rem;
    padding: 12px 14px;
  }

  .carousel-controls {
    position: static;
    padding: 10px 14px;
    justify-content: flex-end;
    background: var(--surface-glass-strong);
    border-top: 1px solid var(--border);
  }

  #news article,
  #articles article {
    padding: 18px 16px;
  }

  #faq dt {
    padding-left: 40px;
  }

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

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

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

  .header-tools {
    gap: 6px;
  }

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

/* ============ Motion preferences ============ */
@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============ Print ============ */
@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 {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}