/* NavXD · tool-detail.css · aligned to home.css design system (2026-04-17) */
/* ========================================================================
   AI Tool Detail · single-ai-tool.php
   Theme: AI Tool Radar / Signal Intelligence Console
   Dark/light parity via tokens defined in home.css
   ======================================================================== */

/* light 模式加强网格可见度（home.css 默认 6% 在本页太淡） */
[data-theme="light"] body {
  --hairline: rgba(15,16,20,.10);
}

/* ====================== 1. 页容器 ====================== */
.td-page {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
  font-family: var(--sans);
  color: var(--text);
}

/* ====================== 2. 面包屑 ====================== */
.td-bc {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px dashed var(--rule);
}
.td-bc a {
  color: var(--text-3);
  transition: color .2s ease;
  text-decoration: none;
}
.td-bc a:hover { color: var(--signal); }
.td-bc span { opacity: .65; }
.td-bc span:last-child { color: var(--text-2); opacity: 1; }

/* ====================== 3. Hero ====================== */
.td-hero {
  position: relative;
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.td-hero::before {
  content: "AI TOOL · DETAIL · 01/09";
  position: absolute;
  top: 28px;
  left: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .28em;
  color: var(--text-3);
  text-transform: uppercase;
}
.td-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--signal);
  width: 64px;
  opacity: .8;
}

.td-hero-inner {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 420px auto;
  gap: 28px;
  align-items: start;
  padding-top: 18px;
}

.td-hero-icon {
  width: 96px;
  height: 96px;
  border: 1px solid var(--rule-2);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--indigo);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.td-hero-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 30% 20%, var(--indigo-soft), transparent 70%);
  pointer-events: none;
}
.td-hero-icon img {
  width: 68%;
  height: 68%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

/* Hero 截图 */
.td-hero-screenshot {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--surface-2);
  min-height: 180px;
}
.td-hero-screenshot img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.td-hero-screenshot:hover img {
  transform: scale(1.02);
}

.td-hero-info { min-width: 0; }

.td-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.td-name-en {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  border-left: 1px solid var(--rule-2);
  padding-left: 12px;
}

.td-tagline {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 20px;
  max-width: 58ch;
  font-style: italic;
}

/* 徽章组 */
.td-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.td-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: border-color .2s ease, color .2s ease;
}
.td-badge-cat {
  border-color: var(--indigo-mid);
  color: var(--indigo);
  background: var(--indigo-soft);
}
.td-badge-price {
  border-color: var(--rule-2);
  color: var(--text-2);
}
.td-badge-score {
  border-color: var(--signal-mid);
  color: var(--signal);
  background: var(--signal-soft);
}
.td-badge-score::before {
  content: "▲";
  font-size: 8px;
}
.td-badge-rv {
  border-color: var(--rule);
  color: var(--text-3);
}
.td-badge-rv::before {
  content: "◇";
  font-size: 9px;
  color: var(--text-4);
}

/* Meta 行（PHP 中有 inline style, 不覆写） */
.td-meta-list { color: var(--text-3); }
.td-meta-list span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 0;
}

/* Hero 操作区 */
.td-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 200px;
}

.td-hero-actions > .td-card {
  display: none;
}

.td-btn-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  background: var(--indigo);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--indigo);
  border-radius: 10px;
  box-shadow: 0 10px 28px var(--indigo-soft);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.td-btn-visit::after { content: "→"; font-size: 14px; }
.td-btn-visit:hover {
  background: var(--indigo);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 34px var(--indigo-mid);
}

.td-btn-fav,
.td-btn-vote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.td-btn-fav:hover,
.td-btn-vote:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-soft);
}
.td-btn-fav.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(250,204,21,.08);
}
.td-btn-vote.active {
  border-color: var(--signal);
  color: var(--signal);
  background: var(--signal-soft);
}

.td-vote-row { display: flex; gap: 8px; }

/* ====================== 4. 主体布局 ====================== */
.td-wrap { padding: 0; }
.td-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 60px;
  padding: 60px 0 96px;
  align-items: start;
}
.td-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.td-side {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.td-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.td-stat-item {
  padding: 14px 14px 12px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface-2);
}

.td-stat-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.td-stat-value {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  color: var(--text);
}

.td-side-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.td-side-note-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-2);
}

.td-side-note-row span {
  color: var(--text-3);
}

.td-side-note-row strong {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.td-side-note-row-stack {
  align-items: flex-start;
  flex-direction: column;
}

.td-side-note-row-stack strong {
  text-align: left;
}

/* ====================== 5. 卡片 ====================== */
.td-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px 28px 26px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.td-card::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--rule-2);
  border-right: 1px solid var(--rule-2);
  opacity: .6;
  pointer-events: none;
}
.td-card::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 10px;
  height: 10px;
  border-bottom: 1px solid var(--rule-2);
  border-left: 1px solid var(--rule-2);
  opacity: .6;
  pointer-events: none;
}
.td-card:hover {
  border-color: var(--indigo-mid);
  box-shadow: 0 10px 30px var(--indigo-soft);
}

/* 卡片标题：serif + signal underline */
.td-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text);
  position: relative;
}
.td-card-title::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 48px;
  height: 1px;
  background: var(--signal);
}
.td-title-bar {
  display: inline-block;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--indigo);
  flex-shrink: 0;
}

/* ====================== 6. 正文 ====================== */
.td-content {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-2);
}
.td-content h2,
.td-content h3,
.td-content h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -.01em;
  margin: 32px 0 12px;
}
.td-content h2 {
  font-size: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 80px;
}
.td-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.td-content h3 { font-size: 19px; }
.td-content h4 { font-size: 16px; }

.td-content p { margin: 0 0 16px; }
.td-content ul,
.td-content ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.td-content li {
  margin-bottom: 8px;
  line-height: 1.75;
}
.td-content strong { color: var(--text); font-weight: 600; }
.td-content em { color: var(--text); font-style: italic; }
.td-content a {
  color: var(--indigo);
  border-bottom: 1px solid var(--indigo-mid);
  font-weight: 500;
  transition: color .2s ease, border-color .2s ease;
}
.td-content a:hover {
  color: var(--signal);
  border-bottom-color: var(--signal);
}
.td-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--rule);
  margin: 20px 0;
}
.td-content blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  border-left: 2px solid var(--signal);
  background: var(--surface-2);
  border-radius: 0 12px 12px 0;
  color: var(--text-2);
  font-family: var(--serif);
  font-style: italic;
}
.td-content code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface-3);
  border: 1px solid var(--rule);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text);
}
.td-content pre {
  background: var(--surface-3);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}
.td-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}
[data-theme="light"] .td-content pre,
[data-theme="light"] .td-content code {
  background: rgba(15,16,20,.04);
  color: var(--text-2);
}

.td-no-content {
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
  padding: 28px 0;
  font-family: var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ====================== 7. 通用 list (features / use-cases / alternatives) ====================== */
.td-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.td-list li {
  position: relative;
  padding: 12px 14px 12px 34px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  transition: border-color .2s ease, color .2s ease;
}
.td-list li::before {
  content: "◂";
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--signal);
  letter-spacing: 0;
}
.td-list li:hover {
  border-color: var(--indigo-mid);
  color: var(--text);
}
.td-list li a {
  color: inherit;
  text-decoration: none;
  display: block;
}
.td-list li:has(a):hover { color: var(--indigo); }

/* ====================== 8. 优缺点 ====================== */
.td-pc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.td-pc-col {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}
.td-pc-head {
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
}
.td-pc-head-pro {
  color: var(--signal);
  background: var(--signal-soft);
  border-bottom-color: var(--signal-mid);
}
.td-pc-head-pro::before {
  content: "+ ";
  font-weight: 700;
}
.td-pc-head-con {
  color: var(--rose);
  background: rgba(248,113,113,.08);
  border-bottom-color: rgba(248,113,113,.22);
}
.td-pc-head-con::before {
  content: "− ";
  font-weight: 700;
}
.td-pc-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.td-pc-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.td-pc-item::before {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 700;
}
.td-pc-pro::before { content: "+"; color: var(--signal); }
.td-pc-con::before { content: "−"; color: var(--rose); }
.td-pc-empty {
  color: var(--text-4);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.td-pc-empty::before {
  content: "//";
  color: var(--text-4);
}

/* ====================== 9. 评分明细 ====================== */
.td-score-grid {
  display: grid;
  gap: 18px;
}
.td-score-item {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--text-2);
}
.td-score-item span { text-transform: uppercase; color: var(--text-3); }
.td-score-item strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--text);
  text-transform: none;
}

/* ====================== 10. 中部 CTA 卡 ====================== */
.td-cta-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--indigo-mid);
  text-align: left;
}
.td-cta-card p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 16px;
}
.td-cta-card p:last-child { margin: 0; }

/* ====================== 11. FAQ ====================== */
.td-faq-list {
  display: flex;
  flex-direction: column;
}
.td-faq-item {
  border-bottom: 1px dashed var(--rule);
  padding: 2px 0;
}
.td-faq-item:last-child { border-bottom: none; }
.td-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 32px 16px 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  transition: color .2s ease;
}
.td-faq-item summary::-webkit-details-marker { display: none; }
.td-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 18px;
  color: var(--indigo);
  transition: transform .25s ease, color .2s ease;
}
.td-faq-item[open] summary::after {
  content: "−";
  color: var(--signal);
}
.td-faq-item summary:hover { color: var(--indigo); }
.td-faq-item[open] summary { color: var(--text); }
.td-faq-item > div {
  padding: 0 32px 18px 0 !important;
  color: var(--text-2) !important;
  font-size: 14px;
  line-height: 1.85 !important;
}

/* ====================== 12. 侧栏 ====================== */
.td-side .td-card {
  padding: 22px;
  border-radius: 14px;
}
.td-side .td-card-title {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
}
.td-side .td-card-title::after { width: 28px; }
.td-side .td-title-bar { height: 14px; background: var(--signal); }

.td-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
}
.td-side-list li {
  padding: 10px 0 10px 14px;
  border-left: 1px solid var(--rule);
  color: var(--text-2);
  line-height: 1.6;
  position: relative;
  transition: border-left-color .2s ease, color .2s ease;
}
.td-side-list li + li { margin-top: 2px; }
.td-side-list li::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-4);
  transition: background .2s ease, box-shadow .2s ease;
}
.td-side-list li:hover {
  border-left-color: var(--signal);
  color: var(--text);
}
.td-side-list li:hover::before {
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-soft);
}
.td-side-list li strong {
  color: var(--text-3);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: .14em;
  margin-right: 6px;
}

/* 侧栏 CTA 按钮贴合卡宽 */
.td-side .td-btn-visit {
  width: 100%;
  margin-top: 4px;
}

/* ====================== 13. Responsive ====================== */
@media (max-width: 1024px) {
  .td-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .td-side {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .td-hero-inner {
    grid-template-columns: 96px minmax(0, 1fr) 300px auto;
  }
}

@media (max-width: 768px) {
  .td-page { padding: 0 20px; }
  .td-hero { padding: 56px 0 40px; }
  .td-hero::before { top: 20px; font-size: 9px; }
  .td-hero-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .td-hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    font-size: 24px;
  }
  .td-hero-screenshot {
    width: 100%;
    order: -1;
  }
  .td-hero-screenshot img {
    height: 200px;
  }
  .td-name { font-size: clamp(28px, 7vw, 40px); gap: 10px; }
  .td-name-en { font-size: 11px; padding-left: 10px; }
  .td-tagline { font-size: 15px; }
  .td-hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    min-width: 0;
    width: 100%;
  }
  .td-btn-visit,
  .td-btn-fav { flex: 1; }

  .td-layout { padding: 40px 0 64px; gap: 32px; }
  .td-main { gap: 32px; }
  .td-card { padding: 22px 20px; border-radius: 14px; }
  .td-card-title { font-size: 20px; padding-bottom: 12px; margin-bottom: 18px; }

  .td-pc-grid { grid-template-columns: 1fr; gap: 14px; }
  .td-list { grid-template-columns: 1fr; }
  .td-side { grid-template-columns: 1fr; gap: 16px; }
  .td-faq-item summary { font-size: 15px; padding-right: 28px; }
}

@media (max-width: 480px) {
  .td-bc { font-size: 10px; gap: 6px; }
  .td-badges { gap: 6px; }
  .td-badge { padding: 4px 10px; font-size: 10px; }
  .td-hero-actions { flex-direction: column; }
  .td-btn-visit,
  .td-btn-fav,
  .td-btn-vote { width: 100%; }
  .td-vote-row { width: 100%; }
  .td-vote-row .td-btn-vote { flex: 1; }
}

/* ====================== 14. Print ====================== */
@media print {
  .td-hero-actions,
  .td-side,
  .td-cta-card { display: none; }
  .td-layout { grid-template-columns: 1fr; }
  .td-card { break-inside: avoid; border: 1px solid #000; box-shadow: none; }
}
