/**
 * 梯子工厂 (tizigc.online) - 三栏式文档与矩阵布局系统
 * 严格按照要求构建：左边目录 (Sidebar)、中间内容 (Content)、最右边大纲 (Outline)
 */

.docs-page-wrapper {
  max-width: 1680px;
  margin: 0 auto;
  padding: 30px 24px 60px;
  width: 100%;
}

.docs-three-col-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 250px;
  gap: 32px;
  align-items: start;
}

/* ====== 左侧：目录导航 (Sidebar / Directory) ====== */
.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  max-height: calc(100vh - var(--nav-height) - 48px);
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  box-shadow: var(--shadow-skeuo-card);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.docs-sidebar::-webkit-scrollbar {
  width: 5px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.sidebar-header {
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f0eee9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-inset);
  color: var(--text-muted);
  font-weight: 700;
}

/* 目录分组 */
.sidebar-group {
  margin-bottom: 22px;
}

.sidebar-group-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-sub);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-link:hover {
  background: var(--bg-surface-soft);
  color: var(--text-main);
  transform: translateX(3px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--brand-blue-dark);
  font-weight: 700;
  box-shadow: 
    0 3px 10px rgba(37, 99, 235, 0.12),
    inset 0 1px 1px #fff;
  border: 1px solid rgba(191, 219, 254, 0.6);
}

.sidebar-link .indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s;
}

.sidebar-link.active .indicator {
  background: var(--brand-blue);
  box-shadow: 0 0 8px var(--brand-blue);
}

/* ====== 中间：核心内容区域 (Content Area) ====== */
.docs-content-container {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* 面包屑导航 */
.docs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
  padding: 4px 0;
}

.docs-breadcrumb a:hover {
  color: var(--brand-blue);
}

.breadcrumb-separator {
  color: #cbd5e1;
}

/* 内容主标题区 */
.content-hero-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  border: var(--border-subtle);
  box-shadow: var(--shadow-skeuo-card);
  position: relative;
  overflow: hidden;
}

.content-hero-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

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

.content-main-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 14px;
}

.content-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 860px;
}

/* 内容板块 (Section) */
.doc-section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 34px 40px;
  border: var(--border-subtle);
  box-shadow: var(--shadow-skeuo-card);
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.doc-section-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #f6f5f1;
  padding-bottom: 12px;
}

.doc-section-subtitle {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin: 24px 0 12px;
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.doc-paragraph {
  font-size: 15px;
  color: #334155;
  line-height: 1.75;
  margin-bottom: 16px;
}

/* 拟物高亮提示框 (Callouts / Alerts) */
.skeuo-callout {
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 20px 0;
  display: flex;
  gap: 16px;
  background: #fbfaf8;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.skeuo-callout.tip {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  color: #166534;
}

.skeuo-callout.warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  color: #92400e;
}

.skeuo-callout.danger {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.skeuo-callout.info {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.callout-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.callout-body {
  font-size: 14.5px;
  line-height: 1.6;
}

.callout-body strong {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

/* 评测矩阵卡片与表格组件 */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 22px 0;
}

.matrix-card {
  background: linear-gradient(180deg, #ffffff 0%, #faf9f6 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 
    0 10px 24px -8px rgba(0, 0, 0, 0.07),
    inset 0 1px 1px #fff;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.matrix-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.12);
}

.matrix-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.matrix-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-score {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 18px;
  color: #d97706;
  background: #fef3c7;
  padding: 3px 8px;
  border-radius: 8px;
}

.matrix-features {
  list-style: none;
  font-size: 13.5px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 20px;
}

.matrix-features li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-features li .check {
  color: var(--accent-emerald);
  font-weight: 800;
}

/* 拟物对比数据表格 (Skeuomorphic Data Table) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-skeuo-inset);
  background: var(--bg-surface-inset);
  padding: 6px;
  margin: 20px 0;
}

.skeuo-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}

.skeuo-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.skeuo-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.skeuo-table tr:hover td {
  background: #f8fafc;
}

/* ====== 右侧：大纲导航 (Outline / TOC / Scrollspy) ====== */
.docs-outline {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  max-height: calc(100vh - var(--nav-height) - 48px);
  overflow-y: auto;
  padding: 22px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  box-shadow: var(--shadow-skeuo-card);
}

.outline-header {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.outline-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 2px solid #e9e6e0;
  padding-left: 12px;
}

.outline-link {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 4px 0;
  transition: all 0.2s ease;
  display: block;
}

.outline-link:hover {
  color: var(--brand-blue);
  transform: translateX(2px);
}

.outline-link.active {
  color: var(--brand-blue);
  font-weight: 700;
}

.outline-sub {
  padding-left: 14px;
  font-size: 12px;
}

/* 右侧底部快捷工具箱 */
.outline-toolbox {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f0eee9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-surface-soft);
  border: 1px solid rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  color: var(--brand-blue);
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* ====== 移动端与响应式适配 ====== */
@media (max-width: 1380px) {
  .docs-three-col-layout {
    grid-template-columns: 260px minmax(0, 1fr) 220px;
    gap: 24px;
  }
}

@media (max-width: 1140px) {
  .docs-three-col-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .docs-outline {
    display: none; /* 平板端隐藏右侧大纲，保证内容居中饱满 */
  }
}

@media (max-width: 860px) {
  .docs-three-col-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    display: none; /* 移动端抽屉收纳 */
  }
  .content-hero-card,
  .doc-section {
    padding: 24px 20px;
  }
  .content-main-title {
    font-size: 25px;
  }
}

/* ====== 新手指南专用步骤向导与跳转操作条 ====== */
.step-wizard {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}

.step-item {
  display: flex;
  gap: 16px;
  background: #ffffff;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03), inset 0 1px 1px #fff;
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06), inset 0 1px 1px #fff;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue-light) 0%, var(--brand-blue-dark) 100%);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  font-size: 14px;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.step-content p {
  font-size: 14px;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

.jump-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-surface-inset);
  border-radius: var(--radius-md);
  margin-top: 22px;
  box-shadow: var(--shadow-skeuo-inset);
}

.jump-action-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: var(--brand-blue-dark);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04), inset 0 1px 1px #fff;
  transition: all 0.2s ease;
  text-decoration: none;
}

.pill-link:hover {
  background: var(--brand-blue);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
}

.pill-link.external {
  color: #b45309;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}

.pill-link.external:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
}

