#analytics-consent-root[hidden],
#analytics-consent-root [hidden] {
  display: none !important;
}

.analytics-consent {
  position: fixed;
  inset: auto 0 0;
  z-index: 100000;
  border-top: 1px solid #d8dde3;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 -4px 18px rgba(17, 24, 39, 0.14);
  font-family: Roboto, Arial, sans-serif;
}

.analytics-consent__inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.analytics-consent p,
.analytics-consent-dialog p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.analytics-consent a,
.analytics-consent-dialog a {
  color: #8f1d24;
  text-decoration: underline;
}

.analytics-consent__actions,
.analytics-consent-dialog__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.analytics-consent button,
.analytics-consent-dialog button,
.analytics-consent-settings {
  min-height: 44px;
  border: 1px solid #8f1d24;
  border-radius: 6px;
  padding: 10px 16px;
  background: #8f1d24;
  color: #ffffff;
  font: 600 14px/1.2 Roboto, Arial, sans-serif;
  letter-spacing: 0;
  cursor: pointer;
}

.analytics-consent button:hover,
.analytics-consent button:focus-visible,
.analytics-consent-dialog button:hover,
.analytics-consent-dialog button:focus-visible {
  background: #6f171c;
  border-color: #6f171c;
}

.analytics-consent button.is-secondary,
.analytics-consent-dialog button.is-secondary {
  background: #ffffff;
  color: #1f2937;
  border-color: #9ca3af;
}

.analytics-consent button.is-link {
  border-color: transparent;
  background: transparent;
  color: #6b1a20;
  padding-inline: 8px;
}

.analytics-consent button:focus-visible,
.analytics-consent-dialog button:focus-visible,
.analytics-consent-settings:focus-visible,
.analytics-consent-dialog input:focus-visible {
  outline: 3px solid #f0b7bb;
  outline-offset: 2px;
}

.analytics-consent-settings {
  display: inline-block;
  min-height: 44px;
  margin: 10px 0 0 12px;
  padding: 7px 11px;
  border-color: #4b5563;
  background: transparent;
  color: inherit;
  font-size: 12px;
  box-shadow: none;
}

.analytics-consent-dialog {
  position: fixed;
  inset: 0;
  z-index: 100010;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.56);
}

.analytics-consent-dialog__panel {
  width: min(520px, 100%);
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  font-family: Roboto, Arial, sans-serif;
}

.analytics-consent-dialog h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.analytics-consent-dialog label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  font-size: 16px;
  line-height: 1.4;
}

.analytics-consent-dialog input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.analytics-footer-links {
  padding: 12px 20px 18px;
  text-align: center;
  font: 14px/1.4 Roboto, Arial, sans-serif;
}

.analytics-footer-links a {
  color: inherit;
  text-decoration: underline;
}

.contact-call-panel {
  border-left: 4px solid #8f1d24;
  background: #f7f8fa;
  padding: 20px;
}

.contact-call-panel p {
  margin: 0 0 14px;
  color: #374151;
  line-height: 1.55;
}

.contact-call-panel__links {
  display: grid;
  gap: 10px;
}

.contact-call-panel__links a {
  display: block;
  min-height: 46px;
  border: 1px solid #8f1d24;
  border-radius: 6px;
  padding: 12px 14px;
  color: #8f1d24;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 760px) {
  .analytics-consent__inner {
    width: min(100% - 24px, 560px);
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
  }

  .analytics-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .analytics-consent__actions .is-link {
    grid-column: 1 / -1;
  }

  .analytics-consent__actions button {
    width: 100%;
  }

  .analytics-consent-dialog__panel {
    padding: 20px;
  }

  .analytics-consent-dialog__actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-consent *,
  .analytics-consent-dialog * {
    scroll-behavior: auto !important;
  }
}

/* PHASE1 COMMON CRO: calm direct-call actions and compact mobile consent */
.phase1-header-call {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 10px;
}

.phase1-header-call__link,
.phase1-core-call-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #8f1d24;
  border-radius: 6px;
  padding: 10px 16px;
  background: #8f1d24;
  color: #ffffff;
  font: 600 15px/1.25 Roboto, Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}

.phase1-header-call__link:hover,
.phase1-header-call__link:focus-visible,
.phase1-core-call-cta:hover,
.phase1-core-call-cta:focus-visible {
  background: #6f171c;
  border-color: #6f171c;
  color: #ffffff;
}

.phase1-header-call__link:focus-visible,
.phase1-core-call-cta:focus-visible {
  outline: 3px solid #f0b7bb;
  outline-offset: 2px;
}

.phase1-core-role {
  max-width: 760px;
  margin: 16px 0 8px;
  border-left: 4px solid #8f1d24;
  border-radius: 4px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #1f2937;
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.12);
}

.phase1-core-role p {
  margin: 0 0 12px;
  color: #374151;
  font: 15px/1.55 Roboto, Arial, sans-serif;
}

@media (max-width: 760px) {
  .phase1-header-call {
    justify-content: stretch;
    padding: 0 12px 10px;
  }

  .phase1-header-call__link,
  .phase1-core-call-cta {
    width: 100%;
  }

  .analytics-consent {
    max-height: 20vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .analytics-consent__inner {
    min-height: 0;
    gap: 8px;
    padding: 6px 0;
  }

  .analytics-consent p {
    font-size: 14px;
    line-height: 1.35;
  }

  .analytics-consent__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .analytics-consent__actions .is-link {
    grid-column: auto;
  }

  .analytics-consent__actions button {
    min-width: 0;
    min-height: 44px;
    padding: 8px 5px;
    font-size: 13px;
  }

  .phase1-core-role {
    margin-top: 12px;
    padding: 12px;
  }
}

/* PHASE1C ACCESSIBILITY: visibly disclose the keyboard skip link */
.skip-link.screen-reader-text:focus,
.skip-link.screen-reader-text:focus-visible {
  position: fixed !important;
  z-index: 100000 !important;
  top: 8px !important;
  left: 8px !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 44px !important;
  height: auto !important;
  min-height: 44px !important;
  align-items: center !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  border: 2px solid #e8bd65 !important;
  border-radius: 4px !important;
  background: #18212c !important;
  background-color: #18212c !important;
  color: #ffffff !important;
  font: 700 16px/1.35 Arial, sans-serif !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
