/* City Pixels Step 158E — unified Sign In / Join Free portal */

.auth-main {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 64px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.auth-intro,
.auth-card {
  padding: clamp(24px, 4vw, 44px);
}

.auth-intro h1 {
  margin: 12px 0 18px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.auth-benefits {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.auth-benefits article {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5, 10, 24, 0.42);
}

.auth-benefits strong {
  color: var(--cyan);
  font-size: 1.05rem;
}

.auth-benefits span,
.auth-card-heading p,
.field-help,
.auth-small-copy,
.staging-note {
  color: var(--muted);
}

.auth-card {
  overflow: visible;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 26px;
  padding: 6px;
  border: 1px solid rgba(94, 230, 255, 0.24);
  border-radius: 18px;
  background: rgba(3, 8, 22, 0.64);
}

.auth-switch button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.auth-switch button:hover,
.auth-switch button:focus-visible {
  color: var(--ink);
  border-color: rgba(41, 231, 255, 0.38);
}

.auth-switch button[aria-selected="true"] {
  border-color: rgba(41, 231, 255, 0.7);
  background: linear-gradient(135deg, rgba(41, 231, 255, 0.18), rgba(212, 107, 255, 0.18));
  color: #ffffff;
  box-shadow: 0 0 22px rgba(41, 231, 255, 0.12);
}

.auth-card-heading h2,
.auth-success h2 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.auth-card-heading p {
  margin: 0 0 22px;
}

.auth-mode-link {
  appearance: none;
  padding: 0;
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form > label:not(.check-row) {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  margin-top: 0;
}

.field-help {
  margin: -8px 0 0;
  font-size: 0.88rem;
}

.check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 2px 0 0;
  accent-color: var(--cyan);
}

.check-row a,
.auth-help-link {
  color: var(--cyan);
  font-weight: 800;
}

.policy-check {
  padding: 12px;
  border: 1px solid rgba(94, 230, 255, 0.16);
  border-radius: 14px;
  background: rgba(5, 10, 24, 0.3);
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  padding: 15px 20px;
  font-size: 1rem;
}

.auth-submit[disabled] {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.auth-secondary-button {
  width: 100%;
  background: rgba(16, 31, 73, 0.7);
}

.auth-message {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(41, 231, 255, 0.08);
  color: #dffaff;
}

.auth-message.error {
  border-color: rgba(255, 100, 124, 0.7);
  background: rgba(255, 100, 124, 0.11);
  color: #ffdce2;
}

.auth-message.success {
  border-color: rgba(114, 255, 157, 0.64);
  background: rgba(114, 255, 157, 0.1);
  color: #ddffe8;
}

.auth-help-row {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-success {
  text-align: center;
  padding: 12px 0 2px;
}

.success-mark {
  display: inline-grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #041225;
  font-size: 38px;
  font-weight: 900;
  box-shadow: 0 0 34px rgba(114, 255, 157, 0.28);
}

.auth-success p {
  color: var(--muted);
}

.stacked-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.staging-note {
  margin: 12px 0 0;
  font-size: 0.82rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-main {
    margin-top: 24px;
  }

  .auth-intro,
  .auth-card {
    padding: 24px 20px;
  }

  .auth-intro h1 {
    font-size: clamp(36px, 12vw, 52px);
  }
}

@media (max-width: 430px) {
  .auth-switch {
    grid-template-columns: 1fr;
  }
}

/* CITY PIXELS STEP 161A — EXPLICIT READER / WRITER ENTRY PATHS */
.account-path-choice {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(94, 230, 255, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(
      circle at top left,
      rgba(94, 230, 255, 0.1),
      transparent 42%
    ),
    rgba(5, 10, 24, 0.46);
}

.account-path-choice.writer-path-selected {
  border-color: rgba(212, 107, 255, 0.56);
  background:
    radial-gradient(
      circle at top right,
      rgba(212, 107, 255, 0.15),
      transparent 46%
    ),
    rgba(12, 9, 32, 0.58);
}

.account-path-choice-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.account-path-choice-heading > div {
  display: grid;
  gap: 7px;
}

.account-path-choice-heading strong {
  color: #ffffff;
  font-size: 1.02rem;
}

.account-path-choice-heading > span {
  max-width: 190px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.account-path-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.account-path-option {
  display: grid;
  gap: 7px;
  min-height: 146px;
  padding: 16px;
  border: 1px solid rgba(94, 230, 255, 0.22);
  border-radius: 16px;
  background: rgba(3, 8, 22, 0.62);
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.account-path-option:hover,
.account-path-option:focus-visible {
  border-color: rgba(94, 230, 255, 0.68);
  transform: translateY(-1px);
}

.account-path-option:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.account-path-option strong {
  color: #ffffff;
  font-size: 1rem;
}

.account-path-option span {
  font-size: 0.86rem;
  line-height: 1.5;
}

.account-path-option.is-selected {
  border-color: rgba(94, 230, 255, 0.82);
  background:
    linear-gradient(
      145deg,
      rgba(94, 230, 255, 0.15),
      rgba(24, 45, 92, 0.66)
    );
  box-shadow:
    0 0 0 2px rgba(94, 230, 255, 0.08),
    0 0 24px rgba(94, 230, 255, 0.1);
}

.writer-path-selected .account-path-option.is-selected {
  border-color: rgba(212, 107, 255, 0.86);
  background:
    linear-gradient(
      145deg,
      rgba(212, 107, 255, 0.19),
      rgba(52, 24, 84, 0.72)
    );
  box-shadow:
    0 0 0 2px rgba(212, 107, 255, 0.08),
    0 0 24px rgba(212, 107, 255, 0.12);
}

.visually-hidden-control {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.writer-tools-route-note {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(94, 230, 255, 0.16);
  border-radius: 12px;
  background: rgba(94, 230, 255, 0.055);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.5;
}

.writer-path-selected .writer-tools-route-note {
  border-color: rgba(114, 255, 157, 0.28);
  background: rgba(114, 255, 157, 0.07);
  color: #dfffea;
}

@media (max-width: 620px) {
  .account-path-choice-heading {
    display: grid;
  }

  .account-path-choice-heading > span {
    max-width: none;
    text-align: left;
  }

  .account-path-options {
    grid-template-columns: 1fr;
  }

  .account-path-option {
    min-height: auto;
  }
}
