/* ============================================================
   PPC Stack Lab — clinical reference instrument
   Near-white · near-black · one signal-lime accent · rules not cards
   One type family (Inter) + monospace for data only.
   ============================================================ */

:root {
  --paper: #f7f7f5;
  --surface: #ffffff;
  --ink: #0e0f11;
  --ink-soft: #3b3f45;
  --muted: #6c7075;
  --faint: #9aa0a6;
  --line: #e4e4e0;
  --line-strong: #cfd0cb;

  --accent: #c9f63b;         /* signal lime — the one accent */
  --accent-ink: #101208;
  --accent-dim: #edf8cd;
  --ok: #157f3d;
  --ok-dim: #e8f5ec;
  --bad: #d93b3b;
  --bad-dim: #fdecec;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 4px;
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--font-sans); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.wrap { width: min(var(--maxw), calc(100% - 44px)); margin-inline: auto; }

/* monospace data labels */
.tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tag b { color: var(--ink); font-weight: 500; }
.tag.ok { color: var(--ok); }
.tag.bad { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 247, 245, 0.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand .mark { width: 24px; height: 24px; border-radius: 5px; flex: none; object-fit: cover; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-cta { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; border-radius: var(--radius); text-decoration: none; transition: transform .12s ease; }
.nav-cta:hover { color: var(--accent-ink); transform: translateY(-1px); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: var(--radius); font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid var(--ink); text-decoration: none; transition: transform .12s ease, background .15s ease; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { background: var(--accent-dim); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ---------- hero ---------- */
.hero { padding: 80px 0 48px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: center; }
.hero .tag { display: flex; align-items: center; gap: 8px; }
.hero .tag::before { content: ""; width: 8px; height: 8px; background: var(--accent); border-radius: 2px; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; margin: 18px 0 18px; max-width: 17ch; }
.hero .lede { font-size: 18px; color: var(--ink-soft); max-width: 54ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 20px; font-size: 13px; color: var(--faint); }

/* data readout (hero instrument) */
.readout { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.readout .head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.readout .row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.readout .row:last-child { border-bottom: 0; }
.readout .row .n { font-size: 14px; font-weight: 600; }
.readout .row .s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.verdict-chip { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 9px; border-radius: 3px; }
.verdict-chip.keep { background: var(--ok-dim); color: var(--ok); }
.verdict-chip.replace { background: var(--bad-dim); color: var(--bad); }
.verdict-chip.add { background: var(--accent); color: var(--accent-ink); }
.readout .foot { padding: 10px 14px; font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); border-top: 1px solid var(--line); }

/* ---------- index (ruled list, not cards) ---------- */
.index { border-top: 1px solid var(--line); }
.index-item { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); }
.index-item .tag { margin-bottom: 8px; }
.index-item h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.index-item p { color: var(--muted); max-width: 60ch; }
.index-item .go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; }
.index-item .go::after { content: "→"; transition: transform .15s ease; }
.index-item:hover .go::after { transform: translateX(4px); }
.index-item .tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.index-item .tool-pill { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: 3px; padding: 3px 9px; }

/* ---------- method (numbered, ruled) ---------- */
.method { border-top: 1px solid var(--line); }
.method-row { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.method-row .n { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.method-row h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.method-row p { color: var(--muted); max-width: 62ch; }

/* ---------- closing ---------- */
.closing { background: var(--ink); color: #e7e9e6; }
.closing .wrap { padding: 72px 0; }
.closing h2 { color: #fff; font-size: clamp(26px, 4vw, 40px); letter-spacing: -0.02em; max-width: 20ch; margin-bottom: 18px; }
.closing p { color: #a8acaa; max-width: 52ch; }
.closing .btn { border-color: var(--accent); color: var(--accent); }
.closing .btn:hover { background: var(--accent); color: var(--accent-ink); }
.closing .hero-actions { margin-top: 26px; }

/* ---------- section ---------- */
.section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.025em; margin: 10px 0 12px; }
.section-head p { color: var(--muted); }
.section-head .tag { display: block; margin-bottom: 4px; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* trust byline (A: author + dated review + method + disclosure at the friction point) */
.byline { font-family: var(--font-mono); font-size: 12px; color: var(--faint); margin: 6px 0 0; }
.byline b { color: var(--muted); font-weight: 600; }
.byline a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.byline a:hover { color: var(--ink); }

/* ---------- review pages ---------- */
.verdict { border: 1px solid var(--line); background: var(--surface); padding: 24px 26px; margin: 24px 0 4px; }
.verdict .quick { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.verdict p { font-size: 18px; color: var(--ink-soft); line-height: 1.6; }
.verdict p b { color: var(--ink); }
.verdict .meta { margin-top: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--faint); }

.tool-card { border-bottom: 1px solid var(--line); padding: 26px 0; }
.tool-card:last-child { border-bottom: 0; }
.tool-card.winner { }
.tool-card-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 16px; align-items: start; }
.tool-card-head .rank { font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--muted); }
.tool-card.winner .rank { color: var(--ink); }
.tool-card-head h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.tool-card-head .tagline { color: var(--muted); font-size: 14px; margin-top: 3px; }
.badge { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 9px; border-radius: 3px; }
.badge.best { background: var(--accent); color: var(--accent-ink); }
.badge.budget, .badge.free { background: var(--ok-dim); color: var(--ok); }
.badge.power { background: var(--ink); color: #fff; }
.tool-card-body { padding: 16px 0 0 56px; }
.tool-card-body > p { color: var(--muted); margin-bottom: 16px; max-width: 68ch; }

.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 16px; }
.fit { background: var(--surface); padding: 16px 18px; }
.fit h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.fit.best h4 { color: var(--ok); }
.fit.not h4 { color: var(--bad); }
.fit ul { margin: 0; padding-left: 18px; }
.fit li { font-size: 14.5px; margin-bottom: 6px; color: var(--ink-soft); }

.pricing-note { border: 1px solid var(--line); background: var(--paper); padding: 14px 16px; font-size: 14px; color: var(--muted); }
.pricing-note b { color: var(--ink); }
.pricing-note .unknown { color: var(--bad); }

.compare-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); margin: 22px 0; background: var(--surface); }
.compare-table th, .compare-table td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; color: var(--ink-soft); }
.compare-table thead th { background: var(--ink); color: #fff; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.03em; }
.compare-table td.dim { color: var(--muted); font-weight: 600; background: var(--paper); font-family: var(--font-mono); font-size: 12.5px; }
.compare-table .win { background: var(--accent-dim); color: var(--ink); font-weight: 600; }
.compare-table .num { font-variant-numeric: tabular-nums; }

.disclosure { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--paper); padding: 16px 18px; font-size: 13.5px; color: var(--ink-soft); margin: 22px 0; }
.disclosure b { color: var(--ink); }

.faq { margin: 28px 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 16px 0; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq .a { padding: 0 0 16px; color: var(--muted); font-size: 14.5px; }

.breadcrumbs { font-family: var(--font-mono); font-size: 12px; color: var(--faint); padding: 24px 0 0; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 40px; margin-top: 48px; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; }
.site-footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.site-footer a { display: block; color: var(--muted); font-size: 14px; margin-bottom: 8px; text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .fine { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }

/* faint reveal (one-time, no stagger theater) */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- overlap instrument (signature) ---------- */
.overlap { margin-top: 32px; }
.obar { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.olabel { font-size: 14px; font-weight: 600; }
.otrack { display: flex; gap: 4px; height: 36px; opacity: 0; transform: translateX(-24px); transition: opacity .5s ease var(--d, 0s), transform .5s ease var(--d, 0s); }
.obar.in .otrack { opacity: 1; transform: none; }
.oseg { flex: 1; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 3px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; padding: 0 8px; }
.oseg.dup { background: var(--accent); color: var(--accent-ink); font-weight: 600; border-color: transparent; }
.olegend { display: flex; gap: 22px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.olegend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.olegend .sw.dup { background: var(--accent); }
.olegend .sw.norm { background: var(--surface); border: 1px solid var(--line-strong); }

/* stat row */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 40px; }
.stat { padding: 24px 20px 0 0; }
.stat .n { font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .n .u { font-size: .48em; color: var(--muted); margin-left: 3px; font-weight: 600; }
.stat .l { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
@media (max-width: 720px) { .stat-row { grid-template-columns: 1fr; } .obar { grid-template-columns: 1fr; gap: 8px; } .olegend { flex-wrap: wrap; } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .fit-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .index-item { grid-template-columns: 1fr; }
  .tool-card-body { padding-left: 0; }
  .compare-table { display: block; overflow-x: auto; }
}
@media (max-width: 720px) { .nav-links { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}