:root {
  --auth-paper: #eef0f2;
  --auth-grid: rgba(53, 87, 125, 0.06);
  --auth-card: #ffffff;
  --auth-card-muted: #f7f8fa;
  --auth-ink: #14171c;
  --auth-ink-2: #454b54;
  --auth-ink-3: #6b727c;
  --auth-rule: #d7dbe0;
  --auth-rule-strong: #c2c8cf;
  --auth-accent: #35577d;
  --auth-accent-hover: #26405c;
  --auth-accent-tint: #e8eef5;
  --auth-rail: #17191d;
  --auth-rail-2: #25282e;
  --auth-rail-ink: #f0f2f5;
  --auth-rail-muted: #a7adb6;
  --auth-ok: #54cfbe;
  --auth-shadow: 0 24px 70px rgba(20, 23, 28, 0.14);
  --auth-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --auth-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

html[data-theme="dark"] {
  --auth-paper: #17191d;
  --auth-grid: rgba(123, 164, 208, 0.06);
  --auth-card: #1e2127;
  --auth-card-muted: #202329;
  --auth-ink: #edf0f3;
  --auth-ink-2: #c2c8cf;
  --auth-ink-3: #8f97a1;
  --auth-rule: #343941;
  --auth-rule-strong: #4b525d;
  --auth-accent: #7ba4d0;
  --auth-accent-hover: #9ab9d9;
  --auth-accent-tint: #26394c;
  --auth-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  background-color: var(--auth-paper);
  background-image:
    linear-gradient(var(--auth-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--auth-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--auth-ink);
  font-family: var(--auth-sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 8px 12px;
  color: #fff;
  background: var(--auth-accent);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.auth-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100svh;
}

.auth-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
}

.auth-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.auth-wordmark-logo {
  display: block;
  height: 24px;
  width: auto;
}

/* The artwork is dark-on-transparent, so each theme gets its own variant:
   the coloured logo on light, the white knockout on dark. */
html:not([data-theme="dark"]) .auth-logo-dark {
  display: none;
}

html[data-theme="dark"] .auth-logo-light {
  display: none;
}

.auth-languages {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--auth-rule);
  border-radius: 4px;
  background: var(--auth-card);
}

.auth-languages a {
  min-width: 34px;
  padding: 5px 7px;
  border-radius: 2px;
  color: var(--auth-ink-3);
  font: 600 10px/1.3 var(--auth-mono);
  text-align: center;
  text-decoration: none;
}

.auth-languages a:hover {
  color: var(--auth-ink);
  background: var(--auth-card-muted);
}

.auth-languages a.active {
  color: #fff;
  background: var(--auth-accent);
}

.auth-main {
  display: grid;
  width: 100%;
  padding: 24px;
  place-items: center;
}

.auth-frame {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(390px, 1.15fr);
  width: min(900px, 100%);
  min-height: 510px;
  overflow: hidden;
  border: 1px solid var(--auth-rule-strong);
  border-radius: 8px;
  background: var(--auth-card);
  box-shadow: var(--auth-shadow);
}

.auth-brief {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 42px 38px 34px;
  color: var(--auth-rail-ink);
  background:
    radial-gradient(circle at 85% 10%, rgba(123, 164, 208, 0.18), transparent 34%),
    var(--auth-rail);
}

.auth-eyebrow,
.auth-kicker {
  margin: 0 0 16px;
  font: 600 10px/1.4 var(--auth-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-eyebrow {
  color: #8da7c3;
}

.auth-brief h2 {
  max-width: 14ch;
  margin: 0 0 17px;
  color: var(--auth-rail-ink);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.auth-brief p:not(.auth-eyebrow) {
  max-width: 38ch;
  margin: 0;
  color: var(--auth-rail-muted);
  line-height: 1.65;
}

.auth-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 30px 0;
}

.auth-modules span {
  padding: 8px 10px;
  border: 1px solid #343841;
  border-radius: 4px;
  color: #c9cdd3;
  background: var(--auth-rail-2);
  font-size: 11px;
}

.auth-brief-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-rail-muted);
  font: 500 10px/1.4 var(--auth-mono);
}

.auth-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--auth-ok);
  box-shadow: 0 0 0 3px rgba(84, 207, 190, 0.12);
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 52px 58px;
  background: var(--auth-card);
}

.auth-kicker {
  color: var(--auth-ink-3);
}

.auth-state-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid #b9cce0;
  border-radius: 6px;
  color: var(--auth-accent);
  background: var(--auth-accent-tint);
  place-items: center;
}

.auth-state-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-card h1 {
  margin: 0 0 12px;
  color: var(--auth-ink);
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.auth-intro {
  max-width: 42ch;
  margin: 0 0 27px;
  color: var(--auth-ink-2);
  font-size: 14px;
}

.auth-microsoft-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--auth-accent);
  border-radius: 4px;
  color: #fff;
  background: var(--auth-accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.auth-microsoft-button:hover {
  border-color: var(--auth-accent-hover);
  background: var(--auth-accent-hover);
}

.microsoft-mark {
  display: grid;
  grid-template-columns: 8px 8px;
  grid-template-rows: 8px 8px;
  gap: 2px;
  width: 18px;
  flex: 0 0 auto;
}

.microsoft-mark span:nth-child(1) { background: #f25022; }
.microsoft-mark span:nth-child(2) { background: #7fba00; }
.microsoft-mark span:nth-child(3) { background: #00a4ef; }
.microsoft-mark span:nth-child(4) { background: #ffb900; }

.auth-button-arrow {
  width: 18px;
  height: 18px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-trust {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--auth-rule);
}

.auth-trust > svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: var(--auth-accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-trust div {
  display: grid;
  gap: 3px;
}

.auth-trust strong {
  color: var(--auth-ink);
  font-size: 11.5px;
  font-weight: 600;
}

.auth-trust span {
  color: var(--auth-ink-3);
  font-size: 11px;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 24px 24px;
  color: var(--auth-ink-3);
  font: 500 10px/1.4 var(--auth-mono);
}

.auth-footer-logo {
  display: block;
  height: 14px;
  width: auto;
}

:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .auth-toolbar {
    width: min(100% - 32px, 600px);
    padding-block: 16px;
  }

  .auth-main {
    padding: 12px 16px 20px;
  }

  .auth-frame {
    grid-template-columns: 1fr;
    width: min(560px, 100%);
    min-height: 0;
  }

  .auth-brief {
    gap: 24px;
    padding: 28px 26px;
  }

  .auth-brief h2 {
    max-width: 19ch;
    font-size: 26px;
  }

  .auth-brief p:not(.auth-eyebrow),
  .auth-modules {
    display: none;
  }

  .auth-card {
    padding: 34px 26px 38px;
  }
}

@media (max-width: 460px) {
  .auth-toolbar {
    align-items: flex-start;
  }

  .auth-wordmark {
    margin-top: 3px;
  }

  .auth-languages {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .auth-brief {
    padding: 24px 22px;
  }

  .auth-card {
    padding: 30px 22px 34px;
  }

  .auth-footer {
    padding-top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
