/* The sign-in page (ADR-0038): the learner page's frame and night sky, its sheet as see-through frosted glass. */
:root{--sky:#080808;--paper:#f4efdf;--text:#f6f3ea;--soft:rgba(246,243,234,.75);--muted:rgba(246,243,234,.55);
 --hint:rgba(246,243,234,.42);--hair:rgba(246,243,234,.2);--focus:#8fb8e8;--error:#ff9b8c;
 --brand:"Avenir Next","Avenir","Helvetica Neue",Arial,sans-serif;
 --frame-gap:clamp(18px,3vw,40px);--footer:calc(78px + env(safe-area-inset-bottom) * .5);--keyboard:0px;
 color-scheme:dark;background:var(--sky)}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;overflow:hidden;background:var(--sky);color:var(--text);font-family:var(--brand);-webkit-text-size-adjust:100%}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
[hidden]{display:none!important}

/* A full night sky, so the glass has stars to show through it. */
.sky{position:fixed;inset:0;color:var(--paper);pointer-events:none;overflow:hidden}
.sky span{position:absolute;transform:translate(-50%,-50%)}
.sky svg{display:block;width:100%;height:100%;fill:currentColor}
.sky .sparkle svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.sky .dot{border-radius:50%;background:currentColor}

/* The sheet, where the learner page's paper sits, as frosted glass: very see-through, with a faint sheen and a
   bright top edge. When the keyboard is up, its bottom rises above the keyboard. */
.glass{position:fixed;top:calc(var(--frame-gap) + env(safe-area-inset-top));left:calc(var(--frame-gap) + env(safe-area-inset-left));
 right:calc(var(--frame-gap) + env(safe-area-inset-right));bottom:max(var(--footer),calc(var(--keyboard) + 12px));
 border-radius:clamp(26px,5vw,48px);overflow:hidden;display:flex;align-items:center;justify-content:center;padding:0 22px;
 background:linear-gradient(160deg,rgba(255,255,255,.085),rgba(255,255,255,.015) 36%,rgba(255,255,255,.01) 68%,rgba(255,255,255,.045));
 -webkit-backdrop-filter:blur(4px) saturate(160%) brightness(1.2);backdrop-filter:blur(4px) saturate(160%) brightness(1.2);
 border:1px solid rgba(255,255,255,.13);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.22),inset 0 -1px 0 rgba(255,255,255,.05),inset 0 0 26px rgba(255,255,255,.035),0 18px 40px rgba(0,0,0,.4);
 transition:bottom .25s ease}
.step{width:100%;max-width:330px;display:flex;flex-direction:column;align-items:center;text-align:center;transition:opacity .35s ease}

/* The lockup, as on the brand cards. The mark's edge glows faintly and slowly breathes, so the black circle stands
   apart from the dark; it holds still when reduced motion is on. */
.mark{display:block;width:76px;height:76px;overflow:visible;animation:halo 5s ease-in-out infinite}
.mark.small{width:54px;height:54px}
@keyframes halo{0%,100%{filter:drop-shadow(0 0 1.5px rgba(255,255,255,.4)) drop-shadow(0 0 8px rgba(255,255,255,.12))}
 50%{filter:drop-shadow(0 0 2.5px rgba(255,255,255,.62)) drop-shadow(0 0 15px rgba(255,255,255,.24))}}
.word{font-weight:700;font-size:33px;letter-spacing:.1px;line-height:1;margin:14px 0 0}
.tag{font-size:14px;letter-spacing:.1px;color:var(--muted);margin:10px 0 0;white-space:nowrap}

/* One field with its arrow inside. An action has the same shape: the white arrow is the one way to go on. */
.field{position:relative;width:100%;height:56px;margin:42px 0 0;border:1px solid var(--hair);border-radius:28px;
 background:rgba(246,243,234,.04);display:flex;align-items:center}
.field:focus-within{border-color:rgba(246,243,234,.42)}
.field input{flex:1;min-width:0;height:100%;padding:0 62px 0 22px;border:0;background:transparent;color:var(--text);
 font:500 17px var(--brand);outline:none;border-radius:28px}
.field input::placeholder{color:var(--hint);font-weight:400}
.go{position:absolute;right:6px;top:6px;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:#fff;
 display:grid;place-items:center;cursor:pointer;transition:opacity .2s ease}
.go:disabled{opacity:.25;cursor:default}
.go svg{width:20px;height:20px;fill:none;stroke:#111;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
button.field.action{margin:28px 0 0;padding:0 62px 0 22px;color:var(--text);font:500 17px var(--brand);text-align:left;cursor:pointer}
.quiet{font-size:13px;letter-spacing:.3px;color:var(--muted);margin:16px 0 0}

/* The code: six numerals on fine lines. One real input lies over them, so typing, pasting and the code that the
   iPhone offers from Mail all work; it is 16px or more, so the iPhone does not zoom in. */
.say{font-size:17px;line-height:1.5;color:var(--soft);margin:20px 0 0;overflow-wrap:anywhere}
.say b{font-weight:600;color:var(--text)}
.code{position:relative;display:flex;gap:12px;margin:30px 0 0}
.code span{width:32px;height:50px;border-bottom:1.6px solid rgba(246,243,234,.22);font-weight:600;font-size:33px;line-height:50px;color:var(--text);position:relative}
.code span.full{border-color:var(--text)}
.code.typing span.here{border-color:var(--focus)}
.code.typing span.here::after{content:"";position:absolute;left:50%;top:10px;width:1.5px;height:30px;background:var(--focus);animation:caret 1.1s steps(1) infinite}
@keyframes caret{50%{opacity:0}}
.code input{position:absolute;inset:0;width:100%;height:100%;opacity:.01;font-size:16px;color:transparent;caret-color:transparent;
 background:transparent;border:0;outline:none;letter-spacing:30px;z-index:1}
.code.bad span{border-color:var(--error)}
.code.shake{animation:shake .4s ease}
@keyframes shake{20%,60%{transform:translateX(-7px)}40%,80%{transform:translateX(7px)}}
.note{min-height:1.5em;font-size:14.5px;line-height:1.5;color:var(--muted);margin:14px 0 0}
.note.error{color:var(--error)}
.links{font-size:14px;color:var(--muted);margin:22px 0 0;white-space:nowrap}
.links i{font-style:normal;margin:0 8px}
.link{padding:6px 0;border:0;background:transparent;color:var(--soft);font:14px var(--brand);cursor:pointer;
 text-decoration:underline;text-decoration-color:rgba(246,243,234,.3);text-underline-offset:4px}
.link:disabled{opacity:.45;cursor:default}
button:focus-visible,.link:focus-visible{outline:3px solid var(--focus);outline-offset:3px}

/* Signed in: the words fade and the glass becomes the learner page's cream paper. */
.glass::after{content:"";position:absolute;inset:0;background:var(--paper);opacity:0;transition:opacity .6s ease;pointer-events:none}
.done .step{opacity:0}
.done .glass::after{opacity:1}

@media(max-height:560px){.mark{width:56px;height:56px}.word{font-size:27px}.field{margin-top:24px}.code{margin-top:20px}.say{margin-top:12px}}
@media (prefers-reduced-motion:reduce){.mark{animation:none;filter:drop-shadow(0 0 2px rgba(255,255,255,.5)) drop-shadow(0 0 10px rgba(255,255,255,.17))}
 .code.shake{animation:none}.code.typing span.here::after{animation:none}.glass,.step{transition:none}}
