.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

main > .section + .section {
  border-top: 1px solid var(--line-soft);
}

/* Pricing hero */

.pricing-hero {
  padding: clamp(42px, 3.8vw, 54px) 0 36px;
  background: var(--bg);
}

.pricing-hero__inner {
  display: grid;
  grid-template-areas:
    "title lede"
    "billing billing";
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  column-gap: clamp(48px, 6vw, 88px);
  row-gap: 30px;
  align-items: start;
  max-width: none;
  text-align: left;
}

.pricing-hero .display {
  grid-area: title;
  max-width: 23ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(46px, 4.3vw, 58px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.pricing-hero .lede {
  grid-area: lede;
  max-width: 48ch;
  margin: 0;
  padding-top: 4px;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.55;
  text-align: left;
}

.billing-toggle {
  grid-area: billing;
  justify-self: center;
  width: min(100%, 380px);
  margin: 0;
}

.billing-toggle__switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-frost);
}

.billing-toggle__switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.billing-toggle__switch button:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.billing-toggle__switch button.is-active {
  border-color: #d9dee7;
  background: var(--bg);
  color: var(--ink);
}

.billing-toggle__save {
  padding: 3px 6px;
  border-radius: 5px;
  background: #dff7ea;
  color: #17683f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

/* Plan cards */

.pricing-tiers-section {
  padding: 0 0 clamp(64px, 7vw, 96px);
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 565px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.tier-card--recommended {
  border-color: #172136;
  background: #172136;
  color: #fff;
}

.tier-card--callout {
  background: var(--bg-soft);
}

.tier-card__recommendation {
  position: absolute;
  top: -13px;
  left: 22px;
  padding: 5px 11px;
  border: 1px solid rgba(14, 18, 32, 0.08);
  border-radius: 6px;
  background: var(--c-signal);
  color: #092619;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.tier-card__head {
  min-height: 58px;
  margin-bottom: 16px;
}

.tier-card__head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.tier-card__head p {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.tier-card--recommended .tier-card__head h2,
.tier-card--recommended .tier-card__price strong {
  color: #fff;
}

.tier-card--recommended .tier-card__head p,
.tier-card--recommended .tier-card__unit,
.tier-card--recommended .tier-card__billing-note,
.tier-card--recommended .tier-card__summary,
.tier-card--recommended .tier-card__features {
  color: rgba(255, 255, 255, 0.78);
}

.tier-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 56px;
  margin-bottom: 0;
}

.tier-card__price strong {
  color: var(--ink);
  font-size: 32px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
}

.tier-card__price--call {
  align-items: center;
}

.tier-card__price--call strong {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.tier-card__unit {
  color: var(--ink-3);
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
}

.tier-card__billing-note {
  width: 100%;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.35;
}

.tier-card__summary {
  min-height: 96px;
  margin: 14px 0 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.55;
}

.tier-card--recommended .tier-card__summary {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.tier-card__cta {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  font-size: 13px;
}

.tier-card--recommended .tier-card__cta.button--primary {
  border-color: var(--c-signal);
  background: var(--c-signal);
  color: #092619;
}

.tier-card--recommended .tier-card__cta.button--primary:hover {
  border-color: #55e49f;
  background: #55e49f;
}

.tier-card__features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.48;
}

.tier-card__features li {
  position: relative;
  padding-left: 21px;
}

.tier-card__features li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--rink-blue);
  font-weight: 800;
}

.tier-card--recommended .tier-card__features li::before {
  color: #6fe2aa;
}

.pricing-compare-link {
  margin: 22px 0 0;
  color: var(--ink-3);
  font-size: 14px;
  text-align: center;
}

.pricing-compare-link a {
  color: var(--rink-blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Fees */

.fees-strip {
  display: grid;
  grid-template-columns: minmax(270px, 0.82fr) minmax(0, 1.45fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}

.fees-strip__intro {
  max-width: 40ch;
}

.fees-strip h2,
#compare .section-heading h2,
.faq-grid h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.fees-strip__intro .section-context {
  margin: 0 0 8px;
}

.fees-strip__intro > p:last-child {
  margin: 16px 0 0;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.65;
}

.fees-strip__panel {
  display: grid;
  gap: 16px;
}

.fees-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fee-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
}

.fee-card span {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.fee-card strong {
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.fee-card p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.5;
}

.fees-example {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.18fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
}

.fees-example__intro {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--bg-soft);
}

.fees-example__intro span,
.fees-example__row span {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.4;
}

.fees-example__intro strong {
  display: block;
  margin: 10px 0 12px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.fees-example__intro p {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.55;
}

.fees-example__rows {
  display: grid;
  padding: 12px 24px;
}

.fees-example__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.fees-example__row strong {
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}

.fees-example__row--total {
  border-bottom: 0;
}

.fees-example__row--total strong {
  color: var(--c-signal-deep);
  font-size: 23px;
}

/* Comparison */

#compare .section-heading {
  max-width: 740px;
  margin-bottom: 34px;
}

#compare .section-heading p {
  max-width: 64ch;
  margin: 15px 0 0;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.6;
}

.matrix-plan-picker {
  display: none;
}

.matrix-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg);
  overscroll-behavior-inline: contain;
}

.matrix-scroll:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #1f4f9a;
}

.matrix {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--ink-2);
  font-size: 13px;
}

.matrix tr > :first-child {
  width: 30%;
}

.matrix tr > :not(:first-child) {
  width: 17.5%;
}

.matrix th,
.matrix td {
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
  vertical-align: middle;
}

.matrix tr > :first-child {
  border-left: 0;
}

.matrix thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding-top: 17px;
  padding-bottom: 17px;
  border-top: 0;
  background: #f3f5f8;
  color: var(--ink);
  text-align: left;
}

.matrix thead th:first-child {
  left: 0;
  z-index: 5;
  background: #eef1f5;
}

.matrix__plan {
  text-align: center !important;
}

.matrix__plan strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.matrix__plan span {
  display: block;
  margin-top: 4px;
  color: var(--ink-4);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.matrix__plan em {
  display: block;
  margin-bottom: 4px;
  color: #0a7646;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.matrix__plan--recommended {
  background: #dff7e9 !important;
  box-shadow: inset 0 3px 0 #12a762;
}

.matrix tbody th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg);
  color: var(--ink-2);
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}

.matrix tbody td {
  color: var(--ink-2);
  line-height: 1.4;
  text-align: center;
}

.matrix tbody tr:not(.matrix__section) > td:nth-child(3) {
  background: #f3fbf7;
}

.matrix__section th {
  position: static;
  z-index: auto;
  width: auto !important;
  padding: 18px 16px 10px;
  border-left: 0;
  background: var(--bg-soft);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}

.matrix__yes {
  color: #0b7d4a !important;
  font-size: 18px;
  font-weight: 800;
}

.matrix__no {
  background-clip: padding-box;
}

/* FAQ */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.faq-grid > div > p {
  margin: 16px 0 0;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.55;
}

.faq-grid > div > .button {
  margin-top: 10px;
}

.faq-grid p a:not(.button) {
  color: var(--rink-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  min-height: 60px;
  padding: 19px 0;
  list-style: none;
  cursor: pointer;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--ink-3);
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer p {
  max-width: 62ch;
  margin: 0;
  padding: 0 36px 20px 0;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.65;
}

@media (max-width: 1120px) {
  .tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 16px;
  }

  .tier-card {
    min-height: 0;
  }

  .tier-card__summary {
    min-height: 76px;
  }

}

@media (max-width: 900px) {
  .pricing-hero__inner {
    grid-template-areas:
      "title"
      "lede"
      "billing";
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    max-width: 720px;
  }

  .pricing-hero .display {
    grid-area: title;
    max-width: 21ch;
  }

  .pricing-hero .lede {
    grid-area: lede;
    padding-top: 0;
  }

  .billing-toggle {
    grid-area: billing;
    justify-self: start;
    margin-top: 6px;
  }

  .fees-strip,
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .fees-strip__intro {
    max-width: 66ch;
  }

  .fees-grid {
    grid-template-columns: 1fr;
  }

  .fee-card {
    min-height: 0;
  }

  .fees-example {
    grid-template-columns: 1fr;
  }

  .fees-example__intro {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .matrix-plan-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 14px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-frost);
  }

  .matrix-plan-picker button {
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-3);
    font-family: inherit;
    font-size: 13px;
    font-weight: 650;
  }

  .matrix-plan-picker button.is-active {
    border-color: #d9dee7;
    background: var(--bg);
    color: var(--ink);
  }

  .matrix-scroll {
    overflow: visible;
  }

  .matrix {
    min-width: 0;
    table-layout: fixed;
    font-size: 12.5px;
  }

  .matrix tr > :first-child {
    width: 61%;
  }

  .matrix tr > :not(:first-child) {
    display: none;
    width: 39%;
  }

  .matrix-scroll[data-mobile-plan="starter"] .matrix tr > :nth-child(2),
  .matrix-scroll[data-mobile-plan="venue"] .matrix tr > :nth-child(3),
  .matrix-scroll[data-mobile-plan="pro"] .matrix tr > :nth-child(4),
  .matrix-scroll[data-mobile-plan="enterprise"] .matrix tr > :nth-child(5) {
    display: table-cell;
  }

  .matrix__section th {
    display: table-cell !important;
    width: auto !important;
  }

  .matrix th,
  .matrix td {
    padding: 13px 12px;
  }

  .matrix thead th:first-child,
  .matrix tbody th[scope="row"] {
    position: static;
  }

  .matrix tbody tr:not(.matrix__section) > td:nth-child(3) {
    background: #f3fbf7;
  }
}

@media (max-width: 640px) {
  .pricing-hero {
    padding-top: 30px;
    padding-bottom: 34px;
  }

  .pricing-hero .display {
    max-width: none;
    font-size: clamp(36px, 10vw, 42px);
  }

  .pricing-hero .lede {
    font-size: 16px;
  }

  .billing-toggle {
    justify-self: stretch;
    width: 100%;
  }

  .billing-toggle__switch button {
    min-height: 48px;
    padding: 7px 9px;
    font-size: 13px;
  }

  .tier-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tier-card {
    min-height: 0;
    padding: 22px 20px 24px;
  }

  .tier-card__head {
    min-height: 0;
  }

  .tier-card__summary {
    min-height: 0;
  }

  .fees-example__intro,
  .fees-example__rows {
    padding-left: 18px;
    padding-right: 18px;
  }

  .fees-example__intro strong {
    font-size: 30px;
  }

  .faq-answer p {
    padding-right: 0;
  }
}

@media (max-width: 460px) {
  .billing-toggle__switch button {
    font-size: 12.5px;
  }

  .fees-example__row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .matrix tr > :first-child {
    width: 58%;
  }

  .matrix tr > :not(:first-child) {
    width: 42%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .billing-toggle__switch button,
  .matrix-plan-picker button {
    transition: none;
  }
}
