/* Accessibility – TrustFair-style green pill + certificate panel */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* TrustFair pill badge – left so Help-Chat stays bottom-right */
.a11y-fab {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left, 0px));
  right: auto;
  bottom: max(1.1rem, env(safe-area-inset-bottom, 0px));
  z-index: 1190;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  height: 44px;
  padding: 0 .95rem 0 .55rem;
  border: 0;
  border-radius: 999px;
  background: #008767;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 135, 103, .38);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.a11y-fab:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 135, 103, .45);
}
.a11y-fab:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}
.a11y-fab-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex: 0 0 auto;
}
.a11y-fab-score {
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .02em;
  min-width: 2.4em;
}
@media (max-width: 720px) {
  .a11y-fab {
    left: max(.7rem, env(safe-area-inset-left, 0px));
    bottom: max(.55rem, env(safe-area-inset-bottom, 0px) + .25rem);
    height: 40px;
    padding: 0 .8rem 0 .45rem;
    gap: .45rem;
  }
  .a11y-fab-icon { width: 26px; height: 26px; font-size: .9rem; }
  .a11y-fab-score { font-size: .88rem; }
}

.a11y-modal[hidden] { display: none !important; }
.a11y-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: end start;
  justify-items: start;
  padding: .75rem 1rem 4.25rem;
}
.a11y-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 32, .45);
}
.a11y-modal-panel--cert {
  position: relative;
  width: min(360px, 100%);
  max-height: calc(100vh - 5.25rem);
  overflow: hidden; /* no scroll */
  background: #0b1220;
  color: #e8eef7;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 28px 70px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
}
.a11y-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .65rem;
  padding: .85rem 1rem .2rem;
  border: 0;
  flex: 0 0 auto;
}
.a11y-modal-head h2 {
  margin: 0;
  font-size: .98rem;
  font-weight: 800;
  color: #fff;
}
.a11y-sub {
  margin: .2rem 0 0;
  font-size: .72rem;
  color: #94a3b8;
}
.a11y-icon-btn {
  border: 0;
  background: rgba(255,255,255,.08);
  color: #e2e8f0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  flex: 0 0 auto;
}
.a11y-modal-body {
  padding: .35rem 1rem .55rem;
  flex: 1 1 auto;
  min-height: 0;
}
.a11y-modal-foot {
  border: 0;
  padding: 0 1rem .75rem;
  background: transparent;
  flex: 0 0 auto;
}

.a11y-score-wrap { display: grid; place-items: center; margin: .15rem 0 .55rem; }
.a11y-score-ring {
  --a11y-score-deg: 0deg;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: conic-gradient(#22c55e var(--a11y-score-deg), rgba(255,255,255,.12) 0);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .12);
}
.a11y-score-ring.is-perfect {
  background: conic-gradient(#22c55e 360deg, rgba(255,255,255,.12) 0);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
}
.a11y-score-inner {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #0b1220;
  display: grid;
  place-content: center;
  text-align: center;
  gap: .08rem;
}
.a11y-score-inner strong {
  font-size: 1.45rem;
  line-height: 1;
  color: #fff;
}
.a11y-score-inner span {
  font-size: .65rem;
  color: #94a3b8;
}

.a11y-metrics {
  margin: 0 0 .55rem;
  padding: 0;
}
.a11y-metrics > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .32rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin: 0;
}
.a11y-metrics dt {
  margin: 0;
  color: #94a3b8;
  font-size: .78rem;
  font-weight: 600;
}
.a11y-metrics dd {
  margin: 0;
  color: #fff;
  font-weight: 800;
  font-size: .84rem;
}
.a11y-metrics dd.is-bad { color: #f87171; }
.a11y-metrics dd.is-warn { color: #fb923c; }
.a11y-metrics dd.is-ok { color: #4ade80; }

.a11y-actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: .55rem;
}
.a11y-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 10px;
  padding: .48rem .7rem;
  font-weight: 750;
  font-size: .78rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  box-sizing: border-box;
}
.a11y-btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.35);
  color: #fff;
}
.a11y-btn-outline:hover { border-color: #fff; }
.a11y-btn-light {
  background: #fff;
  color: #0b1220;
}
.a11y-btn-light:hover { filter: brightness(.96); }

/* Compact 2×2 tools – fit without scroll */
.a11y-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  margin-top: 0;
}
.a11y-tool {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.15;
  padding: .42rem .35rem;
  cursor: pointer;
  text-align: center;
}
.a11y-tool i {
  font-size: .72rem;
  opacity: .9;
  flex: 0 0 auto;
}
.a11y-tool span {
  display: block;
  max-width: 100%;
}
.a11y-tool:hover,
.a11y-tool.is-on {
  background: #008767;
  border-color: transparent;
  color: #fff;
}
.a11y-reset-link {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: .76rem;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}
.a11y-reset-link:hover { color: #fff; }

@media (max-height: 760px) {
  .a11y-score-ring { width: 92px; height: 92px; }
  .a11y-score-inner { width: 74px; height: 74px; }
  .a11y-score-inner strong { font-size: 1.25rem; }
  .a11y-metrics > div { padding: .26rem 0; }
  .a11y-btn { padding: .4rem .6rem; font-size: .74rem; }
  .a11y-tool { padding: .34rem .3rem; font-size: .64rem; }
}

html[style*="--a11y-font-scale"] body {
  font-size: calc(1rem * var(--a11y-font-scale, 1));
}
html.a11y-high-contrast,
html.a11y-high-contrast body {
  background: #000 !important;
  color: #fff !important;
}
html.a11y-high-contrast a { color: #ffe566 !important; }
html.a11y-high-contrast .price-card,
html.a11y-high-contrast .panel,
html.a11y-high-contrast header,
html.a11y-high-contrast footer,
html.a11y-high-contrast .section {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}
html.a11y-highlight-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
  background: rgba(245, 158, 11, .12);
}

.a11y-cert-hero {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 28px rgba(15,23,42,.06);
}
.a11y-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  margin-bottom: 1.25rem;
}
.a11y-metric-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
  border-top: 3px solid #94a3b8;
}
.a11y-metric-card.is-error { border-top-color: #ef4444; }
.a11y-metric-card.is-contrast { border-top-color: #f97316; }
.a11y-metric-card.is-alert { border-top-color: #3b82f6; }
.a11y-metric-card.is-other { border-top-color: #64748b; }
.a11y-metric-card .lbl { font-size: .8rem; font-weight: 750; color: #64748b; }
.a11y-metric-card.is-error .lbl { color: #ef4444; }
.a11y-metric-card.is-contrast .lbl { color: #f97316; }
.a11y-metric-card.is-alert .lbl { color: #3b82f6; }
.a11y-metric-card .val { font-size: 1.6rem; font-weight: 800; color: #0f172a; margin-top: .2rem; }
.a11y-cert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
}
@media (max-width: 800px) {
  .a11y-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
