/* Garp Members — uses the Garp WSJ theme's colour variables. */

.garp-m-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 0 48px;
}

.garp-m-page--premium,
.garp-m-page--account {
  max-width: 680px;
}

.garp-m-page h1 {
  margin: 8px 0 12px;
}

.garp-m-lede {
  font-size: 1.1rem;
  color: var(--garp-muted, #5f6775);
  margin: 0 0 24px;
}

.garp-m-muted {
  color: var(--garp-muted, #5f6775);
  font-size: 0.95rem;
}

.garp-m-form {
  display: grid;
  gap: 16px;
}

.garp-m-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

.garp-m-form input[type="text"],
.garp-m-form input[type="email"],
.garp-m-form input[type="password"] {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  font-weight: 400;
  border: 1px solid var(--garp-border-strong, #c8ced8);
  border-radius: 4px;
  background: var(--garp-surface, #fff);
  color: var(--garp-ink, #12151c);
}

.garp-m-form input:focus {
  outline: 2px solid var(--garp-accent, #c41e1e);
  outline-offset: 1px;
  border-color: transparent;
}

.garp-m-form small {
  font-weight: 400;
  color: var(--garp-subtle, #8b93a1);
}

.garp-m-form .garp-m-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
}

.garp-m-form button {
  justify-self: start;
  cursor: pointer;
}

.garp-m-hp {
  position: absolute !important;
  left: -9999px !important;
}

.garp-m-switch {
  margin: 18px 0 0;
  font-size: 0.95rem;
}

.garp-m-alert {
  padding: 12px 14px;
  border-left: 3px solid var(--garp-ink, #12151c);
  background: var(--garp-surface, #fff);
  margin: 0 0 18px;
}

.garp-m-alert--error {
  border-left-color: var(--garp-accent, #c41e1e);
}

.garp-m-card {
  background: var(--garp-surface, #fff);
  border: 1px solid var(--garp-border, #e2e6ec);
  border-radius: 6px;
  padding: 20px 22px;
  margin: 0 0 20px;
}

.garp-m-card h2 {
  font-size: 1.15rem;
  margin: 0 0 12px;
}

.garp-m-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--garp-ink, #12151c);
  color: #fff;
  border-radius: 999px;
}

.garp-m-benefits {
  margin: 0 0 24px;
  padding-left: 1.1em;
}

.garp-m-benefits li {
  margin-bottom: 8px;
}

.garp-m-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.garp-m-plan {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--garp-border-strong, #c8ced8);
  border-radius: 6px;
  background: var(--garp-surface, #fff);
  color: var(--garp-ink, #12151c);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.garp-m-plan:hover,
.garp-m-plan:focus-visible {
  border-color: var(--garp-accent, #c41e1e);
  color: var(--garp-ink, #12151c);
}

.garp-m-plan--best {
  border: 2px solid var(--garp-ink, #12151c);
}

.garp-m-plan-name {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.garp-m-plan-price {
  font-size: 1.6rem;
  font-weight: 700;
}

.garp-m-plan-note {
  color: var(--garp-muted, #5f6775);
  font-size: 0.9rem;
}

.garp-m-paywall {
  position: relative;
  margin: 8px 0 32px;
  padding: 28px 24px;
  border-top: 3px solid var(--garp-ink, #12151c);
  background: var(--garp-surface, #fff);
  text-align: left;
}

.garp-m-paywall::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -83px;
  height: 80px;
  background: linear-gradient(to bottom, rgba(244, 245, 247, 0), var(--garp-bg, #f4f5f7));
  pointer-events: none;
}

.garp-m-paywall h2 {
  margin: 4px 0 8px;
}

.garp-m-paywall-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--garp-accent, #c41e1e);
}

.garp-menu-cta > a {
  color: var(--garp-accent, #c41e1e) !important;
  font-weight: 700;
}

/* ---------- Join & Sign in (interactive) ---------- */

.garp-m-page--join {
  max-width: 1040px;
}

.garp-j {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0;
  margin-top: 8px;
  background: var(--garp-surface, #fff);
  border: 1px solid var(--garp-border, #e2e6ec);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 50px -30px rgba(18, 21, 28, 0.45);
}

.garp-j-aside {
  position: relative;
  padding: 40px 36px;
  background: var(--garp-ink, #12151c);
  color: #e9ecf2;
  overflow: hidden;
}

.garp-j-aside::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 30, 30, 0.55), rgba(196, 30, 30, 0) 70%);
  pointer-events: none;
}

.garp-j-kicker {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff8a8a;
}

.garp-j-pitch {
  margin: 0 0 28px;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.75rem;
  line-height: 1.2;
  color: #fff;
}

.garp-j-perks {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.garp-j-perks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  animation: garp-j-rise 0.45s ease forwards;
}

.garp-j-perks li:nth-child(2) { animation-delay: 0.08s; }
.garp-j-perks li:nth-child(3) { animation-delay: 0.16s; }
.garp-j-perks li:nth-child(4) { animation-delay: 0.24s; }

.garp-j-perks svg {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  padding: 2px;
  border-radius: 50%;
  fill: var(--garp-ink, #12151c);
  background: #fff;
}

.garp-j-perk--premium svg {
  background: var(--garp-accent, #c41e1e);
  fill: #fff;
}

.garp-j-perks strong {
  color: #fff;
}

.garp-j-perks em {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  vertical-align: 1px;
}

.garp-j-trust {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.85rem;
  color: #aab2c0;
}

.garp-j-main {
  padding: 36px 40px 32px;
}

.garp-j-title {
  margin: 14px 0 18px;
  font-size: 1.9rem;
}

.garp-j-steps {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--garp-subtle, #8b93a1);
}

.garp-j-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.25s ease, max-width 0.3s ease;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
}

.garp-j-steps li + li::before {
  content: "";
  width: 22px;
  height: 1px;
  margin-right: 2px;
  background: var(--garp-border-strong, #c8ced8);
}

.garp-j-steps span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--garp-border-strong, #c8ced8);
  font-size: 0.75rem;
}

.garp-j-steps .is-current {
  color: var(--garp-ink, #12151c);
}

.garp-j-steps .is-current span {
  background: var(--garp-ink, #12151c);
  border-color: var(--garp-ink, #12151c);
  color: #fff;
}

.garp-j-steps.is-free .garp-j-step--pay {
  max-width: 0;
  opacity: 0;
  margin-left: -8px;
}

.garp-j-form {
  gap: 18px;
}

.garp-j-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
}

.garp-j-plans legend {
  margin-bottom: 10px;
  padding: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.garp-j-plan {
  position: relative;
  display: block !important;
  cursor: pointer;
  font-weight: 400 !important;
}

.garp-j-plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.garp-j-plan-body {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 14px 14px 12px;
  border: 1.5px solid var(--garp-border-strong, #c8ced8);
  border-radius: 8px;
  background: var(--garp-surface, #fff);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.garp-j-plan:hover .garp-j-plan-body {
  border-color: var(--garp-ink, #12151c);
  transform: translateY(-1px);
}

.garp-j-plan input:checked + .garp-j-plan-body {
  border-color: var(--garp-accent, #c41e1e);
  box-shadow: 0 0 0 3px rgba(196, 30, 30, 0.14);
  background: #fffafa;
}

.garp-j-plan input:focus-visible + .garp-j-plan-body {
  outline: 2px solid var(--garp-accent, #c41e1e);
  outline-offset: 2px;
}

.garp-j-plan-body::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--garp-border-strong, #c8ced8);
  transition: all 0.18s ease;
}

.garp-j-plan input:checked + .garp-j-plan-body::after {
  border: 5px solid var(--garp-accent, #c41e1e);
}

.garp-j-plan-tag {
  position: absolute;
  top: -9px;
  left: 12px;
  padding: 1px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--garp-ink, #12151c);
  border-radius: 999px;
}

.garp-j-plan-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.garp-j-plan-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--garp-ink, #12151c);
}

.garp-j-plan-note {
  font-size: 0.82rem;
  color: var(--garp-muted, #5f6775);
  line-height: 1.3;
}

.garp-j-field {
  display: grid;
  gap: 6px;
}

.garp-j-field > label {
  font-weight: 600;
  font-size: 0.95rem;
}

.garp-j-field input[type="text"],
.garp-j-field input[type="email"],
.garp-j-field input[type="password"] {
  width: 100%;
  padding: 12px 40px 12px 12px;
  font: inherit;
  border: 1px solid var(--garp-border-strong, #c8ced8);
  border-radius: 6px;
  background: var(--garp-surface, #fff) no-repeat right 12px center / 18px;
  color: var(--garp-ink, #12151c);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.garp-j-field input:focus {
  outline: none;
  border-color: var(--garp-ink, #12151c);
  box-shadow: 0 0 0 3px rgba(18, 21, 28, 0.1);
}

.garp-j-field[data-state="valid"] input:not([type="checkbox"]) {
  border-color: #1f8a4c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%231f8a4c' d='M7.6 13.2 4.4 10l-1.2 1.2 4.4 4.4 9.2-9.2-1.2-1.2z'/%3E%3C/svg%3E");
}

.garp-j-field[data-state="invalid"] input:not([type="checkbox"]) {
  border-color: var(--garp-accent, #c41e1e);
  animation: garp-j-shake 0.3s ease;
}

.garp-j-hint {
  min-height: 1.1em;
  margin: 0;
  font-size: 0.82rem;
  color: var(--garp-subtle, #8b93a1);
}

.garp-j-field[data-state="invalid"] .garp-j-hint {
  color: var(--garp-accent, #c41e1e);
}

.garp-j-field[data-state="valid"] .garp-j-hint {
  color: #1f8a4c;
}

.garp-j-password {
  position: relative;
}

.garp-j-password input {
  padding-right: 76px !important;
  background-position: right 64px center !important;
}

.garp-j-reveal {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 4px 8px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--garp-muted, #5f6775);
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.garp-j-reveal:hover,
.garp-j-reveal:focus-visible {
  color: var(--garp-ink, #12151c);
  background: var(--garp-bg, #f4f5f7);
}

.garp-j-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.garp-j-meter span {
  height: 4px;
  border-radius: 2px;
  background: var(--garp-border, #e2e6ec);
  transition: background-color 0.25s ease;
}

.garp-j-meter[data-score="1"] span:nth-child(-n+1) { background: #d9822b; }
.garp-j-meter[data-score="2"] span:nth-child(-n+2) { background: #d4a72c; }
.garp-j-meter[data-score="3"] span:nth-child(-n+3) { background: #4c9a5f; }
.garp-j-meter[data-score="4"] span { background: #1f8a4c; }

.garp-j-field--terms .garp-m-check {
  font-size: 0.92rem;
}

.garp-j-field--terms .garp-m-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--garp-accent, #c41e1e);
}

.garp-j-submit {
  position: relative;
  justify-self: stretch !important;
  padding: 14px 20px;
  font-size: 1rem;
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}

.garp-j-submit:hover {
  box-shadow: 0 10px 22px -12px rgba(196, 30, 30, 0.8);
}

.garp-j-submit:active {
  transform: translateY(1px);
}

.garp-j-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  vertical-align: -3px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: garp-j-spin 0.7s linear infinite;
}

.garp-j-submit.is-loading {
  pointer-events: none;
  opacity: 0.9;
}

.garp-j-submit.is-loading .garp-j-spinner {
  display: inline-block;
}

.garp-j-fine {
  margin: -6px 0 0;
  font-size: 0.85rem;
  text-align: center;
  color: var(--garp-muted, #5f6775);
}

.garp-m-page--sign-in .garp-j-form {
  padding: 28px;
  background: var(--garp-surface, #fff);
  border: 1px solid var(--garp-border, #e2e6ec);
  border-radius: 10px;
}

@keyframes garp-j-rise {
  to { opacity: 1; transform: none; }
}

@keyframes garp-j-spin {
  to { transform: rotate(360deg); }
}

@keyframes garp-j-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (max-width: 860px) {
  .garp-j {
    grid-template-columns: 1fr;
  }

  .garp-j-aside {
    padding: 26px 22px;
  }

  .garp-j-pitch {
    font-size: 1.35rem;
    margin-bottom: 18px;
  }

  .garp-j-perks {
    gap: 10px;
    margin-bottom: 18px;
  }

  .garp-j-main {
    padding: 26px 20px 24px;
  }
}

@media (max-width: 560px) {
  .garp-j-plans {
    grid-template-columns: 1fr;
  }

  .garp-j-plan-body {
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: baseline;
  }

  .garp-j-plan-note {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .garp-j *,
  .garp-j *::before,
  .garp-j *::after {
    animation: none !important;
    transition: none !important;
  }

  .garp-j-perks li {
    opacity: 1;
    transform: none;
  }
}

/* Theme .garp-btn is a small uppercase pill; members forms need full-size buttons. */
.garp-j-form .garp-btn.garp-j-submit {
  width: 100%;
  min-height: 50px;
  padding: 14px 20px;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-transform: none;
  border-radius: 6px;
}

.garp-m-form .garp-btn {
  min-height: 44px;
  padding: 11px 18px;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: none;
  border-radius: 6px;
}

/* Theme ghost buttons are white-on-dark; on light member cards they need dark text. */
.garp-m-card .garp-btn--ghost {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--garp-ink, #12151c) !important;
  border-color: var(--garp-border-strong, #c8ced8);
  border-radius: 6px;
}

.garp-m-card .garp-btn--ghost:hover {
  color: var(--garp-ink, #12151c) !important;
  border-color: var(--garp-ink, #12151c);
}

/* Keep the trust line at the bottom of the dark panel so the column feels balanced. */
.garp-j-aside {
  display: flex;
  flex-direction: column;
}

.garp-j-trust {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* On phones the form comes first; the benefits panel follows it. */
@media (max-width: 860px) {
  .garp-j-main {
    order: -1;
  }

  .garp-j-aside::after {
    display: none;
  }
}

/* Grid children default to min-width:auto; without this the card can push past a phone screen. */
.garp-m-page,
.garp-j,
.garp-j-main,
.garp-j-aside {
  min-width: 0;
}

.garp-m-page {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .garp-j-steps {
    gap: 6px;
    font-size: 0.74rem;
  }

  .garp-j-steps li + li::before {
    width: 10px;
  }

  .garp-j-title {
    font-size: 1.55rem;
  }
}

/* "Premium" badge next to a story's section label on cards and articles. */
.garp-m-premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px 2px 7px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--garp-ink, #12151c);
  border-radius: 999px;
  vertical-align: 1px;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.garp-m-premium-badge:hover {
  background: var(--garp-accent, #c41e1e);
}

.garp-m-premium-badge.is-locked::before {
  content: "";
  width: 9px;
  height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 20'%3E%3Cpath d='M9 1a5 5 0 0 0-5 5v3H3a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm-3 8V6a3 3 0 1 1 6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 20'%3E%3Cpath d='M9 1a5 5 0 0 0-5 5v3H3a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm-3 8V6a3 3 0 1 1 6 0v3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
