:root {
  --brand: #e94f87;
  --brand-2: #7a5cff;
  --brand-3: #ff8fab;
  --accent: #ffb86b;
  --bg: #ffffff;
  --bg-soft: #fbf9fd;
  --fg: #1f2430;
  --fg-strong: #12161f;
  --muted: #5b6472;
  --muted-2: #8a93a5;
  --line: #e7e9ef;
  --line-strong: #d8dceb;
  --card: #fafbff;
  --card-hover: #f4f6ff;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --shadow-sm: 0 2px 8px rgba(31, 36, 48, 0.06);
  --shadow-md: 0 10px 30px rgba(31, 36, 48, 0.09);
  --shadow-lg: 0 22px 60px rgba(31, 36, 48, 0.14);
  --shadow-brand: 0 14px 34px rgba(233, 79, 135, 0.28);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --grad-brand: linear-gradient(135deg, #e94f87 0%, #7a5cff 100%);
  --grad-hero: linear-gradient(135deg, #ffe3ee 0%, #f0e8ff 45%, #e6f0ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(233, 79, 135, 0.08), rgba(122, 92, 255, 0.08));
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0f1117;
  --bg-soft: #14171f;
  --fg: #e9ecf3;
  --fg-strong: #ffffff;
  --muted: #a2aab8;
  --muted-2: #7d8697;
  --line: #262a35;
  --line-strong: #333846;
  --card: #181b23;
  --card-hover: #1e222c;
  --glass: rgba(24, 27, 35, 0.62);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.55);
  --shadow-brand: 0 14px 34px rgba(233, 79, 135, 0.32);
  --grad-hero: linear-gradient(135deg, #2a1520 0%, #221a3a 45%, #14202f 100%);
  --grad-soft: linear-gradient(135deg, rgba(233, 79, 135, 0.14), rgba(122, 92, 255, 0.14));
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 8% -10%, rgba(233, 79, 135, 0.1), transparent 60%),
    radial-gradient(50vw 50vw at 100% 0%, rgba(122, 92, 255, 0.1), transparent 55%);
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(60vw 60vw at 8% -10%, rgba(233, 79, 135, 0.16), transparent 60%),
    radial-gradient(50vw 50vw at 100% 0%, rgba(122, 92, 255, 0.16), transparent 55%);
}

::selection {
  background: rgba(233, 79, 135, 0.24);
  color: var(--fg-strong);
}

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

a:hover {
  color: var(--brand-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

p {
  margin: 0 0 14px;
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin: 6px 0;
}

strong,
b {
  color: var(--fg-strong);
  font-weight: 700;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

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

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

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: var(--fg-strong);
  white-space: nowrap;
  transition: transform 0.3s var(--ease-out);
}

.brand:hover {
  text-decoration: none;
  color: var(--fg-strong);
  transform: translateY(-1px);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: var(--shadow-brand);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 18px 40px rgba(233, 79, 135, 0.4);
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav a:hover {
  background: var(--card);
  color: var(--brand);
  text-decoration: none;
  transform: translateY(-1px);
}

.nav a:hover::after {
  transform: scaleX(1);
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
    background-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.icon-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.icon-btn:active {
  transform: translateY(0) scale(0.96);
}

.menu-btn {
  display: none;
}

.search-box {
  display: none;
  padding: 0 0 14px;
  animation: slideDown 0.3s var(--ease-out);
}

.search-box.open {
  display: block;
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

.search-box input::placeholder {
  color: var(--muted-2);
}

.search-box input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(233, 79, 135, 0.14);
}

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

/* ===================== Breadcrumb ===================== */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

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

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--line-strong);
}

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

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

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

/* ===================== Hero ===================== */
.hero {
  padding: 26px 0 10px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 14px -20px auto -20px;
  height: 420px;
  border-radius: 32px;
  background: var(--grad-hero);
  background-size: 200% 200%;
  animation: heroShift 16s ease infinite;
  opacity: 0.9;
  z-index: -1;
  filter: blur(2px);
}

@keyframes heroShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  padding: 18px 0 8px;
}

.hero h1 {
  font-size: 34px;
  line-height: 1.35;
  margin: 0 0 14px;
  letter-spacing: -0.6px;
  color: var(--fg-strong);
  animation: fadeUp 0.7s var(--ease-out) both;
}

.hero h1 em {
  font-style: normal;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
}

.hero p {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 16px;
  max-width: 60ch;
  animation: fadeUp 0.7s 0.08s var(--ease-out) both;
}

.kw {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(233, 79, 135, 0.12);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 14px;
  border: 1px solid rgba(233, 79, 135, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeUp 0.7s var(--ease-out) both;
}

html[data-theme="dark"] .kw {
  background: rgba(233, 79, 135, 0.18);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeUp 0.7s 0.16s var(--ease-out) both;
}

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

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease),
    opacity 0.25s var(--ease), border-color 0.25s var(--ease),
    color 0.25s var(--ease), background-color 0.25s var(--ease);
}

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

.btn:hover::after {
  left: 120%;
}

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

.btn-primary:hover {
  text-decoration: none;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(233, 79, 135, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--fg);
}

.btn-ghost:hover {
  text-decoration: none;
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ===================== Slider ===================== */
.slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease);
}

.slider:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.slides {
  position: relative;
  height: 290px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  display: grid;
  place-items: center;
  padding: 26px;
  text-align: center;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.slide h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--fg-strong);
}

.slide p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 34ch;
}

.dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 0 0 16px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s var(--ease), width 0.3s var(--ease-out),
    transform 0.3s var(--ease);
}

.dot:hover {
  background: var(--brand-3);
  transform: scale(1.2);
}

.dot.active {
  background: var(--grad-brand);
  width: 22px;
  border-radius: 5px;
}

/* ===================== Stats ===================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 28px 0;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.3s var(--ease),
    box-shadow 0.35s var(--ease), background-color 0.3s var(--ease);
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.stat:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 79, 135, 0.35);
  box-shadow: var(--shadow-md);
  background: var(--card-hover);
}

.stat:hover::before {
  transform: scaleX(1);
}

.stat b {
  display: block;
  font-size: 28px;
  line-height: 1.2;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 13px;
  color: var(--muted);
}

/* ===================== Sections ===================== */
section {
  padding: 38px 0;
  border-top: 1px solid var(--line);
  position: relative;
}

section:first-of-type {
  border-top: 0;
}

h2 {
  font-size: 26px;
  line-height: 1.4;
  margin: 0 0 8px;
  letter-spacing: -0.4px;
  color: var(--fg-strong);
  position: relative;
  padding-left: 16px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 4px;
  border-radius: 4px;
  background: var(--grad-brand);
}

h3 {
  font-size: 19px;
  margin: 22px 0 8px;
  color: var(--fg-strong);
  letter-spacing: -0.2px;
}

h4 {
  font-size: 16px;
  margin: 16px 0 6px;
  color: var(--fg-strong);
}

.lead {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 15.5px;
  max-width: 75ch;
}

/* ===================== Grids ===================== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ===================== Cards ===================== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  transition: transform 0.35s var(--ease-out), border-color 0.3s var(--ease),
    box-shadow 0.35s var(--ease), background-color 0.3s var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(122, 92, 255, 0.32);
  box-shadow: var(--shadow-md);
  background: var(--card-hover);
}

.card:hover::after {
  opacity: 1;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card h3 {
  margin-top: 0;
}

.card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14.5px;
}

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

/* ===================== TOC ===================== */
.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.toc::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--grad-brand);
}

.toc ol {
  margin: 0;
  padding-left: 22px;
  columns: 2;
  column-gap: 28px;
}

.toc li {
  margin: 6px 0;
  font-size: 14.5px;
  break-inside: avoid;
}

.toc a {
  color: var(--muted);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}

.toc a:hover {
  color: var(--brand);
  text-decoration: none;
  padding-left: 4px;
}

/* ===================== Article list ===================== */
.article-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.article-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.3s var(--ease),
    box-shadow 0.35s var(--ease), background-color 0.3s var(--ease);
}

.article-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}

.article-item:hover {
  transform: translateY(-5px);
  border-color: rgba(233, 79, 135, 0.32);
  box-shadow: var(--shadow-md);
  background: var(--card-hover);
}

.article-item:hover::before {
  transform: scaleX(1);
}

.article-item .meta {
  font-size: 12.5px;
  color: var(--muted-2);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
  font-weight: 600;
}

.article-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.5;
  transition: color 0.25s var(--ease);
}

.article-item:hover h3 {
  color: var(--brand);
}

.article-item p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}

.article-item a.more {
  font-weight: 700;
  font-size: 14px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.25s var(--ease), color 0.25s var(--ease);
}

.article-item a.more:hover {
  text-decoration: none;
  gap: 8px;
  color: var(--brand-2);
}

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

.faq-item:hover {
  border-color: rgba(122, 92, 255, 0.32);
  box-shadow: var(--shadow-sm);
}

.faq-item.open {
  border-color: rgba(233, 79, 135, 0.4);
  background: var(--card-hover);
  box-shadow: var(--shadow-sm);
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 16px 18px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--fg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-family: inherit;
  line-height: 1.6;
  transition: color 0.25s var(--ease);
}

.faq-q:hover {
  color: var(--brand);
}

.faq-q span {
  color: var(--brand);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  flex: none;
  transition: transform 0.3s var(--ease-out);
}

.faq-item.open .faq-q span {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease), padding 0.35s var(--ease);
  padding: 0 18px;
  color: var(--muted);
  font-size: 14.5px;
}

.faq-a p:last-child {
  margin-bottom: 0;
}

.faq-item.open .faq-a {
  max-height: 420px;
  padding-bottom: 18px;
}

/* ===================== Steps ===================== */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 18px 48px;
  border-left: 2px solid var(--line);
  margin-left: 15px;
  transition: border-color 0.3s var(--ease);
}

.steps li:hover {
  border-left-color: var(--brand);
}

.steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: -16px;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(233, 79, 135, 0.28);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease);
}

.steps li:hover::before {
  transform: scale(1.1);
  box-shadow: 0 10px 24px rgba(233, 79, 135, 0.4);
}

.steps b {
  display: block;
  margin-bottom: 4px;
  font-size: 15.5px;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* ===================== Contact ===================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}

.contact-list li:hover {
  color: var(--fg);
  padding-left: 4px;
}

.contact-list li:last-child {
  border-bottom: 0;
}

.contact-list b {
  color: var(--fg);
}

.map-box {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease);
}

.map-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.map-box svg {
  width: 100%;
  height: auto;
}

/* ===================== Author box ===================== */
.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.author-box::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--grad-brand);
}

.author-box:hover {
  border-color: rgba(233, 79, 135, 0.32);
  box-shadow: var(--shadow-sm);
}

.author-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex: none;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(122, 92, 255, 0.28);
  transition: transform 0.35s var(--ease-out);
}

.author-box:hover .author-avatar {
  transform: scale(1.06) rotate(-3deg);
}

.author-box p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* ===================== Tags ===================== */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(233, 79, 135, 0.1);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  margin: 0 6px 6px 0;
  border: 1px solid rgba(233, 79, 135, 0.18);
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease),
    color 0.25s var(--ease);
}

.tag:hover {
  background: var(--grad-brand);
  color: #fff;
  transform: translateY(-1px);
}

html[data-theme="dark"] .tag {
  background: rgba(233, 79, 135, 0.16);
}

/* ===================== Footer ===================== */
.footer {
  border-top: 1px solid var(--line);
  padding: 38px 0 22px;
  margin-top: 24px;
  background: var(--card);
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad-brand);
  opacity: 0.6;
}

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

.footer h4 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--fg-strong);
}

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

.footer li {
  margin: 8px 0;
  font-size: 14px;
}

.footer a {
  color: var(--muted);
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}

.footer a:hover {
  color: var(--brand);
  text-decoration: none;
  padding-left: 3px;
}

.copyright {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 18px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===================== Back to top ===================== */
.back-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  color: var(--brand);
  font-size: 19px;
  cursor: pointer;
  display: none;
  place-items: center;
  z-index: 60;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease),
    border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.back-top.show {
  display: grid;
  animation: popIn 0.35s var(--ease-out);
}

.back-top:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  color: #fff;
  background: var(--grad-brand);
  box-shadow: var(--shadow-brand);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

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

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

/* ===================== Responsive ===================== */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 30px;
  }
  .nav a {
    padding: 7px 9px;
    font-size: 13.5px;
  }
  .slides {
    height: 270px;
  }
}

@media (max-width: 960px) {
  html {
    scroll-padding-top: 76px;
  }

  .hero-grid,
  .grid-2,
  .grid-3,
  .article-list,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero::before {
    inset: 10px -12px auto -12px;
    height: 460px;
    border-radius: 24px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 16px;
    flex-direction: column;
    gap: 2px;
    margin-left: 0;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s var(--ease-out);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 11px 14px;
    font-size: 15px;
    border-radius: 10px;
  }

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

  .nav a:hover {
    transform: none;
  }

  .menu-btn {
    display: grid;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 15px;
  }

  .slides {
    height: 250px;
  }

  .toc ol {
    columns: 1;
  }

  h2 {
    font-size: 23px;
  }

  h3 {
    font-size: 18px;
  }

  section {
    padding: 30px 0;
  }

  .back-top {
    right: 14px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

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

  .container {
    padding: 0 16px;
  }

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

  .brand {
    font-size: 16px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 14px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .hero h1 {
    font-size: 23px;
    letter-spacing: -0.3px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    padding: 11px 18px;
    font-size: 14.5px;
    flex: 1 1 auto;
  }

  .slides {
    height: 230px;
  }

  .slide h3 {
    font-size: 18px;
  }

  .stat b {
    font-size: 24px;
  }

  .stat {
    padding: 16px 12px;
  }

  .card {
    padding: 18px;
  }

  .article-item {
    padding: 18px;
  }

  .faq-q {
    padding: 14px 15px;
    font-size: 15px;
  }

  .faq-a {
    padding: 0 15px;
  }

  .faq-item.open .faq-a {
    padding-bottom: 16px;
  }

  .steps li {
    padding-left: 42px;
  }

  .copyright {
    flex-direction: column;
    gap: 6px;
  }

  .toc {
    padding: 16px 18px;
  }

  .author-box {
    padding: 16px;
  }

  .author-avatar {
    width: 50px;
    height: 50px;
  }
}

@media (hover: none) {
  .card:hover,
  .article-item:hover,
  .stat:hover,
  .slider:hover,
  .btn:hover,
  .icon-btn:hover {
    transform: none;
  }
  .btn::after {
    display: none;
  }
}

/* ===================== Print ===================== */
@media print {
  .site-header,
  .back-top,
  .slider,
  .dots,
  .hero-actions,
  .tools {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .card,
  .article-item,
  .faq-item,
  .toc {
    border-color: #ccc;
    box-shadow: none;
    break-inside: avoid;
  }
  .faq-a {
    max-height: none !important;
    padding-bottom: 12px;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}