.plans {
  --plan-ink: #191823;
  --plan-muted: #555362;
  --plan-rule: #d8d7df;
  background: #f5f5f8;
  color: var(--plan-ink);
  padding-block: clamp(4.25rem, 8vw, 8rem);
}

.plans .section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(14rem, .7fr);
  gap: 2.5rem;
  align-items: end;
  margin-bottom: clamp(1.75rem, 3.75vw, 3.5rem);
}

.plans .section-heading h2 {
  font-size: clamp(3.15rem, 6.35vw, 6rem);
  line-height: .99;
  letter-spacing: -.065em;
  font-weight: 500;
}

.plans .section-heading h2 em {
  font-family: var(--serif, Georgia, serif);
  font-weight: 400;
  letter-spacing: -.035em;
}

.plans .section-heading > p {
  justify-self: end;
  max-width: 26rem;
  color: var(--plan-muted);
  line-height: 1.55;
  font-size: 1rem;
}

.plans .category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
  isolation: isolate;
  width: max-content;
  max-width: 100%;
  padding: .25rem;
  gap: 0;
  margin: 0 0 1.9rem;
  background: #e8e8ed;
  border-radius: 2rem;
  border: 1px solid #dcdbe3;
}

.plans .category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .5rem;
  min-height: 2.8rem;
  border-radius: inherit;
  padding: .55rem .95rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--plan-muted);
  background: transparent;
  box-shadow: none;
  line-height: 1.2;
}

.plans .category .icon { width: 1rem; height: 1rem; }
.plans .category[aria-selected="true"] { color: #30296f; background: #fff; }
@supports selector(:has(*)) {
  .plans .category-links[role="tablist"]::before {
    content: "";
    z-index: -1;
    position: absolute;
    left: .25rem;
    top: .25rem;
    bottom: .25rem;
    width: calc(50% - .25rem);
    background: #fff;
    border-radius: inherit;
    box-shadow: 0 1px 3px #2321391a;
  }

  .plans .category[aria-selected="true"] { background: transparent; }
  .plans .category-links:has(.category:nth-child(2)[aria-selected="true"])::before { transform: translateX(100%); }
}

.plans .panel-heading { font-size: 1.45rem; margin-block: 1.5rem; }
.plans .plan-category[role="tabpanel"] > .panel-heading {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
}

.plans .plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(.65rem, 1.2vw, 1.25rem);
}

.plans .plan {
  --plan-surface: #fdfdff;
  --plan-outline: #9591be;
  --plan-deck: #f2f0ff;
  --plan-face: #c1bcdf;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  border: 1px solid var(--plan-rule);
  border-radius: .85rem;
  background: var(--plan-surface);
  padding: clamp(1.25rem, 2.25vw, 2.25rem);
}

.plans #cpanel .plan { padding-top: clamp(1.25rem, 2.25vw, 2.25rem); }
.plans .plan-featured {
  --plan-rule: #5d577a;
  --plan-muted: #d1cde3;
  --plan-surface: #262237;
  --plan-outline: #b2a7ff;
  --plan-deck: #7566b7;
  --plan-face: #726c91;
  color: #fff;
  border-color: var(--plan-surface);
}

.plans .plan-tag {
  position: absolute;
  inset: 0 auto auto clamp(1.25rem, 2.25vw, 2.25rem);
  transform: translateY(-50%);
  margin: 0;
  padding: .22rem .7rem;
  border-radius: 3rem;
  background: #c9c2ff;
  color: #322765;
  border: 1px solid #bdb5f9;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .005em;
}

.plan-title {
  display: flex;
  gap: .5rem;
  justify-content: space-between;
  align-items: center;
  min-height: 2.75rem;
}

.plans .plan-title h3 {
  font-size: clamp(1.45rem, 2.1vw, 2.15rem);
  letter-spacing: -.045em;
  line-height: 1.05;
  font-weight: 550;
  text-wrap: initial;
}

.plan-stack {
  display: grid;
  place-items: end center;
  position: relative;
  width: 3.25rem;
  height: 2.6rem;
  flex: none;
}

/* Each tier adds a chassis, drawn in the same projection as the tier below. */
.plan-stack i {
  width: 1.95rem;
  height: 1.45rem;
  position: absolute;
  bottom: .4rem;
  border: 1.6px solid var(--plan-outline);
  border-radius: .18rem;
  background: var(--plan-deck);
  box-shadow: -1px 1px 0 var(--plan-face), -2px 2px 0 var(--plan-outline);
  transform: matrix(.866, -.5, .866, .5, 0, 0);
}

.plan-stack i:nth-child(2) { bottom: .78rem; }
.plan-stack i:nth-child(3) { bottom: 1.16rem; }
.plan-stack i:last-child::before {
  content: "";
  display: block;
  width: 48%;
  height: 70%;
  margin: 9% 10%;
  background: radial-gradient(circle at 1px 1px, var(--plan-outline) 1px, transparent 1.2px) 0 0 / 4px 4px;
}

.plans .plan-intro {
  min-height: 2.8em;
  color: var(--plan-muted);
  margin: .65rem 0 1.45rem;
  max-width: 26ch;
  line-height: 1.4;
  font-size: 1rem;
}

.plans .price {
  color: inherit;
  font-size: clamp(3rem, 4.8vw, 5rem);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.075em;
  white-space: nowrap;
  font-variant-numeric: lining-nums tabular-nums;
}

.plans .price small {
  vertical-align: .85em;
  font-size: .33em;
  font-weight: 500;
  letter-spacing: -.035em;
}

.plans .price span {
  margin-left: .4rem;
  vertical-align: baseline;
  color: var(--plan-muted);
  font-size: .9rem;
  font-weight: 400;
  letter-spacing: 0;
}

.plans .plan-specs {
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 0;
  margin: 1.35rem 0 1.55rem;
  padding: .55rem 0 0;
  list-style: none;
  border-top: 1px solid var(--plan-rule);
  font-size: .94rem;
  line-height: 1.45;
}

.plans .plan-specs > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
  padding-block: .4rem;
}

.plans .plan-specs dt { color: var(--plan-muted); }
.plans .plan-specs dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.plans .plan > .button {
  margin-top: auto;
  width: 100%;
  min-height: 3.1rem;
  border-radius: 2rem;
  border: 1px solid #b5b2c2;
  background: transparent;
  color: #282432;
  font-weight: 600;
}

.plans .plan-featured > .button { background: #c9c2ff; color: #241b43; border-color: transparent; }
.plans .plan-note {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-top: 1.2rem;
  color: var(--plan-muted);
  font-size: .88rem;
  line-height: 1.5;
}
.plans .plan-note .icon { color: #5143b1; width: 1rem; height: 1rem; margin-top: .14rem; }

@media (hover: hover) and (pointer: fine) {
  .plans .category:hover { color: #30296f; }
  .plans .plan > .button:hover { background: #eeeaf9; border-color: #9d96b5; }
  .plans .plan-featured > .button:hover { background: #e0dcff; border-color: transparent; }
}

@media (prefers-reduced-motion: no-preference) {
  .plans .category-links:not(:has(:focus-visible))::before {
    transition: transform 200ms var(--ease-out, cubic-bezier(.23, 1, .32, 1));
  }
}

@media (max-width: 800px) {
  .plans .section-heading { grid-template-columns: minmax(0, 1.15fr) minmax(12rem, .85fr); gap: 1rem; }
  .plans .plan { padding-inline: 1rem; }
  .plans .plan-title h3 { font-size: 1.45rem; }
  .plans .plan-title { min-height: 3.1rem; }
  .plans .plan-intro { min-height: 4.2em; }
}

@media (max-width: 700px) {
  .plans .section-heading { grid-template-columns: 1fr; gap: 1rem; }
  .plans .section-heading > p { justify-self: start; }
  .plans .plan-grid { grid-template-columns: 1fr; gap: 1.3rem; }
  .plans .plan, .plans #cpanel .plan { padding: 1.3rem; }
  .plans .plan-title { min-height: 2.75rem; }
  .plans .plan-title h3 { font-size: 1.75rem; }
  .plans .plan-intro { min-height: 0; margin-bottom: 1.2rem; max-width: none; }
  .plans .plan-specs { margin-block: 1rem 1.2rem; padding-top: .55rem; }
}

@media (max-width: 390px) {
  .plans .category { padding-inline: .6rem; font-size: .85rem; }
}
