
:root {
  color-scheme: light;
  --cms-accent: #7356cf;
  --cms-primary: #765acb;
  --cms-primary-hover: #6449b4;
  --cms-accent-soft: #f0eafb;
  --cms-surface: #fff;
  --cms-surface-muted: #faf9fd;
  --cms-border: #e3e5ed;
  --cms-text: #253044;
  --cms-text-muted: #686278;
  font: 14px/1.6 system-ui, sans-serif;
  color: var(--cms-text);
  background: #f6f5fa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body { margin: 0; min-width: 280px; min-height: 100dvh; background: radial-gradient(ellipse at 50% 0%, #ebe5fa 0, transparent 65%); }
.auth-layout { width: min(100%, 536px); min-height: 100dvh; margin: 0 auto; padding: 48px 24px 28px; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 11px; font-size: 21px; font-weight: 720; letter-spacing: -.7px; }
.auth-mark { display: inline-block; width: 34px; height: 34px; border-radius: 10px; background: var(--cms-accent); color: white; text-align: center; font-size: 28px; font-weight: 700; line-height: 30px; }
.auth-card { min-width: 0; padding: 36px; border: 1px solid var(--cms-border); border-radius: 24px; background: var(--cms-surface); box-shadow: 0 12px 40px #36205b08, 0 2px 6px #36205b04; }
.auth-heading { margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--cms-accent); font-size: 11px; font-weight: 750; letter-spacing: 1.5px; text-transform: uppercase; }
h1 { margin: 0 0 10px; font-size: 28px; line-height: 1.2; font-weight: 720; letter-spacing: -.8px; }
h2 { margin: 0 0 12px; font-size: 16px; line-height: 1.45; font-weight: 650; }
p { margin: 0 0 16px; color: var(--cms-text-muted); overflow-wrap: anywhere; }
.auth-heading p:last-child { margin: 0; }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend { padding: 0; margin-bottom: 16px; font-weight: 650; }
form { display: grid; gap: 18px; margin: 0; }
label { display: grid; gap: 7px; color: var(--cms-text); font-size: 13px; font-weight: 600; }
input, button, select { font: inherit; }
input:not([type="checkbox"]), select { width: 100%; min-width: 0; min-height: 48px; padding: 11px 14px; color: var(--cms-text); border: 1px solid #dcdce8; border-radius: 11px; background: var(--cms-surface-muted); }
input::placeholder { color: #837e91; font-weight: 400; }
input:focus { border-color: var(--cms-accent); background: white; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 11px 16px; border: 1px solid transparent; border-radius: 11px; background: var(--cms-primary); color: white; text-decoration: none; text-align: center; font-size: 14px; font-weight: 650; line-height: 1.5; cursor: pointer; transition: background-color 140ms, border-color 140ms, box-shadow 140ms; overflow-wrap: anywhere; }
button:hover:not(:disabled), .button:hover { background: var(--cms-primary-hover); color: white; }
button:disabled, fieldset:disabled button { opacity: .5; cursor: default; }
.secondary { background: white; color: var(--cms-text); border-color: var(--cms-border); }
.secondary:hover:not(:disabled) { background: var(--cms-surface-muted); color: var(--cms-text); border-color: #c8bce9; }
.quiet { background: transparent; color: var(--cms-text-muted); }
.quiet:hover:not(:disabled) { background: var(--cms-surface-muted); color: var(--cms-text); }
a { color: var(--cms-accent); text-underline-offset: 4px; }
a:hover { color: var(--cms-primary-hover); }
a:not(.button) { display: inline-flex; align-items: center; min-height: 44px; }
:is(button, a, input, select, summary):focus-visible { outline: 3px solid #a895ef; outline-offset: 3px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--cms-text-muted); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--cms-border); }
.auth-secondary { margin: 18px 0 0; text-align: center; font-size: 12px; }
.auth-footer { display: flex; justify-content: center; align-items: center; gap: 7px; color: var(--cms-text-muted); font-size: 12px; text-align: center; }
.auth-footer svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; flex-shrink: 0; }
[role="status"] { margin: 20px 0 0; padding: 13px 15px; border: 1px solid #e3d9f6; border-radius: 12px; background: #f6f2fd; color: #59447d; font-size: 13px; line-height: 1.6; }
[role="status"]:empty { display: none; }
[role="status"][data-tone="error"] { border-color: #f0d6d8; background: #fff5f5; color: #8c3841; }
.auth-actions { display: grid; gap: 10px; margin-top: 20px; }
.auth-actions p { margin: 0; }
section { min-width: 0; margin: 22px 0; padding: 20px; border: 1px solid var(--cms-border); border-radius: 14px; background: var(--cms-surface-muted); }
section form + form { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--cms-border); }
section button + button { margin-top: 10px; }
section p { font-size: 13px; }
details { margin-top: 20px; }
summary { min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--cms-text-muted); cursor: pointer; font-size: 13px; }
summary::before { content: '+'; color: var(--cms-accent); font-size: 18px; }
details[open] summary::before { content: '−'; }
code, pre { display: block; max-width: 100%; margin: 0; padding: 12px; border: 1px solid #ded5ee; border-radius: 10px; background: white; color: #4a3a67; font: 13px/1.8 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
#code-list { margin-bottom: 16px; }
#projects { display: grid; gap: 12px; margin-top: 20px; }
.project-option { display: grid; justify-content: stretch; justify-items: start; gap: 3px; padding: 15px 18px; text-align: left; background: var(--cms-surface-muted); border-color: var(--cms-border); color: var(--cms-text); }
.project-option:hover:not(:disabled) { color: var(--cms-text); border-color: #c8bce9; background: #f3eefb; }
.project-option strong { font-size: 15px; }
.project-option small { color: var(--cms-text-muted); font-size: 11px; font-weight: 450; }
#choices h2, #selected-site { overflow-wrap: anywhere; }
#choices label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; font-size: 13px; font-weight: 450; }
#choices input { width: 17px; height: 17px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--cms-accent); }
#choices br { display: none; }
#selected-scopes { margin: 12px 0 22px; padding-left: 20px; color: var(--cms-text-muted); }
@media (max-width: 540px) {
  .auth-layout { padding: 28px 16px 24px; gap: 22px; }
  .auth-card { padding: 26px 22px; border-radius: 20px; }
  h1 { font-size: 25px; }
  section { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
