/* ==========================================================================
   RainyKnowledge 知识中心 — 全局样式
   纯手写 CSS，无外部依赖
   品牌色: #02007e（深靛蓝） / 页面底色: #f9f9f9 / 正文灰: #636363 / 深色: #242738
   ========================================================================== */

/* MiSans 自托管分片字体（@import 必须在所有规则之前；内网部署，零外链） */
@import url("../fonts/misans.css");

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 颜色 */
  --rk-primary: #02007e;
  --rk-primary-deep: #01005c;
  --rk-primary-soft: #ecebfb;
  --rk-primary-hover: #14109a;
  --rk-accent: #4d6fff;
  --rk-bg: #f9f9f9;
  --rk-card: #ffffff;
  --rk-text: #636363;
  --rk-dark: #242738;
  --rk-muted: #9a9aa8;
  --rk-border: #eaeaF2;
  --rk-border-strong: #dcdcea;
  --rk-gray-card: #f2f2f6;
  --rk-danger: #d4382c;
  --rk-success: #0e9f6e;
  --rk-code-bg: #f5f5fa;
  --rk-code-dark: #22223a;

  /* 字体 */
  --rk-font: "MiSans", "Lato", "Helvetica Neue", Helvetica, Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
  --rk-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    "Courier New", monospace;

  /* 尺寸 */
  --rk-radius: 14px;
  --rk-radius-sm: 10px;
  --rk-radius-lg: 22px;
  --rk-nav-h: 64px;
  --rk-container: 1180px;

  /* 阴影 */
  --rk-shadow-sm: 0 2px 8px rgba(36, 39, 56, 0.05);
  --rk-shadow: 0 6px 24px rgba(2, 0, 126, 0.07);
  --rk-shadow-lg: 0 16px 48px rgba(2, 0, 126, 0.13);

  /* 过渡 */
  --rk-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--rk-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--rk-text);
  background: var(--rk-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--rk-dark);
  font-weight: 700;
  line-height: 1.35;
}

p { margin: 0; }

a {
  color: var(--rk-primary);
  text-decoration: none;
  transition: color 0.2s var(--rk-ease);
}
a:hover { color: var(--rk-primary-hover); }

img { max-width: 100%; }

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
}

:focus-visible {
  outline: 2px solid var(--rk-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: rgba(2, 0, 126, 0.14);
}

/* ---------- 3. 滚动条美化 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #cfcfe0;
  border-radius: 6px;
  border: 2px solid var(--rk-bg);
}
::-webkit-scrollbar-thumb:hover { background: #b3b3cc; }

/* ---------- 4. 布局工具 ---------- */
.rk-container {
  width: 100%;
  max-width: var(--rk-container);
  margin: 0 auto;
  padding: 0 28px;
}

.rk-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.rk-icon svg { display: block; }

/* ---------- 5. 顶部导航 ---------- */
.rk-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--rk-nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rk-border);
}

.rk-nav-inner {
  height: var(--rk-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.rk-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  color: var(--rk-dark);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.rk-logo:hover { color: var(--rk-dark); }
.rk-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--rk-primary) 0%, #3531c9 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(2, 0, 126, 0.25);
}
.rk-logo-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--rk-muted);
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid var(--rk-border-strong);
}

.rk-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rk-nav-links a {
  position: relative;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--rk-dark);
  border-radius: 8px;
  transition: background 0.2s var(--rk-ease), color 0.2s var(--rk-ease);
}
.rk-nav-links a:hover {
  color: var(--rk-primary);
  background: var(--rk-primary-soft);
}
.rk-nav-links a.active { color: var(--rk-primary); }
.rk-nav-links a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--rk-primary);
}
.rk-nav-links a.rk-nav-cta {
  color: #fff;
  background: var(--rk-primary);
  margin-left: 8px;
  box-shadow: 0 4px 14px rgba(2, 0, 126, 0.22);
}
.rk-nav-links a.rk-nav-cta:hover {
  background: var(--rk-primary-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* 中屏导航收紧：导航项增多（9 项）后避免 1440px 内换行 */
.rk-nav-links a { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1360px) {
  .rk-nav-links { gap: 2px; }
  .rk-nav-links a { padding: 8px 9px; font-size: 13.5px; }
  .rk-nav-links a.rk-nav-cta { margin-left: 4px; }
  .rk-nav-inner .rk-logo { font-size: 16px; }
}

/* 导航内页搜索框 */
.rk-nav-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 4px;
}
.rk-nav-search .rk-icon {
  position: absolute;
  left: 12px;
  color: var(--rk-muted);
  pointer-events: none;
}
.rk-nav-search input {
  width: 210px;
  height: 38px;
  padding: 0 14px 0 36px;
  border: 1px solid var(--rk-border-strong);
  border-radius: 999px;
  background: var(--rk-bg);
  color: var(--rk-dark);
  font-size: 14px;
  transition: border-color 0.2s var(--rk-ease), box-shadow 0.2s var(--rk-ease),
    width 0.25s var(--rk-ease), background 0.2s var(--rk-ease);
}
.rk-nav-search input::placeholder { color: var(--rk-muted); }
.rk-nav-search input:focus {
  outline: none;
  border-color: var(--rk-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(2, 0, 126, 0.09);
  width: 250px;
}

/* 移动端汉堡按钮 */
.rk-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rk-border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--rk-dark);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--rk-ease);
}
.rk-nav-toggle:hover { background: var(--rk-primary-soft); color: var(--rk-primary); }

/* ---------- 6. 首页 Banner ---------- */
.rk-hero {
  position: relative;
  overflow: hidden;
  margin: 34px auto 0;
  border-radius: var(--rk-radius-lg);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(99, 102, 241, 0.55), transparent 60%),
    radial-gradient(900px 480px at 8% 110%, rgba(0, 194, 255, 0.28), transparent 55%),
    linear-gradient(128deg, #01005c 0%, #02007e 46%, #1d19b8 100%);
  color: #fff;
  text-align: center;
  padding: 96px 32px 104px;
  box-shadow: var(--rk-shadow-lg);
}

/* 装饰性几何图形 */
.rk-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(720px 380px at 50% 38%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(720px 380px at 50% 38%, #000 0%, transparent 78%);
  pointer-events: none;
}
.rk-hero-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.rk-hero-deco.d1 {
  width: 260px; height: 260px;
  right: -70px; top: -90px;
  border: 42px solid rgba(255, 255, 255, 0.07);
}
.rk-hero-deco.d2 {
  width: 130px; height: 130px;
  left: 6%; bottom: 12%;
  background: rgba(255, 255, 255, 0.06);
}
.rk-hero-deco.d3 {
  width: 22px; height: 22px;
  left: 16%; top: 22%;
  background: rgba(120, 220, 255, 0.65);
  box-shadow: 0 0 24px rgba(120, 220, 255, 0.8);
}
.rk-hero-deco.d4 {
  width: 14px; height: 14px;
  right: 20%; top: 30%;
  background: rgba(255, 213, 128, 0.85);
}
.rk-hero-deco.d5 {
  width: 0; height: 0;
  right: 12%; bottom: 18%;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 25px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}

.rk-hero-inner { position: relative; z-index: 1; }

.rk-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin-bottom: 26px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}
.rk-hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6ef3c5;
  box-shadow: 0 0 10px #6ef3c5;
}

.rk-hero h1 {
  font-size: 46px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}
.rk-hero h1 .brand { color: #9fd8ff; }

.rk-hero-sub {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 620px;
  margin: 0 auto 42px;
}

/* Agent 提问输入框 */
.rk-ask {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 660px;
  margin: 0 auto;
  padding: 8px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(1, 0, 92, 0.45);
  transition: box-shadow 0.25s var(--rk-ease), transform 0.25s var(--rk-ease);
}
.rk-ask:focus-within {
  box-shadow: 0 18px 54px rgba(1, 0, 92, 0.55), 0 0 0 5px rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.rk-ask .rk-icon { margin-left: 14px; color: var(--rk-primary); flex: none; }
.rk-ask input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--rk-dark);
  padding: 12px 4px;
}
.rk-ask input::placeholder { color: #a4a4b5; }
.rk-ask button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  border: none;
  border-radius: 999px;
  background: var(--rk-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--rk-ease), transform 0.15s var(--rk-ease);
}
.rk-ask button:hover { background: var(--rk-primary-hover); }
.rk-ask button:active { transform: scale(0.97); }

.rk-hero-hint {
  margin-top: 20px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- 7. 首页分类卡片 ---------- */
.rk-section { padding: 72px 0 20px; }

.rk-section-head { text-align: center; margin-bottom: 44px; }
.rk-section-head h2 { font-size: 30px; margin-bottom: 10px; }
.rk-section-head p { font-size: 15.5px; color: var(--rk-muted); }

.rk-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.rk-cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
  background: var(--rk-card);
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);
  box-shadow: var(--rk-shadow-sm);
  transition: transform 0.25s var(--rk-ease), box-shadow 0.25s var(--rk-ease),
    border-color 0.25s var(--rk-ease);
  overflow: hidden;
}
.rk-cat-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--rk-primary), var(--rk-accent));
  opacity: 0;
  transition: opacity 0.25s var(--rk-ease);
}
a.rk-cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--rk-shadow-lg);
  border-color: rgba(2, 0, 126, 0.18);
}
a.rk-cat-card:hover::after { opacity: 1; }

.rk-cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--rk-primary-soft);
  color: var(--rk-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: background 0.25s var(--rk-ease), color 0.25s var(--rk-ease),
    transform 0.25s var(--rk-ease);
}
a.rk-cat-card:hover .rk-cat-icon {
  background: var(--rk-primary);
  color: #fff;
  transform: scale(1.05);
}

.rk-cat-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.rk-cat-card > p {
  font-size: 14px;
  color: var(--rk-text);
  margin-bottom: 20px;
  flex: 1;
}

.rk-cat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--rk-muted);
}
.rk-cat-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--rk-primary);
}
.rk-cat-more .rk-icon { transition: transform 0.2s var(--rk-ease); }
a.rk-cat-card:hover .rk-cat-more .rk-icon { transform: translateX(4px); }

/* 即将上线卡片 */
.rk-cat-card.coming-soon {
  background: var(--rk-gray-card);
  border-style: dashed;
  border-color: var(--rk-border-strong);
  box-shadow: none;
  cursor: default;
}
.rk-cat-card.coming-soon .rk-cat-icon {
  background: #e6e6ee;
  color: var(--rk-muted);
}
.rk-cat-card.coming-soon h3 { color: #888896; }
.rk-cat-card.coming-soon > p { color: var(--rk-muted); }
.rk-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #8b8b9c;
  background: #e4e4ec;
  border-radius: 999px;
}

/* ---------- 8. 面包屑 ---------- */
.rk-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px 0 6px;
  font-size: 14px;
  color: var(--rk-muted);
}
.rk-breadcrumb a {
  color: var(--rk-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rk-breadcrumb a:hover { color: var(--rk-primary); }
.rk-breadcrumb .sep { color: #c9c9d8; }
.rk-breadcrumb .current { color: var(--rk-dark); font-weight: 600; }

/* ---------- 9. 分类详情页 ---------- */
.rk-cat-hero {
  padding: 26px 0 34px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.rk-cat-hero .rk-cat-icon { width: 62px; height: 62px; margin: 4px 0 0; border-radius: 16px; }
.rk-cat-hero h1 { font-size: 32px; margin-bottom: 8px; }
.rk-cat-hero p { font-size: 15.5px; max-width: 640px; }
.rk-cat-hero .rk-cat-count {
  margin-top: 12px;
  display: inline-flex;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rk-primary);
  background: var(--rk-primary-soft);
  border-radius: 999px;
}

.rk-doc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 40px;
}

.rk-doc-card {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 20px;
  background: var(--rk-card);
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);
  box-shadow: var(--rk-shadow-sm);
  transition: transform 0.22s var(--rk-ease), box-shadow 0.22s var(--rk-ease),
    border-color 0.22s var(--rk-ease);
}
.rk-doc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rk-shadow-lg);
  border-color: rgba(2, 0, 126, 0.16);
}
.rk-doc-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.rk-doc-card:hover h3 { color: var(--rk-primary); }
.rk-doc-card p { font-size: 13.5px; flex: 1; margin-bottom: 16px; }
.rk-doc-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rk-primary);
}
.rk-doc-read .rk-icon { transition: transform 0.2s var(--rk-ease); }
.rk-doc-card:hover .rk-doc-read .rk-icon { transform: translateX(4px); }

/* ---------- 10. 空状态 / 404 状态 ---------- */
.rk-state {
  text-align: center;
  padding: 90px 24px 110px;
}
.rk-state-ico {
  width: 96px;
  height: 96px;
  margin: 0 auto 26px;
  border-radius: 28px;
  background: var(--rk-primary-soft);
  color: var(--rk-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rk-state h2 { font-size: 24px; margin-bottom: 12px; }
.rk-state p { max-width: 460px; margin: 0 auto 30px; font-size: 15px; }

.rk-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 26px;
  border: none;
  border-radius: 999px;
  background: var(--rk-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(2, 0, 126, 0.22);
  transition: background 0.2s var(--rk-ease), transform 0.15s var(--rk-ease),
    box-shadow 0.2s var(--rk-ease);
}
.rk-btn:hover { background: var(--rk-primary-hover); color: #fff; transform: translateY(-1px); }
.rk-btn:active { transform: scale(0.97); }
.rk-btn.ghost {
  background: #fff;
  color: var(--rk-primary);
  border: 1px solid var(--rk-border-strong);
  box-shadow: none;
}
.rk-btn.ghost:hover { border-color: var(--rk-primary); background: var(--rk-primary-soft); }

/* ---------- 11. 页脚 ---------- */
.rk-footer {
  margin-top: 80px;
  background: #fff;
  border-top: 1px solid var(--rk-border);
}
.rk-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 0;
}
.rk-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--rk-dark);
}
.rk-footer-brand .rk-logo-mark { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
.rk-footer-brand small {
  display: block;
  font-weight: 400;
  color: var(--rk-muted);
  font-size: 12.5px;
}
.rk-footer-links { display: flex; gap: 22px; font-size: 14px; }
.rk-footer-links a { color: var(--rk-text); }
.rk-footer-links a:hover { color: var(--rk-primary); }
.rk-footer-copy {
  border-top: 1px solid var(--rk-border);
  padding: 16px 0 20px;
  text-align: center;
  font-size: 13px;
  color: var(--rk-muted);
}

/* ---------- 12. 返回顶部 ---------- */
.rk-to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rk-border-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--rk-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--rk-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s var(--rk-ease), transform 0.25s var(--rk-ease),
    visibility 0.25s, background 0.2s var(--rk-ease), color 0.2s var(--rk-ease);
}
.rk-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.rk-to-top:hover { background: var(--rk-primary); color: #fff; }

/* ==========================================================================
   文档阅读页
   ========================================================================== */

/* ---------- 13. 文档页布局 ---------- */
.rk-doc-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 90px;
  gap: 44px;
  padding-top: 12px;
  align-items: start;
}

/* 左侧 sticky 目录 */
.rk-toc-wrap {
  position: sticky;
  top: calc(var(--rk-nav-h) + 24px);
  max-height: calc(100vh - var(--rk-nav-h) - 48px);
  overflow-y: auto;
  padding: 22px 20px;
  background: var(--rk-card);
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);
  box-shadow: var(--rk-shadow-sm);
}
.rk-toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--rk-dark);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rk-border);
}
.rk-toc { list-style: none; margin: 0; padding: 0; }
.rk-toc li { margin: 0; }
.rk-toc a {
  display: block;
  position: relative;
  padding: 7px 10px 7px 16px;
  font-size: 13.8px;
  line-height: 1.5;
  color: var(--rk-text);
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color 0.18s var(--rk-ease), background 0.18s var(--rk-ease),
    border-color 0.18s var(--rk-ease);
}
.rk-toc a:hover { color: var(--rk-primary); background: var(--rk-primary-soft); }
.rk-toc a.active {
  color: var(--rk-primary);
  font-weight: 600;
  background: var(--rk-primary-soft);
  border-left-color: var(--rk-primary);
}
.rk-toc .lvl-3 a { padding-left: 34px; font-size: 13px; color: var(--rk-muted); }
.rk-toc .lvl-3 a.active, .rk-toc .lvl-3 a:hover { color: var(--rk-primary); }
.rk-toc-empty { font-size: 13px; color: var(--rk-muted); padding: 4px 2px; }

/* 移动端 TOC 抽屉 */
.rk-toc-fab {
  display: none;
  position: fixed;
  right: 26px;
  bottom: 82px;
  z-index: 95;
  height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--rk-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(2, 0, 126, 0.35);
}
.rk-toc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(20, 20, 40, 0.45);
  opacity: 0;
  transition: opacity 0.25s var(--rk-ease);
}

/* 文档主体卡片 */
.rk-doc-main { min-width: 0; }
.rk-doc-paper {
  background: var(--rk-card);
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius-lg);
  box-shadow: var(--rk-shadow);
  padding: 54px 62px 46px;
}
.rk-doc-head {
  margin-bottom: 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--rk-border);
}
.rk-doc-head h1 { font-size: 33px; margin-bottom: 12px; }
.rk-doc-meta { display: flex; align-items: center; gap: 16px; font-size: 13.5px; color: var(--rk-muted); }
.rk-doc-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 14. .doc-content 注入内容排版 ---------- */
.doc-content { font-size: 16px; line-height: 1.85; color: #4a4a57; overflow-wrap: break-word; }
.doc-content > *:first-child { margin-top: 0; }

.doc-content h1 {
  font-size: 27px;
  margin: 40px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rk-border);
}
.doc-content h2 {
  font-size: 23px;
  margin: 44px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--rk-primary);
  scroll-margin-top: calc(var(--rk-nav-h) + 20px);
}
.doc-content h3 {
  font-size: 18.5px;
  margin: 32px 0 12px;
  scroll-margin-top: calc(var(--rk-nav-h) + 20px);
}
.doc-content h4 { font-size: 16.5px; margin: 26px 0 10px; }
.doc-content h1, .doc-content h2, .doc-content h3, .doc-content h4 { color: var(--rk-dark); }

/* Agent 命中卡片定位进来的章节高亮闪烁 */
@keyframes rkAnchorFlash {
  0%, 100% { background: transparent; box-shadow: none; }
  25% { background: rgba(2, 0, 126, 0.08); box-shadow: -4px 0 0 0 var(--rk-primary), 0 0 0 6px rgba(2, 0, 126, 0.06); }
}
.rk-anchor-flash {
  animation: rkAnchorFlash 1.3s ease-in-out 2;
  border-radius: 6px;
}

.doc-content p { margin: 14px 0; }
/* 影刀RPA：源站空页/未发布文档的占位提示 */
.doc-content .rk-empty-note {
  padding: 14px 18px;
  background: #f6f7fb;
  border: 1px dashed var(--rk-border-strong);
  border-radius: 10px;
  color: var(--rk-muted);
  font-size: 13.5px;
}
/* 影刀RPA：microApp/rpaFlow 解码出的指令流程块 */
.doc-content .rpa-blocks {
  margin: 14px 0;
  padding: 12px 18px;
  background: #f6fbf9;
  border: 1px solid #d3e8e2;
  border-radius: 10px;
}
.doc-content .rpa-blocks .rpa-blocks-title { margin: 0 0 6px; font-weight: 600; color: #0d9488; font-size: 13.5px; }
.doc-content .rpa-blocks ol { margin: 0; padding-left: 20px; }
.doc-content .rpa-blocks li { margin: 3px 0; font-size: 13.5px; }
.doc-content strong { color: var(--rk-dark); font-weight: 700; }
.doc-content em { color: #55556a; }

.doc-content a {
  color: var(--rk-primary);
  font-weight: 500;
  border-bottom: 1px solid rgba(2, 0, 126, 0.28);
  transition: color 0.2s, border-color 0.2s;
}
.doc-content a:hover { color: var(--rk-primary-hover); border-bottom-color: var(--rk-primary-hover); }

.doc-content ul, .doc-content ol { margin: 14px 0; padding-left: 26px; }
.doc-content li { margin: 6px 0; }
.doc-content li::marker { color: var(--rk-primary); font-weight: 600; }
.doc-content li > ul, .doc-content li > ol { margin: 6px 0; }

.doc-content blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  background: var(--rk-primary-soft);
  border-left: 4px solid var(--rk-primary);
  border-radius: 0 var(--rk-radius-sm) var(--rk-radius-sm) 0;
  color: #4c4c66;
}
.doc-content blockquote p { margin: 4px 0; }

/* 行内代码 & 代码块 */
.doc-content code {
  font-family: var(--rk-font-mono);
  font-size: 0.88em;
  padding: 2.5px 7px;
  background: var(--rk-code-bg);
  border: 1px solid var(--rk-border);
  border-radius: 6px;
  color: #b03a8c;
}
.doc-content pre {
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--rk-code-dark);
  border-radius: var(--rk-radius-sm);
  overflow-x: auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.doc-content pre code {
  display: block;
  padding: 0;
  background: transparent;
  border: none;
  color: #e6e6f5;
  font-size: 13.5px;
  line-height: 1.75;
}

/* 表格：条纹 + 边框 */
.doc-content table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  font-size: 14.5px;
  border: 1px solid var(--rk-border-strong);
  border-radius: var(--rk-radius-sm);
  overflow: hidden;
  box-shadow: var(--rk-shadow-sm);
}
.doc-content th, .doc-content td {
  padding: 11px 16px;
  text-align: left;
  border: 1px solid var(--rk-border);
}
.doc-content thead th {
  background: var(--rk-primary);
  color: #fff;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}
.doc-content tbody tr:nth-child(even) { background: #f6f6fb; }
.doc-content tbody tr:hover { background: var(--rk-primary-soft); }

/* 图片：圆角 + 阴影 + 点击放大 */
.doc-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: var(--rk-radius-sm);
  box-shadow: var(--rk-shadow);
  cursor: zoom-in;
  transition: transform 0.25s var(--rk-ease), box-shadow 0.25s var(--rk-ease);
}
.doc-content img:hover { transform: translateY(-2px); box-shadow: var(--rk-shadow-lg); }
.doc-content figure { margin: 24px 0; text-align: center; }
.doc-content figure img { margin: 0 auto 10px; }
.doc-content figcaption { font-size: 13px; color: var(--rk-muted); }

.doc-content hr { border: none; border-top: 1px solid var(--rk-border); margin: 34px 0; }

/* ---------- 15. 上一篇 / 下一篇 ---------- */
.rk-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 34px;
}
.rk-pn-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  background: var(--rk-card);
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);
  box-shadow: var(--rk-shadow-sm);
  transition: transform 0.2s var(--rk-ease), box-shadow 0.2s var(--rk-ease),
    border-color 0.2s var(--rk-ease);
}
a.rk-pn-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rk-shadow-lg);
  border-color: rgba(2, 0, 126, 0.18);
}
.rk-pn-card .lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--rk-muted);
}
.rk-pn-card .ttl { font-size: 15.5px; font-weight: 700; color: var(--rk-dark); }
a.rk-pn-card:hover .ttl { color: var(--rk-primary); }
.rk-pn-card.next { text-align: right; align-items: flex-end; }
.rk-pn-card.disabled { background: var(--rk-gray-card); box-shadow: none; cursor: default; }
.rk-pn-card.disabled .ttl { color: var(--rk-muted); font-weight: 500; }

/* ---------- 16. 图片 Lightbox ---------- */
.rk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(16, 16, 34, 0.88);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--rk-ease), visibility 0.25s;
  cursor: zoom-out;
}
.rk-lightbox.open { opacity: 1; visibility: visible; }
.rk-lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  border-radius: var(--rk-radius-sm);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.25s var(--rk-ease);
}
.rk-lightbox.open img { transform: scale(1); }
.rk-lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.rk-lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }

/* ==========================================================================
   RainyKnowledge Agent 对话页
   ========================================================================== */
.rk-agent-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.rk-agent-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

/* 消息流 */
.rk-chat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 6px 22px;
  scroll-behavior: smooth;
}

/* 欢迎空状态 */
.rk-welcome { text-align: center; padding: 56px 16px 30px; }
.rk-welcome-avatar {
  width: 74px;
  height: 74px;
  margin: 0 auto 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--rk-primary) 0%, #3531c9 100%);
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 36px rgba(2, 0, 126, 0.3);
}
.rk-welcome h1 { font-size: 27px; margin-bottom: 10px; }
.rk-welcome p { max-width: 520px; margin: 0 auto 30px; font-size: 15px; }
.rk-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}
.rk-chip {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--rk-dark);
  background: #fff;
  border: 1px solid var(--rk-border-strong);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--rk-shadow-sm);
  transition: all 0.2s var(--rk-ease);
}
.rk-chip:hover {
  color: var(--rk-primary);
  border-color: var(--rk-primary);
  background: var(--rk-primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--rk-shadow);
}
.rk-chip:active { transform: scale(0.97); }

/* 消息行 */
.rk-msg { display: flex; gap: 14px; margin-bottom: 28px; }
.rk-msg.user { flex-direction: row-reverse; }

.rk-msg-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  margin-top: 2px;
}
.rk-msg.ai .rk-msg-avatar {
  background: linear-gradient(135deg, var(--rk-primary) 0%, #3531c9 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(2, 0, 126, 0.28);
}
.rk-msg.user .rk-msg-avatar {
  background: #e9e9f2;
  color: var(--rk-dark);
  font-size: 14px;
  font-weight: 700;
}

.rk-msg-body { max-width: 76%; min-width: 0; }
.rk-msg.user .rk-msg-body { display: flex; flex-direction: column; align-items: flex-end; }

.rk-bubble {
  padding: 14px 19px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.rk-msg.ai .rk-bubble {
  background: #fff;
  border: 1px solid var(--rk-border);
  border-top-left-radius: 5px;
  box-shadow: var(--rk-shadow-sm);
  color: #454552;
}
.rk-msg.user .rk-bubble {
  background: var(--rk-primary);
  color: #fff;
  border-top-right-radius: 5px;
  box-shadow: 0 6px 18px rgba(2, 0, 126, 0.24);
  white-space: pre-wrap;
}

/* AI 气泡内的 Markdown 元素 */
.rk-md > *:first-child { margin-top: 0; }
.rk-md > *:last-child { margin-bottom: 0; }
.rk-md h1, .rk-md h2, .rk-md h3, .rk-md h4 {
  margin: 16px 0 8px;
  line-height: 1.4;
}
.rk-md h1 { font-size: 19px; }
.rk-md h2 { font-size: 17.5px; }
.rk-md h3 { font-size: 16px; }
.rk-md h4 { font-size: 15px; }
.rk-md p { margin: 9px 0; }
.rk-md ul, .rk-md ol { margin: 9px 0; padding-left: 22px; }
.rk-md li { margin: 4px 0; }
.rk-md li::marker { color: var(--rk-primary); font-weight: 600; }
.rk-md strong { color: var(--rk-dark); }
.rk-md a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--rk-primary);
  font-weight: 600;
  padding: 0 8px;
  margin: 0 1px;
  background: var(--rk-primary-soft);
  border-radius: 6px;
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
}
.rk-md a:hover { background: var(--rk-primary); color: #fff; }
.rk-md code {
  font-family: var(--rk-font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--rk-code-bg);
  border: 1px solid var(--rk-border);
  border-radius: 5px;
  color: #b03a8c;
}
.rk-md pre {
  margin: 12px 0;
  padding: 14px 18px;
  background: var(--rk-code-dark);
  border-radius: var(--rk-radius-sm);
  overflow-x: auto;
}
.rk-md pre code { padding: 0; background: none; border: none; color: #e6e6f5; font-size: 13px; }
.rk-md table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 13.5px;
  border: 1px solid var(--rk-border-strong);
}
.rk-md th, .rk-md td { padding: 8px 12px; border: 1px solid var(--rk-border); text-align: left; }
.rk-md thead th { background: var(--rk-primary-soft); color: var(--rk-dark); }
.rk-md tbody tr:nth-child(even) { background: #f7f7fc; }
.rk-md blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--rk-primary);
  background: var(--rk-primary-soft);
  border-radius: 0 8px 8px 0;
}

/* 流式光标 */
.rk-cursor {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--rk-primary);
  border-radius: 2px;
  animation: rk-blink 0.85s steps(2) infinite;
}
@keyframes rk-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* 错误提示 */
.rk-msg-error {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 11px 16px;
  font-size: 13.5px;
  color: var(--rk-danger);
  background: #fdf0ef;
  border: 1px solid #f5d2ce;
  border-radius: 10px;
}
.rk-msg-error > svg { flex: none; }
.rk-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: none;
  border: 1px solid #e0b6b6;
  background: #fff;
  color: #c0392b;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}
.rk-retry-btn:hover { background: #ffeaea; }

/* 参考文档卡片 */
.rk-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.rk-ref-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rk-primary);
  background: #fff;
  border: 1px solid var(--rk-border-strong);
  border-radius: 10px;
  box-shadow: var(--rk-shadow-sm);
  transition: all 0.2s var(--rk-ease);
}
.rk-ref-card:hover {
  background: var(--rk-primary);
  color: #fff;
  border-color: var(--rk-primary);
  transform: translateY(-2px);
  box-shadow: var(--rk-shadow);
}

/* 底部输入区 */
.rk-composer {
  flex: none;
  padding: 14px 0 22px;
}
.rk-composer-box {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--rk-border-strong);
  border-radius: 18px;
  box-shadow: var(--rk-shadow);
  transition: border-color 0.2s var(--rk-ease), box-shadow 0.2s var(--rk-ease);
}
.rk-composer-box:focus-within {
  border-color: var(--rk-primary);
  box-shadow: var(--rk-shadow), 0 0 0 4px rgba(2, 0, 126, 0.08);
}
.rk-composer textarea {
  flex: 1;
  min-width: 0;
  max-height: 140px;
  border: none;
  outline: none;
  resize: none;
  padding: 10px 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--rk-dark);
  background: transparent;
}
.rk-composer textarea::placeholder { color: #a4a4b5; }
.rk-composer textarea:disabled { color: var(--rk-muted); }
.rk-send {
  flex: none;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 13px;
  background: var(--rk-primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 14px rgba(2, 0, 126, 0.28);
  transition: background 0.2s var(--rk-ease), transform 0.15s var(--rk-ease),
    opacity 0.2s, box-shadow 0.2s;
}
.rk-send:hover:not(:disabled) { background: var(--rk-primary-hover); transform: translateY(-1px); }
.rk-send:active:not(:disabled) { transform: scale(0.94); }
.rk-send:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.rk-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 6px 0;
  font-size: 12.5px;
  color: var(--rk-muted);
}
.rk-new-chat {
  border: none;
  background: none;
  color: var(--rk-muted);
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.rk-new-chat:hover { color: var(--rk-primary); background: var(--rk-primary-soft); }

/* ==========================================================================
   17. 响应式断点
   ========================================================================== */
@media (max-width: 1024px) {
  .rk-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .rk-doc-grid { grid-template-columns: repeat(2, 1fr); }
  .rk-hero h1 { font-size: 38px; }

  /* 文档页：右留白收起，TOC 转抽屉 */
  .rk-doc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rk-toc-wrap {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    width: 300px;
    max-height: none;
    max-width: 84vw;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--rk-border);
    box-shadow: 20px 0 60px rgba(20, 20, 44, 0.2);
    transform: translateX(-105%);
    transition: transform 0.3s var(--rk-ease);
    padding-top: 30px;
  }
  body.toc-open .rk-toc-wrap { transform: translateX(0); }
  body.toc-open .rk-toc-overlay { display: block; opacity: 1; }
  .rk-toc-fab { display: inline-flex; }
}

@media (max-width: 720px) {
  .rk-container { padding: 0 18px; }
  .rk-logo-tag { display: none; }

  /* 文档正文宽表格：移动端可横向滚动，不撑破页面 */
  .doc-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .doc-content table tbody { display: table; min-width: 100%; }

  /* 导航 */
  .rk-nav-toggle { display: inline-flex; }
  .rk-nav-links {
    position: absolute;
    top: var(--rk-nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 18px 16px;
    background: #fff;
    border-bottom: 1px solid var(--rk-border);
    box-shadow: var(--rk-shadow-lg);
    display: none;
  }
  .rk-nav-links.open { display: flex; }
  .rk-nav-links a { padding: 12px 14px; }
  .rk-nav-links a.active::after { display: none; }
  .rk-nav-links a.rk-nav-cta { margin: 6px 0 0; text-align: center; }
  .rk-nav-search { display: none; } /* 移动端隐藏导航搜索，用 TOC 抽屉 */

  /* Banner */
  .rk-hero { margin-top: 20px; padding: 64px 22px 72px; }
  .rk-hero h1 { font-size: 29px; }
  .rk-hero-sub { font-size: 15px; margin-bottom: 34px; }
  .rk-ask { flex-wrap: wrap; border-radius: 22px; padding: 10px; }
  .rk-ask input { width: 100%; flex: 1 1 100%; order: 1; padding: 10px 8px; }
  .rk-ask .rk-icon { order: 0; margin-left: 10px; }
  .rk-ask button { order: 2; width: 100%; justify-content: center; }

  /* 卡片网格 */
  .rk-cat-grid, .rk-doc-grid { grid-template-columns: 1fr; }
  .rk-section { padding-top: 52px; }
  .rk-section-head h2 { font-size: 24px; }

  /* 文档页 */
  .rk-doc-paper { padding: 34px 24px 32px; border-radius: var(--rk-radius); }
  .rk-doc-head h1 { font-size: 25px; }
  .doc-content h2 { font-size: 20px; }
  .rk-prev-next { grid-template-columns: 1fr; }
  .rk-pn-card.next { text-align: left; align-items: flex-start; }

  /* Agent */
  .rk-msg-body { max-width: 86%; }
  .rk-composer-foot { flex-direction: column-reverse; align-items: flex-start; gap: 6px; }

  /* 页脚 */
  .rk-footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 380px) {
  .rk-hero h1 { font-size: 25px; }
  .rk-doc-paper { padding: 26px 18px; }
}

/* 降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   18. 生成脚本注入标记兼容
   生成脚本替换 token 时使用自己的类名：面包屑 a + span.bc-sep、
   目录 a.toc-link.toc-lv1/2/3、上一篇下一篇 .prev-next > a.pn-link。
   以下规则让它们获得与模板原生标记一致的视觉表现。
   ========================================================================== */

/* 面包屑分隔符（容器 .rk-breadcrumb 由 doc.js 自动包装） */
.rk-breadcrumb .bc-sep { color: #c9c9d8; margin: 0 2px; }
.rk-breadcrumb > span:not([class]):last-child,
.rk-breadcrumb > span.current:last-child { color: var(--rk-dark); font-weight: 600; }

/* 平铺注入的目录链接 */
.rk-toc-nav > a,
.rk-toc-nav a.toc-link {
  display: block;
  position: relative;
  padding: 7px 10px 7px 16px;
  font-size: 13.8px;
  line-height: 1.5;
  color: var(--rk-text);
  border-radius: 8px;
  border-left: 2px solid transparent;
  /* 源文档中误把整段文字设为标题时，目录项最多显示 3 行并截断 */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-all;
  transition: color 0.18s var(--rk-ease), background 0.18s var(--rk-ease),
    border-color 0.18s var(--rk-ease);
}
.rk-toc-nav > a:hover,
.rk-toc-nav a.toc-link:hover { color: var(--rk-primary); background: var(--rk-primary-soft); }
.rk-toc-nav > a.active,
.rk-toc-nav a.toc-link.active {
  color: var(--rk-primary);
  font-weight: 600;
  background: var(--rk-primary-soft);
  border-left-color: var(--rk-primary);
}
.rk-toc-nav a.toc-lv1 { font-weight: 600; color: var(--rk-dark); }
.rk-toc-nav a.toc-lv1.active { color: var(--rk-primary); }
.rk-toc-nav a.toc-lv3 { padding-left: 34px; font-size: 13px; color: var(--rk-muted); }
.rk-toc-nav a.toc-lv3:hover, .rk-toc-nav a.toc-lv3.active { color: var(--rk-primary); }

/* 上一篇 / 下一篇（生成脚本标记） */
.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 34px;
}
.pn-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  background: var(--rk-card);
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);
  box-shadow: var(--rk-shadow-sm);
  transition: transform 0.2s var(--rk-ease), box-shadow 0.2s var(--rk-ease),
    border-color 0.2s var(--rk-ease);
}
a.pn-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--rk-shadow-lg);
  border-color: rgba(2, 0, 126, 0.18);
}
.pn-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--rk-muted);
}
.pn-title { font-size: 15.5px; font-weight: 700; color: var(--rk-dark); }
a.pn-link:hover .pn-title { color: var(--rk-primary); }
.pn-link.pn-next { text-align: right; align-items: flex-end; }

@media (max-width: 720px) {
  .prev-next { grid-template-columns: 1fr; }
  .pn-link.pn-next { text-align: left; align-items: flex-start; }
}

/* ==========================================================================
   分组文档列表（开放平台等大文档量分类）
   ========================================================================== */
.rk-group-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--rk-border, #e8e8ef);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 26px 0 18px;
  color: var(--rk-muted, #9a9aa8);
  box-shadow: 0 1px 3px rgba(20, 20, 60, 0.04);
}
.rk-group-filter input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--rk-dark, #242738);
  background: transparent;
  font-family: inherit;
}
.rk-group {
  background: #fff;
  border: 1px solid var(--rk-border, #e8e8ef);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.18s ease;
}
.rk-group:hover { box-shadow: 0 4px 14px rgba(20, 20, 60, 0.06); }
.rk-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--rk-dark, #242738);
  list-style: none;
  user-select: none;
}
.rk-group summary::-webkit-details-marker { display: none; }
.rk-group summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--rk-primary, #02007e);
  border-bottom: 2px solid var(--rk-primary, #02007e);
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  flex: none;
}
.rk-group[open] summary::before { transform: rotate(45deg); }
.rk-group summary span:first-of-type { flex: 1; }
.rk-group-count {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rk-primary, #02007e);
  background: var(--rk-primary-soft, #eceaff);
  border-radius: 999px;
  padding: 2px 10px;
  flex: none;
}
.rk-group-docs {
  border-top: 1px solid var(--rk-border, #e8e8ef);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
}
.rk-group-doc {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--rk-text, #636363);
  transition: background 0.15s ease, color 0.15s ease;
}
.rk-group-doc svg { flex: none; color: var(--rk-muted, #9a9aa8); }
.rk-group-doc span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-group-doc:hover {
  background: var(--rk-primary-soft, #eceaff);
  color: var(--rk-primary, #02007e);
}
.rk-group-doc:hover svg { color: var(--rk-primary, #02007e); }
@media (max-width: 720px) {
  .rk-group-docs { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Agent 思考链路（CoT）面板
   ========================================================================== */
.rk-think {
  margin: 0 0 10px;
  background: linear-gradient(135deg, #f6f6ff 0%, #f3f4ff 100%);
  border: 1px solid #e3e3f5;
  border-radius: 12px;
  overflow: hidden;
  font-size: 13px;
}
.rk-think summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--rk-primary, #02007e);
  list-style: none;
  user-select: none;
}
.rk-think summary::-webkit-details-marker { display: none; }
.rk-think summary::after {
  content: "";
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid #9a9ac8;
  border-bottom: 1.8px solid #9a9ac8;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.rk-think[open] summary::after { transform: rotate(225deg); }
.rk-think-body {
  padding: 2px 14px 12px 14px;
  border-top: 1px dashed #e0e0f2;
}
.rk-think-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0 0;
  color: #6a6a85;
  line-height: 1.55;
}
.rk-think-step .rk-think-ico {
  flex: none;
  display: inline-flex;
  margin-top: 2px;
  color: #b0b0d0;
}
.rk-think-step.done .rk-think-ico { color: #22a06b; }
/* 数字员工办公区（Marvis 式 3D 场景：底图 + 透明角色坐进工位，姿态随状态切换） */
.rk-office-scene-wrap { margin: 8px 0 6px; }
.rk-office-title {
  font-size: 12px; font-weight: 700; color: #5b21b6;
  display: flex; align-items: center; gap: 5px; margin-bottom: 6px;
}
.rk-office-tokens { font-size: 10.5px; font-weight: 500; color: #9a9ab8; margin-left: auto; } /* token 消耗（对齐 Marvis 工作日志） */
.rk-office-scene {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e3e3f5;
  box-shadow: 0 8px 24px rgba(2, 0, 126, .10);
  background: #dfe3f2;
}
.rk-scene-bg { width: 100%; display: block; user-select: none; }
.rk-actor {
  position: absolute;
  transform: translate(-50%, -100%); /* 锚点：角色底部中心对准椅子 */
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
  aspect-ratio: 1; /* 固定容器比例：姿态切换不跳动 */
}
.rk-actor-img {
  width: 100%; height: 100%; display: block; object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 4px 6px rgba(20,20,60,.25));
}
.rk-actor[data-pose="typing"] .rk-actor-img { animation: rk-actor-type .5s ease-in-out infinite; }
.rk-actor[data-pose="reading"] .rk-actor-img { animation: rk-actor-nod 1.8s ease-in-out infinite; }
@keyframes rk-actor-type { 0%,100% { transform: translateX(0) } 25% { transform: translateX(1.5%) } 75% { transform: translateX(-1.5%) } }
@keyframes rk-actor-nod { 0%,100% { transform: translateY(0) } 50% { transform: translateY(2%) } }
.rk-actor-tag {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  background: rgba(255,255,255,.92); backdrop-filter: blur(3px);
  border: 1.5px solid #02007e; border-radius: 999px;
  padding: 3px 10px; margin-bottom: 8px;
  font-size: 11px; box-shadow: 0 2px 8px rgba(2,0,126,.12);
  transition: transform .18s ease;
}
.rk-actor-tag.bump { transform: translateX(-50%) scale(1.12); } /* 产物到达弹跳 */
.rk-actor.far .rk-actor-tag { padding: 2px 8px; font-size: 10px; margin-bottom: 5px; } /* 远工位名牌紧凑 */
.rk-actor.far .rk-actor-tag b { font-size: 10px; }
.rk-actor.far .rk-actor-status { font-size: 9.5px; }
.rk-actor-tag b { font-size: 11px; }
.rk-actor-status { font-size: 10.5px; color: #7a7a96; }
.rk-actor-count {
  display: none; font-size: 10px; font-weight: 800; color: #fff;
  background: #22a06b; border-radius: 999px; padding: 1px 7px;
}
.rk-actor-count.show { display: inline-block; }
.rk-actor[data-state="working"] .rk-actor-status { color: var(--rk-primary, #02007e); font-weight: 700; }
.rk-actor[data-state="working"] .rk-actor-status::after { content: "…"; animation: rk-actor-dots 1.2s steps(3) infinite; }
@keyframes rk-actor-dots { 0% { content: "" } 33% { content: "." } 66% { content: ".." } 100% { content: "…" } }
.rk-actor[data-state="done"] .rk-actor-status { color: #22a06b; font-weight: 700; }
.rk-actor[data-state="failed"] .rk-actor-status { color: #c0392b; font-weight: 700; }
.rk-actor[data-state="done"] .rk-actor-tag { border-color: #22a06b; }
.rk-actor[data-state="failed"] .rk-actor-tag { border-color: #c0392b; }
/* 专家气泡：流式产物实时可见（肉眼证明多专家并发） */
.rk-actor-bubble {
  position: absolute; bottom: calc(100% + 30px); left: 50%; transform: translateX(-50%);
  width: max-content; min-width: 64px; max-width: 170px;
  background: #fff; border: 1.5px solid #8f8fc8; border-radius: 12px 12px 12px 2px;
  padding: 7px 11px; font-size: 10.5px; color: #4a4a68; line-height: 1.5;
  box-shadow: 0 6px 18px rgba(2,0,126,.22);
  opacity: 0; transition: opacity .3s ease;
  word-break: break-all; text-align: left;
  z-index: 6;
}
.rk-actor-bubble.live { opacity: 1; }
.rk-actor-bubble .rk-actor-bubble-text:empty { display: none; }
.rk-actor.far .rk-actor-bubble { max-width: 170px; font-size: 9.5px; bottom: calc(100% + 24px); }
.rk-actor.far .rk-actor-bubble { display: none; } /* 远工位不冒泡（牌小，防重叠） */
/* 气泡偏向各自外侧，防盖住邻居名牌 */
.rk-actor.col-left .rk-actor-bubble { left: 20%; }
.rk-actor.col-right .rk-actor-bubble { left: auto; right: 20%; transform: none; border-radius: 12px 12px 2px 12px; }
.rk-actor-dots { display: inline-flex; gap: 4px; padding: 3px 2px; justify-content: center; width: 100%; }
.rk-actor-dots i { width: 6px; height: 6px; border-radius: 50%; background: #02007e; animation: rk-bubble-bounce 1.2s ease-in-out infinite; }
.rk-actor-dots i:nth-child(2) { animation-delay: .15s; }
.rk-actor-dots i:nth-child(3) { animation-delay: .3s; }
.rk-actor-bubble.has-text .rk-actor-dots { display: none; }
@keyframes rk-bubble-bounce { 0%,100% { transform: translateY(0); opacity: .5 } 50% { transform: translateY(-3px); opacity: 1 } }
/* 递交动画：CSS 画的文档卡片（不用 emoji，保持画风一致） */
.rk-flydoc {
  position: absolute; z-index: 5; pointer-events: none;
  width: 22px; height: 28px; background: #fff; border: 1.5px solid #0a5fb4; border-radius: 4px;
  box-shadow: 0 3px 10px rgba(2,0,126,.25);
  transform: translate(0, 0) scale(1) rotate(-6deg);
  transition: transform .9s cubic-bezier(.5,-0.1,.3,1.1), opacity .9s ease;
  padding: 4px 4px;
  display: flex; flex-direction: column; gap: 3px;
}
.rk-flydoc i { display: block; height: 2.5px; border-radius: 2px; background: #c9d4f5; }
.rk-flydoc i:first-child { width: 80%; background: #0a5fb4; height: 3px; }
/* 工位显示器内容动画（叠加在场景显示器上，实时变化） */
.rk-screen {
  position: absolute; z-index: 1; overflow: hidden; border-radius: 3px;
  pointer-events: none; display: none;
}
.rk-screen i { display: none; }
.rk-screen.off { display: none; }
.rk-screen.work, .rk-screen.search, .rk-screen.charts, .rk-screen.done, .rk-screen.game { display: block; }
/* 作答中：柔和亮色代码行缓缓上移（底色与原显示器蓝一致，不突兀） */
.rk-screen.work {
  background: linear-gradient(160deg, #2b86e3, #1a63c8);
}
.rk-screen.work::before {
  content: ""; position: absolute; inset: 14% 10%;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.55) 0 2px, transparent 2px 10px);
  animation: rk-screen-scroll 2.4s linear infinite;
}
@keyframes rk-screen-scroll { from { background-position: 0 0 } to { background-position: 0 -40px } }
/* 检索中：同款蓝底 + 一道柔光扫过 */
.rk-screen.search { background: linear-gradient(160deg, #2b86e3, #1a63c8); }
.rk-screen.search::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  animation: rk-screen-scan 2s ease-in-out infinite;
}
@keyframes rk-screen-scan { 0% { transform: translateX(-100%) } 100% { transform: translateX(100%) } }
/* 主理人整合：浅色图表柱跳动 */
.rk-screen.charts { background: linear-gradient(160deg, #2b86e3, #1a63c8); display: flex !important; align-items: flex-end; gap: 8%; padding: 6% 8%; }
.rk-screen.charts i { display: block; flex: 1; background: rgba(255,255,255,.85); border-radius: 1px; animation: rk-bar-bounce 1s ease-in-out infinite; }
.rk-screen.charts i:nth-child(1) { height: 40%; animation-delay: 0s; }
.rk-screen.charts i:nth-child(2) { height: 70%; animation-delay: .15s; }
.rk-screen.charts i:nth-child(3) { height: 55%; animation-delay: .3s; }
.rk-screen.charts i:nth-child(4) { height: 85%; animation-delay: .45s; }
.rk-screen.charts i:nth-child(5) { height: 60%; animation-delay: .6s; }
@keyframes rk-bar-bounce { 0%,100% { transform: scaleY(1) } 50% { transform: scaleY(.55) } }
/* 完成：绿勾 */
.rk-screen.done { background: #127a43; }
.rk-screen.done::after {
  content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #7dffb8; font-weight: 900; font-size: 20px;
}
/* 完工打游戏：彩色柔和流动 */
.rk-screen.game {
  background: linear-gradient(135deg, #ff8a9b, #ffd29d, #9d9dff, #7de8b4, #8fe8e0);
  background-size: 300% 300%;
  animation: rk-screen-game 2.6s ease-in-out infinite;
}
@keyframes rk-screen-game { 0% { background-position: 0% 0% } 50% { background-position: 100% 100% } 100% { background-position: 0% 0% } }
.rk-think-hits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 2px 22px;
}
.rk-think-hit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid #e8e8f5;
  border-radius: 9px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}
.rk-think-hit:hover {
  border-color: var(--rk-primary, #02007e);
  box-shadow: 0 2px 8px rgba(2, 0, 126, 0.08);
}
.rk-think-hit-cat {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--rk-primary, #02007e);
  background: var(--rk-primary-soft, #eceaff);
  border-radius: 999px;
  padding: 2px 8px;
}
.rk-think-hit-title {
  font-size: 13px;
  color: var(--rk-dark, #242738);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rk-think-hit-head {
  color: #9a9ab0;
  font-weight: 400;
  font-size: 12px;
}

/* ==========================================================================
   Agent 停止生成按钮 / 停止提示
   ========================================================================== */
.rk-stop-btn {
  display: none;
  align-items: center;
  gap: 5px;
  border: 1px solid #e0b6b6;
  background: #fff5f5;
  color: #c0392b;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  font-family: inherit;
  white-space: nowrap;
}
.rk-stop-btn:hover { background: #ffeaea; }
.rk-stop-btn:active { transform: scale(0.96); }
.rk-stopped-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12.5px;
  color: #b58900;
  background: #fffbe8;
  border: 1px solid #f0e3b0;
  border-radius: 8px;
  padding: 6px 10px;
  width: fit-content;
}

/* 思考面板：子问题拆解列表 */
.rk-think-subs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 2px 22px;
  padding: 8px 12px;
  background: #fff;
  border: 1px dashed #d8d8ee;
  border-radius: 9px;
  font-size: 12.5px;
  color: #5a5a78;
}
.rk-think-subs span {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.5;
}
.rk-think-subs span::before {
  content: "›";
  color: var(--rk-primary, #02007e);
  font-weight: 700;
}

/* ==========================================================================
   三 Agent 切换器
   ========================================================================== */
.rk-agent-switch {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 26px 16px 14px;
  margin-bottom: 24px;
  background: var(--rk-bg);
  border-bottom: 1px solid var(--rk-border);
}
.rk-agent-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid #e2e2ee;
  background: #fff;
  color: #55556a;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.16s ease;
}
.rk-agent-tab:hover { border-color: var(--rk-primary, #02007e); color: var(--rk-primary, #02007e); }
.rk-agent-tab.active {
  border-color: var(--rk-primary, #02007e);
  background: var(--rk-primary-soft, #eceaff);
  color: var(--rk-primary, #02007e);
  box-shadow: 0 2px 8px rgba(2, 0, 126, 0.10);
}
.rk-agent-tab-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Agent 选择器：对话框左下方弹层 */
.rk-agent-picker { position: relative; flex: none; }
.rk-agent-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--rk-border-strong);
  background: #fff;
  color: #55556a;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.rk-agent-picker-btn:hover { border-color: var(--rk-primary, #02007e); color: var(--rk-primary, #02007e); }
.rk-agent-picker-btn[aria-expanded="true"] {
  border-color: var(--rk-primary, #02007e);
  color: var(--rk-primary, #02007e);
  background: var(--rk-primary-soft, #eceaff);
}
.rk-agent-picker-caret { font-size: 10px; color: var(--rk-muted); }
.rk-agent-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 900;
  display: none;
  min-width: 168px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--rk-border);
  border-radius: 14px;
  box-shadow: var(--rk-shadow-lg, 0 24px 64px rgba(2,0,126,.2));
}
.rk-agent-menu.open { display: block; }
.rk-agent-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: none;
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  color: var(--rk-dark);
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease;
}
.rk-agent-menu-item:hover { background: var(--rk-primary-soft, #eceaff); }
.rk-agent-menu-item.active { font-weight: 600; color: var(--rk-primary, #02007e); }
.rk-agent-menu-tick { margin-left: auto; display: inline-flex; color: var(--rk-primary, #02007e); }

/* 思考计时器 / 生成占位提示 */
.rk-think-timer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e0e0f2;
  font-size: 12px;
  color: #9a9ac0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rk-think-timer::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22a06b;
  animation: rk-pulse 1.2s ease-in-out infinite;
}
.rk-gen-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #9a9ac0;
  font-size: 13.5px;
  animation: rk-pulse 1.4s ease-in-out infinite;
}
@keyframes rk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ==========================================================================
   深度思考开关 / 推理过程流式展示 / 输入区底部布局
   ========================================================================== */
.rk-composer-foot > span { margin-right: auto; }
.rk-deep-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--rk-border-strong);
  background: #fff;
  color: #55556a;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.rk-deep-toggle:hover { border-color: var(--rk-primary, #02007e); color: var(--rk-primary, #02007e); }
.rk-deep-toggle.on {
  border-color: var(--rk-primary, #02007e);
  color: var(--rk-primary, #02007e);
  background: var(--rk-primary-soft, #eceaff);
  box-shadow: 0 2px 8px rgba(2, 0, 126, 0.10);
}
/* 深度咨询开启确认弹窗 */
.rk-consult-modal .rk-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b45309;
}
.rk-consult-modal-body { font-size: 13.5px; color: var(--rk-dark); line-height: 1.7; margin-bottom: 16px; }
.rk-consult-modal-body p { margin: 0; }
.rk-consult-modal-body ul { margin: 10px 0 0; padding-left: 18px; }
.rk-consult-modal-body li { margin-bottom: 6px; }
.rk-modal-btn.amber { background: #b45309; border-color: #b45309; color: #fff; }
.rk-modal-btn.amber:hover { filter: brightness(1.12); }

/* 深度思考：模型推理过程实时展示块 */
.rk-think-reason {
  margin: 8px 0 2px 22px;
  padding: 9px 12px;
  background: #fff;
  border: 1px dashed #d8d8ee;
  border-radius: 9px;
  font-size: 12.5px;
  color: #6a6a85;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  max-height: 180px;
  overflow-y: auto;
}

/* ---------- 回答操作栏（有用/不准/海报/分享） ---------- */
.rk-ans-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--rk-border);
  flex-wrap: wrap;
}
.rk-ans-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 12.5px;
  color: var(--rk-muted);
  background: #fff;
  border: 1px solid var(--rk-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s var(--rk-ease, ease);
}
.rk-ans-btn:hover { color: var(--rk-primary); border-color: var(--rk-primary); transform: translateY(-1px); }
.rk-ans-btn:disabled { cursor: default; opacity: 0.85; }
.rk-ans-btn.voted { color: var(--rk-primary); border-color: var(--rk-primary); background: rgba(2, 0, 126, 0.06); }
.rk-ans-btn svg { flex: none; }

/* ---------- 轻提示 ---------- */
.rk-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 22px;
  background: rgba(16, 16, 36, 0.92);
  color: #fff;
  font-size: 13.5px;
  border-radius: 999px;
  box-shadow: var(--rk-shadow-lg, 0 12px 32px rgba(2,0,126,.18));
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  pointer-events: none;
}
.rk-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 首页厂商分组 ---------- */
.rk-vendor { grid-column: 1 / -1; margin-top: 40px; }
.rk-vendor:first-child { margin-top: 0; }
.rk-vendor-head { margin-bottom: 18px; }
.rk-vendor-title { display: flex; align-items: baseline; gap: 12px; }
.rk-vendor-title h2 {
  font-size: 22px;
  color: var(--rk-dark);
  letter-spacing: 0.01em;
}
.rk-vendor-title h2::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 20px;
  margin-right: 10px;
  border-radius: 3px;
  background: var(--rk-primary);
  vertical-align: -3px;
}
.rk-vendor-total {
  font-size: 12.5px;
  color: var(--rk-primary);
  background: rgba(2, 0, 126, 0.07);
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.rk-vendor-head p { margin-top: 6px; font-size: 13.5px; color: var(--rk-muted); }
.rk-vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

/* ---------- 文档互动区（点赞/评论/分享/相关推荐） ---------- */
.rk-doc-engage {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--rk-border);
}
.rk-engage-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rk-engage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13.5px;
  color: var(--rk-muted);
  background: #fff;
  border: 1px solid var(--rk-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s var(--rk-ease, ease);
}
.rk-engage-btn:hover { color: var(--rk-primary); border-color: var(--rk-primary); transform: translateY(-1px); box-shadow: var(--rk-shadow-sm); }
.rk-engage-btn.voted { color: #fff; background: var(--rk-primary); border-color: var(--rk-primary); }
.rk-engage-btn:disabled { opacity: 0.7; cursor: default; }
.rk-engage-btn .rk-icon { display: inline-flex; }
.rk-engage-sep { flex: 1; }

.rk-comment-list { margin-top: 20px; }
.rk-comment {
  padding: 14px 18px;
  background: var(--rk-bg-soft, #f7f7fb);
  border-radius: 12px;
  margin-bottom: 10px;
}
.rk-comment-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--rk-muted); margin-bottom: 6px; }
.rk-comment-head b { color: var(--rk-dark); font-size: 13.5px; }
.rk-comment p { font-size: 14px; color: #2c2c3e; line-height: 1.7; white-space: pre-wrap; overflow-wrap: break-word; }
.rk-comment-empty { font-size: 13px; color: var(--rk-muted); }

.rk-related { margin-top: 28px; }
.rk-related-title { font-size: 17px; color: var(--rk-dark); margin-bottom: 14px; }
.rk-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.rk-related-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--rk-border);
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--rk-dark);
  transition: all 0.18s var(--rk-ease, ease);
}
.rk-related-card:hover { border-color: var(--rk-primary); box-shadow: var(--rk-shadow-sm); transform: translateY(-2px); }
.rk-related-doc { color: var(--rk-primary); display: inline-flex; flex: none; }

/* ---------- 通用弹框 ---------- */
.rk-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 26, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.rk-modal.open { display: flex; }
.rk-modal-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 18px;
  padding: 28px 28px 22px;
  box-shadow: var(--rk-shadow-lg, 0 24px 64px rgba(2,0,126,.2));
}
.rk-modal-title { font-size: 18px; color: var(--rk-dark); margin-bottom: 18px; }
.rk-modal-label { display: block; font-size: 13px; color: var(--rk-muted); margin-bottom: 14px; }
.rk-modal-ipt {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 14px;
  border: 1px solid var(--rk-border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--rk-dark);
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}
.rk-modal-ipt:focus { border-color: var(--rk-primary); }
.rk-modal-ipt.rk-ipt-err { border-color: #d32f2f; }
textarea.rk-modal-ipt { resize: vertical; min-height: 96px; }
.rk-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.rk-modal-btn {
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  cursor: pointer;
  border: 1px solid var(--rk-border);
  background: #fff;
  color: var(--rk-muted);
  transition: all 0.15s ease;
}
.rk-modal-btn.primary { background: var(--rk-primary); border-color: var(--rk-primary); color: #fff; }
.rk-modal-btn.primary:hover { filter: brightness(1.12); }
.rk-modal-btn.ghost:hover { color: var(--rk-dark); }

/* ---------- v1.1 更新公告 ---------- */
.rk-announce-card { max-width: 560px; }
.rk-announce-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--rk-primary);
  background: rgba(2, 0, 126, 0.08);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.rk-announce-title { font-size: 22px; color: var(--rk-dark); margin-bottom: 16px; }
.rk-announce-list { list-style: none; padding: 0; margin: 0 0 20px; }
.rk-announce-list li {
  position: relative;
  padding: 10px 0 10px 26px;
  font-size: 14px;
  line-height: 1.7;
  color: #2c2c3e;
  border-bottom: 1px dashed var(--rk-border);
}
.rk-announce-list li:last-child { border-bottom: none; }
.rk-announce-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rk-primary);
  opacity: 0.85;
}
.rk-announce-list b { color: var(--rk-dark); }
.rk-announce-btn { width: 100%; padding: 12px; font-size: 14.5px; }

/* ---------- 海报预览弹窗 ---------- */
.rk-poster-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 22, 0.62);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.rk-poster-modal.open { opacity: 1; }
.rk-poster-dialog {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(2, 0, 126, 0.28);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}
.rk-poster-modal.open .rk-poster-dialog { transform: none; }
.rk-poster-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--rk-dark);
  border-bottom: 1px solid var(--rk-border);
}
.rk-poster-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--rk-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.rk-poster-close:hover { background: var(--rk-bg-soft, #f2f2f8); color: var(--rk-dark); }
.rk-poster-body {
  overflow: auto;
  padding: 18px;
  background: var(--rk-bg-soft, #f7f7fb);
  text-align: center;
}
.rk-poster-body img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(2, 0, 126, 0.14);
}
.rk-poster-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--rk-border);
}
.rk-poster-dl {
  padding: 9px 26px;
  border: none;
  border-radius: 999px;
  background: var(--rk-primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.rk-poster-dl:hover { filter: brightness(1.12); }
.rk-poster-tip { font-size: 12px; color: var(--rk-muted); }
@media (max-width: 540px) {
  .rk-poster-modal { padding: 12px; }
  .rk-poster-foot { flex-direction: column; }
}

/* ---------- 海报生成加载层 ---------- */
.rk-poster-loading {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 22, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1190;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.rk-poster-loading.open { opacity: 1; }
.rk-pl-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 34px 44px 28px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 28px 72px rgba(2, 0, 126, 0.26);
}
.rk-pl-poster {
  width: 148px;
  height: 196px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--rk-border);
  box-shadow: var(--rk-shadow-sm);
  overflow: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rk-pl-band {
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(100deg, #02007e 20%, #0a5fb4 40%, #02007e 60%);
  background-size: 220% 100%;
  animation: rkPlBand 1.6s linear infinite;
}
@keyframes rkPlBand { to { background-position: -220% 0; } }
.rk-pl-line {
  height: 9px;
  border-radius: 5px;
  background: linear-gradient(100deg, #ececf4 30%, #f7f7fc 50%, #ececf4 70%);
  background-size: 220% 100%;
  animation: rkPlBand 1.6s linear infinite;
}
.rk-pl-line.w80 { width: 80%; }
.rk-pl-line.w70 { width: 70%; animation-delay: 0.1s; }
.rk-pl-line.w60 { width: 60%; animation-delay: 0.2s; }
.rk-pl-line.w45 { width: 45%; animation-delay: 0.3s; }
.rk-pl-text { font-size: 15px; font-weight: 600; color: var(--rk-dark); }
.rk-pl-dots i { font-style: normal; animation: rkPlDot 1.2s infinite; }
.rk-pl-dots i:nth-child(2) { animation-delay: 0.2s; }
.rk-pl-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes rkPlDot { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.rk-pl-step { font-size: 12.5px; color: var(--rk-muted); min-height: 18px; }
.rk-pl-step.swap { animation: rkPlSwap 0.5s ease; }
@keyframes rkPlSwap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Agent 主动澄清选项卡 ---------- */
.rk-clarify { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rk-clarify-chip {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--rk-primary);
  background: #fff;
  color: var(--rk-primary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.rk-clarify-chip:hover {
  background: var(--rk-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(2, 0, 126, 0.22);
}

/* ---------- 文档页"问 Agent"按钮 + Agent 页文档上下文条 ---------- */
.rk-engage-ask { text-decoration: none; }
.rk-engage-ask:hover { background: var(--rk-primary); color: #fff; border-color: var(--rk-primary); }
.rk-doc-context {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 14px;
  background: rgba(2, 0, 126, 0.06);
  border: 1px solid rgba(2, 0, 126, 0.16);
  border-radius: 12px;
  font-size: 12.5px;
}
.rk-doc-context-tag { color: var(--rk-primary); display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.rk-doc-context-x {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--rk-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 6px;
}
.rk-doc-context-x:hover { color: var(--rk-dark); background: rgba(2,0,126,.08); }

/* ==========================================================================
   设计系统 v2 —— 质感升级（2026-08）
   全部为增量层：新变量 + 新工具类，不改写既有组件；各页面按需 opt-in。
   白底蓝主题：页面底色仍 #f9f9f9 / 卡片白 / 主色 #02007e，青色仅作高光点缀。
   ========================================================================== */

/* ---------- v2 设计变量 ---------- */
:root {
  /* 点缀色：青（高光）与金（荣誉/热门），用量克制 */
  --rk-cyan: #22d3ee;
  --rk-cyan-deep: #0891b2;
  --rk-cyan-soft: rgba(34, 211, 238, 0.12);
  --rk-gold: #f0b429;
  --rk-gold-soft: rgba(240, 180, 41, 0.14);

  /* 品牌渐变 */
  --rk-grad-brand: linear-gradient(120deg, #02007e 0%, #1d19b8 55%, #3531c9 100%);
  --rk-grad-accent: linear-gradient(120deg, #4d6fff 0%, #22d3ee 100%);
  --rk-grad-text: linear-gradient(92deg, #02007e 20%, #3531c9 55%, #0a5fb4 90%);

  /* 品牌调边框与发光阴影（替代纯灰边的单调感） */
  --rk-border-brand: rgba(2, 0, 126, 0.09);
  --rk-border-brand-strong: rgba(2, 0, 126, 0.16);
  --rk-shadow-lift: 0 14px 40px rgba(2, 0, 126, 0.12);
  --rk-shadow-glow: 0 8px 30px rgba(34, 211, 238, 0.18);

  /* 噪点纹理（data-URI，零请求；叠在 Hero / 深色带上增加质感） */
  --rk-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- v2 动效基元 ---------- */
@keyframes rkFadeUp { from { opacity: 0; transform: translateY(18px); } }
@keyframes rkSheen {
  0% { transform: translateX(-120%) skewX(-18deg); }
  100% { transform: translateX(240%) skewX(-18deg); }
}
@keyframes rkMeshDrift {
  0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%; }
  50% { background-position: 12% 8%, 88% 92%, 50% 50%; }
}
@keyframes rkFloatY { 50% { transform: translateY(-10px); } }
@keyframes rkGlowPulse { 50% { box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.1), var(--rk-shadow-glow); } }

/* 滚动入场：元素加 .rk-reveal，可用 style="--d:120ms" 级联延迟；JS 进入视口后加 .in */
.rk-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--rk-ease), transform 0.6s var(--rk-ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.rk-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rk-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- v2 卡片质感：顶部高光 + 渐变描边 + 光泽扫过 ---------- */
.rk-card-v2 {
  position: relative;
  background: var(--rk-card);
  border: 1px solid var(--rk-border-brand);
  border-radius: 16px;
  box-shadow: var(--rk-shadow-sm);
  transition: transform 0.28s var(--rk-ease), box-shadow 0.28s var(--rk-ease),
    border-color 0.28s var(--rk-ease);
  overflow: hidden;
}
.rk-card-v2::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--rk-grad-accent);
  opacity: 0;
  transition: opacity 0.28s var(--rk-ease);
  z-index: 1;
}
.rk-card-v2::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: translateX(-120%) skewX(-18deg);
  pointer-events: none;
}
.rk-card-v2:hover {
  transform: translateY(-4px);
  border-color: var(--rk-border-brand-strong);
  box-shadow: var(--rk-shadow-lift);
}
.rk-card-v2:hover::before { opacity: 1; }
.rk-card-v2:hover::after { animation: rkSheen 0.9s var(--rk-ease); }

/* ---------- v2 按钮：渐变主按钮 + 光泽 ---------- */
.rk-btn-v2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: 12px;
  background: var(--rk-grad-brand);
  background-size: 160% 100%;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(2, 0, 126, 0.24);
  transition: background-position 0.3s var(--rk-ease), transform 0.18s var(--rk-ease),
    box-shadow 0.25s var(--rk-ease);
}
.rk-btn-v2:hover {
  background-position: 85% 0;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(2, 0, 126, 0.3);
}
.rk-btn-v2:active { transform: scale(0.97); }

/* ---------- v2 眉题 / 渐变标题 / 高亮 ---------- */
.rk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--rk-primary);
  background: linear-gradient(120deg, rgba(2, 0, 126, 0.07), rgba(34, 211, 238, 0.1));
  border: 1px solid var(--rk-border-brand);
  border-radius: 999px;
  padding: 6px 15px;
}
.rk-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rk-cyan);
  box-shadow: 0 0 8px var(--rk-cyan);
}
.rk-gradient-text {
  background: var(--rk-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
mark {
  background: linear-gradient(180deg, transparent 62%, rgba(77, 111, 255, 0.22) 62%);
  color: var(--rk-primary-deep);
  border-radius: 2px;
  padding: 0 1px;
}

/* ---------- v2 导航：滚动加深 + 激活指示条动效 ---------- */
.rk-nav { transition: box-shadow 0.25s var(--rk-ease), border-color 0.25s var(--rk-ease); }
.rk-nav.scrolled {
  box-shadow: 0 6px 24px rgba(2, 0, 126, 0.09);
  border-bottom-color: transparent;
}
.rk-nav-links a:not(.rk-nav-cta)::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--rk-grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--rk-ease);
}
.rk-nav-links a:hover::after,
.rk-nav-links a.active::after { transform: scaleX(1); }
.rk-nav-links a.active::after { background: var(--rk-primary); }

/* ---------- v2 首页 Hero：噪点质感（叠加在既有渐变之上） ---------- */
.rk-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--rk-noise);
  opacity: 0.16;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ---------- v2 首页分类卡：主题海报带 ---------- */
.rk-cat-card { padding: 0 0 20px; }
.rk-cat-band {
  display: block;
  height: 118px;
  background-size: cover;
  background-position: center;
  position: relative;
  transition: transform 0.45s var(--rk-ease);
  transform-origin: center;
}
a.rk-cat-card:hover .rk-cat-band { transform: scale(1.05); }
.rk-cat-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 0, 126, 0) 50%, rgba(2, 0, 126, 0.3));
  transition: opacity 0.25s var(--rk-ease);
}
.rk-cat-card .rk-cat-icon {
  margin: -26px 0 14px 24px;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(2, 0, 126, 0.18);
}
.rk-cat-card h3 { margin: 0 24px 8px; }
.rk-cat-card > p { margin: 0 24px 18px; }
.rk-cat-card .rk-cat-foot { margin: auto 24px 0; }
.rk-cat-card.coming-soon .rk-cat-band { filter: grayscale(0.75) opacity(0.5); }

/* 厂商分组头：字号与层次加强 */
.rk-vendor-head h2 {
  background: var(--rk-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* ---------- v2 分类页 Hero：主题海报带 ---------- */
.rk-cat-hero-v2 {
  position: relative;
  border-radius: var(--rk-radius-lg);
  overflow: hidden;
  background: #050838 center/cover no-repeat;
  margin: 6px 0 34px;
  box-shadow: var(--rk-shadow-lg);
  animation: rkFadeUp 0.5s var(--rk-ease);
}
.rk-cat-hero-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 300px at 80% 0%, rgba(34, 211, 238, 0.14), transparent 55%),
    linear-gradient(90deg, rgba(4, 6, 46, 0.82) 0%, rgba(4, 6, 46, 0.55) 55%, rgba(4, 6, 46, 0.28) 100%);
}
.rk-cat-hero-v2::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--rk-noise);
  opacity: 0.13;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.rk-cat-hero-v2-in {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 46px 42px;
}
.rk-cat-hero-v2 .rk-cat-icon {
  width: 62px;
  height: 62px;
  margin: 4px 0 0;
  border-radius: 16px;
  flex: none;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rk-cat-hero-v2 h1 { font-size: 32px; margin-bottom: 8px; color: #fff; }
.rk-cat-hero-v2 p { font-size: 15.5px; max-width: 640px; color: rgba(232, 232, 245, 0.82); }
.rk-cat-hero-v2 .rk-cat-count {
  margin-top: 12px;
  display: inline-flex;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #9be9f7;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
}
@media (max-width: 800px) {
  .rk-cat-hero-v2-in { padding: 32px 22px; }
  .rk-cat-hero-v2 h1 { font-size: 24px; }
}

/* ---------- v2 首页提问框：渐变主按钮 ---------- */
.rk-ask button {
  background: var(--rk-grad-brand);
  background-size: 160% 100%;
  transition: background-position 0.3s var(--rk-ease), transform 0.15s var(--rk-ease),
    box-shadow 0.25s var(--rk-ease);
}
.rk-ask button:hover { background-position: 85% 0; box-shadow: 0 8px 22px rgba(2, 0, 126, 0.32); }
