/* PathTrove homepage — minimal gray system (PathBench-like).
   Standalone: does not depend on Bulma or style.css. */


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }


/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; text-align: center; }
.hero-canvas { position: absolute; inset: 0; pointer-events: none; }
.hero .pt-container { position: relative; }
.hero-icon { width: 56px; height: 56px; margin: 0 auto 28px; }
.hero-title {
  /* Paper-title style headline: long in English, one line in Chinese. */
  max-width: 1040px; margin-left: auto; margin-right: auto;
  font-size: clamp(31px, 4.6vw, 50px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
html[lang="zh-CN"] .hero-title { max-width: none; }
.hero-subtitle {
  max-width: 680px; margin: 20px auto 0;
  font-size: 18px; font-weight: 300; line-height: 1.6; color: var(--muted);
}
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 12px 36px; margin-top: 40px;
}
.btn-primary {
  display: inline-flex; align-items: center; height: 46px; padding: 0 30px;
  border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 600;
  transition: background 0.2s;
}
.btn-primary:hover { background: #1f2937; box-shadow: 0 0 0 4px var(--teal-soft); }
.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; color: var(--ink);
}
.text-link:hover { color: var(--teal-ink); }
.text-link i, .text-link img { width: 16px; height: 16px; font-size: 15px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 900px; margin: 64px auto 0; gap: 24px;
}
.stat-value {
  font-size: clamp(36px, 4.6vw, 56px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ---------- Sections ---------- */
.band { padding: 96px 0; scroll-margin-top: 60px; }
.band--alt { background: var(--bg-alt); }
.band-head { text-align: center; max-width: 880px; margin: 0 auto 56px; }
.band-title {
  font-size: clamp(26px, 3.4vw, 38px); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.2; color: var(--ink);
}
.band-subtitle { margin-top: 14px; font-size: 16px; color: var(--muted); }

.card {
  background: var(--bg); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line-soft);
}

/* ---------- Atlas charts ---------- */
.atlas-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.chart-card { padding: 28px 32px 30px; display: flex; flex-direction: column; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.chart-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.chart-meta { margin-top: 4px; font-size: 13px; color: var(--faint); }
.chart-body { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }

.lollipop { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; align-items: center; gap: 12px; }
.lollipop-label { font-size: 13px; color: var(--text); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lollipop-track { position: relative; height: 12px; }
.lollipop-track::before {
  content: ""; position: absolute; left: 0; top: 50%; height: 2px; transform: translateY(-50%);
  width: var(--v); background: var(--bar); border-radius: 2px;
}
.lollipop-track::after {
  content: ""; position: absolute; top: 50%; left: var(--v);
  width: 10px; height: 10px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--faint);
}
.lollipop-val { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lollipop.is-top .lollipop-track::before { background: var(--teal); opacity: 0.45; }
.lollipop.is-top .lollipop-track::after { background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.lollipop.is-top .lollipop-val { color: var(--ink); font-weight: 600; }

.chart-unit { font-size: 12px; color: var(--faint); white-space: nowrap; }

.chart-sub { margin-top: 22px; font-size: 13px; font-weight: 500; color: var(--text); }
.stack { display: flex; height: 10px; margin-top: 10px; border-radius: 999px; overflow: hidden; gap: 2px; }
.stack span { display: block; height: 100%; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.stack-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.s1 { background: var(--teal); } .s2 { background: var(--pink); } .s3 { background: #9ca3af; } .s4 { background: #e5e7eb; }

/* ---------- Evidence ---------- */
.evidence-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.pillars { display: flex; flex-direction: column; gap: 32px; }
.pillar { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; }
.pillar-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--teal-soft);
  display: grid; place-items: center; color: var(--teal-ink); font-size: 15px;
}
.pillar:nth-child(2) .pillar-icon { background: var(--pink-soft); color: var(--pink-ink); }
.pillar-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.pillar-copy { margin-top: 4px; font-size: 14px; color: var(--muted); }

.record { padding: 8px 0; }
.record-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid var(--line-soft);
}
.record-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.record-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.record-name { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); }
.record-row {
  display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px;
  padding: 14px 28px; border-bottom: 1px solid var(--line-soft);
}
.record-row:last-child { border-bottom: 0; }
.record-key { font-size: 13px; color: var(--faint); }
.record-val { font-size: 14px; color: var(--ink); }
.record-val a { color: var(--teal-ink); border-bottom: 1px solid var(--teal-line); }
.record-val a:hover { border-color: var(--teal); }
.record-src {
  display: block; margin-top: 3px;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
}
.record-src::before { content: "↳ "; color: var(--pink-ink); }

/* ---------- Delivery ---------- */
.delivery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.delivery-card { padding: 28px 28px 24px; display: flex; flex-direction: column; min-width: 0; }
.delivery-title { font-size: 17px; font-weight: 600; color: var(--ink); }
.delivery-subtitle { margin-top: 4px; font-size: 13px; color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 20px; }
.tab {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; color: var(--muted);
}
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--teal-soft); color: var(--teal-ink); font-weight: 500; }
.pane { display: none; }
.pane.is-active { display: block; }

.code {
  margin: 16px 0 0; height: 340px; overflow: auto;
  background: var(--bg-alt); border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 16px 18px;
  font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--text);
  white-space: pre;
}
.code code { font: inherit; }
.code-file { display: block; margin-bottom: 8px; font-size: 11.5px; color: var(--faint); }
.hl-c { color: var(--faint); }
.hl-k { color: var(--teal-ink); font-weight: 600; }
.hl-o { color: var(--muted); }
.hl-s, .hl-j-s { color: #4b5563; }
.hl-j-k { color: var(--teal-ink); }
.hl-j-n { color: var(--pink-ink); font-weight: 600; }

.feature-line { margin-top: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.feature-line span + span::before { content: "·"; margin: 0 8px; color: var(--bar); }
.card-link { margin-top: auto; padding-top: 16px; font-size: 14px; font-weight: 500; color: var(--teal-ink); }
.card-link:hover { color: var(--teal-ink); }

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 40px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-logo { height: 22px; width: auto; }
.footer-copy { margin-top: 12px; max-width: 360px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h5 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.footer-col a:hover { color: var(--teal-ink); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--faint);
}

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 1.05s cubic-bezier(0.22, 0.61, 0.36, 1), transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .atlas-grid, .delivery-grid, .evidence-layout { grid-template-columns: minmax(0, 1fr); }
  .evidence-layout { gap: 40px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
}
@media (max-width: 560px) {
  .hero { padding: 64px 0 56px; }
  .band { padding: 64px 0; }
  .band-head { margin-bottom: 36px; }
  .chart-card, .delivery-card { padding: 22px 18px; }
  .lollipop { grid-template-columns: 84px minmax(0, 1fr) 40px; gap: 8px; }
  .record-head, .record-row { padding-left: 18px; padding-right: 18px; }
  .record-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .code { height: 300px; }
}

/* ======================= v2 sections ======================= */
.band-kicker { display: inline-block; margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--teal-ink); text-transform: uppercase; }

/* Evidence: conflict card */
.ev-card { padding: 0; overflow: hidden; }
.ev-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line-soft); }
.ev-name { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink); }
.ev-meta { font-size: 12px; color: var(--faint); }
.ev-block { padding: 18px 24px; border-bottom: 1px solid var(--line-soft); }
.ev-block:last-child { border-bottom: 0; }
.ev-label { font-size: 12px; color: var(--faint); margin-bottom: 10px; }
.ev-conflict { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; }
.ev-num { padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--line-soft); }
.ev-num b { display: block; font-size: 24px; font-weight: 600; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.ev-num span { font-size: 12px; color: var(--muted); }
.ev-num.is-kept { border-color: var(--teal-line); background: var(--teal-soft); }
.ev-num.is-kept b { color: var(--teal-ink); }
.ev-neq { font-size: 22px; font-weight: 600; color: var(--pink-ink); }
.ev-verdict { margin-top: 10px; font-size: 12.5px; color: var(--teal-ink); }
.ev-src { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ev-src::before { content: "↳ "; color: var(--pink-ink); }
.ev-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.ev-fact-k { font-size: 12px; color: var(--faint); }
.ev-fact-v { font-size: 14px; color: var(--ink); font-weight: 500; }

/* Services: flow + tiers */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.flow-step { position: relative; padding: 0 14px; text-align: center; }
.flow-step + .flow-step::before { content: ""; position: absolute; left: -8px; top: 26px; width: 16px; height: 2px; background: var(--teal-line); }
.flow-icon { width: 54px; height: 54px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-ink); font-size: 20px; }
.flow-step:nth-child(4) .flow-icon { background: var(--pink-soft); color: var(--pink-ink); }
.flow-name { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.flow-copy { margin-top: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.flow-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 8px; }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.tier { padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.tier-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tier-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.tier-copy { font-size: 13px; color: var(--muted); }
.tier-meter { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--line-soft); margin-top: 6px; }
.tier-meter span { display: block; height: 100%; background: var(--teal); }
.tier-link { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 500; color: var(--teal-ink); }
.tier-link.is-off { color: var(--faint); font-weight: 400; }
.tier.is-muted { background: var(--bg-alt); box-shadow: none; }
.tiers.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
.tiers.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.is-public { background: var(--teal-soft); color: var(--teal-ink); }
.status.is-partial { background: #eef2f7; color: #4b5563; }
.status.is-internal { background: var(--bg-alt); color: var(--faint); border: 1px solid var(--line); }
.status.is-beta { background: var(--pink-soft); color: var(--pink-ink); }

/* Delivery v2 */
.dl-verdict { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.vchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; font-size: 12px; background: var(--bg-alt); border: 1px solid var(--line-soft); color: var(--text); }
.vchip b { font-weight: 600; }
.vchip.is-ok b { color: var(--teal-ink); }
.vchip.is-fail b { color: var(--pink-ink); }
.vchip.is-gate b { color: #6b7280; }
.tab-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 18px; }
.tab-group-label { font-size: 11.5px; color: var(--faint); margin-right: 2px; }
.tab-group-sep { width: 1px; height: 16px; background: var(--line); margin: 0 8px; }
.delivery-card .code { height: 250px; margin-top: 12px; }
.platforms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.platforms .gray-tag b { color: var(--ink); margin-left: 5px; font-weight: 600; }

.pipe { display: flex; flex-direction: column; gap: 0; margin-top: 18px; }
.pipe-step { position: relative; padding-left: 34px; padding-bottom: 14px; }
.pipe-step::before { content: attr(data-n); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--teal-soft); color: var(--teal-ink); }
.pipe-step:last-child::before { background: var(--pink-soft); color: var(--pink-ink); }
.pipe-step:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 26px; bottom: 2px; width: 2px; background: var(--line); }
.pipe-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 22px; }
.pipe-name small { font-weight: 400; color: var(--faint); margin-left: 6px; font-size: 12px; }
.pipe .code { height: auto; max-height: 190px; margin-top: 8px; padding: 12px 14px; font-size: 11.5px; }
.pipe-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

@media (max-width: 900px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .flow-step { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 4px 14px; text-align: left; padding: 0; }
  .flow-step + .flow-step::before { display: none; }
  .flow-icon { grid-row: span 3; margin: 0; }
  .flow-name { margin-top: 0; }
  .flow-chips { justify-content: flex-start; }
  .tiers, .tiers.is-four, .tiers.is-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ev-head, .ev-block { padding-left: 18px; padding-right: 18px; }
  .ev-conflict { grid-template-columns: minmax(0, 1fr); }
  .ev-neq { text-align: center; }
  .ev-facts { grid-template-columns: minmax(0, 1fr); }
}
.tab-group .tab { padding: 4px 9px; font-size: 12px; }
.tab-group-sep { margin: 0 4px; }
