:root {
  --primary: #6C3FC5;
  --primary-light: #8B6FD9;
  --primary-dark: #4E2A99;
  --accent: #E85D9E;
  --accent-light: #F08BB8;
  --mint: #3FC5A0;
  --bg: #F7F5FC;
  --bg-alt: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --text: #1F1A2E;
  --text-secondary: #5A5470;
  --text-muted: #8A84A0;
  --border: rgba(108, 63, 197, 0.12);
  --border-strong: rgba(108, 63, 197, 0.22);
  --shadow-sm: 0 2px 8px rgba(108, 63, 197, 0.06);
  --shadow: 0 8px 28px rgba(108, 63, 197, 0.10);
  --shadow-lg: 0 16px 48px rgba(108, 63, 197, 0.16);
  --shadow-glow: 0 0 0 1px rgba(108, 63, 197, 0.08), 0 12px 40px rgba(108, 63, 197, 0.14);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 68px;
}

[data-theme="dark"] {
  --primary: #9B7FE8;
  --primary-light: #B49EF0;
  --primary-dark: #7B5FD0;
  --accent: #F08BB8;
  --accent-light: #F5AACC;
  --mint: #5DD9B8;
  --bg: #12101A;
  --bg-alt: #1A1726;
  --bg-card: rgba(30, 26, 46, 0.78);
  --bg-glass: rgba(30, 26, 46, 0.6);
  --text: #EDEAF5;
  --text-secondary: #B0A8C8;
  --text-muted: #7A7290;
  --border: rgba(155, 127, 232, 0.15);
  --border-strong: rgba(155, 127, 232, 0.28);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(155, 127, 232, 0.1), 0 12px 40px rgba(0, 0, 0, 0.4);
}

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(108, 63, 197, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(232, 93, 158, 0.07), transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(63, 197, 160, 0.05), transparent 60%);
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(155, 127, 232, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(240, 139, 184, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(93, 217, 184, 0.06), transparent 60%);
}

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

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

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.visually-hidden {
  position: absolute;
  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: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}

#site-header.scrolled {
  box-shadow: var(--shadow);
  background: var(--bg-card);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  transition: transform var(--transition);
}

.brand-logo:hover {
  transform: scale(1.03);
  color: var(--text);
}

.brand-logo svg {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.brand-logo:hover svg {
  box-shadow: var(--shadow-glow);
  transform: rotate(-4deg);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

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

#main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

#main-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  white-space: nowrap;
  position: relative;
  transition: color var(--transition), background var(--transition);
}

#main-nav a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

#main-nav a:hover {
  color: var(--primary);
  background: rgba(108, 63, 197, 0.06);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

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

#site-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 63, 197, 0.12);
}

#search-input {
  width: 160px;
  padding: 8px 4px 8px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: width var(--transition);
}

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

#search-input:focus {
  width: 220px;
}

#site-search button[type="submit"] {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  transition: opacity var(--transition), transform var(--transition);
}

#site-search button[type="submit"]:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

#theme-toggle,
#menu-toggle {
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all var(--transition);
}

#theme-toggle:hover,
#menu-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(108, 63, 197, 0.06);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

#menu-toggle {
  display: none;
}

/* ===== BREADCRUMB ===== */
#breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px 0;
}

#breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

#breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

#breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--text-muted);
  opacity: 0.5;
}

#breadcrumb a {
  color: var(--text-secondary);
  font-weight: 500;
}

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

#breadcrumb [aria-current="page"] {
  color: var(--text-muted);
}

/* ===== MAIN ===== */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

main section {
  margin-bottom: 56px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

main section > h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  padding-bottom: 12px;
  position: relative;
  color: var(--text);
  letter-spacing: -0.01em;
}

main section > h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--mint));
  background-size: 200% 100%;
  animation: gradientShift 4s ease infinite;
}

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

main section > h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
  padding-left: 14px;
  position: relative;
}

main section > h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

main section > h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0 8px;
}

main p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.85;
}

main p:last-child {
  margin-bottom: 0;
}

main ul:not([class]),
main ol:not([class]) {
  margin: 12px 0 18px;
  padding-left: 0;
}

main ul:not([class]) li,
main ol:not([class]) li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

main ul:not([class]) li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.7em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transition: transform var(--transition);
}

main ul:not([class]) li:hover::before {
  transform: scale(1.4);
}

main ol:not([class]) {
  counter-reset: ol-counter;
}

main ol:not([class]) li {
  counter-increment: ol-counter;
  padding-left: 34px;
}

main ol:not([class]) li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  line-height: 1;
}

/* ===== HERO ===== */
#hero {
  position: relative;
  padding: 48px 0 0;
  margin-bottom: 64px;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -24px -24px 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(108, 63, 197, 0.06), rgba(232, 93, 158, 0.05) 50%, rgba(63, 197, 160, 0.04));
  z-index: -1;
  pointer-events: none;
}

#hero-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 40%, var(--accent) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] #hero-title {
  background: linear-gradient(135deg, var(--primary-light), var(--primary) 40%, var(--accent) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.02rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin-bottom: 32px;
  line-height: 1.9;
}

/* ===== CAROUSEL ===== */
.hero-carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 32px;
}

.carousel-slide {
  display: none;
  position: relative;
  animation: fadeSlide 0.6s ease;
}

.carousel-slide.active {
  display: block;
}

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

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

.carousel-slide p {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 24px 20px;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(to top, var(--bg-card) 20%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

[data-theme="dark"] .carousel-slide p {
  color: var(--text);
}

.carousel-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.carousel-controls button {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.carousel-controls button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ===== STATS ===== */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.hero-stats li {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.hero-stats li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--mint));
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity var(--transition);
  animation: gradientShift 3s ease infinite;
}

.hero-stats li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.hero-stats li:hover::before {
  opacity: 1;
}

.hero-stats strong {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

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

/* ===== AUTHOR BOX ===== */
.author-box {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.author-box:hover {
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.author-box h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.author-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ===== NEWS & ARTICLES ===== */
#news article,
#articles article {
  padding: 24px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

#news article:hover::before,
#articles article:hover::before {
  opacity: 1;
}

#news article h3,
#articles article h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  padding-left: 0;
  line-height: 1.5;
  transition: color var(--transition);
}

#news article h3::before,
#articles article h3::before {
  display: none;
}

#news article:hover h3,
#articles article:hover h3 {
  color: var(--primary);
}

#news article > p:first-of-type,
#articles article > p:first-of-type {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#news article > p:first-of-type::before,
#articles article > p:first-of-type::before {
  content: "🕐";
  font-size: 0.75rem;
}

#news article > p:nth-of-type(2),
#articles article > p:nth-of-type(2) {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.8;
}

#news article > p:last-child a,
#articles article > p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(108, 63, 197, 0.08), rgba(232, 93, 158, 0.08));
  border: 1px solid var(--border);
  transition: all var(--transition);
}

#news article > p:last-child a::after,
#articles article > p:last-child a::after {
  content: "→";
  transition: transform var(--transition);
}

#news article > p:last-child a:hover,
#articles article > p:last-child a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}

#news article > p:last-child a:hover::after,
#articles article > p:last-child a:hover::after {
  transform: translateX(3px);
}

/* ===== CASES BLOCKQUOTE ===== */
#cases blockquote {
  position: relative;
  margin: 16px 0;
  padding: 20px 24px 20px 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

#cases blockquote::before {
  content: """;
  position: absolute;
  left: 18px;
  top: 8px;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.5;
}

#cases blockquote:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

#cases blockquote p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
}

/* ===== FAQ ===== */
#faq details {
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}

#faq details:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

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

#faq summary {
  padding: 18px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color var(--transition), background var(--transition);
  position: relative;
}

#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: 400;
  color: var(--primary);
  background: rgba(108, 63, 197, 0.08);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}

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

#faq summary:hover {
  color: var(--primary);
  background: rgba(108, 63, 197, 0.03);
}

#faq details > p {
  padding: 0 24px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.85;
  animation: fadeIn 0.35s ease;
}

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

/* ===== HOWTO ===== */
#howto {
  position: relative;
}

#howto h3 {
  margin-top: 28px;
}

#howto ol:not([class]) {
  counter-reset: howto-counter;
  position: relative;
  padding-left: 8px;
}

#howto ol:not([class])::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent), var(--mint));
  border-radius: 2px;
  opacity: 0.25;
}

#howto ol:not([class]) li {
  counter-increment: howto-counter;
  padding-left: 44px;
  margin-bottom: 14px;
  position: relative;
}

#howto ol:not([class]) li::before {
  content: counter(howto-counter);
  position: absolute;
  left: 8px;
  top: 0.1em;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px rgba(108, 63, 197, 0.15);
  transition: transform var(--transition), box-shadow var(--transition);
  z-index: 1;
}

#howto ol:not([class]) li:hover::before {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 8px rgba(108, 63, 197, 0.2);
}

/* ===== CONTACT ===== */
#contact {
  position: relative;
}

#contact > p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
}

#contact > p:last-of-type {
  border-bottom: none;
}

#contact > p::first-letter {
  color: var(--primary);
  font-weight: 700;
}

/* ===== SITEMAP & LINKS ===== */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
}

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

/* ===== FOOTER ===== */
#site-footer {
  position: relative;
  padding: 56px 24px 32px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

#site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--mint), var(--primary));
  background-size: 300% 100%;
  animation: gradientShift 6s linear infinite;
}

#site-footer > section {
  max-width: 1280px;
  margin: 0 auto 24px;
}

#site-footer h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#site-footer h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#site-footer h3::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

#site-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
}

#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: all var(--transition);
  line-height: 1.2;
  text-align: center;
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 56px rgba(108, 63, 197, 0.35);
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1080px) {
  #main-nav a {
    padding: 8px 8px;
    font-size: 0.8rem;
  }

  #search-input {
    width: 120px;
  }

  #search-input:focus {
    width: 160px;
  }
}

@media (max-width: 920px) {
  #main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 16px 24px 24px;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    justify-content: flex-start;
  }

  #main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }

  #main-nav a {
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }

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

  #menu-toggle {
    display: block;
  }

  #site-search {
    display: none;
  }

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

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

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

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

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

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

  main {
    padding: 0 16px 60px;
  }

  #breadcrumb {
    padding: 12px 16px 0;
  }

  #hero {
    padding-top: 32px;
  }

  #hero::before {
    inset: -16px -16px 0;
  }

  .hero-lead {
    font-size: 0.92rem;
  }

  .carousel-slide p {
    padding: 32px 16px 14px;
    font-size: 0.85rem;
  }

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

  .carousel-controls button {
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  .hero-stats {
    gap: 10px;
  }

  .hero-stats li {
    padding: 18px 10px;
  }

  .hero-stats strong {
    font-size: 1.3rem;
  }

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

  main section {
    margin-bottom: 44px;
  }

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

  #faq summary {
    padding: 14px 18px;
    font-size: 0.88rem;
  }

  #faq details > p {
    padding: 0 18px 16px;
    font-size: 0.85rem;
  }

  #contact > p {
    flex-direction: column;
    gap: 2px;
  }

  #sitemap a,
  #links a {
    padding: 7px 14px;
    font-size: 0.8rem;
  }

  #site-footer {
    padding: 40px 16px 24px;
  }

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

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

  .hero-stats strong {
    font-size: 1.15rem;
  }
}

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

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

/* ===== PRINT ===== */
@media print {
  #site-header,
  #back-to-top,
  .hero-carousel,
  .carousel-controls {
    display: none;
  }

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

  main section {
    break-inside: avoid;
  }
}