/* Log in, sign up and "finish setting up" (login.html, register.html): the approved split design
   (the Log in / Sign up boards in the "Outrivo final design ideas" artifact). The form on the left
   half, the brand film on a black right half; below 900px the form only.
   Self-contained: its own tokens (the dashboard's values), light and dark through the same
   html[data-theme="dark"] switch as dashboard.html. Monochrome only. */
:root {
  color-scheme: light;
  --disp: 'Google Sans Flex', system-ui, sans-serif;
  --bg: #ffffff; --panel: #ffffff; --panel2: #fafafa; --ink: #18181b; --ink2: #3f3f46; --ink3: #6b6b74;
  --line: #e4e4e7; --line2: #efeff1; --hl: #f1f1f3; --inb: #d4d4d8; --inbh: #a1a1aa; --inbg: #ffffff; --ul: #c4c4ca;
  --ring: rgba(24, 24, 27, .1); --acc: #18181b; --dig: #fafafa; --swon: #ffffff;
  --pri: linear-gradient(180deg, #3f3f46 0%, #18181b 55%, #27272a 100%); --prih: linear-gradient(180deg, #52525b 0%, #27272a 55%, #3f3f46 100%); --prit: #ffffff;
  --pris: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(9, 9, 11, .3), 0 8px 18px -10px rgba(24, 24, 27, .7);
  --sh1: 0 1px 2px rgba(9, 9, 11, .14), 0 0 0 1px var(--line);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b; --panel: #111113; --panel2: #121214; --ink: #fafafa; --ink2: #d4d4d8; --ink3: #9a9aa3;
  --line: #232327; --line2: #1b1b1e; --hl: #1b1b1e; --inb: #34343a; --inbh: #5b5b63; --inbg: #0e0e10; --ul: #52525b;
  --ring: rgba(250, 250, 250, .14); --acc: #fafafa; --dig: #111113; --swon: #27272a;
  --pri: linear-gradient(180deg, #ffffff 0%, #e4e4e7 55%, #c4c4ca 100%); --prih: linear-gradient(180deg, #ffffff 0%, #f4f4f5 55%, #d4d4d8 100%); --prit: #09090b;
  --pris: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0, 0, 0, .5);
  --sh1: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px #34343a;
}

html, body { margin: 0; min-height: 100%; }
.a-body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--disp); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; transition: background-color .3s, color .3s; }
.a-body *, .a-body *::before, .a-body *::after { box-sizing: border-box; }
.a-body :focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.a-body button { font: inherit; }
.a-body [hidden] { display: none !important; }

/* Icons drawn in currentColor from a mask, for lines whose text the script sets */
.a-err::before, .a-msg::before, .a-note::before, .a-rule::before {
  content: ''; flex: none; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
}
.a-err, .a-msg {
  --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.2 2.6 17.6a2 2 0 0 0 1.7 3h15.4a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9.5V14'/%3E%3Cpath d='M12 17.2v.1'/%3E%3C/svg%3E");
}
.a-note, .a-rule {
  --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* Page: the form half and the film half */
.a-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.a-pane { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; background: var(--bg); transition: background-color .3s; }
.a-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 30px 48px 0; }
.a-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 21px; font-weight: 650; letter-spacing: -0.03em; }
.a-brand img { flex: none; width: 30px; height: 30px; border-radius: 50%; filter: grayscale(1) contrast(1.15); mix-blend-mode: multiply; }
html[data-theme="dark"] .a-brand img { filter: grayscale(1) invert(1) contrast(1.1); mix-blend-mode: screen; }

/* Log in / Create account */
.a-sw { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--hl); box-shadow: inset 0 0 0 1px var(--line2); }
.a-sw a { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 8px; color: var(--ink3); font-size: 13.5px; font-weight: 550; white-space: nowrap; text-decoration: none; transition: background-color .2s, color .2s, box-shadow .2s; }
.a-sw a:hover { color: var(--ink); }
.a-sw a[aria-current="page"] { background: var(--swon); color: var(--ink); box-shadow: var(--sh1); }
.a-not { display: flex; align-items: baseline; gap: 6px; margin: 0; color: var(--ink3); font-size: 13.5px; }

.a-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 48px; }
.a-col { width: 100%; max-width: 400px; }
.a-form { display: block; margin: 0; }

/* Steps: the new one slides 10px in from the side it comes from */
.a-step.is-in { animation: aIn .22s cubic-bezier(.2, .8, .2, 1) both; }
.a-step.is-in.is-back { animation-name: aInB; }
@keyframes aIn { from { opacity: 0; transform: translateX(10px); } }
@keyframes aInB { from { opacity: 0; transform: translateX(-10px); } }

/* "Step 2 of 4 · You" over a thin bar, one segment per step */
.a-prog { margin-bottom: 26px; }
.a-stepl { display: flex; align-items: baseline; gap: 7px; margin: 0 0 11px; color: var(--ink3); font-size: 13px; }
.a-stepl b { color: var(--ink); font-weight: 600; }
.a-prog ol { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.a-prog li { flex: 1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.a-prog li i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.a-prog li.is-done i, .a-prog li.is-on i { transform: none; }
.a-step.is-in .a-prog li.is-on i { animation: aFill .55s .12s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes aFill { from { transform: scaleX(0); } }

.a-hd { margin-bottom: 30px; }
.a-hd h1 { margin: 0; text-wrap: balance; color: var(--ink); font-size: 34px; font-weight: 600; line-height: 1.12; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.a-hd h1:focus { outline: none; }
.a-hd p { margin: 12px 0 0; color: var(--ink3); font-size: 15px; line-height: 1.55; text-wrap: pretty; overflow-wrap: anywhere; }
.a-hd p b { color: var(--ink); font-weight: 600; }
.a-nw { white-space: nowrap; }

/* Continue with Google: Google's own button (GIS draws it), then "or" */
.a-google { display: grid; grid-template-columns: minmax(0, 1fr); }
/* The GIS iframe is a light page: a light color-scheme here keeps it from getting an opaque
   backdrop in dark mode. */
.a-gbtn { display: flex; justify-content: center; min-width: 0; min-height: 44px; color-scheme: light; }
.a-busy { margin: 10px 0 0; color: var(--ink3); font-size: 13.5px; text-align: center; }
.a-or { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: var(--ink3); font-size: 12.5px; }
.a-or::before, .a-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Fields */
.a-fs { display: grid; gap: 18px; }
.a-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.a-f { min-width: 0; }
.a-f.is-shake { animation: aShake .32s ease-in-out; }
@keyframes aShake { 20% { transform: translateX(-4px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } 90% { transform: translateX(1px); } }
.a-lb { display: block; margin: 0 0 8px; padding: 0; color: var(--ink2); font-size: 13.5px; font-weight: 550; }
.a-inw { position: relative; }
.a-in { display: block; width: 100%; height: 46px; margin: 0; padding: 0 14px; border: 1px solid var(--inb); border-radius: 12px; background: var(--inbg); color: var(--ink); font: 450 15px var(--disp); transition: border-color .15s, box-shadow .15s, background-color .3s; }
.a-in::placeholder { color: var(--ink3); opacity: 1; }
.a-in:hover { border-color: var(--inbh); }
.a-in:focus, .a-in:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--ring); }
.a-in:disabled { opacity: .6; }
.a-in:-webkit-autofill, .a-in:-webkit-autofill:hover, .a-in:-webkit-autofill:focus { -webkit-text-fill-color: var(--ink); caret-color: var(--ink); -webkit-box-shadow: 0 0 0 40px var(--inbg) inset; transition: background-color 9999s 0s; }
.has-eye .a-in { padding-right: 72px; }
.a-in[type="password"] { letter-spacing: .12em; }
.a-in[type="password"]::placeholder { letter-spacing: 0; }
.a-eye { position: absolute; right: 6px; top: 7px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink2); font-size: 13px; font-weight: 600; cursor: pointer; }
.a-eye:hover { background: var(--hl); color: var(--ink); }
.a-sel { position: relative; }
.a-sel select { padding-right: 40px; -webkit-appearance: none; appearance: none; cursor: pointer; }
.a-sel select:invalid { color: var(--ink3); } /* "Select one" */
.a-sel option { background: var(--panel); color: var(--ink); }
.a-chev { position: absolute; right: 13px; top: 14px; color: var(--ink3); pointer-events: none; }
.is-bad .a-in { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.is-bad .a-in:focus { box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 4px var(--ring); }
.a-err { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--ink); font-size: 13px; font-weight: 550; }
.a-rule { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--ink3); font-size: 13px; transition: color .2s; }
.a-rule::before { width: 14px; height: 14px; opacity: .35; transition: opacity .2s; }
.a-rule.is-met { color: var(--ink2); }
.a-rule.is-met::before { opacity: 1; }

/* Messages from the server, and "Password reset" */
.a-msg, .a-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.a-msg::before, .a-note::before { width: 16px; height: 16px; margin-top: 1.5px; }
.a-msg { margin: 22px 0 0; box-shadow: inset 0 0 0 1px var(--inbh); }
.a-msg + .a-act { margin-top: 18px; }
.a-note { margin: -8px 0 22px; }

/* Buttons and links */
.a-act { display: flex; gap: 12px; margin-top: 28px; }
.a-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.a-btn:active { transform: translateY(1px); }
.a-pri { flex: 1; background: var(--pri); color: var(--prit); box-shadow: var(--pris); }
.a-pri:hover { background: var(--prih); }
.a-arr { display: none; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.a-pri.has-arr .a-arr { display: block; }
.a-pri:hover .a-arr { transform: translateX(2px); }
.a-sec { flex: none; padding: 0 16px 0 12px; border-color: var(--inb); background: var(--bg); color: var(--ink); }
.a-sec:hover { border-color: var(--inbh); }
.a-btn:disabled { cursor: not-allowed; opacity: .6; }
.a-btn.is-busy { cursor: progress; opacity: 1; }
.a-btn.is-busy .a-arr { display: none; }
.a-btn.is-busy::before { content: ''; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: aSpin .7s linear infinite; }
@keyframes aSpin { to { transform: rotate(360deg); } }
.a-lk { padding: 0; border: 0; background: none; color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--ul); text-underline-offset: 3px; cursor: pointer; transition: text-decoration-color .15s; }
.a-lk:hover { text-decoration-color: var(--ink); }
.a-lk:disabled { cursor: progress; opacity: .6; }
.a-aux { margin: 14px 0 0; }
.a-foot { margin: 22px 0 0; color: var(--ink3); font-size: 13.5px; text-align: center; }

/* Log in, step 2: who is logging in */
.a-who { display: flex; align-items: center; gap: 12px; margin: -6px 0 26px; padding: 6px 16px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel2); }
.a-av { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--pri); color: var(--prit); font-size: 14px; font-weight: 600; box-shadow: var(--pris); }
.a-whoe { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 550; }

/* Finish setting up: the Google account */
.a-acct { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px 0 10px; border-radius: 12px; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line2); }
.a-acct-t { flex: 1; min-width: 0; line-height: 1.3; }
.a-acct-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; }
.a-acct-t small { display: block; color: var(--ink3); font-size: 12.5px; }
.a-gm { flex: none; }

/* Forgot password: the code */
.a-codef { min-width: 0; margin: 0; padding: 0; border: 0; }
.a-code { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 14px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; }
.a-dig { height: 60px; padding: 0; background: var(--dig); text-align: center; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; caret-color: var(--ink); }
.a-dash { height: 2px; border-radius: 1px; background: var(--inb); }
.a-resend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 18px 0 0; color: var(--ink3); font-size: 13.5px; }
.a-resend span:empty { display: none; }

/* Footer */
.a-ft { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 48px 24px; color: var(--ink3); font-size: 12.5px; }
.a-ftl { display: flex; align-items: center; gap: 8px; margin: 0; }
.a-ftl a { color: inherit; text-decoration: none; border-radius: 4px; }
.a-ftl a:hover { color: var(--ink); }
.a-th { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--ink2); cursor: pointer; transition: background-color .15s; }
.a-th:hover { background: var(--hl); color: var(--ink); }
.a-th .a-sun, html[data-theme="dark"] .a-th .a-moon { display: none; }
html[data-theme="dark"] .a-th .a-sun { display: block; }

/* The film half: black, edge to edge; it stays put while a tall step scrolls */
.a-film { position: sticky; top: 0; align-self: start; min-width: 0; height: 100vh; overflow: hidden; background: #000000; }
.a-vid { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; background: #000000; pointer-events: none; }
.a-film::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); pointer-events: none; }
.a-cap { position: absolute; left: 40px; right: 40px; bottom: 32px; z-index: 1; margin: 0; color: rgba(255, 255, 255, .88); font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }

/* Complete mode (register.html?complete=1): the inline head script sets this before first paint */
html[data-auth-mode="complete"] #step-account, html[data-auth-mode="complete"] #auth-switch { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .a-body *, .a-body *::before, .a-body *::after { transition: none !important; animation: none !important; }
}
/* Phones and narrow windows: no film, the form takes the width */
@media (max-width: 899px) {
  .a-app { grid-template-columns: minmax(0, 1fr); }
  .a-film { display: none; }
  .a-top { padding: 20px 20px 0; }
  .a-main { align-items: flex-start; padding: 40px 20px 44px; }
  .a-ft { flex-wrap: wrap; padding: 0 20px 22px; }
}
@media (max-width: 520px) {
  .a-brand { font-size: 19px; }
  .a-brand img { width: 26px; height: 26px; }
  .a-sw a { padding: 0 11px; font-size: 13px; }
  .a-hd h1 { font-size: 29px; }
  .a-in, .a-btn { font-size: 16px; }
  .a-two { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .a-dig { height: 54px; font-size: 22px; }
}
