:root {
  color-scheme: dark;
  --bg: #040506;
  --panel: #141414;
  --line: #2a2a2a;
  --ink: #ffffff;
  --muted: #a7adb6;
  --accent: #e53935;
  --accent-2: #ff6460;
  --shell-max-width: 390px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #040506;
  color: var(--ink);
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.login-page {
  width: min(100%, var(--shell-max-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) clamp(18px, 5vw, 28px) calc(28px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(180deg, rgba(4, 5, 7, .08) 0%, rgba(4, 5, 7, .62) 24%, #040506 48%),
    url('/assets/clutch5-stage2-bg.png') top center / 100% auto no-repeat;
}

.brand {
  min-height: calc(min(100vw, var(--shell-max-width)) * .21);
}

.brand-label {
  display: inline-block;
  color: #ff6460;
  text-transform: uppercase;
  letter-spacing: .14em;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.login-panel {
  align-self: center;
  display: grid;
  gap: 18px;
  padding: 22px 0 18px;
}

.headline {
  margin: 0 0 8px;
  font-size: clamp(42px, 14vw, 58px);
  line-height: .92;
  letter-spacing: 0;
}

.login-actions {
  display: grid;
  gap: 14px;
}

.button {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  color: #ffffff;
  background: rgba(18, 20, 24, .9);
  text-decoration: none;
  font: 700 15px/1 'Avenir Next', 'Avenir', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  cursor: pointer;
}

.button-google {
  background: #f7f7f7;
  color: #161616;
  border-color: #ffffff;
}

.button-email {
  background: linear-gradient(180deg, #e8393c, #c1252a);
  border-color: #ff5b57;
  box-shadow: 0 8px 24px rgba(193, 37, 42, .3);
}

.google-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #ffffff;
  color: #161616;
  font: 800 13px/1 Arial, sans-serif;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  height: 1px;
  background: var(--line);
}

.email-form {
  display: grid;
  gap: 10px;
}

label {
  color: #bbc2cc;
  font-size: 13px;
  font-weight: 700;
}

input[type='email'],
.code-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(15, 18, 23, .78);
  font: 500 16px/1.2 'Avenir Next', 'Avenir', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

input[type='email']:focus,
.code-input:focus {
  outline: 2px solid rgba(255, 100, 96, .55);
  outline-offset: 2px;
}

.email-step {
  display: grid;
  gap: 10px;
}

.code-input {
  letter-spacing: .38em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.button-quiet {
  background: rgba(18, 20, 24, .6);
  border-color: rgba(255, 255, 255, .12);
  font-weight: 600;
}

.button-quiet:disabled {
  opacity: .5;
  cursor: default;
}

.email-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.link-button {
  justify-self: center;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: #f2f4f7;
  font: 600 13px/1.2 'Avenir Next', 'Avenir', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-decoration: underline;
  cursor: pointer;
}

.email-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.legal-links a {
  color: #f2f4f7;
  text-decoration: none;
}

@media (min-width: 720px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(229, 57, 53, .16), transparent 34%),
      linear-gradient(180deg, #08090b 0%, #040506 55%, #020303 100%);
  }
}
/* Signup confirmation. Both boxes are required before a new account is
   created; neither is pre-checked, and nothing here is disabled, because
   signing in to an account that already exists needs no confirmation. */
.consent {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 4px;
  background: rgba(20, 20, 20, .55);
}

.consent-legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}

/* The refusal message, directly above the boxes it is about. Light text on a
   dark red wash clears WCAG AA comfortably on this near-black panel, and the
   left bar keeps it legible for anyone who does not separate red from grey. */
.consent-alert {
  margin: 0 0 12px;
  border: 1px solid var(--accent-2);
  border-left: 3px solid var(--accent-2);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(229, 57, 53, .18);
  color: #ffe9e8;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

/* Explicit, so the attribute still hides it under any reset. */
.consent-alert[hidden] {
  display: none;
}

.consent-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

/* A comfortable tap target on a phone without enlarging the row. */
.consent-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.consent-check a {
  color: var(--accent-2);
}
