/* Subscription pages (plans, sign-in, account), the paywall, and the 404 page. */

/* Subscription: plans, sign-in, account and the paywall on review pages */

.plans {
  display: grid;
  gap: 20px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

@media (min-width: 760px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* A plan card is the label of a radio button: the whole card picks the plan. */
.plan {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(22px, 4vw, 32px);
  padding-inline-end: 72px;
  cursor: pointer;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Hidden but still focusable and announced: the card shows its state. */
.plan-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.2;
}

/* The price is the thing to compare, so it is the largest text on the card. */
.plan-price span {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.8rem + 1.5vw, 3rem);
  line-height: 1;
}

.plan-note {
  color: var(--ink-2);
}

/* The check: an empty ring, filled with ember and ticked when the plan is chosen. */
.plan-check {
  position: absolute;
  inset-block-start: 22px;
  inset-inline-end: 22px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.plan-check svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
}

.plan:hover {
  box-shadow: inset 0 1px 0 var(--glass-rim), inset 0 0 0 1px var(--line-strong), var(--glass-shadow);
}

.plan:has(.plan-input:checked) {
  box-shadow:
    inset 0 1px 0 var(--glass-rim),
    inset 0 0 0 2px var(--accent-fill),
    0 22px 44px -22px var(--accent-fill);
}

.plan:has(.plan-input:checked) .plan-check {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
}

.plan:has(.plan-input:checked) .plan-check svg {
  stroke-dashoffset: 0;
}

.plan:has(.plan-input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.plan-submit {
  margin-top: 20px;
}

.plan-picker + .conditions {
  margin-top: 28px;
}

.plan-signin {
  margin-top: 24px;
  color: var(--ink-2);
}

.account-page {
  max-width: 640px;
}

.account-page > p {
  color: var(--ink-2);
}

.login-form {
  display: grid;
  gap: 12px;
  padding: clamp(22px, 4vw, 32px);
}

.login-form label {
  font-weight: 600;
}

.login-form input {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-inner);
  background: var(--tile-solid);
  color: var(--ink);
  font: inherit;
  text-align: start;
}

.login-form .button {
  justify-self: start;
}

.form-message {
  margin-bottom: 16px;
  padding: 12px 18px;
  border-radius: var(--r-inner);
  background: var(--tint);
  color: var(--ink);
  font-weight: 600;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

/* Instead of the locked part of a review page. */
.paywall {
  display: grid;
  gap: 12px;
  max-width: 720px;
  padding: clamp(24px, 4vw, 40px);
}

.paywall h2 {
  font-size: var(--text-lg);
}

.paywall p {
  color: var(--ink-2);
}

.paywall .paywall-actions {
  margin-top: 8px;
}

/* 404 */

.notfound {
  display: grid;
  justify-items: center;
  padding-block: 40px 24px;
  text-align: center;
}

.lens {
  display: grid;
  place-items: center;
  width: min(64vw, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--accent);
  font-size: clamp(4rem, 3rem + 5vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

/* The lens always shows its glare; the pointer moves it. */
.lens::after {
  background: radial-gradient(160px circle at var(--gx, 30%) var(--gy, 20%), var(--lid-glare), transparent 65%);
  opacity: 1;
}

.notfound h1 {
  margin-top: 32px;
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem);
}

.notfound .lede {
  margin-inline: auto;
}

.notfound .button {
  margin-top: 28px;
}

.notfound-en {
  margin-top: 20px;
  color: var(--ink-2);
  font-size: var(--text-sm);
}
