/* Sign in, sign up and password pages. Tokens only. */
body.public-page{background:var(--sf-bg);color:var(--sf-text);font-family:var(--sf-font-body)}
body.public-page .site-header{position:sticky;top:0;z-index:20;height:64px;display:flex;align-items:center;gap:var(--sf-s-6);padding:0 max(24px,env(safe-area-inset-left,0px));background:color-mix(in srgb,var(--sf-bg) 88%,transparent);backdrop-filter:blur(8px);border-bottom:1px solid var(--sf-line)}
body.public-page .site-header>nav{display:flex;gap:var(--sf-s-6);margin-left:auto;font-size:14px;font-weight:500}
body.public-page .site-header>nav a{color:var(--sf-text-muted)}
body.public-page .site-header>nav a:hover{color:var(--sf-text)}
body.public-page .site-header>nav a[aria-current=page]{color:var(--sf-text)}
body.public-page .site-header>.button{display:inline-flex;min-height:36px;padding:0 14px;font-size:13px}
body.public-page .auth-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,440px);gap:clamp(32px,6vw,96px);align-items:center;min-height:calc(100dvh - 64px - 90px);padding-block:48px;max-width:1120px;margin-inline:auto;padding-inline:max(24px,env(safe-area-inset-left,0px))}

/* Left: product preview */
body.public-page .auth-art{background:var(--sf-surface);border:1px solid var(--sf-line);border-radius:var(--sf-r-lg);padding:var(--sf-s-6);display:grid;gap:var(--sf-s-6);align-content:start}
body.public-page .auth-stage{display:grid;place-items:center;aspect-ratio:4/3;border-radius:var(--sf-r-md);background:repeating-conic-gradient(var(--sf-surface-2) 0 25%,var(--sf-bg) 0 50%) 0 0/24px 24px}
body.public-page .auth-stage img{width:min(240px,60%);height:auto;image-rendering:pixelated}
body.public-page .auth-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sf-s-3);counter-reset:step}
body.public-page .auth-steps li{counter-increment:step;font-size:13px;line-height:1.5;color:var(--sf-text-muted)}
body.public-page .auth-steps li::before{content:counter(step);display:grid;place-items:center;width:24px;height:24px;margin-bottom:6px;border-radius:50%;background:var(--sf-accent-soft);color:var(--sf-accent-text);font:600 12px/1 var(--sf-font-mono)}
body.public-page .auth-steps b{display:block;color:var(--sf-text);font-weight:600}

/* Right: form */
body.public-page .auth-card{display:grid;gap:var(--sf-s-4);width:100%;max-width:440px;padding:0;margin:0}
body.public-page .auth-card h1{font:700 clamp(28px,3.4vw,36px)/1.15 var(--sf-font-display);letter-spacing:-.02em;margin:0;text-wrap:balance}
body.public-page .auth-intro{margin:0;font-size:15px;line-height:1.6;color:var(--sf-text-muted)}
body.public-page .auth-card form{display:block}
body.public-page .auth-card fieldset{border:0;padding:0;margin:0;display:grid;gap:var(--sf-s-4);min-width:0}
body.public-page .auth-field{display:grid;gap:6px}
body.public-page .auth-card label{font-size:14px;font-weight:600;color:var(--sf-text);margin:0}
body.public-page .auth-card input{width:100%;min-height:46px;padding:0 14px;font:inherit;font-size:15px;color:var(--sf-text);background:var(--sf-surface);border:1px solid var(--sf-line-strong);border-radius:var(--sf-r-sm)}
body.public-page .auth-card input::placeholder{color:var(--sf-text-subtle)}
body.public-page .auth-card input:focus-visible{outline:3px solid var(--sf-focus);outline-offset:1px;border-color:var(--sf-focus)}
body.public-page .auth-card input[aria-invalid=true]{border-color:var(--sf-danger);box-shadow:0 0 0 1px var(--sf-danger)}
body.public-page .password-field{position:relative}
body.public-page .password-field input{padding-right:72px}
body.public-page .password-toggle{position:absolute;top:50%;right:6px;transform:translateY(-50%);min-height:34px;padding:0 10px;border:0;border-radius:var(--sf-r-sm);background:transparent;color:var(--sf-text-muted);font:600 13px var(--sf-font-body);cursor:pointer}
body.public-page .password-toggle:hover{background:var(--sf-surface-2);color:var(--sf-text)}
body.public-page .field-help{font-size:13px;color:var(--sf-text-muted)}
body.public-page .field-help.is-met{color:var(--sf-success)}
body.public-page .auth-forgot{justify-self:end;margin-top:-6px;font-size:13px;font-weight:600;color:var(--sf-accent-text);text-decoration:underline;text-underline-offset:3px}
body.public-page .auth-card .button{min-height:48px;margin:0;justify-content:center;font-size:15px;gap:10px}
body.public-page .auth-card .button.button-google{background:var(--sf-surface);color:var(--sf-text);border:1px solid var(--sf-line-strong)}
body.public-page .auth-card .button.button-google:hover{background:var(--sf-surface-2);border-color:var(--sf-text-subtle)}
body.public-page .auth-divider{display:flex;align-items:center;gap:12px;margin:0;font-size:13px;color:var(--sf-text-subtle)}
body.public-page .auth-divider::before,body.public-page .auth-divider::after{content:"";flex:1;height:1px;background:var(--sf-line)}
body.public-page .auth-divider[hidden]{display:none}
body.public-page .auth-text-button{justify-self:center;border:0;background:none;padding:6px;color:var(--sf-text-muted);font:600 14px var(--sf-font-body);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
body.public-page .auth-text-button:hover{color:var(--sf-text)}
body.public-page .auth-consent{margin:0;font-size:13px;line-height:1.5;color:var(--sf-text-muted)}
body.public-page .auth-consent a,body.public-page .auth-switch a{color:var(--sf-accent-text);font-weight:600;text-decoration:underline;text-underline-offset:3px}
body.public-page .auth-card .page-status{margin:0;min-height:0;font-size:14px;line-height:1.5;color:var(--sf-text-muted)}
body.public-page .auth-card .page-status:empty{display:none}
body.public-page .auth-card .page-status.is-error{color:var(--sf-danger);background:var(--sf-danger-soft);border-radius:var(--sf-r-sm);padding:10px 12px}
body.public-page .auth-switch{margin:var(--sf-s-2) 0 0;padding-top:var(--sf-s-4);border-top:1px solid var(--sf-line);font-size:14px;color:var(--sf-text-muted)}
body.public-page .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}

/* Footer */
body.public-page .site-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px 24px;padding-block:28px;padding-inline:max(24px,env(safe-area-inset-left,0px));border-top:1px solid var(--sf-line);font-size:13px;color:var(--sf-text-subtle);max-width:none;width:auto;margin:0}
body.public-page .site-footer nav{display:flex;flex-wrap:wrap;gap:8px 20px}
body.public-page .site-footer a{color:var(--sf-text-muted)}

@media (max-width:860px){
body.public-page .auth-layout{grid-template-columns:1fr;min-height:0;padding-block:24px 40px;gap:24px}
body.public-page .auth-card{order:-1;margin-inline:auto}
body.public-page .auth-art{max-width:440px;width:100%;margin-inline:auto;grid-template-columns:96px 1fr;align-items:center;padding:12px;gap:16px}
body.public-page .auth-stage{aspect-ratio:1}
body.public-page .auth-steps{grid-template-columns:1fr;gap:6px}
body.public-page .auth-steps li::before{display:none}
body.public-page .auth-steps li{font-size:13px}
body.public-page .auth-steps b{display:inline}
}
@media (max-width:640px){
  body.public-page .site-header{gap:12px}
  body.public-page .site-header>nav a:not([href="/sign-in"]){display:none}
}
body.public-page .auth-card .button{width:100%}
/* Touch targets (WCAG 2.5.8): header and footer links are at least 44px tall. */
body.public-page .site-footer a,body.public-page .site-header nav a,body.public-page .site-header .brand{display:inline-flex;align-items:center;min-height:44px}
body.public-page .site-footer nav{row-gap:0}
