.pricing {
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 3vw, 2.5rem);
  max-width: 100%;
  overflow: visible;
}

.pricing__inner {
  max-width: 72rem;
  width: 100%;
  margin-inline: auto;
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.plan {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem 1.4rem 1.4rem;
  border-radius: 1.35rem;
  background: var(--surface);
}

.pricing__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2.25rem, 5vw, 3.25rem);
}

.pricing__header {
  max-width: 34rem;
}

.pricing__title {
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.pricing__sub {
  margin-top: 0.85rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.pricing__toggle {
  position: relative;
  display: flex;
  flex-shrink: 0;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--surface);
}

.pricing__toggle-btn {
  position: relative;
  z-index: 1;
  min-width: 5.5rem;
  padding: 0.5rem 0.9rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font);
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s ease;
}

.pricing__toggle-btn.is-active {
  color: #06130a;
}

.pricing__toggle-thumb {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0.25rem;
  width: 5.5rem;
  border-radius: 999px;
  background: var(--accent);
  transition: transform 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}

.pricing__toggle[data-period="yearly"] .pricing__toggle-thumb {
  transform: translateX(5.5rem);
}

.plan--featured {
  background: #0c140e;
  box-shadow: inset 0 0 0 1px rgba(57, 255, 20, 0.28);
}

.plan__name {
  font-size: 0.95rem;
  font-weight: 500;
}

.plan__desc {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.plan__amount {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.plan__period {
  font-size: 0.82rem;
  color: var(--muted);
}

.plan__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  margin-top: 1.35rem;
  border-radius: 999px;
  background: rgba(244, 244, 245, 0.07);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: filter 0.2s ease, background-color 0.2s ease;
}

.plan--featured .plan__cta {
  background: var(--accent);
  color: #06130a;
}

@media (hover: hover) {
  .plan__cta:hover {
    background: rgba(244, 244, 245, 0.13);
  }

  .plan--featured .plan__cta:hover {
    filter: brightness(0.88);
    background: var(--accent);
  }
}

.plan__list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  list-style: none;
}

.plan__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.plan__list li::before {
  content: "";
  flex-shrink: 0;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.15rem;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

@media (max-width: 56rem) {
  .pricing__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

.compare {
  margin-top: 1rem;
  max-width: 100%;
  /* table scroll is allowed here; do not clip this section child */
  overflow: visible;
}

.compare__scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: 1.35rem 1.35rem 0 0;
  background: var(--surface);
}

.compare__inner {
  min-width: 40rem;
}

.compare__clip {
  overflow: hidden;
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.compare__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.compare__table th,
.compare__table td {
  padding: 0.95rem 1.25rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.compare__table thead th {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.compare__table thead th:not(:first-child),
.compare__table tbody td {
  text-align: center;
  width: 7.5rem;
}

.compare__table tbody th {
  font-weight: 400;
  color: var(--muted);
  text-align: left;
}

.compare__yes,
.compare__no {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  vertical-align: middle;
}

.compare__yes {
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.compare__no {
  border: 1px solid rgba(244, 244, 245, 0.22);
  border-radius: 50%;
}

.compare__more {
  display: block;
  width: 100%;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: 0 0 1.35rem 1.35rem;
  background: var(--surface);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  text-align: center;
  cursor: pointer;
  transition: color 0.2s ease;
}

@media (hover: hover) {
  .compare__more:hover {
    color: #5aff3d;
  }
}

@media (prefers-reduced-motion: reduce) {
  .compare__clip {
    transition: none;
  }
}
