:root {
  --p2s-primary: var(--wp--preset--color--primary, #155c4a);
  --p2s-secondary: var(--wp--preset--color--secondary, #dce9df);
  --p2s-accent: var(--wp--preset--color--accent, #e6a63b);
  --p2s-background: var(--wp--preset--color--background, #f6f7f2);
  --p2s-text: var(--wp--preset--color--foreground, #18231f);
  --p2s-font-heading: var(--wp--preset--font-family--heading, "Manrope", sans-serif);
  --p2s-font-body: var(--wp--preset--font-family--body, "Source Sans 3", sans-serif);
  --p2s-space-xs: var(--wp--preset--spacing--20, 0.25rem);
  --p2s-space-sm: var(--wp--preset--spacing--30, 0.5rem);
  --p2s-space-md: var(--wp--preset--spacing--40, 1rem);
  --p2s-space-lg: var(--wp--preset--spacing--50, 1.5rem);
  --p2s-space-xl: var(--wp--preset--spacing--60, 2rem);
  --p2s-radius-sm: 0.25rem;
  --p2s-radius-md: 0.5rem;
  --p2s-radius-lg: 1rem;
  --p2s-content-width: 72rem;
}

.p2s-section {
  padding: clamp(var(--p2s-space-xl), 7vw, 5rem) var(--p2s-space-md);
  color: var(--p2s-text);
  font-family: var(--p2s-font-body);
  /* Long words, URLs and {{placeholders}} wrap instead of pushing the page wider than the screen. "anywhere"
     (unlike break-word) also lowers the min-content width, so grid and flex columns can shrink. */
  overflow-wrap: anywhere;
}

.p2s-section__inner {
  width: min(100%, var(--p2s-content-width));
  margin-inline: auto;
}

.p2s-section__headline,
.p2s-feature__title,
.p2s-pricing__name,
.p2s-testimonial__author,
.p2s-faq__question {
  color: inherit;
  font-family: var(--p2s-font-heading);
  line-height: 1.15;
}

.p2s-section__headline {
  margin: 0 0 var(--p2s-space-sm);
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.p2s-section__subheadline {
  margin: 0 0 var(--p2s-space-md);
  font-size: 1.25rem;
}
.p2s-section__body {
  max-width: 48rem;
  margin: 0 0 var(--p2s-space-lg);
  line-height: 1.65;
}

.p2s-section--align-center {
  text-align: center;
}
.p2s-section--align-center .p2s-actions {
  justify-content: center;
}
.p2s-section--align-right {
  text-align: right;
}
.p2s-section--align-right .p2s-actions {
  justify-content: flex-end;
}

.p2s-section--bg-primary {
  background: var(--p2s-primary);
  color: #fff;
}
.p2s-section--bg-secondary {
  background: var(--p2s-secondary);
}
.p2s-section--bg-accent {
  background: var(--p2s-accent);
}
.p2s-section--bg-background {
  background: var(--p2s-background);
}
.p2s-section--bg-text {
  background: var(--p2s-text);
  color: #fff;
}

.p2s-hero.p2s-section--layout-split .p2s-section__inner,
.p2s-cta.p2s-section--layout-split .p2s-section__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  /* Rows 0, columns xl: the text keeps its own margins, and empty rows add no space. */
  gap: 0 var(--p2s-space-xl);
}
/* Text stays together in the first column and the image fills the second, instead of the grid alternating
   headline, subheadline, body and image between the two columns. */
.p2s-hero.p2s-section--layout-split .p2s-section__inner > *,
.p2s-cta.p2s-section--layout-split .p2s-section__inner > * {
  grid-column: 1;
}
.p2s-hero.p2s-section--layout-split .p2s-section__inner > .p2s-image-slot,
.p2s-cta.p2s-section--layout-split .p2s-section__inner > .p2s-image-slot {
  grid-column: 2;
  grid-row: 1 / span 4;
}

/* Height follows the width through the aspect ratio. A fixed min-height here forced a minimum width
   (14rem x 1.5 = 21rem) that overflowed narrow screens. */
.p2s-image-slot {
  display: grid;
  width: 100%;
  aspect-ratio: var(--p2s-image-ratio, 3 / 2);
  place-items: center;
  margin: 0;
  border-radius: var(--p2s-radius-lg);
  background: color-mix(in srgb, var(--p2s-secondary) 70%, white);
  color: var(--p2s-text);
}

.p2s-image-slot__label {
  padding: var(--p2s-space-md);
  text-align: center;
}

.p2s-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--p2s-space-sm);
  margin-top: var(--p2s-space-lg);
}

.p2s-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--p2s-primary);
  border-radius: var(--p2s-radius-md);
  background: var(--p2s-primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.p2s-button--secondary {
  background: transparent;
  color: var(--p2s-primary);
}

.p2s-features__list,
.p2s-pricing__plans,
.p2s-testimonials__list,
.p2s-pricing__features,
.p2s-footer__links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--p2s-space-md);
  margin: var(--p2s-space-lg) 0 0;
  padding: 0;
  list-style: none;
}

.p2s-features.p2s-section--layout-list .p2s-features__list {
  grid-template-columns: 1fr;
}
.p2s-features.p2s-section--layout-alternating .p2s-features__item:nth-child(even) {
  transform: translateY(var(--p2s-space-lg));
}
.p2s-testimonials.p2s-section--layout-featured .p2s-testimonials__list {
  grid-template-columns: minmax(0, 1fr);
}
.p2s-testimonials.p2s-section--layout-carousel .p2s-testimonials__list {
  grid-auto-columns: minmax(16rem, 1fr);
  grid-auto-flow: column;
  overflow-x: auto;
}
.p2s-pricing.p2s-section--layout-comparison .p2s-pricing__plans {
  grid-template-columns: 1fr;
}
.p2s-footer.p2s-section--layout-centered .p2s-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.p2s-feature,
.p2s-pricing__plan,
.p2s-testimonial,
.p2s-faq__item {
  /* border-box: the padding sits inside height: 100%, so cards don't hang past the bottom of their section. */
  box-sizing: border-box;
  height: 100%;
  padding: var(--p2s-space-lg);
  border-radius: var(--p2s-radius-md);
  background: color-mix(in srgb, var(--p2s-secondary) 45%, white);
}

.p2s-feature__title,
.p2s-pricing__name {
  margin: 0 0 var(--p2s-space-sm);
  font-size: 1.25rem;
}
.p2s-feature__body {
  margin: 0;
  line-height: 1.6;
}
.p2s-pricing__plan--featured {
  outline: 2px solid var(--p2s-primary);
  background: color-mix(in srgb, var(--p2s-accent) 30%, white);
}
.p2s-pricing__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--p2s-space-xs);
  margin: var(--p2s-space-md) 0;
}
.p2s-pricing__amount {
  font: 700 2rem/1 var(--p2s-font-heading);
}
.p2s-pricing__period {
  color: color-mix(in srgb, var(--p2s-text) 70%, white);
}
.p2s-pricing__features {
  display: block;
  margin-top: var(--p2s-space-md);
}
.p2s-pricing__feature {
  margin: var(--p2s-space-xs) 0;
}

.p2s-testimonial {
  margin: 0;
}
.p2s-testimonial__quote {
  margin: 0 0 var(--p2s-space-md);
  font-size: 1.125rem;
  line-height: 1.6;
}
.p2s-testimonial__quote p {
  margin: 0;
}
.p2s-testimonial__attribution {
  display: flex;
  flex-wrap: wrap;
  gap: var(--p2s-space-xs);
}
.p2s-testimonial__author {
  font-style: normal;
  font-weight: 700;
}
.p2s-testimonial__role {
  color: color-mix(in srgb, var(--p2s-text) 70%, white);
}

.p2s-faq__list {
  display: grid;
  gap: var(--p2s-space-sm);
  margin-top: var(--p2s-space-lg);
}
.p2s-faq__item {
  height: auto;
}
.p2s-faq__question {
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 700;
}
.p2s-faq__answer p {
  margin-bottom: 0;
  line-height: 1.6;
}

.p2s-footer__navigation {
  margin-top: var(--p2s-space-md);
}
.p2s-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--p2s-space-md);
}
.p2s-footer__link a {
  color: inherit;
}
.p2s-section__editor-count {
  margin: var(--p2s-space-sm) 0 0;
  color: var(--p2s-text);
  font-size: 0.8rem;
}

@media (max-width: 48rem) {
  .p2s-hero.p2s-section--layout-split .p2s-section__inner,
  .p2s-cta.p2s-section--layout-split .p2s-section__inner {
    grid-template-columns: 1fr;
  }
  /* One column on small screens: everything back in document order. */
  .p2s-hero.p2s-section--layout-split .p2s-section__inner > .p2s-image-slot,
  .p2s-cta.p2s-section--layout-split .p2s-section__inner > .p2s-image-slot {
    grid-column: 1;
    grid-row: auto;
    margin-block: var(--p2s-space-md);
  }
  .p2s-features__list,
  .p2s-pricing__plans,
  .p2s-testimonials__list,
  .p2s-footer__links {
    grid-template-columns: 1fr;
  }
  .p2s-features.p2s-section--layout-alternating .p2s-features__item:nth-child(even) {
    transform: none;
  }
}
