:root {
  --bg: #07111f;
  --bg-soft: #0d1a2b;
  --panel: rgba(10, 20, 34, 0.86);
  --panel-strong: #0f2036;
  --border: rgba(151, 192, 255, 0.16);
  --text: #e8eefb;
  --muted: #94a7c6;
  --accent: #7dd3fc;
  --accent-strong: #22d3ee;
  --accent-alt: #c084fc;
  --success: #6ee7b7;
  --shadow: 0 18px 48px rgba(1, 7, 18, 0.35);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 25%),
    radial-gradient(circle at 85% 10%, rgba(192, 132, 252, 0.12), transparent 22%),
    linear-gradient(180deg, #06101d 0%, #081423 100%);
  min-height: 100vh;
}

body::selection {
  background: rgba(34, 211, 238, 0.28);
}

a,
button {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img {
  max-width: 100%;
}

section[id],
article[id] {
  scroll-margin-top: 96px;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 80%);
}

.skip-link {
  position: absolute;
  left: 18px;
  top: -40px;
  z-index: 30;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  color: #0b1220;
}

.skip-link:focus {
  top: 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 18px auto 0;
  padding: 14px 18px;
  border: 1px solid rgba(151, 192, 255, 0.12);
  border-radius: 999px;
  background: rgba(6, 16, 29, 0.68);
  backdrop-filter: blur(16px);
}

.topbar.is-scrolled {
  box-shadow: var(--shadow);
  border-color: rgba(125, 211, 252, 0.28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-alt));
  color: #02131d;
  font-weight: 800;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-copy span,
.muted-list,
.note,
.panel-label,
.eyebrow,
.entry-link,
.tool-badge,
.sidebar-title,
.site-footer,
.hero-text,
.section-heading p,
.article-header p,
.article-section p,
.bullet-list,
.number-list,
.faq-list p,
.info-card span,
.stat-card span {
  color: var(--muted);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.topnav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: rgba(125, 211, 252, 0.12);
  color: var(--text);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
}

.nav-cta,
.button.primary {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.92), rgba(168, 85, 247, 0.88));
  color: #03131f;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.22);
}

.button.secondary {
  border-color: rgba(125, 211, 252, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.nav-cta:hover,
.button:hover,
.tool-card:hover,
.entry-card:hover,
.sidebar-link:hover,
.section-pills a:hover {
  transform: translateY(-1px);
}

.section {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.panel,
.doc-article,
.sidebar-card,
.entry-card,
.tool-card,
.step-card,
.faq-hub-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 38px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -5% -25% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 70%);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4.35rem);
  line-height: 1.08;
  max-width: 12ch;
}

.hero-text {
  max-width: 58ch;
  font-size: 1.06rem;
  line-height: 1.75;
  margin: 20px 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.stat-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(151, 192, 255, 0.1);
}

.stat-card strong {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.hero-stack {
  display: grid;
  gap: 18px;
}

.hero-panel {
  padding: 24px;
}

.hero-panel h2,
.panel h3,
.faq-hub-card h3,
.step-card h3,
.entry-card h3,
.tool-card h3,
.article-header h2,
.article-section h3,
.sidebar-title {
  margin: 0 0 10px;
}

.hero-panel h2 {
  font-size: 1.5rem;
}

.accent-a {
  background: linear-gradient(180deg, rgba(18, 33, 52, 0.92), rgba(12, 22, 37, 0.88));
}

.accent-b {
  background: linear-gradient(180deg, rgba(28, 18, 52, 0.92), rgba(14, 18, 39, 0.88));
}

.accent-c {
  background: linear-gradient(180deg, rgba(12, 32, 37, 0.92), rgba(9, 18, 31, 0.88));
}

.compact-list,
.bullet-list,
.number-list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.8;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.section-heading p {
  margin: 0;
  max-width: 60ch;
  line-height: 1.75;
}

.entry-grid,
.tool-grid,
.guide-grid,
.faq-hub-grid {
  display: grid;
  gap: 18px;
}

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

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
}

.entry-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(125, 211, 252, 0.12);
  color: var(--accent);
  font-weight: 700;
}

.entry-link {
  margin-top: auto;
  font-weight: 600;
}

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

.tool-card {
  text-align: left;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(125, 211, 252, 0), rgba(125, 211, 252, 0.88), rgba(192, 132, 252, 0));
  opacity: 0;
}

.tool-card.is-active {
  border-color: rgba(125, 211, 252, 0.36);
  background: linear-gradient(180deg, rgba(13, 26, 43, 0.96), rgba(9, 18, 31, 0.92));
}

.tool-card.is-active::before {
  opacity: 1;
}

.tool-badge {
  display: inline-flex;
  padding: 6px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip,
.article-tags span,
.section-pills a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(151, 192, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
}

.guide-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.step-card {
  padding: 24px;
}

.step-index {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(192, 132, 252, 0.2));
  font-weight: 700;
}

.panel {
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-label {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
}

.panel-head h3,
.panel-head h4 {
  margin: 0;
}

.copy-button {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(151, 192, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: rgba(125, 211, 252, 0.34);
  background: rgba(125, 211, 252, 0.08);
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 18px;
  border-radius: 18px;
  background: #07101d;
  border: 1px solid rgba(151, 192, 255, 0.1);
}

code,
pre {
  font-family: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  font-size: 0.94rem;
  line-height: 1.75;
}

.docs-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 0 10px;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.sidebar-card {
  padding: 22px;
}

.sidebar-link {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--muted);
}

.sidebar-link.is-active {
  background: rgba(125, 211, 252, 0.12);
  color: var(--text);
}

.docs-content {
  display: grid;
  gap: 20px;
}

.doc-article {
  padding: 32px;
}

.article-header {
  margin-bottom: 20px;
}

.article-header h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.7rem);
}

.article-header p {
  max-width: 64ch;
  line-height: 1.75;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.section-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

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

.section-pills a:hover,
.section-pills a:focus-visible {
  color: var(--text);
  border-color: rgba(125, 211, 252, 0.3);
}

.article-section + .article-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(151, 192, 255, 0.08);
}

.article-section p,
.article-section li {
  line-height: 1.8;
}

.note {
  padding: 14px 16px;
  border-left: 3px solid rgba(125, 211, 252, 0.5);
  border-radius: 0 12px 12px 0;
  background: rgba(125, 211, 252, 0.06);
}

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

.info-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(151, 192, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.info-card strong {
  display: block;
  margin-bottom: 8px;
}

.inline-card {
  margin: 18px 0;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border: 1px solid rgba(151, 192, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 16px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

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

.faq-list details[open] {
  border-color: rgba(125, 211, 252, 0.26);
}

.faq-list details[open] summary {
  margin-bottom: 10px;
}

.faq-hub-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-hub-card {
  padding: 24px;
}

.site-footer {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 18px auto 32px;
  padding: 22px 6px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  border-top: 1px solid rgba(151, 192, 255, 0.08);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 420ms ease;
}

@media (max-width: 1100px) {
  .topbar {
    width: calc(100% - 20px);
    padding: 14px;
    border-radius: 28px;
  }

  .hero-grid,
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .entry-grid,
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .topnav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .tool-grid,
  .faq-hub-grid,
  .docs-sidebar {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .doc-article,
  .sidebar-card,
  .panel,
  .entry-card,
  .tool-card,
  .step-card {
    padding: 22px;
  }

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

@media (max-width: 640px) {
  .section {
    width: calc(100% - 20px);
  }

  .hero {
    padding-top: 34px;
  }

  .hero h1 {
    max-width: none;
  }

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

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .copy-button {
    width: 100%;
    justify-content: center;
  }

  .site-footer {
    justify-content: flex-start;
  }
}
