.analytics-consent {
  box-sizing: border-box;
  width: min(32rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(1rem, 3.5vw, 1.75rem);
  border: 1px solid #dfe7ef;
  border-radius: 1rem;
  background: #fff;
  color: #172c46;
  box-shadow: 0 1rem 3.5rem rgb(23 44 70 / 22%);
}

#analytics-banner {
  position: fixed;
  z-index: 20;
  inset: auto auto max(1rem, env(safe-area-inset-bottom)) 1rem;
}

#analytics-settings {
  width: min(35rem, calc(100vw - 2rem));
  margin: auto;
}

#analytics-settings::backdrop {
  background: rgb(23 44 70 / 48%);
}

.analytics-consent h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.analytics-consent p {
  margin: .55rem 0 0;
  color: #465b72;
  font-size: .9rem;
  line-height: 1.55;
}

.analytics-consent a {
  color: #145da3;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.analytics-settings-header,
.analytics-option-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

#analytics-close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 50%;
  background: #edf3fa;
  color: #244b74;
  font-size: 1.35rem;
  line-height: 1;
}

#analytics-close:hover {
  background: #dce9f7;
}

.analytics-options {
  display: grid;
  gap: .6rem;
  margin-top: 1rem;
}

.analytics-option {
  padding: .8rem 1rem;
  border: 1px solid #e1e9f2;
  border-radius: .75rem;
  background: #f7f9fc;
}

.analytics-option h3 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
  letter-spacing: 0;
}

.analytics-option p {
  margin-top: .35rem;
  font-size: .85rem;
}

.analytics-badge {
  padding: .15rem .55rem;
  border-radius: 999px;
  background: #e8eef5;
  color: #3a526f;
  font-size: .75rem;
  font-weight: 700;
}

.analytics-badge-active {
  background: #dfefe6;
  color: #205937;
}

.analytics-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin-top: 1rem;
}

.analytics-actions button {
  min-height: 2.75rem;
  padding: .55rem .65rem;
  border: 1px solid #719bc3;
  border-radius: .65rem;
  background: #fff;
  color: #145da3;
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.3;
}

.analytics-actions button:hover {
  border-color: #145da3;
  background: #edf5fd;
}

.analytics-policy {
  display: inline-block;
  margin-top: .75rem;
  font-size: .8rem;
}

.analytics-consent :focus-visible {
  outline: 2px solid #145da3;
  outline-offset: 3px;
}
