/* Sign in, Create account, the code step and Sign in with Hetu on the landing's night (owner 7 Nov 2026).
   Every account step fits one screen: the page never scrolls; if the form is taller than the window, the card
   scrolls inside itself (owner 7 Nov: "avoid scrolling in the sign-in sign-up pipeline"; the people may be cut).
   Pictures (owner's, cleaned by tools/auth_art2.py): sign in and connect, the four meeting; create account, the four
   walking off into the night; the code step, two pairs exchanging papers. Per picture: --ar its shape, --gx --gy the
   group's centre and --gw --gh its size, as shares of the picture.
   Wide screens: the card stands at the right edge, the group fills the room to its left.
   Narrow screens: the card at the top, the group fills whatever height is left under it, cut by the window's foot. */
html:not(#_){overflow-x:clip}
html:has(>body.lp[data-auth]):not(#_){height:100%;overflow:hidden}
html body.lp[data-auth]:not(#_):not(#_){
 --img:url("art/auth/auth-signin.jpg?v=bd3db54d64");--ar:2000/1116;--gx:.481;--gy:.546;--gw:.355;--gh:.558;--pmax:118svh;
 --cw:440px;--m:clamp(24px,3.6vw,64px);
 position:relative;box-sizing:border-box;display:flex;flex-direction:column;height:100vh;height:100svh;min-height:0;margin:0;padding:0;overflow:hidden;
 background:#2a2b63 url("art/ribbon/tex-sky.jpg?v=75c4b0bc45") 50% 0/cover no-repeat}
html body.lp[data-auth="signup"]:not(#_):not(#_){--img:url("art/auth/auth-signup.jpg?v=552de0826b");--ar:2000/1493;--gx:.472;--gy:.541;--gw:.475;--gh:.559}
html body.lp[data-auth]:not(#_):not(#_):has(form[data-au=otp-login],form[data-au=code]){--img:url("art/auth/auth-code.jpg?v=5c59152d64");--ar:985/548;--gx:.492;--gy:.511;--gw:.349;--gh:.701;--pmax:84svh}
body.lp[data-auth]::after{content:none}
body.lp[data-auth]::before{content:"";pointer-events:none}
body.lp[data-auth] .au:not(#_):not(#_){position:relative;z-index:1;box-sizing:border-box;display:flex;min-height:0;gap:0}
body.lp[data-auth] .au-wrap:not(#_):not(#_){display:flex;flex-direction:column;min-height:0;max-height:100%;width:100%;max-width:var(--cw)}
body.lp[data-auth] .au-card:not(#_):not(#_){max-width:none;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;
 border-radius:16px;box-shadow:0 1px 2px rgba(10,10,40,.25),0 24px 60px -18px rgba(8,8,36,.55)}
body.lp[data-auth] .au .au-back:not(#_):not(#_){flex:none;color:#e9e2d2}
body.lp[data-auth] .au .au-back:not(#_):not(#_):hover{color:#fff}
body.lp[data-auth] .au .au-back:not(#_):not(#_):focus-visible{outline:2px solid #f7f1e6;outline-offset:3px;border-radius:6px}

/* Create account, from a tablet up: a wider card with paired fields (name and email; password and confirmation),
   two rows shorter, so the whole form fits a laptop screen */
@media (min-width:640px){
 html body.lp[data-auth="signup"]:not(#_):not(#_):has(form[data-au=signup-request],.au-card:empty){--cw:560px}      /* empty: the same width before auth.js draws it (FE-69) */
 body.lp[data-auth] form[data-au=signup-request]:not(#_){display:grid;grid-template-columns:1fr 1fr;column-gap:16px;align-items:start}
 body.lp[data-auth] form[data-au=signup-request]:not(#_)>*{grid-column:1/-1;min-width:0}
 body.lp[data-auth] form[data-au=signup-request]:not(#_)>:is(.au-field:nth-child(1),.au-field:nth-child(2),.au-field-password){grid-column:auto}}

/* wide screens: card at the right edge, full height available; the group centred in the room to its left */
@media (min-width:1000px) and (min-aspect-ratio:5/4){
 html body.lp[data-auth]:not(#_):not(#_){
  --la:calc(100vw - var(--cw) - 2 * var(--m));
  --ph:min(var(--pmax),calc(var(--la) * .86 / (var(--gw) * var(--ar))));--pw:calc(var(--ph) * var(--ar))}
 body.lp[data-auth]::before{position:fixed;width:var(--pw);height:var(--ph);
  left:calc(var(--la) / 2 + var(--m) / 2 - var(--gx) * var(--pw));top:calc(53svh - var(--gy) * var(--ph));
  background:var(--img) 0 0/100% 100% no-repeat;
  -webkit-mask-image:linear-gradient(90deg,#0000,#000 14%,#000 86%,#0000),linear-gradient(#0000,#000 14%,#000 86%,#0000);-webkit-mask-composite:source-in;
  mask-image:linear-gradient(90deg,#0000,#000 14%,#000 86%,#0000),linear-gradient(#0000,#000 14%,#000 86%,#0000);mask-composite:intersect}
 body.lp[data-auth] .au:not(#_):not(#_){flex:1 1 auto;height:100%;align-items:center;justify-content:flex-end;
  padding:clamp(16px,3svh,40px) var(--m)}
 body.lp[data-auth] .au .au-back:not(#_):not(#_){position:fixed;top:clamp(14px,2.6svh,28px);left:var(--m);margin:0}}

/* narrow screens: card first; the picture takes the height left beneath it (at least --minpic), heads near its top */
@media not ((min-width:1000px) and (min-aspect-ratio:5/4)){
 html body.lp[data-auth]:not(#_):not(#_){--minpic:clamp(110px,22svh,280px);--iw:130vw}
 body.lp[data-auth] .au:not(#_):not(#_){flex:0 1 auto;justify-content:center;padding:clamp(12px,2.4svh,32px) 16px 0}
 body.lp[data-auth] .au .au-back:not(#_):not(#_){height:36px;margin-bottom:6px}
 body.lp[data-auth]::before{order:2;flex:1 0 var(--minpic);
  background:var(--img) no-repeat;
  background-size:auto max(calc(100% + 60px),calc(var(--iw) / (var(--ar))));
  background-position:calc(50vw - var(--gx) * var(--iw)) calc(28px - (var(--gy) - var(--gh) / 2) * var(--iw) / (var(--ar)));
  -webkit-mask-image:linear-gradient(#0000,#000 48px);mask-image:linear-gradient(#0000,#000 48px)}}
/* short windows: tighter card spacing so more of the form shows before the card has to scroll */
@media (max-height:780px){
 body.lp[data-auth] .au-card:not(#_):not(#_){padding:26px 32px 24px}
 body.lp[data-auth] .au-card .au-brand{margin-bottom:14px}
 body.lp[data-auth] .au-card .au-lede{margin-bottom:16px}
 body.lp[data-auth] .au-card .au-field{margin-bottom:12px}}
@media (max-height:740px){
 body.lp[data-auth] .au-card:not(#_):not(#_){padding-top:22px;padding-bottom:20px}
 body.lp[data-auth] .au-card .au-plan-price:not(#_){margin-bottom:10px}
 body.lp[data-auth] .au-card .au-alt{margin-top:12px}}
@media (max-width:640px){body.lp[data-auth] .au-card:not(#_):not(#_){padding:24px 20px 20px}}

/* 7 Nov polish: the chosen plan's price under the heading; headings break evenly; labels at 12px; phone taps 44px */
body.lp[data-auth] .au-plan-price:not(#_){margin:-6px auto 14px;width:fit-content;padding:4px 12px;border-radius:999px;background:var(--accent-tint,#ecebf7);color:var(--ink,#1d1b2e);font:500 13px/20px var(--sans);text-align:center}
body.lp[data-auth] .au h1{text-wrap:balance}
body.lp[data-auth] .au .au-lede{text-wrap:pretty}
@media (pointer:coarse),(max-width:640px){
 body.lp[data-auth] .au .au-linkbtn{min-height:44px;min-width:44px}
 /* D-F: Send code stays inside the number box (its inner height); a finger gets 44 from an invisible area over its edges */
 body.lp[data-auth] .au .au-inline-btn{position:relative;min-width:44px}
 body.lp[data-auth] .au .au-inline-btn::after{content:"";position:absolute;inset:-3px 0}
 /* SG-01: the password box's Show button keeps its drawn 56x30 inside the 40px box and answers a finger over 44 with an
    invisible area (it was drawn 44 tall, past the box's own edges) */
 body.lp[data-auth] .au .au-reveal::after{content:"";position:absolute;inset:-7px 0}
 body.lp[data-auth] .au .au-check{min-height:44px;align-items:center}}

/* While typing (keyboard.js sets html.hp-typing: a field has focus and the on-screen keyboard is open) the page is not locked: it grows to the whole card, keeps room the height of the keyboard below it, and scrolls, so every field, the terms box and the Sign in / Create account button can be brought above the keyboard (plan 2.8, step 2). */
html.hp-typing:has(>body.lp[data-auth]):not(#_){height:auto;overflow:visible}
html.hp-typing body.lp[data-auth]:not(#_):not(#_){height:auto;min-height:100svh;overflow:visible;padding-bottom:var(--hp-kb-room,0px)}
html.hp-typing body.lp[data-auth] .au-wrap:not(#_):not(#_){max-height:none}
html.hp-typing body.lp[data-auth] .au-card:not(#_):not(#_){overflow-y:visible}

/* a touch screen of any width: 16px in the boxes, so an iPad does not zoom the page in on tap (phone width already had it) */
@media (pointer:coarse){
 body.lp[data-auth] .au :is(input:not([type=checkbox]):not([type=radio]),select,textarea):not(#_):not(#__){font-size:16px}
 body.lp[data-auth] .au .au-code input:not(#_):not(#__){font-size:22px}}
