.analytics-preferences {
  margin: 1.25rem auto;
  width: min(68rem, calc(100% - 2.5rem));
  padding: 1rem 1.25rem;
  box-sizing: border-box;
  border: 1px solid #7c8c94;
  border-radius: 2px;
  background: #f9f8f5;
  color: #032b3c;
  font-family: inherit;
}
.analytics-preferences[hidden] { display: none; }
.analytics-preferences h2 { margin: 0 0 .4rem; font: inherit; font-weight: 600; }
.analytics-preferences p { margin: .4rem 0; font-size: .875rem; line-height: 1.5; }
.analytics-preferences a, .analytics-open { color: #032b3c; text-decoration: underline; text-underline-offset: .18em; }
.analytics-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .8rem; }
.analytics-choice {
  appearance: none;
  flex: 0 1 12rem;
  min-height: 44px;
  max-width: 100%;
  padding: .65rem 1rem;
  border: 1px solid #032b3c;
  border-radius: .25rem;
  background: #fff;
  color: #032b3c;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}
.analytics-choice:hover { background: #e7f1ef; }
.analytics-open { appearance: none; background: transparent; border: 0; padding: .5rem 0; font: inherit; font-size: .8rem; cursor: pointer; }
.analytics-choice:focus-visible, .analytics-open:focus-visible, .analytics-preferences:focus-visible { outline: 2px solid #032b3c; outline-offset: 3px; }
@media (max-width: 420px) { .analytics-choice { flex: 1 1 0; } }
/* Keep the choice compact and in the page flow, with equal-weight controls. */
@media (min-width: 901px) {
  .analytics-preferences { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 24px; width: 90%; margin: 16px auto; padding: 14px 18px; }
  .analytics-preferences h2, .analytics-preferences p { grid-column: 1; }
  .analytics-preferences h2 { margin-bottom: 2px; font-size: 14px; }
  .analytics-preferences p { margin: 2px 0; font-size: 12px; }
  .analytics-actions { grid-column: 2; grid-row: 1 / 5; align-self: center; margin: 0; flex-wrap: nowrap; }
  .analytics-choice { flex: 0 0 auto; font-size: 12px; }
}
