/* Shared styles for Honest Pitch pages at /p/* */
:root {
  --hp-primary: #e51923;
  --hp-primary-dark: #b8141c;
  --hp-success: #16a34a;
  --hp-danger: #dc2626;
  --hp-warning: #d97706;
  --hp-gold: #f59e0b;
  --hp-bg: #0b0f14;
  --hp-surface: #111827;
  --hp-surface-raised: #1a2332;
  --hp-border: #2f3336;
  --hp-border-subtle: #1f2937;
  --hp-text: #e7e9ea;
  --hp-text-muted: #9ca3af;
  --hp-text-faint: #6b7280;
  --hp-score-green:   #34d399;
  --hp-score-yellow:  #fbbf24;
  --hp-score-orange:  #fb923c;
  --hp-score-red:     #f87171;
  /* Muted surface for low-emphasis chips (HP code pill, face
     ladder, threshold callout, score bar track). One shade
     above --hp-surface-raised so chips stay readable on the
     default dark background. */
  --hp-surface-muted: #1f2937;
  --hp-radius: 12px;
  --hp-max: 1200px;
  --hp-hype: #f59e0b;
  --hp-reality: #10b981;
}

html[data-pitch-theme="light"] {
  --hp-bg: #f3f4f6;
  --hp-surface: #ffffff;
  --hp-surface-raised: #f9fafb;
  --hp-border: #e5e7eb;
  --hp-border-subtle: #f3f4f6;
  --hp-text: #111827;
  --hp-text-muted: #4b5563;
  --hp-text-faint: #6b7280;
  --hp-surface-muted: #f3f4f6;
}

html[data-pitch-theme="light"] a {
  color: #b45309;
}

html[data-pitch-theme="light"] .hp-code-pill {
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--hp-bg);
  color: var(--hp-text);
  line-height: 1.55;
}

a {
  color: #fbbf24;
}

code {
  font-family: Consolas, Monaco, "Courier New", monospace;
  word-break: break-word;
}


.hp-search-bar {
  display: none; /* hidden on very small screens */
  flex: 1;
  max-width: 300px;
  align-items: center;
  background: var(--hp-surface-raised);
  border: 1px solid var(--hp-border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  color: var(--hp-text-muted);
  font-size: 0.875rem;
}
@media (min-width: 600px) {
  .hp-search-bar { display: flex; }
}
.hp-search-bar svg {
  margin-right: 0.5rem;
  opacity: 0.7;
}

.hp-logo {
  font-weight: 800;
  font-size: 1rem;
  color: var(--hp-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.hp-logo span {
  color: var(--hp-gold);
}

.hp-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.875rem;
  font-weight: 700;
  color: #60a5fa;
  background: #0f172a;
  border: 1px solid var(--hp-primary);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.25);
}

/* 2026-06-16: when .hp-code-pill is a <button> (the toolbar
   redesign), add the affordance — cursor, hover lift, focus
   ring — so it reads as the "home" button the operator
   specified. The default browser button styles are otherwise
   inherited (e.g., system font on the <button>), so we keep
   the monospace + color/bg/padding above. */
button.hp-code-pill {
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
button.hp-code-pill:hover {
  border-color: var(--hp-primary-bright, #93c5fd);
  box-shadow: 0 0 28px rgba(37, 99, 235, 0.45);
}
button.hp-code-pill:active {
  transform: translateY(1px);
}
button.hp-code-pill:focus-visible {
  outline: 2px solid var(--hp-primary-bright, #93c5fd);
  outline-offset: 2px;
}


html[data-pitch-theme="light"] .pitch-page {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

.pitch-toolbar {
  /* v5 (2026-06-17): single-row header (operator request).
     Row 1: [logo] [HP-code pill] ........ [share widget] [theme toggle]
     Row 2: [h1 pitch title — spans all 5 columns, centered]
     The 5-column grid is `auto auto 1fr auto auto`:
       - col 1: logo (auto, hugs its content)
       - col 2: HP-code pill (auto, hugs its content, sits right
                next to the logo)
       - col 3: empty 1fr spacer that pushes the right-side
                controls to the right edge
       - col 4: share widget wrapper (auto, hugs its content)
       - col 5: theme toggle (auto, hugs its content)
     Source order in pitch.njk is logo → HP-code → share →
     theme-toggle → h1, so the auto-placement algorithm places
     the first four in row 1 and the h1 wraps to row 2 (and
     spans all 5 columns via grid-column: 1 / -1). On narrow
     viewports the toolbar wraps to a 2-row stack via the
     @media (max-width: 600px) block below, so the controls
     remain reachable. */
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hp-border-subtle);
}

.pitch-toolbar .hp-logo {
  /* Row 1, col 1 — top-left, never the right. */
  grid-row: 1;
  grid-column: 1;
  margin: 0;
  padding: 0;
}

.pitch-toolbar .hp-code-pill {
  /* Row 1, col 2 — the home button (operator's "clicking the
     HP code is supposed to act as the home button for the
     pitch"). Sits immediately to the right of the logo. The
     1fr col 3 spacer between this pill and the share widget
     is the "........" gap that pushes the right-side controls
     to the right edge. */
  grid-row: 1;
  grid-column: 2;
  justify-self: start;
}

.pitch-toolbar__share {
  /* Row 1, col 4 — the share widget (operator's "right next
     to that should be a share button"). The wrapper div
     exists so the macro's [data-share-widget] can stay
     unstyled while this div carries the grid placement. */
  grid-row: 1;
  grid-column: 4;
  justify-self: end;
}

.pitch-toolbar .pitch-theme-toggle {
  /* Row 1, col 5 — far-right. The theme toggle is the last
     control on the toolbar (operator's "logo, HP code, share
     button, and the light/dark switch on one line"). */
  grid-row: 1;
  grid-column: 5;
  margin-left: 0;
}

/* h1 sits in row 2 and spans all 5 columns. `text-align: center`
  keeps long titles visually centered even if they wrap. */
.pitch-toolbar .pitch-title {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 0;
  margin-top: 0.25rem;
  text-align: center;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--hp-text);
  /* If the title overflows, truncate with an ellipsis instead
    of pushing the toggle off the row on narrow viewports. */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitch-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hp-text-muted);
  background: var(--hp-surface-raised);
  border: 1px solid var(--hp-border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.pitch-theme-toggle:hover {
  color: var(--hp-text);
  border-color: var(--hp-text-faint);
}

.pitch-theme-toggle__icon {
  font-size: 1rem;
  line-height: 1;
}

.pitch-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .pitch-layout {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 2rem;
    align-items: start;
  }

  .pitch-col--rail {
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding-right: 0.25rem;
  }

  .pitch-col--rail .pitch-pros-cons {
    grid-template-columns: 1fr;
  }

  .pitch-col--rail .honestscore-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pitch-col--rail .honestscore-ring {
    margin: 0 auto;
  }

  .pitch-col--rail .pitch-cta-wrapper {
    position: static;
    background: none;
    padding: 0;
    margin-top: 0;
  }

  #vote-widget-mount .vote-widget,
  #vote-widget-mount > .vote-widget {
    max-width: none;
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  .pitch-page {
    margin: 0 auto;
    padding: 1rem;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .pitch-toolbar {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .pitch-toolbar .pitch-title {
    /* Allow the long hero title to wrap on very narrow viewports
       so the theme toggle isn't pushed off the row. The desktop
       `nowrap` + `ellipsis` rule remains in effect above 600px. */
    font-size: 0.9rem;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }
}

.disclosure-ribbon {
  background: #422006;
  border: 1px solid #92400e;
  border-radius: var(--hp-radius);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.disclosure-badge {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
}


.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
  border-radius: var(--hp-radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
  border: 1px solid var(--hp-border);
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


.video-meta {
  font-size: 0.8125rem;
  color: var(--hp-text-muted);
}

.disclosure-inline {
  font-size: 0.75rem;
  color: var(--hp-text-faint);
  margin: 0 0 1.25rem;
}

.honestscore-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.honestscore-hero--green {
  border-color: var(--hp-score-green);
  box-shadow: 0 0 32px rgba(52, 211, 153, 0.12);
}

.honestscore-hero--yellow {
  border-color: #b45309;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.08);
}

.honestscore-hero--orange {
  border-color: var(--hp-score-orange);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.08);
}

.honestscore-hero--red {
  border-color: var(--hp-score-red);
  box-shadow: 0 0 24px rgba(248, 113, 113, 0.12);
}

.honestscore-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 4px solid var(--hp-gold);
  background: #0f172a;
}

.honestscore-hero--green .honestscore-ring {
  border-color: var(--hp-score-green);
}

.honestscore-hero--yellow .honestscore-ring {
  border-color: var(--hp-score-yellow);
}

.honestscore-hero--orange .honestscore-ring {
  border-color: var(--hp-score-orange);
}

.honestscore-hero--red .honestscore-ring {
  border-color: var(--hp-score-red);
}

.honestscore-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--hp-gold);
}

.honestscore-hero--green .honestscore-value {
  color: var(--hp-score-green);
}

.honestscore-hero--yellow .honestscore-value {
  color: var(--hp-score-yellow);
}

.honestscore-hero--orange .honestscore-value {
  color: var(--hp-score-orange);
}

.honestscore-hero--red .honestscore-value {
  color: var(--hp-score-red);
}

.honestscore-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hp-text-faint);
  margin-top: 0.15rem;
}

.honestscore-meta h2 {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.honestscore-meta p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--hp-text);
}


.hp-versus-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.hp-versus-table th,
.hp-versus-table td {
  border: 1px solid var(--hp-border);
  padding: 0.65rem 0.75rem;
  vertical-align: top;
  text-align: left;
}

.hp-versus-table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--hp-surface-raised);
  color: var(--hp-text-muted);
}

.hp-versus-table thead th.hp-versus-new {
  color: var(--hp-gold);
}

.hp-versus-table tbody th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  width: 24%;
  background: var(--hp-surface);
  color: var(--hp-text-muted);
}


.pitch-body--pas h2 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--hp-text);
}

.pitch-benefits-short {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.pitch-benefits-short li {
  margin-bottom: 0.5rem;
}

.pitch-body a {
  color: #fbbf24;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pitch-figure {
  margin: 1.25rem 0;
  padding: 0;
}

.pitch-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--hp-radius);
  border: 1px solid var(--hp-border);
}

.pitch-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--hp-text-faint);
  font-style: italic;
}

.pitch-figure--timeline {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.pitch-figure--timeline img {
  border: none;
  border-radius: 12px;
}

.pitch-details {
  margin: 1rem 0 1.25rem;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 0.75rem 1rem;
}

.pitch-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--hp-text-muted);
  list-style-position: outside;
}

.pitch-details[open] summary {
  margin-bottom: 0.75rem;
  color: var(--hp-gold);
}

.pitch-details .hp-metrics {
  margin-top: 0.5rem;
}

.hp-versus-table tbody td.hp-versus-new {
  background: rgba(245, 158, 11, 0.08);
}

.honestscore-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--hp-text-muted);
}

.honestscore-stats strong {
  color: var(--hp-text);
}

.hp-metrics {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}


.pitch-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.pitch-byline {
  font-size: 0.9rem;
  color: var(--hp-text-muted);
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}


.badge-verified {
  display: inline-block;
  background: #14532d;
  color: #86efac;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
  margin-left: 0.25rem;
}


.listing-countdown {
  font-size: 0.8125rem;
  color: #86efac;
  margin: 0.5rem 0 0;
}

.pitch-lead {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #d1d5db;
  margin-bottom: 1.25rem;
}

.pitch-lead strong {
  color: var(--hp-text);
}

.pitch-body h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  color: var(--hp-text);
}

.pitch-body p,
.pitch-body li {
  font-size: 0.9375rem;
  color: #d1d5db;
}

.pitch-body ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.pitch-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

.pros,
.cons {
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 1rem;
}

.pros h2 {
  color: var(--hp-success);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
}

.cons h2 {
  color: var(--hp-warning);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
}

.pros ul,
.cons ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.875rem;
}

.pitch-claims {
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.pitch-claims h2 {
  margin-top: 0;
  font-size: 0.9375rem;
}

.pitch-claims ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.claim-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--hp-border-subtle);
  font-size: 0.875rem;
}

.claim-item:last-child {
  border-bottom: none;
}

.claim-evidence {
  font-size: 0.75rem;
}


.pitch-cta-wrapper {
  /* The .pitch-cta-wrapper class is preserved for the legacy
     pitchCta() macro (www/src/_includes/_macros/pitch-cta.njk)
     which still emits it. The sticky-bottom positioning used
     to live here; the stage layout's CTA bar is now a
     fixed-position element in pitch-stage.css, so this class
     no longer applies any positioning by default. */
  margin-top: 1.5rem;
}

html[data-pitch-theme="light"] .pitch-cta-wrapper {
  /* see above — sticky background was removed. */
}

.pitch-cta {
  display: block;
  text-align: center;
  background: var(--hp-primary);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}

.pitch-cta:hover {
  background: var(--hp-primary-dark);
  text-decoration: none;
}

.cta-meta {
  text-align: center;
  font-size: 0.75rem;
  color: var(--hp-text-faint);
  margin: 0.5rem 0 0;
}

.rate-panel {
  background: var(--hp-surface);
  border: 1px dashed var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 1.25rem;
  margin-top: 2rem;
  opacity: 0.85;
}

.rate-panel h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.rate-panel p {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--hp-text-muted);
}

.rate-panel .mock-note {
  font-size: 0.75rem;
  color: var(--hp-text-faint);
  font-style: italic;
}

.pitch-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hp-border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--hp-text-faint);
}

/* 2026-06-17: PRE (Pitch Render Engine) version + build-stamp
   meta line. Sits below the "Powered by / Report / Home" line.
   Smaller, lower-contrast, monospace for the version strings so
   the two code-like tokens (`v0.42.1a2b3c4d` and
   `2026-06-17T03:54:18Z`) don't drift apart visually. The
   purpose: the operator's at-a-glance answer to "am I looking
   at the latest template?". Pinned by
   pre-version.contract.test.ts (the markup shape) — the visual
   weight is intentionally muted so it does not compete with
   the report-this-pitch CTA above. */
.pitch-footer__meta {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--hp-text-faint);
  opacity: 0.75;
}

.pitch-footer__pre-version,
.pitch-footer__build-stamp {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
  /* Tabular numerals so a "1" and a "l" line up consistently
     across two pages with different versions. */
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .honestscore-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.25rem 1rem;
  }

  .honestscore-ring {
    margin: 0 auto;
  }

  .honestscore-stats {
    justify-content: center;
  }


  .pitch-pros-cons {
    grid-template-columns: 1fr;
  }

  .hp-versus-table {
    font-size: 0.75rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .hp-versus-table th,
  .hp-versus-table td {
    padding: 0.4rem 0.5rem;
  }
}
