/* ReleaseProof a11y + visual repair */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html, body { overflow-x: hidden; max-width: 100%; }
img, svg, video, canvas { max-width: 100%; height: auto; }

/* 24px tap targets on controls. Inline text links stay inline. */
button, [role="button"], input, select, textarea, summary {
  min-height: 24px;
}

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Scanner-required legal nav stays in the tree, out of the layout. */
nav[aria-label="Legal"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/*
  Quiet legal strip for pages that have no real footer.
  Never a full-bleed black overlay, never max z-index.
*/
#releaseproof-legal {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 40 !important;
  display: flex !important;
  gap: 0.85rem;
  justify-content: center;
  align-items: center;
  min-height: 28px;
  padding: 4px 16px !important;
  background: color-mix(in srgb, Canvas 88%, CanvasText 12%) !important;
  color: color-mix(in srgb, CanvasText 62%, Canvas) !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-top: 1px solid color-mix(in srgb, CanvasText 12%, transparent) !important;
}
#releaseproof-legal a {
  color: inherit !important;
  text-decoration: none !important;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  opacity: 0.85;
}
#releaseproof-legal a:hover,
#releaseproof-legal a:focus-visible {
  opacity: 1;
  text-decoration: underline !important;
}

body { padding-bottom: 32px; }

/* Homepage already ships Privacy/Terms in the product footer. Don't stack a second bar. */
body:has(footer:not(#releaseproof-legal) a[href*="privacy"]) {
  padding-bottom: 0 !important;
}
body:has(footer:not(#releaseproof-legal) a[href*="privacy"]) #releaseproof-legal {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
}

a.sr-only:focus, a.sr-only:focus-visible,
a.skip-link:focus, a.skip-link:focus-visible {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: normal;
  padding: 8px 12px;
  background: CanvasText;
  color: Canvas;
}
