/* Auth + legal pages, remote.com-inspired (phase 2, "auth" agent).
   Loaded from {% block style %} after tokens.css / ui.css. Reuses the v3 kit:
   --grad, --on-grad*, --accent*, --cool*. The old .auth-wrap / .auth-card / .auth-title /
   .auth-sub / .auth-after classes from ui.css are still the card's markup: this file only
   re-skins them, so a browser holding a stale ui.css still gets a working layout. */

/* ---------- split shell (login, password reset, signup) ---------- */
.auth-page main { background: var(--paper); }
.auth-split {
  display: grid; grid-template-columns: minmax(0, 1fr);
  width: min(100% - 2rem, 76rem); margin: 0 auto;
  padding: clamp(16px, 3vw, 32px) 0 clamp(32px, 5vw, 64px);
}
.auth-split-form { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.auth-split .auth-wrap { width: 100%; max-width: 27rem; margin: 0 auto; padding: clamp(16px, 4vw, 40px) 0; }
.auth-split .auth-card { box-shadow: none; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); }
.auth-split .auth-title,
.auth-split .signup-form h2 { font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.04; }
.auth-split .signup-form h2 { color: var(--ink); }
.auth-split .auth-sub { font-size: 1rem; color: var(--text); }
.auth-split .auth-after { margin-top: var(--s4); }
.auth-split .alert { border-radius: 14px; padding: .8rem 1rem; font-size: .9375rem; font-weight: 500; display: flex; gap: .6rem; align-items: flex-start; }
.auth-split .alert::before { content: "\ea1d"; font-family: "remixicon"; flex: none; line-height: 1.4; }
.auth-split .alert p { flex: 1; min-width: 0; }
.auth-split .field { border-radius: 14px; background: var(--paper); border-color: var(--field-line); }
.auth-split .field:focus { border-color: var(--blue); }
.auth-split .btn-primary, .auth-split .btn-blue { border-radius: 999px; }
.auth-split .auth-label-row a, .auth-split .auth-after a, .auth-split .signup-foot a { color: var(--blue); }

/* ---------- gradient panel ---------- */
.auth-panel { display: none; }
@media (min-width: 56rem) {
  .auth-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(16px, 3vw, 40px); min-height: calc(100vh - var(--head-h) - 80px); }
  .auth-panel, .signup-panel {
    position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: center;
    gap: var(--s5); padding: clamp(32px, 4vw, 56px); border-radius: 28px; color: var(--on-grad); background: var(--grad);
  }
  .auth-panel::before, .signup-panel::before, .auth-panel::after, .signup-panel::after {
    content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  }
  .auth-panel::before, .signup-panel::before { width: 26rem; height: 26rem; right: -9rem; top: -10rem; background: rgba(255, 255, 255, .16); }
  .auth-panel::after, .signup-panel::after { width: 22rem; height: 22rem; left: -8rem; bottom: -10rem; background: rgba(255, 255, 255, .08); }
  .auth-panel :focus-visible, .signup-panel :focus-visible { outline-color: #fff; }
}
.auth-panel h2 { margin: 0; color: var(--on-grad); font-size: clamp(1.75rem, 1.1rem + 1.8vw, 2.5rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.04; text-wrap: balance; max-width: 14em; }
.auth-panel .check-list { gap: 14px; font-size: 1.0625rem; line-height: 1.45; color: var(--on-grad); }
.auth-panel .check-list li::before { color: #fff; }
.auth-panel .auth-panel-note { margin: 0; font-size: .9375rem; color: var(--on-grad-soft); }

/* ---------- signup: pitch + facts become the panel on desktop, plain sections on a phone ---------- */
.signup-page .signup { display: flex; flex-direction: column; gap: var(--s6); }
.signup-panel { display: contents; }
.signup-pitch { order: 1; }
.signup-form { order: 2; }
.signup-proof { order: 3; }
.signup-pitch .display-1 { margin: var(--s3) 0 0; }
.signup-pitch .lede { margin: var(--s4) 0 var(--s5); }
.signup-pitch .lede a { color: var(--blue); font-weight: 600; text-underline-offset: 2px; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); max-width: 34rem; }
.points li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: .6rem; color: var(--text); }
.points svg { margin-top: .2rem; color: var(--blue); }
.points strong { color: var(--ink); font-weight: 600; }
.signup-foot { margin: var(--s4) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line-soft); font-size: .875rem; color: var(--muted); }
.signup-foot + .signup-foot { margin-top: var(--s2); padding-top: 0; border-top: 0; }
.signup-foot a { font-weight: 600; text-underline-offset: 2px; }
.plan-facts { padding: var(--s5); max-width: 34rem; }
.plan-facts h2 { margin: 0 0 var(--s3); font-size: 1rem; font-weight: 700; color: var(--ink); }
.plan-facts dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: .45rem 0; font-size: .9375rem; }
.plan-facts dt { padding-right: var(--s3); color: var(--muted); }
.plan-facts dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }
.plan-facts .total { border-top: 1px solid var(--line-soft); padding-top: .55rem; margin-top: .15rem; }
.plan-facts dd.free { color: var(--blue); }
.plan-facts p { margin: var(--s4) 0 0; font-size: .875rem; color: var(--muted); }
.plan-facts p a { color: var(--blue); font-weight: 600; text-underline-offset: 2px; }
.plan-pick { display: inline-flex; align-items: center; gap: .35rem; margin: var(--s3) 0 0; padding: .2rem .65rem; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 999px; font-size: .8125rem; color: var(--accent-text); }
.plan-pick strong { color: inherit; font-weight: 700; }
.plan-pick-note { margin: .4rem 0 0; font-size: .8125rem; color: var(--muted); }
@media (min-width: 56rem) {
  .signup-page .signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: clamp(16px, 3vw, 40px); }
  .signup-panel { display: flex; grid-column: 2; grid-row: 1; justify-content: flex-start; }
  .signup-form { grid-column: 1; grid-row: 1; order: 0; display: flex; flex-direction: column; justify-content: flex-start; align-self: start; }
  .signup-form .auth-card { width: 100%; max-width: 30rem; margin: 0 auto; }
  .signup-pitch, .signup-proof { order: 0; }
  .signup-pitch .display-1 { color: var(--on-grad); font-size: clamp(2.5rem, 1.4rem + 3vw, 4rem); font-weight: 800; letter-spacing: -.045em; }
  .signup-pitch .lede { color: var(--on-grad); font-size: 1.0625rem; max-width: none; }
  .signup-pitch .lede a { color: #fff; text-decoration: underline; }
  .points li, .points strong { color: var(--on-grad); }
  .points svg { color: #fff; }
  .plan-facts { max-width: none; background: var(--paper); }
}
@media (max-width: 55.99rem) { .signup-page .signup { padding-top: clamp(16px, 4vw, 32px); } }

/* ---------- legal: calm document ---------- */
.legal-page main { background: var(--canvas); }
.legal-page .doc { --measure: 72ch; }
.legal-page .doc-title h1 { font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; }
.legal-page .doc-dateline span:first-child { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: var(--bg-warm); border: 1px solid var(--line); }
.legal-page .doc-title .lede { font-size: 1.1875rem; color: var(--text); }
.legal-page .doc-toc { border-radius: 18px; }
.legal-page .doc-toc h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.legal-page .doc-toc a { border-radius: 999px; }
.legal-page .doc-toc a[aria-current="true"]::before { color: var(--accent-text); }
.legal-page .doc-prose { font-size: 1.0625rem; line-height: 1.75; }
.legal-page .doc-prose h2 { font-weight: 750; letter-spacing: -.03em; }
.legal-page .doc-prose h3 { font-weight: 700; letter-spacing: -.01em; }
.legal-page .doc-note, .legal-page .doc-card { border-radius: 18px; }

/* ---------- password reset (one template, four steps) ---------- */
.auth-card p { color: var(--text); }
.auth-card .auth-sub { color: var(--text); }
.auth-card p a { color: var(--blue); font-weight: 600; text-underline-offset: 2px; }
.reset-done { margin: var(--s5) 0 0; }
