/*
 * Sign in, sign up and the other account screens (layouts.guest), in the v2
 * look. Self-contained on purpose: the tokens are copied from home.css rather
 * than depending on it, because home.css also carries the homepage's layout
 * rules and a change there must not move a sign-in form.
 *
 * Plain CSS, not Tailwind: nothing here is in the Vite build, so there is no
 * "class no view used before does not exist" trap (see CLAUDE.md, Deployment).
 *
 * Themes key on the <html> class written by components/theme-init and the
 * header toggle: html.dark is dark, anything else is light.
 */

@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/figtree-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/figtree-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/figtree-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/figtree-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree Fallback'; src: local('Arial'), local('Helvetica'), local('Liberation Sans'); size-adjust: 96%; ascent-override: 99%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: 'Bricolage Fallback'; src: local('Arial Bold'), local('Arial'), local('Liberation Sans'); size-adjust: 102%; ascent-override: 91%; descent-override: 26%; line-gap-override: 0%; }

:root {
    --au-font: 'Figtree', 'Figtree Fallback', ui-sans-serif, system-ui, sans-serif;
    --au-display: 'Bricolage Grotesque', 'Bricolage Fallback', 'Figtree', ui-sans-serif, sans-serif;
    --au-ease: cubic-bezier(.2, .8, .2, 1);

    --au-bg: #F4F1EC;
    --au-surface: #FFFDF9;
    --au-surface-inset: #F8F8F8;
    --au-surface-2: #F2EEE7;
    --au-border: #E6E0D6;
    --au-border-strong: #D4D4D4;
    --au-text: #1E2430;
    --au-text-muted: #555C68;
    --au-text-faint: #6B6F73;
    --au-cta: #2566C9;
    --au-cta-hover: #1E58B0;
    --au-cta-text: #FFFFFF;
    --au-brand: #E8650A;
    --au-ok: #116B37;
    --au-ok-soft: rgba(17, 107, 55, .08);
    --au-ok-edge: rgba(17, 107, 55, .30);
    --au-danger: #B42323;
    --au-danger-soft: rgba(180, 35, 35, .06);
    --au-danger-edge: rgba(180, 35, 35, .28);
    --au-notice-bg: #FFF6E5;
    --au-notice-text: #7A4B00;
    --au-focus: #2566C9;
    --au-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .06);
    color-scheme: light;
}

html.dark {
    --au-bg: #0A0D13;
    --au-surface: #121722;
    --au-surface-inset: #0E131C;
    --au-surface-2: #1A2130;
    --au-border: #232B3B;
    --au-border-strong: #2C3547;
    --au-text: #F3F5F9;
    --au-text-muted: #A3ACBD;
    --au-text-faint: #8A94A7;
    --au-cta: #2F74DB;
    --au-cta-hover: #3B80E6;
    --au-cta-text: #FFFFFF;
    --au-brand: #FF7A1A;
    --au-ok: #4ADE80;
    --au-ok-soft: rgba(74, 222, 128, .10);
    --au-ok-edge: rgba(74, 222, 128, .30);
    --au-danger: #F87171;
    --au-danger-soft: rgba(248, 113, 113, .08);
    --au-danger-edge: rgba(248, 113, 113, .32);
    --au-notice-bg: rgba(245, 180, 60, .10);
    --au-notice-text: #F5C77A;
    --au-focus: #8FB8FF;
    --au-shadow: none;
    color-scheme: dark;
}

/* theme-init paints html.dark body with !important; this layout owns its ground. */
html.dark body, html body { background-color: var(--au-bg) !important; }
[x-cloak] { display: none !important; }

.au { font-family: var(--au-font); color: var(--au-text); background: var(--au-bg); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; line-height: 1.5; margin: 0; }
:where(.au) *, :where(.au) *::before, :where(.au) *::after { box-sizing: border-box; }
:where(.au) a { color: inherit; }
:where(.au) button, :where(.au) input { font: inherit; color: inherit; }
.au :focus-visible { outline: 2px solid var(--au-focus); outline-offset: 2px; }
.au-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Light and dark artwork pairs: one of each is shown, chosen by the html class. */
.au-on-light { display: none !important; }
html:not(.dark) .au-on-dark { display: none !important; }
html:not(.dark) .au-on-light { display: inline-block !important; }

/* ------------------------------------------------------------ chrome */
.au-header { border-bottom: 1px solid var(--au-border); background: var(--au-surface); }
.au-header__in { max-width: 1120px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.au-header__logo { display: inline-flex; align-items: center; }
.au-header__logo img { height: 32px; width: auto; }
.au-iconbtn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--au-border); border-radius: 10px; background: transparent; color: var(--au-text-muted); cursor: pointer; transition: color .15s var(--au-ease), border-color .15s var(--au-ease); }
.au-iconbtn:hover { color: var(--au-text); border-color: var(--au-border-strong); }
.au-iconbtn svg { width: 18px; height: 18px; }
.au-iconbtn .au-sun { display: none; }
html.dark .au-iconbtn .au-sun { display: block; }
html.dark .au-iconbtn .au-moon { display: none; }

.au-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 28px 16px 40px; }
@media (min-width: 640px) { .au-main { align-items: center; padding: 48px 16px; } }
.au-col { width: 100%; max-width: 420px; }

.au-footer { border-top: 1px solid var(--au-border); }
.au-footer__in { max-width: 1120px; margin: 0 auto; padding: 18px 16px; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--au-text-faint); }
.au-footer nav { display: flex; gap: 18px; }
.au-footer a { text-decoration: none; color: var(--au-text-muted); }
.au-footer a:hover { color: var(--au-text); }

/* -------------------------------------------------------------- card */
/* Edge to edge on a phone, as the apps' sign-in sheet is; a card above it. */
.au-card { padding: 0; }
@media (min-width: 640px) {
    .au-card { background: var(--au-surface); border: 1px solid var(--au-border); border-radius: 20px; padding: 32px; box-shadow: var(--au-shadow); }
}

.au-mark { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 20px; background: #0A0D13; border: 1px solid #2C3547; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 24px rgba(255, 122, 26, .22); }
.au-mark img { width: 40px; height: 40px; }
.au-badge { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.au-badge svg { width: 28px; height: 28px; }
.au-badge--ok { background: var(--au-ok-soft); color: var(--au-ok); }
.au-badge--warn { background: var(--au-notice-bg); color: var(--au-notice-text); }
.au-badge--plain { background: var(--au-surface-2); color: var(--au-text-muted); border-radius: 16px; }

.au-title { font-family: var(--au-display); font-weight: 800; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; text-align: center; margin: 0; color: var(--au-text); }
.au-lede { margin: 8px 0 0; text-align: center; font-size: 15px; color: var(--au-text-muted); }
.au-lede strong { color: var(--au-text); font-weight: 600; word-break: break-word; }
.au-head { margin-bottom: 22px; }

/* ----------------------------------------------------------- notices */
.au-alert { border-radius: 12px; padding: 11px 14px; margin: 0 0 16px; font-size: 14px; font-weight: 500; border: 1px solid; }
.au-alert p { margin: 0; }
.au-alert p + p { margin-top: 4px; }
.au-alert--error { background: var(--au-danger-soft); border-color: var(--au-danger-edge); color: var(--au-danger); }
.au-alert--ok { background: var(--au-ok-soft); border-color: var(--au-ok-edge); color: var(--au-ok); }
.au-alert--note { background: var(--au-surface-inset); border-color: var(--au-border); color: var(--au-text-muted); font-weight: 400; line-height: 1.55; }

/* ----------------------------------------------------------- buttons */
.au-stack { display: grid; gap: 10px; }
.au-btn { position: relative; width: 100%; min-height: 52px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 14px; border: 1px solid transparent; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; background: transparent; transition: background-color .15s var(--au-ease), border-color .15s var(--au-ease), transform .12s var(--au-ease), opacity .15s; -webkit-tap-highlight-color: transparent; }
.au-btn:active { transform: scale(.985); }
.au-btn svg { flex-shrink: 0; }
.au-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
/* Apple is white with a hairline on both themes, as the apps draw it. */
.au-btn--apple { background: #FFFFFF; color: #000000 !important; border-color: rgba(0, 0, 0, .14); }
.au-btn--apple:hover { background: #F5F5F5; }
.au-btn--google { background: var(--au-surface); color: var(--au-text) !important; border-color: var(--au-border-strong); }
.au-btn--google:hover { border-color: var(--au-text-faint); }
.au-btn--outline { border-color: var(--au-border-strong); color: var(--au-text) !important; }
.au-btn--outline:hover { background: var(--au-surface-2); }
.au-btn--cta { background: var(--au-cta); color: var(--au-cta-text) !important; }
.au-btn--cta:hover { background: var(--au-cta-hover); }
.au-btn--quiet { min-height: 44px; font-size: 15px; font-weight: 600; color: var(--au-text-muted) !important; }
.au-btn--quiet:hover { color: var(--au-text) !important; }
.au-spin { width: 16px; height: 16px; animation: au-spin .8s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .au-spin { animation-duration: 2.4s; } .au-btn:active { transform: none; } }

.au-legal { margin: 14px 0 0; text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--au-text-faint); }
.au-legal a, .au-link { color: var(--au-text-muted); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.au-legal a:hover, .au-link:hover { color: var(--au-text); }

.au-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; font-size: 12.5px; font-weight: 600; color: var(--au-text-faint); }
.au-divider::before, .au-divider::after { content: ''; flex: 1; height: 1px; background: var(--au-border); }

/* ------------------------------------------------------------- forms */
.au-form { display: grid; gap: 16px; }
.au-field label, .au-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--au-text); }
.au-input { width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--au-border-strong); background: var(--au-surface-inset); color: var(--au-text); font-size: 15px; outline: none; transition: border-color .15s var(--au-ease), box-shadow .15s var(--au-ease); -webkit-appearance: none; appearance: none; }
.au-input::placeholder { color: var(--au-text-faint); opacity: 1; }
.au-input:focus { border-color: var(--au-cta); box-shadow: 0 0 0 3px color-mix(in srgb, var(--au-cta) 22%, transparent); }
.au-input.is-invalid { border-color: var(--au-danger); }
/* iOS Safari zooms into a focused control under 16px and never zooms back. */
@media (max-width: 767px) { .au-input { font-size: 16px; } }
.au-pw { position: relative; }
.au-pw .au-input { padding-right: 64px; }
.au-pw__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--au-text-muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.au-pw__toggle:hover { color: var(--au-text); background: var(--au-surface-2); }
.au-field__error { margin: 6px 0 0; font-size: 13px; font-weight: 500; color: var(--au-danger); }

.au-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.au-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; line-height: 1.5; color: var(--au-text-muted); }
.au-check input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--au-cta); cursor: pointer; }
.au-check a { color: var(--au-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.au-check--inline { align-items: center; }
.au-check--inline input { margin: 0; width: 18px; height: 18px; }
.au-muted-link { font-size: 14px; font-weight: 600; color: var(--au-text-muted) !important; text-decoration: none; }
.au-muted-link:hover { color: var(--au-text) !important; text-decoration: underline; }

.au-meter { margin-top: 10px; }
.au-meter__bars { display: flex; gap: 4px; margin-bottom: 8px; }
.au-meter__bars span { flex: 1; height: 4px; border-radius: 2px; background: var(--au-surface-2); transition: background-color .25s; }
.au-meter__bars span.is-1 { background: #E5484D; }
.au-meter__bars span.is-2 { background: #F08C2E; }
.au-meter__bars span.is-3 { background: #E0B400; }
.au-meter__bars span.is-4 { background: #2EA66B; }
.au-meter__checks { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; font-weight: 600; color: var(--au-text-faint); }
.au-meter__checks .is-met { color: var(--au-ok); }

.au-foot { margin: 20px 0 0; text-align: center; font-size: 14.5px; color: var(--au-text-muted); }
.au-foot a { color: var(--au-text); font-weight: 700; text-decoration: none; }
.au-foot a:hover { text-decoration: underline; }
.au-note { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--au-text-faint); }
.au-aside { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--au-text-faint); }
.au-aside a { color: var(--au-text-muted); font-weight: 600; }
.au-inline-form { display: inline; }
.au-inline-form button { border: 0; background: none; padding: 0; cursor: pointer; }
