/* ══════════════════════════════════════════════════════════════════
   AUTH v5 — sign in, sign up, recovery, the codes, a suspended account
   and the profile a social sign-in owes (layouts/auth), "AI Robot"

   Built from the approved mockup (mockup/auth-alpai-v5, gitignored).
   Spec: core/docs/superpowers/specs/2026-10-29-auth-robot-v5-design.md.
   Sits on landing.css: its tokens, .btn, .brand, .bubble and the
   language list. This file adds the page:

     .au-side    the form on the light side: logo and corners, the form,
                 the legal line
     .au-art     the landing's About band turned on its side -- the dark
                 trading desk behind an S-curved edge, two ribbons along
                 it, the banner's words, a robot and the plan chips
                 (partials/auth_art); gone at 960px and down, where
                 login and register stand a small robot by the title

   member.js still drives the behaviour: [data-reveal] on a password,
   form[data-once], and the six-box code ([data-code-boxes]).
   Colour literals live only in :root.
   ══════════════════════════════════════════════════════════════════ */
:root {
  --field: 56px;
  --edge: 150px;
  --art: clamp(400px, calc(100vw - 620px), 760px);
  --pad: clamp(24px, 4vw, 72px);
  --fog: rgba(12, 16, 18, .86);
  --fog-2: rgba(12, 16, 18, .35);
  --glass: rgba(255, 255, 255, .12);
  --glass-line: rgba(255, 255, 255, .26);
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737F83' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  --wave-side: url(../images/landing/wave-side.svg);
  --desk: url(../images/landing/hero-desk.webp);
}

.au-body { min-height: 100dvh; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 100; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--white); font: 700 14px var(--font-s); transform: translateY(-200%); }
.skip:focus { transform: none; }

.au { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--art)); min-height: 100dvh; }

/* ── the form side ───────────────────────────────────────────── */
.au-side { display: flex; flex-direction: column; min-width: 0; padding: 24px var(--pad) 22px; }
.au-top { display: flex; align-items: center; gap: 10px; }
.au-top .brand { margin-right: auto; }
.au-back, .au-lang { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font: 600 15px var(--font-s); transition: border-color .2s, color .2s; }
.au-back:hover, .au-lang:hover { border-color: var(--teal-2); color: var(--teal); }
.au-back .ic { width: 18px; height: 18px; }
.ic-back { transform: rotate(180deg); }
.au-lang { padding: 0 12px; font: 700 14px var(--font); }
.au-lang .ic { width: 16px; height: 16px; color: var(--muted); }

.au-main { flex: 1; display: grid; align-content: center; width: 100%; padding: clamp(16px, 4vh, 36px) 0; }
.au-card { width: min(440px, 100%); margin: 0 auto; }
.au-card.wide { width: min(540px, 100%); }

.au-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.au-tabs a { display: grid; place-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--muted); font: 700 15px var(--font-s); text-align: center; transition: color .2s; }
.au-tabs a:hover { color: var(--teal); }
.au-tabs a[aria-current] { background: var(--grad); color: var(--white); box-shadow: 0 10px 22px -12px var(--shadow); }

.au-intro { position: relative; margin-top: clamp(22px, 3.6vh, 34px); }
.au-title { font: 400 clamp(32px, 3vw, 44px)/1.1 var(--font-d); letter-spacing: .02em; text-transform: uppercase; overflow-wrap: anywhere; text-wrap: balance; }
.au-title em { color: var(--green); font-style: normal; }
.au-lede { margin-top: 10px; color: var(--muted); line-height: 1.6; text-wrap: pretty; }
.au-lede b { color: var(--ink); font-weight: 500; }
.au-mini { display: none; }
/* the other pages put an icon over the title instead of tabs */
.au-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border: 1px solid color-mix(in srgb, var(--teal-2) 30%, transparent); border-radius: 18px; background: var(--brand-wash); color: var(--teal); }
.au-icon.is-down { border-color: color-mix(in srgb, var(--red) 30%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); }
.au-icon .ic { width: 26px; height: 26px; }

.au-form { display: grid; gap: clamp(14px, 2vh, 18px); margin-top: clamp(20px, 3vh, 28px); }
.au-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.fld-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.label { flex: none; color: var(--ink); font: 700 15px/1.3 var(--font-s); }
.ctl { position: relative; display: flex; align-items: center; }
.ctl > .ic { position: absolute; left: 20px; width: 20px; height: 20px; color: var(--teal-2); pointer-events: none; }
.input { width: 100%; min-width: 0; height: var(--field); padding: 0 20px; border: 1.5px solid var(--line); border-radius: 999px; outline: 0;
  background: var(--white); color: var(--ink); font: 400 16px var(--font); text-overflow: ellipsis; transition: border-color .2s, box-shadow .2s; }
.ctl > .ic + .input { padding-left: 52px; }
.input::placeholder { color: var(--muted); opacity: .75; }
.input:hover { border-color: var(--teal-soft); }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px var(--brand-wash); }
.input[aria-invalid="true"] { border-color: var(--red); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 14%, transparent); }
select.input { padding-right: 48px; background: var(--chev) right 20px center / 18px no-repeat, var(--white); cursor: pointer; -webkit-appearance: none; appearance: none; }
.pw .input { padding-right: 56px; }
.eye { position: absolute; right: 6px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.eye:hover { background: var(--bg); color: var(--teal); }
.eye .ic { width: 20px; height: 20px; }

/* the line under a field: its rule, then what the check found. Side by side (521px up) the
   line is kept even while empty, so a message arriving never shifts the row. */
.au .hint { min-width: 0; margin-top: -2px; padding: 0 20px; color: var(--muted); font: 500 13px/1.45 var(--font-s); }
.au .fld-head .hint { margin: 0; padding: 0; text-align: right; }
.optional { color: var(--muted); font: 500 13px var(--font-s); }
.au .hint[data-state="ok"] { color: var(--green); }
.au .hint[data-state="bad"] { color: var(--red); }
.au-link { flex: none; margin: -11px 0; padding: 11px 0; color: var(--teal); font: 700 14px var(--font-s); }
.au-link:hover, .au-switch a:hover, .au-note a:hover, .check a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* password strength: four bars, warmer to greener */
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 20px; }
.meter i { height: 4px; border-radius: 4px; background: var(--line); transition: background .25s; }
.meter[data-score="1"] i:nth-child(1) { background: var(--red); }
.meter[data-score="2"] i:nth-child(-n+2) { background: var(--amber); }
.meter[data-score="3"] i:nth-child(-n+3) { background: var(--teal-2); }
.meter[data-score="4"] i { background: var(--green); }

.check { display: inline-flex; align-items: center; gap: 12px; width: fit-content; min-height: 44px; color: var(--text); font-size: 15px; line-height: 1.5; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--teal-soft); border-radius: 7px; background: var(--white); cursor: pointer; -webkit-appearance: none; appearance: none; transition: background .2s, border-color .2s; }
.check input:checked { border-color: transparent; background: var(--tick) center / 14px no-repeat, var(--grad); }
.check input:focus-visible { outline: 3px solid var(--mint-2); outline-offset: 2px; }
.check a { color: var(--teal); font-weight: 500; }

.btn-lg { min-height: 56px; font-size: 17px; }
.btn-block { width: 100%; margin-top: 6px; }
.btn .ic { width: 20px; height: 20px; }

/* the line under a form: the way back to signing in, a resend, who to ask */
.au-switch { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; text-align: center; }
.au-note { color: var(--muted); font-size: 14px; line-height: 1.55; text-align: center; }
.au-note b { color: var(--ink); }
/* a 40px finger target without moving the line it sits on */
.au-switch a, .au-note a { margin: 0 -6px; padding: 11px 6px; color: var(--teal); font-family: var(--font-s); font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }

/* a mobile number after its dialling code (user_data), a captcha beside its field */
.cap-row { display: flex; align-items: center; gap: 10px; }
.cap-row .input { flex: 1; }
.cap-row img, .cap-row canvas { flex: none; border-radius: 14px; }
.dial { display: grid; place-items: center; flex: none; min-width: 72px; height: var(--field); padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg-2);
  color: var(--ink); font: 700 15px var(--font-s); font-variant-numeric: tabular-nums; }
.g-recaptcha-slot { min-height: 78px; }

/* a code of six digits: one input, drawn as six cells once member.js is in */
.code6 i { display: none; }
.code6[data-ready] { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.code6[data-ready] i { display: grid; place-items: center; height: 64px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--white); color: var(--ink);
  font: 400 28px var(--font-d); font-style: normal; transition: border-color .2s, box-shadow .2s; }
.code6[data-ready] i.is-on { border-color: var(--teal); box-shadow: 0 0 0 4px var(--brand-wash); }
.code6[data-ready] i.is-on:empty::after { content: ''; width: 2px; height: 28px; background: var(--teal); animation: blink 1s steps(1) infinite; }
.code6[data-ready]:has(input[aria-invalid="true"]) i { border-color: var(--red); }
.code6[data-ready] input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: text; }
.input.otp { font: 400 24px var(--font-d); letter-spacing: .5em; text-align: center; }
@keyframes blink { 50% { opacity: 0; } }

/* someone else's sign-in, when an operator turns one on */
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 500 13px var(--font-s); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.social { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.social .btn { padding: 0 16px; }
.social svg { width: 18px; height: 18px; }

/* the reason an account was suspended */
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); border-radius: 20px;
  background: color-mix(in srgb, var(--red) 7%, var(--white)); color: var(--text); font-size: 14px; line-height: 1.55; }
.alert > .ic { margin-top: 2px; color: var(--red); }
.alert b { display: block; margin-bottom: 2px; color: var(--red); font-family: var(--font-s); }

.au-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.au-foot nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.au-foot a { display: inline-flex; align-items: center; min-height: 40px; font-family: var(--font-s); font-weight: 600; }
.au-foot a:hover { color: var(--teal); }

/* ── the picture side ────────────────────────────────────────── */
/* the words run down the left of the panel: the pitch at the top, the chips at the foot (under the pitch when the panel is narrow) */
.au-art { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; height: 100dvh; min-height: 640px; overflow: hidden;
  padding: clamp(56px, 10vh, 96px) 48px clamp(24px, 3.6vh, 40px) calc(var(--edge) + 36px); }
.au-rib, .au-panel { position: absolute; inset: 0;
  -webkit-mask: var(--wave-side) left / var(--edge) 100% no-repeat, linear-gradient(#000 0 0) right / calc(100% - var(--edge) + 3px) 100% no-repeat;
  mask: var(--wave-side) left / var(--edge) 100% no-repeat, linear-gradient(#000 0 0) right / calc(100% - var(--edge) + 3px) 100% no-repeat; }
.au-rib.r1 { background: linear-gradient(var(--lime-2), var(--mint-2) 55%, var(--teal-2)); }
.au-rib.r2 { left: 14px; background: linear-gradient(var(--teal-2), var(--teal) 60%, var(--line-2)); }
.au-panel { left: 28px; background: linear-gradient(var(--fog), var(--fog-2) 36%, transparent 56%, var(--fog)), var(--desk) 58% center / cover, var(--night); }

.au-art .bubble { z-index: 2; }
.au-art .b1 { top: 24%; right: 3%; left: auto; width: 56px; }
.au-art .b2 { top: 52%; left: calc(var(--edge) - 6px); width: 40px; animation-delay: -3s; }

.au-pitch { position: relative; z-index: 2; }
.au-kick { color: var(--mint-2); font: 500 18px/1.4 var(--font-s); }
.au-big { max-width: 460px; margin-top: 8px; color: var(--white); font: 400 clamp(28px, 2.9vw, 46px)/1.14 var(--font-d); letter-spacing: .02em; text-transform: uppercase; }
.au-big span { display: block; color: var(--mint-2); }

/* the suited robot: half a body, cut by the bottom edge, its open hand toward the form */
.au-bot { position: absolute; right: 2%; bottom: 0; z-index: 1; width: min(76%, calc((100dvh - 250px) * .833)); max-width: none; filter: drop-shadow(0 30px 40px var(--shadow-2)); }
/* the small robot stands on the floor, pointing up at the form, with the chips kept up by the pitch */
.is-point { justify-content: flex-start; }
.is-point .au-bot { right: 4%; bottom: 4%; width: min(54%, calc((100dvh - 400px) * .667)); }

.au-chips { position: relative; z-index: 3; display: grid; justify-items: start; gap: 12px; margin: 0; padding: 0; list-style: none; }
.au-chips li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: 1px solid var(--glass-line); border-radius: 999px; background: var(--glass); color: var(--white);
  font: 500 15px var(--font-s); white-space: nowrap; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.au-chips b { color: var(--lime-2); font-weight: 700; }
.chip-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: var(--white); }
.chip-ic .ic { width: 18px; height: 18px; stroke-width: 2; }

@media (min-width: 521px) {
  .au-pair .hint:empty { display: block; min-height: 1.45em; }
}

@media (max-width: 1200px) {
  .au-art { justify-content: flex-start; }
  .au-bot { width: min(76%, calc((100dvh - 380px) * .833)); }
}

@media (min-width: 961px) {
  /* the list opens under its button, which sits at the form side's right edge */
  .lang-menu { inset: 76px calc(var(--art) + var(--pad)) auto auto; }
}

/* ── phones and tablets: one column, the picture becomes a small robot by the title ── */
@media (max-width: 960px) {
  .au { grid-template-columns: minmax(0, 1fr); }
  .au-art { display: none; }
  .au-side { padding: 14px 16px 20px; }
  .au-main { align-content: start; padding: 22px 0 36px; }
  .au-intro:has(.au-mini) { min-height: 156px; padding-right: 108px; }
  /* the robot stands on one of the landing's blobs */
  .au-intro:has(.au-mini)::after { content: ''; position: absolute; top: 34px; right: 0; width: 112px; height: 112px; background: url(../images/landing/blob-a.svg) center / contain no-repeat; opacity: .7; }
  .au-mini { display: block; position: absolute; top: -8px; right: 4px; z-index: 1; width: 100px; filter: drop-shadow(0 8px 8px var(--brand-wash)); }
  .au-foot { justify-content: center; text-align: center; }
  .au-foot nav { justify-content: center; }
}

@media (max-width: 640px) {
  .au-back { padding: 0; }
  .au-back span, .au-lang .lang-code { display: none; }
  .au-title { font-size: 30px; }
  .au-tabs a { font-size: 14px; }
  .code6[data-ready] { gap: 7px; }
  .code6[data-ready] i { height: 56px; border-radius: 15px; font-size: 24px; }
}
