/* ============================================================
   Pathway GED — accounts, membership and gating

   Additive only. Every value references tokens.css; nothing here
   overrides an existing course style.
   ============================================================ */

/* ---------------- Auth card ---------------- */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding: var(--sp-10) 0 var(--sp-12);
}
.auth-card {
  width: 100%;
  max-width: 424px;
  padding: var(--sp-8);
}
@media (max-width: 480px) {
  .auth-card { padding: var(--sp-6) var(--sp-5); }
  .auth-wrap { padding-top: var(--sp-6); }
}
.auth-card__title { font-size: var(--text-2xl); margin-bottom: var(--sp-2); }
.auth-card__sub { font-size: var(--text-sm); margin-bottom: var(--sp-6); line-height: 1.55; }

.auth-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.auth-form .btn--block { margin-top: var(--sp-1); }

/* ---------------- Fields ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__top { display: flex; align-items: baseline; gap: var(--sp-3); }
.field__top .field__label { flex: 1; }
.field__label {
  font-size: var(--text-xs); font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-mono);
}
.field__input {
  font: inherit;
  font-size: var(--text-md);
  /* 16px minimum stops iOS Safari zooming the page on focus. */
  min-height: var(--h-md);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field__input::placeholder { color: var(--ink-faint); }
.field__input:focus-visible { border-color: var(--brand); box-shadow: var(--focus-ring); }
.field__input.is-error { border-color: var(--bad); }
.field__hint { margin: 0; font-size: var(--text-xs); color: var(--ink-faint); }
.field__hint.is-error { color: var(--bad); font-weight: 600; }

/* Show / hide password. A text button beside the label rather than an
   icon inside the input, so it never overlaps a long value or a browser
   password-manager icon. */
.field__toggle {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-text); font-size: var(--text-xs); font-weight: 700;
  color: var(--ink-faint); border-radius: var(--r-xs);
  transition: color var(--t-fast) var(--ease);
}
.field__toggle:hover { color: var(--brand); }

/* Legal line under the create-account button. Present, readable, and
   deliberately quiet. */
.auth-legal {
  margin: var(--sp-4) 0 0; font-size: var(--text-xs); color: var(--ink-faint);
  line-height: 1.55; text-align: center;
}
.auth-legal a { color: var(--ink-soft); text-decoration: underline; }
.auth-legal a:hover { color: var(--ink); }

/* Confirmation state — "check your inbox" after a reset request. */
.auth-confirm { text-align: center; }
.auth-confirm__icon {
  width: 46px; height: 46px; margin: 0 auto var(--sp-4);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand);
}
.auth-confirm__icon svg { width: 22px; height: 22px; }
.auth-confirm__address {
  font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600;
  background: var(--surface-2); border-radius: var(--r-sm);
  padding: var(--sp-3) var(--sp-4); margin: var(--sp-4) 0;
  overflow-wrap: anywhere;
}

/* ---------------- Messages ---------------- */
.auth-msg {
  border-radius: var(--r-sm);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0;
}
.auth-msg.is-error { background: var(--bad-tint); color: var(--bad); }
.auth-msg.is-good { background: var(--good-tint); color: var(--good); }
.auth-msg.is-warn { background: var(--warn-tint); color: var(--warn); }
.card .auth-msg { margin-top: var(--sp-4); }

/* ---------------- Google button ----------------
   The official Google mark, unmodified, on the neutral surface Google's
   branding guidance allows. */
.btn--google {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  gap: var(--sp-3);
}
.btn--google:hover:not([disabled]) { background: var(--surface-2); border-color: var(--ink-faint); }
.btn--google svg { flex: none; }

/* ---------------- Divider ---------------- */
.auth-divider {
  display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-5) 0;
  color: var(--ink-faint); font-size: var(--text-xs);
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.auth-foot {
  margin: var(--sp-5) 0 0;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.auth-foot--tight { margin-top: var(--sp-3); }

/* The top-bar account control lives in css/app-shell.css. */

/* ---------------- Pricing ---------------- */
.plan-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5);
  margin: var(--sp-6) 0;
  align-items: start;
}
@media (max-width: 860px) { .plan-grid { grid-template-columns: 1fr; } }

.plan-card {
  position: relative; overflow: hidden;
  padding: var(--sp-6) var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.plan-card.is-featured { border-color: var(--brand); box-shadow: var(--shadow-2); }
.plan-card.is-featured::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--brand);
}
.plan-card__flag {
  align-self: flex-start;
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  background: var(--brand-tint); color: var(--brand-strong);
  border-radius: var(--r-full); padding: 3px 10px;
}
.plan-card__name { margin: 0; font-size: var(--text-lg); }
.plan-card__price {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: var(--text-2xl); line-height: 1.1;
}
.plan-card__cycle { margin: 0; }
.plan-card__list {
  list-style: none; margin: var(--sp-4) 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  font-size: var(--text-sm); color: var(--ink-soft);
}
.plan-card__list li { display: flex; gap: var(--sp-2); }
.plan-card__list li::before { content: "✓"; color: var(--brand); font-weight: 700; }
.plan-card .btn { margin-top: auto; }

/* ---------------- Account details ---------------- */
.detail-list { margin: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.detail-list > div {
  display: flex; gap: var(--sp-4); align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: var(--sp-3);
}
.detail-list > div:last-child { border-bottom: none; padding-bottom: 0; }
.detail-list dt {
  width: 90px; flex: none;
  font-size: var(--text-xs); font-weight: 700; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-mono);
}
.detail-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------------- The membership gate ----------------
   Locked material should read as something worth having, not as
   something broken: a considered panel with a real next step, never a
   greyed-out shell. */
.gate {
  padding: var(--sp-10) var(--sp-6);
  text-align: center;
  border-top: 4px solid var(--brand);
  margin: var(--sp-6) 0;
  position: relative; overflow: hidden;
}
.gate__icon {
  width: 44px; height: 44px; margin: 0 auto var(--sp-4);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand);
}
.gate__icon svg { width: 20px; height: 20px; }
.gate h3 { margin-bottom: var(--sp-2); }
.gate p { max-width: 46ch; margin-inline: auto; }
.gate .q__actions { justify-content: center; }
.gate .block-tag { color: var(--brand); }
.gate__perks {
  list-style: none; margin: var(--sp-5) auto 0; padding: 0; max-width: 32ch;
  display: flex; flex-direction: column; gap: 6px;
  font-size: var(--text-sm); color: var(--ink-soft); text-align: left;
}
.gate__perks li { display: flex; gap: var(--sp-2); }
.gate__perks li::before { content: "✓"; color: var(--brand); font-weight: 700; }

/* Free-sample marker on lesson and unit rows */
.free-badge {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  background: var(--good-tint); color: var(--good);
  border-radius: var(--r-full); padding: 2px 9px; flex: none;
}
.lock-badge {
  flex: none; color: var(--ink-faint); display: inline-flex; align-items: center;
}
.lock-badge svg { width: 15px; height: 15px; }

/* ---------------- Activating bar ---------------- */
.activating-bar {
  height: 6px; border-radius: var(--r-full); background: var(--surface-2);
  overflow: hidden; margin: var(--sp-5) 0;
}
.activating-bar > span {
  display: block; height: 100%; width: 40%; border-radius: var(--r-full);
  background: var(--brand);
  animation: activating 1.4s var(--ease) infinite;
}
@keyframes activating {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}
@media (prefers-reduced-motion: reduce) {
  .activating-bar > span { animation: none; width: 100%; opacity: .5; }
}

/* ---------------- Membership banner ---------------- */
.billing-banner {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  background: var(--warn-tint); color: var(--warn);
  border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-sm); font-weight: 600;
  margin: var(--sp-5) 0;
}
.billing-banner a { color: inherit; text-decoration: underline; margin-left: auto; }
