/* Sign-in page styles. Tokens and component classes come from the Industry
   design system (see "Login splash page redesign/ds/styles.css"); page layout
   and auth-specific pieces are at the bottom. */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;700&family=Barlow+Condensed:wght@400;600&family=Lora:wght@500;600&display=swap');

:root {
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --color-text: #1d1f20;
  --color-accent: #5980a6;
  --color-accent-2: #728fab;
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);

  --color-neutral-100: #f5f5f8;
  --color-neutral-800: #424244;
  --color-neutral-900: #2b2b2d;

  --color-accent-100: #eef6ff;
  --color-accent-400: #94bce3;
  --color-accent-600: #597ea3;
  --color-accent-700: #416180;
  --color-accent-800: #2c455d;
  --color-accent-900: #1d2d3d;

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Barlow", system-ui, sans-serif;

  --space-1: 3.4px;
  --space-2: 6.8px;
  --space-3: 10.2px;
  --space-4: 13.6px;

  --radius-md: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}
h1, h2 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
}
p { margin: 0; }
img { display: block; max-width: 100%; }
.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid var(--color-divider);
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: 0;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-ghost { border-color: transparent; color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — forms — */
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
/* Quieter than the label it sits in: the word is a permission, not a heading. */
.field > label .field-optional {
  color: color-mix(in srgb, var(--color-text) 45%, transparent);
}

.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: 0;
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
.seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: 0;
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { background: var(--color-accent); color: var(--color-bg); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* — blueprint frame — */
.blueprint { position: relative; }
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.blueprint > .corner::before, .blueprint > .corner::after {
  content: ""; position: absolute; background: currentColor;
}
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after  { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

/* ══════════════════════════════════════════════════════════════════════════
   Sign-in page layout
   ══════════════════════════════════════════════════════════════════════════ */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 54% 1fr;
}

/* — brand panel — */
.login-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  /* Top padding clears the top waveform strip; bottom padding keeps the
     scope note clear of the larger bottom waveform. */
  padding: 150px 60px 150px;
  background: #1D2939; color: #FDFDFD;
}
.login-brand-grid {
  position: absolute; inset: 0; opacity: .14;
  background-image:
    linear-gradient(#f2f2f3 1px, transparent 1px),
    linear-gradient(90deg, #f2f2f3 1px, transparent 1px);
  background-size: 68px 68px;
}
/* margin-bottom guarantees a real gap between the logo and the copy block:
   the copy's margin-top:auto only contributes leftover space, which collapses
   to zero on short windows and made this gap shrink below the kicker-to-
   headline gap. The clamp keeps the gap larger than that fixed gap (~45px)
   at any viewport height. */
.login-brand-logo {
  position: relative; display: flex; align-items: center; gap: 14px;
  margin-bottom: clamp(80px, 12vh, 140px);
}
.login-brand-logo img { height: 54px; width: auto; filter: brightness(0) invert(1); }
.login-brand-logo span {
  font: 600 42px/1 var(--font-heading);
  letter-spacing: .01em;
}
.login-brand-copy { position: relative; margin-top: auto; max-width: 640px; }
.login-kicker {
  margin: 0;
  font-size: 14px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: #6395C6;
}
.login-kicker::after {
  content: ""; display: block; width: 36px; height: 2px;
  margin-top: 12px; background: currentColor;
}
.login-brand-copy h1 {
  margin: 16px 0 0; max-width: 620px;
  font-family: "Lora", Georgia, serif; font-weight: 500;
  font-size: 60px; line-height: 1.16; letter-spacing: 0;
  color: #FDFDFD; text-wrap: balance;
}
.login-workflow {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: 680px; margin-top: 48px;
}
.login-workflow-step {
  position: relative; display: flex; flex-direction: column;
  align-items: center; gap: 13px; text-align: center;
}
.login-workflow-step + .login-workflow-step::before {
  content: ""; position: absolute; top: 4px; left: 0;
  width: 1px; height: 108px; background: rgba(99, 149, 198, .4);
}
.login-step-number {
  display: grid; place-items: center;
  width: 72px; height: 72px; border: 1.5px solid #6395C6;
  border-radius: 50%; color: #7AB3E8;
  font-family: var(--font-body); font-weight: 500; font-size: 24px; line-height: 1;
}
.login-step-label {
  color: #FDFDFD; font-size: 20px; font-weight: 500; line-height: 1.15;
  letter-spacing: .06em; text-transform: uppercase;
}
.login-waves {
  position: absolute; left: 0; width: 100%; height: 160px;
  pointer-events: none; color: #3D7DC2;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.login-wave-top {
  top: 0; opacity: .5; transform: scaleY(.82);
  transform-origin: top center;
}
.login-wave-bottom {
  bottom: 0; height: 176px; opacity: .8;
  transform-origin: bottom center;
}
.waveform-bars {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
}
.waveform-baseline {
  fill: none; stroke: currentColor; stroke-width: 1;
  stroke-dasharray: 1 6; opacity: .55;
}
.waveform-guides {
  fill: none; stroke: #6395C6; stroke-width: 1;
  stroke-dasharray: 2 6; opacity: .55;
}
.waveform-label {
  fill: #8FB0D0; stroke: none; opacity: .85;
  font: 16px var(--font-body); letter-spacing: .02em;
}

/* — form panel — */
.login-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px 64px;
  background: var(--color-bg);
}
.login-panel h2 { margin: 0 0 6px; font-size: 34px; line-height: 1.1; }
#auth-description { margin: 0 0 24px; font-size: 14px; }
.login-seg { width: 100%; margin-bottom: 24px; }
.login-seg .seg-opt { flex: 1; justify-content: center; }
#auth-form, #signup-fields { display: grid; gap: 14px; }
#signup-fields { margin-bottom: 0; }
#signup-fields[hidden], #auth-form[hidden] { display: none; }

.password-guidance {
  padding: 14px 16px;
  border: 1px solid var(--color-divider);
  background: rgba(89, 128, 166, .05);
}
.password-guidance p {
  margin: 0 0 9px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.password-requirements {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px;
  margin: 0; padding: 0; list-style: none; font-size: 12.5px;
}
.password-requirements li {
  position: relative; padding-left: 21px;
  color: rgba(29, 31, 32, .42);
}
.password-requirements li::before {
  content: ""; position: absolute; top: .22em; left: 0;
  width: 13px; height: 13px;
  border: 1.5px solid currentColor; border-radius: 50%;
}
.password-requirements li.is-met { color: var(--color-accent-700); }
.password-requirements li.is-met::before {
  content: "✓"; display: grid; place-items: center;
  border-color: var(--color-accent-700);
  font-size: 10px; font-weight: 700; line-height: 1;
}

.form-error {
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, #a33c3c 45%, transparent);
  background: color-mix(in srgb, #a33c3c 8%, transparent);
  color: #8c2f2f; font-size: 13px; line-height: 1.45;
}

/* Confirmation, not failure: the recovery request deliberately looks the same
   whether or not the address has an account, so it must not look like an error. */
.form-notice {
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--color-accent-900, #2f4858) 35%, transparent);
  background: color-mix(in srgb, var(--color-accent-900, #2f4858) 6%, transparent);
  color: var(--color-accent-900, #2f4858); font-size: 13px; line-height: 1.45;
}

.auth-alt {
  margin-top: 14px; display: flex; justify-content: space-between; gap: 12px;
}
.auth-alt .text-link {
  min-height: 36px; padding: 6px 12px; cursor: pointer; display: inline-flex; align-items: center;
  font: inherit; font-size: 12px; font-weight: 600; color: #176aa6;
  background: #fff; border: 1px solid #e4a51b; border-radius: 8px; text-decoration: none;
}
.auth-alt .text-link:hover { border-color: #c98c08; }
.auth-alt .text-link[hidden] { display: none; }

.auth-submit { margin-top: 10px; height: 44px; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.auth-submit .corner { color: color-mix(in srgb, var(--color-accent-900) 65%, transparent); }
.auth-demo { height: 36px; font-size: 13px; }
.login-privacy { margin-top: 34px; font-size: 11px; line-height: 1.6; }
.login-support { margin-top: 8px; font-size: 11px; line-height: 1.6; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 42vh; padding: 110px 28px 160px; }
  .login-brand-logo { margin-bottom: 48px; }
  .login-brand-copy h1 { font-size: 34px; }
  .login-workflow { margin-top: 30px; }
  .login-workflow-step + .login-workflow-step::before { top: 2px; height: 76px; }
  .login-step-number { width: 54px; height: 54px; font-size: 18px; }
  .login-step-label { font-size: 15px; }
  .login-wave-top { height: 112px; }
  .login-wave-bottom { height: 132px; }
  .login-panel { padding: 40px 28px 56px; }
  .password-requirements { grid-template-columns: 1fr; }
}

/* The code step shown after the password, for people who turned on two-step sign-in. */
.auth-code-apps { margin: 0 0 12px; padding: 0; border: 0; }
.auth-code-apps legend { margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.auth-code-apps label { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; }
.auth-code-actions { margin-top: 14px; display: flex; justify-content: space-between; gap: 12px; }
.auth-code-actions .text-link, .auth-code-help .text-link {
  min-height: 36px; padding: 6px 12px; cursor: pointer; display: inline-flex; align-items: center;
  font: inherit; font-size: 12px; font-weight: 600; color: #176aa6;
  background: #fff; border: 1px solid #e4a51b; border-radius: 8px; text-decoration: none;
}
.auth-code-actions .text-link:hover, .auth-code-help .text-link:hover { border-color: #c98c08; }
.auth-code-help { margin-top: 14px; font-size: 13px; line-height: 1.5; }
.auth-code-help p { margin: 0 0 10px; }
.login-panel [hidden] { display: none; }
