/* ==========================================================================
   ruiyiwang.cn — 全站样式表
   开发者文档风格论坛：冷白底、等宽字体标签、蓝绿状态色、左侧固定导航
   ========================================================================== */

/* --------------------------------------------------------------------------
   base — 基础重置与全局变量
   -------------------------------------------------------------------------- */

:root {
  --color-bg: #f7f8fa;
  --color-card: #ffffff;
  --color-teal: #0d9488;
  --color-teal-dark: #0f766e;
  --color-blue: #3b82f6;
  --color-blue-dark: #2563eb;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-text-light: #9ca3af;
  --color-border: #e5e7eb;
  --color-border-dark: #d1d5db;
  --color-green: #16a34a;
  --color-amber: #d97706;
  --color-red: #dc2626;
  --color-teal-bg: #f0fdfa;
  --color-blue-bg: #eff6ff;
  --color-green-bg: #f0fdf4;
  --color-amber-bg: #fffbeb;
  --color-red-bg: #fef2f2;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono",
    Menlo, monospace;

  --header-height: 56px;
  --sidebar-width: 260px;
  --content-max: 960px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-teal-dark);
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* --------------------------------------------------------------------------
   layout — 全站骨架：页头、侧栏、主体、页脚
   -------------------------------------------------------------------------- */

/* 页头 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--color-card);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
  max-width: 1440px;
  margin: 0 auto;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.brand-link:hover {
  color: var(--color-teal);
}

.brand-name {
  white-space: nowrap;
}

/* 导航按钮（移动端） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-card);
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* 顶部主导航（桌面显示） */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li {
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  line-height: 1.4;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  color: var(--color-teal);
  background-color: var(--color-teal-bg);
}

.nav-link.is-current {
  color: var(--color-teal);
  background-color: var(--color-teal-bg);
  font-weight: 600;
}

/* 布局外壳 */
.layout-shell {
  display: flex;
  align-items: flex-start;
  max-width: 1440px;
  margin: 0 auto;
  padding-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* 侧栏（桌面固定） */
.sidebar,
.sidebar-nav,
.site-sidebar {
  flex-shrink: 0;
  width: var(--sidebar-width);
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  background-color: var(--color-card);
  border-right: 1px solid var(--color-border);
  padding: 24px 16px;
}

.sidebar-inner,
.sidebar-sticky {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-label,
.side-nav-title,
.side-info-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

/* 侧栏导航列表 */
.sidebar-nav ul,
.sidebar-list,
.side-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link,
.side-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  line-height: 1.4;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover,
.side-nav-link:hover {
  color: var(--color-teal);
  background-color: var(--color-teal-bg);
}

.sidebar-link.is-current,
.side-nav-link.is-current {
  color: var(--color-teal);
  background-color: var(--color-teal-bg);
  font-weight: 600;
}

.sidebar-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-light);
  min-width: 22px;
}

/* 侧栏底部信息 */
.sidebar-community,
.sidebar-status,
.side-info,
.sidebar-info {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-green);
  margin-right: 6px;
}

.sidebar-community {
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}

.sidebar-note,
.side-info-text,
.sidebar-info-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.sidebar-info-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.status-text {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-left: 4px;
}

/* 主体区域 */
.site-main {
  flex: 1;
  min-width: 0;
  padding: 32px 40px 48px;
}

.home-main {
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.inner-main {
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-teal);
}

.breadcrumb-sep {
  color: var(--color-text-light);
  font-family: var(--font-mono);
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--color-border);
  background-color: var(--color-card);
  margin-top: 0;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 40px 40px;
}

.footer-brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.footer-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 16px;
}

.footer-link {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 4px 0;
}

.footer-link:hover {
  color: var(--color-teal);
}

.footer-copy {
  font-size: 12px;
  color: var(--color-text-light);
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   components — 通用组件
   -------------------------------------------------------------------------- */

/* 页面标题区 */
.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
  margin-bottom: 8px;
}

.page-description,
.page-desc {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 720px;
}

.page-desc {
  margin-bottom: 8px;
}

/* 状态徽章 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  background-color: var(--color-teal-bg);
  color: var(--color-teal);
  border: 1px solid rgba(13, 148, 136, 0.2);
  margin-top: 12px;
}

.status-badge.status-green,
.status-badge.status-ok {
  background-color: var(--color-green-bg);
  color: var(--color-green);
  border-color: rgba(22, 163, 74, 0.2);
}

.status-badge.status-open {
  background-color: var(--color-blue-bg);
  color: var(--color-blue);
  border-color: rgba(59, 130, 246, 0.2);
}

/* 区块标题 */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-teal);
  display: inline-block;
}

.section-intro {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  max-width: 720px;
}

.section-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.section-note {
  font-size: 13px;
  color: var(--color-text-muted);
  background-color: var(--color-teal-bg);
  border-left: 3px solid var(--color-teal);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 16px;
}

/* 内容区块 */
.content-section {
  margin-bottom: 40px;
}

/* 标签 */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.tag-teal {
  background-color: var(--color-teal-bg);
  color: var(--color-teal);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.tag-blue {
  background-color: var(--color-blue-bg);
  color: var(--color-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.tag-green {
  background-color: var(--color-green-bg);
  color: var(--color-green);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

/* 表格通用 */
.table-wrap {
  overflow-x: auto;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.compare-table,
.topic-table,
.permission-table {
  width: 100%;
  font-size: 14px;
}

.compare-table th,
.compare-table td,
.topic-table th,
.topic-table td,
.permission-table th,
.permission-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  line-height: 1.6;
}

.compare-table thead th,
.topic-table thead th,
.permission-table thead th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background-color: var(--color-bg);
}

.compare-table tbody tr:last-child td,
.topic-table tbody tr:last-child td,
.permission-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr:hover,
.topic-table tbody tr:hover,
.permission-table tbody tr:hover {
  background-color: var(--color-teal-bg);
}

.table-caption {
  caption-side: top;
  text-align: left;
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 12px 16px;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
}

.table-note {
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 8px;
  font-family: var(--font-mono);
}

/* 相关卡片 */
.related-grid,
.entry-grid {
  display: grid;
  gap: 16px;
}

.related-card,
.entry-card {
  display: block;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.related-card:hover,
.entry-card:hover {
  border-color: var(--color-teal);
  box-shadow: var(--shadow-md);
}

.related-card-title,
.entry-card-title,
.related-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
  line-height: 1.5;
}

.related-card-desc,
.related-card-text,
.entry-card-text,
.entry-desc,
.related-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.related-card-text,
.related-text {
  display: block;
}

.entry-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 8px;
}

.entry-code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-teal);
  background-color: var(--color-teal-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.entry-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.entry-desc {
  display: block;
}

/* 相关链接行 */
.related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 16px 0;
  border-top: 1px solid var(--color-border);
  margin-top: 32px;
}

.related-links-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.related-links-item {
  font-size: 13px;
}

/* 图片容器 */
figure {
  margin: 0;
}

figcaption {
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 8px 4px 0;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   pages — 首页
   -------------------------------------------------------------------------- */

/* Hero 区 */
.hero-section {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.hero-slogan {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-teal);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.hero-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-card);
  background-color: var(--color-teal);
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
  min-height: 44px;
}

.hero-link:hover {
  background-color: var(--color-teal-dark);
  color: var(--color-card);
}

.hero-link-secondary {
  background-color: var(--color-card);
  color: var(--color-teal);
  border: 1px solid var(--color-teal);
}

.hero-link-secondary:hover {
  background-color: var(--color-teal-bg);
  color: var(--color-teal-dark);
}

.hero-media {
  min-width: 0;
}

.hero-figure {
  margin-bottom: 16px;
}

.hero-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* 近期动态 */
.mini-activity {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.mini-activity-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mini-activity-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-activity-list li {
  font-size: 13px;
  color: var(--color-text-muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

.mini-activity-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-teal);
}

/* 精选推荐 */
.featured-section {
  margin-bottom: 40px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.featured-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.featured-card:hover {
  border-color: var(--color-teal);
  box-shadow: var(--shadow-md);
}

.card-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-bottom: 1px solid var(--color-border);
}

.card-content {
  padding: 14px 16px 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin: 8px 0 6px;
  line-height: 1.5;
}

.card-excerpt {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reply-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-teal);
  font-weight: 500;
}

/* 版块对比表 */
.board-compare-section {
  margin-bottom: 40px;
}

/* 最新动态 */
.latest-section {
  margin-bottom: 40px;
}

.latest-list {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.latest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.15s ease;
}

.latest-item:last-child {
  border-bottom: none;
}

.latest-item:hover {
  background-color: var(--color-teal-bg);
}

.latest-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-link:hover {
  color: var(--color-teal);
}

.latest-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-light);
  white-space: nowrap;
  flex-shrink: 0;
}

/* 专题入口 */
.topic-entries-section {
  margin-bottom: 40px;
}

.entry-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* --------------------------------------------------------------------------
   pages — 新手指南 guide
   -------------------------------------------------------------------------- */

.page-media {
  margin-bottom: 32px;
}

.page-media img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

/* 版块导览列表 */
.overview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: overview;
}

.overview-item {
  display: flex;
  gap: 14px;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: border-color 0.15s ease;
}

.overview-item:hover {
  border-color: var(--color-teal);
}

.item-index {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-teal);
  background-color: var(--color-teal-bg);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.item-body {
  min-width: 0;
}

.item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.item-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* 步骤列表 */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: steps;
}

.step-item {
  display: flex;
  gap: 14px;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.step-mark {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-blue);
  background-color: var(--color-blue-bg);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-body {
  min-width: 0;
}

.step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.step-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* 权限表 */
.permission-table th,
.permission-table td {
  text-align: left;
}

/* 新手提示 */
.tips-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tip-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.tip-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-amber);
  background-color: var(--color-amber-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  margin-top: 2px;
}

.tip-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.text-link {
  font-size: 13px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   pages — 观看交流 board
   -------------------------------------------------------------------------- */

/* 置顶规则条 */
.sticky-rules {
  margin-bottom: 32px;
}

.sticky-rule-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: var(--color-amber-bg);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-left: 3px solid var(--color-amber);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.sticky-rule-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-amber);
  background-color: var(--color-card);
  border: 1px solid rgba(217, 119, 6, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  white-space: nowrap;
}

.sticky-rule-text {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.6;
}

/* 主题表 */
.topic-flow {
  margin-bottom: 32px;
}

.topic-table-wrap {
  overflow-x: auto;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.tag-item {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--color-bg);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* 参与入口 */
.join-entry .entry-grid {
  grid-template-columns: repeat(2, 1fr);
}

.join-entry .entry-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

/* 版块说明 */
.board-intro {
  margin-bottom: 32px;
}

.intro-media {
  margin-bottom: 16px;
}

.board-figure img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.intro-text {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
  max-width: 720px;
}

.intro-text a {
  margin-right: 16px;
  font-weight: 500;
}

/* 相关链接 */
.board-intro + .related-links {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   pages — 问题互助 qa
   -------------------------------------------------------------------------- */

.qa-media {
  margin-bottom: 32px;
}

.qa-figure img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

/* FAQ 手风琴 */
.faq-group {
  margin-bottom: 24px;
}

.faq-group-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--color-teal);
}

.faq-item {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item:hover {
  border-color: var(--color-teal);
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 40px;
  line-height: 1.5;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--color-teal);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 16px 14px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  margin-top: 0;
}

.faq-answer p {
  margin-bottom: 8px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* 互助规则 */
.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rule-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.rule-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rule-card-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-teal);
  flex-shrink: 0;
}

.rule-card p {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* 互助边界 */
.boundary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.boundary-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.boundary-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-red);
  background-color: var(--color-red-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  white-space: nowrap;
}

.boundary-figure img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

/* 入口卡片 */
.entry-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.entry-cards .entry-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

/* --------------------------------------------------------------------------
   pages — 社区规则 rules
   -------------------------------------------------------------------------- */

/* 规则列表 */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: rules;
}

.rule-item {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  position: relative;
  padding-left: 56px;
}

.rule-item::before {
  counter-increment: rules;
  content: counter(rules);
  position: absolute;
  left: 16px;
  top: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-teal);
  background-color: var(--color-teal-bg);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rule-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.rule-item-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* 发帖规范卡片 */
.posting-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.posting-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.posting-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.posting-card-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* 允许禁止对比表 */
.section-compare .compare-table td:first-child {
  font-weight: 500;
  color: var(--color-text);
}

.section-compare .compare-table td:last-child {
  font-family: var(--font-mono);
  font-size: 13px;
}

/* 处理流程 */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: process;
  position: relative;
}

.process-step {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 24px;
}

.process-step:last-child {
  padding-bottom: 0;
}

.process-step::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background-color: var(--color-border);
}

.process-step:last-child::before {
  display: none;
}

.step-index {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-teal);
  background-color: var(--color-teal-bg);
  border: 1px solid rgba(13, 148, 136, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  background-color: var(--color-card);
}

.step-content {
  min-width: 0;
  padding-top: 2px;
}

.step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.step-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* 规则配图 */
.rules-figure {
  margin: 32px 0;
}

.rules-figure img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.figure-caption {
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 8px 4px 0;
}

/* 规则页相关入口 */
.rules-figure + .content-section .related-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* --------------------------------------------------------------------------
   pages — 意见反馈 feedback
   -------------------------------------------------------------------------- */

/* 反馈渠道 */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.channel-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.channel-card:hover {
  border-color: var(--color-teal);
}

.channel-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-blue);
  background-color: var(--color-blue-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.channel-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.channel-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 8px;
}

.channel-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.5;
}

.channel-tip {
  font-size: 13px;
  color: var(--color-text-muted);
  background-color: var(--color-blue-bg);
  border-left: 3px solid var(--color-blue);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.6;
}

/* 举报注意事项 */
.note-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: notes;
}

.note-item {
  display: flex;
  gap: 14px;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.note-index {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-amber);
  background-color: var(--color-amber-bg);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.note-content {
  min-width: 0;
}

.note-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.note-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.note-boundary {
  font-size: 13px;
  color: var(--color-text-muted);
  background-color: var(--color-amber-bg);
  border-left: 3px solid var(--color-amber);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 16px;
  line-height: 1.6;
}

/* 处理流程时间线 */
.timeline-figure {
  margin-bottom: 20px;
}

.timeline-figure img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  padding-left: 48px;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background-color: var(--color-border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-step {
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-teal);
  background-color: var(--color-card);
  border: 1px solid rgba(13, 148, 136, 0.3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.timeline-text {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.timeline-duration {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 2px;
}

/* 联系管理员 */
.contact-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
}

.contact-text {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.contact-text:last-child {
  margin-bottom: 0;
}

/* 相关入口 */
.section-related .related-grid {
  grid-template-columns: repeat(3, 1fr);
}

.section-related .related-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.related-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-teal);
  background-color: var(--color-teal-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   pages — 404 页面
   -------------------------------------------------------------------------- */

.error-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 80px 40px;
  min-height: calc(100vh - var(--header-height) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-section {
  text-align: center;
  max-width: 520px;
  padding: 40px;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.error-code {
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: 800;
  color: var(--color-teal);
  line-height: 1;
  margin-bottom: 12px;
}

.error-section h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.error-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.error-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-card);
  background-color: var(--color-teal);
  border-radius: var(--radius-md);
  min-height: 44px;
  transition: background-color 0.15s ease;
}

.error-home-link:hover {
  background-color: var(--color-teal-dark);
  color: var(--color-card);
}

/* --------------------------------------------------------------------------
   responsive — 响应式断点
   -------------------------------------------------------------------------- */

/* 平板：缩小侧栏，调整间距 */
@media (max-width: 1100px) {
  .site-main {
    padding: 28px 24px 40px;
  }

  .footer-inner {
    padding: 28px 24px 32px;
  }

  .hero-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-img {
    height: 200px;
  }

  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .card-img {
    height: 100px;
  }
}

/* 手机端：隐藏侧栏，显示汉堡菜单 */
@media (max-width: 768px) {
  .site-header {
    position: fixed;
  }

  .header-inner {
    padding: 0 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    z-index: 99;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 12px;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 15px;
  }

  /* 侧栏在手机端隐藏 */
  .sidebar,
  .sidebar-nav,
  .site-sidebar {
    display: none;
  }

  .layout-shell {
    display: block;
    padding-top: var(--header-height);
  }

  .site-main {
    padding: 24px 16px 40px;
  }

  .home-main,
  .inner-main {
    max-width: 100%;
  }

  .footer-inner {
    padding: 24px 16px 32px;
  }

  .footer-nav {
    gap: 4px 16px;
  }

  /* 首页 */
  .hero-section {
    padding: 20px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-link {
    width: 100%;
  }

  .hero-img {
    height: 160px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .card-img {
    height: 140px;
  }

  .entry-grid,
  .entry-cards {
    grid-template-columns: 1fr;
  }

  .latest-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .latest-meta {
    white-space: normal;
  }

  /* 内页 */
  .page-title {
    font-size: 24px;
  }

  .breadcrumb {
    margin-bottom: 16px;
    padding-bottom: 8px;
    white-space: nowrap;
    overflow-x: auto;
  }

  .page-header {
    margin-bottom: 24px;
  }

  /* 表格在手机端横向滚动 */
  .table-wrap,
  .topic-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .compare-table,
  .topic-table,
  .permission-table {
    min-width: 560px;
  }

  /* 网格改为单列 */
  .rule-grid,
  .posting-grid,
  .channel-grid,
  .join-entry .entry-grid,
  .section-related .related-grid,
  .rules-figure + .content-section .related-grid {
    grid-template-columns: 1fr;
  }

  /* 步骤与列表 */
  .overview-item,
  .step-item,
  .note-item {
    flex-direction: column;
    gap: 8px;
  }

  .item-index,
  .step-mark,
  .note-index {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .rule-item {
    padding-left: 48px;
  }

  .rule-item::before {
    left: 12px;
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  /* FAQ */
  .faq-item summary {
    font-size: 13px;
    padding: 12px 40px 12px 14px;
  }

  .faq-answer {
    padding: 0 14px 12px;
    padding-top: 10px;
  }

  /* 时间线 */
  .timeline-item {
    padding-left: 40px;
  }

  .timeline-item::before {
    left: 11px;
  }

  .timeline-step {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  /* 404 */
  .error-main {
    padding: 40px 16px;
  }

  .error-section {
    padding: 32px 20px;
  }

  .error-code {
    font-size: 48px;
  }
}

/* 小屏手机 */
@media (max-width: 400px) {
  .brand-name {
    font-size: 15px;
  }

  .hero-section {
    padding: 16px;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-img {
    height: 140px;
  }

  .card-img {
    height: 120px;
  }

  .section-title {
    font-size: 18px;
  }

  .page-title {
    font-size: 22px;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0;
  }

  .footer-link {
    padding: 6px 0;
  }
}
