:root {
  --ink: #173d3b;
  --muted: #617572;
  --cream: #fbf8f1;
  --white: #ffffff;
  --teal: #195f59;
  --teal-dark: #124b47;
  --mint: #dcece5;
  --peach: #efaa7e;
  --line: #dce5e1;
  --shadow: 0 24px 70px rgba(24, 64, 59, 0.13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
}

button, a { font: inherit; }
a { color: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(520px, 1.05fr);
}

.welcome {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(36px, 6vw, 76px);
  color: var(--white);
  background: var(--teal);
}

.welcome::before,
.welcome::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.welcome::before {
  width: 430px;
  height: 430px;
  right: -230px;
  top: 8%;
  border: 80px solid rgba(255,255,255,.06);
}

.welcome::after {
  width: 290px;
  height: 290px;
  left: -120px;
  bottom: -145px;
  background: var(--peach);
  opacity: .22;
}

.brand,
.mobile-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 48% 52% / 57% 47% 53% 43%;
  color: var(--teal);
  background: var(--mint);
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
}

.welcome-copy { position: relative; z-index: 1; max-width: 610px; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--peach);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.welcome h1 {
  max-width: 590px;
  margin: 0 0 24px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.8rem, 5.8vw, 5.7rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.welcome-copy > p:last-child {
  max-width: 520px;
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.65;
}

.assurance {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,.82);
  font-size: .87rem;
  line-height: 1.55;
}

.assurance p { margin: 0; }
.assurance strong { color: var(--white); }
.assurance-icon {
  display: grid;
  flex: 0 0 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
}

.signin {
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 80px);
  background:
    radial-gradient(circle at 88% 12%, rgba(239,170,126,.14), transparent 26%),
    var(--cream);
}

.card { width: min(100%, 470px); }
.mobile-brand { display: none; margin-bottom: 54px; color: var(--ink); }
.card h2 {
  margin: 0 0 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.intro { margin: 0 0 32px; color: var(--muted); line-height: 1.65; }

.microsoft-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: var(--teal);
  box-shadow: 0 10px 24px rgba(25,95,89,.18);
  cursor: pointer;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.microsoft-button:hover { transform: translateY(-2px); background: var(--teal-dark); box-shadow: 0 14px 28px rgba(25,95,89,.22); }
.microsoft-button:focus-visible { outline: 3px solid rgba(25,95,89,.25); outline-offset: 4px; }
.microsoft-button:disabled { opacity: .72; cursor: wait; transform: none; }

.auth-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: .84rem; font-weight: 700; }
.field input { width: 100%; height: 53px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--white); font: inherit; outline: none; transition: border .18s ease, box-shadow .18s ease; }
.field input::placeholder { color: #96a39f; }
.field input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(25,95,89,.1); }
.field input[aria-invalid="true"] { border-color: #ad513c; }
.code-input { font-size: 1.35rem !important; font-weight: 700 !important; letter-spacing: .28em; text-align: center; }
.code-sent { margin: 0 0 2px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.code-sent strong { color: var(--ink); }
.back-button,.resend-button { width: max-content; padding: 0; border: 0; color: var(--teal); background: transparent; cursor: pointer; font-size: .82rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.resend-button { margin: -3px auto 0; }

.microsoft-logo { display: grid; grid-template-columns: repeat(2, 9px); gap: 2px; }
.microsoft-logo i { width: 9px; height: 9px; display: block; }
.microsoft-logo i:nth-child(1) { background: #f35325; }
.microsoft-logo i:nth-child(2) { background: #81bc06; }
.microsoft-logo i:nth-child(3) { background: #05a6f0; }
.microsoft-logo i:nth-child(4) { background: #ffba08; }

.security-note { display: flex; justify-content: center; gap: 8px; margin: 18px 0 0; color: var(--muted); font-size: .78rem; text-align: center; }
.status { margin-top: 16px; padding: 13px 15px; border-radius: 10px; color: #7a401c; background: #fff1e8; font-size: .86rem; line-height: 1.5; }
.status[data-kind="info"] { color: var(--teal-dark); background: var(--mint); }

.help { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--line); }
.help h3 { margin: 0 0 8px; font-size: 1rem; }
.help p { margin: 0 0 9px; color: var(--muted); font-size: .9rem; }
.help a { color: var(--teal); font-size: .9rem; font-weight: 700; text-underline-offset: 4px; }
.terms { margin: 34px 0 0; color: #788985; font-size: .75rem; line-height: 1.55; }
.terms a { text-underline-offset: 3px; }

@media (max-width: 820px) {
  .shell { display: block; }
  .welcome { display: none; }
  .signin { min-height: 100vh; align-items: center; padding: 36px 24px; }
  .mobile-brand { display: inline-flex; }
  .card { padding: 6px 0; }
}

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