/* veridrop minimal style — light, hvoy.ai-adjacent. No external deps. */

:root {
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --green: #10b981;
  --green-dark: #059669;
  --green-soft: #d1fae5;
  --red: #ef4444;
  --amber: #f59e0b;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC",
               sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono",
               Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
/* Inner wrapper aligns nav content with the page container's max-width
   (960px) so on wide monitors the nav doesn't drift to the screen edges
   while the body stays centered. */
.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 18px; color: var(--text);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

/* Desktop / tablet: nav inline next to brand, left-grouped (NOT pushed to
   the right). Standard SaaS navbar layout — feels balanced because the
   eye reads brand → nav → empty space, not brand → wide gap → nav. */
.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}
.site-nav a {
  color: var(--muted);
  font-size: 14px;
  padding: 6px 0;
  position: relative;
}
.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}
/* Subtle underline on hover/focus — feels more "tappable" than bare text */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.15s ease;
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after { transform: scaleX(1); }

/* GitHub button in nav — pill-shaped chip with the official mark + label.
 * Stronger visual weight than text links so it reads as "primary external
 * action" without needing a real CTA button (which would compete with
 * the page's actual CTA). Underline animation suppressed since the chip
 * has its own border. */
.nav-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--text) !important;
  margin-left: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-github:hover {
  background: var(--bg-soft);
  text-decoration: none;
}
.nav-github svg {
  flex-shrink: 0;
}
.nav-github::after { display: none !important; }  /* suppress nav underline */

/* Hamburger button — hidden on desktop, shown on mobile. */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
/* Animate to an "X" when open — gives a clear close affordance. */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 24px 64px;
  flex: 1;
  width: 100%;
}

.site-footer {
  /* 横向 padding 移到内部 p 上,跟 .container (max-width 960 + padding 24)
     完全同步。border-top 仍占满屏宽保留分隔线视觉。文字居中显示
     (页脚约定俗成的对齐方式)。 */
  border-top: 1px solid var(--line);
  padding: 20px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.site-footer p {
  /* 复刻 .container 的盒模型:外宽 960px、横向 24px 内 padding、border-box
     让 p 边线跟主体内容像素级对齐。文字在 960px 框内居中,
     长句超过 960px 自然换行(每行仍居中)。 */
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}
.site-footer p.muted.small {
  margin-top: 8px;
}

/* Footer multi-column layout — replaces the single centered paragraph
 * with a grid of {tagline + GitHub button | 项目 | 工具 | 资源}.
 * Designed for an SEO-friendly internal-link cluster footer (every
 * deep-link reachable from any page) without becoming a wall of text. */
.footer-grid {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px 12px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  text-align: left;
  box-sizing: border-box;
}
.footer-col h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li { margin: 6px 0; }
.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.footer-col a:hover {
  color: var(--text);
  text-decoration: underline;
}
.footer-tagline {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 14px;
}
.footer-tagline strong { color: var(--green-dark, #047857); }
.footer-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 320px;
}
.footer-copyright {
  text-align: center;
  margin: 8px 0 0;
  padding: 0 24px;
}
.footer-copyright-github {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  color: inherit !important;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace;
  text-decoration: none;
  vertical-align: middle;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.footer-copyright-github:hover {
  opacity: 1;
  text-decoration: none;
}
.footer-copyright-github svg {
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
  }
  .footer-col-tagline {
    grid-column: 1 / -1;  /* tagline + GitHub btn span both columns */
  }
}

/* ============================== Trust Strip ==============================
 * Hub homepage section right below the hero capsule. The whole strip
 * exists because Veridrop's product premise is "hand us your API key" —
 * users won't do that without proof of trust. We give 3 cards of
 * concrete promises, each linking into the actual code that proves it.
 * Visual weight is intentionally heavy: subtle gradient bg + clear
 * heading anchor + GitHub CTA at the bottom. */
.trust-strip {
  margin: 32px 0 40px;
  padding: 28px 28px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg,
    rgba(16, 185, 129, 0.04) 0%,
    rgba(16, 185, 129, 0.01) 60%,
    var(--bg) 100%);
}
.trust-strip-head {
  text-align: center;
  margin-bottom: 24px;
}
.trust-strip-head h2 {
  font-size: 22px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.trust-strip-head p {
  margin: 0 auto;
  max-width: 720px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}
.trust-strip-head p strong { color: var(--text); }

.trust-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.trust-card {
  padding: 18px 18px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}
.trust-icon {
  font-size: 24px;
  margin-bottom: 8px;
  line-height: 1;
}
.trust-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.trust-card h3 em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  font-size: 13.5px;
}
.trust-card p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}
.trust-card code {
  font-size: 11.5px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 3px;
}
.trust-link {
  font-size: 12.5px;
  color: var(--green-dark, #047857);
  text-decoration: none;
  font-weight: 500;
  margin-top: auto;
}
.trust-link:hover { text-decoration: underline; }

.trust-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
/* GitHub-styled "primary" button — recognizable mono font + dark bg
 * matches what users expect on a GitHub-link CTA. Different from the
 * green primary CTA on detect pages so they don't compete visually. */
.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #1f2328;
  color: white;
  border: 1px solid #1f2328;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn-github:hover {
  background: #34383d;
  border-color: #34383d;
  text-decoration: none;
  transform: translateY(-1px);
}
.trust-license-pill {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace;
  color: var(--muted);
  padding: 6px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}
@media (max-width: 760px) {
  .trust-cards { grid-template-columns: 1fr; }
  .trust-strip { padding: 22px 18px 18px; }
  .trust-strip-head h2 { font-size: 19px; }
}

/* hero */
.hero { text-align: center; margin-bottom: 32px; }
.hero h1 {
  font-size: 36px; line-height: 1.2; margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hero-sub { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* hub */
.hub-hero {
  /* 不设 max-width — 让首屏文字、协议卡片、why/how 各 section 共用 .container
     的 960px 全宽,左右边缘视觉对齐。text-wrap: balance 会在 960px 内自动
     算出每行接近相等的宽度,所以不会出现"一行特别长"的问题。 */
  margin: 8px 0 28px;
}
.hub-hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hub-hero p {
  color: var(--muted);
  margin: 0;
  font-size: 17px;
}
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.protocol-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--bg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 300px;
}
.protocol-card-primary { border-color: rgba(16, 185, 129, 0.45); }
.protocol-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.protocol-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.protocol-card h2 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.protocol-card p {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 14px;
}
.protocol-action {
  margin-top: auto;
  width: 100%;
}
.tier-badge {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.tier-crypto {
  color: #047857;
  background: var(--green-soft);
}
.tier-behavioral {
  color: #92400e;
  background: #fef3c7;
}
.tier-protocol {
  color: #374151;
  background: #f3f4f6;
}
.hub-note {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 32px;
}
.hub-note h2 {
  font-size: 20px;
  margin: 0 0 8px;
}
.hub-note p {
  color: var(--muted);
  margin: 0 0 16px;
}

/* CJK + 英文混排:用 text-wrap: balance 让浏览器主动平衡每行宽度
   (Chrome 114+ / Firefox 121+ / Safari 17.5+),避免出现某行只到一半就换行
   的难看排版。仅对短文本(<= 6 行)生效,正好覆盖首页这些介绍段落。
   line-break: strict 防止 CJK 标点出现在错误位置;overflow-wrap 兜底防溢出。 */
/* balance 让短段落每行宽度均衡(适合三协议卡片、why 卡片这种多个并列、
   需要视觉对齐的场景,以及只有 1-2 行的页脚 / meta 文字)。
   .answer-capsule 之前也加了 balance,但它在不同页面长度差很多:首页 hero
   文字长 (>6 行) balance 自动失效→走贪心填满容器;排行榜 hero 只 2 行,
   balance 反而把两行都缩到一半宽。所以 capsule 一律用贪心换行,跟 hub-note /
   how-steps 一致 — 第一行填满容器,装不下才换行。 */
.hub-meta,
.protocol-card p,
.why-item p,
.site-footer p {
  overflow-wrap: break-word;
  text-wrap: balance;
  line-break: strict;
}
.answer-capsule,
.hub-note p,
.how-steps p {
  overflow-wrap: break-word;
  line-break: strict;
}

/* answer capsule + meta strip (SEO definition-first per SEO_AI_GEO_PLAN §3.2) */
.answer-capsule {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 14px;
}
.answer-capsule strong {
  color: var(--green-dark);
  font-weight: 600;
}
.hub-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.01em;
}
.hub-meta strong {
  color: var(--text);
  font-weight: 600;
}
/* 内联版 meta:跟在 .answer-capsule 末尾继续流动而不是另起一段。
   保持灰色 + 稍小字号的视觉差异,前面留一格空白做天然分隔。 */
.hub-meta-inline {
  color: var(--muted);
  font-size: 0.85em;
  letter-spacing: 0.01em;
  margin-left: 0.5em;
}
.hub-meta-inline strong { color: var(--text); font-weight: 600; }

/* "why veridrop" 5-card differentiator grid */
.why-veridrop { margin: 44px 0 8px; }
.why-veridrop h2 {
  font-size: 24px;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.why-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.why-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.why-item h3 {
  font-size: 16px;
  margin: 0 0 8px;
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.why-item p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.why-item code {
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12.5px;
  color: var(--text);
}

/* "how it works" 3-step list */
.how-it-works { margin: 44px 0 8px; }
.how-it-works h2 {
  font-size: 24px;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.how-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.how-steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  background: var(--bg);
}
.how-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.how-steps h3 {
  font-size: 16px;
  margin: 2px 0 6px;
  line-height: 1.35;
}
.how-steps p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.how-steps a { color: var(--green-dark); text-decoration: none; }
.how-steps a:hover { text-decoration: underline; }

/* ========== /leaderboard 红黑榜 ========== */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}
.lb-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  align-items: flex-start;
}
.lb-rank {
  font-size: 24px;
  text-align: center;
  padding-top: 4px;
}
.lb-rank-num {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.lb-main { min-width: 0; }
.lb-domain {
  font-size: 18px;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
  word-break: break-all;  /* 长域名能换行 */
}
.lb-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
  overflow-wrap: break-word;
}
.lb-badge-info {
  background: var(--bg-soft);
  color: var(--muted);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 12px;
}
.lb-protocols {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.lb-proto-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 500;
}
.lb-proto-chip:hover { text-decoration: none; transform: translateY(-1px); transition: transform 0.1s; }
.lb-proto-name { font-weight: 600; }
.lb-proto-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-proto-verdict { font-size: 11.5px; opacity: 0.85; }
.lb-proto-count { font-size: 11px; opacity: 0.7; }
.lb-proto-ok    { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.lb-proto-good  { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.lb-proto-warn  { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.lb-proto-fail  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.lb-issues {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}
.lb-issues code {
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11.5px;
  border: 1px solid var(--line);
}
.lb-score {
  text-align: center;
  min-width: 64px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-soft);
}
.lb-score-num {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lb-score-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.05em;
}
.lb-score-ok    { background: var(--green-soft); color: var(--green-dark); }
.lb-score-good  { background: #f0fdf4; color: #166534; }
.lb-score-warn  { background: #fffbeb; color: #92400e; }
.lb-score-fail  { background: #fef2f2; color: #991b1b; }

/* leaderboard list — domain link + detail entry */
.lb-domain a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.lb-domain a:hover {
  border-bottom-color: var(--muted);
  text-decoration: none;
}
.lb-detail-link {
  font-size: 12.5px;
  color: var(--green-dark, #047857);
  text-decoration: none;
  font-weight: 500;
}
.lb-detail-link:hover { text-decoration: underline; }

/* leaderboard detail page — per-domain SEO surface */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { color: var(--muted); opacity: 0.5; }
.breadcrumb-current { color: var(--text); font-weight: 500; word-break: break-all; }

.lb-detail-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  margin: 24px 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.lb-detail-score {
  text-align: center;
  min-width: 110px;
  padding: 18px 20px;
  border-radius: 10px;
  background: var(--bg-soft);
}
.lb-detail-score-num {
  display: block;
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lb-detail-score-label {
  display: block;
  font-size: 11px;
  color: inherit;
  opacity: 0.75;
  margin-top: 6px;
  letter-spacing: 0.06em;
}
.lb-detail-protocols h2 {
  font-size: 15px;
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.lb-detail-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
}

.lb-detail-issues {
  margin: 28px 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.lb-detail-issues h2 {
  font-size: 18px;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.lb-issues-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lb-issues-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
}
.lb-issues-list code {
  background: transparent;
  padding: 0;
  border: none;
  font-size: 12px;
  color: var(--text);
}
.lb-issues-count {
  color: var(--muted);
  font-size: 11.5px;
}

.lb-detail-history {
  margin: 28px 0;
}
.lb-detail-history h2 {
  font-size: 20px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.lb-history-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.lb-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.lb-history-table thead {
  background: var(--bg-soft);
}
.lb-history-table th,
.lb-history-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.lb-history-table th.num,
.lb-history-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.lb-history-table tbody tr:last-child td { border-bottom: none; }
.lb-history-table tbody tr:hover { background: var(--bg-soft); }
.lb-history-table code {
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  border: 1px solid var(--line);
}
.lb-history-table thead tr code,
.lb-history-table tbody tr:hover code {
  background: var(--bg);
}
.lb-history-score {
  display: inline-block;
  min-width: 36px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  text-align: center;
}
.lb-history-score-ok    { background: #ecfdf5; color: #065f46; }
.lb-history-score-good  { background: #f0fdf4; color: #166534; }
.lb-history-score-warn  { background: #fffbeb; color: #92400e; }
.lb-history-score-fail  { background: #fef2f2; color: #991b1b; }

/* Leaderboard section headers — separate Top 10 from全部列表. */
.lb-section-heading {
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.lb-section-heading h2 {
  font-size: 20px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.lb-section-heading p {
  margin: 0;
}

/* Pagination — server-rendered links so each page is a distinct URL
 * for SEO long-tail (?page=2 etc.). Designed mobile-first: chips
 * wrap onto multiple lines if needed instead of overflowing. */
.lb-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 28px 0;
  font-size: 14px;
}
.lb-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.lb-page-btn:hover {
  background: var(--bg-soft);
  text-decoration: none;
}
.lb-page-current {
  background: var(--green);
  color: white;
  border-color: var(--green);
  font-weight: 600;
}
.lb-page-current:hover {
  background: var(--green);  /* lock — current page isn't a link */
  color: white;
}
.lb-page-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.lb-page-ellipsis {
  align-self: flex-end;
  padding: 7px 4px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .lb-detail-summary {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .lb-detail-score { min-width: 0; }
  .lb-detail-score-num { font-size: 40px; }
}

/* coming soon */
.coming-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.coming-head h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 4px 0 10px;
  letter-spacing: -0.02em;
}
.coming-head .muted {
  max-width: 680px;
  margin: 0;
}
.coming-card {
  max-width: 680px;
}
.coming-notice {
  margin: 0 0 22px;
  color: var(--muted);
}
.wishlist-form .btn-primary {
  max-width: 220px;
}
.form-success {
  color: var(--green-dark);
  font-size: 14px;
  margin: 12px 0 0;
}

/* card */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.form-card { padding: 32px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  background: var(--bg);
  font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.field .hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row .field { margin-bottom: 18px; }

/* Opt-in checkbox row — for long-context probe and other paid extras. */
.field-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.field-checkbox input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.field-checkbox label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.5;
  flex: 1;
}
.field-checkbox label > strong { font-weight: 600; }
.field-checkbox .checkbox-hint {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
}
.field-checkbox .checkbox-hint strong { color: var(--text); font-weight: 600; }
.field-checkbox:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft, rgba(16, 185, 129, 0.06));
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px;
  font-size: 15px; font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}
.btn:hover { background: var(--bg-soft); }
.btn-primary {
  background: var(--green); color: white; border-color: var(--green);
  width: 100%; padding: 13px 22px; font-size: 16px;
}
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost { background: var(--bg); }

.form-error {
  color: var(--red);
  font-size: 14px;
  margin: 12px 0 0;
}
/* Rich error card — used when /api/detect returns 422 model_not_alive.
   Renders the inline "switch to recommended" + "force submit" actions
   instead of just text. */
.form-error.form-error-rich {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 14px 16px;
  color: #991b1b;
}
.form-error-title { font-weight: 600; margin-bottom: 4px; }
.form-error-body { font-size: 13px; color: #7f1d1d; word-break: break-word; }
.form-error-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.form-error-actions .btn { font-size: 13px; padding: 7px 14px; }

/* features */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 32px;
}
.feature h3 { font-size: 15px; margin: 0 0 6px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

/* running */
.running-card { text-align: center; padding: 56px 28px; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- result page ---------- */
.result-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 24px;
}
.result-head h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.02em; }
.result-head .muted { font-size: 14px; word-break: break-all; }
.result-actions { display: flex; gap: 8px; flex-shrink: 0; }

.result-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  align-items: center;
}
.result-left { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.score-ring {
  width: 220px; height: 220px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.score-ok      { background: var(--green); }
.score-ok-dim  { background: var(--green-dark); }
.score-warn    { background: var(--amber); }
.score-fail    { background: var(--red); }

.score-inner {
  width: calc(100% - 24px); height: calc(100% - 24px);
  background: var(--bg);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-num { font-size: 52px; font-weight: 700; letter-spacing: -0.03em; }
.score-caption { color: var(--muted); font-size: 14px; margin-top: 4px; }
.attribution { margin: 0; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.check-row:last-child { border-bottom: 0; }
.check-icon { display: flex; align-items: center; }
.check-label { font-size: 16px; }
.check-status {
  font-size: 14px; font-weight: 600;
}
.check-ok .check-status      { color: var(--green); }
.check-warn .check-status    { color: var(--amber); }
.check-fail .check-status    { color: var(--red); }
.check-muted .check-status   { color: var(--muted); }

/* metrics row */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.metrics-row-5 { grid-template-columns: repeat(5, 1fr); }
.metric {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 12px;
  text-align: center;
}
.metric-warn { border-color: var(--red); border-width: 2px; }
.metric-label { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
.metric-value { font-size: 24px; font-weight: 700; margin-top: 6px; }

.alert-card {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.notes-card {
  background: #fffbeb;
  border-color: #fde68a;
}
.notes-card h2 {
  font-size: 18px;
  margin: 0 0 12px;
}
.note-item + .note-item {
  border-top: 1px solid #fde68a;
  margin-top: 14px;
  padding-top: 14px;
}
.note-item p {
  color: #92400e;
  margin: 6px 0 0;
}

.details-card summary {
  cursor: pointer; font-weight: 600; padding: 4px 0;
}
.def-list { display: grid; grid-template-columns: 200px 1fr; gap: 10px 18px; margin-top: 14px; }
.def-list dt { font-weight: 600; }
.def-list dd { margin: 0; color: var(--muted); }

/* combobox (custom dropdown — replaces native <datalist> for mobile reliability) */
.combo { position: relative; width: 100%; }
/* input doesn't auto-fill its block container; force 100% so the combo
   matches the width of the sibling <select> in .field-row. */
.combo > input { width: 100%; }
.combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 280px;
  overflow-y: auto;
  z-index: 20;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  -webkit-overflow-scrolling: touch;
}
.combo-item {
  padding: 11px 14px;
  cursor: pointer;
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", Consolas, monospace;
  color: var(--text);
  /* mobile: bigger tap target, easier to hit */
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.combo-item:hover, .combo-item.active {
  background: var(--green-soft);
  color: var(--green-dark);
}
.combo-item:active {
  background: var(--green);
  color: white;
}
.combo-item[hidden] { display: none; }
/* When the input has a query, non-matching items dim instead of hide so the
   user can still see the relay's full model whitelist surfaced by /api/probe. */
.combo-item.no-match { opacity: 0.4; }
.combo-item.no-match:hover { opacity: 1; }

/* FAQ */
.faq { margin-top: 48px; }
.faq h2 {
  font-size: 24px;
  letter-spacing: -0.01em;
}

/* FAQ header — title row + dual-mode toggle (通俗 / 开发者).
   Two answers per question (data-mode="layperson|developer"); CSS hides
   the inactive mode based on the parent .faq's data-mode attribute. JS
   in app.js flips the attribute and persists the choice in localStorage. */
.faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}
.faq-header h2 { margin: 0; }
.faq-mode-toggle {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}
.faq-mode-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.faq-mode-btn:hover { color: var(--text); }
.faq-mode-active {
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Mode-specific answer visibility — by default both <p data-mode> are in
   DOM (so search engines see both); CSS hides whichever doesn't match
   the active mode. */
.faq[data-mode="layperson"] [data-mode="developer"] { display: none; }
.faq[data-mode="developer"] [data-mode="layperson"] { display: none; }
.faq-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 0;
  transition: box-shadow 0.15s;
}
.faq-item[open] { box-shadow: var(--shadow); }
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-body {
  padding: 0 22px 22px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}
.faq-body p:first-child { margin-top: 0; }
.faq-body ul, .faq-body ol { padding-left: 22px; }
.faq-body li { margin-bottom: 6px; }
.faq-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}
.faq-table th, .faq-table td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.faq-table th {
  background: var(--bg-soft);
  font-weight: 600;
}

/* Tablet (721px–960px): same desktop layout, just slightly tighter padding
   so on iPad portrait the brand+nav fit one row without crowding. */
@media (max-width: 960px) {
  .site-header-inner { padding: 14px 20px; gap: 20px; }
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 13px; }
}

/* Mobile (≤720px): collapse nav into hamburger dropdown. */
@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; }
  .protocol-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .answer-capsule { font-size: 16px; }
  .why-veridrop h2, .how-it-works h2 { font-size: 20px; }

  /* leaderboard 手机端:rank 列改小 + score 移到 main 下方,避免 3 列挤 */
  .lb-row {
    grid-template-columns: 32px 1fr;
    grid-template-areas:
      "rank main"
      ".    score";
    gap: 10px 12px;
  }
  .lb-rank { grid-area: rank; font-size: 18px; padding-top: 0; }
  .lb-rank-num { width: 28px; height: 28px; line-height: 28px; font-size: 12px; }
  .lb-main { grid-area: main; }
  .lb-score {
    grid-area: score;
    justify-self: start;
    min-width: 0;
    padding: 4px 10px;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
  }
  .lb-score-num { font-size: 20px; }
  .lb-score-label { margin-top: 0; }

  /* 手机端:步骤项从「左圆数字 + 右内容」改成「上数字 + 下内容」竖排,
     避免左边 32px 圆 + 16px gap 吃掉 48px 内容宽度。让描述文字填满整个
     步骤框,跟其他卡片视觉一致。 */
  .how-steps li {
    flex-direction: column;
    gap: 8px;
  }
  .field-row { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 1fr; padding: 24px; }
  .metrics-row, .metrics-row-5 { grid-template-columns: repeat(2, 1fr); }
  .def-list { grid-template-columns: 1fr; }
  .result-head { flex-direction: column; }
  .hero h1 { font-size: 28px; }
  .hub-hero h1, .coming-head h1 { font-size: 28px; }
  .coming-head { flex-direction: column; }

  /* Show hamburger; collapse nav into a dropdown panel positioned right
     under the header. */
  .nav-toggle { display: flex; }
  .site-header-inner { padding: 12px 16px; gap: 12px; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    /* Hidden by default on mobile; toggled via aria-expanded on .nav-toggle */
    display: none;
  }
  /* When the toggle's aria-expanded is true, reveal the nav.
     Sibling selector relies on toggle being a direct sibling of nav. */
  .nav-toggle[aria-expanded="true"] ~ .site-nav {
    display: flex;
  }
  .site-nav a {
    padding: 14px 20px;
    font-size: 15px;
    color: var(--text);
    border-bottom: 1px solid var(--line);
  }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav a:hover { background: var(--bg-soft); }
  /* Disable the underline animation in dropdown rows — it competes with
     the row-tap highlight and looks busy. */
  .site-nav a::after { display: none; }
  /* Mobile: GitHub icon-only button sits as a normal-looking row, not a
     32px circle in the corner of a dropdown. */
  .site-nav .nav-github {
    width: auto;
    height: auto;
    border-radius: 0;
    margin-left: 0;
    justify-content: flex-start;
    gap: 10px;
    padding: 14px 20px;
  }
  .site-nav .nav-github::before {
    content: "GitHub";
    font-size: 15px;
  }
  .site-nav .nav-github svg {
    order: -1;
  }
}

/* pre-submit /v1/models probe pill (web/static/app.js inserts it) */
.probe-pill {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.55;
}
.probe-pill .probe-headline { font-weight: 600; }
.probe-pill .probe-detail { margin-top: 4px; color: var(--muted); font-size: 12px; word-break: break-all; }
.probe-pill .probe-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.probe-pill .probe-action {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
}
.probe-ok      { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.probe-warn    { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.probe-fail    { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.probe-neutral { background: #f9fafb; border-color: #e5e7eb; color: #4b5563; }

/* =========== /faq page =========== */
.faq-hero {
  margin: 8px 0 24px;
}
.faq-hero h1 {
  font-size: 32px;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.faq-hero-sub {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  max-width: 740px;
}

/* Two-column: sticky TOC | main content */
.faq-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 16px;
}

.faq-toc {
  position: sticky;
  /* site-header is sticky at top: 0 with ~58px height; offset so TOC sits below */
  top: 78px;
  align-self: start;
  font-size: 14px;
}
.faq-toc-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.faq-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.faq-toc-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.faq-toc-list a {
  color: var(--text);
  padding: 7px 10px;
  border-radius: 6px;
  flex: 1;
  border-left: 2px solid transparent;
}
.faq-toc-list a:hover {
  background: var(--bg-soft);
  text-decoration: none;
  border-left-color: var(--green);
}
.faq-toc-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding-right: 6px;
}

/* Main column */
.faq-main { min-width: 0; }

.faq-category {
  scroll-margin-top: 76px;  /* offset for sticky header when jumping via TOC */
  margin-bottom: 48px;
}
.faq-category h2 {
  font-size: 22px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.faq-category-intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 18px;
}

.faq-entries {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-entry {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  scroll-margin-top: 76px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.faq-entry[open] {
  border-color: var(--green);
  box-shadow: 0 1px 6px rgba(16, 185, 129, 0.08);
}
.faq-entry summary.faq-q {
  cursor: pointer;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.faq-entry summary.faq-q::-webkit-details-marker { display: none; }
/* Custom triangle on the right */
.faq-entry summary.faq-q::before {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  margin-right: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.faq-entry[open] summary.faq-q::before {
  transform: rotate(45deg);
  border-color: var(--green);
}
.faq-entry summary.faq-q:hover { background: var(--bg-soft); }
.faq-entry[open] summary.faq-q:hover { background: var(--bg); }

.faq-permalink {
  margin-left: auto;
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.faq-entry:hover .faq-permalink,
.faq-entry[open] .faq-permalink { opacity: 1; }

.faq-a {
  padding: 0 16px 16px 36px;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.75;
}

.faq-no-answer {
  margin-top: 32px;
  padding: 20px 24px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.faq-no-answer h2 {
  font-size: 16px;
  margin: 0 0 8px;
}
.faq-no-answer p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.7;
}

/* "更多问题 → /faq#xxx" trailer on product pages — separates the picked
   highlight FAQ from the deep-link to the full /faq page. */
.faq-more {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--muted);
}
.faq-more a { color: var(--green-dark); }

/* Tablet (≤960px): TOC narrows but still sticky */
@media (max-width: 960px) {
  .faq-layout { grid-template-columns: 180px 1fr; gap: 28px; }
  .faq-toc { font-size: 13px; }
}

/* Mobile (≤820px, 覆盖 iPhone 全系 + iPad 竖屏):TOC 改成多行换行的 chip 卡片
   (而不是隐性横滚,所有分类一次看全),所有正文允许任意位置断词防止溢出。 */
@media (max-width: 820px) {
  .faq-hero h1 { font-size: 26px; }
  .faq-hero-sub { font-size: 14px; }
  .faq-layout { grid-template-columns: 1fr; gap: 16px; }
  .faq-toc {
    position: static;
    top: auto;
    margin: 0 0 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
  }
  .faq-toc-title { display: none; }
  .faq-toc-list {
    flex-direction: row;
    flex-wrap: wrap;       /* 多行排版,所有分类一次看全 */
    gap: 8px;
  }
  .faq-toc-list li { flex-shrink: 0; }
  .faq-toc-list a {
    background: var(--bg);
    border: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    white-space: nowrap;
    font-size: 13px;
  }
  .faq-toc-list a:hover { border-left-color: var(--line); }
  .faq-toc-count {
    background: var(--bg-soft);
    border-radius: 999px;
    padding: 1px 6px;
    margin-left: 4px;
  }
  .faq-category h2 { font-size: 20px; }
  .faq-category-intro,
  .faq-q,
  .faq-a {
    overflow-wrap: anywhere;  /* 长英文/code 可在任意位置断行,不撑宽容器 */
  }
  .faq-a { padding: 0 14px 14px 32px; font-size: 14px; }
  /* 收紧 container 横向 padding,把 16px 让给正文 */
  .container { padding-left: 16px; padding-right: 16px; }
}
