/* Mobile QA revision — 16 Sep 2026. Loaded last as the authoritative mobile layer. */

.cw-finishes__filter-head,
.cw-finishes__filter-actions {
  display: none;
}

/* Programs listing: concise mobile cards without desktop intro copy. */
@media (max-width: 767px) {
  .cw-programs-list .cw-program-card {
    min-height: 300px;
  }

  .cw-programs-list .cw-program-card__content {
    padding: 24px;
  }

  .cw-programs-list .cw-program-card__content h2 {
    margin-bottom: 0;
    font-weight: 700;
  }

  .cw-programs-list .cw-program-card__content p {
    display: none;
  }

  .cw-programs-list .cw-program-card__content .cw-program-button {
    margin-top: 20px;
  }
}

@media (max-width: 767px) {
  :root {
    --cw-mobile-gutter: 16px;
    --cw-mobile-section-space: 50px;
    --cw-mobile-section-pad: 25px;
    --cw-mobile-heading-gap: 24px;
    --cw-mobile-content-gap: 24px;
    --cw-mobile-paragraph-gap: 17px;
    --cw-mobile-body-leading: 20px;
  }

  /* Shared editorial rhythm across parent/detail pages and builder content. */
  .site-main p,
  .site-main li {
    line-height: var(--cw-mobile-body-leading);
  }

  .site-main p {
    margin-top: 0;
    margin-bottom: 0;
  }

  .site-main p + p {
    margin-top: var(--cw-mobile-paragraph-gap);
  }

  /* A main title, optional subtitle and the first content item share one beat. */
  .site-main :where(h1, h2, h3) + :where(h2, h3, h4),
  .site-main :where(h1, h2, h3, h4) + :where(p, ul, ol),
  .site-main :where(h1, h2, h3, h4) + :where(.cw-home-section-text, .cw-home-intro__body) {
    margin-top: var(--cw-mobile-heading-gap);
  }

  .cw-about-overview,
  .cw-about-work,
  .cw-why-wood-properties,
  .cw-why-forests,
  .cw-why-sustainable,
  .cw-why-cert,
  .cw-finishes-intro,
  .cw-gallery-intro,
  .cw-gallery-category,
  .cw-programs-list,
  .cw-program-single-intro,
  .cw-program-offer,
  .cw-program-benefits,
  .cw-resources-intro,
  .cw-resources-group,
  .cw-blog-featured,
  .cw-blog-list,
  .cw-events-list,
  .cw-event-gallery,
  .cw-success-intro,
  .cw-success-list,
  .cw-news-featured,
  .cw-news-list,
  .cw-media-single-head,
  .cw-media-single-body,
  .cw-media-related,
  .cw-species-panel,
  .cw-species-characteristics,
  .cw-species-properties,
  .cw-species-resources,
  .cw-species-collections,
  .cw-contact-overview,
  .cw-gallery-categories,
  .cw-gallery-grid,
  .cw-media-builder-block,
  .cw-program-single-builder,
  .cw-why-forests-builder,
  .cw-why-gallery-cta,
  .privacy-policy-page {
    padding-top: var(--cw-mobile-section-pad);
    padding-bottom: var(--cw-mobile-section-pad);
  }

  /* The first/last content edge completes the 50px section boundary; two
     neighbouring 25px edges also total 50px without double white space. */
  .site-main > :where(section, article):first-child:not(.cw-page-hero):not(.cw-home-hero):not(.cw-home-video-hero):not(.cw-finishes-hero):not(.cw-media-single-hero) {
    padding-top: var(--cw-mobile-section-space);
  }

  .cw-about-split__copy {
    min-height: 0;
    padding-top: var(--cw-mobile-section-pad);
    padding-bottom: var(--cw-mobile-section-pad);
  }

  .cw-about-split h2,
  .cw-about-work h2 {
    margin-bottom: var(--cw-mobile-heading-gap);
  }

  .cw-about-work__grid,
  .cw-programs-list,
  .cw-resources-groups,
  .cw-news-list__grid,
  .cw-success-list__grid {
    gap: 28px;
  }

  .cw-about-work__text,
  .cw-program-card__content p,
  .cw-home-section-text {
    margin-bottom: 0;
  }

  .cw-home-section-text {
    margin-top: var(--cw-mobile-content-gap);
    line-height: var(--cw-mobile-body-leading);
  }

  .cw-home-intro,
  .cw-home-species,
  .cw-home-finishes,
  .cw-home-gallery,
  .cw-home-programs,
  .cw-home-news {
    padding-top: var(--cw-mobile-section-space);
    padding-bottom: 0;
  }

  /* Home mobile rhythm: 50px section boundaries and 24px internal steps. */
  .cw-home {
    --cw-home-mobile-section-gap: 50px;
    --cw-home-mobile-inner-gap: 24px;
  }

  .cw-home > .cw-home-about,
  .cw-home > .cw-home-species {
    padding-top: var(--cw-home-mobile-section-gap);
    padding-bottom: 0;
  }

  .cw-home > .cw-home-about {
    gap: 0;
  }

  .cw-home-about .cw-home-intro__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .cw-home-about .cw-home-section-title,
  .cw-home-about .cw-home-intro__body {
    margin-bottom: 0;
  }

  .cw-home-about .cw-home-section-title::before {
    margin-bottom: var(--cw-home-mobile-inner-gap);
  }

  .cw-home-about .cw-home-intro__body,
  .cw-home-about .cw-home-button {
    margin-top: var(--cw-home-mobile-inner-gap);
  }

  .cw-home-about .cw-home-button {
    display: flex;
    width: max-content;
  }

  /* The single-column grid contributes a 12px track offset on mobile; keep
     the explicit media margin at 12px for a rendered 24px CTA-to-image gap. */
  .cw-home-about .cw-home-intro__media {
    display: block;
    margin-top: calc(var(--cw-home-mobile-inner-gap) / 2);
  }

  .cw-home-programs__slider {
    /* The track starts 6px above its first title; compensate explicitly so
       the rendered heading → program name distance remains exactly 24px. */
    margin-top: calc(var(--cw-home-mobile-inner-gap) + 6px);
  }

  .cw-home-program-card__body,
  .cw-home-program-card__media {
    margin-top: var(--cw-home-mobile-inner-gap);
  }

  .cw-about-work__item h3 {
    margin-bottom: var(--cw-mobile-content-gap);
  }

  .cw-about-work__image {
    margin-top: var(--cw-mobile-content-gap);
  }

  .cw-about-split__copy p,
  .cw-about-work__text p {
    font-size: 17px;
    line-height: var(--cw-mobile-body-leading);
  }

  /* Template-specific leftovers found by the full 360/430px audit. */
  .cw-blog-list {
    padding-top: var(--cw-mobile-section-pad);
    padding-bottom: var(--cw-mobile-section-pad);
  }

  .cw-media-single--blog .cw-media-single-body {
    padding-bottom: var(--cw-mobile-section-pad);
  }

  .cw-gallery-detail {
    padding-top: var(--cw-mobile-section-pad);
  }

  .cw-gallery-detail__header {
    gap: 16px;
    margin-bottom: 28px;
  }

  .cw-gallery-detail__header h1 {
    margin-top: 8px;
    font-size: clamp(27px, 7.4vw, 32px);
    line-height: 1.08;
    white-space: nowrap;
  }

  .cw-species-section-title {
    font-size: clamp(23px, 6.5vw, 27px);
    line-height: 1.12;
  }

  .cw-species-characteristic h3 {
    font-size: clamp(20px, 5.8vw, 23px);
    line-height: 1.15;
  }

  .cw-program-card__content h2,
  .cw-success-card h2 {
    font-size: clamp(21px, 6vw, 24px);
    line-height: 1.12;
  }

  .cw-contact-overview h1,
  .cw-contact-overview h2,
  .cw-contact-people h2,
  .cw-contact-resources h2 {
    font-size: clamp(25px, 7.4vw, 28px);
    line-height: 1.12;
  }

  .cw-about-split h2,
  .cw-about-work h2,
  .cw-why-page h2 {
    font-size: clamp(23px, 6.8vw, 27px);
    line-height: 1.14;
  }

  .cw-why-page h3 {
    font-size: clamp(20px, 5.8vw, 23px);
    line-height: 1.18;
  }

  /* All non-Species-detail hero sliders stay within half of the phone viewport. */
  .cw-page-hero--slider,
  .cw-page-hero--height-full,
  .cw-page-hero--height-compact,
  .cw-home-hero,
  .cw-finishes-hero,
  .cw-media-single-hero {
    width: 100%;
    height: min(50svh, 430px) !important;
    min-height: 240px !important;
    max-height: 50svh !important;
    aspect-ratio: auto;
  }

  /* Species detail uses its own visual style, but follows the same mobile
     viewport-height limit as every other page hero. */
  .cw-species-hero {
    width: 100%;
    height: min(50svh, 430px) !important;
    min-height: 240px !important;
    max-height: 50svh !important;
    aspect-ratio: auto;
  }

  .cw-home-video-hero {
    min-height: min(50svh, 430px);
    height: min(50svh, 430px);
    max-height: 50svh;
  }

  .cw-page-hero__dots,
  .cw-home-hero__dots {
    bottom: 12px;
  }

  .cw-page-hero__content,
  .cw-page-hero--slider .cw-page-hero__content {
    padding: 24px 42px;
  }

  .cw-page-hero--slider .cw-page-hero__content h1,
  .cw-finishes-hero__title,
  .cw-media-single-hero h1 {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.05;
  }

  .cw-media-single--event .cw-media-single-hero h1,
  .cw-media-single--success_story .cw-media-single-hero h1 {
    width: calc(100% - 72px);
    font-size: clamp(34px, 10vw, 42px);
    line-height: 1.05;
  }

  .cw-program-single-hero h1,
  .cw-programs-hero h1 {
    font-size: clamp(27px, 7.6vw, 34px);
    line-height: 1.08;
  }

  /* Page-bottom forms: compact enough to expose Submit on common phone heights. */
  .cw-end-form--forest {
    padding: 24px 0;
  }

  .cw-end-form--forest .cw-end-form__panel {
    width: calc(100% - 24px);
    padding: 16px 14px 18px;
  }

  .cw-end-form--forest .cw-end-form__intro h2,
  .cw-company-form__intro h2,
  .cw-program-form__intro h2,
  .cw-media-single-form__intro h2,
  .cw-contact-lead__intro h2,
  .cw-species-contact__intro h2 {
    margin-bottom: 0;
    font-size: clamp(17px, 4.7vw, 20px);
    line-height: 1.08;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .cw-end-form--forest .cw-end-form__intro p,
  .cw-company-form__intro p,
  .cw-program-form__intro p,
  .cw-media-single-form__intro p,
  .cw-contact-lead__intro p,
  .cw-species-contact__intro p {
    margin-top: 5px;
    font-size: clamp(15px, 4.15vw, 18px);
    line-height: 1.18;
    white-space: nowrap;
  }

  .cw-end-form--forest .cw-end-form__note {
    margin: 8px 0 6px;
    font-size: 12px;
    line-height: 1.2;
  }

  .cw-end-form__fields,
  .cw-company-form__fields,
  .cw-program-form__fields,
  .cw-media-single-form__fields,
  .cw-contact-lead__fields,
  .cw-species-contact__fields,
  .cw-end-form--forest .cw-end-form__fields {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
  }

  .cw-end-form__field,
  .cw-company-form__field,
  .cw-program-form__field,
  .cw-media-single-form__field,
  .cw-contact-lead__field,
  .cw-species-contact__field,
  .cw-end-form--forest .cw-end-form__field {
    gap: 0;
    font-size: 14px;
    line-height: 1.2;
  }

  .cw-end-form input,
  .cw-end-form select,
  .cw-end-form .cw-custom-select__trigger,
  .cw-end-form .cw-form-multiselect summary,
  .cw-company-form input,
  .cw-company-form select,
  .cw-program-form input,
  .cw-program-form select,
  .cw-media-single-form input,
  .cw-media-single-form select,
  .cw-contact-lead input,
  .cw-species-contact input {
    min-height: 26px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: 16px; /* prevents iOS zoom while keeping rows compact */
  }

  .cw-end-form textarea,
  .cw-company-form textarea,
  .cw-program-form textarea,
  .cw-media-single-form textarea,
  .cw-contact-lead textarea,
  .cw-species-contact textarea {
    min-height: 44px;
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 16px;
  }

  .cw-end-form button[type="submit"],
  .cw-company-form button[type="submit"],
  .cw-program-form button[type="submit"],
  .cw-media-single-form button[type="submit"],
  .cw-contact-lead button[type="submit"],
  .cw-species-contact button[type="submit"] {
    width: min(180px, 70%);
    min-height: 40px;
    margin-top: 14px;
    padding: 8px 18px;
    font-size: 16px;
  }

  /* Finishes: one control row, compact drawer, explicit Apply action. */
  .cw-finishes-browser {
    padding-top: 16px;
  }

  .cw-finishes__content {
    padding: 0 16px 48px;
  }

  .cw-finishes__filter-toggle {
    position: relative;
    top: auto;
    left: auto;
    z-index: 12;
    min-width: 104px;
    min-height: 40px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid var(--cw-color-action);
    border-radius: 999px;
    background: var(--cw-color-action);
    color: var(--cw-white);
    font-size: 16px;
  }

  .cw-finishes__toolbar {
    min-height: 40px;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 18px;
  }

  .cw-finishes-sort {
    order: 2;
    width: min(210px, calc(100% - 116px));
    margin-left: auto;
  }

  .cw-finishes-sort select {
    width: 100%;
    min-height: 40px;
    padding: 7px 34px 7px 14px;
    font-size: 16px;
  }

  .cw-finishes-active-filters:not([hidden]) {
    order: -1;
    width: 100%;
    margin: 0 0 8px;
  }

  .cw-finishes-active-filters:not([hidden]) > span {
    width: 100%;
  }

  .cw-finishes-active-filters__tags {
    flex: 1 1 auto;
  }

  .cw-finishes__filter-toggle {
    order: 1;
  }

  .cw-finishes-card__title {
    overflow: hidden;
    font-size: clamp(13px, 3.8vw, 15px);
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cw-finishes__filters {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    display: flex;
    width: min(calc(100vw - 24px), 390px);
    height: auto;
    min-height: 0;
    max-height: calc(100svh - 24px);
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transform: translate(-50%, -50%) scale(0.98);
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  .cw-finishes__filters.is-open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
  }

  .cw-finishes__filter-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 6px 14px;
    border-bottom: 1px solid var(--cw-finishes-line);
    background: var(--cw-finishes-sidebar);
    color: var(--cw-green-primary);
    font-size: 16px;
  }

  .cw-finishes__filter-close {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--cw-green-primary);
    font-size: 28px;
    line-height: 1;
  }

  .cw-finishes-filter-form {
    flex: 1 1 auto;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px 16px;
    padding: 10px 14px 8px;
  }

  .cw-finishes-search {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .cw-finishes-search label,
  .cw-finishes-filter-form__group legend {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.15;
  }

  .cw-finishes-search input {
    min-height: 36px;
    padding: 5px 38px 5px 10px;
    font-size: 16px;
  }

  .cw-finishes-filter-form__group {
    min-width: 0;
    margin-bottom: 0;
  }

  .cw-finishes-filter-form__option {
    min-height: 24px;
    margin: 0;
    gap: 7px;
    font-size: 14px;
    line-height: 1.15;
  }

  .cw-finishes-filter-form__option input {
    width: 16px;
    height: 16px;
  }

  .cw-finishes__filter-actions {
    display: block;
    flex: 0 0 auto;
    padding: 8px 14px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--cw-finishes-line);
    background: var(--cw-finishes-sidebar);
    text-align: center;
  }

  .cw-finishes__filter-apply {
    width: min(160px, 100%);
    min-height: 38px;
    border: 0;
    background: var(--cw-color-action);
    color: var(--cw-white);
    font: inherit;
    font-size: 16px;
  }

  /* 18 Sep: Home CTA/media rhythm and one-line Gallery heading. */
  .cw-home-about .cw-home-intro__media {
    margin-top: 28px;
  }

  .cw-home-finishes {
    gap: 28px;
  }

  .cw-home-finishes__grid {
    margin-top: 0;
  }

  .cw-home-gallery__heading {
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    gap: 16px;
  }

  .cw-home-gallery__heading .cw-home-section-title {
    flex: 0 1 auto;
    min-width: 0;
  }

  .cw-home-gallery__heading a {
    flex: 0 0 auto;
    margin-left: auto;
    text-align: right;
  }

  /* 18 Sep: compact Species detail flow for phone widths. */
  .cw-species-panel {
    padding-top: 0;
    padding-bottom: 0;
  }

  .cw-species-panel .cw-species-panel__inner {
    gap: var(--cw-mobile-content-gap);
    padding-top: 28px;
    padding-right: var(--cw-mobile-gutter);
    padding-bottom: 28px;
    padding-left: var(--cw-mobile-gutter);
  }

  .cw-species-panel__text h2 {
    margin-bottom: var(--cw-mobile-heading-gap);
  }

  .cw-species-panel__media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    align-items: start;
    gap: 8px;
    width: 100%;
    height: auto;
    margin: 0;
  }

  .cw-species-panel__image,
  .cw-species-panel__image--1,
  .cw-species-panel__image--2,
  .cw-species-panel__image--3 {
    width: 100%;
    height: auto !important;
    aspect-ratio: 614 / 665;
    min-height: 0;
    align-self: start;
  }

  .cw-species-panel__image img {
    display: block;
    width: 100%;
    height: 100% !important;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .cw-species-characteristics__grid {
    gap: 12px;
    margin-top: var(--cw-mobile-content-gap);
  }

  .cw-species-characteristic {
    min-height: 96px;
    padding: 8px 0 8px 8px;
  }

  .cw-species-characteristic::before {
    border-radius: 18px;
  }

  .cw-species-characteristic__inner {
    min-height: 80px;
    padding: 13px 18px;
    border-radius: 16px;
  }

  .cw-species-characteristic h3 {
    margin-bottom: 5px;
    font-size: clamp(18px, 5.2vw, 21px);
    line-height: 1.12;
  }

  .cw-species-characteristic p {
    font-size: 16px;
    line-height: 20px;
  }

  /* Match Program Benefits to the compact Species characteristic cards. */
  .cw-program-benefits__grid {
    gap: 12px;
    margin-top: var(--cw-mobile-content-gap);
  }

  .cw-program-benefit {
    min-height: 96px;
    padding: 8px 0 8px 8px;
  }

  .cw-program-benefit::before {
    border-radius: 18px;
  }

  .cw-program-benefit__inner {
    min-height: 80px;
    padding: 13px 18px;
    border-radius: 16px;
  }

  .cw-program-benefit h3 {
    margin-bottom: 5px;
    font-size: clamp(18px, 5.2vw, 21px);
    line-height: 1.12;
  }

  .cw-program-benefit p {
    font-size: 16px;
    line-height: 20px;
  }

  .cw-species-properties__grid {
    gap: 10px;
    margin-top: var(--cw-mobile-content-gap);
  }

  .cw-species-accordion__trigger {
    min-height: 52px;
    padding: 12px 16px;
    font-size: 18px;
    line-height: 1.2;
  }

  .cw-species-accordion__panel {
    padding: 16px;
  }

  .cw-species-resources__viewport,
  .cw-species-collections__viewport {
    margin-top: var(--cw-mobile-content-gap);
  }

  .cw-species-resource {
    gap: 20px;
    padding: 16px;
  }

  .cw-species-resource__media {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .cw-species-resource__image {
    display: block;
    width: 100%;
    height: auto !important;
    object-fit: contain;
  }

  .cw-species-collection {
    flex: 0 0 100%;
  }

  .cw-species-collection__media {
    width: 100%;
  }

  /* 18 Sep: continue the shared 24px content rhythm across remaining pages. */
  .cw-home-programs__slider {
    margin-top: 32px;
  }

  .cw-why-page .cw-why-forest-copy {
    padding-top: 4px;
    padding-bottom: 0;
  }

  .cw-why-page .cw-why-forest-column {
    gap: var(--cw-mobile-content-gap);
  }

  /* Pull only the map wrapper inward; all interactive SVG layers and their
     animation transforms remain untouched. */
  .cw-why-sustainable__map {
    margin-top: -12px;
    margin-bottom: -12px;
  }

  .cw-finishes-browser {
    padding-top: 24px;
  }

  .cw-finishes-sort {
    position: relative;
  }

  .cw-finishes-sort.is-customized .js-finishes-sort {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .cw-finishes-sort__trigger {
    display: flex;
    width: 100%;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 38px 7px 14px;
    border: 1px solid var(--cw-color-action);
    border-radius: 999px;
    background: var(--cw-white);
    color: var(--cw-color-text);
    font: inherit;
    font-size: 16px;
    line-height: 1.2;
    text-align: left;
  }

  .cw-finishes-sort__trigger::after {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--cw-green-primary);
    border-bottom: 2px solid var(--cw-green-primary);
    content: '';
    transform: translateY(-65%) rotate(45deg);
    transition: transform 160ms ease;
  }

  .cw-finishes-sort.is-open .cw-finishes-sort__trigger::after {
    transform: translateY(-25%) rotate(225deg);
  }

  .cw-finishes-sort__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 30;
    display: grid;
    gap: 0;
    overflow: hidden;
    padding: 8px 0;
    border-radius: 0 0 18px 18px;
    background: #f1f1f1;
    box-shadow: 0 10px 24px rgba(17, 71, 43, 0.16);
  }

  .cw-finishes-sort__menu[hidden] {
    display: none;
  }

  .cw-finishes-sort__option {
    width: 100%;
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: var(--cw-color-text);
    font: inherit;
    font-size: 16px;
    line-height: 1.2;
    text-align: left;
  }

  .cw-finishes-sort__option:hover,
  .cw-finishes-sort__option:focus-visible,
  .cw-finishes-sort__option.is-selected {
    background: rgba(147, 194, 63, 0.14);
    color: var(--cw-green-primary);
  }

  .cw-gallery-category {
    gap: 0;
    padding-top: var(--cw-mobile-section-pad);
    padding-bottom: var(--cw-mobile-section-pad);
  }

  .cw-gallery-category__text a {
    min-height: 40px;
    margin-top: var(--cw-mobile-content-gap);
    padding: 8px 18px;
    font-size: 16px;
    line-height: 1.2;
  }

  .cw-gallery-category__media {
    margin-top: var(--cw-mobile-content-gap);
  }

  .cw-resources-intro__inner {
    padding-top: var(--cw-mobile-section-pad);
    padding-bottom: var(--cw-mobile-section-pad);
  }

  .cw-resource-card__media,
  .cw-resources-group--programs .cw-resource-card__media,
  .cw-resources-group--bc-forest .cw-resource-card__media,
  .cw-resources-group--wood-applications .cw-resource-card__media,
  .cw-resources-group--layout-featured_right .cw-resource-card__media,
  .cw-resources-group--layout-two_landscape .cw-resource-card__media,
  .cw-resource-card--shape-portrait .cw-resource-card__media,
  .cw-resource-card--shape-landscape .cw-resource-card__media,
  .cw-resource-card--shape-square .cw-resource-card__media {
    height: auto;
    aspect-ratio: auto;
    overflow: visible;
  }

  .cw-resource-card__image {
    width: 100%;
    height: auto !important;
    object-fit: contain;
  }

  .cw-resource-card__title,
  .cw-resources-group--wood-factsheets .cw-resource-card__title {
    min-height: 0;
    margin-top: var(--cw-mobile-content-gap);
    margin-bottom: 0;
  }

  .cw-resource-card__button,
  .cw-resources-group--wood-factsheets .cw-resource-card__button {
    margin-top: var(--cw-mobile-content-gap);
  }

  .cw-resource-card__media:not(:has(.cw-resource-card__image)) {
    min-height: 220px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }

  /* Keep all five Species choices visible and readable on mobile. The first
     row gives the longest label extra room; both rows still fill the same
     overall width. Individual bordered cards replace the old dividers. */
  .cw-home-species__tabs,
  .cw-species-tabs {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
    background: var(--cw-white);
    overflow: visible;
    scroll-snap-type: none;
  }

  .cw-home-species__tab:nth-child(1),
  .cw-species-tabs__item:nth-child(1) {
    grid-column: span 4;
  }

  .cw-home-species__tab:nth-child(2),
  .cw-home-species__tab:nth-child(3),
  .cw-species-tabs__item:nth-child(2),
  .cw-species-tabs__item:nth-child(3) {
    grid-column: span 3;
  }

  .cw-home-species__tab:nth-child(4),
  .cw-home-species__tab:nth-child(5),
  .cw-species-tabs__item:nth-child(4),
  .cw-species-tabs__item:nth-child(5) {
    grid-column: span 5;
  }

  .cw-home-species__tab,
  .cw-species-tabs__item {
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 6px 4px;
    border: 1px solid color-mix(in srgb, var(--cw-green-primary) 46%, transparent);
    border-radius: 6px;
    background: color-mix(in srgb, var(--cw-green-primary) 6%, var(--cw-white));
    font-size: 16px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.35px;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
  }

  .cw-home-species__tab {
    flex: none;
  }

  .cw-species-tabs__item {
    flex: none;
  }

  .cw-home-species__tab + .cw-home-species__tab::before,
  .cw-species-tabs__item + .cw-species-tabs__item::before {
    display: none;
  }

  .cw-home-species__tab:nth-child(1),
  .cw-species-tabs__item:nth-child(1) {
    white-space: nowrap;
  }

  .cw-home-species__tab.is-active,
  .cw-species-tabs__item.is-active {
    border-color: transparent;
  }

  /* The legacy detail tabs used this strip to visually join the active tab
     to the content panel. Card tabs are separated, so the strip would bleed
     beyond the rounded active state. */
  .cw-species-tabs__item.is-active::after {
    content: none;
    display: none;
  }
}

@media (max-width: 374px) {
  .cw-end-form--forest .cw-end-form__intro h2,
  .cw-company-form__intro h2,
  .cw-program-form__intro h2,
  .cw-media-single-form__intro h2,
  .cw-contact-lead__intro h2,
  .cw-species-contact__intro h2 {
    font-size: 16px;
  }

  .cw-end-form--forest .cw-end-form__intro p,
  .cw-company-form__intro p,
  .cw-program-form__intro p,
  .cw-media-single-form__intro p,
  .cw-contact-lead__intro p,
  .cw-species-contact__intro p {
    font-size: 14px;
  }
}

/* Compact corporate footer for mobile. */
@media (max-width: 767px) {
  .site-footer,
  .site-footer__primary,
  .site-footer__secondary {
    background: var(--cw-dark-evergreen);
  }

  .site-footer__inner {
    justify-items: center;
    gap: 10px;
    padding-top: 20px;
    padding-bottom: 14px;
    text-align: center;
  }

  .site-footer__brand {
    display: block;
    line-height: 0;
  }

  .site-footer__brand img {
    width: 150px;
  }

  .site-footer__contact {
    display: grid;
    gap: 2px;
    font-size: 15px;
    line-height: 1.3;
  }

  .site-footer__contact a {
    color: inherit;
    text-decoration: none;
  }

  .site-footer__social {
    gap: 8px;
    font-size: 14px;
    line-height: 1;
  }

  .site-footer__social span {
    margin-right: 3px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  .site-footer__social a {
    width: 24px;
    height: 24px;
  }

  .site-footer__social img {
    max-width: 22px;
    height: 20px;
  }

  .site-footer__secondary {
    border-top: 1px solid rgb(255 255 255 / 22%);
  }

  .site-footer__bottom {
    display: flex;
    min-height: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-top: 10px;
    padding-bottom: 11px;
    color: var(--cw-white);
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
  }

  .site-footer__bottom span,
  .site-footer__bottom a {
    display: block;
    width: auto;
    max-width: 100%;
  }

  .site-footer__bottom a {
    margin-left: 0;
    color: inherit;
    line-height: 1.2;
    text-decoration: underline;
    text-decoration-color: rgb(255 255 255 / 55%);
    text-underline-offset: 3px;
  }
}

@media (max-width: 374px) {
  .site-footer__inner {
    padding-top: 18px;
    padding-bottom: 12px;
  }

  .site-footer__brand img {
    width: 140px;
  }

  .site-footer__contact {
    font-size: 14px;
  }

  .site-footer__bottom {
    padding-block: 9px 10px;
    font-size: 11px;
  }
}
