/* Sign-in (hosted private beta) — the screen ui/public/auth.mjs renders.
   Presentation only (GTJ-AUTH-UI-REFRESH B20). Which methods appear, what each
   control does and every sentence the server returns are decided in auth.mjs
   and ui/hosted-auth.mjs, never here. Loaded after v3.css; the screen rules
   hang off .auth-page / .auth-card so none of them reach the workspace. */

/* While signed out the workspace top bar is not shown at all. `hidden` alone
   is not enough: v3.css gives .journey-nav and .topbar-actions a display. */
body.auth-screen .topbar { display: none; }

.auth-page {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 56px 16px;
  overflow: hidden;
  overflow: clip;
  background:
    radial-gradient(circle at 6% 10%, rgb(23 107 89 / .11) 0, rgb(23 107 89 / 0) 32%),
    radial-gradient(circle at 94% 92%, rgb(52 120 186 / .13) 0, rgb(52 120 186 / 0) 34%),
    radial-gradient(circle at 90% 8%, rgb(52 120 186 / .07) 0, rgb(52 120 186 / 0) 20%),
    var(--wash);
}
/* Decoration: a soft ring top-right and a dot patch bottom-left. */
.auth-page::before, .auth-page::after { position: absolute; z-index: -1; pointer-events: none; content: ""; }
.auth-page::before { top: -110px; right: -90px; width: 320px; height: 320px; border: 1px solid rgb(23 107 89 / .14); border-radius: 50%; box-shadow: inset 0 0 0 36px rgb(23 107 89 / .035); }
.auth-page::after { bottom: 56px; left: 5%; width: 200px; height: 136px; background-image: radial-gradient(rgb(52 120 186 / .3) 1.2px, transparent 1.6px); background-size: 16px 16px; -webkit-mask-image: linear-gradient(to top right, #000 20%, transparent 85%); mask-image: linear-gradient(to top right, #000 20%, transparent 85%); }

.auth-card { position: relative; width: 100%; max-width: 440px; padding: 36px 36px 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 1px 2px rgb(23 43 48 / .04), 0 22px 48px -18px rgb(23 43 48 / .2); }

.auth-brand { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; margin: 0 0 26px; color: var(--ink); font-size: 17px; font-weight: 720; letter-spacing: -.01em; }
.auth-brand .brand-lockup { height: 32px; }
.auth-badge { padding: 2px 9px; border: 1px solid #c4ddd4; border-radius: 999px; background: var(--accent-wash); color: var(--accent-strong); font-size: 11px; font-weight: 700; letter-spacing: .02em; }

.auth-card h1 { margin: 0; color: var(--ink); font-size: 26px; font-weight: 720; line-height: 1.2; letter-spacing: -.025em; text-align: center; text-wrap: balance; }
.auth-lede { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; text-align: center; text-wrap: balance; }

/* The card's tab-like header: the two real steps of the email-code flow.
   Progress, not navigation — nothing here is clickable. */
.auth-steps { display: grid; grid-template-columns: 1fr 1fr; margin: 26px 0 22px; padding: 0; border-bottom: 1px solid var(--line); list-style: none; }
.auth-step { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 4px 12px; color: var(--muted); font-size: 13px; font-weight: 620; }
.auth-step-mark { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--panel); font-size: 11px; font-weight: 750; }
.auth-step.is-current { color: var(--ink); font-weight: 700; }
.auth-step.is-current::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px; background: var(--accent); content: ""; }
.auth-step.is-current .auth-step-mark { border-color: var(--accent); background: var(--accent); color: #fff; }
.auth-step.is-done { color: var(--accent-strong); }
.auth-step.is-done .auth-step-mark { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-strong); }

.auth-notice { margin: 0 0 16px; padding: 10px 12px; border: 1px solid; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.auth-error { border-color: #f0c7c1; background: #fdf1ef; color: #8c2b22; }
.auth-message { border-color: #c4ddd4; background: var(--accent-wash); color: var(--accent-strong); }

.auth-form { display: grid; gap: 8px; margin: 0; }
.auth-form label { color: var(--ink); font-size: 13px; font-weight: 650; }
.auth-card .auth-form input { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.auth-card .auth-form input::placeholder { color: #7c8c8f; }
.auth-card .auth-form input:hover { border-color: #8fa9a3; }
.auth-card .auth-form input:focus-visible { border-color: var(--accent); outline: var(--focus-ring); outline-offset: 0; box-shadow: 0 0 0 5px rgb(23 107 89 / .14); }
.auth-card .auth-form .auth-code-input { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .3em; text-align: center; }

.auth-primary { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; margin-top: 8px; padding: 11px 18px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 680; box-shadow: 0 1px 2px rgb(17 84 71 / .22); transition: background-color .15s, border-color .15s; }
.auth-primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.auth-primary:disabled { cursor: progress; opacity: .72; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { flex: 1; height: 1px; background: var(--line); content: ""; }

.auth-alt { margin: 0; }
.auth-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 18px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--ink); font-size: 15px; font-weight: 650; text-decoration: none; transition: background-color .15s, border-color .15s; }
.auth-google:hover { border-color: #8fa9a3; background: var(--surface-soft); color: var(--ink); }
.auth-google svg { flex: none; width: 18px; height: 18px; }

.auth-identity { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; margin: 0 0 16px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--wash); color: var(--muted); font-size: 13px; }
.auth-identity > span { min-width: 0; overflow-wrap: anywhere; }
.auth-identity strong { color: var(--ink); font-weight: 650; }
.auth-identity .v3-link { min-height: 36px; padding: 4px 0; font-size: 13px; }

.auth-footnote { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1.55; text-align: center; }

/* The one contact (PROD-7): a second line in the card's footnote, and a quiet
   footer under every signed-in screen. Never drawn on the sign-in screen,
   whose card already carries it. */
.auth-support { display: block; margin-top: 6px; }
.auth-support a, .support-footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.support-footer { padding: 16px 16px 24px; color: var(--muted); font-size: 12.5px; line-height: 1.55; text-align: center; }
body.auth-screen .support-footer { display: none; }

@media (max-width: 767px) {
  /* v2.css forces 16px on every input below 768px (no iOS zoom); the code keeps its size. */
  .auth-card .auth-form .auth-code-input { font-size: 20px !important; }
}
@media (max-width: 520px) {
  .auth-page { place-items: start center; padding: 24px 16px 40px; }
  .auth-page::before { top: -80px; right: -70px; width: 200px; height: 200px; box-shadow: inset 0 0 0 24px rgb(23 107 89 / .035); }
  .auth-page::after { display: none; }
  .auth-card { padding: 28px 20px 22px; border-radius: 14px; }
  .auth-card h1 { font-size: 23px; }
  .auth-lede { font-size: 14px; }
}
@media (forced-colors: active) {
  .auth-card { border-color: CanvasText; }
  .auth-step.is-current::after { background: Highlight; }
}

/* Signed in: the account's avatar and its menu (GTJ-MANUAL-FIXES B21; UXD-9
   amended for B21, which replaced UXC-025's email-and-Sign-out group). The
   avatar is a circle with nothing beside it; the email and Sign out are in the
   menu. The menu is a top-layer popover placed by account-menu.mjs under the
   avatar. Inside the circle, the GoalToJob mark as the kit's avatar fallback
   draws it (GTJ-BRAND B03; it was a neutral figure until the logo was approved). */
.account-button { display: grid; flex: none; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface-soft); color: var(--accent-strong); }
.account-button:hover, .account-button[aria-expanded="true"] { background: var(--accent-wash); }
.account-menu { position: fixed; z-index: 50; inset: auto; top: 61px; right: 32px; width: min(288px, calc(100vw - 32px)); max-height: calc(100dvh - var(--nav-height) - 24px); margin: 0; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); box-shadow: 0 16px 42px rgb(23 43 48 / .17); }
.account-identity { display: grid; gap: 2px; margin: 0; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.account-caption { color: var(--muted); font-size: 12px; }
.account-email { overflow: hidden; color: var(--ink); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.account-items { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); list-style: none; }
.account-item { display: grid; align-content: center; gap: 1px; width: 100%; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; text-decoration: none; }
.account-item:hover { background: var(--surface-soft); }
/* Inside a scrolling menu an outset ring would be clipped (UXC-013 allows a
   control its own offset, never its own ring). */
.account-item:focus-visible { outline-offset: -3px; }
.account-item-label { font-weight: 600; }
.account-item-note { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-signout { margin: 6px 0; }
/* With an account, the tablet header's nav gives up some spacing so its labels
   keep clear of the bell, the avatar and the slider (as it did for UXC-025's
   session group: B08 found the nav within 2 px of its column at 768 px). */
@media (min-width: 768px) and (max-width: 1023px) {
  .topbar-inner:has(.account-button) .journey-nav { gap: 12px; }
}
