:root {
  --seo-primary: #3b82f6;
  --seo-secondary: #22d3ee;
  --seo-accent: #2563eb;
  --seo-bg: #050b1a;
  --seo-bg-soft: #0a142c;
  --seo-surface: #0f1f3f;
  --seo-card: rgba(15, 31, 62, 0.82);
  --seo-card-strong: rgba(18, 40, 80, 0.94);
  --seo-line: rgba(112, 155, 244, 0.3);
  --seo-line-strong: rgba(126, 170, 255, 0.48);
  --seo-text: #f1f6ff;
  --seo-muted: #a8c0e2;
  --seo-muted-2: #8ea8cc;
  --seo-cta: linear-gradient(135deg, #1d4ed8 0%, #2563eb 58%, #0891b2 100%);
  --seo-cta-hover: linear-gradient(135deg, #2563eb 0%, #3b82f6 58%, #06b6d4 100%);
  --seo-shadow: 0 18px 40px rgba(3, 9, 24, 0.45);
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --fs-body: 16px;
  --fs-body-sm: 14px;
  --fs-btn: 15px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(980px 460px at -10% -10%, rgba(37, 99, 235, 0.22), transparent 70%),
    radial-gradient(920px 500px at 110% -16%, rgba(34, 211, 238, 0.16), transparent 74%),
    linear-gradient(180deg, #050b1a 0%, #07122a 44%, #050a18 100%);
  color: var(--seo-text);
  line-height: 1.68;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

section {
  padding: 88px 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 15, 35, 0.84);
  backdrop-filter: blur(12px) saturate(130%);
  border-bottom: 1px solid var(--seo-line);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.brand img {
  border-radius: 8px;
}

.brand-im {
  color: var(--seo-primary);
}

.nav {
  margin-left: auto;
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.nav a {
  color: #c8d9f7;
  text-decoration: none;
  font-size: var(--fs-body-sm);
  padding: var(--space-1) var(--space-2);
  border-radius: 9px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: #fff;
  background: rgba(37, 99, 235, 0.2);
}

.hero {
  padding-top: clamp(84px, 10vw, 118px);
  background:
    radial-gradient(760px 280px at 88% -4%, rgba(37, 99, 235, 0.28), transparent 70%),
    radial-gradient(620px 220px at 10% 8%, rgba(34, 211, 238, 0.12), transparent 74%);
}

.hero h1 {
  margin: 0 0 var(--space-2);
  max-width: 22ch;
  font-size: clamp(32px, 4.1vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero p {
  margin: 0;
  max-width: 760px;
  color: var(--seo-muted);
  font-size: clamp(16px, 1.4vw, 18px);
}

.section-head {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.section-head h2 {
  margin: 0 0 10px;
  max-width: 18ch;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-head p {
  margin: 0;
  max-width: 640px;
  color: var(--seo-muted);
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.card {
  border: 1px solid var(--seo-line);
  border-radius: 14px;
  padding: clamp(16px, 2.2vw, 24px);
  background:
    linear-gradient(180deg, rgba(16, 33, 66, 0.96), rgba(12, 24, 50, 0.92));
  box-shadow: var(--seo-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--seo-line-strong);
}

.card h3 {
  margin: 0 0 8px;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.3;
  color: #fff;
}

.card p {
  margin: 0;
  color: var(--seo-muted);
  font-size: 15px;
  line-height: 1.65;
}

.pager {
  margin-top: clamp(20px, 3.2vw, 34px);
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 152px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 0 var(--space-3);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-btn);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pager .btn {
  min-width: 248px;
}

.btn-primary {
  color: #fff;
  border-color: rgba(102, 157, 248, 0.22);
  background: var(--seo-cta);
}

.btn-primary:hover {
  background: var(--seo-cta-hover);
}

.btn-ghost {
  color: #d5e3ff;
  border-color: var(--seo-line);
  background: rgba(11, 22, 46, 0.72);
}

.btn-ghost:hover {
  color: #fff;
  border-color: var(--seo-line-strong);
  background: rgba(37, 99, 235, 0.16);
}

.related {
  position: relative;
}

.related::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 220px at 12% 0%, rgba(34, 211, 238, 0.09), transparent 70%),
    radial-gradient(860px 260px at 90% 100%, rgba(37, 99, 235, 0.16), transparent 70%);
  pointer-events: none;
}

.related .container {
  position: relative;
  z-index: 1;
}

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

.related .card {
  background: linear-gradient(180deg, rgba(14, 29, 58, 0.9), rgba(10, 20, 43, 0.9));
}

.related .card h3 {
  margin-bottom: 6px;
  font-size: 15px;
}

.related .card p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--seo-muted-2);
}

.related .card a {
  color: #e2ecff;
  text-decoration: none;
}

.related .card a:hover {
  color: #67e8f9;
}

.cta {
  background:
    radial-gradient(780px 300px at 12% 120%, rgba(34, 211, 238, 0.24), transparent 68%),
    linear-gradient(128deg, #08142f 0%, #10264f 52%, #0d2144 100%);
  border-top: 1px solid var(--seo-line);
  border-bottom: 1px solid var(--seo-line);
}

.cta-inner {
  text-align: center;
}

.cta h2 {
  margin: 0 0 var(--space-2);
  max-width: 18ch;
  font-size: clamp(24px, 3.1vw, 34px);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.cta p {
  margin: 0 auto var(--space-3);
  max-width: 680px;
  color: #c7d9f7;
  font-size: 15px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.cta-actions .btn {
  min-width: 208px;
}

.footer {
  padding: 24px 0 28px;
  text-align: center;
  color: #8ea7cc;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .related .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  section {
    padding: 56px 0;
  }

  .hero {
    padding-top: 82px;
  }

  .grid,
  .related .grid {
    grid-template-columns: 1fr;
  }

  .section-head p,
  .card p,
  .cta p {
    font-size: 14px;
  }

  .nav {
    display: none;
  }

  .pager .btn,
  .cta-actions .btn {
    min-width: 0;
    width: 100%;
  }
}

/* =========================================================
   Topics Page Parity Layer (align with homepage components)
========================================================= */
body.topics-page.nav-open {
  overflow: hidden;
}

body.topics-page .header {
  background: rgba(7, 16, 36, 0.8);
  border-bottom: 1px solid rgba(101, 146, 255, 0.28);
  backdrop-filter: blur(14px) saturate(130%);
}

body.topics-page .header-inner {
  min-height: 64px;
}

body.topics-page .brand,
body.topics-page .nav a {
  color: #f3f7ff;
}

body.topics-page .nav {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body.topics-page .nav a {
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
}

body.topics-page .nav a:hover,
body.topics-page .nav a[aria-current="page"] {
  color: #fff;
  background: rgba(59, 130, 246, 0.16);
}

body.topics-page .nav-close {
  display: none;
}

body.topics-page .nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.topics-page .nav-actions .btn {
  min-height: 40px;
  min-width: 122px;
  font-size: 14px;
  padding: 0 18px;
}

body.topics-page .nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(101, 146, 255, 0.28);
  background: rgba(10, 22, 47, 0.72);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

body.topics-page .nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: #dce8ff;
}

body.topics-page .section-head {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 40px;
}

body.topics-page .section-head h2 {
  margin-inline: auto;
}

body.topics-page .section-head p {
  margin-inline: auto;
}

body.topics-page .head-line {
  width: 64px;
  height: 4px;
  margin: 12px auto 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6, #2563eb);
}

body.topics-page .btn:focus-visible,
body.topics-page .nav a:focus-visible,
body.topics-page .nav-toggle:focus-visible,
body.topics-page .nav-close:focus-visible {
  outline: 2px solid #7db8ff;
  outline-offset: 2px;
}

body.topics-page .btn-primary {
  color: #fff;
  border-color: rgba(102, 157, 248, 0.22);
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 58%, #0891b2 100%);
}

body.topics-page .btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 58%, #06b6d4 100%);
}

body.topics-page .btn-outline {
  color: #d5e3ff;
  border-color: rgba(101, 146, 255, 0.28);
  background: rgba(11, 22, 46, 0.72);
}

body.topics-page .btn-outline:hover {
  color: #fff;
  border-color: rgba(122, 167, 255, 0.48);
  background: rgba(37, 99, 235, 0.16);
}

body.topics-page .btn-outline-light {
  color: #d5e3ff;
  border-color: rgba(101, 146, 255, 0.28);
  background: rgba(11, 22, 46, 0.72);
}

body.topics-page .btn-outline-light:hover {
  color: #fff;
  border-color: rgba(122, 167, 255, 0.48);
  background: rgba(37, 99, 235, 0.16);
}

body.topics-page .btn-ghost {
  color: #d5e3ff;
  border-color: rgba(101, 146, 255, 0.28);
  background: rgba(11, 22, 46, 0.72);
}

body.topics-page .btn-ghost:hover {
  color: #fff;
  border-color: rgba(122, 167, 255, 0.48);
  background: rgba(37, 99, 235, 0.16);
}

body.topics-page .footer {
  padding: 26px 0;
  background: linear-gradient(180deg, #060c1f, #050916);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

body.topics-page .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

body.topics-page .footer-info {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #cbd5e1;
  font-size: 13px;
}

body.topics-page .footer-info [data-footer-contact],
body.topics-page .footer-info [data-copy-domain] {
  color: #dbeafe;
  cursor: pointer;
}

body.topics-page .footer-copy {
  color: #94a3b8;
  font-size: 13px;
}

body.topics-page .floating-btns {
  position: fixed;
  right: 20px;
  bottom: 28px;
  z-index: 26;
  display: grid;
  gap: 10px;
}

body.topics-page .float-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform .2s ease, box-shadow .2s ease;
}

body.topics-page .float-btn:hover {
  transform: translateY(-2px);
}

body.topics-page .float-btn--green { background: linear-gradient(135deg, #34d399, #10b981); }
body.topics-page .float-btn--yellow { background: linear-gradient(135deg, #f59e0b, #f97316); }
body.topics-page .float-btn--blue { background: linear-gradient(135deg, #38bdf8, #3b82f6); }

@media (max-width: 959px) {
  body.topics-page .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(88vw, 360px);
    height: 100vh;
    padding: 80px 16px 16px;
    background: rgba(8, 15, 36, 0.97);
    border-left: 1px solid rgba(118, 143, 223, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateX(102%);
    transition: transform .28s ease;
    z-index: 40;
    overflow-y: auto;
    flex-wrap: nowrap;
  }

  body.topics-page.nav-open .nav {
    transform: translateX(0);
  }

  body.topics-page .nav a {
    font-size: 15px;
    color: #dce8ff;
    padding: 12px 14px;
    border-radius: 12px;
  }

  body.topics-page .nav-close {
    position: absolute;
    right: 14px;
    top: 18px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(118, 143, 223, 0.25);
    background: rgba(10, 19, 48, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  body.topics-page .nav-close span {
    position: absolute;
    width: 16px;
    height: 2px;
    background: #dce8ff;
    border-radius: 1px;
  }

  body.topics-page .nav-close span:first-child { transform: rotate(45deg); }
  body.topics-page .nav-close span:last-child { transform: rotate(-45deg); }

  body.topics-page .nav-actions {
    display: none;
  }

  body.topics-page .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  body.topics-page .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  body.topics-page .floating-btns {
    right: 16px;
    bottom: 20px;
  }
}
