/* Public forms share the management controls. The animated marks, photography,
   moving blue gradient and athlete orbits are rendered by the existing shells. */
body.td-access {
  --access-action: var(--td-brand);
  --access-action-hover: var(--td-accent);
  --access-on-action: #fff;
  --access-danger: var(--td-error);
  --ink: var(--td-ink);
  --muted: var(--td-mute);
  --blue: var(--td-accent);
  --blue-dark: var(--access-action-hover);
  --edge: var(--td-line);
  --field: var(--td-subtle);
  font: 400 15px/1.5 Outfit, Arial, sans-serif;
  color: var(--td-ink);
  background-color: var(--td-bg);
  -webkit-text-size-adjust: 100%;
}
body.td-access :where(button, input, select, textarea) { font-family: inherit; }
body.td-access :where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--td-brand);
  outline-offset: 2px;
}
body.td-access :is(.access-content h1, .workspace h1, .iscr-card h2) {
  color: var(--td-ink);
  font: 600 clamp(28px, 2.55vw, 36px)/1.17 Outfit, Arial, sans-serif;
  letter-spacing: -.035em;
  text-transform: none;
}
body.td-access :is(.access-lead, .intro, .iscr-sub) {
  color: var(--td-mute);
  font-size: 15px;
  line-height: 1.5;
}
body.td-access :is(.access-field, .iscr-form) label {
  color: var(--td-copy);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
body.td-access :is(.access-field input, .field input, .picker > summary, .picker-search input, .iscr-form input, .iscr-form select, .iscr-form textarea) {
  box-sizing: border-box;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--td-field);
  border-radius: 8px;
  background-color: var(--td-panel);
  color: var(--td-ink);
  box-shadow: var(--td-shadow);
  font-size: 15px;
  line-height: 1.45;
}
body.td-access :is(.access-field input, .picker-search input, .iscr-form input, .iscr-form textarea)::placeholder {
  color: var(--td-mute);
  opacity: 1;
}
body.td-access :is(.access-field input, .field input, .picker-search input, .iscr-form input, .iscr-form select, .iscr-form textarea):focus,
body.td-access .picker[open] > summary {
  outline: none;
  border-color: var(--td-brand);
  background-color: var(--td-panel);
  box-shadow: var(--td-ring);
}
body.td-access :is(.access-field input, .field input, .iscr-form input):is([aria-invalid="true"], :focus:user-invalid) {
  border-color: var(--access-danger);
  box-shadow: 0 0 0 3px rgb(217 45 32 / 12%);
}
body.td-access :is(.access-primary, .actions .primary, .iscr-nav .btn) {
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--access-action);
  color: var(--access-on-action);
  box-shadow: var(--td-shadow);
  font: 500 15px/22px Outfit, Arial, sans-serif;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: none;
}
body.td-access :is(.access-primary, .actions .primary, .iscr-nav .btn):hover:not(:disabled) {
  background: var(--access-action-hover);
  color: var(--access-on-action);
  opacity: 1;
}
body.td-access :is(.access-primary, .actions .primary, .iscr-nav .btn):disabled { opacity: .65; }
body.td-access :is(.access-content a:not(.access-primary), .logo-link, .text-button, .access-link a, .iscr-check a) {
  color: var(--td-accent);
  font-weight: 500;
  text-underline-offset: 3px;
}
body.td-access .password-eye-wrap .password-eye {
  width: 44px;
  height: 44px;
  color: var(--td-mute);
}
body.td-access .password-eye-wrap .password-eye:hover {
  background: var(--td-subtle);
  color: var(--td-copy);
}

/* Login, password recovery, company chooser and invitation acceptance. */
body.td-access .access-column { background: var(--td-panel); }
body.td-access .access-content { max-width: 400px; }
body.td-access .access-field label { margin-bottom: 6px; }
body.td-access .access-register, body.td-access .access-footer { color: var(--td-mute); }
body.td-access .access-forgot, body.td-access .access-back { font-size: 14px; }
body.td-access .sport-caption { font-weight: 600; letter-spacing: -.035em; }
body.td-access #gamuvo-companies :is(button, a), body.td-access .club-choice {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--td-field);
  border-radius: 8px;
  background: var(--td-panel);
  color: var(--td-copy);
  font: 500 15px/22px Outfit, Arial, sans-serif;
  box-shadow: var(--td-shadow);
}
body.td-access #gamuvo-companies :is(button, a):hover, body.td-access .club-choice:hover {
  border-color: var(--td-brand);
  background: var(--td-tint);
  color: var(--td-accent);
  text-decoration: none;
}
body.td-access .access-message:not(:empty),
body.td-access #recupero:has([aria-invalid="true"], #request-new-recovery:not([hidden])) #recovery-message {
  color: var(--access-danger);
}
body.td-access #recovery-message { color: var(--td-copy); }

/* Club onboarding. Geometry for the circles and portraits stays in wizard.css. */
body.td-access .setup {
  background-color: var(--td-panel);
  border-color: var(--td-line);
  border-radius: 16px;
}
body.td-access .rail { border-radius: 15px 0 0 15px; }
body.td-access .steps h2 { color: var(--td-mute); font-size: 11px; font-weight: 500; letter-spacing: .09em; }
body.td-access .step-link { border-radius: 8px; }
body.td-access .step-link[aria-current="step"] { background: var(--td-panel); box-shadow: var(--td-shadow); }
body.td-access .step-link[aria-current="step"] .step-state { border-color: var(--td-brand); }
body.td-access .step-link[aria-current="step"] .step-state::before {
  background: linear-gradient(90deg, transparent 50%, var(--td-brand) 50%);
}
body.td-access .step-text strong, body.td-access .group-title strong { font-weight: 600; }
body.td-access .field input { padding: 17px 12px 4px; }
body.td-access .field label { color: var(--td-mute); font-size: 14px; }
body.td-access .field:focus-within label, body.td-access .field:has(input:not(:placeholder-shown)) label {
  top: 4px;
  color: var(--td-mute);
  font-size: 11px;
  font-weight: 500;
}
body.td-access .credential-error { color: var(--access-danger); }
body.td-access .help-icon, body.td-access .sport-option[aria-pressed="true"] {
  background: var(--td-tint);
  color: var(--td-accent);
}
body.td-access .help-popover, body.td-access .picker-panel {
  border-color: var(--td-line);
  border-radius: 12px;
  background: var(--td-panel);
  box-shadow: var(--td-menu-shadow);
}
body.td-access .sport-option { min-height: 44px; border-radius: 8px; }
body.td-access .picker-search input { min-height: 44px; }
body.td-access .check-list label { min-height: 44px; color: var(--td-copy); font-size: 14px; }
body.td-access .check-list input { accent-color: var(--access-action); }
body.td-access .group {
  overflow: clip;
  border-color: var(--td-line);
  border-radius: 12px;
  background: var(--td-panel);
  box-shadow: var(--td-shadow);
}
body.td-access .group > summary { border-radius: 11px; }
body.td-access .group > summary:focus-visible { outline-offset: -2px; }
body.td-access .group[open] > summary { background: var(--td-bg); }
body.td-access .group .tile { border-radius: 8px; }
body.td-access .actions .back, body.td-access .logo-remove { color: var(--td-mute); }
body.td-access .mobile-progress { min-height: 44px; border-color: var(--td-field); box-shadow: var(--td-shadow); }
body.td-access #demo-dialog {
  --demo-bg: var(--td-panel);
  --demo-text: var(--td-ink);
  --demo-muted: var(--td-mute);
  --demo-field: var(--td-subtle);
  --demo-border: var(--td-field);
  --demo-accent: var(--td-accent);
  border-color: var(--td-line);
  border-radius: 16px;
  box-shadow: var(--td-menu-shadow);
}
body.td-access #demo-dialog::backdrop {
  background: rgb(16 24 40 / 55%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
body.td-access #demo-dialog h2 { font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -.025em; }
body.td-access #demo-dialog :is(input:not([type=radio]), select) {
  border-radius: 8px;
  background: var(--td-panel);
  box-shadow: var(--td-shadow);
}
body.td-access #demo-dialog :is(input:not([type=radio]), select):focus {
  border-color: var(--td-brand);
  outline: none;
  box-shadow: var(--td-ring);
}
body.td-access #demo-dialog :is(.demo-primary, .demo-secondary) { border-radius: 8px; font-weight: 500; }
body.td-access #demo-dialog .demo-primary { background: var(--access-action); border-color: transparent; color: white; }
body.td-access #demo-dialog .demo-primary:hover:not(:disabled) { background: var(--access-action-hover); }

/* Public link for athlete registration. The original form creates its fields
   dynamically and reuses the same card for errors and confirmation. */
body.td-access:has(> .iscr-card) {
  min-height: 100svh;
  margin: 0;
  padding-inline: 16px;
  background: var(--td-bg);
}
body.td-access > div:has(> .brand-logo) .brand-logo { margin-inline: auto; object-fit: contain; }
body.td-access > div > .brand-logo[src="/gamuvo/assets/gamuvo-still.png"] {
  content: url("/gamuvo/assets/gamuvo-multisport-black.svg");
}
body.td-access .iscr-card {
  width: 100%;
  max-width: 580px;
  box-sizing: border-box;
  padding: clamp(20px, 3.5vw, 32px);
  border: 1px solid var(--td-line);
  border-radius: 16px;
  background: var(--td-panel);
  box-shadow: var(--td-shadow);
  color: var(--td-ink);
}
body.td-access .iscr-card :is(h2, h3, label) { font-family: inherit; }
body.td-access .iscr-card h2 { overflow-wrap: anywhere; }
body.td-access .iscr-card h3 { color: var(--td-ink); font-size: 18px; font-weight: 600; line-height: 1.4; letter-spacing: -.015em; }
body.td-access .iscr-form { gap: 14px 16px; }
body.td-access .iscr-form > div { min-width: 0; }
body.td-access .iscr-form :is(input, select, textarea) { width: 100%; padding: 10px 12px; }
body.td-access .iscr-form select { appearance: auto; }
body.td-access .iscr-form textarea { resize: vertical; }
body.td-access :is(.iscr-passo, .iscr-form .hint, .iscr-card .loading-row) { color: var(--td-mute); }
body.td-access .iscr-passi span { background: var(--td-subtle); }
body.td-access .iscr-passi .fatto { background: var(--td-brand); }
body.td-access .iscr-check { color: var(--td-copy); }
body.td-access .iscr-check input { accent-color: var(--access-action); }
body.td-access .iscr-err { color: var(--access-danger); }
body.td-access .iscr-avviso { background: #fffaeb; color: #93370d; }
body.td-access .iscr-ok .segno { background: #ecfdf3; color: #067647; }
body.td-access .iscr-nav .btn.secondary {
  border-color: var(--td-field);
  background: var(--td-panel);
  color: var(--td-copy);
}
body.td-access .iscr-nav .btn.secondary:hover:not(:disabled) { background: var(--td-subtle); color: var(--td-ink); }
html[data-theme="dark"] body.td-access:has(> .iscr-card) { --access-on-action: #101828; }
html[data-theme="dark"] body.td-access > div > .brand-logo[src="/gamuvo/assets/gamuvo-still.png"] { filter: invert(1); }
html[data-theme="dark"] body.td-access .iscr-avviso { background: #3a2c1b; color: #fedf89; }
html[data-theme="dark"] body.td-access .iscr-ok .segno { background: #12352d; color: #a6f4c5; }

/* The guide keeps its photographic header and dark surface in either theme. */
body:is(.td-pilot, .td-standalone) dialog.gamuvo-starter-guide {
  --guide-line: #3c4554;
  --guide-muted: #c0c8d5;
  --guide-blue: #a4bcfd;
  border-radius: 20px;
  font-family: Outfit, Arial, sans-serif;
}
body:is(.td-pilot, .td-standalone) .gamuvo-starter-guide .starter-guide-body h2 {
  font: 600 clamp(22px, 4.6vw, 28px)/1.2 Outfit, Arial, sans-serif;
  letter-spacing: -.025em;
}
body:is(.td-pilot, .td-standalone) .gamuvo-starter-guide :is(.starter-guide-symbol, .starter-guide-step-icon) {
  border-radius: 8px;
  background: #2a3550;
  color: var(--guide-blue);
}
body:is(.td-pilot, .td-standalone) .gamuvo-starter-guide .starter-guide-actions button {
  font: 500 15px/20px Outfit, Arial, sans-serif;
}
body:is(.td-pilot, .td-standalone) .gamuvo-starter-guide .starter-guide-primary {
  border-color: transparent;
  background: #465fff;
  color: white;
}
body:is(.td-pilot, .td-standalone) .gamuvo-starter-guide .starter-guide-primary:hover:not(:disabled) { background: #3641f5; filter: none; }
body:is(.td-pilot, .td-standalone) .gamuvo-starter-guide .starter-guide-close { border-color: #475467; background: #27313f; color: #f2f4f7; }
body:is(.td-pilot, .td-standalone) .gamuvo-starter-guide[data-guide="rimozione"] .starter-guide-primary { background: #b42318; color: white; }
body:is(.td-pilot, .td-standalone) .gamuvo-starter-guide[data-guide="rimozione"] .starter-guide-primary:hover:not(:disabled) { background: #912018; }
body:is(.td-pilot, .td-standalone) .gamuvo-starter-guide .starter-guide-actions button:focus-visible { outline-color: #a4bcfd; }

@media (prefers-reduced-motion: reduce) {
  body.td-access > div > .brand-logo[src="/gamuvo/assets/gamuvo-still.png"] { content: url("/gamuvo/assets/mark-football-black.svg"); }
}

@media (max-width: 780px) {
  body.td-access .setup, body.td-access .rail { border-radius: 0; }
  body.td-access .setup .help > summary { background: var(--td-panel); box-shadow: 0 0 0 1px var(--td-line); }
  body.td-access .setup .help-icon { background: transparent; }
  body.td-access :is(.access-field input, .field input, .picker-search input, .iscr-form input, .iscr-form select, .iscr-form textarea) { font-size: 16px; }
}
@media (max-width: 360px) {
  body.td-access .iscr-card { padding: 18px 15px; }
}
