/* System colours apply before the first paint and track live OS changes. */
html:root, html:root body[class] {
  color-scheme:dark;
  --bg:#111; --panel:#202020; --panel2:#292929; --side:var(--panel);
  --text:#f5f5f5; --text-2:#d0d0d0; --muted:#aaa; --input:#181818;
  --line:#414141; --line-strong:#777; --accent:var(--text);
  --accent-strong:var(--text-2); --accent-soft:var(--panel2); --accent-ink:var(--bg);
  --info:var(--text-2); --info-soft:var(--panel2); --focus-ring:0 0 0 3px var(--line-strong);
  background:var(--bg); color:var(--text);
}
@media (prefers-color-scheme:light) {
  html:root, html:root body[class] {
    color-scheme:light;
    --bg:#f5f5f3; --panel:#fff; --panel2:#eeeeec; --text:#181818;
    --text-2:#383838; --muted:#555; --input:#fff; --line:#d6d6d3; --line-strong:#797979;
  }
}
.auth-wrap, .login-wrap { background:var(--bg); }
.login-story { background:var(--panel2); color:var(--text); }
.login-story h1 { color:var(--text); }
.login-story .subtitle, .login-wordmark small { color:var(--muted); }
.login-wordmark, .auth-brand { color:var(--text); }
.auth-brand img, .login-story-brand img { object-fit:contain; border-radius:0; }
.login-card, .auth-card { box-shadow:none; }
.login-wrap button,.auth-wrap button { min-width:0; min-height:44px; white-space:normal; line-height:1.35; }
.login-wrap a:not(.btn), .auth-wrap a:not(.btn,.auth-brand) { color:var(--text); text-underline-offset:.2em; }
@media(max-width:520px) {
  .login-wrap, .auth-wrap { padding:12px max(12px,env(safe-area-inset-left)) max(18px,env(safe-area-inset-bottom)); }
  .login-wrap input,.auth-wrap input { font-size:16px; }
}
