/* Standalone Ember sign-in. Reuse the public, self-hosted browser fonts;
   system fallbacks paint immediately without authenticated app assets. */
@font-face {
  font-family: "ScopeLine Ember Manrope";
  src: url("ember/manrope-regular.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ScopeLine Ember Manrope";
  src: url("ember/manrope-semibold.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ScopeLine Ember Manrope";
  src: url("ember/manrope-extrabold.woff2") format("woff2");
  font-weight: 750 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --font-sans: "ScopeLine Ember Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg-chrome: #070a0e;
  --bg: #0e141b;
  --bg-raised: #182029;
  --stroke: rgb(150 180 215 / 0.13);
  --t1: #fff;
  --t2: #b6bfc9;
  --accent: #c2530e;
  --accent-hover: #a8460b;
  --brand: #f26b1d;
  --on-accent: #fff;
  --danger: #ff5d62;
  --danger-soft: rgb(255 93 98 / 0.13);
  --focus: #ff8a45;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg-chrome: #fff;
  --bg: #eef2f6;
  --bg-raised: #fff;
  --stroke: rgb(35 55 80 / 0.16);
  --t1: #0d1014;
  --t2: #3e4854;
  --danger: #c7262b;
  --danger-soft: rgb(199 38 43 / 0.1);
  --focus: #b84a0a;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--t1);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; }
a { color: inherit; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.icon-sm { width: 16px; height: 16px; }
.mono { font-family: var(--font-mono); }
.login-page { min-height: 100vh; min-height: 100dvh; }
.login-welcome {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.login-welcome-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding:
    max(16px, env(safe-area-inset-top))
    max(28px, env(safe-area-inset-right))
    16px
    max(28px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--stroke);
  background: var(--bg-chrome);
}
.login-welcome-logo { display: flex; align-items: center; gap: 11px; }
.login-welcome-mark { display: inline-flex; width: 29px; height: 29px; flex: none; color: var(--brand); }
.login-welcome-mark svg { width: 100%; height: 100%; fill: currentColor; }
.login-welcome-word { font-size: 19px; font-weight: 800; letter-spacing: -0.035em; }
.login-welcome-meta { display: flex; align-items: center; gap: 16px; }
.login-welcome-env { color: var(--t2); font-size: 11px; }
.login-appearance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--t2);
  font-size: 12px;
  cursor: pointer;
}
.login-appearance > span:first-child { display: inline-flex; }
.login-appearance:hover { background: var(--bg-raised); border-color: var(--stroke); color: var(--t1); }
.login-welcome-card {
  width: 100%;
  flex: 1;
  display: grid;
  place-items: center;
  padding:
    54px
    max(28px, env(safe-area-inset-right))
    max(64px, env(safe-area-inset-bottom))
    max(28px, env(safe-area-inset-left));
}
.login-welcome-entry { width: min(360px, 100%); min-width: 0; }
.login-organization { margin: 0 0 15px; color: var(--t2); font-weight: 600; }
.login-welcome-heading h1 {
  margin: 0;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.login-welcome-heading p { margin: 13px 0 28px; color: var(--t2); font-size: 14px; }
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-block { width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
  color: var(--t1);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.login-alert .icon { flex: none; margin-top: 1px; color: var(--danger); }
.login-help { margin-top: 25px; color: var(--t2); font-size: 12px; }
.login-help summary {
  width: fit-content;
  max-width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  cursor: pointer;
}
.login-help summary::-webkit-details-marker { display: none; }
.login-help summary:hover { color: var(--t1); }
.login-help summary .icon { flex: none; }
.login-help[open] summary .icon { transform: rotate(180deg); }
.login-help-body { display: grid; gap: 9px; padding-top: 6px; }
.login-help-body p { margin: 0; }

@media (max-width: 540px) {
  .login-welcome-brand { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .login-welcome-card { padding: 40px max(22px, env(safe-area-inset-right)) max(56px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); }
  .login-appearance-label { display: none; }
}
@media (pointer: coarse) {
  .login-appearance, .login-help summary { min-height: 44px; }
}
@media (max-height: 480px) {
  .login-welcome-card { padding-top: 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
@media (forced-colors: active) {
  .login-welcome-brand, .login-alert, .btn { border-color: CanvasText; }
  .login-welcome-mark { color: Highlight; }
}
