/* The pages of signing in: the password (scout_ui/login.html), the authenticator code
   (scout_ui/twofa.html) and choosing a password (scout_ui/password.html). Two sides: what Admiro
   does on the left, the way in on the right. One sheet, so the frame does not shift between steps.

   Light is the app's own light room (src/index.css): a quiet warm paper, a white card, ink for text
   and the button, with the dot grid of the WOW B&R sign-in the look began from. Dark is Admiro's
   screening room.
   data-theme on <html> picks one; each page sets it before first paint from what the person last
   chose in the app or here (light until they choose). */

/* The type, from admiro.io itself rather than Google: no second and third connection before the page
   can be drawn, and the same files the app uses (src/index.css), so a visit fetches them once.
   Latin, and Latin Extended for Turkish (ğ, ş, İ), each fetched only when a page has its letters. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 500; font-display: swap; src: url("/app-assets/fonts/fraunces-latinext-v38.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 500; font-display: swap; src: url("/app-assets/fonts/fraunces-latin-v38.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/app-assets/fonts/plexmono-400-latinext-v20.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/app-assets/fonts/plexmono-400-latin-v20.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/app-assets/fonts/plexmono-500-latinext-v20.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/app-assets/fonts/plexmono-500-latin-v20.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/app-assets/fonts/inter-latinext-v20.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/app-assets/fonts/inter-latin-v20.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root, [data-theme="light"] {
  --page: #F8F5EC; --card: #FFFFFF; --field-bg: #ffffff;
  --ink: #17170F; --ink-soft: #23221A; --ash: #6B6756; --ash-dim: #A19C8A;
  --rule: #E6E1D3; --field: #DCD6C5;
  --panel: #F8F5EC; --panel-edge: #E6E1D3; --panel-soft: #57544A; --panel-hair: #B8A56A;
  --dot: #E6E1D2; --glow: rgba(91, 43, 217, .08); --glow-2: transparent;
  --shot-edge: #DCD6C5; --shot-shade: 0 24px 60px -28px rgba(23, 23, 15, .34), 0 2px 6px rgba(23, 23, 15, .06); --tick: #DBD6C7;
  --link: #5b2bd9; --focus: #5b2bd9;
  --btn: #17170F; --btn-ink: #F8F5EC; --btn-hover: #33322A;
  --stop: #b42318; --stop-soft: rgba(180, 35, 24, .05); --stop-edge: rgba(180, 35, 24, .25);
  --ok: #067647; --ok-soft: #ecfdf3; --ok-edge: rgba(6, 118, 71, .3);
  --qr-tile: #ffffff;
  --icon-turn: 0deg; --orb: 1.5; --cut: 0px, 0px; --rays: scale(.4) rotate(-45deg); --rays-seen: 0;
  --out: cubic-bezier(.16, 1, .3, 1);                    /* fast to arrive, slow to settle */
  --sans: Inter, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --display: Fraunces, "Times New Roman", serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --page: #0d0b14; --card: #15121f; --field-bg: #0f0d18;
  --ink: #f4efe8; --ink-soft: #ded8e6; --ash: #9a93ad; --ash-dim: #746d8b;
  --rule: #2b2540; --field: #3a3355;
  --panel: #100d1c; --panel-edge: rgba(255, 255, 255, .08); --panel-soft: #bdb6cc; --panel-hair: #d6b479;
  --dot: rgba(255, 255, 255, .055); --glow: rgba(124, 92, 255, .34); --glow-2: rgba(214, 180, 121, .10);
  --shot-edge: rgba(255, 255, 255, .13); --shot-shade: 0 30px 70px -24px rgba(0, 0, 0, .8), 0 0 0 1px rgba(124, 92, 255, .10); --tick: rgba(255, 255, 255, .16);
  --link: #b9a5ff; --focus: #9b82ff;
  --btn: #f4efe8; --btn-ink: #100d1c; --btn-hover: #ffffff;
  --stop: #ff9d91; --stop-soft: rgba(255, 157, 145, .07); --stop-edge: rgba(255, 157, 145, .3);
  --ok: #7fdcae; --ok-soft: rgba(127, 220, 174, .08); --ok-edge: rgba(127, 220, 174, .3);
  --qr-tile: #f4efe8;
  --icon-turn: 90deg; --orb: 1; --cut: 14px, -9px; --rays: none; --rays-seen: 1;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--ink);
       font: 400 14px/1.6 var(--sans); display: flex; -webkit-font-smoothing: antialiased; }

/* ---- the left side: what Admiro does, shown on the product itself. Real screens roll through,
   five seconds each, and the headline changes with them (sign-in.js; without it the first headline
   stands alone). Drawn 1440 by 900 and scaled with the window (--u), so it reads as one picture at
   any size rather than text that reflows, and never asks the page to scroll. */
.side { --u: min(calc(100vw / 1440), calc(100vh / 900)); flex: 0 0 54%; min-height: 100vh; display: flex; align-items: center;
        overflow: hidden; color: var(--ink); border-right: 1px solid var(--panel-edge);
        background:
          radial-gradient(ellipse 60% 50% at 72% 58%, var(--glow), transparent 72%),
          radial-gradient(ellipse 45% 40% at 12% 18%, var(--glow-2), transparent 70%),
          radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0) 0 0 / calc(28 * var(--u)) calc(28 * var(--u)),
          var(--panel); }
.side-in { width: 100%; padding: 0 7% 0 10.5%; }
.side .brand { display: flex; align-items: center; gap: calc(13 * var(--u)); margin-bottom: calc(40 * var(--u)); }
.side .brand img { height: calc(36 * var(--u)); width: auto; }
.side .brand span { font: 400 calc(28 * var(--u))/1 var(--display); letter-spacing: -.012em; font-optical-sizing: auto; }
.side h2 { margin: 0; font: 400 calc(54 * var(--u))/1.06 var(--display); letter-spacing: -.02em; font-optical-sizing: auto; }
.side p { margin: calc(16 * var(--u)) 0 0; max-width: 37em; color: var(--panel-soft); font: 400 calc(16.5 * var(--u))/1.55 var(--sans); }

.roll-words { min-height: calc(181 * var(--u)); }       /* two lines of each, so the picture never jumps */
/* each line of the headline sits in its own slot, so one line can leave upward as the next rises into it */
.side h2 .ln { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.side h2 .ln > span { display: block; will-change: transform; }
.roll-shot { position: relative; width: min(100%, calc(640 * var(--u))); margin-top: calc(30 * var(--u)); aspect-ratio: 16 / 10; border-radius: calc(13 * var(--u)); overflow: hidden;
             border: 1px solid var(--shot-edge); background: var(--card); box-shadow: var(--shot-shade); }
.roll-shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0;
                   background: var(--card); }
.roll-shot video[data-kind="scene"] { object-fit: contain; object-position: center; background: #08080c; }   /* a scene is shown whole, on black, as on a screen */
.roll-shot .on { opacity: 1; }                          /* the change between two is a cut, drawn by sign-in.js */
.roll-ticks { display: flex; gap: calc(8 * var(--u)); margin-top: calc(22 * var(--u)); }
.roll-ticks button { flex: 0 0 calc(30 * var(--u)); padding: calc(8 * var(--u)) 0; border: 0; background: none; cursor: pointer;
                     border-radius: 4px; transition: flex-basis .35s ease; }
.roll-ticks button[aria-selected="true"] { flex-basis: calc(60 * var(--u)); }
.roll-ticks i { display: block; height: calc(3 * var(--u)); min-height: 2px; border-radius: 99px; background: var(--tick); overflow: hidden; }
.roll-ticks i::after { content: ""; display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--ink);
                       transform-origin: left; transform: scaleX(var(--p, 0)); }
.roll-ticks button:focus-visible { outline: none; box-shadow: none; }          /* the ring goes round the tick itself, not its pressing area */
.roll-ticks button:focus-visible i { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--focus); overflow: visible; }

/* ---- the right side: the card sits in the middle of the right half */
.way { flex: 1 1 46%; min-height: 100vh; display: flex; align-items: center; justify-content: center;
       padding: 24px calc(4vw + 24px) 24px 24px; }
.card { width: 100%; max-width: 380px; }
.card > .brand { display: none; align-items: center; gap: 10px; margin-bottom: 20px; }   /* the left side carries the name */
.card > .brand img { height: 30px; width: auto; }
.card > .brand span { font: 400 22px/1 var(--display); letter-spacing: -.012em; font-optical-sizing: auto; }
h1 { font: 600 21px/1.2 var(--sans); letter-spacing: -0.02em; margin: 0 0 6px; }
.sub { font-size: 13.5px; color: var(--ash); margin: 0 0 22px; }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 22px;
         box-shadow: 0 1px 2px rgba(23, 23, 15, .05); }
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password] {
  width: 100%; background: var(--field-bg); color: var(--ink); border: 1px solid var(--field); border-radius: 8px;
  padding: 10px 11px; font: 400 14px var(--sans); margin-bottom: 15px; transition: border-color .15s, box-shadow .22s; }
input::placeholder { color: var(--ash-dim); }
input:focus { outline: none; border-color: var(--focus); }
/* A ring, not a rectangle: box-shadow follows the element's own radius, where outline squares off a rounded control. */
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--focus); }
.go { position: relative; overflow: hidden; width: 100%; background: var(--btn); border: none; color: var(--btn-ink); font: 500 13.5px var(--sans);
      border-radius: 8px; padding: 11px; cursor: pointer; box-shadow: 0 1px 2px rgba(11, 11, 15, .16);
      transition: background .15s, transform .12s, opacity .2s; }
.go:hover { background: var(--btn-hover); }
.go:active:not(:disabled) { transform: scale(.985); }
.go:disabled { opacity: .55; cursor: default; }
/* asked and waiting on the server: a line runs along the foot of the button until the answer is back */
.go[data-busy]:disabled { opacity: .86; cursor: progress; }
.go[data-busy]::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38%; height: 2px; background: currentColor; opacity: .6;
                        animation: busy 1.05s cubic-bezier(.45, 0, .25, 1) infinite; }
/* another way in, above the form: Google or Apple in place of a password (the code is still asked for after) */
.social { display: grid; gap: 9px; }
.social a { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 12px; border-radius: 8px;
            border: 1px solid var(--field); background: var(--field-bg); color: var(--ink); font: 500 13.5px var(--sans); text-decoration: none;
            transition: border-color .15s, background-color .15s, transform .12s; }
.social a:hover { border-color: var(--ash-dim); }
.social a:active { transform: scale(.985); }
.social svg { width: 18px; height: 18px; flex: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 15px 0 14px; color: var(--ash-dim); font: 400 12px var(--sans); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
/* two fields side by side, so asking for access is no taller than it need be; one above the other on a narrow phone */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
.duo .pick { margin-bottom: 15px; }
.duo .pick button { padding: 9px 4px; }
@media (max-width: 420px) { .duo { grid-template-columns: minmax(0, 1fr); } }
/* a username: @ in front, as people will see it, and beside its label whether it can be had */
.lbl-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.lbl-row label { margin-bottom: 0; }
.state { font-size: 11.5px; color: var(--ash-dim); white-space: nowrap; }
.state.ok { color: var(--ok); }
.state.bad { color: var(--stop); }
.handle { position: relative; margin-bottom: 15px; }
.handle > span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ash-dim); font: 400 14px var(--sans); pointer-events: none; }
.handle input[type=text] { margin-bottom: 0; padding-left: 25px; }
.handle input[aria-invalid="true"] { border-color: var(--stop-edge); }
/* a choice between two, such as the language */
.pick { display: flex; gap: 3px; padding: 3px; margin-bottom: 15px; border-radius: 9px; background: var(--page); border: 1px solid var(--field); }
.pick button { flex: 1; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--ash); font: 400 13px var(--sans); cursor: pointer;
               transition: background-color .15s, color .15s; }
.pick button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(23, 23, 15, .12); }
.msg { display: none; margin-top: 14px; padding: 9px 11px; border-radius: 8px; font-size: 12.5px;
       background: var(--stop-soft); border: 1px solid var(--stop-edge); color: var(--stop); }
.msg.on { display: block; animation: rise-in .3s var(--out) both; --rise: -5px; }
.msg.ok { background: var(--ok-soft); border-color: var(--ok-edge); color: var(--ok); }
.alt { margin-top: 14px; text-align: center; font-size: 12.5px; }
.alt a, .linkish { color: var(--link); text-decoration: none; }
.alt a:hover, .linkish:hover { text-decoration: underline; }
.linkish { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; border-radius: 4px; }
.foot { margin-top: 18px; font: 400 11.5px var(--mono); color: var(--ash-dim); }
.foot a { color: var(--ash); }

/* ---- the theme switch: one small disc in the corner. It shows what a press will give: a moon
   by day, a sun by night, and the one turns into the other. */
.theme { position: fixed; top: max(20px, env(safe-area-inset-top)); right: max(22px, env(safe-area-inset-right)); z-index: 5; touch-action: manipulation; width: 38px; height: 38px; padding: 0; display: grid; place-items: center;
         border-radius: 50%; border: 1px solid var(--field); background: var(--card); color: var(--ink); cursor: pointer;
         box-shadow: 0 1px 2px rgba(23, 23, 15, .06); transition: border-color .2s, transform .2s; }
.theme:hover { border-color: var(--ash-dim); }
.theme:active { transform: scale(.94); }
.theme svg { width: 18px; height: 18px; display: block; overflow: visible; transform: rotate(var(--icon-turn)); transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.theme .orb { transform-box: fill-box; transform-origin: center; transform: scale(var(--orb));
              transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.theme .cut { transform: translate(var(--cut)); transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.theme .rays { transform-box: fill-box; transform-origin: center; transform: var(--rays); opacity: var(--rays-seen);
               transition: transform .5s cubic-bezier(.4, 0, .2, 1), opacity .3s; }

/* ---- the code step */
[hidden] { display: none !important; }
.scan { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.qr { flex: none; width: 132px; height: 132px; padding: 6px; border-radius: 12px; background: var(--qr-tile); border: 1px solid var(--field); }
.qr svg { display: block; width: 100%; height: 100%; }
.scan-how { font-size: 13px; line-height: 1.55; color: var(--ink-soft); margin: 0; padding-top: 2px; }
.scan-how .linkish { display: inline-block; margin-top: 8px; font-size: 12.5px; text-align: left; }
.key { display: flex; align-items: center; gap: 10px; margin: -4px 0 16px; padding: 9px 11px; border-radius: 8px;
       border: 1px dashed var(--field); background: var(--field-bg); }
.key code { flex: 1; font: 500 12.5px/1.5 var(--mono); letter-spacing: .02em; color: var(--ink); overflow-wrap: anywhere; }
.key .linkish { flex: none; font-size: 12.5px; }
/* six cells, read the way an authenticator app shows them: three and three */
.cells { display: flex; gap: 7px; margin-bottom: 16px; }
.cells input { flex: 1 1 0; min-width: 0; height: 52px; padding: 0; text-align: center; border-radius: 10px;
               border: 1px solid var(--field); background: var(--field-bg); color: var(--ink);
               font: 500 22px/1 var(--mono); caret-color: var(--focus); transition: border-color .15s, background-color .25s, box-shadow .22s; }
.cells input:nth-child(4) { margin-left: 10px; }
.cells input:focus { outline: none; border-color: var(--focus); }
.cells.bad input { border-color: var(--stop-edge); }
/* the code was right: the six cells take the colour one after another while the next page loads */
.cells.ok input { border-color: var(--ok-edge); background: var(--ok-soft); }
.cells.ok input:nth-child(2) { transition-delay: .03s; } .cells.ok input:nth-child(3) { transition-delay: .06s; }
.cells.ok input:nth-child(4) { transition-delay: .09s; } .cells.ok input:nth-child(5) { transition-delay: .12s; }
.cells.ok input:nth-child(6) { transition-delay: .15s; }
.saved { margin: 0 0 16px; padding: 14px 12px; border-radius: 10px; border: 1px dashed var(--field); background: var(--field-bg);
         display: flex; align-items: center; gap: 10px; }
.saved code { flex: 1; font: 500 15px/1.4 var(--mono); letter-spacing: .06em; color: var(--ink); overflow-wrap: anywhere; }
.tick { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; font-size: 13px; font-weight: 400; color: var(--ink-soft); cursor: pointer; }
.tick input { width: 16px; height: 16px; margin: 0; accent-color: var(--link); }
.wait { color: var(--ash); font-size: 13.5px; margin: 0; }

@media (max-width: 900px) {          /* a phone: the form alone, with the name back on it */
  .side { display: none; }
  .way { padding: 64px 24px 24px; }
  .card > .brand { display: flex; }
}
/* a phone on its side: little height to spare, so the form starts at the top and wastes none of it */
@media (max-width: 900px) and (max-height: 500px) {
  .way { align-items: flex-start; padding-top: max(14px, env(safe-area-inset-top)); padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(72px, env(safe-area-inset-right)); }
  .card > .brand { margin-bottom: 10px; }
  .sub { margin-bottom: 12px; }
  .panel { padding: 16px; }
}
/* under a finger rather than a pointer: every target a finger can hit, and type large enough that
   the phone does not zoom the page in when a field is tapped */
@media (pointer: coarse) {
  input[type=text], input[type=email], input[type=password] { font-size: 16px; min-height: 46px; }
  .go { min-height: 46px; font-size: 15px; }
  .social a { min-height: 46px; font-size: 15px; }
  .theme { width: 44px; height: 44px; }
  .alt a, .linkish { display: inline-block; padding: 8px 4px; margin: -8px -4px; }
  .roll-ticks button { padding-top: calc(14 * var(--u)); padding-bottom: calc(14 * var(--u)); }
}
/* a very large screen: the left side grows with the window, so the form grows with it rather than
   being left the size of a postage stamp beside it */
@media (min-width: 1800px) and (min-height: 1000px) { .card, .theme { zoom: 1.15; } }
@media (min-width: 2200px) and (min-height: 1200px) { .card, .theme { zoom: 1.32; } }
@media (min-width: 3000px) and (min-height: 1600px) { .card, .theme { zoom: 1.65; } }
}
/* ---- movement. Three things move, and each says something:
   arriving (once a visit, the left side assembles and the card comes up), the cut from one screen to
   the next, and an answer to something the person did (a press, a wrong code, a step forward).
   Between the steps of signing in nothing on the left moves at all: the browser carries the page
   across (a view transition) and only the card changes. */
@keyframes rise-in { from { opacity: 0; transform: translateY(var(--rise, 12px)); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes line-up { from { transform: translateY(112%); } }
@keyframes shot-in { from { opacity: 0; transform: translateY(calc(26 * var(--u))) scale(.982); box-shadow: 0 0 0 rgba(0, 0, 0, 0); } }
@keyframes tick-in { from { opacity: 0; transform: scaleX(.2); } }
@keyframes busy { from { transform: translateX(-110%); } to { transform: translateX(275%); } }
@keyframes qr-in { from { opacity: 0; transform: scale(.94); } }
@keyframes card-out { to { opacity: 0; transform: translateX(-14px); } }
@keyframes card-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes shown-anyway { to { visibility: visible; } }

/* the left side waits, unseen, for sign-in.js to build the roll (a moment; shown regardless after 2.5 s) */
html.js .side-in:not(.ready) { visibility: hidden; animation: shown-anyway 0s linear 2.5s forwards; }
html:not(.settled) .side-in.ready .brand { animation: rise-in .8s var(--out) both; }
html:not(.settled) .side-in.ready h2 .ln > span { animation: line-up 1s var(--out) .1s both; }
html:not(.settled) .side-in.ready h2 .ln:nth-child(2) > span { animation-delay: .19s; }
html:not(.settled) .side-in.ready p { animation: rise-in .8s var(--out) .36s both; --rise: 8px; }
html:not(.settled) .side-in.ready .roll-shot { animation: shot-in 1.15s var(--out) .3s both; }
html:not(.settled) .side-in.ready .roll-ticks button { animation: tick-in .6s var(--out) both; transform-origin: left; }
html:not(.settled) .side-in.ready .roll-ticks button:nth-child(1) { animation-delay: .78s; } html:not(.settled) .side-in.ready .roll-ticks button:nth-child(2) { animation-delay: .83s; }
html:not(.settled) .side-in.ready .roll-ticks button:nth-child(3) { animation-delay: .88s; } html:not(.settled) .side-in.ready .roll-ticks button:nth-child(4) { animation-delay: .93s; }
html:not(.settled) .side-in.ready .roll-ticks button:nth-child(5) { animation-delay: .98s; }
html:not(.settled) .card { animation: rise-in .8s var(--out) .14s both; }
html:not(.settled) .theme { animation: fade-in .6s ease .5s both; }

/* a step forward inside the code page, and the QR code as it arrives */
section:not([hidden]):not(#s-wait) { animation: rise-in .42s var(--out) both; --rise: 10px; }
.qr svg { animation: qr-in .55s var(--out) both; }

/* from one page of signing in to the next: the card leaves to the left and the next comes from the right */
@view-transition { navigation: auto; }
.card { view-transition-name: card; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
::view-transition-group(card) { animation-duration: .38s; animation-timing-function: var(--out); }
::view-transition-old(card), ::view-transition-new(card) { width: 100%; height: 100%; object-fit: none; object-position: top; }
::view-transition-old(card) { animation: card-out .2s ease-in both; }
::view-transition-new(card) { animation: card-in .46s cubic-bezier(.16, 1, .3, 1) .1s both; }
/* The theme changing. The page is drawn a second time in the new theme, over the first (.ghost, made
   by sign-in.js), and opened out from the switch through a mask whose edge is soft: a wide feather
   rather than a line, so the two themes melt into each other as it passes. Nothing is captured or
   waited for, so the opening is on screen the frame after the press; the browser's own page-carry
   needs two frames before anything can move. The old theme goes on living underneath until covered.
   sign-in.js says where the switch is (--tx, --ty), how far the far corner is (--tr) and how wide the
   feather (--soft). It does not start from nothing: a soft patch of the new theme is there round the
   switch on the first frame, and it moves fastest at the start, so the press is answered at once. */
@property --open { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes theme-open { from { --open: 130px; } to { --open: var(--tr, 200vmax); } }
.ghost { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; background: var(--page); color: var(--ink);
  -webkit-mask-image: radial-gradient(circle at var(--tx, 100%) var(--ty, 0%), #000 calc(var(--open) - var(--soft, 200px)), transparent var(--open));
          mask-image: radial-gradient(circle at var(--tx, 100%) var(--ty, 0%), #000 calc(var(--open) - var(--soft, 200px)), transparent var(--open));
  animation: theme-open .95s cubic-bezier(.3, .62, .2, 1) both; }
/* in the hand (sign-in.js decides): a plain fade, which never asks for more than the graphics chip can do alone */
@keyframes ghost-fade { from { opacity: 0; } }
.ghost.fade { -webkit-mask-image: none; mask-image: none; will-change: opacity; animation: ghost-fade .24s ease-out both; }
.ghost-in { display: flex; min-height: 100vh; }
.ghost * , .ghost *::before, .ghost *::after { animation: none !important; transition: none !important; }   /* a picture of the page as it stands, not a second arrival */
.ghost .card { view-transition-name: none; }
.ghost .side-in { visibility: visible; }
/* the film is not drawn a second time: it stays in the page, lifted above the second drawing, and takes the new theme's edge with a fade */
.ghost .roll-shot { visibility: hidden; }
.roll-shot { transition: border-color .4s ease, box-shadow .4s ease, background-color .4s ease; }
.roll-shot.lifted { z-index: 70; }
.roll-still { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }   /* the last frame of the take that left, fading */
.ghost .was-focused { border-color: var(--focus); box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--focus); }
/* the frame the page itself takes the new theme: nothing slides from the old colours (sign-in.js) */
html.switching *, html.switching *::before, html.switching *::after { transition: none !important; }
/* where the browser cannot carry the page across, every colour eases over instead */
html.fading, html.fading *, html.fading *::before, html.fading *::after {
  transition: background-color .5s ease, color .5s ease, border-color .5s ease, box-shadow .5s ease, fill .5s ease, stroke .5s ease !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html.js .side-in:not(.ready) { visibility: visible; }
  .roll-ticks button[aria-selected="true"] i::after { transform: none; }
  @view-transition { navigation: none; }
  .ghost { animation: none; -webkit-mask-image: none; mask-image: none; }
}
