/* ==========================================================================
   The door: login, sign up, reset, verify, invites.
   Left: a quiet paper column with the form. Right: a lime sticker stage with the
   page's render and a small conversation that types itself.
   ========================================================================== */
.auth { min-height: 100vh; min-height: 100dvh; }
.auth-grid { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1rem, 2vw, 1.5rem); padding: clamp(0.75rem, 1.5vw, 1.25rem); }

/* ---------- form side ---------- */
.auth-side { display: flex; flex-direction: column; min-height: 100%; padding: clamp(0.75rem, 2vw, 1.5rem) clamp(0.5rem, 3vw, 2.5rem); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.auth-logo { display: block; height: 2.2rem; padding: 0.2rem 0; color: var(--fg); border-radius: var(--r-sm); }
.auth-logo .lg { height: 100%; width: auto; }
.auth-logo:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 4px; }
.auth-top-link { font-size: var(--fs-sm); color: var(--fg-muted); font-weight: 600; }
.auth-top-link a { color: var(--fg); font-weight: 800; margin-left: 0.3rem; background: linear-gradient(var(--lime), var(--lime)) 0 100% / 100% 0.35em no-repeat; transition: background-size var(--dur-base) var(--ease-bounce); padding: 0 0.1em; }
.auth-top-link a:hover { background-size: 100% 100%; }

.auth-body { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 25rem; margin: 0 auto; padding: 2.5rem 0; }
.auth-kicker { font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); margin: 0 0 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.auth-kicker::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); }
.auth-h { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.7rem); line-height: 1; letter-spacing: -0.035em; font-weight: 800; margin: 0; text-wrap: balance; }
.auth-h em { font-style: normal; background: var(--lime); padding: 0 0.12em; border-radius: 0.18em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.auth-lead { margin: 0.8rem 0 0; color: var(--fg-muted); font-size: var(--fs-md); max-width: 34ch; }
.auth-lead b { color: var(--fg); }
.auth-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.9rem; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: var(--fs-sm); }
.auth-alt { margin: 1.5rem 0 0; font-size: var(--fs-sm); color: var(--fg-muted); text-align: center; }
.auth-alt a, .auth-link { color: var(--fg); font-weight: 800; text-decoration: underline; text-decoration-color: var(--lime-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: text-decoration-color var(--dur-fast); }
.auth-alt a:hover, .auth-link:hover { text-decoration-color: var(--ink); }
.auth-fine { font-size: var(--fs-xs); color: var(--fg-faint); margin: 0; }
.auth-fine a { color: var(--fg-muted); text-decoration: underline; text-underline-offset: 2px; }

/* the submit: full width, a busy state that keeps its size */
.auth-submit { width: 100%; justify-content: center; padding: 0.95em 1.4em; font-size: var(--fs-body); margin-top: 0.4rem; }
.auth-submit .btn__spin { display: none; width: 1.1em; height: 1.1em; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
.auth-submit.is-busy { pointer-events: none; }
.auth-submit.is-busy .btn__label { opacity: 0.7; }
.auth-submit.is-busy .btn__ico { display: none; }
.auth-submit.is-busy .btn__spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* status note (reset link sent, verified, …) */
.auth-note { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.8rem 0.95rem; margin-bottom: 1.4rem; border-radius: var(--r-md); background: color-mix(in srgb, var(--lime) 30%, var(--paper)); border: 1.5px solid color-mix(in srgb, var(--lime-deep) 60%, transparent); font-size: var(--fs-sm); font-weight: 600; animation: note-in 0.6s var(--ease-bounce) both; }
.auth-note-ico { flex: none; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--ink); color: var(--lime); }
.auth-note-ico svg { width: 0.8rem; height: 0.8rem; }
@keyframes note-in { from { opacity: 0; transform: translateY(-8px) scale(0.97); } }

/* ---------- fields ---------- */
.af { display: flex; flex-direction: column; gap: 0.4rem; }
.af-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.af-row label { font-size: var(--fs-sm); font-weight: 700; }
.af-row a { font-size: var(--fs-xs); font-weight: 700; color: var(--fg-muted); transition: color var(--dur-fast); }
.af-row a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.af-box { position: relative; display: flex; align-items: center; }
.af-ico { position: absolute; left: 0.95rem; display: grid; place-items: center; color: var(--fg-faint); pointer-events: none; transition: color var(--dur-fast), transform var(--dur-base) var(--ease-bounce); }
.af-ico svg { width: 1.05rem; height: 1.05rem; }
.af-input { width: 100%; height: 3.25rem; padding: 0 1rem 0 2.8rem; border-radius: var(--r-md); border: 1.5px solid var(--hair-strong); background: var(--paper); color: var(--fg); font: inherit; font-size: var(--fs-body); font-weight: 500; transition: border-color var(--dur-fast), box-shadow var(--dur-base) var(--ease-smooth), background-color var(--dur-fast); }
.af-input::placeholder { color: var(--fg-faint); font-weight: 400; }
.af-input:hover { border-color: var(--fg-muted); }
.af-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 50%, transparent); }
.af-box:focus-within .af-ico { color: var(--fg); transform: scale(1.12) rotate(-6deg); }
.af-input[readonly] { background: var(--paper-2); color: var(--fg-muted); cursor: default; }
.af-input[readonly]:focus { box-shadow: none; border-color: var(--hair-strong); }
.af-box:has([type="password"], [data-pw]) .af-input { padding-right: 3.2rem; }
.af-eye, .af-lock { position: absolute; right: 0.45rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; color: var(--fg-faint); transition: color var(--dur-fast), background-color var(--dur-fast), transform var(--dur-base) var(--ease-bounce); }
.af-eye:hover { color: var(--fg); background: var(--paper-2); }
.af-eye:active { transform: scale(0.88); }
.af-eye svg, .af-lock svg { width: 1.1rem; height: 1.1rem; }
.af-eye::after { content: ""; position: absolute; width: 1.35rem; height: 2px; background: currentColor; border-radius: 2px; rotate: -45deg; scale: 0 1; transition: scale var(--dur-base) var(--ease-bounce); }
.af-eye[aria-pressed="true"]::after { scale: 1 1; }
.af-lock { pointer-events: none; }
.af-msg { margin: 0; min-height: 0; font-size: var(--fs-xs); color: var(--fg-muted); }
.af-msg:empty { display: none; }
.af.has-err .af-input { border-color: var(--rose); }
.af.has-err .af-input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--rose) 22%, transparent); }
.af.has-err .af-ico { color: var(--rose); }
.af.has-err .af-msg { color: var(--rose); font-weight: 600; }
.af.is-shake .af-box { animation: shake 0.4s var(--ease-smooth); }
.af.is-ok .af-ico { color: var(--lime-deep); }
.af-caps { margin: 0; font-size: var(--fs-xs); font-weight: 700; color: var(--amber); display: flex; align-items: center; gap: 0.35rem; }
.af-caps[hidden] { display: none; }
.af-caps::before { content: "⇪"; font-size: 0.95em; }
.af-suggest { all: unset; cursor: pointer; font-weight: 800; color: var(--fg); text-decoration: underline; text-decoration-color: var(--lime-deep); text-decoration-thickness: 2px; text-underline-offset: 2px; }

/* password strength: four segments fill and colour as it gets better */
.af-meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: center; gap: 0.3rem; }
.af-meter i { height: 5px; border-radius: 5px; background: var(--hair-strong); transition: background-color var(--dur-base), transform var(--dur-base) var(--ease-bounce); }
.af-meter b { min-width: 4.5rem; text-align: right; font-size: var(--fs-xs); font-weight: 700; color: var(--fg-muted); }
.af-meter[data-score="1"] i:nth-child(-n+1) { background: var(--rose); }
.af-meter[data-score="2"] i:nth-child(-n+2) { background: var(--amber); }
.af-meter[data-score="3"] i:nth-child(-n+3) { background: var(--lime-deep); }
.af-meter[data-score="4"] i:nth-child(-n+4) { background: var(--green); }
.af-meter.is-bump i { animation: seg-bump 0.4s var(--ease-bounce); }
@keyframes seg-bump { 50% { transform: scaleY(1.8); } }

/* remember-me: a small ink checkbox */
.auth-check { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; cursor: pointer; user-select: none; }
.auth-check input { appearance: none; margin: 0; width: 1.2rem; height: 1.2rem; border-radius: 6px; border: 1.5px solid var(--hair-strong); background: var(--paper); display: grid; place-items: center; cursor: pointer; transition: background-color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-base) var(--ease-bounce); }
.auth-check input::after { content: ""; width: 0.35rem; height: 0.65rem; border: solid var(--lime); border-width: 0 2.5px 2.5px 0; rotate: 45deg; translate: 0 -1px; scale: 0; transition: scale var(--dur-base) var(--ease-bounce); }
.auth-check input:checked { background: var(--ink); border-color: var(--ink); }
.auth-check input:checked::after { scale: 1; }
.auth-check input:active { transform: scale(0.85); }
.auth-check input:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 50%, transparent); }

/* chosen plan, carried from the pricing page */
.auth-plan { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 0.9rem; border-radius: var(--r-md); background: var(--paper); border: 1.5px dashed var(--hair-strong); font-size: var(--fs-sm); margin-top: 1.4rem; }
.auth-plan b { font-weight: 800; }
.auth-plan .grow { color: var(--fg-muted); }
.auth-plan .num { font-weight: 800; font-size: var(--fs-md); }

/* invite details */
.auth-invite { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem; margin-top: 1.4rem; border-radius: var(--r-md); background: var(--paper); border: 1.5px solid var(--hair); box-shadow: var(--depth); }
.auth-invite .ava { flex: none; }
.auth-invite p { margin: 0; font-size: var(--fs-sm); color: var(--fg-muted); }
.auth-invite b { color: var(--fg); }

/* ---------- footer ---------- */
.auth-foot { display: flex; align-items: center; gap: 1.1rem; font-size: var(--fs-xs); color: var(--fg-faint); }
.auth-foot a { color: var(--fg-muted); transition: color var(--dur-fast); }
.auth-foot a:hover { color: var(--fg); }
.auth-theme { margin-left: auto; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; color: var(--fg-muted); border: 1.5px solid var(--hair-strong); transition: color var(--dur-fast), transform var(--dur-base) var(--ease-bounce), border-color var(--dur-fast); }
.auth-theme:hover { color: var(--fg); border-color: var(--fg); transform: rotate(-20deg); }
.auth-theme svg { width: 1rem; height: 1rem; }

/* ---------- the stage ---------- */
.auth-stage { position: relative; border-radius: 30px; background: var(--lime); border: 2.5px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; display: grid; place-items: center; padding: clamp(1.5rem, 3vw, 3rem); isolation: isolate; }
.auth-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(11,11,11,0.16) 1.3px, transparent 1.6px); background-size: 22px 22px; mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%); }
.auth-stage::after { content: ""; position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.55), transparent 65%); top: 18%; left: 20%; z-index: -1; }
.auth-stage-in { width: 100%; max-width: 30rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.auth-stage-kicker { margin: 0; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(11,11,11,0.6); }
.auth-stage-h { margin: 0.4rem 0 0; font-size: clamp(1.6rem, 1rem + 1.6vw, 2.4rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; color: var(--ink); text-wrap: balance; }
.auth-art { width: min(18rem, 70%); margin: 1.4rem 0 0.4rem; will-change: transform; }
.auth-art img { width: 100%; height: auto; animation: art-in 0.9s var(--ease-bounce) 0.1s both, art-float 6s ease-in-out 1s infinite; user-select: none; -webkit-user-drag: none; }

/* the conversation: bubbles pop in, a typing indicator runs between them */
.auth-convo { width: 100%; max-width: 22rem; min-height: 9.5rem; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.45rem; }
.cv { max-width: 82%; padding: 0.6rem 0.9rem; border-radius: 18px; font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; text-align: left; border: 2px solid var(--ink); animation: cv-in 0.5s var(--ease-bounce) both; transform-origin: 0 100%; }
.cv-them { align-self: flex-start; background: var(--paper); color: var(--ink); border-bottom-left-radius: 6px; box-shadow: 3px 3px 0 var(--ink); }
.cv-us { align-self: flex-end; background: var(--ink); color: var(--on-dark); border-bottom-right-radius: 6px; transform-origin: 100% 100%; box-shadow: 3px 3px 0 rgba(11,11,11,0.25); }
.cv-typing { display: inline-flex; gap: 4px; padding: 0.75rem 0.9rem; }
.cv-typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.4; animation: dot 1.1s ease-in-out infinite; }
.cv-typing i:nth-child(2) { animation-delay: 0.15s; } .cv-typing i:nth-child(3) { animation-delay: 0.3s; }
.cv.is-out { animation: cv-out 0.35s var(--ease-smooth) both; }
@keyframes cv-in { from { opacity: 0; transform: translateY(10px) scale(0.7); } }
@keyframes cv-out { to { opacity: 0; transform: translateY(-8px) scale(0.96); } }
@keyframes dot { 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------- dark ---------- */
html[data-theme="dark"] .auth-stage { border-color: var(--ink); box-shadow: 6px 6px 0 rgba(255,255,255,0.12); }
html[data-theme="dark"] .auth-submit.btn-lime { box-shadow: 4px 4px 0 rgba(255,255,255,0.14); }
html[data-theme="dark"] .auth-check input:checked { background: var(--lime); border-color: var(--lime); }
html[data-theme="dark"] .auth-check input::after { border-color: var(--ink); }
html[data-theme="dark"] .auth-note { color: var(--fg); background: color-mix(in srgb, var(--lime) 14%, var(--paper)); }

/* ---------- small screens: the stage becomes a slim lime band on top ---------- */
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: minmax(0, 1fr); padding: 0.6rem; }
  .auth-stage { order: -1; padding: 1.2rem 1rem; border-radius: 22px; }
  .auth-stage-in { flex-direction: row; text-align: left; gap: 1rem; align-items: center; }
  .auth-stage-kicker, .auth-convo { display: none; }
  .auth-stage-h { font-size: 1.3rem; order: 2; margin: 0; }
  .auth-art { width: 5.5rem; margin: 0; flex: none; }
  .auth-body { padding: 1.8rem 0; }
  .auth-side { padding: 1rem 0.4rem; }
}
@media (prefers-reduced-motion: reduce) { .auth-art img, .cv { animation: none !important; } }
.auth-inline { display: inline; margin-left: 0.3rem; }
.auth-inline .auth-link { font: inherit; font-weight: 800; }
.auth-submit[disabled] { opacity: 0.55; pointer-events: none; box-shadow: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 5px; }

/* walls (trial over, workspace paused) */
.wall-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1.6rem; }
.wall-stats > div { padding: 0.9rem 1rem; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--hair); display: flex; flex-direction: column; }
.wall-stats b { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; } .wall-stats span { font-size: var(--fs-xs); color: var(--fg-muted); font-weight: 600; }
.wall-confirm { height: 6px; border-radius: 6px; background: var(--hair); overflow: hidden; margin-top: 1.2rem; }
.wall-confirm i { display: block; width: 35%; height: 100%; border-radius: 6px; background: var(--ink); animation: wall-bar 1.3s var(--ease-smooth) infinite; }
.wall-confirm.is-ok i { width: 100%; animation: none; background: var(--lime-deep); transition: width var(--dur-slow) var(--ease-smooth); }
.wall-confirm.is-slow { opacity: 0; transition: opacity var(--dur-base); }
@keyframes wall-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
