:root {
  --bg: #0f0f1a;
  --bg-soft: #16162a;
  --bg-card: rgba(30, 30, 52, 0.72);
  --bg-card-solid: #1a1a2e;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f8;
  --text-soft: #b9bdd2;
  --text-mute: #8b90aa;
  --primary: #e94560;
  --primary-2: #ff6b81;
  --accent: #f5c518;
  --accent-2: #4cc9f0;
  --grad-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 42%, #0f3460 72%, #3a1c4a 100%);
  --grad-primary: linear-gradient(135deg, #e94560 0%, #b83b5e 100%);
  --grad-accent: linear-gradient(135deg, #f5c518 0%, #ff8c42 100%);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 0 1px rgba(233, 69, 96, 0.35), 0 12px 40px rgba(233, 69, 96, 0.28);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --blur: blur(18px) saturate(160%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px;
  --header-h: 68px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5fb;
    --bg-soft: #eceef8;
    --bg-card: rgba(255, 255, 255, 0.78);
    --bg-card-solid: #ffffff;
    --border: rgba(20, 20, 50, 0.09);
    --border-strong: rgba(20, 20, 50, 0.16);
    --text: #16182b;
    --text-soft: #444a63;
    --text-mute: #6b7189;
    --grad-hero: linear-gradient(135deg, #e8ecff 0%, #dfe6ff 38%, #f2e6ff 70%, #ffe9ef 100%);
    --shadow-sm: 0 4px 14px rgba(30, 34, 80, 0.08);
    --shadow-md: 0 12px 34px rgba(30, 34, 80, 0.12);
    --shadow-lg: 0 24px 64px rgba(30, 34, 80, 0.16);
    --shadow-glow: 0 0 0 1px rgba(233, 69, 96, 0.25), 0 12px 40px rgba(233, 69, 96, 0.18);
  }
}

*,
*::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: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 12% -8%, rgba(233, 69, 96, 0.16), transparent 60%),
    radial-gradient(1000px 520px at 92% 4%, rgba(76, 201, 240, 0.14), transparent 62%),
    radial-gradient(900px 520px at 50% 100%, rgba(245, 197, 24, 0.08), transparent 65%);
  background-attachment: fixed;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

h1 {
  font-size: clamp(1.55rem, 3.4vw, 2.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 800;
  position: relative;
  padding-left: 16px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: var(--radius-pill);
  background: var(--grad-primary);
}

h3 {
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  font-weight: 700;
  color: var(--text);
}

h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-soft);
}

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

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

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

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--primary);
}

blockquote {
  margin: 0 0 1.2em;
  padding: 18px 20px 18px 24px;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

blockquote p {
  margin-bottom: 0.5em;
  color: var(--text);
  font-size: 0.98rem;
}

blockquote footer {
  font-size: 0.85rem;
  color: var(--text-mute);
  font-style: normal;
}

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

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

::selection {
  background: rgba(233, 69, 96, 0.4);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-soft);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), #7b2d47);
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-soft);
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.72);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

@media (prefers-color-scheme: light) {
  .site-header {
    background: rgba(255, 255, 255, 0.72);
  }
}

.site-header:hover {
  box-shadow: var(--shadow-sm);
}

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

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

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

.logo:hover svg {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.5);
}

.logo-text {
  font-size: 1.05rem;
  background: linear-gradient(100deg, var(--text) 20%, var(--primary-2) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

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

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

.main-nav li {
  margin: 0;
}

.main-nav a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  color: var(--text-soft);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

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

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  background: rgba(233, 69, 96, 0.12);
  transform: translateY(-1px);
}

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

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

.site-search input[type="search"] {
  width: 190px;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.3s var(--ease);
}

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

.site-search input[type="search"]:focus {
  outline: none;
  width: 230px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.2);
}

.site-search button {
  padding: 9px 18px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-primary);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

.site-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(233, 69, 96, 0.42);
  filter: brightness(1.08);
}

.site-search button:active {
  transform: translateY(0) scale(0.98);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  font-size: 1.25rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.menu-toggle:hover {
  background: rgba(233, 69, 96, 0.16);
  transform: scale(1.05);
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px 0;
}

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

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

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

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

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

.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

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

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 22px 0 30px;
  padding: clamp(26px, 4.5vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--grad-hero);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: conic-gradient(
    from 0deg,
    rgba(233, 69, 96, 0.28),
    rgba(76, 201, 240, 0.22),
    rgba(245, 197, 24, 0.18),
    rgba(233, 69, 96, 0.28)
  );
  animation: heroSpin 26s linear infinite;
  filter: blur(70px);
  opacity: 0.75;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(700px 320px at 80% 0%, rgba(255, 255, 255, 0.12), transparent 70%);
  pointer-events: none;
}

@keyframes heroSpin {
  to {
    transform: rotate(360deg);
  }
}

.hero h1 {
  max-width: 22ch;
  margin-bottom: 0.5em;
  background: linear-gradient(100deg, var(--text) 10%, var(--primary-2) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 30px rgba(233, 69, 96, 0.18);
}

.hero-lead {
  max-width: 68ch;
  font-size: clamp(0.94rem, 1.25vw, 1.03rem);
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 22px 0 30px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease),
    color 0.3s var(--ease);
}

.btn-primary {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.38);
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(233, 69, 96, 0.5);
}

.btn-primary:hover::after {
  left: 130%;
}

.btn-secondary {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.btn-secondary:hover {
  color: var(--text);
  transform: translateY(-3px);
  background: rgba(245, 197, 24, 0.14);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(245, 197, 24, 0.22);
}

/* ---- Carousel ---- */
.hero-carousel {
  position: relative;
  margin: 0 0 30px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: var(--shadow-md);
}

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

.slide.active {
  display: block;
}

.slide svg {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}

.hero-carousel:hover .slide.active svg {
  transform: scale(1.03);
  filter: saturate(1.15);
}

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

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

.carousel-controls button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
  color: #fff;
  background: rgba(20, 20, 38, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.carousel-controls button:hover {
  background: var(--primary);
  border-color: var(--primary-2);
  transform: scale(1.1);
}

.carousel-controls button:active {
  transform: scale(0.94);
}

/* ---- Stats ---- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 0;
}

.hero-stats > div {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  text-align: center;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.hero-stats > div:hover {
  transform: translateY(-5px);
  border-color: rgba(233, 69, 96, 0.5);
  box-shadow: var(--shadow-glow);
}

.hero-stats dt {
  font-size: 0.82rem;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.hero-stats dd {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 800;
  background: linear-gradient(100deg, var(--accent) 0%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

.anchor-nav li {
  margin: 0;
}

.anchor-nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.84rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.anchor-nav a:hover {
  color: #fff;
  background: var(--grad-primary);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.36);
}

/* ============ Content blocks ============ */
.content-block {
  margin: 0 0 26px;
  padding: clamp(20px, 3vw, 34px);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
  animation: blockIn 0.7s var(--ease) both;
}

.content-block:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

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

.content-block > h2 {
  margin-bottom: 1em;
}

.content-block > h3 {
  margin-top: 1.6em;
  padding-bottom: 0.35em;
  border-bottom: 1px dashed var(--border-strong);
}

.content-block > h3:first-of-type {
  margin-top: 0.4em;
}

.content-block ul li::marker {
  color: var(--accent);
}

.meta-line {
  margin-top: 1.4em;
  padding-top: 0.9em;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-mute);
  letter-spacing: 0.01em;
}

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

.news-list li {
  margin: 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.news-list li:hover {
  transform: translateX(5px);
  border-color: rgba(233, 69, 96, 0.45);
  background: rgba(233, 69, 96, 0.08);
}

.news-list h3 {
  margin-bottom: 0.35em;
  font-size: 1.02rem;
}

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

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

.news-list p {
  margin: 0.2em 0 0;
  font-size: 0.88rem;
  color: var(--text-mute);
}

.news-list li > p:nth-of-type(2) {
  color: var(--text-soft);
}

/* ============ Articles ============ */
#articles h3 {
  margin-top: 1.5em;
}

#articles h3 + p {
  margin-bottom: 0.5em;
}

#articles p > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary-2);
  border: 1px solid rgba(233, 69, 96, 0.4);
  border-radius: var(--radius-pill);
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

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

#articles p > a:hover {
  color: #fff;
  background: var(--grad-primary);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.36);
}

#articles p > a:hover::after {
  transform: translateX(3px);
}

/* ============ FAQ ============ */
#faq details {
  margin: 0 0 12px;
  padding: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#faq details:hover {
  border-color: rgba(233, 69, 96, 0.4);
}

#faq details[open] {
  border-color: rgba(233, 69, 96, 0.55);
  background: rgba(233, 69, 96, 0.06);
  box-shadow: var(--shadow-sm);
}

#faq summary {
  position: relative;
  padding: 15px 48px 15px 18px;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color 0.25s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-2);
  background: rgba(233, 69, 96, 0.14);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

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

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

#faq details > p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 0.92rem;
  color: var(--text-soft);
  animation: faqIn 0.4s var(--ease);
}

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

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

#howto ol > li {
  position: relative;
  counter-increment: step;
  padding: 14px 16px 14px 58px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#howto ol > li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.86rem;
  font-weight: 800;
  color: #fff;
  background: var(--grad-primary);
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(233, 69, 96, 0.36);
}

#howto ol > li:hover {
  transform: translateX(5px);
  border-color: rgba(233, 69, 96, 0.45);
  background: rgba(233, 69, 96, 0.08);
}

#howto ul > li {
  position: relative;
  padding-left: 2px;
}

/* ============ Contact ============ */
#contact ul li strong {
  color: var(--accent);
}

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

#sitemap li {
  margin: 0;
}

#sitemap a {
  display: block;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

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

/* ============ Footer ============ */
.site-footer {
  margin-top: 20px;
  padding: clamp(28px, 4vw, 52px) 20px 24px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  max-width: 100%;
}

@media (prefers-color-scheme: light) {
  .site-footer {
    background: linear-gradient(180deg, transparent, rgba(20, 24, 60, 0.05));
  }
}

.site-footer > * {
  max-width: 420px;
}

.site-footer h2 {
  font-size: 1.02rem;
  padding-left: 13px;
  margin-bottom: 0.8em;
}

.site-footer h2::before {
  width: 4px;
}

.site-footer h3 {
  font-size: 0.92rem;
  color: var(--text-soft);
  margin-top: 1em;
}

.site-footer p {
  font-size: 0.86rem;
  color: var(--text-mute);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

.site-footer nav a {
  font-size: 0.86rem;
  color: var(--text-soft);
  display: inline-block;
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

.site-footer nav a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.site-footer section:last-of-type p:last-child {
  margin-top: 1.2em;
  padding-top: 1em;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-mute);
}

/* ============ Back to top ============ */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(233, 69, 96, 0.42);
  opacity: 0.92;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.3s var(--ease);
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 18px 40px rgba(233, 69, 96, 0.55);
  opacity: 1;
}

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

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

  .site-search input[type="search"] {
    width: 150px;
  }

  .site-search input[type="search"]:focus {
    width: 180px;
  }

  .main-nav a {
    padding: 6px 9px;
    font-size: 0.85rem;
  }
}

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

  .header-inner {
    flex-wrap: nowrap;
    padding: 9px 16px;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
    order: 3;
  }

  .main-nav {
    order: 5;
    flex: 1 1 100%;
    display: none;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    animation: faqIn 0.35s var(--ease);
  }

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

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

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

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

  .site-search {
    order: 4;
    flex: 1 1 100%;
    margin-top: 6px;
  }

  .site-search input[type="search"],
  .site-search input[type="search"]:focus {
    width: 100%;
    flex: 1 1 auto;
  }

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

  .hero {
    padding: 24px 20px;
    border-radius: var(--radius);
  }

  .hero h1 {
    max-width: 100%;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn-primary,
  .btn-secondary {
    flex: 1 1 160px;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

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

  .carousel-controls button {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
  }

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

  .content-block {
    border-radius: var(--radius);
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer > * {
    max-width: 100%;
  }

  .back-to-top {
    right: 14px;
    bottom: 18px;
    width: 44px;
    height: 44px;
  }
}

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

  main {
    padding: 0 14px 30px;
  }

  .breadcrumb {
    padding: 12px 14px 0;
  }

  .logo-text {
    font-size: 0.95rem;
  }

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

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

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

  .anchor-nav {
    padding: 12px;
  }

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

  #sitemap ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  #howto ol > li {
    padding: 12px 12px 12px 50px;
  }

  #howto ol > li::before {
    left: 11px;
    top: 12px;
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
  }

  #faq summary {
    padding: 13px 44px 13px 14px;
    font-size: 0.9rem;
  }

  blockquote {
    padding: 14px 14px 14px 18px;
  }
}

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

  .hero::before {
    animation: none;
  }
}

@media print {
  .site-header,
  .site-search,
  .menu-toggle,
  .anchor-nav,
  .carousel-controls,
  .back-to-top,
  .hero::before,
  .hero::after {
    display: none !important;
  }

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

  .content-block,
  .hero {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    backdrop-filter: none;
  }
}