.analytics-notice,
.analytics-choice {
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid var(--line, #e4e6db);
  border-radius: 10px;
  background: var(--paper, #f8f8f2);
  color: var(--ink, #263d33);
  box-shadow: 0 6px 24px #142d2430;
  font: inherit;
  line-height: 1.45;
}
.analytics-notice {
  position: fixed;
  inset: auto auto max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  z-index: 50;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 16px;
}
.analytics-choice {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.analytics-choice::backdrop {
  background: #142d245e;
}
body:has(.analytics-choice[open]) > .analytics-notice {
  visibility: hidden;
}
.analytics-notice h2,
.analytics-choice h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}
.analytics-notice h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.1rem;
}
.analytics-notice-shield {
  position: relative;
  flex: 0 0 16px;
  height: 18px;
  background: var(--green, #183e32);
  clip-path: polygon(50% 0, 100% 18%, 94% 64%, 76% 86%, 50% 100%, 24% 86%, 6% 64%, 0 18%);
}
.analytics-notice-shield::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 4px;
  height: 6px;
  border: solid var(--paper, #f8f8f2);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.analytics-choice-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.analytics-notice p,
.analytics-choice p {
  margin: 0 0 10px;
}
.analytics-choice-category {
  border-top: 1px solid var(--line, #e4e6db);
  padding: 12px 0;
}
.analytics-choice-category label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 650;
}
.analytics-choice-category input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green, #183e32);
}
.analytics-choice-category p {
  margin: 4px 0 0;
}
.analytics-choice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-block: 16px 10px;
}
.analytics-notice .analytics-choice-actions {
  margin: 12px 0 0;
}
.analytics-notice button,
.analytics-choice button,
#analytics-preferences button {
  padding: 7px 12px;
  border: 1px solid var(--green, #183e32);
  border-radius: 6px;
  background: var(--paper, #f8f8f2);
  color: var(--green, #183e32);
  font: inherit;
  cursor: pointer;
}
.analytics-choice-actions button {
  flex: 1 0 auto;
  min-height: 40px;
}
.analytics-choice-actions button[value="all"]:not(:disabled) {
  background: var(--green, #183e32);
  color: var(--paper, #f8f8f2);
}
.analytics-choice button[data-close-preferences] {
  padding: 0 8px;
  min-width: 34px;
  min-height: 34px;
  border-color: transparent;
  font-size: 1.35rem;
}
.analytics-notice button:disabled,
.analytics-choice button:disabled {
  cursor: default;
  opacity: 0.6;
}
.analytics-choice a {
  color: inherit;
  text-decoration: underline;
}
@media (max-width: 480px) {
  .analytics-choice-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analytics-choice-actions [data-cookie-preferences],
  .analytics-choice-actions button[value="custom"] {
    grid-column: 1 / -1;
  }
}
