.cookie-consent-banner[hidden],
.cookie-modal-backdrop[hidden] {
  display: none !important;
}

.cookie-consent-banner {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 18px;
  width: min(1160px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 24px 26px;
  color: var(--ink, #173c46);
  background: rgba(252, 249, 242, .985);
  border: 1px solid var(--line, #d7e3de);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(23, 60, 70, .2);
}

.cookie-consent-copy strong {
  display: block;
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 400;
}

.cookie-consent-copy p {
  max-width: 720px;
  margin: 0 0 7px;
  font-size: .86rem;
  line-height: 1.55;
}

.cookie-consent-copy a,
.cookie-policy-link {
  color: inherit;
  font-size: .8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent-actions,
.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-consent-actions {
  max-width: 430px;
  justify-content: flex-end;
}

.cookie-button {
  min-height: 44px;
  border: 1px solid var(--green, #4f8f86);
  border-radius: 999px;
  padding: 10px 17px;
  font: 600 .78rem/1.2 Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.cookie-button-primary {
  color: #fff;
  background: var(--green, #4f8f86);
}

.cookie-button-primary:hover {
  background: #3f786f;
}

.cookie-button-secondary {
  color: var(--ink, #173c46);
  background: transparent;
  border-color: #8db8ad;
}

.cookie-button-secondary:hover,
.cookie-button-link:hover {
  background: #e4efe9;
}

.cookie-button-link {
  color: var(--ink, #173c46);
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-modal-backdrop {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 60, 70, .46);
  backdrop-filter: blur(3px);
}

.cookie-modal {
  position: relative;
  width: min(700px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 38px;
  color: var(--ink, #173c46);
  background: #fcf9f2;
  border: 1px solid #d7e3de;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(10, 40, 48, .28);
}

.cookie-modal h2 {
  margin: 8px 42px 13px 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.cookie-modal > p {
  max-width: 590px;
  margin-bottom: 24px;
  font-size: .94rem;
}

.cookie-modal-eyebrow {
  color: var(--green, #4f8f86);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
}

.cookie-modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink, #173c46);
  background: transparent;
  border: 1px solid #b8cec8;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

.cookie-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 19px 0;
  border-top: 1px solid #d7e3de;
}

.cookie-category strong {
  display: block;
  margin-bottom: 5px;
  font-size: .96rem;
}

.cookie-category p {
  max-width: 540px;
  margin: 0;
  color: #48676d;
  font-size: .82rem;
  line-height: 1.5;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  cursor: pointer;
}

.cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.cookie-switch > span:last-child {
  position: relative;
  width: 48px;
  height: 27px;
  background: #c7d3d0;
  border-radius: 999px;
  transition: background .2s ease;
}

.cookie-switch > span:last-child::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 19px;
  height: 19px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  transition: transform .2s ease;
}

.cookie-switch input:checked + span {
  background: var(--green, #4f8f86);
}

.cookie-switch input:checked + span::after {
  transform: translateX(21px);
}

.cookie-switch input:focus-visible + span {
  outline: 3px solid #c9795f;
  outline-offset: 4px;
}

.cookie-switch-required {
  cursor: default;
  opacity: .72;
}

.cookie-modal-actions {
  margin-top: 23px;
}

.cookie-policy-link {
  display: inline-block;
  margin-top: 18px;
}

.cookie-preferences-link {
  margin: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cookie-noscript {
  margin: 0;
  padding: 10px 20px;
  color: #173c46;
  background: #e4efe9;
  text-align: center;
  font-size: .82rem;
}

.cookie-modal-open {
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 820px) {
  .cookie-consent-banner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cookie-consent-actions {
    max-width: none;
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  .cookie-consent-banner {
    bottom: 10px;
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    overflow: auto;
    padding: 20px;
    border-radius: 14px;
  }

  .cookie-consent-actions,
  .cookie-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-button {
    width: 100%;
  }

  .cookie-modal-backdrop {
    padding: 10px;
  }

  .cookie-modal {
    max-height: calc(100vh - 20px);
    padding: 30px 20px 24px;
    border-radius: 15px;
  }

  .cookie-category {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-button,
  .cookie-switch > span:last-child,
  .cookie-switch > span:last-child::after {
    transition: none;
  }
}
