:root {
  color-scheme: light;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --card-border: rgba(148, 163, 184, 0.25);
  --text: #0f172a;
  --muted: #667085;
  --accent: #007aff;
  --accent-strong: #0062d6;
  --accent-gradient: linear-gradient(90deg, #007aff 0%, #4da3ff 100%);
  --accent-soft: rgba(0, 122, 255, 0.12);
  --danger-bg: #fdecee;
  --danger-border: #f5b8be;
  --danger-text: #a12b36;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.04), 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 0 18px rgba(0, 122, 255, 0.25);
  font-family: "Inter", "Segoe UI", Roboto, -apple-system, sans-serif;
  background-color: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 85% 5%, rgba(0, 122, 255, 0.12) 0, rgba(0, 122, 255, 0) 45%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.75rem;
}

.pricing-header {
  padding: 2.25rem 0 1.4rem;
  text-align: center;
}

.pricing-header .eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: #7b8aa1;
  margin: 0 0 0.6rem;
}

.pricing-header h1 {
  margin: 0;
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pricing-header .lead {
  margin-top: 0.85rem;
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.contact-callout {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
  margin-bottom: 1.5rem;
  font-size: 0.98rem;
}

.billing-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  padding: 0.25rem 0 1.7rem;
  margin-bottom: 1rem;
  text-align: center;
}

.billing-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}

.billing-option {
  border: none;
  background: transparent;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b7a90;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.billing-option span {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent-strong);
  margin-left: 0.35rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  letter-spacing: 0.12em;
}

.billing-option.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.billing-helper {
  margin: 0.85rem auto 0;
  max-width: 560px;
  font-size: 0.9rem;
  color: var(--muted);
}

.plans-shell {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

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

.enterprise-row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.plan-card {
  border-radius: 20px;
  padding: 2rem 1.85rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 1.05rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: visible;
  min-height: 100%;
  height: 100%;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.plan-card.featured {
  border-color: rgba(0, 122, 255, 0.45);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.plan-card.is-current {
  border-color: rgba(18, 183, 106, 0.45);
  box-shadow: var(--shadow-card), 0 0 18px rgba(18, 183, 106, 0.18);
}

.plan-callout {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background: var(--accent-gradient);
  color: #fff;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  box-shadow: 0 8px 16px rgba(0, 122, 255, 0.25);
  white-space: nowrap;
  line-height: 1;
}

.plan-summary {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.plan-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #667085;
  word-break: break-word;
}

.plan-tagline {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  margin: 0;
  min-height: 4.2rem;
  max-width: 32rem;
}

.plan-price-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.price-row {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
}

.price-amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.price-term {
  font-size: 0.9rem;
  color: #7a889e;
}

.billing-note,
.billing-total {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.billing-meta-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.billing-note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  position: relative;
  font-weight: 600;
}

.billing-total {
  font-size: 0.82rem;
}

.savings-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 600;
}

.info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #ffffff;
  color: #6b7a90;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow-soft);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.info-icon:hover,
.info-icon:focus-visible {
  background: #f1f5ff;
  border-color: rgba(0, 122, 255, 0.4);
  color: var(--accent-strong);
  outline: none;
}

.info-bubble {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7a90;
  white-space: nowrap;
  opacity: 0;
  box-shadow: var(--shadow-card);
  transition: opacity 0.15s ease;
  z-index: 5;
}

.info-tooltip:hover .info-bubble,
.info-tooltip:focus-within .info-bubble {
  opacity: 1;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.plan-card:not(.enterprise-card) .feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

.feature-list li {
  display: flex;
  gap: 0.5rem;
  line-height: 1.45;
}

.feature-list li::before {
  content: "✔";
  color: var(--accent-strong);
  font-size: 0.9rem;
  position: relative;
  top: 0.1rem;
}

.plan-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.plan-cta-row {
  margin-top: 0.35rem;
  width: 100%;
  display: flex;
}

.plan-card:not(.enterprise-card) .plan-cta-row .button {
  width: 100%;
}

.availability-flag {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--danger-text);
}

.enterprise-card {
  padding: 2.25rem;
}

.enterprise-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) 220px;
  gap: 1.75rem;
  align-items: stretch;
}

.enterprise-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enterprise-card .plan-summary .plan-tagline {
  min-height: auto;
}

.enterprise-price {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-left: 1rem;
  border-left: 1px solid var(--card-border);
}

.enterprise-card .plan-price-block {
  margin-bottom: 0;
}

.enterprise-info .feature-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.enterprise-info .feature-list li {
  flex: 1 1 220px;
}

.enterprise-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.enterprise-cta .plan-cta-row {
  width: auto;
}

.enterprise-cta .button {
  min-width: 200px;
  width: auto;
}

.enterprise-cta .availability-flag {
  margin-top: 0;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  color: #1c2636;
  background: #f1f4f9;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(17, 34, 68, 0.12);
}

.plan-card.featured .button {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 16px 28px rgba(0, 122, 255, 0.25);
}

.button.secondary {
  background: #eef1f7;
  color: var(--text);
  border: 1px solid var(--card-border);
  box-shadow: none;
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.enterprise-contact {
  text-align: center;
  margin: 3.5rem 0 2.5rem;
  color: #5b6a80;
  font-size: 0.98rem;
}

.enterprise-contact a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.enterprise-contact a:hover {
  text-decoration: underline;
}

.switch-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.switch-summary {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
}

.switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.6rem;
}

.switch-card {
  gap: 0.85rem;
}

.switch-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.switch-plan-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: #667085;
}

.switch-plan-interval {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.switch-plan-name {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.switch-plan-price {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}

.switch-plan-detail,
.switch-plan-total {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.switch-actions {
  align-items: center;
  text-align: center;
}

.switch-action-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.switch-action-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.switch-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.switch-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.switch-changes {
  gap: 1rem;
}

.change-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.change-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--text);
}

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

.change-value {
  color: var(--muted);
  text-align: right;
}

.retention-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.switch-domains {
  gap: 1rem;
}

.domain-selection-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.domain-list {
  list-style: none;
  padding: 0.75rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: #ffffff;
  max-height: 320px;
  overflow: auto;
}

.domain-item {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #f8fafc;
}

.domain-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.domain-checkbox {
  margin-top: 0.15rem;
}

.domain-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.domain-name {
  font-weight: 600;
  color: var(--text);
}

.domain-host {
  font-size: 0.85rem;
  color: var(--muted);
}

.domain-meta {
  font-size: 0.75rem;
  color: #7b8aa1;
}

.domain-drop-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

#toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--card-border);
  padding: 1rem 1.2rem;
  border-radius: 12px;
  color: var(--text);
  max-width: 360px;
  box-shadow: 0 18px 30px rgba(15, 36, 73, 0.12);
  font-size: 0.95rem;
}

@media (min-width: 1200px) {
  .plan-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .billing-panel {
    padding: 1.5rem;
  }

  .billing-option {
    padding: 0.65rem 1.1rem;
  }
}

@media (max-width: 768px) {
  .pricing-header {
    padding: 2.4rem 0 1.4rem;
  }

  .pricing-header h1 {
    font-size: 2.2rem;
  }

  .plan-card {
    padding: 1.7rem;
  }

  .price-amount {
    font-size: 2.2rem;
  }

  .plan-tagline {
    min-height: 0;
  }

  .plan-price-block {
    min-height: 0;
  }
}

@media (max-width: 1024px) {
  .enterprise-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .enterprise-price {
    border-left: none;
    padding-left: 0;
  }

  .enterprise-info .feature-list {
    flex-direction: column;
  }

  .enterprise-cta {
    align-items: flex-start;
  }

  .enterprise-cta .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .plan-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .billing-toggle {
    width: 100%;
  }

  .billing-option {
    width: 100%;
    text-align: center;
  }
}
