:root {
  --brand: #6C5CE7;
  --brand-2: #A29BFE;
  --brand-3: #FD79A8;
  --accent: #FDCB6E;
  --teal: #00CEC9;
  --green: #00B894;
  --blue: #0984E3;
  --ink: #2D3436;
  --ink-soft: #636E72;
  --line: rgba(108, 92, 231, 0.14);
  --bg: #F7F6FE;
  --bg-2: #FFFFFF;
  --card: #FFFFFF;
  --glass: rgba(255, 255, 255, 0.66);
  --glass-line: rgba(255, 255, 255, 0.55);
  --shadow: 0 10px 30px rgba(108, 92, 231, 0.12);
  --shadow-hover: 0 18px 44px rgba(108, 92, 231, 0.22);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --max: 1180px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E9E7FF;
    --ink-soft: #A8A5C8;
    --line: rgba(162, 155, 254, 0.22);
    --bg: #12101E;
    --bg-2: #1A1730;
    --card: #1E1B33;
    --glass: rgba(30, 27, 51, 0.62);
    --glass-line: rgba(162, 155, 254, 0.18);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-hover: 0 18px 44px rgba(0, 0, 0, 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: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 8% -10%, rgba(162, 155, 254, 0.28), transparent 60%),
    radial-gradient(1000px 520px at 100% 0%, rgba(253, 121, 168, 0.18), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

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

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(108, 92, 231, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

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

h1 {
  font-size: clamp(1.7rem, 2.4vw + 1rem, 2.7rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.35rem, 1.4vw + 1rem, 1.95rem);
  font-weight: 800;
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand), var(--brand-3));
}

h3 {
  font-size: clamp(1.08rem, 0.6vw + 0.95rem, 1.28rem);
  font-weight: 700;
  color: var(--ink);
}

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

ul, ol {
  padding-left: 1.3em;
  color: var(--ink-soft);
}

li {
  margin-bottom: 0.35em;
}

time {
  font-size: 0.85rem;
  color: var(--ink-soft);
  opacity: 0.85;
}

.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(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-line);
  box-shadow: 0 4px 24px rgba(108, 92, 231, 0.08);
}

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

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

.brand svg {
  border-radius: 10px;
  transition: transform 0.45s var(--ease);
  box-shadow: 0 6px 18px rgba(108, 92, 231, 0.35);
}

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

.brand .brand-text {
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.04em;
}

#site-header nav {
  flex: 1 1 auto;
}

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

.nav-list a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 500;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.nav-list a:hover {
  background: rgba(108, 92, 231, 0.12);
  color: var(--brand);
  transform: translateY(-2px);
}

#site-header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#site-header input[type="search"] {
  width: 210px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  font-size: 0.9rem;
  transition: width 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#site-header input[type="search"]::placeholder {
  color: var(--ink-soft);
  opacity: 0.7;
}

#site-header input[type="search"]:focus {
  width: 250px;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
  outline: none;
}

#site-header button[type="submit"] {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
  box-shadow: 0 6px 16px rgba(108, 92, 231, 0.35);
}

#site-header button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(253, 121, 168, 0.4);
  filter: brightness(1.05);
}

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

main > section {
  margin: 0 0 44px;
  padding: 30px clamp(18px, 3vw, 38px);
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise 0.7s var(--ease) both;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(162, 155, 254, 0.45);
}

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

/* ========== Hero ========== */
#hero {
  position: relative;
  margin-top: 24px;
  padding: clamp(26px, 4vw, 52px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 400px at 85% -20%, rgba(253, 203, 110, 0.55), transparent 60%),
    radial-gradient(700px 380px at 10% 110%, rgba(0, 206, 201, 0.5), transparent 60%),
    linear-gradient(135deg, #6C5CE7 0%, #8E7BFF 45%, #FD79A8 100%);
  box-shadow: 0 24px 60px rgba(108, 92, 231, 0.35);
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.14) 0 2px, transparent 3px),
    radial-gradient(circle at 45% 80%, rgba(255, 255, 255, 0.12) 0 2px, transparent 3px);
  background-size: 180px 180px, 240px 240px, 300px 300px;
  pointer-events: none;
  opacity: 0.8;
}

#hero > * {
  position: relative;
  z-index: 1;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 3px 18px rgba(45, 52, 54, 0.25);
  margin-bottom: 0.5em;
}

#hero h1::before {
  display: none;
}

#hero .hero-lead {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.98rem, 0.5vw + 0.9rem, 1.1rem);
  max-width: 78ch;
}

#hero .hero-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: inline-block;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.hero-stats .stat {
  padding: 16px 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  text-align: center;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.hero-stats .stat:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.26);
}

.stat-num {
  display: block;
  font-size: clamp(1.3rem, 1.6vw + 0.9rem, 1.9rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(45, 52, 54, 0.25);
}

.stat-label {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 4px;
}

.banner-carousel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.banner-slide {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.banner-slide:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 22px 44px rgba(45, 52, 54, 0.3);
}

.banner-slide svg {
  width: 100%;
  height: auto;
  display: block;
}

.banner-slide figcaption {
  padding: 12px 14px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
}

/* ========== Anchor nav & breadcrumb ========== */
.anchor-nav {
  margin: 0 0 26px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

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

.anchor-nav a {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(108, 92, 231, 0.08);
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
}

.anchor-nav a:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(108, 92, 231, 0.3);
}

.breadcrumb {
  margin: 0 0 26px;
  font-size: 0.86rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--ink-soft);
}

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

.breadcrumb a {
  color: var(--brand);
  font-weight: 600;
}

.breadcrumb [aria-current="page"] {
  color: var(--ink-soft);
}

/* ========== Cards / blocks inside sections ========== */
#reviews blockquote {
  margin: 0 0 16px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(253, 121, 168, 0.08));
  border-left: 5px solid var(--brand);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

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

#reviews blockquote p {
  margin: 0;
  color: var(--ink);
  font-style: normal;
}

#news article,
#articles article {
  padding: 20px 22px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(162, 155, 254, 0.5);
}

#news article h3,
#articles article h3 {
  margin-bottom: 0.35em;
}

#articles article a {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 6px 16px rgba(108, 92, 231, 0.28);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#articles article a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(253, 121, 168, 0.4);
}

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

#faq details[open] {
  box-shadow: var(--shadow);
  border-color: rgba(162, 155, 254, 0.5);
}

#faq summary {
  cursor: pointer;
  padding: 14px 20px;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 46px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(108, 92, 231, 0.12);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

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

#faq summary:hover {
  background: rgba(108, 92, 231, 0.06);
  color: var(--brand);
}

#faq details p {
  padding: 0 20px 16px;
  margin: 0;
  animation: fadeIn 0.4s var(--ease) both;
}

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

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

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

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

#howto ol li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
}

/* Contact */
#contact address {
  font-style: normal;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.07), rgba(0, 206, 201, 0.08));
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

#contact address p {
  margin: 0 0 6px;
  color: var(--ink);
}

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

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

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

#sitemap a,
#links a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  transition: all 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(108, 92, 231, 0.3);
}

/* Author info */
#author-info p {
  margin-bottom: 0.7em;
}

/* ========== Footer ========== */
footer {
  margin-top: 20px;
  background: linear-gradient(180deg, rgba(108, 92, 231, 0.06), rgba(253, 121, 168, 0.06));
  border-top: 1px solid var(--line);
  padding: 40px 20px 30px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.footer-inner > p {
  margin: 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
}

footer nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 2px;
  position: relative;
}

footer nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
  transition: width 0.3s var(--ease);
}

footer nav a:hover::after {
  width: 100%;
}

footer section {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

footer section h2 {
  font-size: 1.05rem;
  padding-left: 14px;
}

footer section h2::before {
  width: 4px;
}

footer section p {
  margin: 0;
  font-size: 0.88rem;
}

/* ========== Back to top ========== */
#back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 120;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 10px 26px rgba(108, 92, 231, 0.4);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 34px rgba(253, 121, 168, 0.45);
  filter: brightness(1.06);
}

#back-to-top:active {
  transform: translateY(-1px) scale(0.99);
}

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

  #site-header input[type="search"] {
    width: 170px;
  }

  #site-header input[type="search"]:focus {
    width: 200px;
  }

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

  .banner-carousel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .banner-carousel .banner-slide:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
    --radius-lg: 20px;
  }

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

  .header-inner {
    padding: 10px 16px;
    align-items: center;
    min-height: auto;
  }

  #site-header nav {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .nav-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-list a {
    white-space: nowrap;
    font-size: 0.86rem;
    padding: 5px 10px;
  }

  #site-header form[role="search"] {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  #site-header input[type="search"],
  #site-header input[type="search"]:focus {
    width: 100%;
    max-width: 160px;
  }

  #site-header button[type="submit"] {
    padding: 8px 14px;
    font-size: 0.84rem;
  }

  main {
    padding: 0 14px 40px;
  }

  main > section {
    padding: 22px 18px;
    margin-bottom: 30px;
  }

  #hero {
    margin-top: 16px;
    padding: 24px 18px;
    border-radius: 20px;
  }

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

  .hero-stats .stat {
    padding: 12px 10px;
  }

  .banner-carousel {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .banner-carousel .banner-slide:last-child {
    grid-column: auto;
  }

  .anchor-nav {
    padding: 12px 14px;
  }

  .anchor-nav a {
    font-size: 0.8rem;
    padding: 4px 11px;
  }

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

  #faq summary {
    padding: 12px 16px;
    padding-right: 42px;
    font-size: 0.95rem;
  }

  #faq details p {
    padding: 0 16px 14px;
  }

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

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }

  #sitemap a,
  #links a {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  footer {
    padding: 30px 14px 90px;
  }

  footer section {
    padding: 16px 16px;
  }

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

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

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

  #site-header input[type="search"],
  #site-header input[type="search"]:focus {
    max-width: 130px;
  }
}

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

/* ========== Print ========== */
@media print {
  #site-header,
  .anchor-nav,
  .breadcrumb,
  #back-to-top,
  footer nav {
    display: none !important;
  }

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

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