:root {
  color-scheme: dark;
  --bg: #090c0f;
  --bg-elevated: #0f1419;
  --panel: rgba(19, 25, 31, 0.9);
  --panel-strong: rgba(24, 31, 39, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --text: #edf3f8;
  --muted: #9aa8b8;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #49d7c0;
  --accent-warm: #f4b95d;
  --accent-hot: #ff7d66;
  --success: #78e7ab;
  --warning: #ffc56d;
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.32);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 76px;
  --content-w: 760px;
  --sidebar-w: 264px;
  --toc-w: 228px;
  --font-ui: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-code: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

[data-doc-heading] {
  scroll-margin-top: calc(var(--header-h) + 28px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(73, 215, 192, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(244, 185, 93, 0.14), transparent 28%),
    linear-gradient(180deg, #0a0d11 0%, #090c0f 100%);
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 85%);
  pointer-events: none;
}

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

.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(73, 215, 192, 0.45);
  text-underline-offset: 0.18em;
}

.text-link:hover {
  color: var(--text);
  text-decoration-color: var(--accent);
}

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

button,
input,
select {
  font: inherit;
}

code,
pre {
  font-family: var(--font-code);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(8, 11, 14, 0.76);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1480px;
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(97, 126, 255, 0.26);
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.1;
}

.brand-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
  border: 1px solid transparent;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

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

.ghost-button,
.accent-button,
.segmented button,
.sidebar-toggle,
.copy-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ghost-button:hover,
.accent-button:hover,
.segmented button:hover,
.sidebar-toggle:hover,
.copy-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.ghost-button,
.accent-button,
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
}

.accent-button {
  background: linear-gradient(135deg, rgba(73, 215, 192, 0.18), rgba(244, 185, 93, 0.18));
  color: var(--text);
}

.sidebar-toggle {
  display: none;
  width: 42px;
  padding: 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, var(--sidebar-w)) minmax(0, 1fr) minmax(0, var(--toc-w));
  gap: 28px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.sidebar,
.toc {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  align-self: start;
}

.sidebar-panel,
.toc-panel,
.hero-card,
.surface,
.metric,
.callout,
.table-wrap,
.footer-nav a,
.checklist,
.tool-card,
.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar-panel,
.toc-panel {
  padding: 18px;
}

.sidebar-group + .sidebar-group {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-group h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(73, 215, 192, 0.09), rgba(244, 185, 93, 0.08));
  border: 1px solid rgba(73, 215, 192, 0.16);
}

.sidebar-note.is-cta {
  background: linear-gradient(145deg, rgba(255, 125, 102, 0.16), rgba(244, 185, 93, 0.14));
  border-color: rgba(255, 125, 102, 0.22);
}

.sidebar-note strong {
  display: block;
  margin-bottom: 6px;
}

.note-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.note-actions .ghost-button,
.note-actions .accent-button {
  width: 100%;
  justify-content: center;
}

.accent-button.is-hot {
  background: linear-gradient(135deg, rgba(255, 125, 102, 0.96), rgba(244, 185, 93, 0.96));
  color: #101418;
  border-color: rgba(255, 125, 102, 0.28);
  box-shadow: 0 0 0 0 rgba(255, 125, 102, 0.42);
  animation: pulse-glow 2.1s ease-in-out infinite;
}

.accent-button.is-hot:hover {
  color: #081015;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 125, 102, 0.34);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(255, 125, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 125, 102, 0);
  }
}

.content {
  min-width: 0;
}

.page-intro {
  margin-bottom: 22px;
}

.doc-updated {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid rgba(244, 185, 93, 0.42);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(244, 185, 93, 0.16), rgba(73, 215, 192, 0.08));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 14px;
}

.doc-updated__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--warning);
  font-weight: 700;
}

.doc-updated__label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--warning);
  box-shadow: 0 0 16px rgba(255, 197, 109, 0.72);
}

.doc-updated time {
  color: var(--text);
  font-weight: 600;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  box-shadow: 0 0 14px rgba(73, 215, 192, 0.52);
}

.page-intro h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 3vw, 48px);
  line-height: 1.08;
}

.page-intro p {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 17px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% 40%;
  height: 200px;
  background: radial-gradient(circle, rgba(73, 215, 192, 0.16), transparent 65%);
  pointer-events: none;
}

.hero-grid,
.metrics,
.tool-grid,
.link-grid {
  display: grid;
  gap: 16px;
}

.hero-grid {
  grid-template-columns: 1.2fr 0.8fr;
}

.hero-card h2 {
  margin: 16px 0 10px;
  font-size: 30px;
  line-height: 1.14;
}

.hero-card p {
  color: var(--muted);
}

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

.metric {
  padding: 18px;
}

.metric strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.surface,
.tool-card,
.faq-item {
  padding: 22px;
}

.surface + .surface,
.callout + .surface,
.table-wrap + .surface,
.surface + .table-wrap {
  margin-top: 18px;
}

.surface h2,
.tool-card h3,
.faq-item h3,
.callout h3 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.surface h3 {
  margin: 24px 0 8px;
  font-size: 20px;
}

.surface p,
.tool-card p,
.faq-item p,
.callout p,
.surface li,
.surface dd {
  color: var(--muted);
}

.surface ul,
.surface ol {
  padding-left: 22px;
}

.surface li + li,
.surface p + p {
  margin-top: 8px;
}

.pill-row,
.quick-links,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.callout {
  position: relative;
  padding: 18px 18px 18px 22px;
  margin-top: 16px;
}

.callout::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 4px;
  border-radius: 999px;
}

.callout.tip::before {
  background: var(--success);
}

.callout.warn::before {
  background: var(--warning);
}

.callout.warning::before {
  background: var(--warning);
}

.callout.hot::before {
  background: var(--accent-hot);
}

.step-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.step-list article {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.step-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.step-list p {
  margin: 0;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.segmented button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
}

.segmented button.is-active {
  background: linear-gradient(135deg, rgba(73, 215, 192, 0.24), rgba(244, 185, 93, 0.22));
  border-color: rgba(73, 215, 192, 0.32);
}

.snippet-set {
  margin-top: 18px;
}

.snippet-panel[hidden] {
  display: none;
}

.code-frame {
  margin-top: 14px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 11, 0.9);
}

.code-frame__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
}

.code-frame__label {
  color: var(--muted);
  font-size: 13px;
}

.copy-button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
}

.code-frame pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
}

.code-frame code {
  color: #d6e8f6;
}

.inline-code {
  padding: 0.14em 0.42em;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #cce8ff;
}

.table-wrap {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.03);
}

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

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.checklist {
  padding: 18px 20px;
}

.checklist h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

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

.checklist li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

.checklist li + li {
  margin-top: 10px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
}

.visual-guide,
.path-strip {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

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

.visual-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.visual-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(73, 215, 192, 0.26), rgba(244, 185, 93, 0.24));
  border: 1px solid rgba(73, 215, 192, 0.28);
  color: var(--text);
  font-weight: 700;
}

.visual-card strong,
.visual-card span {
  display: block;
}

.visual-card strong {
  margin-bottom: 6px;
  color: var(--text);
}

.visual-card span:not(.visual-card__num) {
  color: var(--muted);
  font-size: 14px;
}

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

.path-strip span {
  position: relative;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(73, 215, 192, 0.18);
  border-radius: 14px;
  background: rgba(73, 215, 192, 0.06);
  color: #d6f7f1;
  font-family: var(--font-code);
  font-size: 13px;
  overflow-wrap: anywhere;
}

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

.tool-card h3 {
  font-size: 20px;
}

.tool-card small,
.faq-item small,
.surface small {
  color: var(--muted);
}

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

.link-card {
  display: block;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
}

.link-card strong {
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
}

.link-card span {
  color: var(--muted);
  font-size: 14px;
}

.toc-panel h2 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.toc-list li + li {
  margin-top: 8px;
}

.toc-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
}

.toc-list a:hover,
.toc-list a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.footer-nav a {
  display: block;
  padding: 18px;
}

.footer-nav small {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.footer-nav strong {
  font-size: 18px;
}

.faq-item + .faq-item {
  margin-top: 16px;
}

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

.mobile-sidebar-backdrop {
  display: none;
}

@media (max-width: 1220px) {
  .layout {
    grid-template-columns: minmax(0, var(--sidebar-w)) minmax(0, 1fr);
  }

  .toc {
    display: none;
  }

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

@media (max-width: 980px) {
  .sidebar-toggle {
    display: inline-flex;
  }

  .top-nav,
  .header-actions .ghost-button {
    display: none;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 16px 42px;
  }

  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 16px;
    bottom: 16px;
    width: min(86vw, 320px);
    z-index: 45;
    transform: translateX(calc(-100% - 24px));
    transition: transform 180ms ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    z-index: 44;
  }

  body.sidebar-open .mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .metrics,
  .tool-grid,
  .visual-guide,
  .path-strip,
  .link-grid,
  .footer-nav {
    grid-template-columns: 1fr;
  }

  .page-intro p {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .site-header__inner {
    min-height: 68px;
    padding: 0 16px;
  }

  :root {
    --header-h: 68px;
  }

  .brand-copy span {
    display: none;
  }

  .hero-card,
  .surface,
  .tool-card,
  .faq-item,
  .sidebar-panel,
  .toc-panel {
    border-radius: 16px;
  }

  .surface,
  .tool-card,
  .faq-item {
    padding: 18px;
  }

  table {
    min-width: 560px;
  }
}
