.ahrgc-overlay,
.ahrgc-overlay * { box-sizing: border-box; }

/* While the gate is up the page behind it must not scroll, and its scrollbar
   is hidden so the only scrollable surface on screen is the card itself. */
html.ahrgc-locked,
html.ahrgc-locked body {
  overflow: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.ahrgc-locked::-webkit-scrollbar,
html.ahrgc-locked body::-webkit-scrollbar { width: 0; height: 0; display: none; }

.ahrgc-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The block padding is the guaranteed breathing room above and below the
     card; the card never grows past it because of its max-height below. */
  padding: clamp(28px, 6vh, 64px) 24px;
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(25, 34, 54, .94);
  color: #111827;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Held back until the delay elapses. visibility (not display) keeps the
   overlay out of the tab order while still allowing it to fade in. */
.ahrgc-overlay--delayed {
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}

.ahrgc-overlay--delayed.ahrgc-overlay--visible {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .ahrgc-overlay--delayed { transition: none; }
}

.ahrgc-card {
  width: min(560px, 100%);
  /* Column layout so the banner stays put and only the content scrolls. */
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(3, 7, 18, .42);
}

/* The brand art is a full-bleed banner with its own black background, so the
   band matches it exactly and no letterbox edge shows around the artwork. */
.ahrgc-brand {
  flex: 0 0 auto;
  min-height: 0;
  display: block;
  padding: 0;
  background: #000;
  overflow: hidden;
}

/* aspect-ratio crops the banner's empty margins to a header-sized band; the
   offset keeps the mark centred because it sits above the artwork's midline. */
.ahrgc-brand img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 560 / 196;
  object-fit: cover;
  object-position: center 30%;
}

.ahrgc-content {
  flex: 1 1 auto;
  padding: 32px 32px 25px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cfd7e3 transparent;
}

.ahrgc-content::-webkit-scrollbar { width: 6px; }
.ahrgc-content::-webkit-scrollbar-track { background: transparent; }
.ahrgc-content::-webkit-scrollbar-thumb { border-radius: 999px; background: #cfd7e3; }

.ahrgc-content h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.025em;
  font-weight: 750;
}

.ahrgc-intro {
  margin: 0 0 24px;
  color: #526077;
  font-size: 15px;
  line-height: 1.58;
}

.ahrgc-intro strong { color: #111827; font-weight: 750; }

.ahrgc-error {
  margin: -8px 0 17px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.4;
}

.ahrgc-form { display: grid; gap: 16px; }

.ahrgc-field { display: grid; gap: 6px; margin: 0; }

.ahrgc-field label {
  font-size: 13px;
  font-weight: 600;
  color: #56647b;
}

/* Explicit background and appearance, or the closed select renders as a
   system-grey control that does not match the rest of the card. */
.ahrgc-select {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: #1f2a3c;
  font: inherit;
  font-size: 15px;
  line-height: 1.3;
}

.ahrgc-select:focus {
  outline: none;
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

.ahrgc-select option { color: #1f2a3c; background: #fff; }

.ahrgc-check {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin: 0;
  color: #172033;
  font-size: 14px;
  line-height: 1.55;
  cursor: pointer;
}

.ahrgc-check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: #7c3aed;
}

.ahrgc-check--remember { color: #56647b; }

.ahrgc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.ahrgc-enter,
.ahrgc-decline {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.ahrgc-enter {
  border: 0;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 10px 24px rgba(109, 40, 217, .24);
  cursor: pointer;
}

.ahrgc-enter:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(109, 40, 217, .32);
}

.ahrgc-enter:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

.ahrgc-decline {
  border: 1px solid #d9dfeb;
  background: #fff;
  color: #43516a;
}

.ahrgc-decline:hover { border-color: #b7c0d0; color: #172033; }

.ahrgc-fineprint {
  margin: 25px 0 0;
  color: #8290a6;
  font-size: 10.5px;
  line-height: 1.55;
  text-align: center;
}

.ahrgc-fineprint a {
  color: #65748b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 620px) {
  .ahrgc-overlay { padding: clamp(16px, 4vh, 28px) 12px; }
  .ahrgc-brand { min-height: 0; padding: 0; }
  .ahrgc-content { padding: 26px 21px 21px; }
  .ahrgc-content h2 { font-size: 20px; }
  .ahrgc-actions { grid-template-columns: 1fr; }
}

