/*
 * The pricing page, inside the master layout (component/site-layout.css).
 *
 * Designed for a desktop monitor first and adapted down to phones. One type scale for the whole page:
 * body 16px, section headings up to 40px, the hero headline up to 56px, all inside a 1200px column.
 * Light is the default; dark follows `html[data-theme="dark"]`, the site's only theme switch.
 */

[data-component="pricing"] {
  /* The site column and gutter the bar uses (site-layout.css). */
  --pc-max: var(--site-column);
  --pc-gutter: var(--site-gutter);
  --pc-radius: 20px;

  --pc-fs-small: 0.875rem;
  --pc-fs-body: 1rem;
  --pc-fs-lead: 1.125rem;
  --pc-fs-h3: 1.375rem;
  --pc-fs-story: clamp(1.375rem, 1.1rem + 0.55vw, 1.75rem);
  --pc-fs-price: clamp(1.875rem, 1.6rem + 0.5vw, 2.25rem);

  /*
   * Colour is the shared brand scale in style/token/color.css. This block used to declare it, and
   * routes/enterprise/index.css declared the same thing again under `--e-*`; the two had drifted
   * apart in the dark (see the note beside the scale). Nothing below carries a value of its own,
   * so both pages move together and neither can drift again.
   */
  --pc-bg: var(--surface);
  --pc-surface: var(--brand-surface);
  --pc-surface-2: var(--brand-surface-2);
  --pc-ink: var(--brand-ink);
  --pc-text: var(--brand-text);
  --pc-text-soft: var(--brand-soft);
  --pc-line: var(--brand-line);
  --pc-line-strong: var(--brand-line-strong);
  --pc-accent: var(--brand-accent);
  --pc-accent-2: var(--brand-accent-2);
  --pc-accent-3: var(--brand-accent-3);
  --pc-success: var(--brand-success);
  --pc-success-bg: var(--brand-success-bg);
  --pc-held: var(--brand-held);
  --pc-held-bg: var(--brand-held-bg);
  --pc-button: var(--brand-deep);
  --pc-button-hover: var(--brand-deep-hover);
  --pc-button-text: var(--brand-on-deep);
  --pc-focus: var(--brand-focus);
  --pc-shadow: 0 1px 2px rgba(15, 26, 77, 0.05), 0 10px 28px rgba(15, 26, 77, 0.07);
  --pc-shadow-strong: 0 2px 4px rgba(15, 26, 77, 0.06), 0 22px 56px rgba(91, 61, 245, 0.16);
  --pc-tone-violet: #efeaff;
  --pc-tone-green: #e5f7ec;
  --pc-tone-teal: #e2f6f4;
  --pc-tone-pink: #fde9f1;
  --pc-tone-amber: #fff2da;
  --pc-kicker-green: #137a43;
  --pc-kicker-teal: #0b7f74;
  --pc-kicker-pink: #b8285f;
  --pc-kicker-amber: #975800;

  font-size: var(--pc-fs-body);
  line-height: 1.6;
  color: var(--pc-text);
  background: var(--pc-bg);
  overflow-x: clip;
}

:root[data-theme="dark"] [data-component="pricing"] {
  /* Only the shadows and the pastel tones differ in the dark; the scale has already flipped. */
  --pc-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 10px 28px rgba(0, 0, 0, 0.38);
  --pc-shadow-strong: 0 2px 4px rgba(0, 0, 0, 0.45), 0 22px 56px rgba(165, 139, 255, 0.2);
  --pc-tone-violet: #20123a;
  --pc-tone-green: #0f2619;
  --pc-tone-teal: #0f2429;
  --pc-tone-pink: #2a1030;
  --pc-tone-amber: #2a1c14;
  --pc-kicker-green: #5fe096;
  --pc-kicker-teal: #4fd8c8;
  --pc-kicker-pink: #ff86b5;
  --pc-kicker-amber: #ffc769;
}

[data-component="pricing"] *,
[data-component="pricing"] *::before,
[data-component="pricing"] *::after {
  box-sizing: border-box;
}

[data-component="pricing"] :is(h1, h2, h3, h4, p, ul) {
  margin: 0;
}

[data-component="pricing"] > section {
  width: 100%;
  max-width: calc(var(--pc-max) + 2 * var(--pc-gutter));
  margin-inline: auto;
  padding-inline: var(--pc-gutter);
}

[data-component="pricing"] :is(a, button, input):focus-visible {
  outline: 3px solid var(--pc-focus);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  [data-component="pricing"] {
    --pc-radius: 18px;
  }
}

/* ------------------------------------------------------------------ Shared */

[data-component="pricing"] [data-slot="section-head"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}

[data-component="pricing"] [data-slot="section-title"] {
  color: var(--pc-ink);
  font-size: var(--title-section-size);
  font-weight: var(--title-weight);
  line-height: 1.15;
  letter-spacing: var(--title-tracking);
  text-wrap: balance;
}

[data-component="pricing"] [data-slot="section-lead"] {
  max-width: 38rem;
  font-size: var(--pc-fs-lead);
  color: var(--pc-text-soft);
  text-wrap: pretty;
}

[data-component="pricing"] [data-slot="tick"] {
  flex: none;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* -------------------------------------------------------------------- Hero */

[data-component="pricing"] [data-slot="hero"] {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
  isolation: isolate;
}

[data-component="pricing"] [data-slot="hero"]::before {
  content: "";
  position: absolute;
  inset: 0 -10%;
  z-index: -1;
  background:
    radial-gradient(40% 55% at 78% 42%, color-mix(in srgb, var(--pc-accent) 14%, transparent), transparent 70%),
    radial-gradient(30% 40% at 62% 82%, color-mix(in srgb, var(--pc-accent-2) 10%, transparent), transparent 70%),
    radial-gradient(26% 34% at 96% 80%, color-mix(in srgb, var(--pc-accent-3) 10%, transparent), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  animation: pc-drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes pc-drift {
  to {
    transform: translate3d(-2%, 1.5%, 0) scale(1.03);
  }
}

[data-component="pricing"] [data-slot="hero-copy"] {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 34rem;
}

[data-component="pricing"] [data-slot="hero-title"] {
  color: var(--pc-ink);
  font-size: var(--title-hero-size);
  font-weight: var(--title-weight);
  line-height: 1.08;
  letter-spacing: var(--title-tracking);
  text-wrap: balance;
}

[data-component="pricing"] [data-slot="hero-lead"] {
  font-size: var(--pc-fs-lead);
  color: var(--pc-text-soft);
  text-wrap: pretty;
}

[data-component="pricing"] [data-slot="hero"] [data-slot="actions"] {
  margin-top: 0.5rem;
}

[data-component="pricing"] [data-slot="hero-art"] {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 520 / 250;
  justify-self: end;
}

/* One column, still reading from the left: the enterprise and download heroes do the same, so the
   three product pages open the same way on a phone. */
@media (max-width: 960px) {
  [data-component="pricing"] [data-slot="hero"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding-top: 3rem;
    padding-bottom: 2.5rem;
  }
  [data-component="pricing"] [data-slot="hero-copy"] {
    max-width: 38rem;
  }
  [data-component="pricing"] [data-slot="hero-art"] {
    justify-self: center;
    max-width: 30rem;
  }
}

/* ------------------------------------------------------------------- Plans */

[data-component="pricing"] [data-slot="plans-section"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding-top: 3.5rem;
  padding-bottom: 4.5rem;
  scroll-margin-top: calc(var(--site-header-h, 64px) + 1rem);
}

[data-component="pricing"] [data-slot="held-banner"] {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 56rem;
  padding: 2rem 2.5rem;
  overflow: hidden;
  border-radius: var(--pc-radius);
  background: linear-gradient(125deg, #121a52 0%, #3a1f8f 55%, #7a2a78 100%);
  /*
   * An inked banner paints its own ground, so it declares its own ink — the surface contract in
   * style/token/color.css. Everything inside then writes `var(--ink)` and is correct here without
   * knowing it is on a gradient, and without a second set of values for the dark theme: the
   * gradient is dark in both, so its ink is fixed rather than themed. Ratios against the lightest
   * stop of the gradient, which is the worst case.
   */
  --ink: #ffffff; /*  5.1:1 */
  --ink-body: #f4f2ff; /*  4.8:1 */
  --ink-muted: rgb(244 242 255 / 0.88); /*  4.5:1 */
  --line: rgb(255 255 255 / 0.32);
  --line-strong: rgb(255 255 255 / 0.5); /*  3.1:1 */
  color: var(--ink-body);
  text-align: center;
  isolation: isolate;
  box-shadow: var(--pc-shadow-strong);
}

[data-component="pricing"] [data-slot="held-glow"] {
  position: absolute;
  inset: -60%;
  z-index: -1;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 188, 61, 0.26) 60deg,
    transparent 120deg,
    rgba(255, 111, 167, 0.22) 200deg,
    transparent 260deg
  );
  animation: pc-spin 18s linear infinite;
}

@keyframes pc-spin {
  to {
    transform: rotate(1turn);
  }
}

[data-component="pricing"] [data-slot="held-kicker"] {
  color: #ffd27a;
}

[data-component="pricing"] [data-slot="held-title"] {
  color: var(--ink);
  font-size: clamp(1.5rem, 1.25rem + 0.6vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

[data-component="pricing"] [data-slot="held-body"] {
  max-width: 40rem;
  color: var(--ink-muted);
  text-wrap: pretty;
}

[data-component="pricing"] [data-slot="held-banner"] [data-slot="actions"] {
  justify-content: center;
  margin-top: 0.6rem;
}

[data-component="pricing"] [data-slot="cycle"] {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  border: 1px solid var(--pc-line);
  border-radius: 999px;
  background: var(--pc-surface);
  box-shadow: var(--pc-shadow);
}

[data-component="pricing"] [data-slot="cycle"] button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pc-text-soft);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

[data-component="pricing"] [data-slot="cycle"] button[aria-pressed="true"] {
  background: var(--pc-button);
  color: var(--pc-button-text);
}

[data-component="pricing"] [data-slot="cycle-save"] {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--pc-success-bg);
  color: var(--pc-success);
  font-size: 0.75rem;
  font-weight: 700;
}

/*
 * The plan row. How many cards there are is the catalogue's business, not the page's, so `data-count`
 * (the plans for one person in the chosen cycle, plus the team card when there is one) picks the
 * layout and the default below catches any count the catalogue grows to: as many equal cards as fit
 * at 17rem or wider, never a card alone on a line at a fraction of the width.
 */
/* Row alignment is the card contract's (style/component/card.css); this only sizes the tracks. */
[data-component="pricing"] [data-slot="plans"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.5rem;
  width: 100%;
}

[data-component="pricing"] [data-slot="plans"][data-count="1"] {
  grid-template-columns: minmax(0, 25rem);
  justify-content: center;
}

[data-component="pricing"] [data-slot="plans"][data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 23rem));
  justify-content: center;
}

[data-component="pricing"] [data-slot="plans"][data-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Four across the 1200px column leaves each card about 280px, so above the two-column breakpoint it
   takes the tighter gutter and padding and a price one step down the scale rather than overflowing
   its own box. Below it four cards sit two by two and keep the ordinary card metrics. */
@media (min-width: 1081px) {
  [data-component="pricing"] [data-slot="plans"][data-count="4"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
  [data-component="pricing"] [data-slot="plans"][data-count="4"] > [data-slot="plan"] {
    --pc-fs-price: clamp(1.625rem, 1.3rem + 0.7vw, 1.875rem);
    --pc-plan-pad: 1.5rem;
  }
  /* A card this narrow cannot hold every language's "Get Max" on one line, so here the call to
     action wraps instead of running past its own edge. */
  [data-component="pricing"] [data-slot="plans"][data-count="4"] [data-slot="plan-action"] [data-button] {
    padding-inline: 0.9rem;
    white-space: normal;
    text-wrap: balance;
  }
}

@media (max-width: 1080px) {
  [data-component="pricing"] [data-slot="plans"][data-count="3"],
  [data-component="pricing"] [data-slot="plans"][data-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Three cards over two columns leave the team card on a line of its own: give it the full width
     rather than half of one, centred. Four cards fill both rows, so they need nothing. */
  [data-component="pricing"] [data-slot="plans"][data-count="3"] > [data-audience="ENTERPRISE"] {
    grid-column: 1 / -1;
    max-width: 36rem;
    width: 100%;
    justify-self: center;
  }
}

@media (max-width: 700px) {
  [data-component="pricing"] [data-slot="plans"][data-count] {
    grid-template-columns: minmax(0, 1fr);
  }
}

/*
 * Every card's content is exactly as wide, so the identical "Every plan includes" lists break their
 * lines in the same places on every card. The open plan's gradient edge is 2px and the others'
 * hairline 1px, so the hairline cards take the extra pixel a side as padding; they used to be a
 * pixel wider inside, enough to keep "commands" on one card's line and not on the next.
 */
[data-component="pricing"] [data-slot="plan"] {
  --pc-plan-pad: 2rem;

  position: relative;
  gap: 0.5rem;
  padding: calc(var(--pc-plan-pad) + 1px);
  border: 1px solid var(--pc-line);
  border-radius: var(--pc-radius);
  background: var(--pc-surface);
  box-shadow: var(--pc-shadow);
  text-align: start;
}

[data-component="pricing"] [data-slot="plan"][data-open="true"] {
  padding: var(--pc-plan-pad);
  border: 2px solid transparent;
  background:
    linear-gradient(var(--pc-surface), var(--pc-surface)) padding-box,
    linear-gradient(135deg, var(--pc-accent), var(--pc-accent-2) 55%, var(--pc-accent-3)) border-box;
  box-shadow: var(--pc-shadow-strong);
}

[data-component="pricing"] [data-slot="plan"][data-skeleton="true"] {
  min-height: 34rem;
  background: linear-gradient(100deg, var(--pc-surface) 30%, var(--pc-surface-2) 50%, var(--pc-surface) 70%);
  background-size: 300% 100%;
  animation: pc-shimmer 1.6s linear infinite;
}

@keyframes pc-shimmer {
  to {
    background-position: -150% 0;
  }
}

@media (max-width: 640px) {
  [data-component="pricing"] [data-slot="plan"] {
    --pc-plan-pad: 1.5rem;
  }
}

[data-component="pricing"] [data-slot="plan-head"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

[data-component="pricing"] [data-slot="plan-name"] {
  color: var(--pc-ink);
  font-size: var(--pc-fs-h3);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

[data-component="pricing"] [data-slot="badge"] {
  flex: none;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--pc-held-bg);
  color: var(--pc-held);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
}

[data-component="pricing"] [data-slot="badge"][data-open="true"] {
  background: var(--pc-success-bg);
  color: var(--pc-success);
}

[data-component="pricing"] [data-slot="plan-tagline"] {
  font-size: 0.9375rem;
  color: var(--pc-text-soft);
}

[data-component="pricing"] [data-slot="price"] {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.45rem;
  margin-top: 0.75rem;
}

[data-component="pricing"] [data-slot="amount"] {
  color: var(--pc-ink);
  font-size: var(--pc-fs-price);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

[data-component="pricing"] :is(
    [data-slot="period"],
    [data-slot="price-note"],
    [data-slot="approx"],
    [data-slot="terms"],
    [data-slot="seats-hint"]
  ) {
  font-size: var(--pc-fs-small);
  color: var(--pc-text-soft);
}

[data-component="pricing"] [data-slot="saving"] {
  display: flex;
  flex-wrap: wrap;
  align-self: flex-start;
  gap: 0.2rem 0.6rem;
  padding: 0.3rem 0.7rem;
  border-radius: 10px;
  background: var(--pc-success-bg);
  color: var(--pc-success);
  font-size: var(--pc-fs-small);
  font-weight: 650;
}

[data-component="pricing"] [data-slot="saving"] s {
  font-weight: 500;
  opacity: 0.8;
}

[data-component="pricing"] [data-slot="discount"] {
  align-self: flex-start;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(120deg, #5b3df5, #d63f79);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
}

[data-component="pricing"] [data-slot="included"] {
  margin-top: 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--pc-line);
}

[data-component="pricing"] [data-slot="included-title"] {
  margin-bottom: 0.75rem;
  color: var(--pc-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-component="pricing"] [data-slot="included"] ul {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  list-style: none;
}

/* `pretty` keeps a line's last word off a line of its own on a phone ("commands", "lost", "memory"). */
[data-component="pricing"] [data-slot="included"] li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--pc-text);
  text-wrap: pretty;
}

[data-component="pricing"] [data-slot="included"] [data-slot="tick"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: var(--pc-accent);
  /* Not white: in the dark the accent is a pale violet and a white glyph on it is 2.7:1. */
  color: var(--brand-on-accent);
  stroke-width: 2.4;
}

[data-component="pricing"] [data-slot="plan-action"] {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1.5rem;
}

[data-component="pricing"] [data-slot="plan-action"] [data-button] {
  width: 100%;
}

[data-component="pricing"] [data-slot="held-note"] {
  font-size: var(--pc-fs-small);
  font-style: italic;
  text-align: center;
  color: var(--pc-held);
  text-wrap: balance;
}

[data-component="pricing"] [data-slot="tier-choice"] {
  display: inline-flex;
  align-self: flex-start;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.25rem;
  border: 1px solid var(--pc-line);
  border-radius: 999px;
  background: var(--pc-surface-2);
}

[data-component="pricing"] [data-slot="tier-choice"] button {
  min-width: 4.5rem;
  min-height: 2.25rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pc-text-soft);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 650;
  cursor: pointer;
}

[data-component="pricing"] [data-slot="tier-choice"] button[aria-checked="true"] {
  background: var(--pc-surface);
  color: var(--pc-ink);
  box-shadow: var(--pc-shadow);
}

[data-component="pricing"] [data-slot="seats"] {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

[data-component="pricing"] [data-slot="seats"] label {
  color: var(--pc-ink);
  font-size: 0.9375rem;
  font-weight: 650;
}

[data-component="pricing"] [data-slot="stepper"] {
  display: grid;
  grid-template-columns: 2.75rem 6rem 2.75rem;
  width: max-content;
  overflow: hidden;
  border: 1.5px solid var(--pc-line-strong);
  border-radius: 12px;
  background: var(--pc-surface);
}

[data-component="pricing"] [data-slot="stepper"] button {
  display: grid;
  place-items: center;
  min-height: 2.75rem;
  border: 0;
  background: var(--pc-surface-2);
  color: var(--pc-ink);
  cursor: pointer;
}

[data-component="pricing"] [data-slot="stepper"] button:disabled {
  color: var(--pc-line-strong);
  cursor: not-allowed;
}

[data-component="pricing"] [data-slot="stepper"] svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

[data-component="pricing"] [data-slot="stepper"] input {
  width: 100%;
  border: 0;
  border-inline: 1.5px solid var(--pc-line);
  background: transparent;
  color: var(--pc-ink);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

[data-component="pricing"] [data-slot="stepper"] input::-webkit-inner-spin-button,
[data-component="pricing"] [data-slot="stepper"] input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

[data-component="pricing"] [data-slot="quote"] {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

[data-component="pricing"] [data-slot="manage"] {
  color: var(--pc-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-underline-offset: 3px;
}

[data-component="pricing"] [data-slot="unavailable"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 36rem;
  min-height: 16rem;
  padding: 2rem;
  border: 1px dashed var(--pc-line-strong);
  border-radius: var(--pc-radius);
  text-align: center;
}

[data-component="pricing"] [data-slot="unavailable"] h3 {
  color: var(--pc-ink);
  font-size: var(--pc-fs-h3);
}

/* ------------------------------------------------------------------- Story */

[data-component="pricing"] [data-slot="story"] {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  padding-top: 5rem;
  padding-bottom: 5rem;
  scroll-margin-top: var(--site-header-h, 64px);
}

[data-component="pricing"] [data-slot="story-row"] {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 4rem;
}

[data-component="pricing"] [data-slot="story-row"][data-flip="true"] {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

[data-component="pricing"] [data-slot="story-row"][data-flip="true"] [data-slot="story-copy"] {
  order: 2;
}

[data-component="pricing"] [data-slot="story-copy"] {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 28rem;
}

[data-component="pricing"] [data-slot="story-title"] {
  color: var(--pc-ink);
  font-size: var(--pc-fs-story);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

[data-component="pricing"] [data-slot="story-body"] {
  color: var(--pc-text-soft);
  text-wrap: pretty;
}

[data-component="pricing"] [data-slot="story-art"] {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 480 / 320;
  justify-self: center;
  padding: 1.25rem;
  border-radius: calc(var(--pc-radius) + 4px);
  background: var(--pc-tone-violet);
}

[data-component="pricing"] [data-slot="story-row"][data-tone="green"] [data-slot="story-art"] {
  background: var(--pc-tone-green);
}
[data-component="pricing"] [data-slot="story-row"][data-tone="teal"] [data-slot="story-art"] {
  background: var(--pc-tone-teal);
}
[data-component="pricing"] [data-slot="story-row"][data-tone="pink"] [data-slot="story-art"] {
  background: var(--pc-tone-pink);
}
[data-component="pricing"] [data-slot="story-row"][data-tone="amber"] [data-slot="story-art"] {
  background: var(--pc-tone-amber);
}

[data-component="pricing"] [data-slot="story-row"][data-tone="green"] [data-slot="story-kicker"] {
  color: var(--pc-kicker-green);
}
[data-component="pricing"] [data-slot="story-row"][data-tone="teal"] [data-slot="story-kicker"] {
  color: var(--pc-kicker-teal);
}
[data-component="pricing"] [data-slot="story-row"][data-tone="pink"] [data-slot="story-kicker"] {
  color: var(--pc-kicker-pink);
}
[data-component="pricing"] [data-slot="story-row"][data-tone="amber"] [data-slot="story-kicker"] {
  color: var(--pc-kicker-amber);
}

@media (max-width: 900px) {
  [data-component="pricing"] [data-slot="story"] {
    gap: 3.5rem;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
  [data-component="pricing"] [data-slot="story-row"],
  [data-component="pricing"] [data-slot="story-row"][data-flip="true"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  [data-component="pricing"] [data-slot="story-row"][data-flip="true"] [data-slot="story-copy"] {
    order: 0;
  }
  [data-component="pricing"] [data-slot="story-copy"] {
    max-width: 40rem;
  }
}

@media (max-width: 640px) {
  [data-component="pricing"] [data-slot="story-art"] {
    padding: 0.75rem;
  }
}

[data-component="pricing"] [data-slot="pillars"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 0;
  list-style: none;
}

@media (max-width: 900px) {
  [data-component="pricing"] [data-slot="pillars"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

[data-component="pricing"] [data-slot="pillar"] {
  gap: 0.6rem;
  padding: 1.75rem;
  border: 1px solid var(--pc-line);
  border-radius: var(--pc-radius);
  background: var(--pc-surface);
  box-shadow: var(--pc-shadow);
}

[data-component="pricing"] [data-slot="pillar"] h3 {
  color: var(--pc-ink);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

[data-component="pricing"] [data-slot="pillar"] p {
  font-size: 0.9375rem;
  color: var(--pc-text-soft);
}

/* ------------------------------------------------------------------- Close */

[data-component="pricing"] > [data-slot="final"] {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: calc(100% - 2 * var(--pc-gutter));
  max-width: var(--pc-max);
  padding: 4rem 2rem;
  overflow: hidden;
  border-radius: calc(var(--pc-radius) + 6px);
  background: linear-gradient(130deg, #0f1a4d, #3a1f8f 50%, #9c2f6f);
  /*
   * An inked banner paints its own ground, so it declares its own ink — the surface contract in
   * style/token/color.css. Everything inside then writes `var(--ink)` and is correct here without
   * knowing it is on a gradient, and without a second set of values for the dark theme: the
   * gradient is dark in both, so its ink is fixed rather than themed. Ratios against the lightest
   * stop of the gradient, which is the worst case.
   */
  --ink: #ffffff; /*  5.1:1 */
  --ink-body: #f4f2ff; /*  4.8:1 */
  --ink-muted: rgb(244 242 255 / 0.88); /*  4.5:1 */
  --line: rgb(255 255 255 / 0.32);
  --line-strong: rgb(255 255 255 / 0.5); /*  3.1:1 */
  color: var(--ink-body);
  text-align: center;
  isolation: isolate;
}

[data-component="pricing"] [data-slot="final-glow"] {
  position: absolute;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(30% 40% at 20% 30%, rgba(255, 188, 61, 0.28), transparent 70%),
    radial-gradient(30% 40% at 80% 70%, rgba(47, 208, 191, 0.22), transparent 70%);
  animation: pc-drift 14s ease-in-out infinite alternate;
}

[data-component="pricing"] [data-slot="final-title"] {
  max-width: 36rem;
  color: var(--ink);
  font-size: var(--title-section-size);
  font-weight: var(--title-weight);
  line-height: 1.15;
  letter-spacing: var(--title-tracking);
  text-wrap: balance;
}

[data-component="pricing"] [data-slot="final-body"] {
  font-size: var(--pc-fs-lead);
  color: var(--ink-muted);
}

[data-component="pricing"] [data-slot="final"] [data-slot="actions"] {
  justify-content: center;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  [data-component="pricing"] > [data-slot="final"] {
    padding: 3rem 1.25rem;
  }
}

/* --------------------------------------------------------------------- FAQ */

/* The list, its rows and its heading are component/faq.css; only the section's room is here. */
[data-component="pricing"] > [data-slot="faq"] {
  max-width: calc(52rem + 2 * var(--pc-gutter));
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* ---------------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
  [data-component="pricing"] *,
  [data-component="pricing"] *::before {
    animation: none !important;
    transition: none !important;
  }
}
/*
 * The pricing page's code-drawn illustrations. Colours are tokens, so light (the default) and dark
 * both hold; motion lives only in keyframes, so reduced motion shows each scene's finished frame.
 */

:is([data-component="pz-scene"], [data-component="pz-mark"]) {
  --pz-violet: #6d4dff;
  --pz-coral: #ff6a55;
  --pz-teal: #0fb3a3;
  --pz-pink: #f0508f;
  --pz-amber: #f5a40c;
  --pz-green: #1fb45a;
  --pz-sky: #2f8cff;
  --pz-ink: #16256b;
  --pz-ink-soft: #3b4575;
  --pz-surface: #ffffff;
  --pz-surface-2: #f3f4fb;
  --pz-line: #dfe2f1;
  --pz-muted: #cfd4ea;
  --pz-term: #111634;
  --pz-term-text: #5b648f;
  --pz-eye: #16163a;
  --pz-shadow: rgba(22, 37, 107, 0.12);

  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

:root[data-theme="dark"] :is([data-component="pz-scene"], [data-component="pz-mark"]) {
  --pz-violet: #9a80ff;
  --pz-coral: #ff8270;
  --pz-teal: #2fd0bf;
  --pz-pink: #ff6fa7;
  --pz-amber: #ffbc3d;
  --pz-green: #3ad07a;
  --pz-sky: #5aa6ff;
  --pz-ink: #efe8ff;
  --pz-ink-soft: #c2b6df;
  --pz-surface: #1a0f2c;
  --pz-surface-2: #24163a;
  --pz-line: #3a2856;
  --pz-muted: #45336a;
  --pz-term: #0a0412;
  --pz-term-text: #5d4f86;
  --pz-shadow: rgba(0, 0, 0, 0.45);
}

/* ------------------------------------------------------------ Loop machinery */

[data-component="pz-scene"] .pz-a {
  animation-duration: var(--pz-dur, 8s);
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-fill-mode: both;
  transform-box: fill-box;
  transform-origin: center;
}

[data-component="pz-scene"] .pz-origin-l {
  transform-origin: left center;
}
[data-component="pz-scene"] .pz-origin-bl {
  transform-origin: left bottom;
}
[data-component="pz-scene"] .pz-origin-br {
  transform-origin: right bottom;
}
[data-component="pz-scene"] .pz-cursor {
  transform-box: view-box;
  transform-origin: 0 0;
  animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1);
}

[data-component="pz-scene"][data-play="false"] *,
[data-component="pz-mark"][data-play="false"] * {
  animation-play-state: paused !important;
}

/* --------------------------------------------------------------- Colour kit */

.pz-fill-violet { fill: var(--pz-violet); }
.pz-fill-coral { fill: var(--pz-coral); }
.pz-fill-teal { fill: var(--pz-teal); }
.pz-fill-pink { fill: var(--pz-pink); }
.pz-fill-amber { fill: var(--pz-amber); }
.pz-fill-green { fill: var(--pz-green); }
.pz-fill-sky { fill: var(--pz-sky); }

.pz-stroke-violet { stroke: var(--pz-violet); }
.pz-stroke-coral { stroke: var(--pz-coral); }
.pz-stroke-teal { stroke: var(--pz-teal); }
.pz-stroke-pink { stroke: var(--pz-pink); }
.pz-stroke-amber { stroke: var(--pz-amber); }
.pz-stroke-green { stroke: var(--pz-green); }
.pz-stroke-sky { stroke: var(--pz-sky); }

.pz-stop-violet { stop-color: var(--pz-violet); }
.pz-stop-teal { stop-color: var(--pz-teal); }
.pz-stop-pink { stop-color: var(--pz-pink); }
.pz-stop-amber { stop-color: var(--pz-amber); }
.pz-stop-green { stop-color: var(--pz-green); }

/* ------------------------------------------------------------------- Faces */

.pz-face {
  filter: drop-shadow(0 3px 6px var(--pz-shadow));
}
.pz-shine {
  fill: #fff;
  opacity: 0.28;
}
.pz-eye {
  fill: var(--pz-eye);
}
.pz-smile {
  fill: none;
  stroke: var(--pz-eye);
  stroke-linecap: round;
}
.pz-crown {
  fill: var(--pz-amber);
  stroke: var(--pz-surface);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.pz-blink {
  transform-box: fill-box;
  transform-origin: center;
  animation: pz-blink 5.2s infinite;
}
@keyframes pz-blink {
  0%, 94%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.12); }
}

/* ---------------------------------------------------------------- Surfaces */

.pz-window {
  fill: var(--pz-surface);
  stroke: var(--pz-line);
  stroke-width: 1.5;
  filter: drop-shadow(0 18px 30px var(--pz-shadow));
}
.pz-pane { fill: var(--pz-surface-2); }
.pz-card-stroke { stroke: var(--pz-line); stroke-width: 1.5; }
.pz-muted { fill: var(--pz-muted); }
.pz-ink-bar { fill: var(--pz-ink); opacity: 0.78; }
.pz-term { fill: var(--pz-term); }
.pz-term-text { fill: var(--pz-term-text); }
.pz-prompt { stroke: var(--pz-green); }
.pz-caret { fill: var(--pz-violet); }
.pz-input { fill: var(--pz-surface); stroke: var(--pz-line); stroke-width: 1.5; }
.pz-on-accent { fill: #fff; opacity: 0.9; }
.pz-toast { fill: var(--pz-ink); }
.pz-on-toast { fill: var(--pz-surface); opacity: 0.6; }
.pz-summary { fill: var(--pz-surface); stroke: var(--pz-violet); stroke-width: 2; }
.pz-phone { fill: var(--pz-surface); stroke: var(--pz-ink-soft); stroke-width: 2.5; }
.pz-phone-glow { fill: none; stroke: var(--pz-pink); stroke-width: 4; }
.pz-bubble {
  fill: var(--pz-surface);
  stroke: var(--pz-line);
  stroke-width: 1.5;
  filter: drop-shadow(0 4px 8px var(--pz-shadow));
}
.pz-pointer {
  fill: var(--pz-ink);
  stroke: var(--pz-surface);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.pz-check {
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------- Lines */

.pz-orbit {
  fill: none;
  stroke: var(--pz-line);
  stroke-width: 1.5;
  stroke-dasharray: 3 7;
}
.pz-link {
  stroke: var(--pz-line);
  stroke-width: 2;
}
.pz-pulse {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 14 100;
  opacity: 0;
}
.pz-ring {
  fill: none;
  stroke-width: 3;
  opacity: 0;
}
.pz-track {
  stroke: var(--pz-line);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
}
.pz-progress {
  stroke: var(--pz-violet);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
}
.pz-branch {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
}
.pz-pill { stroke-width: 2; }
.pz-pill-sky { fill: color-mix(in srgb, var(--pz-sky) 16%, var(--pz-surface)); stroke: var(--pz-sky); }
.pz-pill-violet { fill: color-mix(in srgb, var(--pz-violet) 16%, var(--pz-surface)); stroke: var(--pz-violet); }
.pz-pill-teal { fill: color-mix(in srgb, var(--pz-teal) 16%, var(--pz-surface)); stroke: var(--pz-teal); }
.pz-pill-amber { fill: color-mix(in srgb, var(--pz-amber) 16%, var(--pz-surface)); stroke: var(--pz-amber); }
.pz-pill-coral { fill: color-mix(in srgb, var(--pz-coral) 16%, var(--pz-surface)); stroke: var(--pz-coral); }
.pz-chosen {
  fill: none;
  stroke: var(--pz-violet);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

/* ------------------------------------------------------------------ Labels */

.pz-label {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  fill: var(--pz-ink-soft);
  text-anchor: middle;
}
.pz-label-strong { fill: var(--pz-ink); font-weight: 700; font-size: 12.5px; }
.pz-label-start { text-anchor: start; }
.pz-label-term { fill: var(--pz-term-text); font-size: 9.5px; letter-spacing: 0.04em; }
.pz-label-toast { fill: var(--pz-surface); font-size: 11px; }
.pz-label-pill { fill: var(--pz-ink); font-size: 11px; }
/* In the scene's ink, not white: the bars rest at a pale tint, where white numbers measured 1.4:1. */
.pz-label-level { fill: var(--pz-ink); font-size: 15px; font-weight: 700; }
.pz-lens { fill: none; stroke: var(--pz-violet); stroke-width: 2.4; stroke-linecap: round; }

/* Parts of a loop that do not belong in the finished frame. The loop's keyframes set their opacity
   while it runs, so this only shows when motion is off. */
[data-component="pz-scene"] .pz-static-hide { opacity: 0; }

/* -------------------------------------------------------------------- Hero */

.pz-ribbon {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  opacity: 0.22;
}
.pz-flow {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1 16;
  animation: pz-flow 2.4s linear infinite;
}
@keyframes pz-flow {
  to { stroke-dashoffset: -34; }
}
.pz-bob {
  animation: pz-bob 3.6s ease-in-out infinite;
}
.pz-bob-slow {
  animation-duration: 4.8s;
}
@keyframes pz-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.pz-twinkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: pz-twinkle 2.8s ease-in-out infinite;
}
.pz-twinkle-late { animation-delay: -1.4s; }
@keyframes pz-twinkle {
  0%, 100% { transform: scale(0.6) rotate(0deg); opacity: 0.5; }
  50% { transform: scale(1.15) rotate(45deg); opacity: 1; }
}

/* ------------------------------------------------------------ Feature marks */

[data-component="pz-mark"] {
  width: 3.5rem;
  height: 3.5rem;
}
.pz-memory-dot {
  animation: pz-memory 1.5s ease-in-out infinite;
}
@keyframes pz-memory {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
.pz-shield { opacity: 0.9; }
.pz-shield-check {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100 100;
  animation: pz-shield 3s ease-in-out infinite;
}
@keyframes pz-shield {
  0% { stroke-dashoffset: 100; }
  35%, 85% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.pz-device {
  animation: pz-device 3s ease-in-out infinite;
}
@keyframes pz-device {
  0%, 100% { transform: translateY(0); }
  15% { transform: translateY(-4px); }
  30% { transform: translateY(0); }
}

/* ---------------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
  :is([data-component="pz-scene"], [data-component="pz-mark"]) * {
    animation: none !important;
  }
}
