:root {
  --bg: #f2f4f7;
  --bg-soft: #edf1f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #d6dce5;
  --line-strong: #c2ccd9;
  --text: #1f2937;
  --text-soft: #475569;
  --muted: #64748b;
  --primary: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #0f766e;
  --warning-bg: #fff7ed;
  --warning-line: #fdba74;
  --warning-text: #9a3412;
  --ok: #0f766e;
  --bad: #b91c1c;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.guide-body {
  position: relative;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  line-height: 1.65;
}

.guide-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(59, 130, 246, 0.12), transparent 35%),
    radial-gradient(circle at 92% 12%, rgba(15, 118, 110, 0.1), transparent 40%),
    repeating-linear-gradient(
      -20deg,
      rgba(148, 163, 184, 0.08) 0 1px,
      transparent 1px 32px
    );
  pointer-events: none;
}

.guide-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 20px 42px;
}

.guide-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.sidebar-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--primary), #2563eb 60%, #60a5fa);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.sidebar-head strong {
  display: block;
  font-size: 0.96rem;
}

.sidebar-head p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.sidebar-nav {
  overflow: auto;
  padding: 8px 8px 6px;
  display: grid;
  gap: 3px;
}

.nav-item {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: #334155;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.nav-item:hover {
  background: #eef4ff;
  border-color: #dbeafe;
  color: #1e3a8a;
}

.nav-item.active {
  background: linear-gradient(90deg, #e0ecff, #eff6ff);
  border-color: #bfdbfe;
  color: var(--primary);
  font-weight: 600;
}

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.tiny-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 6px 10px;
  border-radius: 9px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid var(--line);
}

.tiny-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.guide-main {
  display: grid;
  gap: 16px;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  animation: fadeUp 0.45s ease both;
}

.section-card h1,
.section-card h2,
.section-card h3 {
  margin: 0 0 10px;
  line-height: 1.3;
}

.section-card h1 {
  font-size: clamp(1.45rem, 2.3vw, 2.05rem);
}

.section-card h2 {
  font-size: 1.28rem;
}

.section-card h3 {
  margin-top: 14px;
  font-size: 1rem;
}

.section-card p {
  margin: 0 0 10px;
  color: var(--text-soft);
}

.hero-card {
  background:
    linear-gradient(155deg, #ffffff 0%, #f8fbff 60%),
    radial-gradient(circle at 20% 20%, #dbeafe 0%, transparent 55%);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 0.74rem;
  font-weight: 600;
}

.stamp {
  font-size: 0.75rem;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  border-radius: 999px;
  padding: 4px 10px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hero-tags span {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #0f172a;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}

ul,
ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

li {
  margin: 4px 0;
}

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
  font-size: 0.9em;
  color: #0f172a;
}

pre {
  margin: 10px 0 14px;
  border: 1px solid #dbe3ed;
  border-radius: 12px;
  background: #0b1220;
  color: #d5e5ff;
  overflow-x: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

pre code {
  display: block;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 14px 16px;
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 12px;
}

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

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

.mini-card {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px;
}

.mini-card h3 {
  margin: 0 0 8px;
}

.note-box {
  border: 1px solid #bfdbfe;
  border-left-width: 4px;
  border-radius: 12px;
  background: #eff6ff;
  padding: 12px 14px;
}

.note-box.warning {
  border-color: var(--warning-line);
  background: var(--warning-bg);
  color: var(--warning-text);
}

.note-box.warning p,
.note-box.warning li {
  color: var(--warning-text);
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.status-table th,
.status-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.status-table thead th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  font-size: 0.88rem;
}

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

.ok {
  color: var(--ok);
  font-weight: 700;
}

.bad {
  color: var(--bad);
  font-weight: 700;
}

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

.faq-list article {
  border: 1px solid #dbe2ec;
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
}

.faq-list article h3 {
  margin: 0 0 6px;
  color: #0f172a;
}

.faq-list article p {
  margin: 0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1160px) {
  .guide-shell {
    grid-template-columns: 246px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 14px 36px;
  }
}

@media (max-width: 940px) {
  .guide-shell {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: static;
    max-height: none;
  }

  .sidebar-nav {
    max-height: 180px;
  }

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

@media (max-width: 560px) {
  .section-card {
    padding: 16px;
  }

  .nav-item {
    font-size: 0.86rem;
  }

  pre code {
    font-size: 0.8rem;
  }
}
