/* Join (README "Screens", 4). In this step the page is the pricing page: step 1 of the designer's
   checkout (the two plan options, the reassurance row) and the order summary. The option that is
   chosen decides, in CSS alone, which button and which lines of the summary show. */
.join {
  padding: clamp(36px, 5vw, 72px) 0 var(--section);
}
.join__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.join__main {
  display: grid;
  gap: 28px;
}
.join__step {
  display: grid;
  gap: 18px;
  animation: sm-in 0.25s ease-out;
}
.join__options {
  display: grid;
  gap: 12px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* ------------------------------------------------------------------ plan options */
.plan-option {
  position: relative;
  text-align: left;
  background: #fff;
  border-radius: var(--r-card-m);
  padding: 20px 22px;
  cursor: pointer;
  color: var(--ink);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  align-items: center;
  border: 2px solid rgba(31, 42, 26, 0.1);
}
.plan-option:has(.plan-option__input:checked) {
  border-color: var(--green);
  box-shadow: var(--shadow-hover);
}
.plan-option:has(.plan-option__input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.plan-option__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.plan-option__radio {
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--green);
  display: grid;
  place-items: center;
}
.plan-option__radio::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
}
.plan-option__input:checked + .plan-option__radio::before {
  background: var(--green);
}
.plan-option__text {
  display: grid;
  gap: 4px;
}
.plan-option__line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.plan-option__name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.1;
}
.plan-option__price {
  font-size: 14px;
  color: var(--text-3);
}
.plan-option__price strong {
  color: var(--ink);
  font-size: 16px;
}
.plan-option__sub {
  font-size: 14px;
  color: var(--text-3);
}
.plan-option .badge {
  grid-column: 2;
  justify-self: start;
}

.join__everything {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 12px 14px;
}
.join__thumbs {
  display: flex;
  flex: none;
}
.join__thumbs img {
  box-sizing: content-box;
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #fff;
  display: block;
}
.join__thumbs img + img {
  margin-left: -12px;
}
.join__everything-text {
  display: grid;
  gap: 2px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-2);
}
.join__everything-text strong {
  font-weight: 600;
  color: var(--ink);
}

/* what follows the chosen option: yearly unless "One month at a time" is checked */
.join .when-month {
  display: none;
}
.join:has(#plan-month:checked) .when-month {
  display: revert;
}
.join:has(#plan-month:checked) .when-year {
  display: none;
}
.join .btn.when-month {
  display: none;
}
.join:has(#plan-month:checked) .btn.when-month {
  display: inline-flex;
}

/* ------------------------------------------------------------------ order summary */
.summary {
  background: var(--green);
  color: #fff;
  border-radius: var(--r-panel);
  overflow: hidden;
  display: grid;
  position: sticky;
  top: 96px;
}
.summary__photo {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: var(--green-hover);
}
.summary__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #2a3826, rgba(42, 56, 38, 0) 60%);
}
.summary__plan {
  position: absolute;
  z-index: 1;
  left: 22px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.summary__mark {
  width: 40px;
  height: 40px;
  display: block;
}
.summary__plan-text {
  display: grid;
}
.summary__plan-name {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.1;
}
.summary__plan-billing {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}
.summary__body {
  padding: 20px 22px 22px;
  display: grid;
  gap: 16px;
}
.summary__rows {
  display: grid;
  gap: 10px;
  font-size: 15px;
  margin: 0;
}
.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.summary__row + .summary__row--line {
  border-top: 1px solid var(--on-dark-line);
  padding-top: 10px;
}
.summary__row dt {
  color: rgba(255, 255, 255, 0.75);
}
.summary__row dd {
  margin: 0;
  font-weight: 600;
}
.summary__row dd.summary__due {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  color: var(--lime);
}
.summary__note {
  background: var(--on-dark-surface);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--on-dark-85);
  line-height: 1.5;
}
.summary__quote {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--on-dark-line);
  padding-top: 14px;
}
.summary__quote p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--on-dark-85);
  text-wrap: pretty;
}
.summary__quote footer {
  font-size: 13px;
  color: var(--on-dark-60);
}
.summary__stars {
  color: var(--lime);
  letter-spacing: 1px;
}
