/* Keep editorial copy readable in cards, grids and standalone tools. */
main :is(h1, h2, h3),
main :is(p, li, label) {
  word-break: normal;
  overflow-wrap: break-word;
}

main :is(h1, h2, h3) { text-wrap: balance; }
main p { text-wrap: pretty; }

main :is(.card, .copy, .bc-prevention-panel, .feature-split) > div {
  min-inline-size: 0;
}

main :is(a.button, .actions > a, .situation-list a, button) {
  min-inline-size: 0;
  max-inline-size: 100%;
  white-space: normal;
  text-wrap: pretty;
}

main :is(img, video, iframe) { max-inline-size: 100%; }

@media (min-width: 1000px) {
  main.wrap:not(.bc-home) > :is(.card, .copy) > p {
    max-inline-size: 70ch;
  }

  main .energy-feature.feature-split {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: clamp(24px, 4vw, 48px);
  }

  main .energy-feature.feature-split h2 {
    max-inline-size: none;
    text-wrap: wrap;
  }

  main .energy-feature.feature-split p {
    max-inline-size: 54ch;
  }
}

@media (max-width: 900px) {
  main .energy-feature.feature-split {
    grid-template-columns: minmax(0, 1fr);
  }

  main .energy-feature.feature-split > div:last-child {
    justify-self: start;
  }
}

/* The same Enormail form and presentation on both newsletter pages. */
main .bc-newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 4vw, 48px);
  margin-block: clamp(22px, 4vw, 44px) 0;
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid #e3cec1;
  border-radius: 19px;
  background: #f3e8df;
  color: #253a30;
}

main .bc-newsletter h2 {
  margin: 0 0 8px;
  font: 700 clamp(1.56rem, 3.3vw, 2.35rem)/1.1 Georgia, 'Times New Roman', serif;
  letter-spacing: -.027em;
}

main .bc-newsletter p { margin: 0; }
main .bc-newsletter-form { min-inline-size: 0; }

.bc-newsletter .bc-newsletter-form [data-enormail-webform] :is(
  .c-enormail-webform__optin--default,
  .c-enormail-webform__brand
) {
  display: none !important;
}

.bc-newsletter .bc-newsletter-form [data-enormail-webform] :is(
  .c-enormail-webform__panelwrapper--default,
  .c-enormail-webform__panel,
  .c-enormail-webform__panelbackground,
  .c-enormail-webform__form,
  .c-enormail-webform__content
) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  max-inline-size: 100%;
}

.bc-newsletter .bc-newsletter-form [data-enormail-webform] :is(
  .c-enormail-webform__form__inner,
  .c-enormail-webform__form
) {
  padding: 0 !important;
}

.bc-newsletter .bc-newsletter-form [data-enormail-webform] .c-enormail-webform__label {
  color: #253a30 !important;
}

.bc-newsletter .bc-newsletter-form [data-enormail-webform] .c-enormail-webform__field {
  min-height: 44px;
  max-inline-size: 100%;
  font-size: 16px !important;
  color: #253a30 !important;
  background: #fffdf8 !important;
  border-color: #9da99c !important;
}

.bc-newsletter .bc-newsletter-form [data-enormail-webform] .c-enormail-webform__button {
  min-height: 44px;
  background: #884330 !important;
  border-color: #884330 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.bc-newsletter .bc-newsletter-form [data-enormail-webform] .c-enormail-webform__button:hover {
  background: #763b2b !important;
}

.bc-newsletter .bc-newsletter-form [data-enormail-webform] :is(
  .c-enormail-webform__field, .c-enormail-webform__button
):focus-visible {
  outline: 2px solid #7b4536;
  outline-offset: 2px;
}

@media (max-width: 700px) {
  main .bc-newsletter { grid-template-columns: minmax(0, 1fr); }
}

/* Inter is shared with the VerzuimKompas. Keep the existing type scale. */
@font-face {
  font-family: Inter;
  src: url('./inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

body,
body :is(button, input, select, textarea) {
  font-family: Inter, system-ui, sans-serif;
}

body main :is(h1, h2, h3, h4, h5, h6) {
  font-family: Inter, system-ui, sans-serif !important;
}

/* Make navigation and inline links recognizable across the public site. */
header.top :is(a, summary):focus-visible,
main :is(a, summary, input, select, textarea):focus-visible {
  outline: 3px solid #884330;
  outline-offset: 3px;
}

main :is(p, li) > a:not([class]) {
  text-decoration-thickness: .075em;
  text-underline-offset: .2em;
}

header.top .portal-cta {
  border: 1px solid #9da99c;
  background: #e5ede4;
  color: #273c31;
}

header.top .portal-cta:hover {
  background: #d7e3d6;
  color: #273c31;
}

header.top .portal-cta small {
  border-color: #9da99c;
}

@media (max-width: 750px) {
  header.top details.mobile > summary {
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: auto;
    min-height: 44px;
    padding: .5rem .75rem;
    border: 1px solid #879e8b;
    border-radius: .65rem;
    background: #e5ede4;
    color: #273c31;
    font-size: 1rem;
    font-weight: 700;
  }

  header.top details.mobile > summary::before {
    content: none;
  }

  header.top details.mobile > summary::after {
    content: "";
    position: static;
    flex: 0 0 .9rem;
    width: .9rem;
    height: .7rem;
    margin: 0;
    border-block: 1px solid currentColor;
    background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
  }

  header.top details.mobile[open] > summary {
    background: #cfddcf;
  }

  header.top details.mobile[open] > summary::after {
    height: .7rem;
    border-bottom: 1px solid currentColor;
    transform: none;
  }

  header.top details.mobile .nav a {
    padding-inline: 12px;
    border-bottom: 1px solid #c7d1c5;
  }
}

@media (max-width: 560px) {
  header.top .portal-cta {
    flex-direction: column;
    gap: 2px;
    text-align: center;
  }

  header.top .portal-cta small {
    padding-inline-start: 0;
    border-inline-start: 0;
    white-space: normal;
  }
}
