:root {
  --primary: #ff4d6d;
  --primary-dark: #e6395a;
  --primary-light: #ff7a92;
  --accent: #4dd0e1;
  --accent2: #ffb74d;
  --gradient-hero: linear-gradient(135deg, #ff4d6d 0%, #ff7a92 35%, #a855f7 70%, #6366f1 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 77, 109, 0.08), rgba(99, 102, 241, 0.08));
  --bg: #fdf7f8;
  --bg-alt: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-border: rgba(255, 255, 255, 0.55);
  --text: #1f1235;
  --text-soft: #5a4a6e;
  --text-muted: #8a7a9c;
  --border: rgba(31, 18, 53, 0.1);
  --shadow-sm: 0 2px 8px rgba(31, 18, 53, 0.06);
  --shadow-md: 0 8px 28px rgba(31, 18, 53, 0.1);
  --shadow-lg: 0 20px 60px rgba(31, 18, 53, 0.14);
  --shadow-primary: 0 8px 24px rgba(255, 77, 109, 0.32);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --header-h: 68px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

body.dark-mode {
  --bg: #0d0a14;
  --bg-alt: #16111f;
  --bg-glass: rgba(28, 21, 40, 0.68);
  --bg-glass-border: rgba(255, 255, 255, 0.1);
  --text: #f2ecf7;
  --text-soft: #c4b8d4;
  --text-muted: #9084a4;
  --border: rgba(255, 255, 255, 0.12);
  --gradient-card: linear-gradient(145deg, rgba(255, 77, 109, 0.14), rgba(99, 102, 241, 0.14));
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(255, 77, 109, 0.1), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(99, 102, 241, 0.1), transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

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

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

a:hover {
  color: var(--primary-dark);
}

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

h1 { font-size: clamp(1.75rem, 4vw, 2.65rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); margin-top: 1.75rem; margin-bottom: 0.65rem; }
h4 { font-size: 1.05rem; margin-top: 1.25rem; margin-bottom: 0.5rem; }

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

ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; color: var(--text-soft); }

blockquote {
  margin: 1.25rem 0;
  padding: 1.1rem 1.4rem;
  border-left: 4px solid var(--primary);
  background: var(--gradient-card);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-soft);
  font-style: normal;
}

blockquote p { margin-bottom: 0; }

time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

address {
  font-style: normal;
}

.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(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--primary);
  color: #fff;
}

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

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

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

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

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

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

.brand-name {
  font-size: 1.2rem;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}

#main-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

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

#main-nav li { margin: 0; }

#main-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

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

#main-nav a:hover {
  color: var(--primary);
  background: rgba(255, 77, 109, 0.08);
}

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

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

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

#site-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 77, 109, 0.14);
}

#search-input {
  border: none;
  background: transparent;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  width: 190px;
  outline: none;
}

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

#site-search button {
  border: none;
  background: var(--gradient-hero);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  transition: opacity 0.25s var(--ease);
}

#site-search button:hover { opacity: 0.88; }

#theme-toggle,
#menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  transform: translateY(-2px) rotate(8deg);
  box-shadow: var(--shadow-primary);
  background: var(--primary);
  color: #fff;
}

#menu-toggle { display: none; }

/* ============ MAIN LAYOUT ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

main > section {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease);
}

main > section.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

/* ============ BREADCRUMB ============ */
.breadcrumb {
  margin-top: 1.25rem;
  padding: 0.65rem 1.1rem;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  display: inline-block;
}

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

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

.breadcrumb li + li::before {
  content: "›";
  margin-right: 0.35rem;
  color: var(--text-muted);
}

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

.breadcrumb a:hover { color: var(--primary); }

/* ============ HERO ============ */
.hero {
  margin-top: 1.5rem !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--gradient-hero) !important;
  border: none !important;
  box-shadow: var(--shadow-lg) !important;
  position: relative;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.28), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.18), transparent 42%);
  z-index: -1;
  pointer-events: none;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  min-height: 220px;
}

.hero-slider .slide {
  position: relative;
  animation: slideFade 0.7s var(--ease);
}

@keyframes slideFade {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

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

.hero-slider .slide h2 {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  width: calc(100% - 2.5rem);
  max-width: 720px;
  text-align: center;
  color: #fff;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  margin: 0;
  padding: 0.7rem 1.2rem;
  background: rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-summary {
  padding: 2rem;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-summary h1 {
  margin-bottom: 0.9rem;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-summary p {
  font-size: 1rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.5rem 0;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.7rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  will-change: transform;
}

.btn-primary {
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 34px rgba(255, 77, 109, 0.45);
}

.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  color: var(--primary);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.hero-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.hero-stats li {
  margin: 0;
  padding: 1rem 0.75rem;
  text-align: center;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s 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-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1.2;
}

.hero-stats span {
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* ============ ANCHOR NAV ============ */
.anchor-nav {
  margin-top: 2rem;
  padding: 0.85rem 1rem;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 90;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.anchor-nav ul {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
}

.anchor-nav li { margin: 0; }

.anchor-nav a {
  display: block;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
}

.anchor-nav a:hover {
  color: var(--primary);
  background: rgba(255, 77, 109, 0.1);
  border-color: rgba(255, 77, 109, 0.25);
  transform: translateY(-1px);
}

/* ============ SECTION CONTENT ============ */
section > h2 {
  position: relative;
  padding-bottom: 0.7rem;
}

section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-hero);
}

section ul {
  list-style: none;
  padding-left: 0;
}

section ul li {
  position: relative;
  padding-left: 1.6rem;
}

section ul li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.7em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-hero);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.15);
}

section ol {
  counter-reset: item;
  list-style: none;
  padding-left: 0;
}

section ol li {
  counter-increment: item;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 0.7rem;
}

section ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient-hero);
  border-radius: 50%;
  box-shadow: var(--shadow-primary);
}

/* ============ ARTICLES / NEWS ============ */
#news article,
#articles > article {
  position: relative;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  overflow: hidden;
}

#news article::before,
#articles > article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-hero);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

#news article:hover,
#articles > article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 77, 109, 0.35);
}

#news article:hover::before,
#articles > article:hover::before {
  transform: scaleY(1);
}

#news article h3,
#articles > article h3 {
  margin-top: 0;
}

#articles > article a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 77, 109, 0.1);
  transition: all 0.3s var(--ease);
}

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

#articles > article a:hover {
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

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

#articles > div[id^="article-"] {
  margin-top: 0.75rem;
  padding: 1.1rem 1.35rem;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#articles > div[id^="article-"]:hover {
  border-color: var(--primary);
  background: rgba(255, 77, 109, 0.05);
}

#articles > div[id^="article-"] h4 {
  margin-top: 0;
  color: var(--primary);
}

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

#faq details:hover {
  border-color: rgba(255, 77, 109, 0.4);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 77, 109, 0.5);
  background: var(--gradient-card);
}

#faq summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.25s var(--ease);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-hero);
  border-radius: 50%;
  transition: transform 0.35s var(--ease);
}

#faq details[open] summary::after {
  transform: rotate(45deg);
}

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

#faq details > p {
  padding: 0 1.25rem 1.15rem;
  margin: 0;
  font-size: 0.92rem;
  animation: faqIn 0.4s var(--ease);
}

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

/* ============ CONTACT / ADDRESS ============ */
#contact address {
  display: grid;
  gap: 0.65rem;
  padding: 1.5rem;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

#contact address p {
  margin: 0;
  padding-left: 1.6rem;
  position: relative;
  font-size: 0.95rem;
}

#contact address p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-hero);
}

#contact address a {
  font-weight: 700;
}

/* ============ SITEMAP / LINKS ============ */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
}

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

#sitemap ul li::before,
#links ul li::before {
  display: none;
}

#sitemap ul a,
#links ul a {
  display: block;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.28s var(--ease);
}

#sitemap ul a:hover,
#links ul a:hover {
  color: #fff;
  background: var(--gradient-hero);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

/* ============ LEGAL ============ */
#legal h3 {
  color: var(--primary);
}

/* ============ FOOTER ============ */
#site-footer {
  margin-top: 3rem;
  background: linear-gradient(160deg, #1f1235 0%, #2b1a12 60%, #0f2233 100%);
  color: #d8cee6;
  padding: 2.5rem 1.25rem;
  position: relative;
  overflow: hidden;
}

#site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 77, 109, 0.22), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(77, 208, 225, 0.18), transparent 45%);
  pointer-events: none;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.5rem;
  text-align: center;
}

#site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: #b9aecb;
}

#site-footer a {
  color: #ff8fa3;
  font-weight: 600;
}

#site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ============ BACK TO TOP ============ */
#back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--gradient-hero);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
  z-index: 999;
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 14px 34px rgba(255, 77, 109, 0.5);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  #main-nav a {
    padding: 0.4rem 0.55rem;
    font-size: 0.84rem;
  }
  #search-input { width: 150px; }
}

@media (max-width: 900px) {
  #menu-toggle { display: inline-flex; }

  #main-nav {
    order: 10;
    flex-basis: 100%;
    display: none;
    justify-content: flex-start;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
  }

  #main-nav.open {
    display: block;
    animation: navDrop 0.35s var(--ease);
  }

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

  #main-nav ul {
    flex-direction: column;
    gap: 0.15rem;
  }

  #main-nav a {
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
  }

  #main-nav a::after { display: none; }

  .header-inner {
    justify-content: space-between;
  }

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

  .hero-summary {
    padding: 1.5rem;
  }

  main > section {
    padding: 1.5rem;
  }
}

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

  body { font-size: 15px; }

  main { padding: 0 0.85rem 2rem; }

  .header-inner {
    padding: 0.5rem 0.85rem;
    gap: 0.6rem;
  }

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

  #site-search { display: none; }

  .hero-slider .slide h2 {
    bottom: 0.85rem;
    font-size: 0.92rem;
    padding: 0.55rem 0.85rem;
    width: calc(100% - 1.5rem);
  }

  .hero-summary { padding: 1.15rem; }

  .hero-actions { gap: 0.6rem; }

  .btn-primary,
  .btn-secondary {
    flex: 1 1 auto;
    padding: 0.7rem 1.1rem;
    font-size: 0.88rem;
  }

  .hero-stats {
    gap: 0.5rem;
  }

  .hero-stats li { padding: 0.75rem 0.4rem; }

  .hero-stats span { font-size: 0.72rem; }

  main > section {
    margin-top: 1.75rem;
    padding: 1.15rem;
    border-radius: var(--radius-md);
  }

  .anchor-nav {
    padding: 0.6rem 0.7rem;
    top: calc(var(--header-h) + 4px);
  }

  .anchor-nav a {
    padding: 0.3rem 0.7rem;
    font-size: 0.76rem;
  }

  #news article,
  #articles > article {
    padding: 1.05rem 1.1rem;
  }

  #faq summary {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }

  #faq details > p {
    padding: 0 1rem 1rem;
    font-size: 0.88rem;
  }

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

  #back-to-top {
    width: 42px;
    height: 42px;
    right: 0.85rem;
    bottom: 0.85rem;
    font-size: 1.05rem;
  }

  .footer-inner { gap: 0.35rem; }
}

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

/* ============ REDUCED MOTION ============ */
@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;
  }

  main > section {
    opacity: 1;
    transform: none;
  }
}

/* ============ PRINT ============ */
@media print {
  #site-header,
  #back-to-top,
  .anchor-nav,
  .hero-slider,
  .hero-actions,
  #site-search,
  #theme-toggle,
  #menu-toggle {
    display: none !important;
  }

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

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

  a { color: #000; text-decoration: underline; }
}