/*
  Shared responsive layer for the public PCFM pages.
  Loaded after each page's embedded styles so these rules can correct layout
  without changing the archived mockup backup.
*/

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

img,
video {
  height: auto;
}

p,
li,
h1,
h2,
h3,
h4,
a,
button,
span {
  overflow-wrap: anywhere;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

#top {
  scroll-margin-top: 76px;
}

.button,
.hero-cta,
.plan-cta,
.final-cta-btn,
.next-step-link,
.sticky-btn,
.nav-link,
.nav-links a {
  min-height: 44px;
  text-align: center;
  touch-action: manipulation;
}

.site-header .nav,
body > .nav {
  flex-wrap: nowrap !important;
}

.site-header .nav-links,
body > .nav .nav-links {
  flex: 0 1 auto;
  flex-wrap: nowrap !important;
  min-width: 0;
}

.site-header .nav-links a,
body > .nav .nav-link,
body > .nav .nav-links a,
.site-header .brand,
.site-header .brand *,
body > .nav .nav-brand {
  overflow-wrap: normal !important;
  word-break: normal !important;
  white-space: nowrap !important;
}

.site-header .nav-links a,
body > .nav .nav-link,
body > .nav .nav-links a {
  flex: 0 0 auto;
  line-height: 1.15;
}

.site-header .nav-action,
.site-header .nav-actions,
body > .nav .nav-link.primary {
  flex: 0 0 auto;
}

.wrap,
.hero-inner,
.hero-content,
.section-header,
.plans-section,
.comparison-section,
.faq-section,
.final-cta,
.feature-block,
.math-section,
.unlock-section,
.included-section,
.next-step,
.footer {
  max-width: min(100%, var(--page-max, 1180px));
}

.market-strip,
.trust-strip,
.directory-shell,
.executive-grid,
.executive-status-strip,
.team-grid,
.decision-grid,
.plans-grid,
.value-grid,
.steps,
.product-grid,
.feature-grid,
.timeline,
.included-grid,
.unlock-grid,
.math-scenarios,
.pro-grid,
.modal-products,
.footer-grid {
  min-width: 0;
}

.market-card,
.product-card,
.feature-card,
.timeline-card,
.vendor-card,
.plan-card,
.value-card,
.step-card,
.team-card,
.decision-card,
.included-card,
.unlock-item,
.math-card,
.pro-card,
.modal-panel,
.executive-panel,
.executive-card,
.executive-blocker,
.mock-dash,
.mock-map,
.mock-social,
.upgrade-card,
.next-step {
  min-width: 0;
}

.comparison-section {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
}

.modal {
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.modal-panel {
  max-height: calc(100dvh - 32px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@supports selector(body:has(.sticky-cta)) {
  body:has(.sticky-cta) {
    padding-bottom: 92px;
  }
}

@media (max-width: 1120px) {
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .upgrade-strip {
    grid-template-columns: 1fr !important;
  }

  .upgrade-arrow {
    display: none !important;
  }

  .executive-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) !important;
  }

  .executive-grid > aside:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  .site-header {
    z-index: 200;
  }

  .site-header .nav {
    width: calc(100% - 24px);
    gap: 12px;
  }

  .site-header .brand {
    min-width: 0;
  }

  .site-header .brand span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header .menu-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto;
  }

  .site-header .nav-links {
    top: 76px !important;
    right: 12px !important;
    left: 12px !important;
    bottom: auto !important;
    max-height: min(72dvh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    z-index: 220;
  }

  .site-header .nav-links.open {
    display: flex !important;
  }

  .site-header .nav-links a,
  .site-header .nav-action {
    width: 100%;
    justify-content: center !important;
    white-space: normal !important;
  }

  .site-header .nav-actions {
    display: none !important;
  }

  .two-column,
  .quote-band .wrap,
  .split-cta,
  .directory-meta,
  .toolbar,
  .modal-panel,
  .executive-status-strip,
  .team-grid,
  .decision-grid,
  .feature-block,
  .feature-block.reverse,
  .before-after,
  .unlock-grid,
  .included-grid,
  .math-scenarios {
    grid-template-columns: 1fr !important;
    direction: ltr !important;
  }

  .toolbar {
    gap: 12px;
  }

  .hero-actions,
  .split-actions,
  .next-actions,
  .final-actions {
    flex-wrap: wrap;
  }
}

@media (min-width: 1181px) {
  .site-header .nav {
    gap: clamp(12px, 1.4vw, 22px) !important;
  }

  .site-header .nav-links {
    gap: clamp(2px, 0.45vw, 8px) !important;
  }

  .site-header .nav-links a {
    padding-left: clamp(7px, 0.62vw, 12px) !important;
    padding-right: clamp(7px, 0.62vw, 12px) !important;
    font-size: clamp(13px, 0.92vw, 14px) !important;
  }
}

@media (max-width: 760px) {
  body > .nav {
    width: 100%;
    max-width: none;
    padding: 12px 14px !important;
    gap: 10px;
    align-items: stretch !important;
    flex-direction: column !important;
  }

  body > .nav .nav-brand {
    display: block;
    width: 100%;
    text-align: center;
    white-space: normal;
  }

  body > .nav .nav-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px !important;
    justify-content: stretch !important;
  }

  body > .nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 9px 10px !important;
    line-height: 1.15;
  }

  body > .nav .nav-link.primary {
    grid-column: 1 / -1;
  }

  .hero {
    padding-left: 18px !important;
    padding-right: 18px !important;
    min-height: auto !important;
  }

  .hero h1,
  .hero-copy h1 {
    font-size: clamp(28px, 7.6vw, 36px) !important;
    line-height: 1.08 !important;
  }

  .hero p,
  .hero-copy > p,
  .hero-content > p {
    font-size: 16px !important;
    line-height: 1.52 !important;
  }

  .hero-actions,
  .split-actions,
  .next-actions,
  .final-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .button,
  .split-actions .button,
  .next-actions a,
  .final-actions a,
  .hero-cta,
  .plan-cta,
  .final-cta-btn,
  .next-step-link {
    width: 100%;
    justify-content: center;
  }

  .market-strip,
  .product-grid,
  .feature-grid,
  .timeline,
  .footer-grid,
  .grid,
  .plans-grid,
  .value-grid,
  .steps,
  .executive-grid,
  .executive-status-strip,
  .team-grid,
  .decision-grid,
  .modal-products,
  .included-grid,
  .unlock-grid,
  .math-scenarios,
  .pro-grid {
    grid-template-columns: 1fr !important;
  }

  .plans-grid {
    max-width: 430px;
    margin-left: auto;
    margin-right: auto;
  }

  .comparison-table {
    min-width: 720px;
  }

  .modal {
    align-items: flex-start;
    padding-left: 10px;
    padding-right: 10px;
  }

  .modal-panel {
    width: 100%;
    border-radius: 18px;
  }

  .modal-hero {
    min-height: 180px;
  }

  .sticky-cta {
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
  }

  .sticky-cta .info {
    text-align: center;
  }

  .sticky-btn {
    width: 100%;
    justify-content: center;
  }

  @supports selector(body:has(.sticky-cta)) {
    body:has(.sticky-cta) {
      padding-bottom: 148px;
    }
  }
}

@media (max-width: 640px) {
  .site-header {
    top: 0;
  }

  .site-header .nav {
    width: calc(100% - 20px);
    min-height: 62px !important;
    padding: 8px 0 !important;
  }

  .site-header .brand img {
    width: 36px !important;
    height: 36px !important;
  }

  .site-header .brand span {
    max-width: calc(100vw - 126px);
    font-size: 13px !important;
  }

  .site-header .nav-links {
    top: 66px !important;
    padding: 12px !important;
  }

  .wrap,
  .hero-inner,
  .hero-content,
  .directory-shell,
  .plans-section,
  .comparison-section,
  .faq-section,
  .final-cta,
  .math-section,
  .unlock-section,
  .included-section,
  .next-step,
  .footer {
    width: calc(100% - 28px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .hero-inner,
  .hero-content {
    padding-top: 44px !important;
    padding-bottom: 38px !important;
  }

  .hero-actions {
    margin-bottom: 24px !important;
  }

  .market-strip div {
    min-height: 62px !important;
    padding: 13px 16px !important;
  }

  .market-strip span {
    font-size: 12px !important;
  }

  .market-strip strong {
    font-size: 16px !important;
  }

  .hero-price .amount {
    font-size: 48px !important;
  }

  .hero-stats {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .section {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .section-title,
  .section-header h2,
  .plans-section h2,
  .comparison-section h2,
  .faq-section h2,
  .final-cta h2,
  .feature-block h2,
  .math-section h2,
  .unlock-section h2,
  .included-section h2,
    .next-step h2 {
    font-size: clamp(25px, 7.4vw, 32px) !important;
    line-height: 1.12 !important;
  }

  .market-card,
  .product-card,
  .feature-card,
  .timeline-card,
  .vendor-card,
  .plan-card,
  .value-card,
  .step-card,
  .team-card,
  .decision-card,
  .included-card,
  .unlock-item,
  .math-card,
  .pro-card,
  .executive-panel,
  .executive-card,
  .executive-blocker,
  .mock-dash,
  .mock-map,
  .mock-social,
  .upgrade-card,
  .next-step {
    border-radius: 16px !important;
  }

  .toolbar .field input,
  .toolbar .field select,
  .search-input,
  .category-select {
    width: 100%;
    min-height: 46px;
  }

  .toggle {
    width: 100%;
    min-height: 44px;
    margin-top: 0 !important;
    justify-content: flex-start;
  }

  .toggle input {
    flex: 0 0 auto;
    width: 18px !important;
    min-height: 18px !important;
    height: 18px !important;
  }

  .category-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .category-chip,
  .chip {
    flex: 0 0 auto;
  }
}

@media (max-width: 430px) {
  body > .nav .nav-links {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .hero-copy h1 {
    font-size: clamp(28px, 8.8vw, 32px) !important;
  }

  .hero-cta,
  .button,
  .plan-cta,
  .final-cta-btn,
  .next-step-link,
  .sticky-btn {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .comparison-table {
    min-width: 660px;
  }

  .modal-panel {
    border-radius: 14px;
  }
}
