/* Keep the established navy, blue and lime system across the reading/entry pages. */
:root {
  --site-page-width: 1140px;
  --site-page-gutter: 24px;
  --site-image-radius: 8px;
}

.home .hero__content {
  max-width: var(--site-page-width);
}

/* The home article strip shares the page grid and the neighboring section rhythm. */
.home .related-articles {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--site-page-width) + 2 * var(--site-page-gutter));
  margin: 0 auto;
  padding: 80px var(--site-page-gutter);
}

.home .related-articles__header { gap: 32px; flex-wrap: nowrap; margin: 0 0 40px; }
.home .related-articles__titles { min-width: 0; max-width: 740px; }
.home .related-articles__main-title {
  margin: 16px 0 0;
  font-size: clamp(32px, 3.5vw, 44px);
  line-height: 1.18;
  letter-spacing: -.035em;
  color: #08164c;
}
.home .related-articles .btn--primary { position: static; flex-shrink: 0; margin: 0; }
.home .article-slider { margin: 0; }
.home .article-slider__container { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; overflow: visible; }
.home .article-slider .slider-button { display: none; }
.home .article-card { min-width: 0; width: auto; overflow: hidden; border-radius: 10px; }
.home .article-card__image-container { flex-shrink: 0; height: auto; aspect-ratio: 3 / 2; border-radius: 0; }
.home .article-card__image { display: block; }
.home .article-card__content { padding: 24px 24px 20px; flex: 1; }
.home .article-card__title { display: block; overflow: visible; margin: 8px 0 0; font-size: 22px; line-height: 1.4; color: #08164c; }
.home .article-card > .button { margin: auto 24px 24px; }

@media (max-width: 700px) {
  .home .related-articles { padding-block: 48px; }
  .home .related-articles__header { margin-bottom: 28px; }
  .home .article-slider__container { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .home .article-card__content { padding: 20px 20px 16px; }
  .home .article-card > .button { margin: auto 20px 20px; }
  .home .related-articles > .btn--primary { display: flex; margin: 28px 0 0; max-width: none; width: 100%; }
}

.articles-shell,
.single-post .material-catalog__shell {
  max-width: calc(var(--site-page-width) + 2 * var(--site-page-gutter));
  padding-inline: var(--site-page-gutter);
}

.single-post .article-detail__hero-grid {
  padding-inline: max(var(--site-page-gutter), calc((100% - var(--site-page-width)) / 2));
}

.guide-intro h1 {
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.home .hero__title,
.single-post .article-detail__hero-grid .article-header__title,
.articles-library__heading h2,
.single-post .material-catalog__intro h2 {
  text-wrap: balance;
}

/* Align the card text without trimming roofs or explanatory details. On mobile
   cards form a single column, so each photograph can keep its natural height. */
@media (min-width: 701px) {
  .articles-card__image {
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 2;
    border-radius: var(--site-image-radius);
    background: #f2f5fc;
  }

  .articles-card__image img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
  }
}

/* Filters and picture switches share a clear selected state and touch target. */
.articles-filters button,
.single-post .material-catalog__filters button,
.single-post .material-views button {
  min-height: 44px;
  border-radius: 6px;
}

.single-post .material-views {
  gap: 8px;
}

.single-post .material-views button:hover:not([aria-pressed="true"]) {
  background: #eef3ff;
  border-color: #3e63ff;
}

.single-post .material-catalog__index a {
  min-height: 44px;
}

.single-post .material-catalog__mobile-filter select:focus-visible {
  outline: 3px solid #3e63ff;
  outline-offset: 3px;
}

/* The entry search is the calculator's primary action, matching the home search. */
.wds-roof-calculator.calculator-address-first .search-bar__button {
  /* The migrated button has an inline background:none. */
  background: #3e63ff !important;
  color: #fff;
  border-radius: 50%;
}

.wds-roof-calculator.calculator-address-first .search-bar__button svg {
  color: inherit;
}

.wds-roof-calculator.calculator-address-first .search-bar__button svg path {
  stroke: currentColor;
}

.wds-roof-calculator.calculator-address-first .search-bar__button:hover {
  background: #294bd6 !important;
}

.wds-roof-calculator.calculator-address-first .calculator-address-intro h2 {
  font-weight: 600;
  text-wrap: balance;
}

@media (max-width: 700px) {
  :root { --site-page-gutter: 20px; }

  .home .hero {
    padding-inline: var(--site-page-gutter);
  }

  .home .hero__content {
    width: 100%;
  }

  .guide-intro h1 {
    font-size: clamp(36px, 10.2vw, 44px);
  }

  .single-post .article-detail__hero-grid .article-header__title {
    font-size: clamp(32px, 9.2vw, 40px);
  }

  .single-post .article-detail__content {
    width: calc(100% - 2 * var(--site-page-gutter));
  }

  .single-post .article-detail__hero-grid > .featured-image,
  .single-post .guide-intro__image .featured-image,
  .single-post .guide-intro__image img {
    border-radius: var(--site-image-radius);
  }
}

/* Legal pages use the same gutters and a bounded reading column. */
main[data-legal-page] { padding: 48px var(--site-page-gutter) 72px; color: #08164c; }
main[data-legal-page] > .container { width: 100%; max-width: 800px; margin-inline: auto; padding: 0; }
main[data-legal-page] h1 { margin: 0 0 32px; font-size: clamp(32px, 4vw, 48px); line-height: 1.15; letter-spacing: -.035em; }
main[data-legal-page] h2 { font-size: 25px; line-height: 1.35; margin: 40px 0 20px; }
main[data-legal-page] h3 { font-size: 21px; line-height: 1.4; margin: 36px 0 16px; }
main[data-legal-page] h4 { font-size: 18px; line-height: 1.4; margin: 24px 0 12px; }
main[data-legal-page] p, main[data-legal-page] li { font-size: 16px; line-height: 1.8; color: #39445f; }
main[data-legal-page] p { margin: 0 0 18px; }
main[data-legal-page] ul, main[data-legal-page] ol { padding-left: 24px; margin: 16px 0 24px; }
main[data-legal-page] h2:has(> strong) { font-size: 16px; line-height: 1.6; margin: 0 0 24px; }
main[data-legal-page] a { overflow-wrap: anywhere; text-underline-offset: 3px; }

/* Campaign variants share the established page grid without legacy screenshots. */
.landing-page .hero { padding: 56px var(--site-page-gutter) 64px; }
.landing-page .hero__content { max-width: var(--site-page-width); width: 100%; margin-inline: auto; gap: 64px; }
.landing-page .hero__illustration { display: block; border-radius: 10px; width: 100%; height: auto; }
.landing-page .search-bar__button { color: white; }
.landing-page .search-bar__button > svg { width: 20px; height: 20px; display: block; }
.landing-page .how-to, .landing-page .why-us, .landing-page .professionals, .landing-page .faq { padding: 72px var(--site-page-gutter); margin: 0; }
.landing-page .container, .landing-page .faq__container { max-width: var(--site-page-width); width: 100%; margin-inline: auto; padding-inline: 0; }
.landing-page .campaign-process { text-align: left; }
.landing-page .campaign-process > h2 { margin: 18px 0; color: #08164c; font-size: clamp(30px, 3.5vw, 44px); line-height: 1.2; }
.landing-page .campaign-process > p { max-width: 700px; color: #56617c; line-height: 1.7; }
.landing-page .campaign-process ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 32px; padding: 0; margin: 36px 0; list-style: none; counter-reset: campaign-step; }
.landing-page .campaign-process li { border-top: 1px solid #d7deef; padding-top: 20px; counter-increment: campaign-step; }
.landing-page .campaign-process li::before { content: counter(campaign-step, decimal-leading-zero); display: block; color: #3e63ff; margin-bottom: 12px; font-size: 13px; }
.landing-page .campaign-process li strong { font-size: 20px; line-height: 1.4; color: #08164c; }
.landing-page .campaign-process li p { margin-top: 12px; font-size: 15px; line-height: 1.7; color: #56617c; }
.landing-page .faq-item[open] { border: 1px solid #d7deef; padding: 20px; }
@media (max-width: 700px) {
  main[data-legal-page] { padding-block: 32px 48px; }
  main[data-legal-page] h1 { margin-bottom: 24px; }
  .landing-page .hero { padding-block: 40px; }
  .landing-page .hero__content { gap: 32px; }
  .landing-page .how-to, .landing-page .why-us, .landing-page .professionals, .landing-page .faq { padding-block: 48px; }
  .landing-page .campaign-process ol { grid-template-columns: minmax(0,1fr); gap: 24px; }
}

.single-post .article-detail .article-batch-faq details {
  border: 1px solid transparent;
  border-bottom-color: var(--article-rule);
  padding: 16px;
}
.single-post .article-detail .article-batch-faq details[open] {
  border-color: var(--article-rule);
  background: #f7f9fd;
}
.help-page .help-question { border: 1px solid transparent; border-bottom-color: #dbe1ee; padding-inline: 16px; }
.help-page .help-question[open] { border-color: #dbe1ee; background: #f7f9fd; }
