/* Optional analytics consent surface. Loaded after the site styles so it can
   reuse the TBWD palette without changing any existing rule. */
.analytics-consent [hidden] { display: none !important; }

.analytics-banner {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: 16px;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid #8c9bb288;
  border-radius: 12px;
  background: #16100cf5;
  color: #fff;
  font: 400 14px/1.55 var(--display, 'Inter Display', 'Inter', sans-serif);
  box-shadow: 0 12px 32px #00000066;
}

.analytics-banner .analytics-heading { font-size: 14px; }

.analytics-heading {
  margin: 0 0 8px;
  color: #fff;
  font: 500 17px/1.3 var(--display, 'Inter Display', 'Inter', sans-serif);
  letter-spacing: -.02em;
}

.analytics-copy {
  margin: 0 0 12px;
  color: #e3d8d1;
  font-size: 13px;
}

.analytics-consent a {
  color: #ffac70;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-consent a:focus-visible {
  outline: 2px solid #ffac70;
  outline-offset: 2px;
}

.analytics-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-choice {
  flex: 1 1 140px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #8c9bb299;
  border-radius: 12px;
  background: #ffffff10;
  color: #fff;
  font: 500 13px/1.25 var(--sans, 'Inter', sans-serif);
  text-align: center;
}

.analytics-choice:hover {
  background: #ffffff1c;
}

.analytics-choice:focus-visible {
  outline: 2px solid #ffac70;
  outline-offset: 2px;
}

.analytics-note {
  margin: 10px 0 0;
  color: #ffd7b8;
  font-size: 12px;
  line-height: 1.5;
}

.analytics-warning {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid #8c9bb233;
  color: #ffd7b8;
  font-size: 13px;
}

.analytics-warning p {
  margin: 0 0 10px;
}

.analytics-warning .analytics-choice {
  width: 100%;
}

.analytics-settings {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--r-muted, #a3a3a6);
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.analytics-settings:hover {
  color: var(--r-bright, #ffad75);
}

.analytics-settings:focus-visible {
  outline: 2px solid #ffac70;
  outline-offset: 2px;
}

.analytics-panel {
  position: fixed;
  inset: 0;
  width: min(440px, calc(100vw - 32px));
  height: fit-content;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 24px;
  border: 1px solid #8c9bb288;
  border-radius: 16px;
  background: #16100c;
  color: #fff;
  font: 400 14px/1.55 var(--display, 'Inter Display', 'Inter', sans-serif);
  box-shadow: 0 24px 64px #000000b3;
  overflow: auto;
}

.analytics-panel::backdrop {
  background: #000000b3;
}

.analytics-panel:focus {
  outline: none;
}

.analytics-close {
  min-height: 44px;
  margin-top: 14px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: #c4ac9b;
  font: 400 13px/1.2 var(--sans, 'Inter', sans-serif);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-close:focus-visible {
  outline: 2px solid #ffac70;
  outline-offset: 2px;
}

.analytics-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .analytics-banner {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    max-height: calc(100dvh - 24px);
    padding: 16px;
  }

}
