/* Accessibilità, consenso cookie, login guidato — WCAG 2.2 / EAA / L. 4/2004 */

.skip-link {
  position: absolute;
  left: 12px;
  top: -56px;
  z-index: 120000;
  padding: .7rem 1.1rem;
  background: var(--yellow);
  color: #111;
  font-weight: 750;
  border-radius: 10px;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 3px solid #fff;
  outline-offset: 2px;
}
:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 3rem;
  align-items: center;
  padding: 4.5rem 0 5rem;
}
.auth-guide { text-align: left; max-width: 36rem; }
.auth-avatar {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  margin-bottom: 1.2rem;
  box-shadow:
    0 0 0 3px rgba(255,225,74,.45),
    0 18px 40px rgba(0,0,0,.4);
}
.auth-guide-title {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 .85rem;
  max-width: 16ch;
}
.auth-guide-lead {
  color: var(--muted);
  margin: 0 0 1.3rem;
  line-height: 1.75;
  max-width: 42ch;
}
.auth-benefits {
  list-style: none;
  display: grid;
  gap: .75rem;
  padding: 0;
  margin: 0;
}
.auth-benefits li {
  padding-left: 1.3rem;
  position: relative;
  color: var(--text);
  line-height: 1.55;
}
.auth-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55rem;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--lime);
}
.auth-card {
  max-width: none;
  margin: 0;
  width: 100%;
}
.auth-card .form { max-width: none; }
.auth-or {
  margin: 1.1rem 0 .85rem;
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
}
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent);
  background: #fff;
  color: #1f1f1f;
  font-weight: 650;
  text-decoration: none;
}
.btn-google:hover { background: #f6f7f9; color: #111; }
.auth-legal-note { margin-top: 1.1rem; font-size: .82rem; }
.consent-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .7rem;
  align-items: start;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.55;
}
.consent-check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .2rem;
  accent-color: var(--green);
}

.legal-wrap { max-width: 72ch; }
.legal-doc h1 { margin-bottom: .6rem; }
.legal-doc h2 {
  max-width: none;
  margin: 2.2rem 0 .8rem;
  font-size: 1.35rem;
}
.legal-doc p, .legal-doc li { line-height: 1.8; }
.legal-doc ul { margin: .6rem 0 1rem 1.2rem; }
.legal-doc li { margin: .35rem 0; }

.consent-banner {
  position: fixed;
  z-index: 110000;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 1.2rem 1.3rem;
  background: #12141f;
  color: var(--text);
  border-top: 2px solid var(--yellow);
  box-shadow: 0 -16px 40px rgba(0,0,0,.4);
}
.consent-banner[hidden] { display: none !important; }
.consent-banner-inner { width: min(100% - 0rem, var(--max)); margin-inline: auto; }
.consent-banner p { margin: 0 0 .85rem; max-width: 72ch; line-height: 1.55; font-size: .92rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: .65rem; }

.a11y-dock {
  position: fixed;
  left: 1.1rem;
  bottom: 1.1rem;
  z-index: 99980;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  max-width: min(22rem, calc(100vw - 2rem));
}
.a11y-toggle {
  min-height: 44px;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #12141f;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.a11y-panel {
  background: #12141f;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.a11y-lead, .a11y-keys {
  font-size: .78rem;
  color: var(--muted);
  margin: 0 0 .75rem;
  line-height: 1.5;
}
.a11y-keys { margin: .75rem 0 0; }
.a11y-grid {
  display: grid;
  gap: .45rem;
}
.a11y-grid button {
  min-height: 44px;
  text-align: left;
  padding: .55rem .8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1018;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.a11y-grid button:hover { border-color: var(--yellow); }
.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[data-a11y="dark"] {
  filter: contrast(1.18) brightness(.86);
}
html[data-a11y="light"] {
  filter: contrast(1.08) brightness(1.22);
}
html[data-a11y-font="112"] { font-size: 112%; }
html[data-a11y-font="125"] { font-size: 125%; }
html[data-a11y-font="140"] { font-size: 140%; }

@media (max-width: 1100px) {
  .auth-split {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding: 2.2rem 0 3rem;
    text-align: center;
  }
  .auth-guide { margin-inline: auto; text-align: center; }
  .auth-avatar { margin-inline: auto; width: 128px; height: 128px; }
  .auth-guide-title, .auth-guide-lead { margin-inline: auto; }
  .auth-benefits { text-align: left; max-width: 42ch; margin-inline: auto; }
  .a11y-dock {
    left: max(.7rem, env(safe-area-inset-left));
    bottom: max(.7rem, env(safe-area-inset-bottom));
  }
}

@media (max-width: 1280px) {
  .a11y-toggle { display: none !important; }
  .a11y-dock {
    pointer-events: none;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: max(4.8rem, env(safe-area-inset-bottom));
    z-index: 86;
    max-width: min(22rem, calc(100vw - 1.4rem));
  }
  .a11y-panel { pointer-events: auto; }
}
