:root {
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --bg-soft: #eef1f8;
  --text: #1a1a2e;
  --text-soft: #4a4e69;
  --text-muted: #7b8098;
  --primary: #e94560;
  --primary-strong: #c81e3c;
  --primary-soft: rgba(233, 69, 96, 0.12);
  --accent: #0f3460;
  --accent-2: #16213e;
  --line: rgba(26, 26, 46, 0.1);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 10px 30px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 22px 60px rgba(26, 26, 46, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --grad-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
  --grad-primary: linear-gradient(135deg, #e94560 0%, #ff7a8a 100%);
  --grad-soft: linear-gradient(135deg, rgba(233, 69, 96, 0.08), rgba(15, 52, 96, 0.08));
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --maxw: 1200px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0d0f1a;
  --bg-elev: #161a2b;
  --bg-soft: #1b2036;
  --text: #eef0f8;
  --text-soft: #b9bed6;
  --text-muted: #8b91ad;
  --primary: #ff5c78;
  --primary-strong: #ff7a8a;
  --primary-soft: rgba(255, 92, 120, 0.16);
  --accent: #4a7bd0;
  --accent-2: #1f2a4a;
  --line: rgba(238, 240, 248, 0.12);
  --glass: rgba(22, 26, 43, 0.6);
  --glass-border: rgba(238, 240, 248, 0.14);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.55);
  --grad-hero: linear-gradient(135deg, #0d0f1a 0%, #141a30 45%, #1c2b4d 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 92, 120, 0.14), rgba(74, 123, 208, 0.14));
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(233, 69, 96, 0.08), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(15, 52, 96, 0.1), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  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(--primary);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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

h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: clamp(1.12rem, 1.9vw, 1.4rem); }
h4 { font-size: clamp(1rem, 1.5vw, 1.14rem); color: var(--text-soft); }

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

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

li { margin-bottom: 0.45em; }

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

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.3em;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--grad-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

time { color: var(--text-muted); font-size: 0.88em; }

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

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

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

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

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

.brand svg {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.35);
  transition: transform 0.4s var(--ease);
}

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

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

.main-nav { flex: 1 1 auto; }

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

.main-nav li { margin: 0; }

.main-nav a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  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 {
  color: var(--primary);
  background: var(--primary-soft);
  text-decoration: none;
  transform: translateY(-1px);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 320px;
}

.site-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-search input[type="search"]::placeholder { color: var(--text-muted); }

.site-search input[type="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  outline: none;
}

.site-search button,
#theme-toggle,
#menu-toggle {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--grad-primary);
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(233, 69, 96, 0.28);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

.site-search button:hover,
#theme-toggle:hover,
#menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(233, 69, 96, 0.4);
  filter: brightness(1.05);
}

.site-search button:active,
#theme-toggle:active,
#menu-toggle:active { transform: translateY(0); }

#theme-toggle {
  background: var(--bg-elev);
  color: var(--text-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

#theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.2);
}

#menu-toggle { display: none; }

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

main > section {
  margin-bottom: 48px;
  padding: clamp(20px, 3.5vw, 40px);
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), background-color 0.35s var(--ease);
  animation: rise-in 0.7s var(--ease) both;
}

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

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

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* reveal on scroll */
.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);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: var(--maxw);
  margin: 0 auto 18px;
  padding: 0 4px;
  animation: fade-in 0.6s var(--ease) both;
}

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

.breadcrumb li { margin: 0; display: inline-flex; align-items: center; gap: 6px; }

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

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

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

/* ===== Hero ===== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: stretch;
  padding: clamp(24px, 4vw, 52px) !important;
  background: var(--grad-hero) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 60%;
  height: 120%;
  background: radial-gradient(circle at center, rgba(233, 69, 96, 0.35), transparent 65%);
  filter: blur(40px);
  z-index: -1;
  animation: float-slow 9s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -40% -15%;
  width: 55%;
  height: 110%;
  background: radial-gradient(circle at center, rgba(74, 123, 208, 0.35), transparent 65%);
  filter: blur(50px);
  z-index: -1;
  animation: float-slow 11s ease-in-out infinite reverse;
}

.hero h1,
.hero h2,
.hero p,
.hero h1 strong,
.hero p strong {
  color: #f4f6ff;
}

.hero h1 {
  font-size: clamp(1.5rem, 2.9vw, 2.3rem);
  margin-bottom: 0.5em;
  background: linear-gradient(120deg, #ffffff 30%, #ffb3c0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero p { color: rgba(238, 240, 248, 0.86); }

.hero strong { color: #ffffff; }

.hero-copy { display: flex; flex-direction: column; justify-content: center; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 6px;
  font-size: 0.95rem;
}

.hero-cta a {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  background: var(--grad-primary);
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.hero-cta a + a {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-cta a:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(233, 69, 96, 0.5);
  text-decoration: none;
}

.hero-cta a + a:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

/* hero slider */
.hero-slider {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.hero-slider .slide {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.hero-slider .slide:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(233, 69, 96, 0.6);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.45);
}

.hero-slider .slide svg {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease);
}

.hero-slider .slide:hover svg { transform: scale(1.04); }

.hero-slider .slide h2 {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 44px 18px 14px;
  font-size: clamp(0.98rem, 1.5vw, 1.15rem);
  color: #ffffff;
  background: linear-gradient(to top, rgba(10, 12, 24, 0.92), rgba(10, 12, 24, 0.35) 60%, transparent);
}

.hero-slider .slide p {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 52px;
  margin: 0;
  font-size: 0.84rem;
  color: rgba(238, 240, 248, 0.78);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.hero-slider .slide:hover p,
.hero-slider .slide:focus-within p {
  opacity: 1;
  transform: translateY(0);
}

/* stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 18px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 8px;
  text-align: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.stat:hover {
  transform: translateY(-4px);
  background: rgba(233, 69, 96, 0.18);
  border-color: rgba(233, 69, 96, 0.55);
}

.stat-num {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.74rem;
  color: rgba(238, 240, 248, 0.72);
  letter-spacing: 0.02em;
}

/* ===== Generic section content polish ===== */
#intro h3,
#library h3,
#solution h3,
#cases h3,
#knowledge h3,
#contact h3,
#howto h3 {
  margin-top: 1.4em;
  padding-left: 14px;
  position: relative;
}

#intro h3::before,
#library h3::before,
#solution h3::before,
#cases h3::before,
#knowledge h3::before,
#contact h3::before,
#howto h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 4px;
  border-radius: 4px;
  background: var(--grad-primary);
}

#library h4,
#solution h4 {
  margin-top: 1.2em;
  color: var(--primary);
}

#intro ul,
#library ul,
#howto ul,
#howto ol {
  padding: 0;
  list-style: none;
}

#intro ul li,
#library ul li,
#howto ul li {
  position: relative;
  padding-left: 24px;
}

#intro ul li::before,
#library ul li::before,
#howto ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

#howto ol {
  counter-reset: step;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding-left: 42px;
  margin-bottom: 0.8em;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--grad-primary);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.35);
}

/* ===== News ===== */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.news-list li {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.news-list li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.news-list h3 { margin: 0 0 6px; font-size: 1.05rem; }

.news-list h3 a { color: var(--text); text-decoration: none; }

.news-list h3 a:hover { color: var(--primary); text-decoration: none; }

.news-list p { margin: 0 0 4px; font-size: 0.9rem; }

.news-list p:last-child { margin-bottom: 0; }

/* ===== Articles ===== */
#articles {
  display: block;
}

#articles > article {
  margin: 0 0 16px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#articles > article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

#articles > article h3 { margin: 0 0 6px; font-size: 1.08rem; }

#articles > article h3 a { color: var(--text); text-decoration: none; }

#articles > article h3 a:hover { color: var(--primary); text-decoration: none; }

#articles > article p { margin: 0 0 6px; font-size: 0.92rem; }

#articles > article p:last-child { margin: 0; }

#articles > article p:last-child a {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

#articles > article p:last-child a:hover {
  color: #ffffff;
  background: var(--grad-primary);
  text-decoration: none;
}

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

#faq details[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

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

#faq summary {
  position: relative;
  padding: 15px 48px 15px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.25s var(--ease), background-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;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

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

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

#faq details > p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.93rem;
  animation: fade-in 0.35s var(--ease) both;
}

/* ===== Contact ===== */
#contact address ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
  display: grid;
  gap: 10px;
}

#contact address li {
  position: relative;
  margin: 0;
  padding: 12px 16px 12px 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

#contact address li:hover {
  transform: translateX(4px);
  border-color: var(--primary);
}

#contact address li::before {
  content: "◆";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--primary);
}

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

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform 0.25s var(--ease), color 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-2px);
  color: #ffffff;
  background: var(--grad-primary);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.3);
  text-decoration: none;
}

/* ===== Footer ===== */
footer {
  background: var(--grad-hero);
  color: rgba(238, 240, 248, 0.82);
  padding: 48px 20px 32px;
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

footer h2 {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 0.7em;
  position: relative;
  padding-bottom: 8px;
}

footer h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad-primary);
}

footer p {
  color: rgba(238, 240, 248, 0.72);
  font-size: 0.88rem;
  margin: 0 0 0.6em;
}

footer a {
  color: #ffb3c0;
  text-decoration: none;
}

footer a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer time { color: rgba(238, 240, 248, 0.55); }

/* ===== Back to top ===== */
#back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 120;
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  border-radius: 50%;
  font-size: 0;
  cursor: pointer;
  color: #ffffff;
  background: var(--grad-primary);
  box-shadow: 0 12px 30px rgba(233, 69, 96, 0.42);
  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), box-shadow 0.3s var(--ease);
}

#back-to-top::before {
  content: "↑";
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

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

#back-to-top:hover {
  box-shadow: 0 18px 40px rgba(233, 69, 96, 0.55);
  transform: translateY(-3px) scale(1.05);
}

/* ===== Dark mode tweaks ===== */
[data-theme="dark"] body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 92, 120, 0.1), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(74, 123, 208, 0.14), transparent 55%),
    var(--bg);
}

[data-theme="dark"] .hero-slider .slide {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #articles > article p:last-child a:hover {
  color: #0d0f1a;
}

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-slider {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .hero-slider .slide p { display: none; }
  .hero-slider .slide h2 { font-size: 0.86rem; padding: 36px 12px 10px; }
}

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

  .header-inner {
    padding: 10px 16px;
    gap: 10px;
  }

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

  #theme-toggle { order: 4; }

  .site-search {
    order: 5;
    flex: 1 1 100%;
  }

  .main-nav {
    order: 6;
    flex: 1 1 100%;
    display: none;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    animation: fade-in 0.3s var(--ease) both;
  }

  .main-nav.is-open { display: block; }

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

  .main-nav a {
    display: block;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.96rem;
  }

  main { padding: 18px 16px 52px; }

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

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

  .hero-slider {
    grid-template-columns: 1fr;
  }
  .hero-slider .slide p { display: block; }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

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

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

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

  .site-search button { padding: 9px 14px; }

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

  main > section {
    padding: 18px 16px;
    border-radius: var(--radius-md);
  }

  .hero { padding: 20px 16px !important; }

  .hero-stats { gap: 8px; }

  .stat { padding: 10px 6px; }

  .hero-cta { flex-direction: column; align-items: stretch; }

  .hero-cta a { text-align: center; }

  .news-list li,
  #articles > article { padding: 16px; }

  #faq summary { padding: 13px 44px 13px 16px; font-size: 0.94rem; }

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

  #back-to-top { width: 46px; height: 46px; right: 14px; bottom: 16px; }

  footer { padding: 36px 16px 24px; }
}

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

@media print {
  #site-header,
  #back-to-top,
  .site-search,
  #theme-toggle,
  #menu-toggle,
  .hero-slider,
  .hero-cta { display: none !important; }
  body { background: #fff; color: #000; }
  main > section { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
}