/* =========================================================================
   products.css — product-page layer (2026-09-17, StockPilot)
   -------------------------------------------------------------------------
   Loaded AFTER css/home.css on products/*.html only. Same design tokens as
   the homepage (black / white / soft gray, no accent color). Every selector
   here is scoped under .pd-* so nothing in home.css or work.css is touched.
   The .pd-app-* rules draw a CSS illustration of the application's results
   view — populated only with synthetic sample data in the HTML.
   ========================================================================= */

.pd { --pd-narrow: 880px; }
.pd-container { width: min(calc(100% - 64px), var(--max)); margin: 0 auto; }
.pd-narrow { width: min(calc(100% - 64px), var(--pd-narrow)); margin: 0 auto; }

/* ---------- Head ---------- */
.pd-head { padding: 72px 0 64px; }
.pd-crumb {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--muted); margin-bottom: 36px;
}
.pd-crumb svg { transform: rotate(180deg); transition: transform 0.25s var(--ease); }
.pd-crumb:hover { color: var(--ink); }
.pd-crumb:hover svg { transform: rotate(180deg) translateX(3px); }
.pd-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.pd-eyebrow span { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.pd-badge {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700;
  color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 11px; background: var(--white);
}
.pd-title { font-size: clamp(44px, 6.4vw, 84px); line-height: 0.98; letter-spacing: -0.045em; max-width: 12ch; }
.pd-tagline { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; margin-top: 26px; max-width: 22ch; }
.pd-lead { font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 560px; margin-top: 18px; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.pd-byline { margin-top: 30px; font-size: 13px; color: var(--muted); text-wrap: balance; } /* --muted-2 was 3.19:1 here; --muted meets AA */
.pd-byline b { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* Two-column head: copy ~45% / product preview ~55% */
.pd-head-grid { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
.pd-head-copy { min-width: 0; }

/* ---------- Hero preview (synthetic sample data only) ----------
   One concept, three parts: raw export -> transition -> needs a decision.
   The full results view lives in .pd-app-* further down. */
.pd-preview { margin: 0; min-width: 0; }
.pd-preview figcaption { margin-top: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.pd-pv { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-lg); overflow: hidden; }
.pd-pv-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 32px 0; }
.pd-pv-brand { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.pd-pv-tag { font-size: 12px; color: var(--muted); }
.pd-pv-body { padding: 24px 32px 30px; }
.pd-pv-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 10px; }

.pd-pv-rawtable { width: 100%; border-collapse: collapse; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--ink-soft); }
.pd-pv-rawtable th { text-align: left; font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--muted); padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.pd-pv-rawtable td { padding: 11px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pd-pv-rawtable .num { text-align: right; font-variant-numeric: tabular-nums; }
.pd-pv-rawtable mark { background: none; color: var(--danger); box-shadow: inset 0 -1px 0 rgba(179, 38, 30, 0.45); }
.pd-pv-rawtable mark.is-empty { display: inline-block; width: 56px; box-shadow: inset 0 0 0 1px rgba(179, 38, 30, 0.4); border-radius: 3px; }

.pd-pv-step { display: flex; justify-content: center; padding: 18px 0 20px; color: var(--muted-2); font-size: 16px; line-height: 1; }

.pd-pv-decisions li { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.pd-pv-decisions li:last-child { border-bottom: 1px solid var(--line); }
.pd-pv-decisions code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 600; color: var(--ink); }
.pd-pv-problem { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.pd-pv-action { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- Generic blocks ---------- */
.pd-block { padding: 90px 0; }
.pd-block h2, .pd-app-wrap h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.035em; }
.pd-block .eyebrow, .pd-app-wrap .eyebrow { margin-bottom: 16px; }
.pd-block-head { max-width: 640px; margin-bottom: 44px; }
.pd-block-head p:not(.eyebrow) { font-size: 16px; line-height: 1.65; color: var(--muted); margin-top: 16px; max-width: 520px; }

/* ---------- Built for messy exports (2x2 input examples) ---------- */
.pd-messy { padding: 80px 0; }
.pd-messy-grid { display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
.pd-messy-head p:not(.eyebrow) { font-size: 16px; line-height: 1.65; color: var(--muted); margin-top: 16px; max-width: 400px; }
.pd-messy-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pd-messy-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 22px 20px; background: var(--paper); display: flex; flex-direction: column; }
.pd-messy-card h3 { font-size: 16px; letter-spacing: -0.02em; }
.pd-messy-card > p { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin-top: auto; }
.pd-messy-demo { margin: 16px 0 18px; min-height: 76px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 13px; }
.pd-messy-demo code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.pd-messy-sku { display: flex; align-items: center; gap: 16px; }
.pd-messy-before { display: grid; gap: 4px; }
.pd-messy-map { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px 16px; }
.pd-messy-before code { color: var(--danger); }
.pd-messy-arrow { color: var(--muted-2); }
.pd-messy-after { font-weight: 700; color: var(--ink); }
.pd-messy-dup { display: grid; gap: 4px; align-content: center; color: var(--muted); }
.pd-messy-bad { display: grid; gap: 4px; margin-top: 16px; }
.pd-messy-bad div { display: flex; justify-content: space-between; gap: 12px; }
.pd-messy-bad dt { color: var(--muted); }
.pd-messy-bad dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pd-messy-bad mark { background: none; color: var(--danger); box-shadow: inset 0 -1px 0 rgba(179, 38, 30, 0.45); }
.pd-messy-bad mark.is-empty { display: inline-block; width: 48px; box-shadow: inset 0 0 0 1px rgba(179, 38, 30, 0.4); border-radius: 3px; }

/* ---------- Steps (how it works) ---------- */
.pd-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: pdstep; }
.pd-step { border-top: 1px solid var(--line-strong); padding-top: 18px; }
.pd-step::before {
  counter-increment: pdstep; content: "0" counter(pdstep);
  display: block; font-size: 11px; letter-spacing: 0.16em; color: var(--muted-2); font-variant-numeric: tabular-nums; margin-bottom: 12px;
}
.pd-step h3 { font-size: 17px; letter-spacing: -0.02em; margin-bottom: 8px; }
.pd-step p { font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---------- Capability lists (today / planned) ---------- */
.pd-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.pd-list-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px 30px; background: var(--white); }
.pd-list-card.is-planned { background: var(--paper-2); }
.pd-list-card h3 { display: flex; align-items: center; gap: 12px; font-size: 20px; letter-spacing: -0.02em; margin-bottom: 8px; }
.pd-list-card > p { font-size: 14px; line-height: 1.55; color: var(--muted); margin-bottom: 20px; }
.pd-list { display: grid; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.pd-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 15px; line-height: 1.5; color: #333; }
.pd-list li b { display: block; font-weight: 600; color: var(--ink); }
.pd-list li div > span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.pd-list-check { width: 22px; height: 22px; border-radius: 50%; background: var(--dark); color: var(--white); display: inline-flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.pd-list-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px dashed var(--line-strong); display: inline-flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; color: var(--muted-2); font-size: 12px; font-weight: 700; }

/* ---------- App illustration (synthetic data only) ---------- */
.pd-app-wrap { padding: 0 0 90px; }
.pd-app {
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--white);
  box-shadow: var(--shadow-lg); overflow: hidden; font-size: 13px;
}
.pd-app-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.pd-app-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d3d3cf; }
.pd-app-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pd-app-body { padding: 26px 28px 28px; display: grid; gap: 26px; }
.pd-app-body > div { min-width: 0; } /* let the scrollable table shrink instead of widening the grid */
.pd-app-section-title { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.pd-app-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 18px; }
.pd-app-select { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.pd-app-select span {
  display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 8px 10px; color: var(--ink); background: var(--white); font-size: 13px;
}
.pd-app-select span::after { content: "⌄"; color: var(--muted-2); }
.pd-app-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pd-app-metric { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--paper); }
.pd-app-metric b { display: block; font-size: 24px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pd-app-metric span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.pd-app-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pd-app-table th, .pd-app-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pd-app-table th { font-weight: 600; color: var(--muted); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.pd-app-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pd-app-table th.num { text-align: right; }
.pd-app-table code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; white-space: nowrap; }
.pd-app-export { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 4px; }
.pd-app-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; padding: 9px 14px; background: var(--dark); color: var(--white); font-size: 12.5px; font-weight: 600; }
.pd-app-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pd-app-panel { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 6px; min-width: 0; }
.pd-app-panel-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.pd-app-panel .pd-app-table tr:last-child td { border-bottom: 0; }
.pd-app-diff code.is-before { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, 0.25); }
.pd-app-diff td.arrow { color: var(--muted-2); width: 28px; text-align: center; }
.pd-app-diff th:first-child, .pd-app-diff td:first-child { width: 96px; }
.pd-app-table tr.is-total td { font-weight: 600; }
.pd-app-sheets { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line-strong); }
.pd-app-sheets span { font-size: 12px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-bottom: 0; margin-right: -1px; background: var(--paper); }
.pd-app-sheets span:first-child { color: var(--ink); background: var(--white); font-weight: 600; border-top-left-radius: 6px; }
.pd-app-sheets span:last-child { border-top-right-radius: 6px; }
.pd-app-scroll-hint { display: none; }

/* ---------- Who it's for (physical-inventory businesses) ---------- */
.pd-fit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pd-fit-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 24px; background: var(--white); }
.pd-fit-card h3 { font-size: 17px; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 8px; }
.pd-fit-card p { font-size: 14px; line-height: 1.55; color: var(--muted); }
.pd-fit-note { margin-top: 28px; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 640px; }

/* ---------- Privacy / CTA strip ---------- */
.pd-privacy { background: var(--paper-2); }
.pd-privacy-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: start; }
.pd-privacy-grid p:not(.eyebrow) { font-size: 16px; line-height: 1.7; color: var(--muted); }
.pd-privacy-grid p + p { margin-top: 14px; }
.pd-privacy-grid b { color: var(--ink); font-weight: 600; }

.pd-cta { background: var(--dark); color: var(--white); padding: 100px 0; }
.pd-cta-inner { max-width: 760px; margin-inline: auto; text-align: center; }
.pd-cta .eyebrow { color: #9a9a9a; }
.pd-cta h2 { color: var(--white); font-size: clamp(32px, 4vw, 54px); line-height: 1.04; letter-spacing: -0.04em; }
.pd-cta p:not(.eyebrow) { font-size: 17px; line-height: 1.6; color: #b5b5b5; margin: 22px auto 34px; max-width: 540px; }
.pd-cta .pd-actions { justify-content: center; margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .pd-container, .pd-narrow { width: min(calc(100% - 40px), var(--max)); }
  .pd-steps { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
  .pd-two-col { grid-template-columns: 1fr; }
  .pd-fit-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-privacy-grid { grid-template-columns: 1fr; gap: 24px; }
  .pd-app-metrics { grid-template-columns: repeat(3, 1fr); }
  .pd-head-grid { grid-template-columns: 1fr; gap: 48px; }
  .pd-preview { max-width: 620px; }
  .pd-messy-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  .pd-container, .pd-narrow { width: min(calc(100% - 32px), var(--max)); }
  .pd-head { padding: 56px 0 40px; }
  .pd-block, .pd-cta { padding: 64px 0; }
  .pd-app-wrap { padding-bottom: 64px; }
  .pd-actions { flex-direction: column; align-items: stretch; }
  .pd-actions .button { width: 100%; }
  .pd-steps { grid-template-columns: 1fr; }
  .pd-list-card { padding: 24px 20px; }
  .pd-fit-grid { grid-template-columns: 1fr; }
  .pd-fit-card { padding: 22px 20px; }
  .pd-app-body { padding: 18px 16px 20px; }
  .pd-app-map { grid-template-columns: 1fr; }
  .pd-app-metrics { grid-template-columns: repeat(2, 1fr); }
  .pd-app-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pd-app-table-wrap .pd-app-table { min-width: 780px; }
  .pd-app-table-wrap th { white-space: nowrap; }
  .pd-app-scroll-hint { display: block; font-size: 12px; color: var(--muted); margin: -4px 0 8px; }
  .pd-app-sheets { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 0; }
  .pd-app-sheets span { border: 1px solid var(--line); margin: 0 -1px -1px 0; border-radius: 0 !important; }
  .pd-app-export { flex-direction: column; align-items: flex-start; }
  .pd-head-grid { gap: 44px; }
  .pd-pv-bar { padding: 16px 20px 0; }
  .pd-pv-body { padding: 20px 20px 24px; }
  .pd-pv-decisions li { grid-template-columns: 80px minmax(0, 1fr); gap: 4px 12px; }
  .pd-pv-action { grid-column: 2; }
  .pd-app-pair { grid-template-columns: 1fr; }
  .pd-messy-cards { grid-template-columns: 1fr; gap: 12px; }
  .pd-messy-card { padding: 20px 18px 18px; }
  .pd-messy-demo { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-crumb svg { transition: none; }
}
