:root {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --fg: #14141f;
  --muted: #5a5a72;
  --brand: #e63946;
  --brand-hover: #c92f3c;
  --brand2: #457b9d;
  --brand3: #8e44ad;
  --card: #f7f8fa;
  --card-hover: #ffffff;
  --border: #e6e8ec;
  --border-strong: #d4d8e0;
  --shadow-sm: 0 1px 3px rgba(20, 20, 31, 0.05);
  --shadow: 0 2px 12px rgba(20, 20, 31, 0.07);
  --shadow-lg: 0 12px 32px rgba(20, 20, 31, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: 16px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
  --gradient-brand: linear-gradient(135deg, #e63946 0%, #8e44ad 100%);
  --gradient-accent: linear-gradient(135deg, #457b9d 0%, #e63946 100%);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

body.dark {
  --bg: #0e0e15;
  --bg-elevated: #16161f;
  --fg: #e8e8f0;
  --muted: #9a9ab0;
  --brand: #ff4d5e;
  --brand-hover: #ff6b7a;
  --brand2: #6fa8cc;
  --brand3: #b07fd4;
  --card: #1a1a26;
  --card-hover: #20202e;
  --border: #2a2a3a;
  --border-strong: #3a3a4e;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --glass-bg: rgba(22, 22, 31, 0.72);
  --glass-border: rgba(255, 255, 255, 0.08);
  --gradient-hero: linear-gradient(135deg, #0a0a12 0%, #12121f 45%, #1a1030 100%);
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  overflow-x: hidden;
}

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

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

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

button {
  font-family: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--fg);
  letter-spacing: -0.01em;
  flex-shrink: 0;
  transition: opacity 0.25s var(--ease);
}

.logo:hover {
  color: var(--fg);
  opacity: 0.85;
}

.logo svg {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  transition: transform 0.4s var(--ease);
}

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

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  font-size: 15px;
}

.nav-links a {
  color: var(--fg);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

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

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

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

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 6px 4px 14px;
  background: var(--card);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.35s var(--ease);
}

.search-box:focus-within {
  border-color: var(--brand2);
  box-shadow: 0 0 0 3px rgba(69, 123, 157, 0.15);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--fg);
  width: 130px;
  font-size: 14px;
  font-family: inherit;
}

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

.search-box button {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--brand2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.search-box button:hover {
  color: var(--brand);
  transform: scale(1.1);
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), color 0.25s var(--ease);
}

.icon-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  font-size: 13.5px;
  color: var(--muted);
  padding: 14px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

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

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

.breadcrumb span {
  margin: 0 6px;
}

/* ============ Hero / Banner ============ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  color: #fff;
  padding: 70px 0 60px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(230, 57, 70, 0.28), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(69, 123, 157, 0.32), transparent 50%),
    radial-gradient(circle at 60% 10%, rgba(142, 68, 173, 0.22), transparent 45%);
  z-index: -1;
  animation: heroGlow 14s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  z-index: -1;
  pointer-events: none;
}

@keyframes heroGlow {
  0% {
    opacity: 0.85;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-slide {
  display: none;
}

.hero-slide.active {
  display: block;
  animation: fadein 0.6s var(--ease);
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero h1 {
  font-size: 38px;
  line-height: 1.3;
  margin-bottom: 18px;
  max-width: 820px;
  letter-spacing: -0.02em;
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 0%, #cfd6e6 60%, #a8b6d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff;
}

.hero p {
  font-size: 17px;
  color: #cfd6e6;
  max-width: 760px;
  margin-bottom: 22px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: #e8ecf5;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.hero-tags span:hover {
  background: rgba(230, 57, 70, 0.35);
  border-color: rgba(230, 57, 70, 0.6);
  transform: translateY(-2px);
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============ Buttons ============ */
.btn {
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s var(--ease), transform 0.25s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: var(--gradient-brand);
  background-size: 150% 150%;
  color: #fff;
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.32);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.44);
  background-position: 100% 100%;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  transform: translateY(-2px);
}

/* ============ Slider Dots ============ */
.slider-dots {
  display: flex;
  gap: 8px;
  margin-top: 26px;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: width 0.35s var(--ease), background-color 0.35s var(--ease);
}

.slider-dots button:hover {
  background: rgba(255, 255, 255, 0.6);
}

.slider-dots button.active {
  background: var(--brand);
  width: 26px;
}

/* ============ Stats ============ */
.stats {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 36px 0;
  transition: background-color 0.35s var(--ease);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stats-grid > div {
  padding: 8px 4px;
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease);
}

.stats-grid > div:hover {
  transform: translateY(-3px);
}

.stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

/* ============ Sections ============ */
section {
  padding: 60px 0;
  scroll-margin-top: 80px;
}

section.alt {
  background: var(--card);
  transition: background-color 0.35s var(--ease);
}

.sec-head {
  max-width: 760px;
  margin-bottom: 36px;
}

.sec-head h2 {
  font-size: 28px;
  margin-bottom: 12px;
  position: relative;
  padding-left: 16px;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.sec-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.sec-head p {
  color: var(--muted);
  font-size: 15px;
}

/* ============ Grids ============ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

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

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

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

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

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.card h4 {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.4;
}

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

.card .icon {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  transition: transform 0.4s var(--ease);
}

.card:hover .icon {
  transform: scale(1.08) rotate(-4deg);
}

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

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

/* ============ Article Cards ============ */
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.35s var(--ease);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.article-card .thumb {
  height: 150px;
  background: var(--gradient-accent);
  position: relative;
  overflow: hidden;
}

.article-card .thumb svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}

.article-card:hover .thumb svg {
  transform: scale(1.06);
  opacity: 1;
}

.article-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.25) 100%);
  pointer-events: none;
}

.article-card .body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card .meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.article-card h3 {
  font-size: 16.5px;
  margin-bottom: 8px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.article-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.article-card .read-more {
  font-size: 14px;
  font-weight: 600;
  margin-top: auto;
  align-self: flex-start;
  position: relative;
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}

.article-card .read-more:hover {
  color: var(--brand);
}

/* ============ TOC ============ */
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 30px;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.toc h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.toc ol {
  padding-left: 20px;
  columns: 2;
  column-gap: 30px;
  font-size: 14px;
}

.toc li {
  margin-bottom: 6px;
  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);
  padding-left: 3px;
}

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

.faq-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.faq-item.open {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.12);
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: color 0.25s var(--ease);
}

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

.faq-q span.plus {
  color: var(--brand);
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

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

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), padding 0.4s var(--ease);
  padding: 0 18px;
}

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

.faq-a p {
  font-size: 14.5px;
  color: var(--muted);
}

/* ============ Steps ============ */
.steps {
  display: grid;
  gap: 18px;
}

.step {
  display: flex;
  gap: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.35s var(--ease);
}

.step:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.step-num {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.28);
  transition: transform 0.3s var(--ease);
}

.step:hover .step-num {
  transform: scale(1.08) rotate(-6deg);
}

.step h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.step p {
  font-size: 14px;
  color: var(--muted);
}

/* ============ Table ============ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  background: var(--bg-elevated);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--card);
  font-weight: 600;
  color: var(--fg);
}

tbody tr {
  transition: background-color 0.25s var(--ease);
}

tbody tr:hover {
  background: var(--card);
}

tbody tr:last-child td {
  border-bottom: none;
}

td {
  color: var(--muted);
}

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

.contact-info {
  list-style: none;
}

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

.contact-info li:hover {
  color: var(--fg);
}

.contact-info li strong {
  display: inline-block;
  width: 90px;
  color: var(--fg);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--fg);
  font-size: 14.5px;
  margin-bottom: 12px;
  font-family: inherit;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.35s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand2);
  box-shadow: 0 0 0 3px rgba(69, 123, 157, 0.16);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
}

.contact-form textarea {
  min-height: 110px;
  resize: vertical;
}

.contact-form label {
  display: block;
  margin-bottom: 4px;
}

/* ============ Author Box ============ */
.author-box {
  display: flex;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.author-box .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex: 0 0 56px;
  box-shadow: 0 4px 12px rgba(69, 123, 157, 0.3);
}

.author-box h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.author-box p {
  font-size: 13.5px;
  color: var(--muted);
}

/* ============ Prose ============ */
.prose p {
  margin-bottom: 16px;
  font-size: 15.5px;
  color: var(--fg);
}

.prose h3 {
  margin: 26px 0 12px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.prose h4 {
  margin: 20px 0 10px;
  font-size: 17px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px 22px;
  font-size: 15.5px;
}

.prose li {
  margin-bottom: 8px;
}

/* ============ Badge ============ */
.badge {
  display: inline-block;
  background: rgba(230, 57, 70, 0.1);
  color: var(--brand);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: background-color 0.25s var(--ease);
}

.card:hover .badge {
  background: rgba(230, 57, 70, 0.18);
}

/* ============ Blockquote ============ */
blockquote.card {
  border-left: 3px solid var(--brand);
}

blockquote.card p {
  font-size: 15px;
  color: var(--fg);
  font-style: italic;
}

/* ============ Footer ============ */
footer {
  background: #0f1020;
  color: #b8bcd0;
  padding: 50px 0 20px;
  font-size: 14px;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
}

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

footer a:hover {
  color: #fff;
  padding-left: 2px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 34px;
}

.footer-grid h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 8px;
}

.footer-grid h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.footer-grid ul {
  list-style: none;
}

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

.footer-bottom {
  border-top: 1px solid #24243a;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #8888a0;
}

/* ============ Back Top ============ */
.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.45);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.back-top.show {
  display: flex;
  animation: fadein 0.3s var(--ease);
}

.back-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.6);
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

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

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
    backdrop-filter: saturate(180%) blur(var(--glass-blur));
    flex-direction: column;
    padding: 16px 20px;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
    animation: fadein 0.3s var(--ease);
  }

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

  .menu-toggle {
    display: flex;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 48px 0 40px;
  }

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

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

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .stats {
    padding: 28px 0;
  }

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

  .stat-num {
    font-size: 26px;
  }

  section {
    padding: 44px 0;
  }

  .sec-head h2 {
    font-size: 23px;
  }

  .toc ol {
    columns: 1;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .step {
    flex-direction: column;
    gap: 12px;
  }

  .contact-info li strong {
    width: 80px;
  }

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

  .card {
    padding: 20px;
  }

  .article-card .thumb {
    height: 130px;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 0 16px;
  }

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

  .btn {
    padding: 10px 18px;
    font-size: 14px;
  }
}

/* ============ Reduced Motion ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

/* ============ Print ============ */
@media print {
  header,
  footer,
  .back-top,
  .hero-cta,
  .slider-dots,
  .search-box,
  .nav-actions,
  .contact-form {
    display: none !important;
  }

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

  .card,
  .article-card,
  .faq-item {
    box-shadow: none;
    border: 1px solid #ccc;
  }

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