.subscription-page {
  display: grid;
  gap: 1.3rem;
}

.subscription-shell {
  display: grid;
  gap: 1.5rem;
}

.subscription-shell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.subscription-back {
  min-width: 7rem;
}

.plan-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.plan-card {
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  background: var(--surface);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  transition-delay: var(--hover-out-delay);
}

.plan-card:hover {
  border-color: var(--hover-border);
  box-shadow: var(--hover-shadow);
  background: color-mix(in srgb, var(--surface) 94%, rgba(0, 113, 227, 0.04));
  transition-delay: 0s;
}

.plan-card.selected {
  border: 2px solid var(--primary);
  background: rgba(110,168,254,0.05);
}

.plan-header {
  text-align: left;
  margin-bottom: 1rem;
}

.plan-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .35rem;
  letter-spacing: 0.02em;
}

.plan-price {
  font-size: 1.75rem;
  font-weight: bold;
  margin-bottom: .5rem;
}

.plan-price small {
  font-size: .85rem;
  font-weight: normal;
  color: var(--muted);
}
.plan-price{
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 6px;
  color: var(--primary);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0;
  display: grid;
  gap: 0.85rem;
}

.plan-features li {
  display: flex;
  align-items: center;
  font-size: .95rem;
}

.plan-actions {
  margin-top: auto;
  text-align: center;
}

.plan-desc p {
  margin: 0;
}

.plan-desc .muted {
  margin-top: 0.45rem;
}

.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  gap: 1rem;
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px);
}

[data-theme="dark"] .billing-toggle {
  background: rgba(15, 23, 42, 0.52);
}

.billing-toggle span {
  cursor: pointer;
  transition: color 0.2s;
}

.billing-toggle span.active {
  color: var(--primary);
  font-weight: 600;
}

.billing-toggle .switch {
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.billing-toggle .switch::after {
  content: "";
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.billing-toggle.yearly .switch {
  background: var(--primary);
}

.billing-toggle.yearly .switch::after {
  left: 24px;
}

.discount-box {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 2rem;
}

.discount-box input {
  max-width: 200px;
}
.progress-bar {
  background: var(--border);
  border-radius: 6px;
  height: 6px;
  width: 100%;
  margin-top: 4px;
  overflow: hidden;
}
.progress-bar .progress {
  background: var(--primary);
  height: 100%;
  transition: width 0.3s;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  padding: 0.9rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(246, 248, 252, 0.92);
}

[data-theme="dark"] .feature-item {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.68);
}

.feature-badge {
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(0, 113, 227, 0.1);
  color: var(--primary);
}

.plan-feature-svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.feature-text {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 0.5rem;
}

.feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.feature-label {
  color: var(--text);
  font-weight: 600;
}

.feature-usage,
.feature-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.feature-progress {
  width: 100%;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.feature-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #7cb6ff);
}

.feature-item.is-capability .feature-status,
.feature-item.is-support .feature-status {
  color: var(--text);
}

@media (max-width: 640px) {
  .subscription-shell-head {
    align-items: stretch;
  }

  .billing-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .feature-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
