/* Care after launch, on the pricing page (src/partials/pricing.html, band "pricing-care"; loaded right after
   pricing.css). Three plan cards: Care, Care + backend, Scale (.pricing-grid--plans > .pricing-plan). A card holds
   four things only: a live picture on top (scripts/pricing-visuals-care.mjs, the .cv-* parts), the plan's name
   with its signal-strength mark, the fit line under it, and the monthly price at the card's foot.

   The pictures. One wordless idea each, drawn like an icon in a quiet monitor pane:
   - Care: a small website, with a padlock in its address field and a shield with a check over its corner; a scan
     line passes down the page and the status light in the window's bar confirms it.
   - Care + backend: the website wired to a server stack and on to a database; packets run along the wires, a
     backup arrow turns around the database and lifts a copy off it, and a moon says the backups run at night.
   - Scale: a growth curve over a soft grid, and a row of three server nodes that appear one by one as the curve
     climbs past them, each with its load bar.

   Everything for this section is here, from scratch: pricing.css styles the shared card class names only under the
   product cards, and keeps the centred section head (.pricing-head) and the panel's container (pricing-panel).

   Layout. One column (at most 36rem, centred) until the panel's content is 760px wide, then the three plans in one
   row. In the row, the cards share three row lines (subgrid: picture, head, price), so the parts line up across
   the three and every price stands at its card's foot, on one level. The plans read as a progression from left to
   right: a signal-strength mark beside each name fills one bar per tier, each picture is a step busier than the
   one before, and Scale stands apart on a faintly tinted surface with an accent edge.

   Motion, in layers that add up (all of it is CSS; the numbers come from site.js and pricing.js):
   - Arrival: as the grid comes up the screen (--enter, site.js), the cards rise out of a backward tilt one after
     the other (:nth-child), and each picture assembles: the website rises and the shield settles onto it as its
     check draws in; the wires draw, the servers drop into their rack and the backup arrow turns into place; the
     growth curve draws from left to right and each node appears as the curve passes over it.
   - Depth: the three cards sit at different depths and drift by different amounts while the section scrolls past
     (--center); inside each picture the layers shift by their depth (--d) with the scroll and with the pointer.
   - Pointer: under a mouse or pen (--px, --py, --gx, --gy and .is-pointed from pricing.js) a card tilts toward the
     pointer and a soft sheen follows it; on hover it lifts.
   - Life: only while the grid is live (.is-live, pricing.js): the scan sweeps the page, then the shield and the
     status light confirm it; packets run along the wires, LEDs blink, the backup arrow turns and lifts a copy off
     the database, the stars twinkle; a runner climbs the curve, each node pulses as it passes and the curve's
     head pings when it arrives.
   Every plain style is the FINISHED, still state: without JavaScript, with reduced motion, or once the grid is in
   view, every card is in place and every picture shows in full (every motion number has a resting fallback). Only
   transform, opacity and stroke-dashoffset move (plus the hover lift, a transitioned length). */

/* ------------------------------------------------------------------ tokens */

@property --cp-lift { syntax: '<length>'; inherits: false; initial-value: 0px; }

.pricing-care {
  --cv-screen: color-mix(in srgb, var(--surface) 78%, transparent);
  --cv-unit: var(--surface);
  --cv-field: #eef3f6;
  --cv-dot: rgb(36 93 118 / 0.13);
  --cv-grid: rgb(36 93 118 / 0.09);
  --cv-track: rgb(40 44 51 / 0.14);
  --cv-line: rgb(59 125 154 / 0.7);
  --cv-pulse: #245d76;
  --cv-glow: rgb(127 191 221 / 0.5);
  --cv-halo: rgb(167 216 239 / 0.55);
  --cv-skel: rgb(40 44 51 / 0.12);
  --cv-ink: rgb(40 44 51 / 0.3);
  --cv-scan: rgb(127 191 221 / 0.3);
  --cv-area: rgb(127 191 221 / 0.34);
  --cv-shield: #245d76;
  --cv-shield-ink: #ffffff;
  --cv-facet: rgb(255 255 255 / 0.14);
  --cv-moon: #7fbfdd;
  --cv-shadow: 0 1px 2px rgb(24 27 32 / 0.06), 0 0.8em 1.6em -0.9em rgb(24 27 32 / 0.3);
  --cv-drop: drop-shadow(0 0.35em 0.5em rgb(24 27 32 / 0.22));
  --cp-sheen: rgb(255 255 255 / 0.5);
  --cp-edge-glow: rgb(36 93 118 / 0.24);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .pricing-care {
    --cv-screen: color-mix(in srgb, var(--surface-2) 72%, transparent); --cv-unit: #262a31; --cv-field: #30353d;
    --cv-dot: rgb(167 216 239 / 0.12); --cv-grid: rgb(167 216 239 / 0.08); --cv-track: rgb(241 245 249 / 0.14); --cv-line: rgb(167 216 239 / 0.7);
    --cv-pulse: #e5f3f9; --cv-glow: rgb(167 216 239 / 0.45); --cv-halo: rgb(59 125 154 / 0.42);
    --cv-skel: rgb(241 245 249 / 0.14); --cv-ink: rgb(241 245 249 / 0.32); --cv-scan: rgb(167 216 239 / 0.18); --cv-area: rgb(127 191 221 / 0.2);
    --cv-shield: #a7d8ef; --cv-shield-ink: #14212a; --cv-facet: rgb(255 255 255 / 0.22); --cv-moon: #dceef7;
    --cv-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 0.8em 1.6em -0.9em rgb(0 0 0 / 0.7); --cv-drop: drop-shadow(0 0.35em 0.5em rgb(0 0 0 / 0.5));
    --cp-sheen: rgb(167 216 239 / 0.05); --cp-edge-glow: rgb(59 125 154 / 0.36);
  }
}
:root[data-theme='dark'] .pricing-care {
  --cv-screen: color-mix(in srgb, var(--surface-2) 72%, transparent); --cv-unit: #262a31; --cv-field: #30353d;
  --cv-dot: rgb(167 216 239 / 0.12); --cv-grid: rgb(167 216 239 / 0.08); --cv-track: rgb(241 245 249 / 0.14); --cv-line: rgb(167 216 239 / 0.7);
  --cv-pulse: #e5f3f9; --cv-glow: rgb(167 216 239 / 0.45); --cv-halo: rgb(59 125 154 / 0.42);
  --cv-skel: rgb(241 245 249 / 0.14); --cv-ink: rgb(241 245 249 / 0.32); --cv-scan: rgb(167 216 239 / 0.18); --cv-area: rgb(127 191 221 / 0.2);
  --cv-shield: #a7d8ef; --cv-shield-ink: #14212a; --cv-facet: rgb(255 255 255 / 0.22); --cv-moon: #dceef7;
  --cv-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 0.8em 1.6em -0.9em rgb(0 0 0 / 0.7); --cv-drop: drop-shadow(0 0.35em 0.5em rgb(0 0 0 / 0.5));
  --cp-sheen: rgb(167 216 239 / 0.05); --cp-edge-glow: rgb(59 125 154 / 0.36);
}

/* -------------------------------------------------------------------- grid */

.pricing-grid--plans {
  /* The thin rim between a card's edge and its picture. */
  --care-bezel: 7px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap);
  max-width: 36rem; margin: 0 auto; padding: 0; list-style: none;
}

/* The row: three columns, every card on the same three row lines (picture, head, price). */
@container pricing-panel (min-width: 760px) {
  .pricing-grid--plans { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 0; max-width: none; }
  .pricing-plan { grid-row: 1 / span 3; grid-template-rows: subgrid; }
  .pricing-plan:nth-child(1) { grid-column: 1; }
  .pricing-plan:nth-child(2) { grid-column: 2; }
  .pricing-plan:nth-child(3) { grid-column: 3; }
}

/* -------------------------------------------------------------------- card */

.pricing-plan {
  /* The card's text stands --cp-x in from the bezel, so the picture runs nearly edge to edge above it. */
  --cp-pad: clamp(20px, 2vw, 28px);
  --cp-x: calc(var(--cp-pad) - var(--care-bezel, 7px));
  /* Arrival: where on --enter this card starts rising (staggered below), how far in it is (0..1), and the eased
     remainder (--cp-glide, 1 far below, 0 in place) that every arrival offset is multiplied by; --cp-draw (0..1)
     follows a little later and draws the picture's lines in. */
  --cp-from: 0.04;
  --cp-in: clamp(0, calc((var(--enter, 1) - var(--cp-from)) / 0.32), 1);
  --cp-glide: calc((1 - var(--cp-in)) * (1 - var(--cp-in)));
  --cp-draw: clamp(0, calc((var(--enter, 1) - var(--cp-from) - 0.1) / 0.36), 1);
  /* Depth: how far the card drifts with the scroll. */
  --cp-depth: 0.5;
  /* The signal mark beside the name: one bar per tier. */
  --cp-pip-1: var(--accent);
  --cp-pip-2: var(--line-strong);
  --cp-pip-3: var(--line-strong);

  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; row-gap: 0;
  min-width: 0; padding: var(--care-bezel, 7px) var(--care-bezel, 7px) 0;
  border: 1px solid var(--card-border); border-radius: var(--r-l);
  background: var(--card-bg); box-shadow: var(--card-shadow);
  color: var(--text);
  translate: 0 calc(var(--cp-glide, 0) * 64px + var(--center, 0) * var(--cp-depth, 1) * 10px - var(--cp-lift, 0px));
  transform:
    perspective(1100px)
    rotateX(calc(var(--cp-glide, 0) * 16deg - var(--py, 0) * 3deg))
    rotateY(calc(var(--px, 0) * 4deg));
  scale: calc(1 - var(--cp-glide, 0) * 0.06);
  transition: --cp-lift 480ms var(--ease);
}
.pricing-plan:nth-child(2) { --cp-from: 0.11; --cp-depth: 0.9; }
.pricing-plan:nth-child(3) { --cp-from: 0.18; --cp-depth: 1.3; }

.pricing-plan--full { --cp-pip-2: var(--accent); }
.pricing-plan--scale { --cp-pip-2: var(--accent); --cp-pip-3: var(--accent); }

/* Scale stands apart: a faint accent wash over the card, an accent strip along its top, an accent edge and a
   deeper glow beneath. The wash is 4 %, so text keeps its contrast in both themes. */
.pricing-plan--scale {
  border-color: var(--accent-line);
  background:
    linear-gradient(90deg, transparent 10%, var(--accent) 50%, transparent 90%) center top / 100% 2px no-repeat padding-box,
    linear-gradient(color-mix(in srgb, var(--accent) 4%, transparent), color-mix(in srgb, var(--accent) 4%, transparent)),
    var(--card-bg);
  box-shadow: var(--card-shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent), 0 34px 64px -38px var(--cp-edge-glow);
}

/* The sheen under the pointer (above the card's fill, below its content). */
.pricing-plan::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(26rem circle at var(--gx, 50%) var(--gy, 0%), var(--cp-sheen), transparent 62%);
  opacity: 0; transition: opacity 420ms var(--ease);
}
.pricing-plan.is-pointed::before { opacity: 1; }
/* The lift: an accent edge and a deeper shadow fade in. */
.pricing-plan::after {
  content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--accent-line), var(--shadow-l);
  opacity: 0; transition: opacity 420ms var(--ease);
}
@media (hover: hover) {
  .pricing-plan:hover { --cp-lift: 6px; }
  .pricing-plan:hover::after { opacity: 1; }
}

/* Every part under the picture keeps the card's text edges; the last one (the price) keeps the card's padding
   below it. */
.pricing-plan > :not(.pricing-plan__visual) { min-width: 0; margin-inline: var(--cp-x, 16px); }
.pricing-plan > :last-child { margin-bottom: var(--cp-pad, 20px); }
@media (max-width: 599px) { .pricing-plan { border-radius: var(--r-m); } }

/* ------------------------------------------------------------------ text */

/* Name and fit, with the tier's signal mark at the name's right, its bars standing on the name's first baseline. */
.pricing-plan .pricing-card__head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-self: start; align-content: start;
  margin-top: clamp(20px, 1.8vw, 24px);
}
.pricing-plan .pricing-card__name {
  grid-column: 1; grid-row: 1; align-self: baseline;
  font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem); font-weight: 650; line-height: 1.25; letter-spacing: -0.02em;
  color: var(--text); text-wrap: balance; overflow-wrap: break-word; hyphens: auto;
}
.pricing-plan .pricing-card__head::after {
  content: ''; grid-column: 2; grid-row: 1; align-self: baseline; width: 22px; height: 12px;
  background:
    linear-gradient(var(--cp-pip-1, var(--accent)) 0 0) 0 100% / 4px 6px no-repeat,
    linear-gradient(var(--cp-pip-2, var(--line-strong)) 0 0) 9px 100% / 4px 9px no-repeat,
    linear-gradient(var(--cp-pip-3, var(--line-strong)) 0 0) 18px 100% / 4px 12px no-repeat;
}
.pricing-plan .pricing-card__line {
  grid-column: 1 / -1; max-width: 40ch; margin-top: 6px;
  font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); text-wrap: pretty; overflow-wrap: break-word; hyphens: auto;
}

/* The monthly price, the last thing in the card: under a hairline that closes the description, the amount large
   and "/ month" quiet on the same baseline. In the row the price row is shared, so the hairlines and the amounts
   of the three cards stand on one level. */
.pricing-plan .pricing-price {
  display: flex; flex-wrap: wrap; align-items: baseline; align-self: start; gap: 2px 8px;
  margin-top: clamp(20px, 2vw, 26px); padding: clamp(16px, 1.6vw, 20px) 0 0;
  border: 0; border-top: 1px solid var(--line);
}
.pricing-plan .pricing-price__amount {
  font-size: clamp(2.25rem, 1.95rem + 0.9vw, 2.75rem); font-weight: 660; line-height: 1.05; letter-spacing: -0.035em;
  color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.pricing-plan .pricing-price__unit { font-size: 0.9375rem; font-weight: 500; line-height: 1.4; color: var(--text-2); }

/* ----------------------------------------------------------------- monitor */
/* The monitor pane: a screen inset by the bezel, with a dotted field (a soft grid for Scale). The scene inside is
   drawn in em on a 30 x 14 em box whose em is a thirtieth of the pane's width (at most 12px, so a wide one-column
   card keeps a modest picture, centred), so the whole picture scales as one. */

.pricing-plan__visual {
  container-type: inline-size;
  position: relative; overflow: hidden; isolation: isolate; min-width: 0;
  border-radius: calc(var(--r-l) - var(--care-bezel, 7px));
  background: var(--cv-screen);
  box-shadow: inset 0 0 0 1px var(--line);
}
@media (max-width: 599px) { .pricing-plan__visual { border-radius: calc(var(--r-m) - var(--care-bezel, 7px)); } }
.pricing-plan--full .pricing-plan__visual { background: color-mix(in srgb, var(--accent) 4%, var(--cv-screen)); }
.pricing-plan--scale .pricing-plan__visual {
  background: color-mix(in srgb, var(--accent) 10%, var(--cv-screen));
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.cv {
  position: relative;
  font-size: 8px; font-size: min(calc(100cqi / 30), 12px);
  width: 30em; height: 14em; margin-inline: auto;
  pointer-events: none;
}
/* A soft light behind the scene, shifted a little further than the nearest layer. */
.cv::before {
  content: ''; position: absolute; inset: 8% 14%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--cv-halo), transparent);
  --cv-halo-o: 0.7;
  opacity: var(--cv-halo-o, 0.7);
  translate: calc(var(--px, 0) * 1.4em) calc(var(--py, 0) * 0.9em);
}
.cv--full::before { --cv-halo-o: 0.85; }
.cv--scale::before { --cv-halo-o: 1; inset: 4% 8%; }

/* A depth layer: the whole scene box, shifted by its depth with the pointer and, around the middle layer
   (--d 1), with the scroll. */
.cv-layer {
  position: absolute; inset: 0;
  translate:
    calc(var(--px, 0) * var(--d, 1) * 0.5em)
    calc(var(--py, 0) * var(--d, 1) * 0.35em + var(--center, 0) * (var(--d, 1) - 1) * 0.6em);
}

/* The dotted field (Care, Care + backend) and the soft grid (Scale): wider and taller than the pane, so their
   shifts never show an edge. The grid fades out at its top and foot. */
.cv-dots, .cv-grid {
  position: absolute; top: -2em; bottom: -2em; left: calc(15em - 50cqi - 2em); right: calc(15em - 50cqi - 2em);
}
.cv-dots { background: radial-gradient(var(--cv-dot) 1px, transparent 1.4px) center / 1.2em 1.2em; }
.cv-grid {
  background:
    linear-gradient(90deg, var(--cv-grid) 1px, transparent 1px) center / 2em 2em,
    linear-gradient(var(--cv-grid) 1px, transparent 1px) center / 2em 2em;
  -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 55%, transparent 90%);
  mask-image: linear-gradient(transparent, #000 25%, #000 55%, transparent 90%);
}

/* An inline SVG over the whole scene (viewBox units of 0.1 em). */
.cv-flow, .cv-area, .cv-chart { position: absolute; inset: 0; width: 30em; height: 14em; overflow: visible; }
.cv-flow path, .cv-flow ellipse, .cv-chart path { stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------- website window */
/* A small website: an opaque window with a bar (three dots, the address field) over a skeleton page (a heading,
   a line, a button, a row of tiles). Care's is large, with a padlock and a status light; Care + backend's is
   small, at the start of the line. */

.cv-site {
  position: absolute; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: 0.9em; background: var(--cv-unit); box-shadow: var(--cv-shadow);
  /* Arrival: the window rises into place. */
  translate: 0 calc(var(--cp-glide, 0) * 2.2em);
  opacity: calc(1 - var(--cp-glide, 0) * 1.3);
}
.cv-site--front { left: 6em; top: 1.5em; width: 16em; height: 11em; }
.cv-site--full { left: 1.4em; top: 2.9em; width: 8.8em; height: 8.2em; border-radius: 0.75em; }

.cv-site__bar { flex: none; display: flex; align-items: center; gap: 0.7em; height: 2.2em; padding: 0 0.8em; border-bottom: 1px solid var(--line); }
.cv-site__dots {
  flex: none; width: 0.5em; height: 0.5em; margin-right: 1.6em; border-radius: 50%;
  background: var(--cv-skel); box-shadow: 0.8em 0 var(--cv-skel), 1.6em 0 var(--cv-skel);
}
.cv-site__url {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.4em; height: 1.2em; padding: 0 0.5em;
  border-radius: 999px; background: var(--cv-field);
}
.cv-site__url > i { width: 3.6em; max-width: 100%; height: 0.4em; border-radius: 0.2em; background: var(--cv-skel); }

/* The padlock in the address field: the site's certificate. */
.cv-lock { flex: none; width: 0.6em; height: 0.72em; overflow: visible; }
.cv-lock__shackle { fill: none; stroke: var(--ok); stroke-width: 1.5; stroke-linecap: round; }
.cv-lock__body { fill: var(--ok); }

/* The status light at the bar's end (Care): green, with a ring that pings when a check completes. */
.cv-light {
  position: relative; flex: none; width: 0.7em; height: 0.7em; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 0.22em color-mix(in srgb, var(--ok) 18%, transparent);
}
.cv-light::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 0.12em solid var(--ok); opacity: 0; }

.cv-site__page {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; padding: 1em 1.1em;
}
.cv-site__head { width: 8.4em; height: 0.9em; border-radius: 0.3em; background: var(--cv-ink); }
.cv-site__text { width: 6em; height: 0.5em; margin-top: 0.5em; border-radius: 0.25em; background: var(--cv-skel); }
.cv-site__cta { width: 3.6em; height: 1.2em; margin-top: 0.7em; border-radius: 999px; background: var(--layer-ui); }
.cv-site__tiles { align-self: stretch; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.5em; margin-top: auto; }
.cv-site__tiles > i { height: 2.4em; border-radius: 0.4em; background: var(--cv-field); }

/* Care + backend's smaller window. */
.cv-site--full .cv-site__bar { height: 1.7em; gap: 0.5em; padding: 0 0.6em; }
.cv-site--full .cv-site__dots { width: 0.4em; height: 0.4em; margin-right: 1.2em; box-shadow: 0.6em 0 var(--cv-skel), 1.2em 0 var(--cv-skel); }
.cv-site--full .cv-site__url { height: 0.9em; }
.cv-site--full .cv-site__url > i { width: 2.6em; height: 0.3em; }
.cv-site--full .cv-site__page { padding: 0.7em 0.75em; }
.cv-site--full .cv-site__head { width: 4.6em; height: 0.7em; }
.cv-site--full .cv-site__text { width: 3.2em; height: 0.4em; margin-top: 0.4em; }
.cv-site--full .cv-site__cta { width: 2.6em; height: 1em; margin-top: 0.5em; }
.cv-site--full .cv-site__tiles { gap: 0.4em; }
.cv-site--full .cv-site__tiles > i { height: 1.6em; }

/* ------------------------------------------------------------- Care: watch */

/* The scan line (the uptime check): a soft trail with a bright edge, resting two thirds of the way down the page
   (over the skeleton); while live it sweeps down the page now and then. The page clips it. */
.cv-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 2.6em;
  background: linear-gradient(transparent, var(--cv-scan));
  border-bottom: 0.15em solid var(--cv-line);
  transform: translateY(3.4em);
  opacity: var(--cp-draw, 1);
}

/* The shield over the window's corner, a step in front of it. Arrival: it settles onto the corner, a little after
   the window, and its check draws in last (--cv-tick, 0..1). */
.cv--front { --cv-tick: clamp(0, calc((var(--cp-draw, 1) - 0.4) / 0.45), 1); }
.cv-shield {
  position: absolute; left: 19em; top: 5.4em; width: 5.6em; height: 6.6em; overflow: visible;
  filter: var(--cv-drop);
  transform-origin: 50% 55%;
  translate: 0 calc(var(--cp-glide, 0) * -1.8em);
  scale: calc(1 - var(--cp-glide, 0) * 0.35);
  opacity: calc(1 - var(--cp-glide, 0) * 1.6);
}
.cv-shield__body { fill: var(--cv-shield); }
.cv-shield__facet { fill: var(--cv-facet); }
.cv-shield__check {
  fill: none; stroke: var(--cv-shield-ink); stroke-width: 4.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--cv-tick, 1));
}

/* -------------------------------------------- Care + backend: run and back up */

/* The wires on the middle line (they draw in as the card arrives) and a packet resting on each. */
.cv-wire { fill: none; stroke: var(--cv-track); stroke-width: 1.6; stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--cp-draw, 1)); }
.cv-packet {
  fill: none; stroke: var(--cv-pulse); stroke-width: 3;
  stroke-dasharray: 0.001 2; stroke-dashoffset: calc(var(--rest, 0.5) * -1);
  opacity: var(--cp-draw, 1);
}
.cv-packet--glow { stroke: var(--cv-glow); stroke-width: 8; opacity: calc(var(--cp-draw, 1) * 0.6); }

/* The server stack: three units, each with two LEDs and a load bar. */
.cv-server { position: absolute; display: flex; flex-direction: column; gap: 0.35em; }
.cv-server--full { left: 12em; top: 3.65em; width: 6.2em; }
.cv-unit {
  display: flex; align-items: center; gap: 0.45em; height: 2em; padding: 0 0.65em;
  border-radius: 0.5em; background: var(--cv-unit); box-shadow: inset 0 0 0 1px var(--line-strong), var(--cv-shadow);
  /* Arrival: the units drop into the rack, the top one from highest. */
  translate: 0 calc(var(--cp-glide, 0) * (3 - var(--n, 0)) * -2em);
  opacity: calc(1 - var(--cp-glide, 0) * 1.4);
}
.cv-led { flex: none; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--ok); }
.cv-led--b { background: var(--layer-ui); }
.cv-unit__load { position: relative; flex: 1; height: 0.45em; margin-left: 0.3em; overflow: hidden; border-radius: 0.25em; background: var(--cv-skel); }
.cv-unit__load::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--cv-line);
  transform-origin: 0 50%; transform: scaleX(var(--load, 0.6));
}

/* The database: an opaque cylinder with two bands and a tinted top. */
.cv-db { opacity: calc(1 - var(--cp-glide, 0) * 1.4); }
.cv-db__body { fill: var(--cv-unit); stroke: var(--line-strong); stroke-width: 1.2; }
.cv-db__band { fill: none; stroke: var(--line-strong); stroke-width: 1.2; }
.cv-db__top { fill: color-mix(in srgb, var(--layer-ui) 34%, var(--cv-unit)); stroke: var(--line-strong); stroke-width: 1.2; }
/* The copy of its top that lifts off while a backup is made: invisible at rest. */
.cv-db__copy { fill: none; stroke: var(--cv-line); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; }

/* The backup arrow around the database. Arrival: it turns into place. */
.cv-ring {
  fill: none; stroke: var(--cv-line); stroke-width: 2;
  transform-box: view-box; transform-origin: 244px 70px;
  rotate: calc(var(--cp-glide, 0) * -140deg);
  opacity: calc(1 - var(--cp-glide, 0) * 1.4);
}

/* The moon and its stars, further back, at the top right: nightly. */
.cv-moon {
  position: absolute; left: 25.6em; top: 0.4em; width: 3em; height: 2.4em; overflow: visible;
  translate: 0 calc(var(--cp-glide, 0) * 1em);
  opacity: calc(1 - var(--cp-glide, 0) * 1.5);
}
.cv-moon__disc, .cv-moon__star { fill: var(--cv-moon); }

/* ------------------------------------------------------------- Scale: grow */

/* The area under the curve, a step back, fading toward the chart's floor. */
.cv-area {
  -webkit-mask-image: linear-gradient(#000 10%, transparent 72%);
  mask-image: linear-gradient(#000 10%, transparent 72%);
  opacity: var(--cp-draw, 1);
}
.cv-area path { fill: var(--cv-area); }

/* How far each guide, mark, node and the head is in (0..1): it appears as the curve draws past its point (--t). */
.cv-guide, .cv-mark, .cv-head, .cv-node { --cv-on: clamp(0, calc((var(--cp-draw, 1) - var(--t, 0)) / 0.16), 1); }

/* The curve draws itself in from left to right as the card arrives. */
.cv-curve { fill: none; stroke: var(--cv-line); stroke-width: 2.4; stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--cp-draw, 1)); }
/* The runner: a dot (and its glow) that climbs the curve while live; hidden at rest. */
.cv-runner { --cv-run-o: 1; fill: none; stroke: var(--cv-pulse); stroke-width: 3.4; stroke-dasharray: 0.001 2; stroke-dashoffset: 0.02; opacity: 0; }
.cv-runner--glow { --cv-run-o: 0.5; stroke: var(--cv-glow); stroke-width: 9; }
/* A dashed guide from the curve down to each node, and a mark on the curve over it. */
.cv-guide { fill: none; stroke: var(--cv-track); stroke-width: 1.2; stroke-dasharray: 2 3; opacity: var(--cv-on, 1); }
.cv-mark { fill: var(--cv-unit); stroke: var(--cv-line); stroke-width: 1.6; opacity: var(--cv-on, 1); }
/* The curve's head (the newest point) and its ring, which pings while live. */
.cv-head { fill: var(--cv-pulse); opacity: var(--cv-on, 1); }
.cv-head-ring { fill: none; stroke: var(--cv-line); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; }

/* The row of nodes along the foot, each centred under its guide; the newest has an accent edge. */
.cv-nodes { position: absolute; left: 2.5em; top: 10.6em; width: 25em; display: flex; gap: 1.4em; }
.cv-node {
  flex: 1; height: 2.6em; padding: 0 0.8em;
  /* Arrival: each node appears as the curve draws past it (1, then 2, then 3). */
  translate: 0 calc((1 - var(--cv-on, 1)) * 1.2em);
  scale: calc(0.85 + var(--cv-on, 1) * 0.15);
  opacity: var(--cv-on, 1);
}
.cv-node:last-child { box-shadow: inset 0 0 0 1px var(--accent-line), var(--cv-shadow); }

/* -------------------------------------------------------------------- life */
/* Only while the grid is live (pricing.js) and motion is allowed. Each loop rests on (or passes through) the
   finished picture, so stopping it never leaves a part out of place. */

@media (prefers-reduced-motion: no-preference) {
  .pricing-grid--plans.is-live .cv::before { animation: cv-halo 6s ease-in-out infinite; }

  /* Care: one check every 4.8s. The scan sweeps the page, then the shield swells a little and the light pings. */
  .pricing-grid--plans.is-live .cv-scan { animation: cv-scan 4.8s linear infinite; }
  .pricing-grid--plans.is-live .cv-shield { animation: cv-confirm 4.8s var(--ease-io) infinite; }
  .pricing-grid--plans.is-live .cv-light::after { animation: cv-ping 4.8s var(--ease) infinite; }

  /* Care + backend: packets run along the wires, LEDs blink, and every 6s the backup arrow turns half a turn and
     a copy lifts off the database; the stars twinkle. */
  .pricing-grid--plans.is-live .cv-packet { animation: cv-packet 2.4s linear calc(var(--k, 0) * -1.2s) infinite; }
  .pricing-grid--plans.is-live .cv-led { animation: cv-blink 2.4s ease-in-out calc(var(--n, 0) * -0.7s) infinite; }
  .pricing-grid--plans.is-live .cv-led--b { animation-duration: 1.3s; }
  .pricing-grid--plans.is-live .cv-ring { animation: cv-turn 6s var(--ease-io) infinite; }
  .pricing-grid--plans.is-live .cv-db__copy { animation: cv-copy 6s var(--ease) infinite; }
  .pricing-grid--plans.is-live .cv-moon__star { animation: cv-twinkle 3.2s ease-in-out calc(var(--k, 0) * -1.6s) infinite; }

  /* Scale: every 6s a runner climbs the curve in the first 60 % (3.6s); each node pulses and its load rises as
     the runner passes over it (--t of the way along), and the head pings when it arrives. */
  .pricing-grid--plans.is-live .cv-runner { animation: cv-run 6s linear infinite; }
  .pricing-grid--plans.is-live .cv-head-ring { animation: cv-head 6s var(--ease) infinite; }
  .pricing-grid--plans.is-live .cv-node { animation: cv-node 6s var(--ease) calc(var(--t, 0) * 3.6s) infinite; }
  .pricing-grid--plans.is-live .cv-node .cv-unit__load::before { animation: cv-load 6s ease-in-out calc(var(--t, 0) * 3.6s) infinite; }
}

@keyframes cv-halo { 0%, 100% { opacity: var(--cv-halo-o, 0.7); transform: none; } 50% { opacity: calc(var(--cv-halo-o, 0.7) * 0.6); transform: scale(0.92); } }
/* The page is 8.8em tall less the window's borders: the line enters from above it and leaves past its foot. */
@keyframes cv-scan {
  0% { transform: translateY(-2.8em); opacity: 0; }
  6% { opacity: 1; }
  44% { transform: translateY(6.4em); opacity: 1; }
  50%, 100% { transform: translateY(6.4em); opacity: 0; }
}
@keyframes cv-confirm { 0%, 44%, 66%, 100% { transform: none; } 53% { transform: scale(1.07); } }
@keyframes cv-ping {
  0%, 44% { opacity: 0; transform: scale(0.8); }
  46% { opacity: 0.8; transform: scale(0.8); }
  74%, 100% { opacity: 0; transform: scale(2.6); }
}
@keyframes cv-packet { from { stroke-dashoffset: 0.05; } to { stroke-dashoffset: -1.05; } }
@keyframes cv-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes cv-turn { 0%, 50% { transform: rotate(0deg); } 80%, 100% { transform: rotate(180deg); } }
/* In SVG user units (px): the copy rises about 2.6em and drifts toward the moon as it fades. */
@keyframes cv-copy {
  0%, 52% { opacity: 0; transform: none; }
  58% { opacity: 1; transform: translate(1px, -4px); }
  84%, 100% { opacity: 0; transform: translate(10px, -26px) scale(0.6); }
}
@keyframes cv-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes cv-run {
  0% { stroke-dashoffset: 0.02; opacity: var(--cv-run-o, 1); }
  60% { stroke-dashoffset: -1; opacity: var(--cv-run-o, 1); }
  61%, 100% { stroke-dashoffset: -1; opacity: 0; }
}
@keyframes cv-head {
  0%, 59% { opacity: 0; transform: scale(1); }
  61% { opacity: 0.9; transform: scale(1); }
  90%, 100% { opacity: 0; transform: scale(3); }
}
@keyframes cv-node { 0%, 18%, 100% { transform: none; } 6% { transform: translateY(-0.25em); } }
@keyframes cv-load {
  0%, 60%, 100% { transform: scaleX(var(--load, 0.5)); }
  14% { transform: scaleX(calc(var(--load, 0.5) * 0.4 + 0.55)); }
}

/* --------------------------------------------------------- reduced motion */
/* Nothing moves: every card in place, untilted, and every picture still and complete (arrival at its end). */

@media (prefers-reduced-motion: reduce) {
  .pricing-plan, .pricing-plan::before, .pricing-plan::after,
  .pricing-plan *, .pricing-plan *::before, .pricing-plan *::after { animation: none !important; transition: none !important; }
  .pricing-plan { --cp-glide: 0; --cp-draw: 1; translate: none; transform: none; scale: none; }
  .pricing-plan::before { opacity: 0; }
  .cv::before, .cv-layer { translate: none; }
}

/* ---------------------------------------------------------- forced colours */
/* The cards keep a plain border and their text; the decorative picture, mark and sheen step aside. */

@media (forced-colors: active) {
  .pricing-plan { border: 1px solid CanvasText; }
  .pricing-plan__visual,
  .pricing-plan::before, .pricing-plan::after,
  .pricing-plan .pricing-card__head::after { display: none; }
}
