/* 工具页体系 —— 与工具箱首页同一设计语言（twilight 极简黑白）
   面包屑 + 分栏 hero + 信息条 + 主区/侧栏 + 全部工具条 + 小程序横幅 */

.tp-crumb {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 0.86rem;
}

.tp-crumb-back {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.tp-crumb-back:hover {
  color: var(--text);
}

.tp-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: "Songti SC", "SimSun", "Source Han Serif SC", serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tp-chip {
  font-size: 0.72rem;
  line-height: 1.7;
  padding: 1px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.tp-chip--dark {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.tp-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 28px;
}

.tp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.tp-eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--text);
}

.tp-hero-copy h1 {
  font-family: "Songti SC", "SimSun", "Source Han Serif SC", serif;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.tp-hero-copy .lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 34rem;
}

.tp-aside {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface, rgba(255, 255, 255, 0.6));
  padding: 6px 22px;
  box-shadow: var(--btn-shadow, 0 1px 2px rgba(0, 0, 0, 0.06));
}

.tp-aside-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.tp-aside-row:last-child {
  border-bottom: none;
}

.tp-aside-icon {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 2px;
}

.tp-aside-title {
  font-size: 0.94rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.tp-aside-desc {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.tp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin: 0 0 30px;
  padding: 13px 2px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.tp-stats b {
  color: var(--text);
  font-family: "Songti SC", "SimSun", serif;
  font-size: 1.02rem;
  font-weight: 600;
  margin-right: 6px;
}

.tp-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 18px;
  align-items: start;
}

/* 侧栏卡片列与主面板同高收边：卡片均分剩余高度，消除卡下留白（仅含 tp-side-card 的侧栏） */
.tp-work > aside:has(> .tp-side-card) {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.tp-work > aside:has(> .tp-side-card) > .tp-side-card {
  flex: 1 1 auto;
}

.tp-work > aside:has(> .tp-side-card) > .tp-side-card:last-child {
  margin-bottom: 0;
}

.tp-side-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface, rgba(255, 255, 255, 0.6));
  padding: 18px 20px;
  margin-bottom: 14px;
}

.tp-side-title {
  font-family: "Songti SC", "SimSun", "Source Han Serif SC", serif;
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.tp-side-card ol,
.tp-side-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.75;
}

.tp-side-card li {
  margin-bottom: 6px;
}

.tp-side-card li:last-child {
  margin-bottom: 0;
}

.tp-side-card li b {
  color: var(--text);
  font-weight: 600;
}

.tp-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
}

.tp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tp-pill:hover {
  border-color: var(--text);
}

.tp-pill-idx {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tp-pill.is-current {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.tp-pill.is-current .tp-pill-idx {
  color: inherit;
  opacity: 0.7;
}

.tp-promo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 28px 32px;
  border-radius: 18px;
  background: var(--text);
  color: var(--bg);
}

.tp-promo-copy h2 {
  margin: 0 0 6px;
  font-family: "Songti SC", "SimSun", "Source Han Serif SC", serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.tp-promo-copy p {
  margin: 0;
  font-size: 0.92rem;
  opacity: 0.8;
}

.tp-promo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 980px;
  border: 1px solid var(--bg);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  flex: none;
  transition: opacity 0.15s ease;
}

.tp-promo-cta:hover {
  opacity: 0.88;
}

/* —— 统一顶栏样式在 site/topbar.css（与「关于作者」页顶栏同源），由 includes/site_topbar.html 随组件加载 —— */

@media (max-width: 880px) {
  .tp-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tp-work {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .tp-promo {
    padding: 22px;
  }
}
