/* auth screens — see design/canvas/Auth-*.dc.html and design/STYLE.md. Shared components are in /app.css. */

.auth-page {
  --auth-aside: var(--aside);
  --auth-tile: var(--tile);
  min-height: 100vh; min-height: 100dvh; display: flex; flex-wrap: wrap; align-items: stretch;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
}
.auth-page [hidden] { display: none !important; }
.auth-page .nw { white-space: nowrap; }
.auth-page .mono { font-family: var(--mono); font-size: 13px; }
.auth-page .hl { color: var(--text); }

/* ---------- form column ---------- */
.auth-main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; padding: 28px clamp(16px, 4vw, 56px) 32px; }
.auth-logo { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); }
.auth-logo:hover { text-decoration: none; }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.auth-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 24px; }

.auth-head { display: flex; flex-direction: column; gap: 8px; }
.auth-head h1 { font: 600 28px/1.2 var(--display); letter-spacing: -0.015em; margin: 0; }
.auth-head p { margin: 0; color: var(--body); }
.auth-head p.strong { color: var(--text-2); }
.auth-email { font-family: var(--mono); font-size: 14px; color: var(--text); overflow-wrap: anywhere; }

/* error block */
.auth-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--panel); border: 1px solid var(--bad-line); border-radius: var(--r-card); font-size: 14px; }
.auth-alert > svg { flex: none; margin-top: 1px; color: var(--bad); }
.auth-alert > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auth-alert p { margin: 0; color: var(--text-2); }
.auth-alert p.t { font-weight: 600; color: var(--bad); }
.auth-alert a { font-weight: 500; white-space: nowrap; }
#auth-err:empty { display: none; }

/* buttons */
.auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 16px; font-size: 15px; line-height: 1.2; text-align: center; }
a.auth-btn:hover { text-decoration: none; }
.auth-btn[aria-disabled="true"] { cursor: not-allowed; }
.auth-btn:not(.primary)[aria-disabled="true"] { opacity: 0.6; }
.auth-btn.busy { cursor: progress; }
.auth-spin { animation: auth-spin 0.8s linear infinite; flex: none; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth-spin { animation-duration: 2.4s; } }
.auth-link { display: inline; min-height: 0; padding: 12px 0; margin: -12px 0; border: 0; background: none; color: var(--accent-text); font: inherit; font-weight: 500; } /* padding: taller hit area, same line box */
.auth-link:hover { background: none; color: var(--accent-text-2); text-decoration: underline; }

.auth-or { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* fields */
.auth-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { display: block; }
.auth-labelrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -12px 0 -6px; }
.auth-labelrow a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.auth-field input { width: 100%; min-height: 44px; font-size: 15px; }
.auth-field input[aria-invalid="true"] { border-color: var(--bad-line); }
.auth-field input[aria-invalid="true"]:focus { border-color: var(--bad); }
.auth-pw { position: relative; }
.auth-pw input { padding-right: 48px; }
.auth-eye { position: absolute; top: 0; right: 0; width: 44px; height: 44px; min-height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--muted); border-radius: var(--r); }
.auth-eye:hover { background: none; color: var(--text); }
.auth-eye:focus-visible { outline-offset: -6px; }
.auth-help { margin: 0; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.auth-help.center { justify-content: center; text-align: center; }
#su-strength { font-weight: 500; }
#su-strength.weak { color: var(--bad); }
#su-strength.fair { color: var(--accent-text); }
#su-strength.strong { color: var(--ok-text); }
.auth-meter { display: flex; gap: 6px; margin-top: 4px; }
.auth-meter span { flex: 1; height: 4px; border-radius: 999px; background: var(--line-2); }
.auth-meter span.weak { background: var(--bad); }
.auth-meter span.fair { background: var(--accent); }
.auth-meter span.strong { background: var(--ok); }
.auth-submit { display: flex; flex-direction: column; gap: 10px; }
.auth-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.auth-alt { margin: 4px 0 0; text-align: center; font-size: 14px; color: var(--body); }
.auth-alt a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; white-space: nowrap; }

/* reset */
.auth-back { align-self: center; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.auth-back:hover { color: var(--text); text-decoration: none; }
.auth-tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line-card); border-radius: var(--r-card); }
.auth-tip > svg { flex: none; margin-top: 2px; color: var(--info); }
.auth-tip p { margin: 0; font-size: 14px; color: var(--body); }
.auth-tip a { font-weight: 500; }
.auth-done { display: flex; flex-direction: column; gap: 24px; }
.auth-note { margin: 0; font-size: 14px; color: var(--muted); }
.auth-tile { width: 52px; height: 52px; border-radius: var(--r-card); background: var(--auth-tile); display: flex; align-items: center; justify-content: center; color: var(--accent-text); flex: none; }
.auth-tile.info { color: var(--info); }
.auth-tile.bad { background: var(--bad-bg); color: var(--bad); }


/* ---------- brand panel ---------- */
.auth-aside { flex: 1 1 520px; min-width: 0; background: var(--auth-aside); border-left: 1px solid var(--line); padding: clamp(40px, 6vw, 88px) clamp(16px, 4vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 32px; }
.auth-aside > * { max-width: 600px; }
.auth-pitch { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.auth-pitch p.eyebrow { margin: 0; font: 500 13px/1.5 var(--mono); color: var(--accent-text); }
.auth-pitch h2 { margin: 0; font: 600 clamp(28px, 2.6vw, 38px)/1.12 var(--display); letter-spacing: -0.02em; }
.auth-pitch p { margin: 0; font-size: 16px; color: var(--body); }

.auth-term { margin: 0; min-width: 0; background: var(--well); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; }
.auth-term .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.auth-term .bar > span { display: inline-flex; align-items: center; gap: 8px; }
.auth-term pre { margin: 0; padding: 18px 18px 20px; font: 13px/1.8 var(--mono); color: #d6dae0; overflow-x: auto; white-space: pre; }
.auth-term pre .a { color: var(--accent-text); }
.auth-term pre .f { color: var(--faint); }
.auth-term pre .g { color: #8fd3a8; }
.auth-term figcaption { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.auth-page .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.auth-page .dot.info { background: var(--info); }

.auth-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 14px; color: var(--body); }
.auth-checks li { display: inline-flex; align-items: center; gap: 8px; }
.auth-checks svg { color: var(--accent-text); flex: none; }

.auth-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.auth-steps li { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line-2); color: var(--text); }
.auth-steps li:first-child { border-top: 1px solid var(--line-2); }
.auth-aside:has(.auth-steps), .auth-aside:has(.auth-points) { gap: 36px; }
.auth-steps .n { font: 13px var(--mono); color: var(--accent-text); flex: none; }

.auth-plan { background: var(--panel); border: 1px solid var(--line-card); border-radius: var(--r-card); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-plan .head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.auth-plan h3 { margin: 0; font: 600 18px/1.3 var(--display); }
.auth-plan .head .mono { color: var(--muted); }
.auth-plan dl { margin: 0; display: flex; flex-wrap: wrap; gap: 10px 32px; font-size: 14px; }
.auth-plan dl > div { display: flex; align-items: center; gap: 8px; }
.auth-plan dt { display: inline-flex; align-items: center; gap: 8px; color: var(--body); }
.auth-plan dd { margin: 0; color: var(--text); }
.auth-plan p { margin: 0; font-size: 13px; color: var(--muted); }

.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; max-width: 560px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; }
.auth-points .tile { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--auth-tile); display: flex; align-items: center; justify-content: center; color: var(--accent-text); }
.auth-points .t { display: flex; flex-direction: column; gap: 2px; }
.auth-points .t b { font-weight: 600; }
.auth-points .t > span { font-size: 14px; color: var(--body); }

/* ---------- notices ---------- */
.auth-page.notice { flex-direction: column; flex-wrap: nowrap; align-items: center; padding: 28px clamp(16px, 4vw, 56px) 32px; }
.auth-nhead { align-self: stretch; display: flex; align-items: center; }
.auth-nmain { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.auth-card { width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--line-card); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 24px; }
.auth-card .auth-head { gap: 10px; }
.auth-card .auth-head h1 { font-size: 26px; }
.auth-card h1:focus { outline: none; }
.auth-more { display: flex; flex-direction: column; gap: 4px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.auth-more p { margin: 0; }
.auth-more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.auth-more .auth-email { font-size: 13px; color: var(--text-2); }
.auth-box-note { margin: 0; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 14px; color: var(--text-2); }

/* The two columns stack between phone and desktop widths. */
@media (max-width: 1100px) {
  .auth-aside { border-left: 0; border-top: 1px solid var(--line); }
}
/* Phones: the form only, no brand panel. */
@media (max-width: 860px) {
  .auth-aside { display: none; }
  .auth-main { padding: 16px 16px 24px; min-height: 100vh; min-height: 100dvh; }
  .auth-center { align-items: flex-start; padding: 24px 0 32px; }
  .auth-head h1 { font-size: 26px; }
  .auth-field input { font-size: 16px; }
  .auth-page.notice { padding: 16px 16px 24px; }
  .auth-nmain { align-items: flex-start; padding: 24px 0 32px; }
}
.auth-alert.info { border-color: var(--line-2); }
.auth-alert.info > svg { color: var(--info); }
.auth-alert.info p.t { color: var(--text); }
#auth-note:empty { display: none; }
