/**
 * AI API 中转站安全科普 — 图文页
 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #FDF6EC;
  --bg-section: #FFFBF5;
  --card: #FFFFFF;
  --primary: #6CB4EE;
  --accent: #E8927C;
  --warn: #FF6B6B;
  --success: #7BC8A4;
  --text: #4A4A4A;
  --text-muted: #8C8C8C;
  --border: #F0E6D8;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --radius: 20px;
  --nav-h: 56px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== 顶栏导航 ===== */
.guide-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--nav-h);
  padding: 0 clamp(16px, 4vw, 32px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 2px solid var(--border);
  backdrop-filter: blur(10px);
}

.guide-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 2.5vw, 1.05rem);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.guide-nav-brand svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.guide-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.guide-nav-links::-webkit-scrollbar {
  display: none;
}

.guide-nav-links a {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.guide-nav-links a:hover,
.guide-nav-links a.active {
  background: #E8F4FD;
  color: var(--primary);
}

.guide-nav-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #6CB4EE, #4A9AD4);
  box-shadow: 0 2px 10px rgba(108, 180, 238, 0.35);
  transition: transform 0.15s;
}

.guide-nav-cta:hover {
  transform: scale(1.03);
}

/* ===== 主容器 ===== */
.guide-main {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 32px) 60px;
}

/* ===== 章节卡片 ===== */
.guide-section {
  margin-bottom: clamp(28px, 5vw, 48px);
}

.guide-section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.guide-section-label--intro {
  background: #FFF8E7;
  color: #C17A2A;
  border: 1.5px solid #FFD4A8;
}

.guide-section-label--risks {
  background: #FFF0F0;
  color: var(--warn);
  border: 1.5px solid #FFD4D4;
}

.guide-section-label--agent {
  background: #FFF3E6;
  color: #D35400;
  border: 1.5px solid #FFD4A8;
}

.guide-section-label--defense {
  background: #F0FAF4;
  color: #2D6A4F;
  border: 1.5px solid #B8E6CF;
}

.guide-section-label--finale {
  background: #E8F4FD;
  color: var(--primary);
  border: 1.5px solid #C9E4FF;
}

.guide-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.guide-card:hover {
  box-shadow: 0 8px 32px rgba(232, 146, 124, 0.12);
}

.guide-card picture,
.guide-card img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.guide-card--landscape img {
  object-fit: contain;
}

.guide-caption {
  padding: 14px 18px 16px;
  border-top: 2px solid var(--border);
  background: linear-gradient(180deg, var(--bg-section) 0%, var(--card) 100%);
}

.guide-caption p {
  font-size: clamp(0.82rem, 2vw, 0.92rem);
  line-height: 1.65;
  color: var(--text);
}

.guide-caption p + p {
  margin-top: 6px;
}

.guide-caption strong {
  color: var(--warn);
  font-weight: 700;
}

.guide-caption--finale {
  text-align: center;
  padding: 18px 20px 20px;
  background: linear-gradient(135deg, #E8F4FD 0%, #F0FAF4 100%);
  border-top-color: #C9E4FF;
}

.guide-caption--finale p {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.8vw, 1.12rem);
  line-height: 1.6;
}

.guide-keyphrase {
  display: inline-block;
  padding: 2px 12px 4px;
  margin: 0 2px;
  font-family: var(--font-display);
  font-size: 1.22em;
  font-weight: 700;
  color: #C0392B;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.14) 0%, rgba(255, 209, 102, 0.2) 100%);
  border-radius: 10px;
  border-bottom: 3px solid var(--warn);
  box-shadow: 0 2px 10px rgba(255, 107, 107, 0.18);
}

.guide-caption code {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 107, 107, 0.1);
  color: #C0392B;
}

/* ===== 首屏封面 ===== */
.guide-hero {
  margin-bottom: clamp(32px, 6vw, 56px);
}

.guide-hero .guide-card {
  border-color: #FFD4A8;
  box-shadow: var(--shadow), 0 0 0 4px rgba(255, 209, 102, 0.15);
}

.guide-hero-tagline {
  text-align: center;
  margin-top: 16px;
  font-size: clamp(0.78rem, 2vw, 0.88rem);
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-hero-tagline em {
  font-style: normal;
  color: var(--warn);
  font-weight: 700;
}

/* ===== 底部 CTA ===== */
.guide-footer {
  margin-top: clamp(32px, 6vw, 48px);
  padding: clamp(24px, 5vw, 36px);
  border-radius: var(--radius);
  text-align: center;
  background: linear-gradient(135deg, #E8F4FD 0%, #F0FAF4 100%);
  border: 2px solid #C9E4FF;
}

.guide-footer-quote {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 20px;
}

.guide-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 2.5vw, 1rem);
  font-weight: 400;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.guide-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #6CB4EE 0%, #4A9AD4 100%);
  box-shadow: 0 4px 16px rgba(108, 180, 238, 0.45);
}

.guide-btn--primary:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 22px rgba(108, 180, 238, 0.55);
}

.guide-btn--ghost {
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--border);
}

.guide-btn--ghost:hover {
  background: #F8FCFF;
  border-color: #C9E4FF;
}

.guide-meta {
  margin-top: 14px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ===== 页脚 ===== */
.guide-copyright {
  text-align: center;
  padding: 24px 16px 32px;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .guide-nav-links {
    display: none;
  }

  .guide-caption {
    padding: 10px 14px 12px;
  }

  .guide-card {
    border-radius: 14px;
  }
}

@media (min-width: 900px) {
  .guide-main {
    max-width: 720px;
  }
}
