/* Optional analytics prompt. Existing type system remains unchanged. */
:root body .analytics-consent {
  position: static;
  z-index: auto;
  width: min(720px, calc(100% - 2rem));
  max-width: none;
  margin: 1.5rem auto 0;
  padding: 1rem;
  background: #fff;
  border: 1px solid #bcd3e1;
  box-shadow: 0 8px 20px rgba(8, 43, 72, 0.12);
  color: #173e5c;
}

:root body .analytics-consent[hidden] {
  display: none;
}

:root body .analytics-consent > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  align-items: center;
}

:root body .analytics-consent p {
  grid-column: 1 / -1;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0;
  margin: 0;
}

:root body .analytics-consent button {
  height: auto !important;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  white-space: normal !important;
}

@media (max-width: 760px) {
  :root body .analytics-consent {
    width: calc(100% - 1.5rem);
    margin-top: 1rem;
  }

  :root body .analytics-consent > div {
    gap: 8px;
  }
}

:root body .analytics-preferences-link {
  display: inline; width: auto; height: auto; min-height: 44px;
  padding: 8px 0; border: 0; background: transparent; color: inherit;
  box-shadow: none; font: inherit; text-align: left; text-decoration: underline;
  cursor: pointer; white-space: normal;
}
:root body dialog.analytics-preferences {
  box-sizing: border-box; width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 32px); overflow: auto; margin: auto;
  padding: 28px; border: 1px solid #8fb8d1; border-radius: 8px;
  background: #fff; color: #173e5c; box-shadow: 0 12px 36px rgba(8,43,72,.2);
  font-family: inherit;
}
:root body .analytics-preferences::backdrop {background: rgba(20,60,89,.35)}
:root body .analytics-preferences h2 {font-size: 26px;line-height:1.25;margin:0 0 16px;}
:root body .analytics-preferences p {font-size:16px;line-height:1.5;max-width:none;width:auto;margin:12px 0;}
:root body .analytics-preferences .analytics-preference-option {display:flex;align-items:center;gap:12px;min-height:48px;font-size:17px;line-height:1.4;cursor:pointer;}
:root body .analytics-preference-option input {width:22px;height:22px;min-width:22px;margin:0;accent-color:#205e86;}
:root body .analytics-preferences .analytics-preference-status {font-weight:600;}
:root body .analytics-preferences .analytics-preference-note {font-size:14px;}
:root body .analytics-preference-actions {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px;}
:root body .analytics-preference-actions button {height:auto;min-height:44px;padding:12px 16px;white-space:normal;line-height:1.4;font:inherit;border:1px solid #205e86;border-radius:4px;background:#edf6fc;color:#173e5c;cursor:pointer;}
:root body .analytics-preference-actions [data-preferences-save] {background:#205e86;color:#fff;}
@media(max-width:480px){:root body dialog.analytics-preferences{padding:20px;}:root body .analytics-preference-actions{grid-template-columns:1fr;}}
