/**
 * 使用教程页样式（tutorial.html 专用）
 * 阚荣浩 2026-11-19
 *
 * 只给教程页用，类名统一 tt- 前缀，不覆盖 portal.css / portal-extra.css 的任何类。
 * 结构：顶部标题条（tt-hero） + 左侧目录（tt-nav，sticky） + 右侧分节卡片（tt-sec）
 */

/* ---------------- 顶部标题条 ---------------- */
.tt-hero {
  padding: 54px 0 40px;
  background:
    radial-gradient(760px 340px at 10% -20%, #e7fbf8 0%, rgba(231, 251, 248, 0) 62%),
    radial-gradient(680px 320px at 92% 0%, #eef3ff 0%, rgba(238, 243, 255, 0) 60%),
    #fafbfc;
  border-bottom: 1px solid #eef0f3;
}

.tt-hero h1 {
  font-size: 32px;
  color: #12192b;
  letter-spacing: -.4px;
}

.tt-hero-desc {
  margin-top: 12px;
  max-width: 720px;
  font-size: 15px;
  color: #5b6472;
}

.tt-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tt-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2eeeb;
  font-size: 12.5px;
  color: #4a5568;
}

.tt-chip b { color: #0d9488; font-weight: 600; }

/* ---------------- 主体两栏 ---------------- */
.tt-body { background: #fafbfc; }

.tt-wrap {
  display: grid;
  grid-template-columns: 212px 1fr;
  gap: 28px;
  align-items: start;
  padding: 34px 0 76px;
  background: #fafbfc;
}

/* 左侧目录 */
.tt-nav {
  position: sticky;
  top: 88px;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 14px 10px;
}

.tt-nav-hd {
  padding: 2px 10px 10px;
  font-size: 12px;
  color: #98a2b3;
  letter-spacing: .5px;
}

.tt-nav a {
  display: block;
  position: relative;
  padding: 8px 10px 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #5b6472;
  line-height: 1.4;
  transition: background .16s, color .16s;
}

.tt-nav a:hover { background: #f6fbfa; color: #0d9488; }

.tt-nav a.on {
  background: #e8f8f5;
  color: #0d9488;
  font-weight: 600;
}

.tt-nav a.on:before {
  content: "";
  position: absolute;
  left: 3px;
  top: 11px;
  bottom: 11px;
  width: 2px;
  border-radius: 1px;
  background: #16baaa;
}

/* 右侧分节 */
.tt-main { min-width: 0; }

.tt-sec {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 26px 28px 24px;
  margin-bottom: 16px;
  scroll-margin-top: 86px;
}

.tt-sec > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  color: #12192b;
  letter-spacing: -.2px;
  margin-bottom: 14px;
}

.tt-sec > h2 i {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: linear-gradient(135deg, #16baaa, #0d9488);
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(22, 186, 170, .22);
}

.tt-sec h3 {
  font-size: 15px;
  color: #17233d;
  margin: 20px 0 8px;
}

.tt-sec h3:first-of-type { margin-top: 4px; }

.tt-p {
  font-size: 14px;
  color: #5b6472;
  line-height: 1.9;
}

.tt-sec .tt-p + .tt-p { margin-top: 8px; }

/* 列表 */
.tt-ul { margin: 8px 0 2px; }

.tt-ul li {
  position: relative;
  padding: 5px 0 5px 20px;
  font-size: 14px;
  color: #5b6472;
  line-height: 1.85;
}

.tt-ul li:before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #16baaa;
}

.tt-ul li b { color: #1f2937; font-weight: 600; }
.tt-ul li code,
.tt-p code {
  padding: 1px 6px;
  border-radius: 5px;
  background: #f2f4f7;
  color: #1f2937;
  font-size: 12.5px;
  font-family: inherit;
}

/* 步骤时间线 */
.tt-flow { margin: 10px 0 4px; counter-reset: ttstep; }

.tt-flow-item {
  position: relative;
  padding: 0 0 18px 40px;
}

.tt-flow-item:last-child { padding-bottom: 2px; }

.tt-flow-item:before {
  counter-increment: ttstep;
  content: counter(ttstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #c8ece7;
  background: #f2fbfa;
  color: #0d9488;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}

.tt-flow-item:after {
  content: "";
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: 4px;
  width: 1px;
  background: #e4f2ef;
}

.tt-flow-item:last-child:after { display: none; }

.tt-flow-item strong {
  display: block;
  font-size: 14.5px;
  color: #17233d;
  font-weight: 600;
  padding-top: 1px;
}

.tt-flow-item p {
  margin-top: 3px;
  font-size: 13.5px;
  color: #667085;
  line-height: 1.8;
}

/* 提示框 */
.tt-tip, .tt-warn, .tt-danger {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.8;
  margin: 14px 0 2px;
}

.tt-tip { background: #f2fbfa; border: 1px solid #c8ece7; color: #0d6b63; }
.tt-warn { background: #fffbe6; border: 1px solid #ffe58f; color: #8a5a00; }
.tt-danger { background: #fff2f0; border: 1px solid #ffccc7; color: #b42318; }

.tt-tip b, .tt-warn b, .tt-danger b { font-weight: 600; }

/* 小表格 */
.tt-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 4px;
  font-size: 13.5px;
}

.tt-table th,
.tt-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: top;
  color: #5b6472;
  line-height: 1.7;
}

.tt-table th {
  background: #fafbfc;
  color: #7a8494;
  font-weight: 500;
  font-size: 12.5px;
  white-space: nowrap;
}

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

.tt-table td b { color: #17233d; font-weight: 600; }

/* 首列（类型 / 档位 / 方式）不折行，避免「普 通」被挤成竖排两行 */
.tt-table td:first-child { white-space: nowrap; }

/* 优先级色点 */
.tt-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}

/* 底部引导 */
.tt-end {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(115deg, #0f1b2d 0%, #123c43 52%, #0d6b63 100%);
  border-radius: 16px;
  padding: 30px 24px;
  color: #fff;
  text-align: center;
  margin-top: 6px;
}

.tt-end p {
  flex: 1 1 100%;
  color: #a9b6c6;
  font-size: 13.5px;
  margin-bottom: 2px;
}

.tt-end .bs-btn-ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .22);
  color: #e6ebf2;
}

.tt-end .bs-btn-ghost:hover { border-color: #16baaa; color: #fff; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
  .tt-wrap { grid-template-columns: 1fr; gap: 16px; padding-top: 22px; }
  .tt-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
  }
  .tt-nav-hd { flex: 1 1 100%; padding-bottom: 4px; }
  .tt-nav a {
    padding: 6px 10px;
    font-size: 12.5px;
    border: 1px solid #eef0f3;
    border-radius: 999px;
  }
  .tt-nav a.on:before { display: none; }
}

@media (max-width: 640px) {
  .tt-hero { padding: 34px 0 26px; }
  .tt-hero h1 { font-size: 24px; }
  .tt-hero-desc { font-size: 14px; }
  .tt-sec { padding: 20px 16px 18px; }
  .tt-sec > h2 { font-size: 17px; }
  .tt-table { display: block; overflow-x: auto; white-space: nowrap; }
  .tt-table td, .tt-table th { white-space: normal; }
}
