/* 推特访客 sign-in (x.php), on top of the member gate in members.css.
   The header stays centred like the wallet gate; the four steps hang off one gold thread on the left, each step
   is a title and exactly one row of controls, and every control in a row is the same 40px tall. */
.gate.xg { width: min(500px, 100%); }
.gate.xg .lead { margin-bottom: 30px; }
.gate.xg .status { min-height: 0; margin-top: 18px; }
.gate.xg .status:empty { display: none; }

.xg-steps { list-style: none; margin: 0; padding: 0; text-align: left; position: relative; z-index: 1; counter-reset: xg; }
.xg-step { position: relative; padding: 0 0 24px 46px; counter-increment: xg; }
.xg-step:last-child { padding-bottom: 0; }
/* the thread: from under one number to the next */
.xg-step:not(:last-child)::after {
  content: ""; position: absolute; left: 13px; top: 30px; bottom: 4px; width: 1px;
  background: linear-gradient(var(--gold-dim), rgba(var(--gold-rgb), 0.12));
}
.xg-step::before {
  content: counter(xg); position: absolute; left: 0; top: 0; width: 27px; height: 27px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold); color: var(--gold-hi); background: var(--surface);
  font-family: var(--latin-display); font-size: 13px; font-weight: 700;
}
.xg-step h2 { margin: 2px 0 10px; font-size: 15px; font-weight: 700; line-height: 23px; color: var(--ink); }
.xg-step.done::before { content: "✓"; font-family: var(--sans); background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.xg-step.done h2 { color: var(--muted); }
.xg-step.is-off::before { border-color: var(--gold-dim); color: var(--muted); }
.xg-step.is-off h2 { color: var(--muted); }

.xg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* one height for every control */
.xg-btn, .xg-field { height: 40px; border-radius: 6px; }
.xg-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  padding: 0 18px; font: inherit; font-size: 13.5px; font-weight: 500; letter-spacing: 0.04em; cursor: pointer;
  color: var(--gold-hi); background: var(--gold-faint); border: 1px solid var(--gold);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.xg-btn:hover:not(:disabled) { background: var(--gold); color: var(--on-gold); text-decoration: none; }
.xg-btn.ghost { color: var(--ink); background: transparent; border-color: rgba(var(--line-rgb), 0.45); }
.xg-btn.ghost:hover { background: transparent; color: var(--ink); border-color: var(--muted); }
.xg-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.xg-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* "@" lives inside the box, so the field reads as one control */
.xg-field {
  flex: 1 1 200px; min-width: 0; display: flex; align-items: center; gap: 2px; padding: 0 12px; cursor: text;
  background: rgba(var(--deep-rgb), 0.55); border: 1px solid rgba(var(--line-rgb), 0.4);
  transition: border-color 0.2s;
}
.xg-field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.12); }
.xg-at { color: var(--muted); font-weight: 500; }
.xg-field input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 14px; color: var(--ink);
}
.xg-field input:disabled { cursor: not-allowed; }
.xg-field:has(input:disabled) { opacity: 0.55; }

.xg-done-note, .xg-ttl { font-size: 12.5px; color: var(--muted); line-height: 40px; }
.xg-done-note { color: var(--gold-hi); }
.xg-wait { margin: 0; font-size: 13px; color: var(--muted); }

.xg-text {
  margin: 0 0 10px; padding: 12px 14px; border-radius: 6px; white-space: pre-wrap; word-break: break-word;
  font: inherit; font-size: 13.5px; line-height: 1.65; color: var(--ink);
  background: rgba(var(--deep-rgb), 0.55); border: 1px solid rgba(var(--gold-rgb), 0.3);
}

@media (max-width: 480px) {
  .gate.xg { padding: 36px 22px 30px; }
  .xg-step { padding-left: 40px; }
  .xg-row > .xg-btn { flex: 1 1 auto; }
  .xg-field { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .xg-btn, .xg-field { transition: none; } }
