/* Sign-in, registration and password reset (new design, step 1,
   2026-11-06; docs/DESIGN-DECISION-2026-11-05.md section 1, variant 02):
   the screen in two halves, the brand panel on the left (the logo and
   three facts of trust), only the form on the right; on a phone the panel
   becomes a strip on top. Shared by index.html (body.signedOut),
   register.html and reset.html (body.authPage). Everything is under .auth,
   so the cabinet's own styles (index.html) do not leak in. */

@font-face {
  font-family: "Manrope";
  /* the brand book's variable Manrope (OFL, fonts/OFL.txt), cut to Latin,
     Cyrillic and punctuation: 23 KB */
  src: url(fonts/manrope.woff2) format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

body.signedOut, body.authPage { margin:0; padding:0; background:#f8f5f0; }
body.signedOut > .verFoot { display:none; } /* the version is in the form's own footer */

.auth {
  --a-bg:#f8f5f0; --a-surf:#fff; --a-surf2:#f1ece4; --a-ink:#1d2233; --a-mut:#5f6270;
  --a-line:#d9d1c4; --a-navy:#101C4B; --a-acc:#FF4D24; --a-acc-h:#ff6a46; --a-ring:rgba(255,77,36,.28);
  --a-ok:#13703a; --a-warn:#8a5000; --a-warnbg:#fff0d4;
  display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);
  min-height:100vh; min-height:100dvh; box-sizing:border-box;
  background:var(--a-bg); color:var(--a-ink);
  font:15px/1.45 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
.auth *, .auth *::before, .auth *::after { box-sizing:border-box; }
.auth [hidden] { display:none !important; } /* a class with display: must not show a hidden step */

/* the brand panel */
.authBrand { position:relative; overflow:hidden; background:var(--a-navy); color:#fff; display:flex; flex-direction:column; justify-content:center; gap:36px; padding:128px 48px 48px; }
.authBrand::after { content:""; position:absolute; right:-180px; top:-180px; width:520px; height:520px; border-radius:50%; background:radial-gradient(circle, rgba(255,77,36,.32), transparent 65%); pointer-events:none; }
.authBrandIn { z-index:1; max-width:470px; }
.authBrandIn > div { position:relative; z-index:1; }
.authLogo { position:absolute; left:48px; top:48px; display:block; width:150px; height:auto; margin:0; } /* the text and the facts stay centered */
.authBrand h2 { margin:0 0 14px; font-size:34px; line-height:1.15; font-weight:800; letter-spacing:-.02em; color:#fff; }
.authBrand p { margin:0; font-size:16px; color:#b9c2e6; }
.authFacts { position:relative; z-index:1; list-style:none; margin:0; padding:0; display:grid; gap:12px; max-width:470px; }
.authFacts li { display:grid; grid-template-columns:44px minmax(0,1fr); gap:14px; align-items:center; padding:14px 16px; border-radius:16px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.09); }
.authFactIc { width:44px; height:44px; border-radius:12px; display:grid; place-items:center; background:rgba(255,77,36,.16); color:var(--a-acc); }
.authFactIc svg { width:22px; height:22px; }
.authFacts b { display:block; font-size:15px; font-weight:700; color:#fff; }
.authFacts div > span { display:block; font-size:13px; color:#b9c2e6; }

/* the form side */
.authSide { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:28px; padding:40px 24px 20px; min-width:0; }
.authBox { width:min(400px, 100%); margin:auto 0; } /* centered, the footer below */
.authForm { display:flex; flex-direction:column; }
.auth h1 { display:block; margin:0 0 6px; font-size:30px; line-height:1.2; font-weight:800; letter-spacing:-.01em; color:var(--a-ink); }
.authLead { margin:0 0 22px; color:var(--a-mut); }
.authLead b, .authBox p b { color:var(--a-ink); overflow-wrap:anywhere; }
.authBox p { margin:0 0 14px; }
.authField { display:block; margin:0 0 14px; }
.auth label { display:block; margin:0 0 6px; font-size:13px; font-weight:700; color:var(--a-ink); }
.auth input { display:block; width:100%; height:48px; margin:0; padding:0 14px; border:1px solid var(--a-line); border-radius:14px; background:var(--a-surf); color:var(--a-ink); font:inherit; font-size:16px; }
.auth input:focus { border-color:var(--a-acc); outline:3px solid var(--a-ring); outline-offset:0; }
.auth a { color:var(--a-ink); font-weight:700; text-underline-offset:3px; }
.auth a:focus-visible, .authBtn:focus-visible { outline:3px solid var(--a-ring); outline-offset:2px; }
.authBtn { display:flex; align-items:center; justify-content:center; width:100%; height:48px; margin:4px 0 0; padding:0 16px; border:0; border-radius:14px; background:var(--a-acc); color:var(--a-navy); font:inherit; font-size:15px; font-weight:800; text-decoration:none; cursor:pointer; transition:transform .12s cubic-bezier(.23,1,.32,1), background-color .15s; }
.authBtn:active { transform:scale(.98); }
.authBtn:disabled { background:var(--a-surf2); color:var(--a-mut); cursor:default; transform:none; }
@media (hover:hover) { .authBtn:not(:disabled):hover { background:var(--a-acc-h); } }
.auth a.authBtn { color:var(--a-navy); }
.authLinks { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 16px; margin:18px 0 0; font-size:14px; }
.authNote { margin:14px 0 0; font-size:13px; color:var(--a-mut); }
.authNote a { font-size:14px; }
.authNote:has(> a[hidden]:only-child) { display:none; }
/* messages: errors and "the code was sent" alike, an amber note */
.authMsg { font-size:14px; }
.authMsg:not(:empty) { margin:0 0 12px; padding:10px 12px; border-radius:12px; background:var(--a-warnbg); color:var(--a-warn); }
.authFoot { margin:0; font-size:12px; color:var(--a-mut); text-align:center; }

/* the password rule's checklist (password-rule.js) */
.authRule { list-style:none; margin:-6px 0 14px; padding:0; font-size:13px; color:var(--a-mut); display:flex; flex-direction:column; gap:2px; }
.authRule li { padding-left:1.4em; text-indent:-1.4em; }
.authRule li::before { content:"\25CB"; display:inline-block; width:1.4em; text-indent:0; color:#9a9caa; }
.authRule li.ok { color:var(--a-ok); }
.authRule li.ok::before { content:"\2713"; color:var(--a-ok); }
.authRule li.bad { color:var(--a-warn); }
.authRule li.bad::before { content:"!"; color:var(--a-warn); }

/* a phone or a narrow window: the panel is a strip on top */
@media (max-width:900px) {
  .auth { grid-template-columns:1fr; grid-template-rows:auto minmax(0,1fr); }
  .authBrand { flex-direction:row; align-items:center; gap:14px; padding:14px 20px; }
  .authBrand::after { width:260px; height:260px; right:-120px; top:-150px; }
  .authBrandIn { display:flex; align-items:center; gap:14px; max-width:none; }
  .authLogo { position:relative; left:auto; top:auto; width:112px; margin:0; flex:none; z-index:1; }
  .authBrand h2 { margin:0; font-size:16px; line-height:1.3; font-weight:700; letter-spacing:0; }
  .authBrand p, .authFacts { display:none; }
  .authSide { justify-content:flex-start; padding:28px 20px 16px; }
  .authBox { margin:0 0 auto; }
  .auth h1 { font-size:26px; }
}
@media (max-width:380px) {
  .authBrand h2 { font-size:14px; }
  .authLogo { width:96px; }
}
@media (prefers-reduced-motion:reduce) { .authBtn { transition:none; } }
