/* Welcome, returning-member sign-in and account setup share the app's tokens.
   Keep authentication, hidden-state handling and the existing card artwork intact. */
body[data-ui-theme="clean-kelly"] :is(#authGate, #legalGate) {
  --green: var(--ck-action);
  --ink: var(--ck-text);
  --muted: var(--ck-muted);
  --line: var(--ck-border);
  background: var(--ck-surface);
  color: var(--ck-text);
  font-family: var(--font-family);
  line-height: 1.5;
}
body[data-ui-theme="clean-kelly"] #authGate::before,
body[data-ui-theme="clean-kelly"] #authGate::after { content: none; }
/* A tall welcome/login card must start inside the scrollable viewport. */
body[data-ui-theme="clean-kelly"] #authGate { place-items: start center; }
body[data-ui-theme="clean-kelly"] :is(.auth-card, .legal-card) {
  background: var(--ck-canvas);
  color: var(--ck-text);
  border: 1px solid var(--ck-border);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgb(15 23 42 / 10%);
}
body[data-ui-theme="clean-kelly"] .auth-brand-header { border-color: var(--ck-border); }
body[data-ui-theme="clean-kelly"] .auth-brand-identity img.auth-brand-wordmark {
  width: min(230px, 100%);
  height: auto;
  max-height: 54px;
  filter: none;
}
body[data-ui-theme="clean-kelly"] .auth-affiliation {
  background: var(--ck-surface);
  border-color: var(--ck-border);
  color: var(--ck-text);
}
body[data-ui-theme="clean-kelly"] .auth-affiliation-label { color: var(--ck-muted); }
body[data-ui-theme="clean-kelly"] .auth-mascot { border-color: var(--ck-border); }
body[data-ui-theme="clean-kelly"] .auth-card :is(h1, #authWelcomeTitle),
body[data-ui-theme="clean-kelly"] .legal-card h1 {
  color: var(--ck-action);
  font-family: var(--font-family);
  font-weight: 600;
  line-height: 1.1;
  text-shadow: none;
  letter-spacing: -.035em;
}
body[data-ui-theme="clean-kelly"] .auth-card #authWelcomeTitle .auth-welcome-line {
  font-size: .5em;
  line-height: 1.5;
  letter-spacing: -.01em;
  color: var(--ck-muted);
}
body[data-ui-theme="clean-kelly"] .auth-benefits li { font-size: 1rem; }
body[data-ui-theme="clean-kelly"] .auth-benefits li span,
body[data-ui-theme="clean-kelly"] :is(.auth-view, .legal-card) > .eyebrow { color: var(--ck-action); }
body[data-ui-theme="clean-kelly"] :is(.auth-privacy-note, .auth-existing-note, .auth-divider) {
  color: var(--ck-muted);
  font-size: .875rem;
  line-height: 1.5;
}
body[data-ui-theme="clean-kelly"] .auth-inline-link,
body[data-ui-theme="clean-kelly"] .legal-card a { color: var(--ck-action); }
body[data-ui-theme="clean-kelly"] .auth-inline-link:hover { color: var(--ck-hover); }
body[data-ui-theme="clean-kelly"] .auth-divider::before,
body[data-ui-theme="clean-kelly"] .auth-divider::after { background: var(--ck-border); }
body[data-ui-theme="clean-kelly"] :is(.auth-card, .legal-card) input:not([type="checkbox"]) {
  background: var(--ck-surface);
  color: var(--ck-text);
  border: 1px solid var(--ck-border);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 1rem;
  min-height: 48px;
}
body[data-ui-theme="clean-kelly"] :is(.auth-card .auth-provider, #legalAccept) {
  background: var(--ck-action);
  color: var(--ck-canvas);
  border: 1px solid var(--ck-action);
  border-radius: var(--radius-md);
  min-height: 48px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: var(--ck-shadow);
}
body[data-ui-theme="clean-kelly"] :is(.auth-card .auth-provider, #legalAccept):hover {
  background: var(--ck-hover);
  border-color: var(--ck-hover);
}
body[data-ui-theme="clean-kelly"] :is(#authGate, #legalGate) :is(button, a, input):focus-visible {
  outline: 3px solid var(--ck-action);
  outline-offset: 3px;
}
body[data-ui-theme="clean-kelly"] .legal-check input { accent-color: var(--ck-action); }
@media (max-width: 680px) {
  body[data-ui-theme="clean-kelly"] .auth-brand-identity img.auth-brand-wordmark { width: min(180px, 100%); }
  body[data-ui-theme="clean-kelly"] .auth-card #authWelcomeTitle { font-size: clamp(1.85rem, 8.8vw, 2.85rem); }
  body[data-ui-theme="clean-kelly"] .auth-affiliation-network > span:last-child { font-size: .65rem; }
  body[data-ui-theme="clean-kelly"] .auth-affiliation-label { font-size: .6rem; }
}
