/* Product listing detail page v2 (#4461, epic #4459).
 *
 * The `product` detail page rendered in the shared pp-* / sx-* v2 chrome the
 * other listing families already use, ported from the design prototype
 * `Sigrix_new/marketplace/Marketplace - Listing Product v2.html`.
 *
 * Persona / prompt / skill each carry their copy of this vocabulary inline in
 * their template. Product does not: the page-local `.product-*` classes and
 * inline <style> blocks it used to carry are retired in favour of this file
 * (the epic's Story 2 brief), so the markup stays readable and the rules are
 * cacheable. Everything here is scoped to `body.product-page` so it cannot
 * leak into the pages that still style themselves inline.
 *
 * Accent: the canonical product accent is `#EC6AB8`
 * (`components/_listing_type_colors.html`). Brief §5.4 resolved the drift —
 * the `#C42B6E` / `#B91C5C` values other product surfaces grew are NOT
 * reintroduced here. Light theme needs a darker ink for text-on-white
 * contrast, so it is *derived* from the canonical hex with color-mix rather
 * than declared as a second brand colour: one source of truth, two readable
 * renderings.
 */

/* ── tokens ─────────────────────────────────────────────────────────── */

body.product-page {
  --pd-bg: #f7f6f3;
  --pd-bg-1: #ffffff;
  --pd-bg-2: #faf9f5;
  --pd-surface: #ffffff;
  --pd-surface-2: #f2f0ea;
  --pd-line: rgba(20, 22, 28, 0.1);
  --pd-line-strong: rgba(20, 22, 28, 0.18);
  --pd-text: #15171c;
  --pd-text-mute: rgba(21, 23, 28, 0.72);
  --pd-text-soft: rgba(21, 23, 28, 0.55);
  --pd-text-faint: rgba(21, 23, 28, 0.38);
  --pd-accent: #3d4dff;
  --pd-accent-2: #1a1f6b;
  --pd-accent-ink: #ffffff;
  --pd-brand-grad: linear-gradient(135deg, #3d4dff 0%, #1a1f6b 100%);
  --pd-brand-grad-rev: linear-gradient(135deg, #1a1f6b 0%, #3d4dff 100%);

  /* The canonical product accent, and the two shades derived from it. */
  --pd-type-base: #ec6ab8;
  --pd-type: color-mix(in srgb, var(--pd-type-base) 62%, #4a0824);
  --pd-type-2: color-mix(in srgb, var(--pd-type-base) 44%, #4a0824);
  --pd-type-soft: color-mix(in srgb, var(--pd-type-base) 12%, transparent);
  --pd-type-line: color-mix(in srgb, var(--pd-type-base) 40%, transparent);
  --pd-type-ink: #ffffff;

  --pd-good: #2a8b5a;
  --pd-warn: #b4761e;
  --pd-bad: #c2453f;

  /* Service dots. Unmapped services fall back to --pd-svc-default, so a
     service this palette has never seen still renders a dot rather than a
     hole. */
  --pd-svc-default: var(--pd-text-faint);
  --pd-svc-n8n: var(--pd-type-base);
  --pd-svc-gmail: #b4761e;
  --pd-svc-openai: #20867a;
  --pd-svc-sheets: #2a8b5a;
  --pd-svc-calendar: #3d4dff;
  --pd-svc-slack: #7b3fa0;
  --pd-svc-telegram: #1d7fa8;
  --pd-svc-twilio: #c2453f;
  --pd-svc-anthropic: #b4761e;
  --pd-svc-retell: #7b3fa0;

  --pd-shadow-md: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 4px 14px rgba(20, 22, 28, 0.06);
  --pd-shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 36px rgba(20, 22, 28, 0.1);
  --pd-r-sm: 6px;
  --pd-r-md: 10px;
  --pd-r-lg: 14px;
  --pd-r-xl: 20px;
  --pd-mono: "JetBrains Mono", ui-monospace, sfmono-regular, monospace;
  --pd-display: "Space Grotesk", "Geist", system-ui, sans-serif;
}

[data-theme="dark"] body.product-page {
  --pd-bg: #0b0d12;
  --pd-bg-1: #0f121a;
  --pd-bg-2: #131724;
  --pd-surface: #161a26;
  --pd-surface-2: #1c2230;
  --pd-line: rgba(255, 255, 255, 0.08);
  --pd-line-strong: rgba(255, 255, 255, 0.14);
  --pd-text: #eceef3;
  --pd-text-mute: rgba(236, 238, 243, 0.72);
  --pd-text-soft: rgba(236, 238, 243, 0.5);
  --pd-text-faint: rgba(236, 238, 243, 0.32);
  --pd-accent: #3d4dff;
  --pd-accent-2: #1a1f6b;
  --pd-brand-grad: linear-gradient(135deg, #6b78ff 0%, #1a1f6b 100%);
  --pd-brand-grad-rev: linear-gradient(135deg, #3d4dff 0%, #1a1f6b 100%);

  /* Dark theme wears the canonical accent unmodified. */
  --pd-type: var(--pd-type-base);
  --pd-type-2: color-mix(in srgb, var(--pd-type-base) 78%, #000000);
  --pd-type-soft: color-mix(in srgb, var(--pd-type-base) 14%, transparent);
  --pd-type-line: color-mix(in srgb, var(--pd-type-base) 32%, transparent);
  --pd-type-ink: #2b0716;

  --pd-good: #5bd894;
  --pd-warn: #f5b454;
  --pd-bad: #f47b7b;

  --pd-svc-gmail: #f5b454;
  --pd-svc-openai: #7ce3d4;
  --pd-svc-sheets: #62d38c;
  --pd-svc-calendar: #8fa8ff;
  --pd-svc-slack: #d4bbff;
  --pd-svc-telegram: #7cc9e3;
  --pd-svc-twilio: #f47b7b;
  --pd-svc-anthropic: #f5b454;
  --pd-svc-retell: #d4bbff;

  --pd-shadow-md: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 28px rgba(0, 0, 0, 0.32);
  --pd-shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 60px rgba(0, 0, 0, 0.55);
}

body.product-page {
  background: var(--pd-bg);
  color: var(--pd-text);

  /* Shared partials this page includes (`_listing_faq.html`,
     `_related_listings.html`, the readiness meter, the tokens tab) style
     themselves with the neutral --sx-* tokens. Alias them onto this page's
     palette so an included block inherits the product theme instead of
     falling back to its own hardcoded defaults. */
  --sx-bg: var(--pd-bg);
  --sx-bg-1: var(--pd-bg-1);
  --sx-bg-2: var(--pd-bg-2);
  --sx-surface: var(--pd-surface);
  --sx-surface-2: var(--pd-surface-2);
  --sx-line: var(--pd-line);
  --sx-line-2: var(--pd-line-strong);
  --sx-text: var(--pd-text);
  --sx-text-2: var(--pd-text-mute);
  --sx-text-3: var(--pd-text-soft);
  --sx-mute: var(--pd-text-faint);
  --sx-brand: var(--pd-accent);
  --sx-brand-3: var(--pd-accent);
  --sx-accent: var(--pd-type);
  --sx-good: var(--pd-good);
  --sx-warn: var(--pd-warn);
  --sx-danger: var(--pd-bad);
  --sx-r-sm: var(--pd-r-sm);
  --sx-r-md: var(--pd-r-md);
  --sx-r-lg: var(--pd-r-lg);
}

body.product-page .pd-mono { font-family: var(--pd-mono); letter-spacing: -0.01em; }
body.product-page .pd-num { font-variant-numeric: tabular-nums; }
body.product-page .pd-shell { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 760px) { body.product-page .pd-shell { padding: 0 20px; } }

body.product-page .pd-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--pd-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--pd-text-soft);
}

/* ── buttons ────────────────────────────────────────────────────────── */

body.product-page .pd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; min-height: 40px; border-radius: var(--pd-r-md);
  border: 1px solid var(--pd-line); background: var(--pd-surface);
  color: var(--pd-text); font-weight: 500; font-size: 14px;
  letter-spacing: -0.005em; white-space: nowrap; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
body.product-page .pd-btn:hover { background: var(--pd-surface-2); color: var(--pd-text); }
body.product-page .pd-btn:active { transform: translateY(1px); }
body.product-page .pd-btn--type {
  background: var(--pd-type); color: var(--pd-type-ink); border-color: transparent;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 6px 18px color-mix(in srgb, var(--pd-type) 26%, transparent);
}
body.product-page .pd-btn--type:hover { background: var(--pd-type-2); color: var(--pd-type-ink); }
body.product-page .pd-btn--brand {
  background: var(--pd-brand-grad); color: var(--pd-accent-ink);
  border-color: transparent; font-weight: 600;
}
body.product-page .pd-btn--brand:hover { background: var(--pd-brand-grad-rev); color: var(--pd-accent-ink); }
body.product-page .pd-btn--ghost { background: transparent; border-color: transparent; }
body.product-page .pd-btn--ghost:hover { background: var(--pd-surface-2); }
body.product-page .pd-btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
body.product-page .pd-btn--lg { min-height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; font-weight: 600; }
body.product-page .pd-btn[disabled],
body.product-page .pd-btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* ── hero ───────────────────────────────────────────────────────────── */

body.product-page .pp-hero { position: relative; padding: 28px 0 36px; overflow: hidden; }
body.product-page .pp-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 85% -10%, var(--pd-type-soft) 0%, transparent 55%),
    radial-gradient(110% 80% at 0% 110%, color-mix(in srgb, var(--pd-accent) 10%, transparent) 0%, transparent 50%);
}
body.product-page .pp-hero > .pd-shell { position: relative; }
body.product-page .pp-hero-grid {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 44px; align-items: stretch;
}
@media (max-width: 1080px) { body.product-page .pp-hero-grid { grid-template-columns: 1fr; gap: 28px; } }

body.product-page .pp-cover-frame {
  position: relative; aspect-ratio: 8 / 5; border-radius: var(--pd-r-xl);
  overflow: hidden; border: 1px solid var(--pd-line); background: var(--pd-bg-2);
  box-shadow: var(--pd-shadow-lg);
}
body.product-page .pp-cover-frame > img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.product-page .pp-cover-overlay {
  position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex;
  align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--pd-mono); font-size: 11px; color: var(--pd-text-soft);
  letter-spacing: 0.04em;
}
body.product-page .pp-cover-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; background: color-mix(in srgb, var(--pd-bg) 60%, transparent);
  border: 1px solid var(--pd-line-strong); color: var(--pd-text-mute);
  backdrop-filter: blur(6px);
}
body.product-page .pp-cover-tag .d { width: 6px; height: 6px; border-radius: 50%; background: var(--pd-type); }
body.product-page .pd-cover-glyph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--pd-mono); font-size: 56px; color: var(--pd-type); opacity: 0.5;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pd-type) 16%, var(--pd-bg-2)) 0%, var(--pd-bg-2) 100%);
}

body.product-page .pp-hero-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
body.product-page .pp-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--pd-mono); font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--pd-type); margin: 0 0 16px;
}
body.product-page .pp-hero-eyebrow .d { width: 6px; height: 6px; border-radius: 50%; background: var(--pd-type); }
body.product-page .pp-hero-eyebrow .sep { width: 1px; height: 11px; background: var(--pd-line-strong); }
body.product-page .pp-hero-eyebrow .pd-mono { color: var(--pd-text-soft); text-transform: none; letter-spacing: 0; }

body.product-page .pp-title {
  font-family: var(--pd-display); font-weight: 700;
  font-size: clamp(34px, 4.6vw, 56px); line-height: 1.03; letter-spacing: -0.035em;
  margin: 0 0 12px; color: var(--pd-text);
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
body.product-page .pp-tagline {
  font-size: 18px; line-height: 1.45; color: var(--pd-text); margin: 0 0 12px;
  font-weight: 500; letter-spacing: -0.012em; text-wrap: pretty; max-width: 46ch;
}
body.product-page .pp-desc {
  font-size: 14.5px; line-height: 1.6; color: var(--pd-text-mute); margin: 0 0 20px;
  max-width: 58ch; text-wrap: pretty;
}
body.product-page .pp-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; }
body.product-page .pp-tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--pd-line); background: var(--pd-surface);
  color: var(--pd-text-mute); font-size: 12px; font-family: var(--pd-mono);
  text-decoration: none; transition: background 0.15s, color 0.15s;
}
body.product-page .pp-tag::before { content: "#"; color: var(--pd-text-faint); margin-right: 2px; }
body.product-page .pp-tag:hover { background: var(--pd-type-soft); color: var(--pd-type); border-color: var(--pd-type-line); }

/* byline + proof pills */
body.product-page .pd-byline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
body.product-page .pd-byline-av {
  width: 28px; height: 28px; border-radius: 8px; object-fit: cover;
  background: var(--pd-type-soft); border: 1px solid var(--pd-type-line);
  color: var(--pd-type); display: inline-flex; align-items: center;
  justify-content: center; font-family: var(--pd-display); font-weight: 600; font-size: 13px;
}
body.product-page .pd-byline-name { font-size: 14px; font-weight: 500; text-decoration: none; }
body.product-page .pd-byline-name:hover { color: var(--pd-type); }
body.product-page .pd-founding {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 999px; background: var(--pd-type-soft); border: 1px solid var(--pd-type-line);
  color: var(--pd-type); font-family: var(--pd-mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
body.product-page .pd-proof { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
body.product-page .pd-proof .p {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--pd-surface); border: 1px solid var(--pd-line);
  color: var(--pd-text-mute); font-size: 12px; text-decoration: none;
}
body.product-page .pd-proof a.p:hover { color: var(--pd-type); border-color: var(--pd-type-line); }
body.product-page .pd-proof .p.is-empty { border-style: dashed; color: var(--pd-text-soft); }
body.product-page .pd-proof-note { font-size: 12.5px; color: var(--pd-text-soft); margin: -8px 0 16px; }

/* ── buy box ────────────────────────────────────────────────────────── */

body.product-page .pd-buy {
  border: 1px solid var(--pd-line); border-radius: var(--pd-r-lg);
  background: linear-gradient(180deg, var(--pd-bg-1) 0%, var(--pd-bg-2) 100%);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 18px; box-shadow: var(--pd-shadow-md);
}
body.product-page .pd-buy-top {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
body.product-page .pd-buy-price { display: flex; flex-direction: column; gap: 2px; }
body.product-page .pd-buy-price .l {
  font-family: var(--pd-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--pd-text-faint);
}
body.product-page .pd-buy-price .v {
  font-family: var(--pd-display); font-weight: 700; font-size: 30px;
  letter-spacing: -0.02em; line-height: 1;
}
body.product-page .pd-buy-price .v.is-free { color: var(--pd-good); }
body.product-page .pd-buy-price .s { font-size: 12px; color: var(--pd-text-soft); }
body.product-page .pd-buy-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
body.product-page .pd-buy-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 12px; border-top: 1px dashed var(--pd-line);
  font-size: 12.5px; color: var(--pd-text-soft); flex-wrap: wrap;
}
body.product-page .pd-buy-hint { margin: 0; font-size: 12.5px; color: var(--pd-text-soft); }

/* ── state banners ──────────────────────────────────────────────────── */

body.product-page .pd-banner { border-bottom: 1px solid var(--pd-line); }
body.product-page .pd-banner-in {
  display: flex; align-items: center; gap: 14px; padding: 12px 0; flex-wrap: wrap;
}
body.product-page .pd-banner .ico {
  width: 30px; height: 30px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
body.product-page .pd-banner .t { font-weight: 600; font-size: 14px; margin: 0; }
body.product-page .pd-banner .s { font-size: 12.5px; color: var(--pd-text-mute); margin: 1px 0 0; }
body.product-page .pd-banner .sp { flex: 1; min-width: 20px; }
body.product-page .pd-banner-acts { display: flex; gap: 8px; flex-wrap: wrap; }
body.product-page .pd-banner--buyer {
  background: color-mix(in srgb, var(--pd-good) 10%, var(--pd-bg));
  border-bottom-color: color-mix(in srgb, var(--pd-good) 26%, var(--pd-line));
}
body.product-page .pd-banner--buyer .ico { background: var(--pd-good); color: #06240f; }
body.product-page .pd-banner--seller {
  background: color-mix(in srgb, var(--pd-accent) 11%, var(--pd-bg));
  border-bottom-color: color-mix(in srgb, var(--pd-accent) 28%, var(--pd-line));
}
body.product-page .pd-banner--seller .ico { background: var(--pd-accent); color: #fff; }
body.product-page .pd-banner--preview {
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--pd-warn) 13%, var(--pd-bg)) 0 14px,
    color-mix(in srgb, var(--pd-warn) 8%, var(--pd-bg)) 14px 28px);
  border-bottom-color: color-mix(in srgb, var(--pd-warn) 34%, var(--pd-line));
}
body.product-page .pd-banner--preview .ico { background: var(--pd-warn); color: #2a1b02; }

/* ── cards ──────────────────────────────────────────────────────────── */

body.product-page .pp-card {
  background: var(--pd-bg-1); border: 1px solid var(--pd-line);
  border-radius: var(--pd-r-lg); padding: 28px; box-shadow: var(--pd-shadow-md);
}
@media (max-width: 600px) { body.product-page .pp-card { padding: 20px; } }
body.product-page .pp-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
body.product-page .pp-card-head h2 {
  font-family: var(--pd-display); font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em; margin: 6px 0 0;
}
body.product-page .pp-card-head h3 {
  font-family: var(--pd-display); font-size: 17px; font-weight: 600;
  letter-spacing: -0.015em; margin: 0;
}
body.product-page .pp-card-head .sub {
  color: var(--pd-text-mute); font-size: 13.5px; margin: 6px 0 0;
  max-width: 64ch; line-height: 1.55;
}
body.product-page .pp-locked,
body.product-page .pp-tested {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; background: var(--pd-surface-2); color: var(--pd-text-soft);
  border: 1px solid var(--pd-line); font-family: var(--pd-mono); font-size: 11px; white-space: nowrap;
}
body.product-page .pp-tested.is-type { background: var(--pd-type-soft); border-color: var(--pd-type-line); color: var(--pd-type); }

/* ── tabs ───────────────────────────────────────────────────────────── */

body.product-page .pp-tabs-wrap {
  position: sticky; top: 60px; z-index: 20;
  background: color-mix(in srgb, var(--pd-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--pd-line); border-bottom: 1px solid var(--pd-line);
}
body.product-page .pp-tabs-row {
  display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 16px;
}
/* The tablist keeps its shared `type-tabs` class (the tab controller and the
   contract tests both key off it), so the pill-box chrome that class carries
   globally has to be unwound here — v2 wants a flat underlined bar. */
body.product-page .pp-tabs {
  display: flex; align-items: center; min-width: 0; overflow-x: auto; scrollbar-width: none;
  gap: 0; padding: 0; background: transparent; border: 0; border-radius: 0;
  box-shadow: none; flex-wrap: nowrap;
}
body.product-page .pp-tabs::-webkit-scrollbar { display: none; }
body.product-page .pp-tabs .tab-pill {
  position: relative; padding: 0 4px; height: 47px; min-height: 47px; min-width: 0;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  color: var(--pd-text-mute); font-size: 14px; font-weight: 500;
  letter-spacing: -0.008em; margin-right: 20px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
body.product-page .pp-tabs .tab-pill:hover { color: var(--pd-text); }
body.product-page .pp-tabs .tab-pill.is-active,
body.product-page .pp-tabs .tab-pill[aria-selected="true"] { color: var(--pd-text); background: transparent; }
body.product-page .pp-tabs .tab-pill[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--pd-type); border-radius: 2px 2px 0 0;
}
body.product-page .pp-tab-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--pd-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pd-accent) 22%, transparent);
}
body.product-page .pp-tab-count { color: var(--pd-text-faint); font-family: var(--pd-mono); font-size: 11.5px; }
body.product-page .pp-tabs-aux { display: flex; align-items: center; gap: 4px; }
body.product-page .pp-tab-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border-radius: 6px; font-size: 13px; color: var(--pd-text-mute); text-decoration: none;
}
body.product-page .pp-tab-link:hover { background: var(--pd-surface-2); color: var(--pd-text); }
@media (max-width: 760px) { body.product-page .pp-tabs-aux { display: none; } }

/* ── layout ─────────────────────────────────────────────────────────── */

body.product-page .pp-main { padding: 32px 0 60px; }
body.product-page .pp-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start;
}
@media (max-width: 1080px) { body.product-page .pp-grid { grid-template-columns: 1fr; } }
body.product-page .pp-content { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
body.product-page .pp-rail { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1080px) { body.product-page .pp-rail { position: static; } }
body.product-page .pd-above { padding: 0 0 8px; display: flex; flex-direction: column; gap: 20px; }
body.product-page .product-tab-panel[hidden] { display: none; }
body.product-page .product-tab-panel { display: flex; flex-direction: column; gap: 20px; }

/* ── rail cards ─────────────────────────────────────────────────────── */

body.product-page .pp-rail-card {
  background: var(--pd-bg-1); border: 1px solid var(--pd-line);
  border-radius: var(--pd-r-lg); padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
body.product-page .pp-rail-card.is-type {
  border-color: var(--pd-type-line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--pd-type) 6%, var(--pd-bg-1)) 0%, var(--pd-bg-1) 100%);
}
body.product-page .pp-rail-card h2,
body.product-page .pp-rail-card h3 {
  font-family: var(--pd-display); font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em; margin: 0;
}
body.product-page .pd-railcta { display: flex; flex-direction: column; gap: 10px; }
body.product-page .pd-railcta-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
body.product-page .pd-railcta-row .p {
  font-family: var(--pd-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em;
}
body.product-page .pd-railcta-row .p.is-free { color: var(--pd-good); }
body.product-page .pd-railcta-row .m {
  font-family: var(--pd-mono); font-size: 11.5px; color: var(--pd-text-soft); text-align: right;
}
body.product-page .pd-bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
body.product-page .pd-bullets li {
  display: flex; align-items: flex-start; gap: 8px; font-size: 13px;
  color: var(--pd-text-mute); line-height: 1.45;
}
body.product-page .pd-bullets li svg { color: var(--pd-good); flex-shrink: 0; margin-top: 3px; }

body.product-page .pp-seller-row { display: flex; align-items: center; gap: 12px; }
body.product-page .pp-seller-av {
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
  background: var(--pd-type-soft); border: 1px solid var(--pd-type-line); color: var(--pd-type);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--pd-display); font-weight: 600; font-size: 16px;
}
body.product-page .pp-seller-info { flex: 1; min-width: 0; }
body.product-page .pp-seller-name { font-weight: 600; font-size: 14.5px; text-decoration: none; }
body.product-page .pp-seller-handle { color: var(--pd-text-soft); font-size: 12px; }
body.product-page .pp-seller-bio { font-size: 13px; color: var(--pd-text-mute); margin: 0; line-height: 1.55; }
body.product-page .pp-seller-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--pd-line); padding-top: 12px;
}
body.product-page .pp-seller-stats > div { text-align: center; }
body.product-page .pp-seller-stats .v { font-family: var(--pd-display); font-weight: 600; font-size: 18px; }
body.product-page .pp-seller-stats .l {
  font-family: var(--pd-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pd-text-faint); margin-top: 2px;
}
body.product-page .pp-stats-list { list-style: none; margin: 0; padding: 0; }
body.product-page .pp-stats-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px dashed var(--pd-line); font-size: 13.5px;
}
body.product-page .pp-stats-list li:last-child { border-bottom: 0; }
body.product-page .pp-stats-list .l { color: var(--pd-text-soft); }
body.product-page .pp-stats-list .v { color: var(--pd-text); text-align: right; }
body.product-page .pp-stats-list .v.mute { color: var(--pd-text-faint); }
body.product-page .pd-rail-yourcopy {
  border-top: 1px solid var(--pd-line); padding-top: 14px;
  display: flex; flex-direction: column; gap: 10px;
}

/* ── lists / prose shared by the tab panels ─────────────────────────── */

body.product-page .pd-getlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
body.product-page .pd-getlist li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.55; }
body.product-page .pd-getlist .c { color: var(--pd-good); flex-shrink: 0; margin-top: 3px; }
body.product-page .pd-prose { font-size: 14.5px; line-height: 1.65; color: var(--pd-text-mute); max-width: 72ch; text-wrap: pretty; }
body.product-page .pd-prose p { margin: 0 0 12px; }
body.product-page .pd-prose p:last-child { margin-bottom: 0; }
body.product-page .pd-empty {
  border: 1px dashed var(--pd-line-strong); border-radius: var(--pd-r-md);
  background: repeating-linear-gradient(135deg, transparent 0 8px,
    color-mix(in srgb, var(--pd-text) 3%, transparent) 8px 16px);
  padding: 28px 22px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
body.product-page .pd-empty .t { font-size: 14.5px; font-weight: 500; }
body.product-page .pd-empty .s { font-size: 13px; color: var(--pd-text-soft); max-width: 46ch; text-wrap: pretty; }

/* ── readiness ──────────────────────────────────────────────────────── */

body.product-page .pd-ready-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
body.product-page .pd-tier {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--pd-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em;
}
body.product-page .pd-tier .c { font-family: var(--pd-mono); font-size: 12px; color: var(--pd-text-soft); font-weight: 400; }
body.product-page .pd-meter { display: flex; gap: 4px; flex: 1; min-width: 180px; max-width: 320px; }
body.product-page .pd-meter span {
  flex: 1; height: 8px; border-radius: 3px; background: var(--pd-surface-2); border: 1px solid var(--pd-line);
}
body.product-page .pd-meter span.on { background: var(--pd-type); border-color: var(--pd-type); }

/* ── about FAQ + support strip + related ────────────────────────────── */

body.product-page .pd-about { margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--pd-line); }
body.product-page .pd-about-head { margin-bottom: 20px; }
body.product-page .pd-about-head h2 {
  font-family: var(--pd-display); font-size: 28px; font-weight: 600;
  letter-spacing: -0.025em; margin: 8px 0 6px;
}
body.product-page .pd-about-head p { margin: 0; color: var(--pd-text-mute); font-size: 14px; max-width: 64ch; }
body.product-page .pd-support { margin-top: 48px; padding: 26px 0 0; border-top: 1px solid var(--pd-line); }
body.product-page .pd-support-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
body.product-page .pd-support-h .t {
  font-family: var(--pd-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--pd-text-faint);
}
body.product-page .pd-support-h .s { font-size: 12.5px; color: var(--pd-text-soft); }
body.product-page .pd-support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 860px) { body.product-page .pd-support-grid { grid-template-columns: 1fr; gap: 20px; } }
body.product-page .pd-support-grid dt { font-size: 13.5px; font-weight: 500; margin-bottom: 5px; color: var(--pd-text-mute); }
body.product-page .pd-support-grid dd { margin: 0; font-size: 13px; color: var(--pd-text-soft); line-height: 1.55; text-wrap: pretty; }

/* ── seller-only tab furniture ──────────────────────────────────────── */

body.product-page .pd-kv {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--pd-line); border: 1px solid var(--pd-line);
  border-radius: var(--pd-r-md); overflow: hidden;
}
@media (max-width: 760px) { body.product-page .pd-kv { grid-template-columns: 1fr; } }
body.product-page .pd-kv li { background: var(--pd-bg-1); padding: 13px 15px; display: flex; flex-direction: column; gap: 3px; }
body.product-page .pd-kv .k {
  font-family: var(--pd-mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--pd-text-faint);
}
body.product-page .pd-kv .v { font-size: 14px; }
body.product-page .pd-kv .v.pd-mono { font-size: 13.5px; }

/* ── responsive trims ───────────────────────────────────────────────── */

@media (max-width: 480px) {
  body.product-page .pp-hero { padding: 18px 0 24px; }
  body.product-page .pp-title { font-size: clamp(28px, 8vw, 34px); }
  body.product-page .pd-buy { padding: 14px; }
  body.product-page .pd-buy-actions .pd-btn { width: 100%; }
  body.product-page .pp-tabs-wrap { top: 0; }
}

/* Breadcrumb sits above the hero (and above its gradient) so the shared
   back-link partial keeps its "before the hero" contract. */
body.product-page .pd-crumbs { padding-top: 18px; }
body.product-page .pd-crumbs .marketplace-back-link-block { margin: 0; }

/* Quiet links under the buy box: tab jumps that must exist in every viewer
   state without competing with the two CTAs above them. */
body.product-page .pd-quicklinks {
  display: flex; gap: 16px; flex-wrap: wrap; margin: 0;
  font-size: 12.5px; color: var(--pd-text-soft);
}
body.product-page .pd-quicklinks a { color: var(--pd-text-soft); text-decoration: none; }
body.product-page .pd-quicklinks a:hover { color: var(--pd-type); text-decoration: underline; text-underline-offset: 3px; }

/* ── self-hosted stack card (#4462) ─────────────────────────────────── */

body.product-page .pd-stack {
  border-color: var(--pd-type-line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--pd-type) 5%, var(--pd-bg-1)) 0%, var(--pd-bg-1) 240px);
}
body.product-page .pd-stack-badges { display: flex; gap: 6px; flex-wrap: wrap; }
body.product-page .pd-stack-badges .b {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; font-family: var(--pd-mono); font-size: 11px;
  background: var(--pd-type-soft); border: 1px solid var(--pd-type-line); color: var(--pd-type);
}
body.product-page .pd-sub { margin: 28px 0 14px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
body.product-page .pd-sub:first-of-type { margin-top: 22px; }
body.product-page .pd-sub h3 {
  font-family: var(--pd-display); font-size: 16px; font-weight: 600;
  letter-spacing: -0.015em; margin: 0;
}
body.product-page .pd-sub .n {
  font-family: var(--pd-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--pd-text-faint);
}
body.product-page .pd-sub .r { margin-left: auto; font-size: 12.5px; color: var(--pd-text-soft); }

/* Service colour dot. An unmapped slug keeps the neutral default rather than
   rendering nothing, so a service this palette has not themed still reads as
   a service. */
body.product-page .pd-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  display: inline-block; background: var(--pd-svc-default);
}
body.product-page .pd-dot[data-s="n8n"] { background: var(--pd-svc-n8n); }
body.product-page .pd-dot[data-s="gmail"] { background: var(--pd-svc-gmail); }
body.product-page .pd-dot[data-s="openai"] { background: var(--pd-svc-openai); }
body.product-page .pd-dot[data-s="anthropic"] { background: var(--pd-svc-anthropic); }
body.product-page .pd-dot[data-s="sheets"] { background: var(--pd-svc-sheets); }
body.product-page .pd-dot[data-s="calendar"] { background: var(--pd-svc-calendar); }
body.product-page .pd-dot[data-s="slack"] { background: var(--pd-svc-slack); }
body.product-page .pd-dot[data-s="telegram"] { background: var(--pd-svc-telegram); }
body.product-page .pd-dot[data-s="twilio"] { background: var(--pd-svc-twilio); }
body.product-page .pd-dot[data-s="retell"] { background: var(--pd-svc-retell); }

/* 01 services. The 1px separators come from each card's box-shadow rather
   than a gap over a tinted container: a service count that does not fill the
   last row would otherwise leave the container's line colour showing as an
   empty block. */
body.product-page .pd-svc-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--pd-bg-1); border: 1px solid var(--pd-line);
  border-radius: var(--pd-r-md); overflow: hidden;
}
@media (max-width: 860px) { body.product-page .pd-svc-grid { grid-template-columns: 1fr; } }
body.product-page .pd-svc {
  background: var(--pd-bg-1); padding: 16px; display: flex; flex-direction: column;
  gap: 8px; min-width: 0; box-shadow: 0 0 0 1px var(--pd-line);
}
body.product-page .pd-svc-name {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em;
}
body.product-page .pd-svc-purpose { font-size: 13px; color: var(--pd-text-mute); line-height: 1.5; flex: 1; }
body.product-page .pd-svc-foot {
  margin-top: auto; display: flex; flex-direction: column; align-items: flex-start;
  gap: 6px; padding-top: 10px; border-top: 1px dashed var(--pd-line);
}
body.product-page .pd-svc-cost { font-family: var(--pd-mono); font-size: 11.5px; color: var(--pd-text-soft); }
body.product-page .pd-svc-link {
  font-size: 12px; color: var(--pd-type); display: inline-flex; align-items: center;
  gap: 4px; white-space: nowrap; text-decoration: none;
}
body.product-page .pd-svc-link:hover { color: var(--pd-type-2); text-decoration: underline; text-underline-offset: 3px; }

/* 02 credentials */
body.product-page .pd-cred-note {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px;
  border-radius: var(--pd-r-md); background: var(--pd-type-soft);
  border: 1px solid var(--pd-type-line); margin-bottom: 12px;
}
body.product-page .pd-cred-note .ico { color: var(--pd-type); flex-shrink: 0; margin-top: 1px; }
body.product-page .pd-cred-note p { margin: 0; font-size: 13px; color: var(--pd-text-mute); line-height: 1.55; max-width: 76ch; }
body.product-page .pd-cred-note b { color: var(--pd-text); }
body.product-page .pd-creds {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px;
  background: var(--pd-line); border: 1px solid var(--pd-line);
  border-radius: var(--pd-r-md); overflow: hidden;
}
body.product-page .pd-creds li {
  background: var(--pd-bg-1); padding: 12px 15px; display: flex;
  align-items: center; gap: 12px; flex-wrap: wrap;
}
body.product-page .pd-creds .k { font-family: var(--pd-mono); font-size: 13px; color: var(--pd-text); }
body.product-page .pd-creds .f { font-size: 12px; color: var(--pd-text-soft); display: inline-flex; align-items: center; gap: 6px; }
body.product-page .pd-cred-purpose { font-size: 12.5px; color: var(--pd-text-mute); }
body.product-page .pd-creds .byo {
  margin-left: auto; font-family: var(--pd-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pd-text-faint); border: 1px solid var(--pd-line);
  background: var(--pd-surface-2); padding: 2px 7px; border-radius: 3px;
}

/* 03 how it connects — the staged diagram */
body.product-page .pd-flow {
  border: 1px solid var(--pd-line); border-radius: var(--pd-r-md);
  background: var(--pd-bg-2); overflow: hidden;
}
body.product-page .pd-stage {
  display: grid; grid-template-columns: 104px minmax(0, 1fr); border-top: 1px solid var(--pd-line);
}
body.product-page .pd-stage:first-child { border-top: 0; }
body.product-page .pd-stage-l {
  padding: 18px 14px; border-right: 1px solid var(--pd-line);
  background: color-mix(in srgb, var(--pd-bg) 45%, var(--pd-bg-2));
  display: flex; flex-direction: column; gap: 4px;
}
body.product-page .pd-stage-l .i { font-family: var(--pd-mono); font-size: 10px; color: var(--pd-text-faint); letter-spacing: 0.1em; }
body.product-page .pd-stage-l .n {
  font-family: var(--pd-mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pd-text-mute); line-height: 1.35;
}
body.product-page .pd-stage-r {
  padding: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0;
}
body.product-page .pd-node {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 13px; border-radius: 9px;
  border: 1px solid var(--pd-line-strong); background: var(--pd-bg-1); min-width: 0;
}
body.product-page .pd-node .nm { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
body.product-page .pd-node .nt { font-size: 11.5px; color: var(--pd-text-soft); font-family: var(--pd-mono); }
body.product-page .pd-node.is-decision { border-style: dashed; background: var(--pd-surface-2); }
body.product-page .pd-arrow { color: var(--pd-text-faint); flex-shrink: 0; display: inline-flex; }
body.product-page .pd-model {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px;
  border: 1px dashed var(--pd-line-strong); background: var(--pd-bg-2); font-size: 12px;
  color: var(--pd-text-mute); align-self: flex-start; margin-top: 8px;
}
body.product-page .pd-model .u {
  font-family: var(--pd-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pd-text-faint);
}
body.product-page .pd-model .nt { font-family: var(--pd-mono); font-size: 11px; color: var(--pd-text-faint); }
body.product-page .pd-branchwrap {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; width: 100%;
}
@media (max-width: 760px) { body.product-page .pd-branchwrap { grid-template-columns: 1fr; } }
body.product-page .pd-cond {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 9px;
  border: 1px dashed var(--pd-type-line); background: var(--pd-type-soft); color: var(--pd-type);
  font-size: 13px; font-weight: 500;
}
body.product-page .pd-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
@media (max-width: 860px) { body.product-page .pd-branches { grid-template-columns: 1fr; } }
body.product-page .pd-branch {
  border: 1px solid var(--pd-line-strong); border-radius: 9px; background: var(--pd-bg-1);
  padding: 10px 13px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
body.product-page .pd-branch .nm { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
body.product-page .pd-branch .nt { font-size: 11.5px; color: var(--pd-text-soft); font-family: var(--pd-mono); }
body.product-page .pd-branch .lb {
  font-family: var(--pd-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pd-text-faint); margin-bottom: 2px;
}
body.product-page .pd-branch[data-y="1"] { border-left: 2px solid var(--pd-good); }
body.product-page .pd-branch[data-y="0"] { border-left: 2px solid var(--pd-warn); }

/* 03 how it connects — the flat list (the fallback, and the alternate view) */
body.product-page .pd-flow-list {
  list-style: none; margin: 0; padding: 0; border: 1px solid var(--pd-line);
  border-radius: var(--pd-r-md); overflow: hidden;
}
body.product-page .pd-flow-list li {
  padding: 11px 15px; border-top: 1px solid var(--pd-line); background: var(--pd-bg-1);
  font-family: var(--pd-mono); font-size: 12.5px; color: var(--pd-text-mute);
  display: flex; gap: 12px; flex-wrap: wrap;
}
body.product-page .pd-flow-list li:first-child { border-top: 0; }
body.product-page .pd-flow-list li .i { color: var(--pd-text-faint); width: 18px; flex-shrink: 0; }
body.product-page .pd-flow-list .stack-node { color: var(--pd-text); }
body.product-page .pd-flow-list .stack-arrow { color: var(--pd-type); }
body.product-page .pd-flow-list .stack-edge-via { color: var(--pd-text-faint); }
body.product-page .pd-flow-alt { margin-top: 10px; }
body.product-page .pd-flow-alt summary {
  cursor: pointer; font-size: 12.5px; color: var(--pd-text-soft); padding: 6px 0;
}
body.product-page .pd-flow-alt summary:hover { color: var(--pd-type); }
body.product-page .pd-flow-alt .pd-flow-list { margin-top: 8px; }

/* 04 recurring cost */
body.product-page .pd-cost {
  display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.6fr); gap: 1px;
  background: var(--pd-line); border: 1px solid var(--pd-line);
  border-radius: var(--pd-r-md); overflow: hidden;
}
@media (max-width: 860px) { body.product-page .pd-cost { grid-template-columns: 1fr; } }
body.product-page .pd-cost-hero {
  background: var(--pd-bg-1); padding: 20px; display: flex; flex-direction: column;
  gap: 6px; justify-content: center;
}
body.product-page .pd-cost-hero .l {
  font-family: var(--pd-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--pd-text-faint);
}
body.product-page .pd-cost-big {
  font-family: var(--pd-display); font-weight: 700; font-size: 40px; line-height: 1;
  letter-spacing: -0.03em; color: var(--pd-type); display: flex; align-items: baseline; gap: 2px;
}
body.product-page .pd-cost-hero .s { font-size: 12.5px; color: var(--pd-text-mute); line-height: 1.5; text-wrap: pretty; }
body.product-page .pd-cost-body {
  background: var(--pd-bg-1); padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 600px) { body.product-page .pd-cost-body { grid-template-columns: 1fr; } }
body.product-page .pd-lines { list-style: none; margin: 0; padding: 0; }
body.product-page .pd-lines li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--pd-line); font-size: 13.5px;
}
body.product-page .pd-lines li:last-child { border-bottom: 0; }
body.product-page .pd-lines .l { display: inline-flex; align-items: center; gap: 8px; color: var(--pd-text-mute); }
body.product-page .pd-line-note { color: var(--pd-text-faint); }
body.product-page .pd-lines .v { font-family: var(--pd-mono); font-variant-numeric: tabular-nums; }
body.product-page .pd-lines .v.zero { color: var(--pd-text-faint); }
body.product-page .pd-assume { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
body.product-page .pd-assume li { font-size: 12.5px; color: var(--pd-text-soft); display: flex; gap: 8px; line-height: 1.45; }
body.product-page .pd-assume li::before { content: "·"; color: var(--pd-text-faint); }

@media (max-width: 480px) {
  body.product-page .pd-stage { grid-template-columns: 1fr; }
  body.product-page .pd-stage-l {
    border-right: 0; border-bottom: 1px solid var(--pd-line);
    flex-direction: row; align-items: baseline; gap: 8px; padding: 10px 14px;
  }
  body.product-page .pd-stage-r { flex-direction: column; align-items: stretch; }
  body.product-page .pd-arrow { transform: rotate(90deg); align-self: center; }
  body.product-page .pd-cost-big { font-size: 32px; }
}

/* The generated cover schematic (#4463) fills the frame and inherits the
   page's theme tokens, so it re-colours with the theme toggle rather than
   needing a second asset. */
body.product-page .pd-cover-svg { width: 100%; height: 100%; display: block; }

/* ── tab panel contents (#4464) ─────────────────────────────────────── */

/* Deploy: what's in the download, named file by file. */
body.product-page .pd-files {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px;
  background: var(--pd-line); border: 1px solid var(--pd-line);
  border-radius: var(--pd-r-md); overflow: hidden;
}
body.product-page .pd-files li {
  background: var(--pd-bg-1); padding: 12px 15px; display: flex;
  align-items: center; gap: 12px; flex-wrap: wrap;
}
body.product-page .pd-files .fn { font-family: var(--pd-mono); font-size: 13px; }
body.product-page .pd-files .fnote { font-size: 12px; color: var(--pd-text-soft); margin-left: auto; }

/* Instructions: prerequisites are public, steps are gated. */
body.product-page .pd-prereq {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--pd-line); border: 1px solid var(--pd-line);
  border-radius: var(--pd-r-md); overflow: hidden;
}
@media (max-width: 760px) { body.product-page .pd-prereq { grid-template-columns: 1fr; } }
body.product-page .pd-prereq li { background: var(--pd-bg-1); padding: 13px 15px; display: flex; gap: 11px; align-items: flex-start; }
body.product-page .pd-prereq .k { color: var(--pd-type); flex-shrink: 0; margin-top: 2px; }
body.product-page .pd-prereq .b { min-width: 0; }
body.product-page .pd-prereq .n { font-size: 13.5px; font-weight: 500; }

body.product-page .pd-teaser {
  position: relative; max-height: 132px; overflow: hidden; color: var(--pd-text-mute);
  font-size: 14.5px; line-height: 1.65; max-width: 72ch;
}
body.product-page .pd-gate { position: relative; margin-top: -46px; padding-top: 46px; }
body.product-page .pd-gate-fade {
  position: absolute; left: 0; right: 0; top: -90px; height: 90px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--pd-bg-1));
}
body.product-page .pd-gate-in {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border-radius: var(--pd-r-md); border: 1px solid var(--pd-type-line);
  background: var(--pd-type-soft); flex-wrap: wrap;
}
body.product-page .pd-gate-in .ico {
  width: 34px; height: 34px; border-radius: 10px; background: var(--pd-type);
  color: var(--pd-type-ink); display: inline-flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
body.product-page .pd-gate-in .t { font-weight: 600; font-size: 14px; margin: 0; }
body.product-page .pd-gate-in .s { font-size: 12.5px; color: var(--pd-text-mute); margin: 2px 0 0; }
body.product-page .pd-gate-in .sp { flex: 1; min-width: 16px; }
body.product-page .pd-actionbar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px;
  padding-top: 18px; border-top: 1px solid var(--pd-line);
}

/* Reviews: the empty state says what a first review unlocks. */
body.product-page .review-empty {
  display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center;
  border: 1px dashed var(--pd-line-strong); border-radius: var(--pd-r-md);
  background: repeating-linear-gradient(135deg, transparent 0 8px,
    color-mix(in srgb, var(--pd-text) 3%, transparent) 8px 16px);
  padding: 28px 22px;
}
body.product-page .review-empty .t { font-size: 14.5px; font-weight: 500; }
body.product-page .review-empty .s { font-size: 13px; color: var(--pd-text-soft); max-width: 46ch; text-wrap: pretty; }

/* ── seller surfaces + post-purchase panel (#4465) ──────────────────── */

body.product-page .pd-val {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px;
  background: var(--pd-line); border: 1px solid var(--pd-line);
  border-radius: var(--pd-r-md); overflow: hidden;
}
body.product-page .pd-val li { background: var(--pd-bg-1); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
body.product-page .pd-val li.todo {
  background: repeating-linear-gradient(135deg, var(--pd-bg-1) 0 6px, var(--pd-bg-2) 6px 12px);
}
body.product-page .pd-val .m {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; display: inline-flex;
  align-items: center; justify-content: center; margin-top: 1px; font-size: 11px;
  border: 1.5px dashed var(--pd-line-strong); color: var(--pd-text-faint);
}
body.product-page .pd-val li.done .m {
  background: color-mix(in srgb, var(--pd-good) 20%, transparent); color: var(--pd-good);
  border: 1px solid color-mix(in srgb, var(--pd-good) 45%, transparent);
}
body.product-page .pd-val .b { flex: 1; min-width: 0; }
body.product-page .pd-val .n {
  font-size: 14px; font-weight: 500; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
body.product-page .pd-val li.todo .n,
body.product-page .pd-val li.planned .n { color: var(--pd-text-soft); font-weight: 400; }
body.product-page .pd-val .tag {
  font-family: var(--pd-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 1px 6px; border-radius: 3px; white-space: nowrap;
  color: var(--pd-text-faint); background: var(--pd-surface-2); border: 1px solid var(--pd-line);
}
body.product-page .pd-val li.done .tag {
  color: var(--pd-good); background: color-mix(in srgb, var(--pd-good) 14%, transparent); border-color: transparent;
}
body.product-page .pd-val .d { display: block; font-size: 12.5px; color: var(--pd-text-soft); margin-top: 3px; line-height: 1.5; }
body.product-page .pd-val .fix {
  font-size: 12.5px; color: var(--pd-type); margin-top: 6px;
  display: inline-flex; align-items: center; gap: 5px; text-decoration: none;
}
body.product-page .pd-val .fix:hover { text-decoration: underline; text-underline-offset: 3px; }

body.product-page .pd-post {
  position: relative; overflow: hidden; border: 1px solid var(--pd-type-line);
  border-radius: var(--pd-r-lg);
  background: linear-gradient(150deg, color-mix(in srgb, var(--pd-type) 14%, var(--pd-bg-1)) 0%, var(--pd-bg-1) 58%);
  padding: 26px 28px; margin: 24px 0 0; box-shadow: var(--pd-shadow-lg);
}
@media (max-width: 600px) { body.product-page .pd-post { padding: 20px; } }
body.product-page .pd-post-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
body.product-page .pd-post-head .ico {
  width: 40px; height: 40px; border-radius: 12px; background: var(--pd-type);
  color: var(--pd-type-ink); display: inline-flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
body.product-page .pd-post-head h2 {
  font-family: var(--pd-display); font-size: 24px; font-weight: 600;
  letter-spacing: -0.02em; margin: 0 0 4px;
}
body.product-page .pd-post-head p { margin: 0 0 8px; color: var(--pd-text-mute); font-size: 14px; max-width: 62ch; }
body.product-page .pd-post-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
@media (max-width: 860px) { body.product-page .pd-post-grid { grid-template-columns: 1fr; } }
body.product-page .pd-post-side {
  border-left: 1px solid var(--pd-line); padding-left: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
@media (max-width: 860px) {
  body.product-page .pd-post-side {
    border-left: 0; border-top: 1px solid var(--pd-line); padding-left: 0; padding-top: 18px;
  }
}
body.product-page .pd-cert {
  font-family: var(--pd-mono); font-size: 15px; letter-spacing: 0.02em; color: var(--pd-text);
  padding: 10px 12px; border-radius: 8px; background: var(--pd-bg-2);
  border: 1px dashed var(--pd-line-strong); overflow-wrap: anywhere;
}

/* ── about FAQ accordion (#4466) ────────────────────────────────────── */

body.product-page .pd-faq { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--pd-line); }
body.product-page .pd-faq li { border-bottom: 1px solid var(--pd-line); }
body.product-page .pd-faq details { padding: 4px 0; }
body.product-page .pd-faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 16px 0;
}
body.product-page .pd-faq summary::-webkit-details-marker { display: none; }
body.product-page .pd-faq summary:hover .q { color: var(--pd-type); }
body.product-page .pd-faq .q { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; transition: color 0.12s; }
body.product-page .pd-faq .ico {
  color: var(--pd-text-soft); transition: transform 0.18s; flex-shrink: 0;
  font-family: var(--pd-mono); font-size: 16px; line-height: 1;
}
body.product-page .pd-faq details[open] .ico { transform: rotate(45deg); }
body.product-page .pd-faq p {
  margin: 0 0 18px; color: var(--pd-text-mute); font-size: 14.5px;
  line-height: 1.65; max-width: 76ch; text-wrap: pretty; white-space: pre-line;
}
