.cw-end-form {
  padding-bottom: 76px;
  background: var(--cw-color-surface);
  font-family: var(--font-body);
}

.cw-end-form__intro {
  position: relative;
  overflow: hidden;
  padding: 68px 0 112px;
  background: var(--cw-color-surface-evergreen-soft);
}

.cw-end-form__intro::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 88px;
  background: var(--cw-color-surface);
  clip-path: polygon(0 72%, 100% 0, 100% 100%, 0 100%);
}

.cw-end-form__intro .cw-container {
  position: relative;
  z-index: 1;
}

.cw-end-form__panel {
  display: contents;
}

.cw-end-form__intro h2,
.cw-end-form__intro p {
  margin: 0;
  color: var(--cw-green-primary);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.08;
}

.cw-end-form__intro h2 {
  max-width: 1180px;
  font-size: clamp(40px, 4vw, 62px);
  text-transform: uppercase;
}

.cw-end-form__intro p {
  margin-top: 8px;
  font-size: clamp(30px, 3vw, 48px);
}

.cw-end-form__note {
  margin: -42px 0 42px;
  color: var(--cw-moss);
  font-size: 17px;
  text-align: right;
}

.cw-end-form__form {
  padding-top: 28px;
}

.cw-end-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 58px;
}

.cw-end-form__field {
  display: grid;
  gap: 7px;
  color: var(--cw-moss);
  font-size: 18px;
}

.cw-end-form__field.is-wide {
  grid-column: 1 / -1;
}

.cw-end-form input,
.cw-end-form textarea,
.cw-end-form select {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid var(--cw-moss);
  border-radius: 0;
  background: transparent;
  color: #6d6e70;
  font: inherit;
  outline: none;
}

.cw-end-form textarea {
  min-height: 68px;
  resize: vertical;
}

.cw-end-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--cw-color-action) 50%), linear-gradient(135deg, var(--cw-color-action) 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 7px) 16px;
  background-repeat: no-repeat;
  background-size: 8px 8px;
}

.cw-end-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  min-height: 54px;
  margin: 52px auto 0;
  border: 0;
  background: var(--cw-color-action);
  color: var(--cw-white);
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .cw-end-form__intro {
    padding: 48px 0 92px;
  }

  .cw-end-form__fields {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cw-end-form__field.is-wide {
    grid-column: auto;
  }

  .cw-end-form__note {
    margin-top: -28px;
    font-size: 14px;
  }
}

/* Compact light form: solid green title bar over an untextured white form. */
.cw-end-form--light {
  padding-bottom: 40px;
  background: var(--cw-color-surface);
}

.cw-end-form--light .cw-end-form__intro {
  padding: 38px 0 74px;
  background: var(--cw-color-surface-evergreen-soft);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
}

.cw-end-form--light .cw-end-form__intro::after {
  display: none;
}

.cw-end-form--light .cw-end-form__intro h2,
.cw-end-form--light .cw-end-form__intro p {
  color: var(--cw-green-primary);
}

.cw-end-form--light .cw-end-form__note {
  margin: -28px 0 18px;
}

.cw-end-form--light .cw-end-form__form {
  padding-top: 10px;
}

.cw-end-form--light .cw-end-form__fields {
  gap: 16px 54px;
}

.cw-end-form--light .cw-end-form__field {
  gap: 4px;
  font-size: 17px;
}

.cw-end-form--light textarea {
  min-height: 54px;
}

.cw-end-form--light button {
  min-height: 48px;
  margin-top: 26px;
}

@media (max-width: 700px) {
  .cw-end-form--light {
    padding-bottom: 40px;
  }

  .cw-end-form--light .cw-end-form__intro {
    padding: 42px 0 82px;
    clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%);
  }

  .cw-end-form--light .cw-end-form__note {
    margin: -26px 0 20px;
  }

  .cw-end-form--light .cw-end-form__fields {
    gap: 22px;
  }
}

/* Forest form variant used by every page-bottom form. */
.cw-end-form--forest {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 5.2vw, 76px) 0;
  background-color: var(--cw-dark-evergreen);
  background-image: linear-gradient(rgba(0, 34, 19, 0.1), rgba(0, 34, 19, 0.22)), var(--cw-end-form-forest-image);
  background-position: center;
  background-size: cover;
  color: var(--cw-moss);
}

.cw-end-form--forest .cw-end-form__panel {
  display: block;
  width: min(calc(100% - 48px), 1180px);
  padding: clamp(18px, 2.1vw, 29px) clamp(17px, 2.4vw, 37px) clamp(20px, 2.4vw, 30px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(0, 35, 20, 0.14);
}

.cw-end-form--forest .cw-end-form__intro {
  overflow: visible;
  padding: 0;
  background: transparent;
  clip-path: none;
}

.cw-end-form--forest .cw-end-form__intro-inner {
  width: auto;
  max-width: none;
  padding: 0;
}

.cw-end-form--forest .cw-end-form__intro::after {
  display: none;
}

.cw-end-form--forest .cw-end-form__intro h2,
.cw-end-form--forest .cw-end-form__intro p {
  color: var(--cw-green-primary);
  font-weight: 400;
}

.cw-end-form--forest .cw-end-form__intro h2 {
  max-width: none;
  font-size: clamp(24px, 2.55vw, 36px);
  line-height: 1.06;
  letter-spacing: 0.005em;
}

.cw-end-form--forest .cw-end-form__intro p {
  margin-top: 12px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.1;
}

@media (min-width: 960px) {
  .cw-end-form--forest .cw-end-form__intro h2 {
    white-space: nowrap;
  }
}

.cw-end-form--forest .cw-end-form__note {
  margin: -4px 0 14px;
  color: var(--cw-color-text);
  font-size: 16px;
}

.cw-end-form--forest .cw-end-form__form {
  padding-top: 0;
}

.cw-end-form--forest .cw-end-form__fields {
  gap: 10px 54px;
}

.cw-end-form--forest .cw-end-form__field {
  gap: 0;
  color: var(--cw-color-text);
  font-size: 17px;
}

.cw-end-form--forest input,
.cw-end-form--forest textarea,
.cw-end-form--forest select {
  min-height: 30px;
  border-bottom-color: var(--cw-moss);
  color: #6d6e70;
}

.cw-end-form--forest select {
  padding: 0 38px 0 0;
  border-width: 0 0 1px;
  border-radius: 0;
  background-color: transparent;
  background-image: linear-gradient(45deg, transparent 50%, var(--cw-color-action) 50%), linear-gradient(135deg, var(--cw-color-action) 50%, transparent 50%);
  background-position: calc(100% - 14px) 12px, calc(100% - 7px) 12px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.cw-end-form--forest select:focus-visible {
  border-color: var(--cw-color-action);
  box-shadow: 0 2px 0 var(--cw-color-action);
}

.cw-end-form--forest select option {
  padding: 8px 12px;
  color: #6d6e70;
  text-indent: 12px;
}

.cw-end-form select option {
  padding: 8px 12px;
  color: #6d6e70;
  text-indent: 12px;
}

/* Native Windows option popups ignore option padding. This enhanced listbox
   keeps an exact cross-browser 8px text inset while the native select remains
   in the form as the submitted value and progressive-enhancement fallback. */
.cw-end-form select.cw-custom-select__native {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.cw-custom-select {
  position: relative;
  width: 100%;
}

.cw-end-form .cw-custom-select__trigger {
  position: relative;
  display: block;
  width: 100%;
  min-height: 30px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--cw-moss);
  padding: 0 38px 0 0;
  background: transparent;
  color: #6d6e70;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cw-custom-select__trigger::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--cw-color-action);
  border-bottom: 2px solid var(--cw-color-action);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.cw-custom-select.is-open .cw-custom-select__trigger::after {
  top: 13px;
  transform: rotate(225deg);
}

.cw-custom-select__trigger:focus-visible {
  border-bottom-color: var(--cw-color-action);
  box-shadow: 0 2px 0 var(--cw-color-action);
  outline: 0;
}

.cw-custom-select__listbox {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 30;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #8a8a8a;
  background: var(--cw-white);
  box-shadow: 0 8px 20px rgba(0, 35, 20, 0.16);
}

.cw-custom-select__listbox[hidden] {
  display: none;
}

.cw-form-multiselect {
  position: relative;
  width: 100%;
}

.cw-form-multiselect summary {
  position: relative;
  min-height: 30px;
  border-bottom: 1px solid var(--cw-moss);
  padding: 3px 38px 5px 0;
  color: #6d6e70;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.cw-form-multiselect summary::-webkit-details-marker {
  display: none;
}

.cw-form-multiselect summary::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--cw-color-action);
  border-bottom: 2px solid var(--cw-color-action);
  transform: rotate(45deg);
  transition: transform 160ms ease, top 160ms ease;
}

.cw-form-multiselect[open] summary::after {
  top: 13px;
  transform: rotate(225deg);
}

.cw-form-multiselect summary:focus-visible {
  border-bottom-color: var(--cw-color-action);
  box-shadow: 0 2px 0 var(--cw-color-action);
  outline: 0;
}

.cw-form-multiselect__value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-form-multiselect__panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 35;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #8a8a8a;
  background: var(--cw-white);
  box-shadow: 0 8px 20px rgba(0, 35, 20, 0.16);
}

.cw-form-multiselect__panel fieldset {
  display: grid;
  gap: 0;
  border: 0;
  margin: 0;
  padding: 6px 0;
}

.cw-form-multiselect__panel label {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  color: #4f4f4f;
  cursor: pointer;
}

.cw-form-multiselect__panel label:hover,
.cw-form-multiselect__panel label:focus-within {
  background: var(--cw-color-surface-evergreen-soft);
}

.cw-end-form .cw-form-multiselect__panel input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  border: 1px solid var(--cw-moss);
  margin: 0;
  accent-color: var(--cw-color-action);
}

.cw-end-form .cw-custom-select__option {
  display: block;
  width: 100%;
  min-height: 38px;
  margin: 0;
  border: 0;
  padding: 7px 12px 7px 8px;
  background: var(--cw-white);
  color: #6d6e70;
  font: inherit;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.cw-end-form .cw-custom-select__option:hover,
.cw-end-form .cw-custom-select__option:focus-visible,
.cw-end-form .cw-custom-select__option.is-selected {
  background: var(--cw-color-action);
  color: var(--cw-white);
  outline: 0;
}

.cw-end-form--forest button {
  width: 190px;
  min-height: 44px;
  margin-top: 22px;
  background: var(--cw-color-action);
  font-size: 16px;
}

@media (max-width: 700px) {
  .cw-end-form--forest {
    padding: 32px 0;
    background-position: 58% center;
  }

  .cw-end-form--forest .cw-end-form__panel {
    width: min(calc(100% - 28px), 1180px);
    padding: 17px 13px 19px;
  }

  .cw-end-form--forest .cw-end-form__intro {
    padding: 0;
  }

  .cw-end-form--forest .cw-end-form__note {
    margin: 14px 0 18px;
    text-align: left;
  }

  .cw-end-form--forest .cw-end-form__fields {
    gap: 22px;
  }
}
