/* ==========================================================================
   PhotoPixc Unified Design System — Core Components (Master v4)
   Requires: styles/tokens.css + Google Font 'Inter'
   ========================================================================== */

/* Scoping note (Phase 1): generic base + component rules below are wrapped in
   :where(html.pp-v4) so they only style pages rebuilt to Master v4 (<html class="pp-v4">).
   :where() adds zero specificity. The `pp-` site shell is global and styles every page.
   Legacy pages keep their own CSS until they are rebuilt in Phases 2-4. */

:where(html.pp-v4) *,
:where(html.pp-v4) *::before,
:where(html.pp-v4) *::after {
  box-sizing: border-box;
}

:where(html.pp-v4) {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

:where(html.pp-v4) body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-body);
  background-color: var(--bg-primary);
  overflow-x: clip;
}

:where(html.pp-v4) img,
:where(html.pp-v4) svg {
  max-width: 100%;
  height: auto;
  display: block;
}

:where(html.pp-v4) a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--ease-standard);
}

:where(html.pp-v4) a:hover {
  color: var(--brand-dark);
}

:where(html.pp-v4) :focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* --- Container & Sections --- */
:where(html.pp-v4) .container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  :where(html.pp-v4) .container {
    padding-inline: var(--space-6);
  }
}

:where(html.pp-v4) .prose-container {
  width: 100%;
  max-width: var(--prose-max);
  margin-inline: auto;
}

:where(html.pp-v4) .section {
  padding-block: 52px;
}

:where(html.pp-v4) .section--alt {
  background-color: var(--bg-alt);
}

:where(html.pp-v4) .section--dark {
  background-color: var(--bg-dark);
  color: var(--text-dark-body);
}

:where(html.pp-v4) .section--compact {
  padding-block: 32px;
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .section {
    padding-block: 80px;
  }
  :where(html.pp-v4) .section--compact {
    padding-block: 40px;
  }
}

/* --- Typography & Centre-Aligned Section Headers --- */
:where(html.pp-v4) h1,
:where(html.pp-v4) h2,
:where(html.pp-v4) h3,
:where(html.pp-v4) h4 {
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

:where(html.pp-v4) .section--dark h1,
:where(html.pp-v4) .section--dark h2,
:where(html.pp-v4) .section--dark h3,
:where(html.pp-v4) .section--dark h4 {
  color: var(--text-dark-primary);
}

:where(html.pp-v4) .hero-h1 {
  font-size: 2rem;
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.03em;
}
:where(html.pp-v4) .hero-h1__muted {
  color: var(--text-caption);
}

:where(html.pp-v4) .page-h1 {
  font-size: 1.75rem;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-align: center;
}

:where(html.pp-v4) .section-h2 {
  font-size: 1.5rem;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}

:where(html.pp-v4) .card-h3 {
  font-size: 1.125rem;
  line-height: 1.30;
  font-weight: 700;
  letter-spacing: -0.01em;
}

:where(html.pp-v4) .eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: var(--space-2);
}

:where(html.pp-v4) .section--dark .eyebrow {
  color: #2DD4BF;
}

:where(html.pp-v4) .section-header {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 28px;
}

:where(html.pp-v4) .section-subtitle {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 65ch;
  margin: var(--space-3) auto 0;
}

:where(html.pp-v4) .section--dark .section-subtitle {
  color: var(--text-dark-muted);
}

:where(html.pp-v4) .tabular-num,
:where(html.pp-v4) .price-figure,
:where(html.pp-v4) .kpi-value {
  font-variant-numeric: tabular-nums;
}

:where(html.pp-v4) .price-figure {
  font-size: 1.875rem;
  line-height: 1.1;
  font-weight: 800;
  color: var(--text-primary);
}

:where(html.pp-v4) .price-regular {
  font-size: 1rem;
  color: var(--text-caption);
  text-decoration: line-through;
  font-weight: 500;
  margin-right: var(--space-2);
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .hero-h1 { font-size: 2.875rem; }
  :where(html.pp-v4) .page-h1 { font-size: 2.375rem; }
  :where(html.pp-v4) .section-h2 { font-size: 2rem; }
  :where(html.pp-v4) .card-h3 { font-size: 1.3125rem; }
  :where(html.pp-v4) .section-header { margin-bottom: 40px; }
  :where(html.pp-v4) .section-subtitle { font-size: 1.125rem; }
  :where(html.pp-v4) .price-figure { font-size: 2.125rem; }
}

/* --- Grids --- */
:where(html.pp-v4) .grid {
  display: grid;
  gap: var(--space-4);
}

:where(html.pp-v4) .grid-2 { grid-template-columns: 1fr; }
:where(html.pp-v4) .grid-3 { grid-template-columns: 1fr; }
:where(html.pp-v4) .grid-4 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  :where(html.pp-v4) .grid { gap: var(--space-6); }
  :where(html.pp-v4) .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :where(html.pp-v4) .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :where(html.pp-v4) .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   SITE SHELL (Phase 1) — Trust Bar, Sticky Header, Drawer, Bottom Bar, Footer
   All shell classes use the `pp-` prefix so they never collide with legacy
   theme CSS (.site-header, .footer-grid, .btn ...) still loaded by old pages.
   Every value comes from styles/tokens.css.
   ========================================================================== */
.pp-shell,
.pp-shell *,
.pp-shell *::before,
.pp-shell *::after {
  box-sizing: border-box;
}

.pp-shell {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.pp-shell ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pp-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .pp-container {
    padding-inline: var(--space-6);
  }
}

.pp-skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 300;
  background: var(--brand-primary);
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
}

.pp-skip-link:focus {
  top: var(--space-2);
  color: #FFFFFF;
}

/* --- Top Trust Bar (36px, dark) --- */
.pp-trustbar {
  background-color: var(--bg-dark);
  color: var(--text-dark-body);
  min-height: var(--trustbar-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-dark);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
}

.pp-trustbar .pp-container {
  display: flex;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-trustbar__full { display: none; }
.pp-trustbar__short { display: inline; }

@media (min-width: 768px) {
  .pp-trustbar__full { display: inline; }
  .pp-trustbar__short { display: none; }
}

/* --- Sticky Header (72px desktop / 64px mobile) --- */
.pp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  max-width: none;
  margin: 0;
  padding: 0;
  height: var(--header-height-mobile);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 1024px) {
  .pp-header {
    height: var(--header-height-desktop);
  }
}

.pp-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 100%;
}

.pp-logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.pp-logo span {
  color: var(--brand-primary);
}

.pp-logo:hover {
  color: var(--text-primary);
}

/* Desktop navigation */
.pp-nav {
  display: none;
  align-items: center;
  gap: var(--space-5);
}

@media (min-width: 1024px) {
  .pp-nav {
    display: flex;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .pp-nav {
    gap: var(--space-3);
  }
}

.pp-nav__item {
  position: relative;
}

.pp-nav__link,
.pp-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 4px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.pp-nav__link:hover,
.pp-nav__btn:hover,
.pp-nav__btn[aria-expanded="true"],
.pp-nav__btn[data-current="true"],
.pp-nav__link[aria-current="page"] {
  color: var(--brand-primary);
}

.pp-chevron {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  display: inline-block;
  transform-origin: 50% 50%;
  transform-box: view-box;
  transition: transform var(--ease-standard);
}

.pp-nav__btn[aria-expanded="true"] .pp-chevron {
  transform: rotate(180deg);
}

/* Dropdown panel: min-width 280, 12px padding, 12px radius */
.pp-dropdown {
  position: absolute;
  top: 100%;
  left: -12px;
  min-width: 280px;
  margin-top: 4px;
  padding: var(--space-3);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 120;
}

/* Invisible hover bridge so the panel does not close while the pointer travels */
.pp-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.pp-nav__item[data-open="true"] .pp-dropdown {
  display: flex;
}

.pp-dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-primary);
  text-decoration: none;
}

.pp-dropdown a:hover,
.pp-dropdown a:focus-visible {
  background-color: var(--brand-soft);
  color: var(--brand-dark);
}

/* Header actions */
.pp-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.pp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--ease-standard), border-color var(--ease-standard), color var(--ease-standard);
}

.pp-btn--sm {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 0.8125rem;
}

.pp-btn--primary {
  background-color: var(--brand-primary);
  color: #FFFFFF;
}

.pp-btn--primary:hover,
.pp-btn--primary:focus-visible {
  background-color: #0B1120;
  border-color: #0B1120;
  color: #FFFFFF;
}

.pp-btn--secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.pp-btn--secondary:hover {
  background-color: #0B1120;
  border-color: #0B1120;
  color: #FFFFFF;
}

.pp-btn--whatsapp {
  background-color: #FFFFFF;
  color: #065F46;
  border-color: var(--status-verified-border);
}

.pp-btn--whatsapp:hover {
  background-color: #0B1120;
  border-color: #0B1120;
  color: #FFFFFF;
}

.pp-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: currentColor;
}

.pp-header__cta {
  display: none;
}

@media (min-width: 1024px) {
  .pp-header__cta {
    display: inline-flex;
  }
}

/* Mobile hamburger */
.pp-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
}

.pp-menu-btn svg {
  width: 22px;
  height: 22px;
}

@media (min-width: 1024px) {
  .pp-menu-btn {
    display: none;
  }
}

/* Distraction-free header (/free-audit/) */
.pp-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}

.pp-back-link:hover {
  color: var(--brand-primary);
}

/* --- Mobile Slide-Over Drawer --- */
.pp-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(11, 17, 32, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease-standard), visibility var(--ease-standard);
}

.pp-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: min(360px, 88vw);
  background: var(--bg-primary);
  box-shadow: var(--shadow-dropdown);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 220ms cubic-bezier(0.2, 0, 0, 1), visibility 220ms;
}

.pp-drawer[data-open="true"] {
  transform: translateX(0);
  visibility: visible;
}

.pp-drawer[data-open="true"] + .pp-drawer-backdrop,
.pp-drawer-backdrop[data-open="true"] {
  opacity: 1;
  visibility: visible;
}

.pp-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height-mobile);
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  flex: 0 0 auto;
}

.pp-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--space-2) var(--space-4) var(--space-4);
  overscroll-behavior: contain;
}

.pp-drawer__group {
  border-bottom: 1px solid var(--border-subtle);
}

.pp-drawer__toggle,
.pp-drawer__link {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.pp-drawer__link {
  border-bottom: 1px solid var(--border-subtle);
}

.pp-drawer__toggle[aria-expanded="true"] {
  color: var(--brand-primary);
}

.pp-drawer__toggle[aria-expanded="true"] .pp-chevron {
  transform: rotate(180deg);
}

.pp-drawer__panel {
  padding: 0 0 var(--space-3);
}

.pp-drawer__panel[hidden] {
  display: none;
}

.pp-drawer__panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
}

.pp-drawer__panel a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.pp-drawer__foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-alt);
}

.pp-drawer__foot .pp-btn {
  width: 100%;
}

body.pp-no-scroll {
  overflow: hidden;
}

@media (min-width: 1024px) {
  .pp-drawer,
.pp-drawer-backdrop {
    display: none;
  }
}

/* --- Mobile Sticky Bottom Bar (56px, after 300px scroll) --- */
.pp-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  height: 56px;
  padding: 6px var(--space-4);
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
  transform: translateY(110%);
  transition: transform var(--ease-standard);
}

.pp-sticky-cta[data-visible="true"] {
  transform: translateY(0);
}

.pp-sticky-cta .pp-btn--primary {
  flex: 1 1 auto;
  min-width: 0;
}

.pp-sticky-cta .pp-btn--whatsapp {
  flex: 0 0 auto;
  padding-inline: 14px;
}

@media (min-width: 1024px) {
  .pp-sticky-cta {
    display: none;
  }
}

/* The bottom bar & hero carry WhatsApp on mobile/tablet, so hide the floating bubble below 1024px to avoid overlapping content */
@media (max-width: 1023px) {
  .ppx-wa {
    display: none !important;
  }
}

/* Keep desktop floating WhatsApp compact (52px circle) below 1480px so it never overlaps the 1120px content container */
@media (min-width: 1024px) and (max-width: 1479px) {
  .ppx-wa {
    left: 20px !important;
    bottom: 20px !important;
    padding: 0 !important;
    width: 52px !important;
  }
  .ppx-wa .ppx-wa-label {
    display: none !important;
  }
}

/* --- Buttons --- */
:where(html.pp-v4) .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color var(--ease-standard), border-color var(--ease-standard), color var(--ease-standard);
  white-space: nowrap;
}

:where(html.pp-v4) .btn--sm { min-height: 36px; padding: 8px 14px; font-size: 0.8125rem; }
:where(html.pp-v4) .btn--lg { min-height: 52px; padding: 14px 28px; font-size: 0.9375rem; }
:where(html.pp-v4) .btn--full { width: 100%; }

:where(html.pp-v4) .btn--primary {
  background-color: var(--brand-primary);
  color: #FFFFFF;
}

:where(html.pp-v4) .btn--primary:hover {
  background-color: #0B1120;
  border-color: #0B1120;
  color: #FFFFFF;
}

:where(html.pp-v4) .btn--secondary {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

:where(html.pp-v4) .btn--secondary:hover {
  background-color: #0B1120;
  border-color: #0B1120;
  color: #FFFFFF;
}

:where(html.pp-v4) .btn--dark-outline {
  background-color: transparent;
  color: var(--text-dark-primary);
  border-color: #334155;
}

:where(html.pp-v4) .btn--dark-outline:hover {
  background-color: #0B1120;
  border-color: #FFFFFF;
  color: #FFFFFF;
}

:where(html.pp-v4) .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Cards --- */
:where(html.pp-v4) .card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: box-shadow var(--ease-standard), border-color var(--ease-standard);
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .card {
    padding: 28px;
  }
}

:where(html.pp-v4) .card--interactive:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--brand-border);
}

:where(html.pp-v4) .card--featured {
  border: 2px solid var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

:where(html.pp-v4) .card--dark {
  background-color: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  color: var(--text-dark-body);
}

/* --- Badges --- */
:where(html.pp-v4) .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  border: 1px solid transparent;
}

:where(html.pp-v4) .badge--verified {
  background-color: var(--status-verified-bg);
  color: var(--status-verified-text);
  border-color: var(--status-verified-border);
}

:where(html.pp-v4) .badge--concept {
  background-color: var(--status-concept-bg);
  color: var(--status-concept-text);
  border-color: var(--status-concept-border);
  font-weight: 600;
}

:where(html.pp-v4) .badge--discount {
  background-color: var(--brand-soft);
  color: var(--brand-dark);
  border-color: var(--brand-border);
  border-radius: var(--radius-pill);
}

:where(html.pp-v4) .badge--pilot {
  background-color: var(--status-warn-bg);
  color: var(--status-warn-text);
  border-color: var(--status-warn-border);
  border-radius: var(--radius-pill);
}

/* --- Tabs (Pricing & Case Studies) --- */
:where(html.pp-v4) .tabs-bar {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

:where(html.pp-v4) .tab-btn {
  min-height: 40px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color var(--ease-standard), color var(--ease-standard);
}

:where(html.pp-v4) .tab-btn[aria-selected="true"] {
  background-color: var(--brand-primary);
  color: #FFFFFF;
}

/* --- Forms & Inputs (6 Mandatory UX Rules) --- */
:where(html.pp-v4) .form-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

:where(html.pp-v4) .form-field {
  display: flex;
  flex-direction: column;
}

:where(html.pp-v4) .form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

:where(html.pp-v4) .form-input,
:where(html.pp-v4) .form-select,
:where(html.pp-v4) .form-textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 16px; /* Prevents iOS auto-zoom */
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  transition: border-color var(--ease-standard), box-shadow var(--ease-standard);
}

:where(html.pp-v4) .form-textarea {
  min-height: 104px;
  resize: vertical;
}

:where(html.pp-v4) .form-input:focus,
:where(html.pp-v4) .form-select:focus,
:where(html.pp-v4) .form-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-focus-ring);
}

:where(html.pp-v4) .form-input[aria-invalid="true"],
:where(html.pp-v4) .form-select[aria-invalid="true"] {
  border-color: var(--status-alert);
}

:where(html.pp-v4) .form-error {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--status-alert-text);
  font-weight: 500;
}

:where(html.pp-v4) .form-privacy {
  margin-top: var(--space-2);
  font-size: 0.75rem;
  color: var(--text-caption);
  text-align: center;
}

/* 2-Step Progress Bar (/contact/) */
:where(html.pp-v4) .step-progress {
  width: 100%;
  height: 6px;
  background-color: var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

:where(html.pp-v4) .step-progress__fill {
  height: 100%;
  background-color: var(--brand-primary);
  transition: width 240ms ease;
}

/* --- FAQ Accordion --- */
:where(html.pp-v4) .faq-list {
  max-width: 820px;
  margin-inline: auto;
  border-top: 1px solid var(--border-subtle);
}

:where(html.pp-v4) .faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

:where(html.pp-v4) .faq-trigger {
  width: 100%;
  min-height: 56px;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: transparent;
  border: 0;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

:where(html.pp-v4) .faq-icon {
  color: var(--brand-primary);
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

:where(html.pp-v4) .faq-panel {
  padding-bottom: 18px;
  color: var(--text-body);
}

/* --- Responsive Comparison Tables --- */
:where(html.pp-v4) .table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

:where(html.pp-v4) .comparison-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--bg-primary);
  font-size: 0.9375rem;
}

:where(html.pp-v4) .comparison-table th,
:where(html.pp-v4) .comparison-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

:where(html.pp-v4) .comparison-table thead th {
  background-color: var(--bg-alt);
  color: var(--text-primary);
  font-weight: 700;
}

:where(html.pp-v4) .comparison-table .col-highlight {
  background-color: var(--brand-soft);
  color: var(--text-primary);
  font-weight: 600;
}

/* --- Unified 4-Column Dark Mega Footer (#0B1120) --- */
.pp-footer {
  background-color: var(--bg-dark);
  color: var(--text-dark-muted);
  padding: 48px 0 24px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Room for the 56px mobile sticky bar so it never covers the legal bar */
@media (max-width: 1023px) {
  body.pp-has-sticky .pp-footer {
    padding-bottom: 80px;
  }
}

@media (min-width: 1024px) {
  .pp-footer {
    padding: 64px 0 32px;
  }
}

.pp-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .pp-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .pp-footer__grid {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
  }
}

.pp-footer__brand {
  display: inline-block;
  margin: 0 0 var(--space-3);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-dark-primary);
  text-decoration: none;
}

.pp-footer__brand span {
  color: #2DD4BF;
}

.pp-footer__brand:hover {
  color: var(--text-dark-primary);
}

.pp-footer__about {
  margin: 0 0 var(--space-4);
  color: var(--text-dark-body);
  max-width: 42ch;
}

.pp-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 var(--space-4);
}

.pp-footer__contact a {
  color: var(--text-dark-primary);
  font-weight: 600;
  text-decoration: none;
}

.pp-footer__contact a:hover {
  color: #2DD4BF;
}

.pp-footer__hours {
  color: var(--text-dark-muted);
  font-size: 0.8125rem;
}

.pp-footer__profiles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pp-footer__profiles a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-pill);
  color: var(--text-dark-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.pp-footer__profiles a:hover {
  border-color: #2DD4BF;
  color: #FFFFFF;
}

.pp-footer__heading {
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  color: var(--text-dark-primary);
}

.pp-footer__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pp-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 0.875rem;
  color: var(--text-dark-muted);
  text-decoration: none;
}

.pp-footer__links a:hover,
.pp-footer__links a:focus-visible {
  color: #FFFFFF;
}

.pp-footer__links a.pp-footer__highlight {
  color: #2DD4BF;
  font-weight: 600;
}

.pp-footer__bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.8125rem;
  color: var(--text-dark-muted);
}

.pp-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.pp-footer__legal a {
  color: var(--text-dark-body);
  text-decoration: none;
}

.pp-footer__legal a:hover {
  color: #FFFFFF;
}

/* --- Asset Placeholder (When real user photo/screenshot is requested) --- */
:where(html.pp-v4) .asset-placeholder {
  background: var(--bg-alt);
  border: 2px dashed var(--brand-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ==========================================================================
   MASTER v4 PAGE SECTIONS (Phase 2+) — reusable across rebuilt pages.
   Scoped to html.pp-v4 with :where() (zero specificity).
   ========================================================================== */
:where(html.pp-v4) body {
  color: var(--text-body);
}

:where(html.pp-v4) p {
  margin: 0 0 var(--space-4);
}

:where(html.pp-v4) ul {
  margin: 0;
}

:where(html.pp-v4) .text-center { text-align: center; }
:where(html.pp-v4) .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

:where(html.pp-v4) .lead {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 65ch;
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .lead { font-size: 1.125rem; }
}

:where(html.pp-v4) .btn {
  white-space: normal;
  text-align: center;
  text-decoration: none;
}

:where(html.pp-v4) .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (max-width: 599px) {
  :where(html.pp-v4) .btn-row .btn { width: 100%; }
}

:where(html.pp-v4) .check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

:where(html.pp-v4) .check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9375rem;
  line-height: 1.55;
}

:where(html.pp-v4) .check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2 7 10.5l4.5-5' fill='none' stroke='%230E7C6B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

:where(html.pp-v4) .section--dark .check-list li::before {
  background-color: rgba(45, 212, 191, 0.12);
}

/* --- Split Hero --- */
:where(html.pp-v4) .hero {
  padding-block: 40px 52px;
  background: var(--bg-primary);
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .hero { padding-block: 72px 80px; }
}

:where(html.pp-v4) .hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 56px;
  }
}

:where(html.pp-v4) .hero__copy .lead { margin-bottom: var(--space-6); }

:where(html.pp-v4) .hero__micro {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: var(--space-5);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

:where(html.pp-v4) .hero__micro span { display: inline-flex; align-items: center; gap: 6px; }

/* Diagnostic card (hero right column) */
:where(html.pp-v4) .diag-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-hover);
  padding: var(--space-5);
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .diag-card { padding: 28px; }
}

:where(html.pp-v4) .diag-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

:where(html.pp-v4) .diag-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

:where(html.pp-v4) .diag-card .tabs-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: var(--radius-lg);
  width: 100%;
  margin-bottom: var(--space-5);
}

@media (min-width: 480px) {
  :where(html.pp-v4) .diag-card .tabs-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

:where(html.pp-v4) .diag-card .tab-btn {
  border-radius: var(--radius-md);
  padding: 8px 6px;
  font-size: 0.8125rem;
  line-height: 1.25;
}

:where(html.pp-v4) .diag-panel h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  margin-bottom: var(--space-2);
}

:where(html.pp-v4) .diag-panel p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

:where(html.pp-v4) .diag-panel .check-list { margin-bottom: var(--space-5); }

:where(html.pp-v4) .diag-panel__links {
  margin-top: var(--space-3);
  font-size: 0.8125rem;
  color: var(--text-caption);
}

:where(html.pp-v4) .diag-panel__links a { font-weight: 600; }

:where(html.pp-v4) [role="tabpanel"][hidden] { display: none; }

/* --- Proof Bar --- */
:where(html.pp-v4) .proof-bar {
  background: var(--bg-alt);
  border-block: 1px solid var(--border-subtle);
  padding-block: 32px;
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .proof-bar { padding-block: 40px; }
}

:where(html.pp-v4) .proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (min-width: 768px) {
  :where(html.pp-v4) .proof-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .proof-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

:where(html.pp-v4) .proof-chip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

:where(html.pp-v4) .proof-chip:first-child {
  grid-column: 1 / -1;
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .proof-chip:first-child { grid-column: auto; }
}

:where(html.pp-v4) .proof-chip__value {
  font-size: 1.5rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

:where(html.pp-v4) .proof-chip__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

:where(html.pp-v4) .proof-chip__note {
  font-size: 0.75rem;
  color: var(--text-caption);
  line-height: 1.45;
}

:where(html.pp-v4) .proof-chip .badge { align-self: flex-start; font-size: 0.6875rem; padding: 3px 8px; }

/* --- Problem cards --- */
:where(html.pp-v4) .icon-tile {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

:where(html.pp-v4) .icon-tile svg { width: 22px; height: 22px; display: block; }

:where(html.pp-v4) .card p:last-child { margin-bottom: 0; }

:where(html.pp-v4) .card__meta {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-caption);
  margin-top: var(--space-3);
}

/* --- Bento pillars --- */
:where(html.pp-v4) .pillar {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--ease-standard), box-shadow var(--ease-standard), border-color var(--ease-standard);
}

:where(html.pp-v4) .pillar:hover,
:where(html.pp-v4) .pillar:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(11, 17, 32, 0.08), 0 2px 6px rgba(14, 124, 107, 0.08);
  border-color: var(--brand-primary);
}

:where(html.pp-v4) .pillar:hover .pillar__num,
:where(html.pp-v4) .pillar:focus-within .pillar__num {
  color: var(--brand-primary);
}

:where(html.pp-v4) .pillar:hover .text-link,
:where(html.pp-v4) .pillar:focus-within .text-link {
  color: var(--brand-hover);
}

@media (prefers-reduced-motion: reduce) {
  :where(html.pp-v4) .pillar:hover,
  :where(html.pp-v4) .pillar:focus-within {
    transform: none;
  }
}

:where(html.pp-v4) .pillar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

:where(html.pp-v4) .pillar__num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-caption);
}

:where(html.pp-v4) .pillar .check-list { margin: var(--space-4) 0 var(--space-5); }

:where(html.pp-v4) .pillar__foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

:where(html.pp-v4) .pillar__price {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

:where(html.pp-v4) .pillar__price strong {
  font-size: 1.25rem;
  color: var(--text-primary);
}

:where(html.pp-v4) .text-link {
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
}

/* --- Dark process timeline --- */
:where(html.pp-v4) .timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  counter-reset: none;
}

@media (min-width: 768px) {
  :where(html.pp-v4) .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
}

:where(html.pp-v4) .timeline__step {
  position: relative;
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

:where(html.pp-v4) .timeline__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #2DD4BF;
  color: #2DD4BF;
  font-weight: 800;
  font-size: 0.875rem;
  margin-bottom: var(--space-4);
  font-variant-numeric: tabular-nums;
}

:where(html.pp-v4) .timeline__step h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  margin-bottom: var(--space-2);
}

:where(html.pp-v4) .timeline__step p {
  font-size: 0.875rem;
  color: var(--text-dark-body);
  margin: 0;
}

/* --- Pricing tabs & cards --- */
:where(html.pp-v4) .tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-8);
}

@media (max-width: 599px) {
  :where(html.pp-v4) .tabs-wrap .tabs-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: var(--radius-lg);
    width: 100%;
  }
  :where(html.pp-v4) .tabs-wrap .tab-btn { border-radius: var(--radius-md); padding: 8px 10px; }
}

:where(html.pp-v4) .pilot-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
  background: linear-gradient(135deg, #0B1120 0%, #102A27 100%);
  border: 1.5px solid #F59E0B;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: var(--space-8);
  box-shadow: 0 14px 32px rgba(11, 17, 32, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform var(--ease-standard), box-shadow var(--ease-standard);
}

:where(html.pp-v4) .pilot-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(11, 17, 32, 0.18), 0 0 0 1px rgba(245, 158, 11, 0.35);
}

@media (min-width: 768px) {
  :where(html.pp-v4) .pilot-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
  }
}

:where(html.pp-v4) .pilot-banner .badge--pilot {
  background: #FEF3C7;
  color: #92400E;
  border-color: #F59E0B;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

:where(html.pp-v4) .pilot-banner p {
  margin: 10px 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #E2E8F0;
  max-width: 68ch;
}

:where(html.pp-v4) .pilot-banner strong { color: #FBBF24; }

:where(html.pp-v4) .pilot-banner .btn--primary {
  flex: 0 0 auto;
  box-shadow: 0 6px 18px rgba(14, 124, 107, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  :where(html.pp-v4) .pilot-banner:hover { transform: none; }
}

:where(html.pp-v4) .price-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

:where(html.pp-v4) .price-card h3 {
  font-size: 1rem;
  line-height: 1.35;
  margin-bottom: var(--space-2);
}

:where(html.pp-v4) .price-card__billing {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-caption);
  margin-bottom: var(--space-4);
}

:where(html.pp-v4) .price-card__row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: var(--space-3);
}

:where(html.pp-v4) .price-card .price-figure { font-size: 1.875rem; }

:where(html.pp-v4) .price-card__per {
  font-size: 0.875rem;
  color: var(--text-caption);
}

:where(html.pp-v4) .price-card__pilot {
  margin-top: auto;
  padding-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

:where(html.pp-v4) .price-card__note {
  font-size: 0.8125rem;
  color: var(--brand-dark);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

:where(html.pp-v4) .price-card__cta { margin-top: var(--space-4); }

:where(html.pp-v4) .risk-bar {
  margin-top: var(--space-8);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- Case study cards --- */
:where(html.pp-v4) .case-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  height: 100%;
}

:where(html.pp-v4) .case-card__media {
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle);
  overflow: hidden;
}

:where(html.pp-v4) .case-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

:where(html.pp-v4) .case-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  flex: 1 1 auto;
}

:where(html.pp-v4) .case-card__body h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  margin: 0;
}

:where(html.pp-v4) .case-card__body p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

:where(html.pp-v4) .case-card__kpi {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

:where(html.pp-v4) .case-card .text-link { margin-top: auto; }

/* --- Tool cards --- */
:where(html.pp-v4) .tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

:where(html.pp-v4) .tool-card h3 { font-size: 1.0625rem; line-height: 1.35; }

:where(html.pp-v4) .tool-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

:where(html.pp-v4) .tool-card .text-link { margin-top: auto; }

/* --- Founder block --- */
:where(html.pp-v4) .founder {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-12);
}

@media (min-width: 768px) {
  :where(html.pp-v4) .founder { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-8); }
}

:where(html.pp-v4) .founder__photo {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  :where(html.pp-v4) .founder__photo { width: 200px; height: 200px; }
}

:where(html.pp-v4) .founder blockquote {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-4);
  border-left: 3px solid var(--brand-primary);
  color: var(--text-primary);
  font-weight: 500;
}

:where(html.pp-v4) .founder__name {
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

:where(html.pp-v4) .founder__role {
  font-size: 0.875rem;
  color: var(--text-caption);
  margin: 0;
}

/* --- FAQ (native details/summary, matches DESIGN.md accordion spec) --- */
:where(html.pp-v4) .faq-item > summary {
  list-style: none;
  min-height: 56px;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

:where(html.pp-v4) .faq-item > summary::-webkit-details-marker { display: none; }

:where(html.pp-v4) .faq-item > summary::after {
  content: "+";
  color: var(--brand-primary);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

:where(html.pp-v4) .faq-item[open] > summary::after { content: "\2212"; }

:where(html.pp-v4) .faq-item > summary:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

:where(html.pp-v4) .faq-panel p:last-child { margin-bottom: 0; }

/* --- Conversion block (form + proof) --- */
:where(html.pp-v4) .convert {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .convert { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--space-10); }
}

:where(html.pp-v4) .form-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .form-card { padding: 32px; }
}

:where(html.pp-v4) .form-card h3 { font-size: 1.25rem; }

:where(html.pp-v4) .form-status {
  margin-top: var(--space-3);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

:where(html.pp-v4) .form-status[hidden] { display: none; }

:where(html.pp-v4) .form-status--ok {
  background: var(--status-verified-bg);
  border: 1px solid var(--status-verified-border);
  color: var(--status-verified-text);
}

:where(html.pp-v4) .form-status--err {
  background: var(--status-alert-bg);
  border: 1px solid #FECACA;
  color: #991B1B;
}

:where(html.pp-v4) .quote-card {
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .quote-card { padding: 28px; }
}

:where(html.pp-v4) .quote-card blockquote {
  margin: var(--space-4) 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 500;
}

:where(html.pp-v4) .quote-card cite {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--text-muted);
}

:where(html.pp-v4) .quote-card__kpis {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

:where(html.pp-v4) .quote-card__kpis .kpi-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

:where(html.pp-v4) .quote-card__kpis span:last-child {
  font-size: 0.8125rem;
  color: var(--text-caption);
}

:where(html.pp-v4) .trust-points {
  margin-top: var(--space-5);
}

:where(html.pp-v4) .honeypot {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

:where(html.pp-v4) main:focus { outline: none; }

:where(html.pp-v4) .price-card .badge,
:where(html.pp-v4) .case-card .badge,
:where(html.pp-v4) .pillar .badge,
:where(html.pp-v4) .quote-card .badge {
  align-self: flex-start;
}

:where(html.pp-v4) .price-card__pilot-amt {
  white-space: nowrap;
  font-weight: 700;
  color: var(--text-primary);
}

/* --- Inner page hero + breadcrumb (Phase 3) --- */
:where(html.pp-v4) .breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-caption);
  margin-bottom: var(--space-4);
}

:where(html.pp-v4) .breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

:where(html.pp-v4) .breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--border-strong);
}

:where(html.pp-v4) .breadcrumb a { color: var(--text-muted); }
:where(html.pp-v4) .breadcrumb a:hover { color: var(--brand-primary); }

:where(html.pp-v4) .page-hero {
  padding-block: 32px 48px;
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .page-hero { padding-block: 40px 72px; }
}

:where(html.pp-v4) .page-hero--center { text-align: center; }
:where(html.pp-v4) .page-hero--center .lead { margin-inline: auto; }
:where(html.pp-v4) .page-hero--center .btn-row { justify-content: center; }
:where(html.pp-v4) .page-hero--center .breadcrumb ol { justify-content: center; }

:where(html.pp-v4) .page-hero .page-h1 { max-width: 22ch; margin-inline: auto; }
:where(html.pp-v4) .page-hero--split .page-h1 { text-align: left; margin-inline: 0; max-width: none; }

:where(html.pp-v4) .page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: var(--space-5);
  font-size: 0.875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

:where(html.pp-v4) .page-hero--center .page-hero__meta { justify-content: center; }

:where(html.pp-v4) .split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: start;
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  :where(html.pp-v4) .split--wide-left { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}

:where(html.pp-v4) .notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--text-primary);
  font-size: 0.9375rem;
}

:where(html.pp-v4) .notice p { margin: 0; }

:where(html.pp-v4) .stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}

@media (min-width: 768px) {
  :where(html.pp-v4) .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

:where(html.pp-v4) .stat {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}

:where(html.pp-v4) .stat .kpi-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
}

:where(html.pp-v4) .stat span:last-child {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Accordion used for the 58-point audit categories (native details) */
:where(html.pp-v4) .accordion { display: flex; flex-direction: column; gap: var(--space-3); }

:where(html.pp-v4) .accordion details {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0 var(--space-5);
}

:where(html.pp-v4) .accordion details[open] { border-color: var(--brand-border); }

:where(html.pp-v4) .accordion summary {
  list-style: none;
  min-height: 56px;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
}

:where(html.pp-v4) .accordion summary::-webkit-details-marker { display: none; }
:where(html.pp-v4) .accordion summary::after { content: "+"; color: var(--brand-primary); font-size: 1.25rem; font-weight: 700; }
:where(html.pp-v4) .accordion details[open] summary::after { content: "\2212"; }
:where(html.pp-v4) .accordion .check-list { padding-bottom: var(--space-5); }

:where(html.pp-v4) .count-pill {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  white-space: nowrap;
}

/* Two-column "for / not for" lists */
:where(html.pp-v4) .x-list li::before {
  background: var(--status-alert-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.5 5.5l5 5m0-5-5 5' fill='none' stroke='%23EF4444' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* Top cross-link badge (Paid Media Creative) */
:where(html.pp-v4) .crosslink-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--status-warn-bg);
  border: 1px solid var(--status-warn-border);
  color: var(--status-warn-text);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--space-5);
}

:where(html.pp-v4) .crosslink-badge a { color: var(--brand-dark); text-decoration: underline; }

/* 2-step form */
:where(html.pp-v4) .step-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

:where(html.pp-v4) .form-step[hidden] { display: none; }

:where(html.pp-v4) .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

:where(html.pp-v4) .form-actions .btn--primary { flex: 1 1 220px; }

:where(html.pp-v4) .link-btn {
  background: none;
  border: 0;
  padding: 10px 4px;
  min-height: 44px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-primary);
  cursor: pointer;
}

:where(html.pp-v4) .optional { font-weight: 500; color: var(--text-caption); }

/* Contact side card */
:where(html.pp-v4) .contact-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

:where(html.pp-v4) .contact-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

:where(html.pp-v4) .contact-line .icon-tile { margin: 0; flex: 0 0 44px; }
:where(html.pp-v4) .contact-line p { margin: 0; font-size: 0.9375rem; }
:where(html.pp-v4) .contact-line strong { display: block; color: var(--text-primary); }

/* Free-audit thank-you + scan results */
:where(html.pp-v4) .result-panel[hidden] { display: none; }

:where(html.pp-v4) .score-ring {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

:where(html.pp-v4) .score-ring__num {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  flex: 0 0 72px;
}

:where(html.pp-v4) .finding {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.9375rem;
}

:where(html.pp-v4) .finding strong { display: block; color: var(--text-primary); }
:where(html.pp-v4) .finding .badge { flex: 0 0 auto; }

:where(html.pp-v4) .badge--warn {
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
  border-color: var(--status-warn-border);
}

:where(html.pp-v4) .badge--fail {
  background: var(--status-alert-bg);
  color: #991B1B;
  border-color: #FECACA;
}

:where(html.pp-v4) .locked-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed var(--border-strong);
  font-size: 0.875rem;
  color: var(--text-caption);
}

:where(html.pp-v4) .upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

:where(html.pp-v4) .upgrade-grid .card { padding: var(--space-5); }
:where(html.pp-v4) .upgrade-grid .price-card h3 { font-size: 0.9375rem; }

:where(html.pp-v4) .note-toggle[aria-expanded="true"] .note-toggle__plus { display: none; }

:where(html.pp-v4) .spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--brand-primary);
  animation: pp-spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes pp-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  :where(html.pp-v4) .spinner { animation-duration: 2.4s; }
}

:where(html.pp-v4) .media-frame {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

:where(html.pp-v4) .section-h2--left {
  text-align: left;
  margin-inline: 0;
}

:where(html.pp-v4) .single-card {
  max-width: 380px;
  margin-inline: auto;
}

/* 4:5 + 9:16 format mockup (pure CSS, created for /paid-media-creative/) */
:where(html.pp-v4) .format-mock {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  height: 132px;
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
}

:where(html.pp-v4) .format-mock__frame {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--brand-soft), #FFFFFF);
  border: 1.5px solid var(--brand-border);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

:where(html.pp-v4) .format-mock__frame small {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-caption);
}

:where(html.pp-v4) .format-mock__frame--45 { height: 100%; aspect-ratio: 4 / 5; }
:where(html.pp-v4) .format-mock__frame--916 { height: 100%; aspect-ratio: 9 / 16; }

/* The HTML hidden attribute must always win over component display rules */
:where(html.pp-v4) [hidden] {
  display: none !important;
}

/* Filter bar (case studies hub) — pill buttons with aria-pressed */
:where(html.pp-v4) .filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-8);
}

:where(html.pp-v4) .filter-bar button {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

:where(html.pp-v4) .filter-bar button[aria-pressed="true"] {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #FFFFFF;
}

:where(html.pp-v4) .featured-case {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

@media (min-width: 1024px) {
  :where(html.pp-v4) .featured-case { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}

:where(html.pp-v4) .featured-case img { width: 100%; height: 100%; object-fit: cover; }
:where(html.pp-v4) .featured-case__body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
:where(html.pp-v4) .featured-case__body h3 { font-size: 1.375rem; margin: 0; }
:where(html.pp-v4) .subhead { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin: var(--space-10) 0 var(--space-5); text-align: center; }

/* ==========================================================================
   Complianz cookie banner fix (global — all pages)
   The cached banner CSS (wp-content/cache/.../banner-1-optin.css) lost the
   rules that hide the banner, so it never closed after Accept / Deny / Save,
   even though consent was saved. Complianz toggles these classes itself.
   ========================================================================== */
.cmplz-cookiebanner.cmplz-hidden,
.cmplz-cookiebanner.cmplz-dismissed {
  display: none !important;
}

/* Keep the banner above the shell (sticky header 100, bottom bar 110, drawer 200) */
.cmplz-cookiebanner.cmplz-show {
  z-index: 300 !important;
}

/* Homepage diagnostic card: stack all tab panels in one grid cell so the card
   keeps the height of the tallest panel and never jumps when tabs change. */
:where(html.pp-v4) .diag-panels {
  display: grid;
}

:where(html.pp-v4) .diag-panels > .diag-panel {
  grid-area: 1 / 1;
}

html.pp-v4 .diag-panels > .diag-panel[hidden] {
  display: block !important;
  visibility: hidden;
}

/* "View preferences" state, toggled by the consent script */
.cmplz-cookiebanner.pp-prefs-open .cmplz-categories { display: block !important; }
.cmplz-cookiebanner.pp-prefs-open .cmplz-save-preferences { display: block !important; }
.cmplz-cookiebanner.pp-prefs-open .cmplz-view-preferences { display: none !important; }
.cmplz-cookiebanner.pp-prefs-open .cmplz-categories .cmplz-category { margin-bottom: 8px; }

/* Screen-reader-only text inside the consent banner (WordPress class, its CSS was not cached) */
.cmplz-cookiebanner .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Blog "quick answer" box (AEO): short direct answer right under the H1.
   Most posts also carry their own inline copy of this rule; this is the shared fallback. */
.ppx-answer { border-left: 4px solid var(--brand-primary, #0E7C6B); padding: 14px 18px; margin: 0 0 1.6em; background: rgba(127, 127, 127, 0.08); border-radius: 6px; }
.ppx-answer > p:last-child { margin-bottom: 0; }
