/**
 * Sitewide body-copy typography system.
 *
 * This layer intentionally excludes headings, navigation, buttons, captions,
 * metadata and decorative labels. Adjust one breakpoint token below to tune
 * body copy for that viewport range across the site.
 */

:root {
  --cw-body-size-mobile: 16px;
  --cw-body-size-tablet: 17px;
  --cw-body-size-desktop-small: 17px;
  --cw-body-size-desktop: 17px;
  --cw-body-size-desktop-wide: 17px;
  --cw-body-size: var(--cw-body-size-mobile);
  --cw-body-line-height: 1.55;
  --cw-body-compact-line-height: 1.45;
  --cw-species-tab-width-desktop: 190px;
  --cw-species-tab-height-desktop: 50px;
}

@media (min-width: 768px) {
  :root {
    --cw-body-size: var(--cw-body-size-tablet);
  }
}

@media (min-width: 1024px) {
  :root {
    --cw-body-size: var(--cw-body-size-desktop-small);
  }
}

@media (min-width: 1440px) {
  :root {
    --cw-body-size: var(--cw-body-size-desktop);
  }
}

@media (min-width: 1920px) {
  :root {
    --cw-body-size: var(--cw-body-size-desktop-wide);
  }
}

/* Long-form and introductory body copy. */
.cw-home-intro__body,
.cw-home-section-text,
.cw-home-finishes__body,
.cw-home-program-card__body,
.cw-why-wood-properties__intro,
.cw-why-wood-property__text,
.cw-species-panel__text > div,
.cw-species-accordion__panel,
.cw-species-resource__body > div,
.cw-species-modal__description,
.cw-program-single-intro__text,
.cw-program-offer__intro,
.cw-program-benefit__text,
.cw-about-split__copy,
.cw-about-work__text,
.cw-why-forest-copy,
.cw-why-sustainable__copy,
.cw-media-builder-rich-text,
.cw-media-builder-text-image__content,
.cw-resources-intro__text,
.cw-gallery-intro,
.cw-gallery-category__text,
.cw-collection-modal__description,
.cw-success-intro,
.cw-success-card__content,
.cw-media-single-body,
.privacy-policy-page__content,
.cw-contact-office__body {
  font-size: var(--cw-body-size) !important;
  line-height: var(--cw-body-line-height);
}

/* Page-specific body copy that previously had display-sized type. */
.cw-finishes-intro p,
.cw-success-intro > div,
.cw-success-intro > div p,
.cw-species-accordion__trigger {
  font-size: var(--cw-body-size) !important;
}

.cw-finishes-intro p,
.cw-success-intro > div,
.cw-success-intro > div p {
  line-height: var(--cw-body-line-height);
}

.cw-species-accordion__trigger {
  line-height: var(--cw-body-compact-line-height);
}

/* Compact body copy used inside cards and short list rows. */
.cw-program-offer__item,
.cw-program-offer__item strong,
.cw-program-offer__item span,
.cw-program-benefit__text p,
.cw-program-benefit__text a,
.cw-species-characteristic p,
.cw-event-card__body,
.cw-program-card p {
  font-size: var(--cw-body-size) !important;
  line-height: var(--cw-body-compact-line-height);
}

/* Inline emphasis changes weight or decoration, never text size. */
.cw-program-offer__item strong,
.cw-program-offer__item span,
.cw-program-benefit__text strong,
.cw-program-benefit__text a,
.cw-species-panel__text strong,
.cw-species-panel__text a,
.cw-media-builder-rich-text strong,
.cw-media-builder-rich-text a,
.cw-media-builder-text-image__content strong,
.cw-media-builder-text-image__content a {
  font-size: inherit !important;
}

/* Form body text and controls follow the same scale as editorial body copy. */
.cw-end-form__field,
.cw-end-form__field label,
.cw-end-form input,
.cw-end-form textarea,
.cw-end-form select,
.cw-end-form .cw-custom-select__trigger,
.cw-end-form .cw-custom-select__option,
.cw-end-form .cw-form-multiselect summary,
.cw-end-form .cw-form-multiselect__panel label,
.cw-program-form__field,
.cw-program-form__field label,
.cw-program-form input,
.cw-program-form textarea,
.cw-program-form select,
.cw-company-form__field,
.cw-company-form__field label,
.cw-company-form input,
.cw-company-form textarea,
.cw-company-form select,
.cw-contact-lead__field,
.cw-contact-lead__field label,
.cw-contact-lead__field input,
.cw-contact-lead__field textarea,
.cw-contact-lead__field select,
.cw-species-contact__field,
.cw-species-contact__field label,
.cw-species-contact__field input,
.cw-species-contact__field textarea,
.cw-species-contact__field select,
.cw-media-single-form__field,
.cw-media-single-form__field label,
.cw-media-single-form input,
.cw-media-single-form textarea,
.cw-media-single-form select {
  font-size: var(--cw-body-size) !important;
  line-height: var(--cw-body-compact-line-height);
}

.cw-end-form input::placeholder,
.cw-end-form textarea::placeholder,
.cw-program-form input::placeholder,
.cw-program-form textarea::placeholder,
.cw-company-form input::placeholder,
.cw-company-form textarea::placeholder,
.cw-contact-lead__field input::placeholder,
.cw-contact-lead__field textarea::placeholder,
.cw-species-contact__field input::placeholder,
.cw-species-contact__field textarea::placeholder,
.cw-media-single-form input::placeholder,
.cw-media-single-form textarea::placeholder {
  font-size: inherit !important;
}

/* Compact five-species navigation on desktop. Mobile keeps its two-row,
 * touch-friendly card layout from the dedicated mobile QA stylesheet. */
@media (min-width: 1024px) {
  .cw-home-species__tabs,
  .cw-species-tabs {
    grid-template-columns: repeat(5, minmax(0, var(--cw-species-tab-width-desktop)));
    justify-content: center;
  }

  .cw-home-species__tab,
  .cw-species-tabs__item {
    min-height: var(--cw-species-tab-height-desktop) !important;
    padding: 6px 10px !important;
    font-size: var(--cw-body-size) !important;
    line-height: 1.2;
  }

  .cw-home-species__tab + .cw-home-species__tab::before,
  .cw-species-tabs__item + .cw-species-tabs__item::before {
    top: 11px;
    bottom: 11px;
  }
}

@media (min-width: 1600px) {
  :root {
    --cw-species-tab-width-desktop: 210px;
  }
}
