/*
 * The call-to-action banner AIBlogWriter places in each post, in six
 * designs (octopi-cta--d1 … d6), each with light that moves:
 *
 *   1 Aurora    light card, two beams of light running across it
 *   2 Orbit     centred, a comet of light circling the border
 *   3 Liquid    filled with the main colour, a slow swirl and drifting light
 *   4 Pulse     a slim strip, a live dot, a light sweeping across
 *   5 Midnight  always dark, the same beams as Aurora at their brightest
 *   6 Journey   the message, then the client's steps on a line a light runs along
 *
 * 1–4 took the place of Soft card, Outline, Bold and Split, the nearest look
 * to each, so posts written before keep a similar banner.
 *
 * Made to sit in any theme: it uses the theme's own font and text colour,
 * sizes in em, works on light and dark pages, and stacks when narrow.
 *
 * Markup: the platform writes the message (platform/lib/cta-html.ts):
 *
 *   <aside class="octopi-cta octopi-cta--dN">
 *     <div class="octopi-cta__body">
 *       <p class="octopi-cta__eyebrow">…</p>   optional
 *       <p class="octopi-cta__heading">…</p>
 *       <p class="octopi-cta__text">…</p>
 *     </div>
 *     <p class="octopi-cta__action"><a class="octopi-cta__button" href="…">…</a></p>
 *     <ol class="octopi-cta__steps"><li><strong>…</strong><span>…</span></li>…</ol>   Journey
 *   </aside>
 *
 * and the plugin adds the layer the light is drawn on as the page is served
 * (class-cta.php add_fx): <span class="octopi-cta__fx"><i></i>×4</span>.
 *
 * Colours are two: a main one and a second one. The plugin prints them as CSS
 * variables (class-cta.php), read from the theme's palette or picked under
 * Settings → Call to action:
 *   --octopi-cta-button        main colour
 *   --octopi-cta-accent        second colour
 *   --octopi-cta-fill          a deeper partner of the main colour its text reads on
 *   --octopi-cta-button-text   text on the main colour
 *   --octopi-cta-bg            background of the light designs, when picked
 *   --octopi-cta-text          text colour, when picked
 *   --octopi-cta-radius, --octopi-cta-button-radius   corner shapes
 *
 * When the plugin could not read the theme's palette (themes and page
 * builders that keep their colours only as CSS variables), the main and
 * second colour fall back to those variables, then to black.
 *
 * Motion only for people who have not asked their device for less of it.
 */
@property --octopi-cta-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.octopi-cta {
  --_btn: var(--octopi-cta-button, var(--e-global-color-primary, var(--global-palette1, var(--ast-global-color-0, var(--theme-palette-color-1, #1a1a1a)))));
  --_btn2: var(--octopi-cta-accent, var(--e-global-color-accent, var(--global-palette2, var(--ast-global-color-1, var(--theme-palette-color-2, var(--_btn))))));
  --_btn-fg: var(--octopi-cta-button-text, #ffffff);
  --_fill2: var(--octopi-cta-fill, var(--_btn));
  --_r: var(--octopi-cta-radius, 18px);
  --_br: var(--octopi-cta-button-radius, 12px);
  /* Without color-mix (old browsers): neutral tints. */
  --_soft: var(--octopi-cta-bg, rgba(127, 127, 127, 0.07));
  --_hair: rgba(127, 127, 127, 0.22);
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  container-type: inline-size;
  clear: both;
  /*
   * Only the space above and below: the width and the side margins are the
   * theme's, so the banner sits in the text column like every paragraph.
   */
  margin-top: 2.4em;
  margin-bottom: 2.4em;
  padding: clamp(1.4em, 6.5%, 3.1em);
  border-radius: var(--_r);
  overflow: hidden;
  color: var(--octopi-cta-text, inherit);
  font: inherit;
  line-height: 1.55;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta {
    --_fill2: var(--octopi-cta-fill, color-mix(in srgb, var(--_btn) 74%, #000));
    --_soft: var(--octopi-cta-bg, color-mix(in srgb, currentColor 3%, transparent));
    --_hair: color-mix(in srgb, currentColor 12%, transparent);
  }
}
.octopi-cta * { box-sizing: border-box; }

/*
 * Pictures in an Octopi post never run wider than its text column, whatever
 * the theme. Posts written before images became image blocks hold plain
 * <img> tags, which block themes leave at their full size.
 */
.octopi-post .wp-block-post-content img,
.octopi-post .entry-content img,
.octopi-post .post-content img {
  max-width: 100%;
  height: auto;
}

.octopi-cta p { margin: 0; }
.octopi-cta .octopi-cta__body,
.octopi-cta .octopi-cta__action,
.octopi-cta .octopi-cta__steps { position: relative; z-index: 2; }

.octopi-cta .octopi-cta__eyebrow {
  margin: 0 0 1em;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.62;
}
.octopi-cta .octopi-cta__heading {
  max-width: 15em;
  margin: 0 0 0.45em;
  color: inherit;
  font-size: 1.6em;
  font-size: clamp(1.35em, 4.4cqi, 2em);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.octopi-cta .octopi-cta__text { max-width: 31em; margin: 0 0 1.6em; opacity: 0.74; }

/* The button: main colour, a sheen that crosses it now and then, an arrow that leans forward. */
.octopi-cta .octopi-cta__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.9em 1.6em;
  border: 0;
  border-radius: var(--_br);
  background: var(--_btn);
  color: var(--_btn-fg) !important;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none !important;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 24px -12px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta .octopi-cta__button { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 28px -14px color-mix(in srgb, var(--_btn) 85%, transparent); }
}
.octopi-cta .octopi-cta__button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.38) 50%, transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
}
.octopi-cta .octopi-cta__button::after { content: "\2192"; transition: transform 0.2s ease; }
.octopi-cta .octopi-cta__button:hover,
.octopi-cta .octopi-cta__button:focus-visible { transform: translateY(-2px); }
.octopi-cta .octopi-cta__button:hover::after,
.octopi-cta .octopi-cta__button:focus-visible::after { transform: translateX(4px); }

/* The layer behind the words that holds the moving light. */
.octopi-cta .octopi-cta__fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.octopi-cta .octopi-cta__fx i { position: absolute; display: none; }

/* ---------------------------------------------------------------
   Light beams (Aurora and Midnight): two curved lines across the
   banner, each with a streak of light running along it while the
   lines sway. The curve is an SVG mask; the light a gradient in the
   client's colours.
   --------------------------------------------------------------- */
.octopi-cta--d1,
.octopi-cta:not([class*="octopi-cta--d"]),
.octopi-cta--d5 {
  --_curve-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' preserveAspectRatio='none'%3E%3Cpath d='M-40 330C220 250 520 110 1040 150' fill='none' stroke='%23000' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --_curve-a-glow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' preserveAspectRatio='none'%3E%3Cfilter id='b' filterUnits='userSpaceOnUse' x='-100' y='-100' width='1200' height='600'%3E%3CfeGaussianBlur stdDeviation='10'/%3E%3C/filter%3E%3Cpath d='M-40 330C220 250 520 110 1040 150' fill='none' stroke='%23000' stroke-width='18' filter='url(%23b)'/%3E%3C/svg%3E");
  --_curve-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' preserveAspectRatio='none'%3E%3Cpath d='M-40 390C320 400 660 250 1040 70' fill='none' stroke='%23000' stroke-width='1.5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --_curve-b-glow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' preserveAspectRatio='none'%3E%3Cfilter id='b' filterUnits='userSpaceOnUse' x='-100' y='-100' width='1200' height='600'%3E%3CfeGaussianBlur stdDeviation='8'/%3E%3C/filter%3E%3Cpath d='M-40 390C320 400 660 250 1040 70' fill='none' stroke='%23000' stroke-width='14' filter='url(%23b)'/%3E%3C/svg%3E");
  --_rail: rgba(127, 127, 127, 0.25);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta--d1,
  .octopi-cta:not([class*="octopi-cta--d"]) { --_rail: color-mix(in srgb, var(--_btn) 32%, transparent); }
}
.octopi-cta--d1 .octopi-cta__fx i,
.octopi-cta:not([class*="octopi-cta--d"]) .octopi-cta__fx i,
.octopi-cta--d5 .octopi-cta__fx i {
  display: block;
  inset: 0;
  -webkit-mask: var(--_m) center / 100% 100% no-repeat;
  mask: var(--_m) center / 100% 100% no-repeat;
  background-image:
    linear-gradient(90deg, transparent 36%, var(--_btn) 45%, #ffffff 50%, var(--_btn2) 55%, transparent 64%),
    linear-gradient(90deg, transparent 2%, var(--_rail) 30% 70%, transparent 98%);
  background-size: 260% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: 100% 0, 0 0;
}
.octopi-cta--d1 .octopi-cta__fx i:nth-child(1),
.octopi-cta:not([class*="octopi-cta--d"]) .octopi-cta__fx i:nth-child(1),
.octopi-cta--d5 .octopi-cta__fx i:nth-child(1) { --_m: var(--_curve-a-glow); opacity: 0.6; }
.octopi-cta--d1 .octopi-cta__fx i:nth-child(2),
.octopi-cta:not([class*="octopi-cta--d"]) .octopi-cta__fx i:nth-child(2),
.octopi-cta--d5 .octopi-cta__fx i:nth-child(2) { --_m: var(--_curve-a); }
.octopi-cta--d1 .octopi-cta__fx i:nth-child(3),
.octopi-cta:not([class*="octopi-cta--d"]) .octopi-cta__fx i:nth-child(3),
.octopi-cta--d5 .octopi-cta__fx i:nth-child(3) { --_m: var(--_curve-b-glow); opacity: 0.45; }
.octopi-cta--d1 .octopi-cta__fx i:nth-child(4),
.octopi-cta:not([class*="octopi-cta--d"]) .octopi-cta__fx i:nth-child(4),
.octopi-cta--d5 .octopi-cta__fx i:nth-child(4) { --_m: var(--_curve-b); opacity: 0.85; }

/* A soft light where the beams meet, breathing slowly. */
.octopi-cta--d1 .octopi-cta__fx::after,
.octopi-cta:not([class*="octopi-cta--d"]) .octopi-cta__fx::after,
.octopi-cta--d5 .octopi-cta__fx::after {
  content: "";
  position: absolute;
  top: 8%;
  right: 4%;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--_btn), transparent 66%);
  opacity: 0.35;
  filter: blur(6px);
}

/* 1 · Aurora: light and airy, the page's own colours with a tint of the client's. */
.octopi-cta--d1,
.octopi-cta:not([class*="octopi-cta--d"]) {
  background: var(--_soft);
  box-shadow: inset 0 0 0 1px var(--_hair);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta--d1,
  .octopi-cta:not([class*="octopi-cta--d"]) {
    background:
      radial-gradient(70% 90% at 100% 40%, color-mix(in srgb, var(--_btn) 13%, transparent), transparent 70%),
      radial-gradient(55% 80% at 0% 0%, color-mix(in srgb, var(--_btn2) 12%, transparent), transparent 70%),
      var(--_soft);
  }
}

/* 5 · Midnight: always dark, whatever the site, so the light reads at its brightest. */
.octopi-cta--d5 {
  --_rail: rgba(255, 255, 255, 0.16);
  color: #f3f4f7;
  background: #10141d;
  background: linear-gradient(160deg, #171c27, #0a0d14);
  box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.55);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta--d5 {
    background:
      radial-gradient(55% 85% at 88% 40%, color-mix(in srgb, var(--_btn) 30%, transparent), transparent 70%),
      radial-gradient(50% 70% at 0% 100%, color-mix(in srgb, var(--_btn2) 20%, transparent), transparent 70%),
      linear-gradient(160deg, #171c27, #0a0d14);
  }
}
.octopi-cta--d5 .octopi-cta__text { opacity: 0.7; }
.octopi-cta--d5 .octopi-cta__button {
  background: #ffffff;
  color: #0b0f17 !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 14px 34px -12px rgba(0, 0, 0, 0.6);
}

/* ---------------------------------------------------------------
   2 · Orbit: centred, a comet of light circling the border, a faint
   dotted field fading out from the middle.
   --------------------------------------------------------------- */
.octopi-cta--d2 {
  text-align: center;
  padding-top: clamp(2em, 8%, 3.8em);
  padding-bottom: clamp(2em, 8%, 3.8em);
  background: var(--_soft);
  box-shadow: inset 0 0 0 1px var(--_hair);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta--d2 { background: radial-gradient(60% 75% at 50% 0%, color-mix(in srgb, var(--_btn) 14%, transparent), transparent 72%), var(--_soft); }
}
.octopi-cta--d2 .octopi-cta__heading,
.octopi-cta--d2 .octopi-cta__text { margin-left: auto; margin-right: auto; }
.octopi-cta--d2 .octopi-cta__eyebrow { color: var(--_btn); opacity: 1; }
/* The comet: a conic gradient, cut to a thin ring. */
.octopi-cta--d2::before,
.octopi-cta--d2 .octopi-cta__fx i:nth-child(1) {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--octopi-cta-angle), transparent 0deg 240deg, var(--_btn2) 300deg, var(--_btn) 342deg, #ffffff 354deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 3;
}
/* Its glow: the same ring, thicker, blurred by the layer around it. */
.octopi-cta--d2 .octopi-cta__fx { filter: blur(12px); opacity: 0.75; }
.octopi-cta--d2 .octopi-cta__fx i:nth-child(1) { display: block; padding: 7px; z-index: 0; }
.octopi-cta--d2::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(currentColor 1px, transparent 1.4px);
  background-size: 18px 18px;
  opacity: 0.1;
  -webkit-mask: radial-gradient(70% 80% at 50% 45%, #000, transparent 75%);
  mask: radial-gradient(70% 80% at 50% 45%, #000, transparent 75%);
  pointer-events: none;
}

/* ---------------------------------------------------------------
   3 · Liquid: the main colour, filled. A gradient flows across it, a
   swirl of the client's colours turns slowly underneath, soft light
   drifts, and a fine grain sits on top.
   --------------------------------------------------------------- */
.octopi-cta--d3 {
  background-color: var(--_btn);
  background-image: linear-gradient(120deg, var(--_btn), var(--_fill2), var(--_btn2), var(--_btn), var(--_fill2), var(--_btn));
  background-size: 300% 300%;
  background-position: 0% 50%;
  color: var(--_btn-fg);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.45);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta--d3 {
    background-image: linear-gradient(120deg, var(--_btn), var(--_fill2), color-mix(in srgb, var(--_btn2) 55%, var(--_btn)), var(--_btn), var(--_fill2), var(--_btn));
    box-shadow: 0 30px 60px -34px color-mix(in srgb, var(--_btn) 90%, transparent);
  }
}
.octopi-cta--d3 .octopi-cta__eyebrow { opacity: 0.8; }
.octopi-cta--d3 .octopi-cta__text { opacity: 0.88; }
.octopi-cta--d3 .octopi-cta__heading { font-size: clamp(1.45em, 5cqi, 2.2em); }
.octopi-cta--d3 .octopi-cta__button {
  background: var(--_btn-fg);
  color: var(--_btn) !important;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45);
}
.octopi-cta--d3 .octopi-cta__fx::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180%;
  aspect-ratio: 1;
  background: conic-gradient(var(--_btn), var(--_fill2), var(--_btn2), var(--_btn), var(--_fill2), var(--_btn));
  opacity: 0.8;
  filter: blur(28px);
  transform: translate(-50%, -50%);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta--d3 .octopi-cta__fx::before {
    opacity: 1;
    background: conic-gradient(
      var(--_btn),
      var(--_fill2),
      color-mix(in srgb, var(--_btn2) 65%, var(--_btn)),
      color-mix(in srgb, var(--_btn) 82%, #ffffff),
      var(--_fill2),
      color-mix(in srgb, var(--_btn2) 50%, var(--_fill2)),
      var(--_btn)
    );
  }
}
.octopi-cta--d3 .octopi-cta__fx i:nth-child(-n+3) {
  display: block;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(46px);
}
.octopi-cta--d3 .octopi-cta__fx i:nth-child(1) { top: -45%; left: -14%; background: var(--_fill2); opacity: 0.55; }
.octopi-cta--d3 .octopi-cta__fx i:nth-child(2) { bottom: -55%; right: -12%; background: var(--_btn2); opacity: 0.7; }
.octopi-cta--d3 .octopi-cta__fx i:nth-child(3) { top: 5%; right: 22%; width: 34%; background: #ffffff; opacity: 0.22; }
.octopi-cta--d3 .octopi-cta__fx::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.18;
  mix-blend-mode: overlay;
}

/* ---------------------------------------------------------------
   4 · Pulse: a slim strip for mid-post. A live dot, one line, the
   button on the right, and a light that sweeps across now and then.
   --------------------------------------------------------------- */
.octopi-cta--d4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1em 1.6em;
  padding: 1.25em 1.5em;
  background: var(--_soft);
  box-shadow: inset 0 0 0 1px var(--_hair);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta--d4 {
    background: var(--octopi-cta-bg, color-mix(in srgb, var(--_btn) 7%, transparent));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--_btn) 24%, transparent);
  }
}
.octopi-cta--d4 .octopi-cta__body { flex: 1 1 17em; min-width: 0; }
.octopi-cta--d4 .octopi-cta__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin-bottom: 0.6em;
  color: var(--_btn);
  opacity: 1;
}
.octopi-cta--d4 .octopi-cta__eyebrow::before {
  content: "";
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: currentColor;
}
.octopi-cta--d4 .octopi-cta__heading { max-width: none; margin-bottom: 0.25em; font-size: 1.22em; }
.octopi-cta--d4 .octopi-cta__text { margin: 0; font-size: 0.95em; }
.octopi-cta--d4 .octopi-cta__fx i:nth-child(1) {
  display: block;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(127, 127, 127, 0.12) 50%, transparent 60%) no-repeat;
  background-size: 260% 100%;
  background-position: 100% 0;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta--d4 .octopi-cta__fx i:nth-child(1) {
    background-image: linear-gradient(105deg, transparent 40%, color-mix(in srgb, var(--_btn) 16%, transparent) 50%, transparent 60%);
  }
}

/* ---------------------------------------------------------------
   6 · Journey: message and button side by side, then the client's
   steps on a line. A light runs along the line and wakes each step.
   --------------------------------------------------------------- */
.octopi-cta--d6 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4em 2em;
  background: var(--_soft);
  box-shadow: inset 0 0 0 1px var(--_hair);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta--d6 {
    background:
      radial-gradient(45% 60% at 100% 100%, color-mix(in srgb, var(--_btn) 15%, transparent), transparent 70%),
      linear-gradient(160deg, color-mix(in srgb, var(--_btn2) 7%, transparent), transparent),
      var(--_soft);
  }
}
.octopi-cta--d6 .octopi-cta__body { flex: 1 1 19em; min-width: 0; }
.octopi-cta--d6 .octopi-cta__text { margin-bottom: 0; }
.octopi-cta--d6 .octopi-cta__action { flex: 0 0 auto; }
.octopi-cta--d6 .octopi-cta__button { padding: 0.5em 0.5em 0.5em 1.4em; gap: 0.9em; }
.octopi-cta--d6 .octopi-cta__button::after {
  display: grid;
  place-items: center;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: var(--_btn-fg);
  color: var(--_btn);
}
.octopi-cta .octopi-cta__steps {
  position: relative;
  flex: 1 1 100%;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 0.6em 0 0;
  padding: 0;
  list-style: none;
  counter-reset: octopi-step;
}
.octopi-cta .octopi-cta__steps li {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.15em;
  margin: 0;
  padding: 0 0.4em;
  list-style: none;
  text-align: center;
  font-size: 0.9em;
  line-height: 1.35;
}
.octopi-cta .octopi-cta__steps li::before {
  counter-increment: octopi-step;
  content: counter(octopi-step);
  display: grid;
  place-items: center;
  width: 2.7em;
  height: 2.7em;
  margin-bottom: 0.65em;
  border-radius: min(var(--_r), 0.85em);
  background: var(--_soft);
  box-shadow: inset 0 0 0 1px var(--_hair);
  color: var(--_btn);
  font-weight: 700;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .octopi-cta .octopi-cta__steps li::before {
    background: color-mix(in srgb, var(--_btn) 9%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--_btn) 28%, transparent);
  }
}
/* The line between one step and the next. */
.octopi-cta .octopi-cta__steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.35em;
  left: calc(50% + 1.75em);
  width: calc(100% - 3.5em);
  height: 1px;
  background: var(--_hair);
}
.octopi-cta .octopi-cta__steps strong { font-weight: 650; }
.octopi-cta .octopi-cta__steps span { opacity: 0.6; font-size: 0.92em; }
/* The light that travels along the line. */
.octopi-cta .octopi-cta__steps::after {
  content: "";
  position: absolute;
  top: calc(1.35em * 0.9 - 1px);
  left: 3.5%;
  width: 18%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--_btn), #ffffff, var(--_btn), transparent);
  box-shadow: 0 0 14px 2px var(--_btn);
  opacity: 0;
  z-index: -1;
}

/* ---------- Narrow banners (phones, narrow columns) ---------- */
@container (max-width: 520px) {
  .octopi-cta .octopi-cta__action { width: 100%; }
  .octopi-cta .octopi-cta__button { width: 100%; justify-content: center; }
  .octopi-cta--d6 .octopi-cta__button { justify-content: space-between; }
  .octopi-cta .octopi-cta__steps { grid-auto-flow: row; gap: 0; }
  .octopi-cta .octopi-cta__steps li {
    grid-template-columns: auto 1fr;
    justify-items: start;
    column-gap: 0.9em;
    padding: 0 0 1em;
    text-align: left;
  }
  .octopi-cta .octopi-cta__steps li::before { grid-row: span 2; margin: 0; }
  .octopi-cta .octopi-cta__steps li:not(:last-child)::after {
    top: 2.95em;
    left: 1.35em;
    width: 1px;
    height: calc(100% - 3.2em);
  }
  .octopi-cta .octopi-cta__steps::after { display: none; }
  .octopi-cta .octopi-cta__fx::after { width: 60%; }
}

/* ---------- Motion ---------- */
@keyframes octopi-cta-beam { from { background-position: 100% 0, 0 0; } to { background-position: 0% 0, 0 0; } }
@keyframes octopi-cta-sway-a {
  0% { transform: translateY(4%) scaleY(0.9) rotate(-1deg); }
  100% { transform: translateY(-7%) scaleY(1.14) rotate(1.2deg); }
}
@keyframes octopi-cta-sway-b {
  0% { transform: translateY(-5%) scaleY(1.1) rotate(1deg); }
  100% { transform: translateY(6%) scaleY(0.88) rotate(-1.5deg); }
}
@keyframes octopi-cta-breathe { 0%, 100% { opacity: 0.22; transform: scale(0.92); } 50% { opacity: 0.42; transform: scale(1.06); } }
@keyframes octopi-cta-sheen { 0%, 72% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@keyframes octopi-cta-spin { to { --octopi-cta-angle: 360deg; } }
@keyframes octopi-cta-swirl {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes octopi-cta-flow {
  0% { background-position: 0% 30%; }
  50% { background-position: 60% 70%; }
  100% { background-position: 100% 40%; }
}
@keyframes octopi-cta-drift-1 { to { transform: translate(38%, 30%) scale(1.15); } }
@keyframes octopi-cta-drift-2 { to { transform: translate(-30%, -26%) scale(0.9); } }
@keyframes octopi-cta-drift-3 { to { transform: translate(-60%, 40%) scale(1.3); } }
@keyframes octopi-cta-sweep { 0%, 55% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
@keyframes octopi-cta-ping { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 0.75em transparent; } }
@keyframes octopi-cta-travel {
  0% { left: 3.5%; opacity: 0; }
  6% { opacity: 1; }
  74% { opacity: 1; }
  80%, 100% { left: 78.5%; opacity: 0; }
}
@keyframes octopi-cta-lit {
  0%, 26%, 100% { transform: none; filter: none; }
  5%, 16% { background: var(--_btn); color: var(--_btn-fg); transform: translateY(-3px); box-shadow: 0 10px 22px -8px var(--_btn); }
}
@keyframes octopi-cta-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .octopi-cta .octopi-cta__button::before { animation: octopi-cta-sheen 5.5s ease-in-out infinite; }

  /* Aurora and Midnight: the light runs along each beam, and the beams sway, each at its own pace. */
  .octopi-cta--d1 .octopi-cta__fx i:nth-child(-n+2),
  .octopi-cta:not([class*="octopi-cta--d"]) .octopi-cta__fx i:nth-child(-n+2),
  .octopi-cta--d5 .octopi-cta__fx i:nth-child(-n+2) {
    animation: octopi-cta-beam 6.5s cubic-bezier(.45, 0, .3, 1) infinite, octopi-cta-sway-a 7s ease-in-out infinite alternate;
  }
  .octopi-cta--d1 .octopi-cta__fx i:nth-child(n+3),
  .octopi-cta:not([class*="octopi-cta--d"]) .octopi-cta__fx i:nth-child(n+3),
  .octopi-cta--d5 .octopi-cta__fx i:nth-child(n+3) {
    animation: octopi-cta-beam 8.5s cubic-bezier(.45, 0, .3, 1) -3.5s infinite, octopi-cta-sway-b 9s ease-in-out -2s infinite alternate;
  }
  .octopi-cta--d1 .octopi-cta__fx::after,
  .octopi-cta:not([class*="octopi-cta--d"]) .octopi-cta__fx::after,
  .octopi-cta--d5 .octopi-cta__fx::after { animation: octopi-cta-breathe 6s ease-in-out infinite; }

  .octopi-cta--d2::before,
  .octopi-cta--d2 .octopi-cta__fx i:nth-child(1) { animation: octopi-cta-spin 6s linear infinite; }

  .octopi-cta--d3 { animation: octopi-cta-flow 7s ease-in-out infinite alternate; }
  .octopi-cta--d3 .octopi-cta__fx::before { animation: octopi-cta-swirl 14s linear infinite; }
  .octopi-cta--d3 .octopi-cta__fx i:nth-child(1) { animation: octopi-cta-drift-1 13s ease-in-out infinite alternate; }
  .octopi-cta--d3 .octopi-cta__fx i:nth-child(2) { animation: octopi-cta-drift-2 16s ease-in-out infinite alternate; }
  .octopi-cta--d3 .octopi-cta__fx i:nth-child(3) { animation: octopi-cta-drift-3 11s ease-in-out infinite alternate; }

  .octopi-cta--d4 .octopi-cta__eyebrow::before { animation: octopi-cta-ping 1.8s ease-out infinite; }
  .octopi-cta--d4 .octopi-cta__fx i:nth-child(1) { animation: octopi-cta-sweep 6s ease-in-out infinite; }

  .octopi-cta--d6 .octopi-cta__steps::after { animation: octopi-cta-travel 5s linear infinite; }
  .octopi-cta--d6 .octopi-cta__steps li::before { animation: octopi-cta-lit 5s ease-in-out infinite; }
  .octopi-cta--d6 .octopi-cta__steps li:nth-child(1)::before { animation-delay: -0.15s; }
  .octopi-cta--d6 .octopi-cta__steps li:nth-child(2)::before { animation-delay: 1.18s; }
  .octopi-cta--d6 .octopi-cta__steps li:nth-child(3)::before { animation-delay: 2.52s; }
  .octopi-cta--d6 .octopi-cta__steps li:nth-child(4)::before { animation-delay: 3.85s; }

  /* The words rise into place as the banner is scrolled to, where the browser can tie that to scrolling. */
  @supports (animation-timeline: view()) {
    .octopi-cta .octopi-cta__body,
    .octopi-cta .octopi-cta__action {
      animation: octopi-cta-rise linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 60%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .octopi-cta .octopi-cta__button,
  .octopi-cta .octopi-cta__button::after { transition: none; }
}

/* Never wider than its column, without beating the theme's own width (no weight of its own). */
:where(.octopi-cta) { max-width: 100%; }

/*
 * Tables in posts (Table blocks, class-publisher.php). WordPress styles them
 * itself, but some themes and page builders turn its block styles off, and
 * the table then reads as loose text. A plain fallback: lines and spacing in
 * the theme's own colours. :where() gives it no weight, so any table design
 * the theme has wins.
 */
:where(.wp-block-table) { overflow-x: auto; margin: 1.5em 0; }
:where(.wp-block-table) table { width: 100%; border-collapse: collapse; }
:where(.wp-block-table) :is(th, td) { border: 1px solid color-mix(in srgb, currentColor 22%, transparent); padding: 0.5em 0.75em; text-align: left; vertical-align: top; }
:where(.wp-block-table) thead th { border-bottom-width: 2px; font-weight: 600; }
