/*
 * Homepage pricing: a billing switch where Monthly and Yearly are struck through and only
 * "Once" exists (pricing.js answers a press on the others), above the one plan card.
 */
.pricing-plain {
  padding: clamp(72px, 8vw, 112px) 20px;
  text-align: center;
}

/* The FAQ's own top rule stops at its content width; here it runs rail to rail like the rule above Pricing. */
.pricing-plain + .site-rail__rule + .faq-plain::before {
  left: 0;
  width: 100%;
  transform: none;
}

.pricing-plain .pricing-plain__header {
  width: auto;
  max-width: 640px;
  margin: 0 auto;
  display: block;
}

.pricing-plain .pricing-plain__header h2 {
  font-family: "AsideDisplay", "AsideDisplay Fallback", "Arial", sans-serif;
  color: #030302;
  font-size: clamp(2.8rem, 4.2vw, 4.25rem);
  font-weight: 440;
  line-height: .94;
  letter-spacing: 0;
}

.price-toggle {
  --ink: #0f1114;
  --text: #2b2c2e;
  --muted: #6b6b68;
  --blue: #1f86e6;
  width: min(760px, 100%);
  margin: clamp(40px, 4.4vw, 56px) auto 0;
  color: var(--ink);
  font-family: "AsideGeist", "AsideGeist Fallback", "Geist", system-ui, sans-serif;
}

.price-toggle__billing {
  position: relative;
}

.price-toggle__switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 5px;
  border-radius: 999px;
  background: #eef0f2;
}

.price-toggle__switch button {
  position: relative;
  z-index: 1;
  min-width: 116px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.price-toggle__switch button[aria-disabled="true"] {
  color: #9a9c9f;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.price-toggle__switch button:focus-visible {
  outline: 3px solid #0b6bff;
  outline-offset: 2px;
}

.price-toggle__thumb {
  position: absolute;
  top: 5px;
  right: 5px;
  bottom: 5px;
  width: calc((100% - 10px) / 3);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 17, 20, .12);
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
}

.price-toggle__switch.is-nudged-1 .price-toggle__thumb {
  transform: translateX(-38%);
}

.price-toggle__switch.is-nudged-0 .price-toggle__thumb {
  transform: translateX(-62%);
}

.price-toggle__switch.is-shaking {
  animation: price-toggle-shake .38s ease;
}

@keyframes price-toggle-shake {
  20%, 60% {
    transform: translateX(-5px);
  }
  40%, 80% {
    transform: translateX(5px);
  }
}

/* Floats under the switch so an empty message leaves no gap. */
.price-toggle__msg {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  right: 0;
  color: var(--muted);
  font-size: 15px;
}

.price-toggle__card {
  margin-top: clamp(56px, 5.6vw, 72px);
}

.price-toggle__card > * {
  margin-inline: auto;
}

/* The price sits alone on the centre line; its term goes underneath so nothing pushes it sideways. */
.price-toggle__price {
  font-family: "AsideDisplay", "AsideDisplay Fallback", "Arial", sans-serif;
  font-size: clamp(5.5rem, 9vw, 8.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.price-toggle__amount {
  display: inline-flex;
}

/* Odometer columns built by pricing.js: one digit tall, the reel slides up inside. */
.price-toggle__digit {
  display: inline-block;
  height: 1em;
  overflow: hidden;
}

.price-toggle__digit > span {
  display: block;
  transition: transform 1.5s cubic-bezier(.2, .9, .2, 1);
}

.price-toggle__digit > span > span {
  display: block;
  height: 1em;
}

.price-toggle__term {
  margin-top: 18px;
  font-family: "Oooh Baby", "AsideGeist", "AsideGeist Fallback", "Geist", system-ui, sans-serif;
  font-size: 2.35rem;
  font-weight: 400;
  line-height: 1.3;
}

/* A marker stroke behind the term, sweeping in from the left. */
.price-toggle__marker {
  position: relative;
  display: inline-block;
  padding: 0 20px 6px;
  color: #fff;
  /* Thickens the script into a felt-tip line; follows the text colour through the marker sweep. */
  -webkit-text-stroke: 1.6px currentColor;
  transition: color .25s ease .12s;
}

.price-toggle__marker::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 6px 10px 7px 12px;
  background: var(--blue);
  transform: rotate(-1.5deg);
  transform-origin: left center;
  transition: transform .55s cubic-bezier(.3, 1.35, .5, 1);
}

.price-toggle__marker.is-armed:not(.is-lit) {
  color: var(--ink);
}

.price-toggle__marker.is-armed:not(.is-lit)::before {
  transform: rotate(-1.5deg) scaleX(0);
}

.price-toggle__card {
  position: relative;
  isolation: isolate;
}

/* Centred rows rather than a left-aligned column, so the block sits on the same axis as the price. */
.price-toggle__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 28px;
  max-width: 720px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.price-toggle__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.price-toggle__list li::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%231f86e6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.2 6.4l2.4 2.4 5.2-5.6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* The hero's download button. */
.price-toggle__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  margin-top: 44px;
  padding: 0 28px 0 24px;
  border-radius: 18px;
  background: var(--ink);
  box-shadow: 0 12px 28px rgba(15, 17, 20, .17);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

.price-toggle__button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price-toggle__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(15, 17, 20, .22);
}

.price-toggle__button:active {
  transform: translateY(1px);
}

.price-toggle__button:focus-visible {
  outline: 3px solid #0b6bff;
  outline-offset: 4px;
}

.price-toggle__note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .pricing-plain {
    padding: 64px 12px;
  }

  .price-toggle__switch button {
    min-width: 92px;
  }

  .price-toggle__card {
    margin-top: 56px;
  }

  .price-toggle__price {
    font-size: 5rem;
  }

  .price-toggle__term {
    font-size: 1.95rem;
  }

  .price-toggle__marker {
    -webkit-text-stroke-width: 1.3px;
  }

  .price-toggle__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: fit-content;
    margin-top: 32px;
    text-align: left;
  }

  .price-toggle__button {
    margin-top: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .price-toggle__switch.is-shaking {
    animation: none;
  }

  .price-toggle__thumb,
  .price-toggle__button,
  .price-toggle__marker,
  .price-toggle__marker::before {
    transition: none;
  }
}
