/* KTM Voyage CRM — login stylesheet [UPG].
   The sign-in screen, the e-mail-code screen and the forced password change.
   Wire it in index.html AFTER css/components.css:
     <link rel="stylesheet" href="/css/login.css">

   WHY THE SELECTORS CARRY TWO CLASSES
   base.css already styles `.login …` (the original screen) and is owned by another
   agent. Rather than edit that file — and rather than depend on which <link> comes
   first — the page root now carries BOTH classes: <div class="login lgx">. Every rule
   that competes with an existing base.css rule is written as `.login.lgx …`, which is
   one class heavier and therefore wins whatever the load order turns out to be. Rules
   for class names that only exist here (`.lg-*`) need no such trick and use `.lgx`.
   If this stylesheet is ever NOT loaded, base.css still renders a usable — plain —
   login screen instead of an unstyled page.

   HOUSE RULES
   - Not one hard-coded colour. Everything resolves from css/tokens.css, so light and
     dark are the same code path. Derived tints use color-mix() on those tokens.
   - No `content:"text"` and no glyph arrows: chevrons and ticks are drawn with
     borders, real icons come from core/icons.js.
   - dvh, never vh. On a phone the address bar and the on-screen keyboard both eat
     into the viewport; 100vh puts the sign-in button underneath the keyboard.
   - 44px touch targets, correct down to 360px wide. */

/* ---------- PAGE SHELL ---------- */
.login.lgx{
  min-height:100dvh;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  background:var(--bg);
}
.lgx input[type=hidden]{display:none}

/* ---------- BRAND PANEL ----------
   Deep brown in BOTH themes: this is the brand, not a surface (tokens.css). */
/* Sticky and exactly one screen tall: the sign-in card is short, the forced
   password change is long, and a panel that stretches with it either leaves a
   void above the headline or pushes the trust line off the bottom. Pinning it
   means the brand is composed once and the form column scrolls past it. */
.login.lgx .brandside{
  position:sticky;
  top:0;
  z-index:0;
  align-self:start;
  height:100dvh;
  display:flex;
  flex-direction:column;
  gap:var(--sp-5);
  padding:clamp(30px,4vw,60px);
  overflow:hidden;
  color:var(--on-brand);
  background:linear-gradient(155deg,var(--brand-1),var(--brand-2) 52%,var(--brand-3));
}
/* Vignette. base.css puts a flat gold wash here; this replaces it, so the glow
   below reads as one warm spotlight instead of an even olive haze. */
.login.lgx .brandside::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:radial-gradient(132% 106% at 28% 10%,transparent 30%,color-mix(in srgb,var(--brand-3) 92%,transparent) 100%);
}

/* Two decorative layers, both aria-hidden in the markup. They sit below every .z
   block (base.css gives those z-index:1) so no text ever loses contrast. */
.lgx .lg-aurora{
  position:absolute;
  inset:0;
  background-repeat:no-repeat;
  background-image:
    radial-gradient(closest-side,color-mix(in srgb,var(--accent) 44%,transparent),transparent),
    radial-gradient(closest-side,color-mix(in srgb,var(--accent) 15%,transparent),transparent);
  background-size:56% 44%,92% 58%;
  background-position:4% -8%,110% 106%;
  filter:blur(30px);
  opacity:.6;
  animation:lgdrift 26s ease-in-out infinite alternate;
}
@keyframes lgdrift{
  from{transform:translate3d(-2%,-2%,0) scale(1)}
  to{transform:translate3d(4%,3%,0) scale(1.09)}
}
/* Faint blueprint grid. The mask uses --on-brand purely for its ALPHA channel —
   a mask reads no hue, so this is a token, not a colour decision. */
.lgx .lg-grid{
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.5;
  background-size:58px 58px;
  background-image:
    linear-gradient(color-mix(in srgb,var(--on-brand) 7%,transparent) 1px,transparent 1px),
    linear-gradient(90deg,color-mix(in srgb,var(--on-brand) 7%,transparent) 1px,transparent 1px);
  -webkit-mask-image:radial-gradient(120% 92% at 18% 0%,var(--on-brand),transparent 72%);
  mask-image:radial-gradient(120% 92% at 18% 0%,var(--on-brand),transparent 72%);
}

.lgx .lg-brandtop{display:flex;align-items:center;gap:var(--sp-4);flex-wrap:wrap}
.login.lgx .crest{
  width:clamp(58px,6vw,86px);
  height:auto;
  filter:brightness(0) invert(1);
  opacity:.96;
}
.lgx .lg-kicker{
  font-size:11px;
  font-weight:700;
  letter-spacing:.17em;
  text-transform:uppercase;
  color:var(--on-brand-3);
}

.lgx .lg-brandmid{margin-top:auto}
.login.lgx h1{
  margin:0 0 14px;
  max-width:15ch;
  font-size:clamp(30px,3.4vw,46px);
  line-height:1.08;
  letter-spacing:-.01em;
  color:var(--on-brand);
}
.login.lgx h1 em{font-style:normal;color:var(--accent)}
.login.lgx .sub{
  margin:0;
  max-width:44ch;
  font-size:clamp(14px,1.05vw,17px);
  line-height:1.6;
  color:var(--on-brand-2);
}

/* Three things this system actually does — concrete, never marketing. */
.login.lgx .facts{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--sp-4);
  margin:0;
  padding-top:var(--sp-6);
  border-top:1px solid color-mix(in srgb,var(--accent) 26%,transparent);
}
.lgx .lg-fact{display:flex;flex-direction:column;gap:2px;min-width:0}
.lgx .lg-fic{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  margin-bottom:9px;
  border:1px solid color-mix(in srgb,var(--accent) 55%,transparent);
  border-radius:11px;
  /* Mixed against the brand tone, not against transparency: these badges sit in
     the darkest, most vignetted corner of the panel and would otherwise vanish. */
  background:color-mix(in srgb,var(--accent) 26%,var(--brand-1));
  color:var(--accent);
}
.login.lgx .facts b{
  display:block;
  font-family:"Playfair Display",Georgia,serif;
  font-size:17px;
  font-weight:600;
  color:var(--on-brand);
  overflow-wrap:anywhere;
}
.login.lgx .facts span:not(.lg-fic){
  font-size:12px;
  line-height:1.4;
  color:var(--on-brand-3);
}

.lgx .lg-trust{
  display:flex;
  flex-wrap:wrap;
  gap:var(--sp-2) var(--sp-5);
  font-size:11.5px;
  color:var(--on-brand-3);
}
.lgx .lg-trust span{display:inline-flex;align-items:center;gap:7px}
.lgx .lg-trust svg{color:var(--accent);opacity:.9}

/* ---------- FORM SIDE ---------- */
.login.lgx .formside{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  padding:clamp(26px,3vw,48px) clamp(18px,3vw,44px);
  background:var(--bg);
}
.lgx .lg-panel{
  display:flex;
  flex-direction:column;
  gap:var(--sp-4);
  width:100%;
  max-width:420px;
}

/* ---------- PREFERENCE BAR (language + appearance, on every screen) ---------- */
.lgx .lg-bar{
  display:flex;
  flex-wrap:wrap;
  gap:var(--sp-4);
  align-items:flex-end;
  justify-content:space-between;
}
.lgx .lg-bar-grp{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1 1 100%}
.lgx .lg-bar-lbl{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:10.5px;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--text-faint);
}
.lgx .lg-bar-lbl svg{width:13px;height:13px}

/* Three EQUAL language buttons — Macedonian is not a footnote behind a "⋯" menu.
   The name is written in its own script, so you recognise it without reading
   English first. */
.login.lgx .langpick{display:flex;gap:6px;margin:0}
.lgx .lg-lang{
  display:flex;
  flex:1 1 0;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1px;
  min-width:0;
  min-height:46px;
  padding:6px 8px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--surface);
  color:var(--text-muted);
  font:inherit;
  cursor:pointer;
  transition:border-color .15s ease,background-color .15s ease,color .15s ease,box-shadow .15s ease;
}
.lgx .lg-lang b{
  max-width:100%;
  font-size:12.5px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.lgx .lg-lang span{font-size:9.5px;font-weight:700;letter-spacing:.12em;color:var(--text-faint)}
.lgx .lg-lang:hover{border-color:var(--border-strong);color:var(--text)}
.lgx .lg-lang.on{
  border-color:var(--accent);
  background:var(--surface-accent);
  color:var(--text-head);
  box-shadow:0 0 0 3px var(--ring);
}
.lgx .lg-lang.on span{color:var(--accent-text)}
.lgx .lg-lang:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Appearance is a DEVICE choice, so it belongs on the login screen: the office
   computer and the laptop at home each keep their own. */
.lgx .lg-themes{display:flex;flex-wrap:wrap;gap:6px}
.lgx .lg-theme{
  display:inline-flex;
  flex:1 1 auto;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:44px;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--surface);
  color:var(--text-muted);
  font:inherit;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
  cursor:pointer;
  transition:border-color .15s ease,background-color .15s ease,color .15s ease;
}
.lgx .lg-theme:hover{border-color:var(--border-strong);color:var(--text)}
.lgx .lg-theme.on{border-color:var(--accent);background:var(--surface-accent);color:var(--text-head)}
.lgx .lg-theme.on svg{color:var(--accent-text)}
.lgx .lg-theme:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- CARD ---------- */
.lgx .lg-card{
  position:relative;
  padding:clamp(20px,2.4vw,32px);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:var(--surface);
  box-shadow:var(--shadow-2);
}
/* A gold hairline along the top edge — the only decoration the card gets. */
.lgx .lg-card::before{
  content:"";
  position:absolute;
  top:-1px;
  left:24px;
  right:24px;
  height:2px;
  border-radius:2px;
  background:linear-gradient(90deg,transparent,var(--accent),transparent);
  opacity:.85;
}
.login.lgx .form{width:100%;max-width:none}
.lgx .lg-head{margin-bottom:var(--sp-5)}
.lgx .lg-headic{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:46px;
  height:46px;
  margin-bottom:var(--sp-4);
  border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);
  border-radius:14px;
  background:var(--accent-soft);
  color:var(--accent-text);
}
.login.lgx .form h2{margin:0 0 6px;font-size:clamp(21px,2vw,26px)}
.login.lgx .form p.hint{margin:0;font-size:13.5px;line-height:1.55;color:var(--text-muted)}

/* ---------- STEP LINE ---------- */
.lgx .lg-steps{
  display:flex;
  align-items:center;
  gap:var(--sp-2);
  margin:0 0 var(--sp-4);
  padding:0;
  list-style:none;
}
.lgx .lg-step{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  font-size:11.5px;
  font-weight:700;
  color:var(--text-faint);
}
/* The connector is drawn, not typed. */
.lgx .lg-step+.lg-step::before{
  content:"";
  flex:0 0 auto;
  width:18px;
  height:1px;
  margin-right:7px;
  background:var(--border);
}
.lgx .lg-step-d{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  border:1.5px solid var(--border-strong);
  border-radius:50%;
  background:var(--surface);
  font-size:10.5px;
  color:var(--text-faint);
}
.lgx .lg-step-d svg{width:11px;height:11px}
.lgx .lg-step-l{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lgx .lg-step.now{color:var(--text-head)}
.lgx .lg-step.now .lg-step-d{border-color:var(--accent);background:var(--accent);color:var(--accent-ink)}
.lgx .lg-step.done{color:var(--text-muted)}
.lgx .lg-step.done .lg-step-d{
  border-color:var(--ok);
  background:color-mix(in srgb,var(--ok) 16%,transparent);
  color:var(--ok);
}

/* ---------- MESSAGES ---------- */
.lgx .lg-err{display:flex;align-items:flex-start;gap:10px;margin-bottom:var(--sp-4)}
.lgx .lg-err:focus{outline:none}
.lgx .lg-err-ic{flex:0 0 auto;display:inline-flex;margin-top:1px;color:var(--bad)}
.lgx .lg-err-tx{display:flex;flex-direction:column;gap:3px;min-width:0}
.lgx .lg-err-tx b{font-weight:700}
.lgx .lg-err-tx span{font-size:12.5px;font-weight:400;line-height:1.5;opacity:.92}

.lgx .lg-note{
  display:flex;
  align-items:flex-start;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 var(--sp-4);
  padding:11px 13px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--surface-2);
  font-size:12.5px;
  line-height:1.55;
  color:var(--text-muted);
}
.lgx .lg-note-ic{flex:0 0 auto;display:inline-flex;margin-top:1px;color:var(--text-faint)}
.lgx .lg-note>span:not(.lg-note-ic){flex:1 1 180px;min-width:0}
.lgx .lg-note .btn{margin-left:auto}
.lgx .lg-note-warn{
  border-color:color-mix(in srgb,var(--warn) 45%,transparent);
  background:color-mix(in srgb,var(--warn) 12%,transparent);
  color:var(--text);
}
/* var(--opt) on its own amber wash is 2.73:1 — the mark that flags the note is
   fainter than the sentence it flags. 55% towards --text keeps it amber at 5.67:1. */
.lgx .lg-note-warn .lg-note-ic{color:color-mix(in srgb,var(--opt) 55%,var(--text))}
.lgx .lg-note-ok{
  border-color:color-mix(in srgb,var(--ok) 40%,transparent);
  background:color-mix(in srgb,var(--ok) 10%,transparent);
  color:var(--text);
}
.lgx .lg-note-ok .lg-note-ic{color:var(--ok)}

/* ---------- FIELDS ---------- */
.lgx .lg-field{margin-bottom:var(--sp-4)}
.lgx .lg-pwwrap input{padding-right:46px}
.lgx .lg-eye{
  position:absolute;
  top:50%;
  right:5px;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  padding:0;
  border:none;
  border-radius:var(--radius-sm);
  background:none;
  color:var(--text-faint);
  cursor:pointer;
}
.lgx .lg-eye:hover{background:var(--hover);color:var(--text)}
.lgx .lg-eye:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}

/* The single most common reason a correct password is refused. */
.lgx .lg-caps{
  display:flex;
  align-items:center;
  gap:7px;
  margin:6px 0 0;
  font-size:12px;
  font-weight:700;
  color:var(--opt);
}
.lgx .lg-caps svg{flex:0 0 auto}

.lgx .lg-lblrow{display:flex;align-items:center;justify-content:flex-end;margin:0 0 2px}
.lgx .lg-go{margin-top:var(--sp-2);gap:10px}
.lgx .lg-go svg{opacity:.85}

.lgx .lg-linkbtn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:34px;
  margin:0 -9px;
  padding:5px 9px;
  border:none;
  border-radius:var(--radius-sm);
  background:none;
  font:inherit;
  font-size:12.5px;
  font-weight:700;
  color:var(--accent-text);
  cursor:pointer;
}
.lgx .lg-linkbtn:hover:not([disabled]){background:var(--surface-accent);color:var(--accent-text-strong)}
.lgx .lg-linkbtn[disabled]{color:var(--text-faint);cursor:not-allowed}
.lgx .lg-linkbtn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- "CANNOT GET IN?" ---------- */
.lgx .lg-help{margin-top:var(--sp-4);padding-top:var(--sp-3);border-top:1px solid var(--border)}
.lgx .lg-help summary{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:34px;
  list-style:none;
  font-size:12.5px;
  font-weight:700;
  color:var(--text-muted);
  cursor:pointer;
}
.lgx .lg-help summary::-webkit-details-marker{display:none}
/* Chevron from two borders — never a glyph, never an emoji. */
.lgx .lg-help summary::after{
  content:"";
  width:7px;
  height:7px;
  margin-left:auto;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg) translate(-2px,-2px);
  opacity:.55;
  transition:transform .18s ease;
}
.lgx .lg-help[open] summary::after{transform:rotate(-135deg) translate(-3px,-3px)}
.lgx .lg-help summary:hover{color:var(--text)}
.lgx .lg-help summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--radius-sm)}
.lgx .lg-help ul{margin:8px 0 0;padding:0;list-style:none}
.lgx .lg-help li{
  position:relative;
  padding:5px 0 5px 20px;
  font-size:12.5px;
  line-height:1.55;
  color:var(--text-muted);
}
.lgx .lg-help li::before{
  content:"";
  position:absolute;
  top:12px;
  left:4px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--accent);
  opacity:.7;
}

/* ---------- 2FA: six cells ---------- */
.lgx .lg-code{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.lgx .lg-cell{
  width:100%;
  min-width:0;
  height:56px;
  padding:0;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  color:var(--text);
  font-family:inherit;
  font-size:24px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  text-align:center;
  transition:border-color .15s ease,box-shadow .15s ease;
}
.lgx .lg-cell:hover{border-color:var(--border-strong)}
.lgx .lg-cell:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--ring);
}
.lgx .lg-expiry{
  display:flex;
  align-items:center;
  gap:7px;
  margin:10px 0 0;
  font-size:12.5px;
  color:var(--text-muted);
  font-variant-numeric:tabular-nums;
}
.lgx .lg-expiry.is-out{font-weight:700;color:var(--bad-text)}

/* ---------- 2FA: asking for a new code SENDS A REAL MAIL ---------- */
.lgx .lg-resend{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 10px;
  margin-top:var(--sp-4);
  font-size:12.5px;
  color:var(--text-muted);
}
.lgx .lg-resend-note{flex:1 0 100%;font-size:12px;color:var(--text-faint)}
.lgx .lg-confirm{
  margin-top:var(--sp-4);
  padding:14px 15px;
  border:1px solid color-mix(in srgb,var(--accent) 45%,var(--border));
  border-radius:var(--radius);
  background:var(--surface-accent);
  animation:lgpop .16s ease-out;
}
@keyframes lgpop{from{transform:translateY(-4px);opacity:0}to{transform:none;opacity:1}}
.lgx .lg-confirm-q{margin:0 0 4px;font-size:13.5px;font-weight:700;color:var(--text-head)}
.lgx .lg-confirm-n{margin:0 0 12px;font-size:12.5px;line-height:1.5;color:var(--accent-text-strong)}
.lgx .lg-confirm-a{display:flex;flex-wrap:wrap;gap:8px}
.lgx .lg-confirm-a .btn{flex:1 1 auto}

/* ---------- 2FA: the code the DEV environment prints on screen ---------- */
.lgx .dev-hint{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin:0 0 var(--sp-4);
  padding:10px 13px;
  border:1px dashed var(--accent);
  border-radius:var(--radius-sm);
  background:var(--surface-accent);
  font-size:12.5px;
  font-weight:700;
  color:var(--accent-text-strong);
}
.lgx .dev-hint b{
  margin-left:auto;
  font-size:18px;
  letter-spacing:.18em;
  font-variant-numeric:tabular-nums;
  color:var(--text-head);
}

.lgx .backlink{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:100%;
  min-height:40px;
  margin:var(--sp-4) 0 0;
  padding:8px;
  border:none;
  border-radius:var(--radius-sm);
  background:none;
  font:inherit;
  font-size:12.5px;
  font-weight:700;
  color:var(--text-muted);
  cursor:pointer;
}
.lgx .backlink:hover{background:var(--hover);color:var(--text)}
.lgx .backlink:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- FORCED PASSWORD CHANGE ---------- */
.lgx .lg-strength{margin:-6px 0 var(--sp-4)}
.lgx .lg-pw2err{margin:-8px 0 var(--sp-4)}
.lgx .pwrules{
  display:grid;
  gap:2px;
  margin:0 0 var(--sp-4);
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--surface-2);
}
.lgx .pwrules li{padding:3px 0 3px 25px;font-size:12.5px;transition:color .15s ease}
.lgx .pwrules li::before{
  top:9px;
  left:2px;
  width:15px;
  height:15px;
  border:1.5px solid var(--border-strong);
  background:var(--surface);
}
.lgx .pwrules li.ok{font-weight:700;color:var(--ok)}
.lgx .pwrules li.ok::before{border-color:var(--ok);background:var(--ok)}
/* The tick inside a satisfied rule: two borders, rotated. */
.lgx .pwrules li.ok::after{
  content:"";
  position:absolute;
  top:12px;
  left:6px;
  width:7px;
  height:3.5px;
  border-left:1.6px solid var(--surface);
  border-bottom:1.6px solid var(--surface);
  transform:rotate(-45deg);
}

.lgx .lg-foot{margin:0;text-align:center;font-size:11.5px;color:var(--text-faint)}

/* ---------- <=1024px: the brand panel becomes a compact header ----------
   base.css hides .facts here, which leaves an empty brown band on a phone. They
   come back as a chip strip that scrolls sideways instead of wrapping. */
@media(max-width:1024px){
  .login.lgx{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  /* Stacked: the header scrolls with the page again, so drop the sticky column.
     RELATIVE, not static — the decorative layers are absolutely positioned and
     would otherwise escape to the viewport, taking the page's overflow clip with
     them and giving a 390px phone a sideways scrollbar. */
  .login.lgx .brandside{
    position:relative;
    height:auto;
    align-self:auto;
    gap:var(--sp-4);
    padding:clamp(20px,5vw,30px) clamp(18px,5vw,28px);
  }
  .login.lgx .brandside::after{
    background:radial-gradient(150% 130% at 22% 0%,transparent 34%,color-mix(in srgb,var(--brand-3) 88%,transparent) 100%);
  }
  .lgx .lg-brandtop{gap:var(--sp-3)}
  .login.lgx .crest{width:54px}
  .lgx .lg-brandmid{margin-top:0}
  .login.lgx h1{margin-bottom:8px;max-width:none;font-size:clamp(22px,5.4vw,30px)}
  .login.lgx .sub{max-width:none;font-size:13.5px}
  .login.lgx .brandside .facts{
    display:flex;
    gap:8px;
    padding-top:var(--sp-4);
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .login.lgx .brandside .facts::-webkit-scrollbar{display:none}
  .lgx .lg-fact{
    flex:0 0 auto;
    flex-direction:row;
    align-items:center;
    gap:8px;
    padding:6px 13px 6px 7px;
    border:1px solid color-mix(in srgb,var(--accent) 26%,transparent);
    border-radius:999px;
    background:color-mix(in srgb,var(--accent) 10%,transparent);
  }
  .lgx .lg-fic{width:26px;height:26px;margin:0;border-radius:8px}
  .lgx .lg-fic svg{width:15px;height:15px}
  .login.lgx .facts b{font-family:inherit;font-size:12.5px;font-weight:700;white-space:nowrap}
  .login.lgx .facts span:not(.lg-fic){display:none}
  .lgx .lg-trust{gap:var(--sp-2) var(--sp-4);font-size:11px}
  .lgx .lg-aurora{background-size:82% 92%,116% 84%;background-position:2% -24%,122% 126%}
  .login.lgx .formside{
    align-items:flex-start;
    padding:clamp(18px,5vw,30px) clamp(16px,5vw,26px) 48px;
  }
  .lgx .lg-panel{max-width:460px;margin:0 auto}
}

/* ---------- <=560px ---------- */
@media(max-width:560px){
  .lgx .lg-card{padding:18px 16px;border-radius:var(--radius)}
  .lgx .lg-card::before{left:16px;right:16px}
  .lgx .lg-bar{gap:var(--sp-3)}
  .lgx .lg-code{gap:6px}
  .lgx .lg-cell{height:50px;font-size:21px}
  .lgx .lg-theme{font-size:11.5px;padding:6px 8px;gap:5px}
  .lgx .lg-headic{width:40px;height:40px;border-radius:12px}
  .lgx .pwrules{padding:11px 12px}
}

/* ---------- <=400px: the smallest phone we support ---------- */
@media(max-width:400px){
  .lgx .lg-code{gap:5px}
  .lgx .lg-cell{height:46px;font-size:19px}
  .lgx .lg-lang b{font-size:11.5px}
  .lgx .lg-step-l{max-width:9ch}
}

/* ---------- SHORT VIEWPORT (laptop, or a phone with the keyboard open) ---------- */
@media(max-height:760px){
  .login.lgx .formside{align-items:flex-start}
}

/* ---------- TOUCH ---------- */
@media(pointer:coarse){
  .lgx .lg-cell{height:58px}
  .lgx .lg-eye{width:40px;height:40px}
  .lgx .lg-linkbtn{min-height:42px}
  .lgx .lg-help summary{min-height:44px}
  .lgx .backlink{min-height:46px}
}

/* ---------- REDUCED MOTION ---------- */
@media(prefers-reduced-motion:reduce){
  .lgx .lg-aurora{animation:none}
  .lgx .lg-confirm{animation:none}
  .lgx .lg-cell,.lgx .lg-lang,.lgx .lg-theme,.lgx .pwrules li{transition:none}
}
