:root {
  --consent-blur: 0px;
}

.consent-gated {
  filter: grayscale(1) blur(var(--consent-blur, 0px));
}

body.consent-unresolved .skip,
body.consent-unresolved #mnav,
body.consent-unresolved #intro,
body.consent-unresolved .readbar {
  filter: grayscale(1);
}

.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgb(0 0 0 / 62%);
  pointer-events: none;
}

.consent-overlay[hidden] {
  display: none;
}

.consent-dialog {
  display: flex;
  flex-direction: column;
  width: min(100%, 560px);
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  color: #0d2b1d;
  background: #fff;
  border: 1px solid #d3dcd5;
  box-shadow: 0 24px 80px rgb(0 0 0 / 35%);
}

.consent-dialog__body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 5vw, 36px);
}

.consent-dialog__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.consent-dialog h2 {
  margin: 0;
  font: 700 clamp(1.6rem, 5vw, 2rem)/1.15 var(--display, system-ui, sans-serif);
}

.consent-shield {
  display: block;
  flex: 0 0 auto;
  width: 32px;
  height: 42px;
  object-fit: contain;
}

.consent-dialog p {
  margin: 0;
  color: #263d30;
  font: 400 1rem/1.6 var(--body, system-ui, sans-serif);
}

.consent-dialog a {
  color: #075e25;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 clamp(24px, 5vw, 36px) clamp(24px, 5vw, 36px);
}

.consent-choice {
  min-height: 52px;
  padding: 12px 16px;
  color: #fff;
  background: #0d2b1d;
  border: 2px solid #0d2b1d;
  border-radius: 4px;
  font: 600 1rem/1.2 var(--body, system-ui, sans-serif);
  text-align: center;
  cursor: pointer;
}

.consent-choice:hover {
  background: #17462f;
  border-color: #17462f;
}

.consent-choice:focus-visible,
.consent-dialog a:focus-visible {
  outline: 3px solid #075e25;
  outline-offset: 3px;
}

.consent-dialog {
  pointer-events: auto;
}

@media (max-width: 520px) {
  .consent-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-gated {
    filter: grayscale(1);
  }
}
