.pricing-page {
  background: #fbfbfa;
}

.pricing-page main {
  overflow: hidden;
}

.pricing-page .site-header {
  position: relative;
  top: auto;
}

.pricing-page .desktop-nav .is-current {
  color: #181816;
  font-size: clamp(13px, 1.15vw, 16px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  transform: none;
  scale: 1;
}

.price-shell {
  width: 100%;
  padding-right: var(--page-x);
  padding-left: var(--page-x);
}

.price-eyebrow {
  margin: 0 0 28px;
  color: #5b5954;
  font-size: 17px;
  font-weight: 500;
}

.pricing-hero {
  padding-top: 120px;
  padding-bottom: 82px;
}

.pricing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.7fr);
  gap: clamp(60px, 9vw, 160px);
  align-items: end;
}

.pricing-hero h1 {
  max-width: 900px;
  margin: 0;
  color: #181816;
  font-size: clamp(62px, 7.4vw, 116px);
  font-weight: 500;
  line-height: 0.91;
  letter-spacing: -0.065em;
}

.pricing-hero-grid > div > p {
  margin: 0;
  color: #45433f;
  font-size: clamp(21px, 2vw, 30px);
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.billing-toggle {
  display: grid;
  grid-template-columns: 1fr 1.65fr;
  width: min(100%, 450px);
  margin-top: 0;
  padding: 5px;
  border: 1px solid rgba(24, 24, 22, 0.09);
  border-radius: 999px;
  background: rgba(241, 240, 237, 0.9);
}

.billing-toggle button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #66635e;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.billing-toggle button span {
  color: #77746e;
  font-size: 11px;
}

.billing-toggle button.is-active {
  background: #fff;
  color: #181816;
  box-shadow: 0 5px 16px rgba(24, 24, 22, 0.08);
}

.plans-section {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 70px;
}

.plan-card {
  position: relative;
  display: grid;
  grid-template-rows: 64px 106px 30px minmax(150px, 1fr) 50px;
  min-height: 520px;
  padding: 30px;
  border: 1px solid rgba(24, 24, 22, 0.11);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(24, 24, 22, 0.055);
}

.plan-card.is-featured {
  border: 3px solid #181816;
  padding: 28px;
}

.recommended {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #181816;
  color: #fff !important;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.plan-head p {
  margin: 0 0 6px;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.plan-head span {
  color: #77746e;
  font-size: 14px;
}

.plan-price {
  align-self: end;
  margin: 0;
}

.plan-price .price-value {
  display: block;
  font-size: clamp(48px, 4vw, 68px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.plan-price small {
  display: block;
  margin-top: 10px;
  color: #6b6862;
  font-size: 14px;
}

.plan-saving {
  align-self: center;
  min-height: 0;
  margin: 0;
  color: #5d5a55;
  font-size: 13px;
}

.plan-purpose {
  align-self: start;
  min-height: 0;
  margin: 20px 0 0;
  color: #4c4a46;
  font-size: 16px;
  line-height: 1.45;
}

.plan-cta {
  display: grid;
  place-items: center;
  min-height: 50px;
  align-self: stretch;
  margin-top: 0;
  border: 1px solid rgba(24, 24, 22, 0.14);
  border-radius: 999px;
  background: #f5f4f1;
  color: #181816;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  cursor: default;
  grid-row: 5;
}

.plan-cta.is-dark {
  background: #181816;
  color: #fff !important;
}

.plan-card ul {
  display: grid;
  gap: 13px;
  align-self: start;
  grid-row: 4;
  margin: 20px 0 0;
  padding: 22px 0 18px;
  border-top: 1px solid rgba(24, 24, 22, 0.09);
  list-style: none;
}

.plan-card li {
  position: relative;
  padding-left: 22px;
  color: #3f3d39;
  font-size: 15px;
  line-height: 1.35;
}

.plan-card li::before {
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #181816;
  content: "";
}

.usage-note {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  margin-top: 0;
  padding-top: 30px;
  padding-bottom: 34px;
  border-top: 1px solid rgba(24, 24, 22, 0.1);
  border-bottom: 1px solid rgba(24, 24, 22, 0.1);
}

.usage-note div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
}

.usage-note p {
  margin: 0;
  color: #55524d;
  font-size: 15px;
  line-height: 1.55;
}

.matrix-section,
.addons-section,
.stack-section {
  padding-top: 140px;
  padding-bottom: 20px;
}

.section-intro {
  display: grid;
  grid-template-columns: 1fr minmax(360px, 0.72fr);
  gap: 40px 100px;
  align-items: start;
  margin-bottom: 70px;
}

.section-intro .price-eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.section-intro h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(48px, 5vw, 78px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.055em;
}

.section-intro > p:last-child {
  margin: 0;
  color: #55524d;
  font-size: 19px;
  line-height: 1.5;
}

.section-intro.compact {
  grid-template-columns: 1fr;
}

.table-scroll {
  overflow-x: auto;
  border-top: 1px solid rgba(24, 24, 22, 0.1);
}

.plan-matrix,
.stack-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
}

.plan-matrix th,
.plan-matrix td,
.stack-table th,
.stack-table td {
  padding: 25px 22px;
  border-bottom: 1px solid rgba(24, 24, 22, 0.09);
  color: #4f4c47;
  font-size: 16px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.plan-matrix thead th,
.stack-table thead th {
  color: #181816;
  font-size: 15px;
  font-weight: 600;
}

.plan-matrix tbody th,
.stack-table tbody th {
  color: #24221f;
  font-weight: 600;
}

.plan-matrix .featured-col,
.stack-table .spark-col {
  background: rgba(235, 233, 228, 0.55);
  color: #181816;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.addon-grid article {
  min-height: 265px;
  padding: 28px;
  border: 1px solid rgba(24, 24, 22, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.addon-grid span {
  color: #7a7771;
  font-size: 13px;
  font-weight: 600;
}

.addon-grid h3 {
  margin: 40px 0 14px;
  font-size: 24px;
  line-height: 1.1;
}

.addon-grid p {
  min-height: 55px;
  margin: 0;
  color: #5b5853;
  font-size: 15px;
  line-height: 1.45;
}

.addon-grid strong {
  display: block;
  margin-top: 26px;
  font-size: 27px;
  font-weight: 500;
}

.addon-footnote {
  margin: 24px 0 0;
  color: #66635d;
  font-size: 14px;
}

.stack-table th:first-child {
  width: 15%;
}

.stack-table {
  min-width: 1120px;
}

.stack-table th,
.stack-table td {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.stack-table .summary-row > * {
  background: #f0efec;
  color: #181816;
  font-weight: 600;
}

.pricing-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 100px;
  padding-top: 88px;
  padding-bottom: 100px;
  text-align: center;
}

.pricing-cta h2 {
  margin: 22px auto 0;
  font-size: clamp(52px, 6vw, 88px);
  font-weight: 500;
  letter-spacing: -0.06em;
}

.pricing-cta > p:not(.price-eyebrow) {
  max-width: 760px;
  margin: 22px auto 0;
  color: #55524d;
  font-size: 19px;
  line-height: 1.5;
}

.pricing-cta .plan-cta {
  width: fit-content;
  min-width: 280px;
  min-height: 58px;
  margin: 30px auto 0;
  padding: 0 34px;
  border: 1px solid rgba(24, 24, 22, 0.15);
  background: #f5f4f1;
  color: #181816;
  font-size: 16px;
}

.pricing-cta .price-eyebrow {
  margin: 0;
}

@media (max-width: 1180px) {
  .plans-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-card {
    min-height: 610px;
  }

  .addon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .pricing-hero-grid,
  .section-intro,
  .usage-note {
    grid-template-columns: 1fr;
  }

  .pricing-hero-grid {
    gap: 48px;
  }

  .pricing-hero h1 {
    font-size: clamp(58px, 14vw, 90px);
  }

  .section-intro {
    gap: 30px;
  }

  .usage-note div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .pricing-page .desktop-nav {
    display: none;
  }

  .pricing-page .header-action {
    padding: 11px 15px;
    font-size: 12px;
  }

  .pricing-hero {
    padding-top: 84px;
    padding-bottom: 60px;
  }

  .billing-toggle {
    grid-template-columns: 0.8fr 1.7fr;
  }

  .billing-toggle button {
    padding: 0 10px;
    font-size: 12px;
  }

  .billing-toggle button span {
    display: none;
  }

  .plans-section,
  .addon-grid {
    grid-template-columns: 1fr;
  }

  .plan-card {
    grid-template-rows: 64px 112px 28px 112px 50px auto;
    min-height: 0;
  }

  .matrix-section,
  .addons-section,
  .stack-section {
    padding-top: 100px;
  }

  .section-intro {
    margin-bottom: 48px;
  }

  .section-intro h2 {
    font-size: clamp(43px, 12vw, 60px);
  }

  .addon-grid article {
    min-height: 235px;
  }

  .pricing-cta {
    margin-top: 90px;
    padding-top: 80px;
    padding-bottom: 90px;
  }
}

.matrix-section .section-intro > p:last-child {
  max-width: 600px;
  color: #41413e;
  font-size: clamp(12px, 2vw, 18px);
  line-height: 1.4;
  letter-spacing: -0.028em;
}

/* Pricing typography system — aligned with homepage */
.pricing-page {
  --price-title: clamp(32px, 3.1vw, 50px);
  --price-body: clamp(16px, 1.25vw, 18px);
  --price-card-title: clamp(21px, 1.65vw, 25px);
  --price-small: 14px;
}

.pricing-hero h1,
.section-intro h2,
.pricing-cta h2 {
  max-width: 800px;
  font-size: clamp(32px, 2.5vw, 44px);
  line-height: 1.3;
  letter-spacing: -0.055em;
  font-weight: 550;
}

.pricing-hero-grid > div > p,
.section-intro > p:last-child,
.pricing-cta > p:not(.price-eyebrow),
.plan-purpose,
.usage-note p,
.addon-grid p {
  font-size: var(--price-body);
  line-height: 1.5;
}

.plan-head p,
.addon-grid h3 {
  font-size: var(--price-card-title);
  line-height: 1.12;
}

.price-eyebrow,
.plan-head span,
.plan-saving,
.plan-card li,
.addon-grid span,
.addon-footnote,
.plan-matrix thead th,
.stack-table thead th {
  font-size: var(--price-small);
}

.plan-price .price-value {
  font-size: clamp(42px, 3.5vw, 54px);
}

.plan-matrix th,
.plan-matrix td,
.stack-table th,
.stack-table td {
  font-size: 15px;
}

.addon-grid strong {
  font-size: var(--price-card-title);
}

@media (max-width: 640px) {
  .pricing-page {
    --price-title: clamp(32px, 9vw, 42px);
    --price-body: 16px;
    --price-card-title: 22px;
  }
}

/* Pricing hero aligned with the landing-page H1 */
.pricing-hero {
  padding-top: clamp(160px, 12vw, 210px);
}

.pricing-hero h1 {
  max-width: 800px;
  font-size: clamp(32px, 2.5vw, 44px);
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: -0.055em;
}

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

  .pricing-hero h1 {
    max-width: 800px;
    font-size: clamp(32px, 2.5vw, 44px);
    line-height: 1.3;
    letter-spacing: -0.055em;
    font-weight: 550;
  }
}
