/* ==========================================================================
   MASKED CITY — AUTH PAGES
   Shared stylesheet for login / register / forgot-password / reset-password
   / resend-verification. These pages render standalone (layout:false) and
   never touch the main shell, so they get their own small token set here
   rather than pulling in styles.css or tokens.css — same visual language
   (Anton/Oswald type, red/blue alignment colours, clipped-corner buttons)
   as the redesigned shell, but self-contained.

   Always light — auth pages don't have a theme toggle, they ARE the light
   treatment. Background is bg-light.jpeg on every auth page's pitch
   column, including login (previously a looping video there — swapped
   back to the same static image register already used, for consistency).
   ========================================================================== */

* { box-sizing: border-box; }

:root {
  --a-bg:        #a4d1f7;
  --a-surface:   #ffffff;
  --a-surface-2: #f3f8fe;
  --a-line:      rgba(20,30,50,0.12);
  --a-line-2:    rgba(20,30,50,0.20);

  --a-red:       #d31026;
  --a-red-deep:  #8d0a1a;
  --a-red-glow:  rgba(211,16,38,0.35);
  --a-blue:      #0f6fc4;
  --a-blue-deep: #0a4d8c;
  --a-gold:      #a67500;
  --a-green:     #12864b;

  /* The comic outline. Every border and every offset shadow on these pages
     is this one colour — that hard black edge is what makes the card read
     as the same object as the artwork beside it, instead of a SaaS panel
     that happened to land next to a game. */
  --a-ink:       #14101a;

  --a-text:      #16131a;
  --a-text-2:    rgba(20,19,26,0.68);
  --a-text-3:    rgba(20,19,26,0.50);

  --a-font-display: 'Bangers', Impact, cursive;
  --a-font-head:    'Anton', 'Arial Narrow', sans-serif;
  --a-font-ui:      'Oswald', 'Arial Narrow', sans-serif;
  --a-font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --a-t-fast: 120ms cubic-bezier(.4,0,.2,1);
  --a-t-mid:  220ms cubic-bezier(.4,0,.2,1);

  /* Width of the form column on desktop. Declared once because the hero grid
     and the photo's right inset have to agree exactly — if they drift, the
     photo runs under the white card column. */
  --a-form-col: 460px;

  /* Flat ground for phones, where the body photo cannot be used (see the
     mobile body rule). Sits in the same blue family as --a-bg under its
     white wash, so the two treatments read as one design. */
  --a-ground: #cfe4f8;

  /* The deep blue the hero art sits on. Was written out three times: the
     scrim behind the photo, the mobile proof strip, and now the phone
     ground. */
  --a-night: #0d2e4d;

  color-scheme: light;
}

/* These pages never load styles.css, so the icon sizing that inline
   icon() SVGs rely on has to be declared here too. */
.ico {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

html, body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--a-font-body);
  color: var(--a-text);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--a-bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.35), rgba(255,255,255,0.55)),
    url('/images/ui/bg-light.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

a { color: var(--a-blue); text-decoration: none; }

/* ==========================================================================
   SHARED FRAME — centered single card, used by forgot-password,
   reset-password, resend-verification. Login/register override with the
   two-column .auth-hero layout further down.
   ========================================================================== */
.auth-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

/* ==========================================================================
   WORDMARK — text-only brand mark, replaces the logo image. Bangers is the
   site's comic-title face, used sparingly (logo only) elsewhere, so this
   is the one place on these pages that's appropriate for it.
   ========================================================================== */
.auth-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--a-font-display);
  font-size: 34px;
  line-height: 1;
  letter-spacing: .02em;
  margin-bottom: 26px;
}
.auth-wordmark .masked { color: var(--a-text); }
.auth-wordmark .city   { color: var(--a-red); }

/* Light-on-dark variant for the photo/video pitch column. */
.auth-pitch .auth-wordmark .masked { color: #fff; }
.auth-pitch .auth-wordmark .city   { color: #ff5a68; }

/* Small centered variant sitting above the card on the single-card pages. */
.auth-wordmark--center {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 22px;
}

/* ==========================================================================
   CARD — the frosted-glass form panel used everywhere.
   ========================================================================== */
.auth-card {
  width: 100%;
  max-width: 400px;
  /* Solid, not frosted. A blurred translucent panel is the one thing on
     these pages that could not be drawn in ink, and it made the form half
     look like a different product from the art half. */
  background: var(--a-surface);
  border: 3px solid var(--a-ink);
  border-radius: 4px;
  box-shadow: 6px 6px 0 var(--a-ink);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  /* Was red-to-gold-to-blue, which mixed to a muddy olive in the middle and
     spent three meaning-carrying hues on decoration. Red alone: this page's
     one action is red. */
  background: var(--a-red);
}

.auth-card-title {
  font-family: var(--a-font-head);
  font-size: 26px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--a-text);
  transform: skewX(-6deg);
  transform-origin: left;
  margin-bottom: 6px;
}

.auth-card-sub {
  font-family: var(--a-font-ui);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--a-text-3);
  letter-spacing: .02em;
  margin-bottom: 26px;
  line-height: 1.5;
}
.auth-card-sub strong { color: var(--a-text); font-weight: 600; }

/* ==========================================================================
   FORM FIELDS
   ========================================================================== */
.auth-field { margin-bottom: 16px; }

.auth-label {
  display: block;
  font-family: var(--a-font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  /* --a-text-3 is 3.5:1 against the card. Labels are not decoration. */
  color: var(--a-text-2);
  margin-bottom: 6px;
  --emph-weight: 600;
}

.auth-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--a-surface-2);
  border: 2px solid var(--a-ink);
  border-radius: 4px;
  color: var(--a-text);
  font-family: var(--a-font-body);
  /* 16px is not a taste call: below it, iOS Safari zooms the page on focus
     and the player has to pinch back out mid-signup. */
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color var(--a-t-fast), background var(--a-t-fast), box-shadow var(--a-t-fast);
}
/* Focus was a blue ring, and blue means HERO everywhere else in this game —
   on the register page it sat inches from a blue hero tile. Red is the
   page's action colour, and the offset matches the button. */
.auth-input:focus {
  border-color: var(--a-red);
  background: #fff;
  box-shadow: 3px 3px 0 var(--a-red);
}
/* Was 2.1:1 — technically visible, practically not. */
.auth-input::placeholder { color: rgba(20,19,26,0.5); }

/* Chrome paints autofilled fields pale blue, which undoes the border and
   the surface in one go. The inset shadow is the only way to repaint it. */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--a-text);
  -webkit-box-shadow: 0 0 0 100px var(--a-surface-2) inset;
  caret-color: var(--a-text);
}

/* Field-level error. The browser's own bubble vanishes on the next tap and
   leaves nothing behind saying which field was wrong. */
.auth-input.is-invalid { border-color: var(--a-red); }
.auth-field-error[hidden] { display: none; }
.auth-field-error {
  display: block;
  margin-top: 5px;
  font-family: var(--a-font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--a-red);
}

/* Password show/hide. 44px square, sitting inside the field's own box. */
.auth-input-wrap { position: relative; display: block; }
.auth-input-wrap .auth-input { padding-right: 52px; }
.auth-peek {
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--a-text-2);
  font-size: 18px;
}
.auth-peek:hover { color: var(--a-red); }
.auth-peek:focus-visible { outline: 2px solid var(--a-red); outline-offset: -4px; }

/* Strength meter. Four segments rather than a word, because "weak" tells
   the player they failed and a filling bar tells them how to pass. */
.auth-strength { display: flex; gap: 4px; margin-top: 6px; }
.auth-strength span {
  flex: 1;
  height: 4px;
  background: var(--a-line-2);
  border-radius: 2px;
  transition: background var(--a-t-fast);
}
.auth-strength[data-score="1"] span:nth-child(-n+1) { background: var(--a-red); }
.auth-strength[data-score="2"] span:nth-child(-n+2) { background: var(--a-gold); }
.auth-strength[data-score="3"] span:nth-child(-n+3) { background: var(--a-gold); }
.auth-strength[data-score="4"] span:nth-child(-n+4) { background: var(--a-green); }
.auth-hint {
  display: block;
  margin-top: 5px;
  font-family: var(--a-font-ui);
  font-size: 12px;
  font-weight: 400;
  color: var(--a-text-2);
}

.auth-terms {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--a-text-2);
  cursor: pointer;
}
.auth-terms input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  accent-color: var(--a-red);
  cursor: pointer;
}
.auth-terms a { color: var(--a-blue); text-decoration: underline; }
.auth-terms a:hover { color: var(--a-red); }

/* ==========================================================================
   THE SIGNUP BUTTON — this is the whole point. Big, glowing, unmissable.
   ========================================================================== */
.auth-btn {
  width: 100%;
  min-height: 52px;
  padding: 14px;
  margin-top: 6px;
  /* The gradient ran to #ef3247, where white text is 4.0:1 — under the bar
     on the single most important control on the site. Solid red is 5.4:1
     and, being flat, can carry an ink border like everything else. */
  background: var(--a-red);
  border: 3px solid var(--a-ink);
  border-radius: 4px;
  color: #fff;
  font-family: var(--a-font-head);
  font-size: 16px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--a-ink);
  transition: transform var(--a-t-fast), box-shadow var(--a-t-fast), background var(--a-t-fast);
}
.auth-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--a-ink);
  background: #e0142b;
}
/* Travels into its own shadow — the button physically depresses. */
.auth-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--a-ink); }
.auth-btn:focus-visible { outline: 3px solid var(--a-ink); outline-offset: 3px; }
.auth-btn[disabled] { opacity: .75; cursor: progress; transform: none; }
.auth-btn .ico { vertical-align: -0.15em; margin-right: 6px; }
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-btn__spin { display: inline-block; animation: authSpin 700ms linear infinite; }

.auth-btn--ghost {
  background: var(--a-surface-2);
  color: var(--a-text);
  border: 3px solid var(--a-ink);
  box-shadow: 4px 4px 0 var(--a-ink);
}
.auth-btn--ghost:hover { background: #fff; box-shadow: 5px 5px 0 var(--a-ink); }

/* Was an 11.5px line with a ~16px hit area at 3.5:1. */
.auth-forgot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  font-family: var(--a-font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--a-text-2);
  letter-spacing: .02em;
}
.auth-forgot:hover { color: var(--a-red); }

.auth-divider {
  height: 1px;
  background: var(--a-line);
  margin: 24px 0;
}

.auth-register-link {
  text-align: center;
  font-family: var(--a-font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--a-text-2);
}
/* The cross-link is the second most likely thing a visitor wants, so it
   gets a real button rather than a sentence with a word underlined in it. */
.auth-register-link .auth-btn--ghost {
  margin-top: 10px;
  min-height: 48px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.auth-register-link a { color: var(--a-red); font-weight: 600; }
.auth-register-link a:hover { color: var(--a-red-deep); }

.auth-flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 4px;
  border: 3px solid var(--a-ink);
  box-shadow: 4px 4px 0 var(--a-ink);
  font-family: var(--a-font-ui);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.45;
}
.auth-flash .ico { font-size: 18px; margin-top: 1px; }
/* A pale pink tint at 12.5px was losing to the artwork behind the card.
   If the form rejected you, the page should say so like it means it. */
.auth-flash.error   { background: var(--a-red);   color: #fff; }
.auth-flash.success { background: var(--a-green); color: #fff; }

.auth-note {
  font-family: var(--a-font-ui);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--a-text-2);
  line-height: 1.6;
  margin-bottom: 22px;
}
.auth-note strong { color: var(--a-text); font-weight: 600; }

/* ==========================================================================
   HERO SHELL — login + register: two-column, pitch on the left, card on
   the right. Pitch column carries either a <video> background (login,
   when provided) or the bg-light.jpeg photo treatment shared with the
   rest of the light theme.
   ========================================================================== */
/* LAUNCH ANNOUNCEMENT — temporary, remove after Sept 1. Full-width strip
   above the hero split so it's the first thing anyone landing on login
   sees, regardless of which column they're looking at. One-time fade/
   drop entrance (not a looping shimmer — this sits in view the whole
   time someone reads the form, so no continuous motion in it). */
.launch-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap;
  text-align: center;
  padding: 13px 20px;
  background: linear-gradient(90deg, #8a6000, #d4a017, #8a6000);
  color: #1a1200;
  font-family: var(--a-font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 2px 14px rgba(166,117,0,0.35);
  animation: launchBannerIn 500ms var(--a-t-mid) both;
}
.launch-banner__icon { font-size: 16px; }
.launch-banner strong { font-weight: 800; }
@keyframes launchBannerIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .launch-banner { animation: none; }
}
@media (max-width: 480px) {
  .launch-banner { font-size: 12px; padding: 11px 16px; }
}

.auth-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr var(--a-form-col);
}

/* Photo + scrim for the left column, as a pseudo-element rather than the two
   absolutely-positioned divs this used to carry. Those lived inside
   .auth-pitch, which is fine until mobile needs .auth-pitch to be
   display:contents — a box with no box cannot hold a background. */
.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0 var(--a-form-col) 0 0;
  background-color: var(--a-night);
  /* Horizontal, not diagonal. The copy occupies the left ~55% and the art's
     subject stands on the right, so the scrim goes dark exactly where text
     has to be read and clears off where the villain is. The old 115deg ramp
     left the feature rows sitting on full-brightness artwork. */
  background-image:
    linear-gradient(90deg,
      rgba(8,18,32,0.90) 0%,
      rgba(8,18,32,0.78) 30%,
      rgba(8,18,32,0.44) 56%,
      rgba(8,18,32,0.12) 85%,
      rgba(8,18,32,0) 100%),
    url('/images/ui/bg-light.jpeg');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* Sits below .auth-hero, directly on the body's photographic background —
   no single text/icon color reads reliably against a busy photo, so this
   gets its own solid bar instead of relying on contrast with whatever's
   behind it. */
.auth-footer {
  background: var(--a-surface);
  border-top: 1px solid var(--a-line);
  padding: 18px 20px;
}
.auth-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}
.auth-footer-links a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--a-text-3);
  text-decoration: none;
  text-transform: uppercase;
  --emph-weight: 600;
}
.auth-footer-links a:hover { color: var(--a-red); }

.auth-footer-social {
  display: flex;
  justify-content: center;
  gap: 14px;
}
.auth-footer-social a {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--a-surface-2);
  border: 1px solid var(--a-line);
  transition: transform var(--a-t-fast), border-color var(--a-t-fast);
}
.auth-footer-social a:hover {
  transform: translateY(-2px);
  border-color: var(--a-red);
}
.auth-footer-social img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.auth-pitch {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 64px 60px;
}

.auth-lead,
.auth-proof { max-width: 520px; }

.auth-tagline {
  font-family: var(--a-font-head);
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #fff;
  transform: skewX(-6deg);
  transform-origin: left;
  margin-bottom: 10px;
}
.auth-tagline span { color: #ff5a68; }

.auth-subtitle {
  font-family: var(--a-font-ui);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.62);
  letter-spacing: .04em;
}

.auth-proof {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.auth-feature { display: flex; align-items: center; gap: 14px; }
.auth-feature-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: #ff5a68;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
}
.auth-feature-text strong {
  display: block;
  font-family: var(--a-font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #fff;
}
.auth-feature-text span {
  font-family: var(--a-font-ui);
  font-size: 11.5px;
  font-weight: 400;
  color: rgba(255,255,255,0.68);
}

.auth-live-stats {
  display: flex;
  gap: 22px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  backdrop-filter: blur(6px);
}
.auth-stat { text-align: center; }
.auth-stat-value {
  display: block;
  font-family: var(--a-font-head);
  font-size: 21px;
  color: #ff5a68;
}
.auth-stat-label {
  font-family: var(--a-font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(255,255,255,0.66);
  text-transform: uppercase;
  --emph-weight: 600;
}

.auth-form-col {
  position: relative;
  z-index: 1;
  /* Was flat white, which read as an empty slab next to the artwork. A very
     shallow top-to-bottom ramp plus a shadow on the photo edge gives the card
     something to sit on without decorating the column itself. */
  background: linear-gradient(180deg, var(--a-surface) 0%, var(--a-surface-2) 100%);
  box-shadow: -26px 0 52px -26px rgba(8,18,32,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

/* ==========================================================================
   ALIGNMENT PICKER — register only.
   ========================================================================== */
.auth-align-label {
  display: block;
  font-family: var(--a-font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--a-text-3);
  margin-bottom: 8px;
  --emph-weight: 600;
}
.auth-align-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.auth-align-card {
  position: relative;
  min-height: 48px;
  border: 2px solid var(--a-ink);
  border-radius: 4px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  background: var(--a-surface-2);
  box-shadow: 3px 3px 0 var(--a-ink);
  transition: border-color var(--a-t-fast), background var(--a-t-fast),
              box-shadow var(--a-t-fast), transform var(--a-t-fast);
}
/* The tick is the point: a colour-blind player cannot read "the red one is
   selected", so selection is also a mark, not only a fill. */
.auth-align-check {
  position: absolute;
  top: 6px; right: 6px;
  display: none;
  font-size: 16px;
  color: #fff;
}
.auth-align-card.selected-hero .auth-align-check,
.auth-align-card.selected-villain .auth-align-check { display: block; }
.auth-align-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
#heroCard, #villainCard { border-color: var(--a-ink); }
#heroCard:hover    { border-color: var(--a-blue); }
#villainCard:hover { border-color: var(--a-red); }
#heroCard:focus-within    { outline: 3px solid var(--a-blue); outline-offset: 2px; }
#villainCard:focus-within { outline: 3px solid var(--a-red);  outline-offset: 2px; }
/* Selected reads as PRESSED: solid fill, and the tile travels into its own
   shadow. An 8% tint behind a 2px border was a difference you had to look
   for, on the one choice this page asks the player to make. */
.auth-align-card.selected-hero {
  background: var(--a-blue);
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--a-ink);
}
.auth-align-card.selected-villain {
  background: var(--a-red);
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--a-ink);
}
.auth-align-card.selected-hero .auth-align-name,
.auth-align-card.selected-villain .auth-align-name,
.auth-align-card.selected-hero .auth-align-desc,
.auth-align-card.selected-villain .auth-align-desc { color: #fff; }
.auth-align-card.selected-hero .auth-align-icon,
.auth-align-card.selected-villain .auth-align-icon { color: #fff; }
.auth-align-badge {
  width: 44px; height: 44px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 2px solid var(--a-line-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #fff;
  transition: border-color var(--a-t-fast), background var(--a-t-fast);
}
.auth-align-badge img { width: 26px; height: 26px; object-fit: contain; }
#heroCard .auth-align-badge    { border-color: rgba(15,111,196,0.35); }
#villainCard .auth-align-badge { border-color: rgba(211,16,38,0.35); }
.auth-align-card.selected-hero .auth-align-badge    { border-color: var(--a-blue); background: rgba(15,111,196,0.12); }
.auth-align-card.selected-villain .auth-align-badge { border-color: var(--a-red); background: rgba(211,16,38,0.12); }
.auth-align-name {
  display: block;
  font-family: var(--a-font-head);
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--a-text);
  margin-bottom: 4px;
}
.auth-align-icon {
  display: block;
  font-size: 26px;
  line-height: 1;
  margin: 0 auto 6px;
}
#heroCard .auth-align-icon    { color: var(--a-blue); }
#villainCard .auth-align-icon { color: var(--a-red); }
.auth-align-desc {
  font-family: var(--a-font-ui);
  font-size: 11px;
  font-weight: 400;
  color: var(--a-text-3);
  line-height: 1.4;
  --emph-weight: 600;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
/* ──────────────────────────────────────────────────────────────────────────
   MOBILE: THE FORM COMES FIRST.

   Stacking the columns in source order put 503px of pitch above the card, so
   an ad click landed on a screen with no form on it at all — the register
   button sat at 1132px, 1.4 screens down. Order is inverted instead:

       photo band (wordmark + tagline)   <- .auth-lead, the ad's promise
       the form card                     <- pulled up over the band
       features + live stats             <- .auth-proof, now the follow-up
       footer

   .auth-pitch goes display:contents so its two children become flex items of
   .auth-hero and can be ordered around .auth-form-col. That works only
   because the photo moved to .auth-hero::before — a display:contents box
   paints no background of its own.
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  /* The photo stops being a full column and becomes a banner behind the lead.
     Scrim runs top-to-bottom now, not diagonally, and lands darkest at the
     bottom edge so the card's top rim has something solid to sit against. */
  .auth-hero::before {
    inset: 0 0 auto 0;
    /* Scales with the viewport instead of eating a third of a short phone.
       The art is the best asset on the page; it should not be a 150px
       letterbox, nor push the button past the fold. */
    height: clamp(200px, 30vh, 260px);
    background-image:
      linear-gradient(180deg, rgba(8,18,32,0.62) 0%, rgba(8,18,32,0.80) 62%, rgba(8,18,32,0.92) 100%),
      url('/images/ui/bg-light.jpeg');
  }

  .auth-pitch { display: contents; }

  .auth-lead {
    order: 1;
    position: relative;
    z-index: 1;
    max-width: none;
    /* The bottom padding is the card's overlap plus clearance. The card is
       pulled up 40px, so with no padding here it landed on top of the
       tagline and sliced the words in half. */
    padding: 24px 20px 52px;
    text-align: center;
  }
  .auth-wordmark { margin-bottom: 10px; }

  /* Every px above the card pushes the submit button further past the fold,
     and register has four fields plus an alignment picker to fit. These trims
     are what take its button from 818px to inside a phone screen. */
  .auth-card-sub { margin-bottom: 14px; }
  .auth-label { margin-bottom: 4px; }
  .auth-tagline {
    font-size: 30px;
    transform: none;      /* centred text reads crooked under a skew */
    margin-bottom: 6px;
  }
  .auth-subtitle { font-size: 13px; }

  /* The card overlaps the band rather than starting below it, so the two read
     as one composed unit and the first field clears the fold. */
  .auth-form-col {
    order: 2;
    background: transparent;
    box-shadow: none;
    padding: 0 16px 32px;
    overflow: visible;
  }


  /* On desktop the card sits on a white column, so 0.86 alpha is safe. Here
     it floats directly on the artwork, and at 0.86 the body text contrast
     depends on whichever part of the photo happens to be behind it. */
  .auth-card {
    background: var(--a-surface);
    box-shadow: 5px 5px 0 var(--a-ink);
    /* Rides up over the photo band so the art and the form read as one
       composed unit — and, more to the point, so the first field clears
       the fold on a 667px screen. */
    margin-top: -40px;
  }

  .auth-proof {
    order: 3;
    max-width: none;
    gap: 22px;
    padding: 30px 20px 34px;
    background: var(--a-night);
  }
  /* Two-up on phones: four full-width rows was a third of a screen of
     scrolling for content nobody had asked for yet. */
  .auth-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 12px;
  }
  .auth-feature { align-items: flex-start; gap: 10px; }
  .auth-feature-icon { width: 34px; height: 34px; font-size: 17px; }
  .auth-feature-text strong { font-size: 12px; }
  .auth-feature-text span { font-size: 11px; line-height: 1.35; display: block; }
  .auth-live-stats { justify-content: space-between; gap: 10px; }

  /* Every remaining text link becomes a real target. */
  .auth-terms a,
  .auth-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* With the keyboard open, the button is the thing that must still be
     reachable — scroll-margin keeps it clear of the keyboard when a field
     above it takes focus. */
  .auth-btn { scroll-margin-bottom: 96px; }

  .auth-field { margin-bottom: 12px; }
  .auth-card { padding: var(--s4, 16px) 18px 24px; }

  /* The footer was a white bar under a dark page. */
  .auth-footer {
    background: var(--a-ink);
    border-top: 0;
  }
  .auth-footer-links a { color: rgba(255,255,255,0.72); }
  .auth-footer-links a:hover { color: #ff5a68; }
  .auth-footer-social a {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
  }
}

@media (max-width: 480px) {
  .auth-card { padding: 22px 20px; border-radius: 12px; }
  .auth-field { margin-bottom: 12px; }
  .auth-tagline { font-size: 26px; }
  .auth-align-choice { gap: 8px; margin-bottom: 12px; }
  .auth-align-card { padding: 8px 6px; }
  .auth-align-badge { width: 34px; height: 34px; margin-bottom: 5px; }
  .auth-align-badge img { width: 18px; height: 18px; }
  .auth-align-desc { display: none; }
  .auth-live-stats { flex-wrap: wrap; gap: 14px 22px; }
}

/* Single-column phones only: the features grid goes back to one column
   below this, where two columns would break the labels mid-word. */
/* Under 400px the features and the counters are three screens of content
   between the fold and anything the visitor can act on. The headline and
   the form survive; the sales pitch waits until they are inside. */
@media (max-width: 400px) {
  .auth-proof { display: none; }
  .auth-subtitle { display: none; }
}

@media (max-width: 360px) {
  .auth-features { grid-template-columns: 1fr; }
  .auth-card { padding: 14px 14px 20px; }
}

/* ── OAuth provider buttons ─────────────────────────────────────────────────
   Sized to sit under .auth-btn as a peer: same full width, same 9px radius,
   slightly shorter (46px vs 50px) so the password button stays the primary
   action on the page.

   The brand colours are deliberate raw hex rather than --a-* variables:
   Google and Discord both require their mark and palette to appear
   unmodified, so these must not drift with the rest of the card. */
.oauth-form { margin: 0 0 10px; }
.oauth-form:last-of-type { margin-bottom: 0; }

.oauth-btn {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--a-ink);
  font-family: var(--a-font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  --emph-weight: 600;
}
.oauth-btn__mark { flex-shrink: 0; display: block; }
.oauth-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--a-ink); }
.oauth-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--a-ink); }
.oauth-btn:focus-visible { outline: 2px solid var(--a-red); outline-offset: 2px; }

/* Google — white surface, #747775 border, #1f1f1f text: their standard
   light button. The mark is full-colour and only reads on white, so this
   stays white regardless of anything else on the page. */
.oauth-btn--google {
  background: #ffffff;
  border: 2px solid var(--a-ink);
  color: #1f1f1f;
}
.oauth-btn--google:hover {
  background: #f7f8f8;
  box-shadow: 4px 4px 0 var(--a-ink);
}

/* Discord — blurple, white mark and text. */
.oauth-btn--discord {
  background: #5865F2;
  border: 2px solid var(--a-ink);
  color: #ffffff;
}
.oauth-btn--discord:hover {
  background: #4752c4;
  box-shadow: 4px 4px 0 var(--a-ink);
}

/* Divider carrying an "or" label, between the password form and the
   provider buttons. Builds on the plain .auth-divider rule above. */
.auth-divider--labelled {
  display: flex;
  align-items: center;
  gap: 12px;
  height: auto;
  background: none;
  margin: 20px 0 14px;
}
.auth-divider--labelled::before,
.auth-divider--labelled::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--a-line);
}
.auth-divider--labelled span {
  font-family: var(--a-font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--a-text-3);
  --emph-weight: 600;
}

/* ── Finish-signup extras (alignment picker, terms, field hint) ── */
.auth-hint {
  font-family: var(--a-font-body);
  font-size: 11.5px;
  color: var(--a-text-3);
  margin-top: 6px;
  line-height: 1.45;
}

.auth-align { display: flex; gap: 10px; }
.auth-align__opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 12px;
  background: var(--a-surface-2);
  border: 1px solid var(--a-line-2);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.auth-align__opt:has(input:checked) { border-color: var(--a-red); background: #fff; }
.auth-align__name {
  font-family: var(--a-font-head);
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.auth-align__name--hero { color: var(--a-blue); }
.auth-align__name--villain { color: var(--a-red); }

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 18px 0 4px;
  font-family: var(--a-font-body);
  font-size: 12px;
  line-height: 1.5;
  color: var(--a-text-2);
}
.auth-terms input { margin-top: 2px; flex-shrink: 0; }
.auth-terms a { color: var(--a-red); }

@media (max-width: 560px) {
  .auth-align { flex-direction: column; }
}

/* ==========================================================================
   TOUCH TARGETS

   Measured at 375px before this block: 12 controls on login and 15 on
   register sat under the 44px floor — the forgot-password link at 17px, the
   five footer links at 15px, the social buttons at 30px.

   They get an invisible pseudo-element hit area instead of a min-height.
   min-height was tried on the footer links and grew the footer from 296px to
   381px, which is the opposite of the problem being solved here: a
   pseudo-element expands what the finger can hit without moving anything the
   eye can see.
   ========================================================================== */
.auth-forgot,
.auth-register-link a,
.auth-terms a,
.auth-footer-links a {
  position: relative;
}
.auth-forgot::after,
.auth-register-link a::after,
.auth-terms a::after,
.auth-footer-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
}

/* The terms checkbox measures 16px, but it is wrapped in its <label>, so the
   whole two-line row is the real tap target — no pseudo-element needed, and
   an <input> would not render one anyway (replaced elements have no
   ::after). Just guarantee the row clears 44px. */
.auth-terms { min-height: 44px; align-items: center; }

.auth-footer-social a { width: 44px; height: 44px; }
.auth-footer-social a::after {
  content: '';
  position: absolute;
  inset: -2px;
}
.auth-footer-social a { position: relative; }
.auth-footer-social img { width: 20px; height: 20px; }

/* The body photo is a wide landscape image. background-size: cover on a
   375px-wide viewport scales it roughly 4x, so what actually shows beside and
   below the card is a zoomed, white-washed crop of somebody's sleeve — it
   reads as a rendering fault, not artwork. It was invisible before only
   because the white form column covered it.
   On phones the photo lives in the band at the top of the page, where it is
   cropped deliberately, and everything below it gets a flat ground.
   Dropping the image also drops background-attachment: fixed, which is a
   known repaint-jank trap on iOS Safari. */
@media (max-width: 900px) {
  body {
    /* Dark, not the pale wash this used to carry. The card now has a hard
       black edge and an offset shadow; a light blue slab behind it turned
       that edge into a seam between two unrelated surfaces. Dark ties the
       photo band above and the footer below into one continuous ground,
       and the card reads as sitting ON something. */
    background-image: none;
    background-color: var(--a-night);
    background-attachment: scroll;
  }
}

/* The "Referred by" box: says when an ID doesn't match anyone. */
.auth-hint.is-bad { color: var(--a-red); }
