/*
 * Tier page motion that plays at load or sits high on the page
 * (docs/design/motion.md, "diagrams" and "timeline"): the hero diagram and
 * the tier timeline. Linked in the head only on pages whose markup has
 * .diagram or .timeline (peanut_scoped_css()), so the diagram's start state
 * is there at first paint. About's story timeline is in about.css; the
 * stack and search graphics are in tiers.css. Layer: motion.
 */

@layer motion {
  @media screen and (prefers-reduced-motion: no-preference) {
    /* fx:diagrams ---- Tier page hero diagram (pure CSS, plays on load like the hero entrance):
       five levels dg-l1 to dg-l5, lines draw (stroke-dashoffset on pathLength 1), boundaries
       and labels fade, nodes pop; done by about 2s. Below 60rem, with scroll-driven animations,
       the same levels follow the diagram's own view timeline. The keyframes name only their
       start state, so without the key the drawing is complete. */
    html[data-fx~="diagrams"] .diagram .dg-line {
      stroke-dasharray: 1;
      animation: dg-draw 900ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .diagram :is(.dg-ring, .dg-label) {
      animation: dg-fade 480ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .diagram .dg-node {
      transform-box: fill-box;
      transform-origin: center;
      animation: dg-pop 520ms var(--ease-pop) both;
    }

    html[data-fx~="diagrams"] .diagram :is(.dg-l1 :is(.dg-line, .dg-ring), .dg-l1:is(.dg-line, .dg-ring)) {
      animation-delay: 300ms;
    }

    html[data-fx~="diagrams"] .diagram .dg-l2 .dg-node {
      animation-delay: 560ms;
    }

    html[data-fx~="diagrams"] .diagram .dg-l3 .dg-line {
      animation-delay: 760ms;
    }

    html[data-fx~="diagrams"] .diagram .dg-l4 .dg-node {
      animation-delay: 1240ms;
    }

    html[data-fx~="diagrams"] .diagram .dg-l5 .dg-label {
      animation-delay: 1500ms;
    }

    @media (max-width: 59.99rem) {
      @supports (animation-timeline: view()) {
        html[data-fx~="diagrams"] .diagram {
          view-timeline: --dg block;
        }

        /* same specificity as the level delays above, so it overrides them */
        html[data-fx~="diagrams"] .diagram :is(.dg-l1, .dg-l2, .dg-l3, .dg-l4, .dg-l5) :is(.dg-line, .dg-ring, .dg-node, .dg-label),
        html[data-fx~="diagrams"] .diagram .dg-l1:is(.dg-line, .dg-ring) {
          animation-duration: auto;
          animation-delay: 0s;
          animation-timeline: --dg;
          animation-range: entry 0% cover 25%;
        }

        html[data-fx~="diagrams"] .diagram .dg-l2 .dg-node {
          animation-range: entry 20% cover 30%;
        }

        html[data-fx~="diagrams"] .diagram .dg-l3 .dg-line {
          animation-range: entry 50% cover 35%;
        }

        html[data-fx~="diagrams"] .diagram .dg-l4 .dg-node {
          animation-range: entry 80% cover 42%;
        }

        html[data-fx~="diagrams"] .diagram .dg-l5 .dg-label {
          animation-range: cover 30% cover 48%;
        }
      }
    }
    /* Custom websites drawing: the frame draws, the dots pop, the sections slide in one by
       one, the cursor moves to the call button, which lights up with one ring; done by
       about 4s. Time-based on every screen (it sits in the hero). */
    html[data-fx~="diagrams"] .diagram--custom .cw-frame {
      animation-delay: 200ms;
    }

    html[data-fx~="diagrams"] .diagram--custom .dg-node {
      animation-delay: 800ms;
    }

    html[data-fx~="diagrams"] .diagram--custom .cw-slide {
      animation: cw-slide 520ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .diagram--custom .cw-s0 {
      animation-delay: 950ms;
    }

    html[data-fx~="diagrams"] .diagram--custom .cw-s1 {
      animation-delay: 1150ms;
    }

    html[data-fx~="diagrams"] .diagram--custom .cw-s2 {
      animation-delay: 1450ms;
    }

    html[data-fx~="diagrams"] .diagram--custom .cw-s3 {
      animation-delay: 1750ms;
    }

    html[data-fx~="diagrams"] .diagram--custom .cw-s4 {
      animation-delay: 2050ms;
    }

    html[data-fx~="diagrams"] .diagram--custom .cw-cursor {
      animation: cw-cursor 900ms var(--ease-out) 2400ms both;
    }

    html[data-fx~="diagrams"] .diagram--custom .cw-cursor--phone {
      animation-name: cw-cursor-phone;
    }

    html[data-fx~="diagrams"] .diagram--custom .cw-btn {
      animation: cw-light 420ms var(--ease-out) 3300ms both;
    }

    html[data-fx~="diagrams"] .diagram--custom .cw-ring {
      animation: cw-ring 900ms var(--ease-out) 3400ms both;
    }
    /* Locator (the home hero card): the card draws, the search field slides in,
       the placeholder gives way to the first city typed letter by letter, then
       the location rows appear one by one; done by about 3.3s */
    html[data-fx~="diagrams"] .diagram--locator .dg-node {
      animation: none;
    }

    html[data-fx~="diagrams"] .diagram--locator .lc-field {
      animation: cw-slide 480ms var(--ease-out) 450ms both;
    }

    html[data-fx~="diagrams"] .diagram--locator .lc-placeholder {
      animation: lc-hide 260ms var(--ease-out) 1100ms both;
    }

    html[data-fx~="diagrams"] .diagram--locator .lc-typing {
      animation: lc-type 720ms steps(7, end) 1350ms both;
    }

    html[data-fx~="diagrams"] .diagram--locator .lc-row {
      animation: cw-slide 520ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .diagram--locator .lc-r0 {
      animation-delay: 2150ms;
    }

    html[data-fx~="diagrams"] .diagram--locator .lc-r1 {
      animation-delay: 2500ms;
    }

    html[data-fx~="diagrams"] .diagram--locator .lc-r2 {
      animation-delay: 2850ms;
    }
    /* Care (the care page's hero): the ring draws, the site and the four checks
       pop in, then each check ticks mint in turn, clockwise from the top */
    html[data-fx~="diagrams"] .diagram--care .cr-orbit {
      animation-delay: 200ms;
    }

    html[data-fx~="diagrams"] .diagram--care .cr-site {
      animation: cw-slide 520ms var(--ease-out) 300ms both;
    }

    html[data-fx~="diagrams"] .diagram--care .cr-check {
      animation: cw-slide 460ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .diagram--care .cr-tick {
      animation: cr-tick 360ms var(--ease-out) both;
      transform-box: fill-box;
      transform-origin: center;
    }

    html[data-fx~="diagrams"] .diagram--care .cr-tick-mark {
      stroke-dasharray: 1;
      animation: dg-draw 320ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .diagram--care .cr-c0 { animation-delay: 700ms; }
    html[data-fx~="diagrams"] .diagram--care .cr-c1 { animation-delay: 850ms; }
    html[data-fx~="diagrams"] .diagram--care .cr-c2 { animation-delay: 1000ms; }
    html[data-fx~="diagrams"] .diagram--care .cr-c3 { animation-delay: 1150ms; }
    html[data-fx~="diagrams"] .diagram--care .cr-c0 :is(.cr-tick, .cr-tick-mark) { animation-delay: 1800ms; }
    html[data-fx~="diagrams"] .diagram--care .cr-c1 :is(.cr-tick, .cr-tick-mark) { animation-delay: 2300ms; }
    html[data-fx~="diagrams"] .diagram--care .cr-c2 :is(.cr-tick, .cr-tick-mark) { animation-delay: 2800ms; }
    html[data-fx~="diagrams"] .diagram--care .cr-c3 :is(.cr-tick, .cr-tick-mark) { animation-delay: 3300ms; }

    /* Problems (the selectable list's drawings): each part slides in, in
       turn, every time its drawing is shown (display none to block replays
       it); the homes light up, the people pop, the breaks and rings fade in */
    html[data-fx~="diagrams"] .diagram--problem .pb-step {
      animation: cw-slide 480ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .diagram--problem :is(.pb-s0, .pb-site) { animation-delay: 250ms; }
    html[data-fx~="diagrams"] .diagram--problem .pb-s1 { animation-delay: 550ms; }
    html[data-fx~="diagrams"] .diagram--problem .pb-s2 { animation-delay: 850ms; }
    html[data-fx~="diagrams"] .diagram--problem .pb-s3 { animation-delay: 1150ms; }
    html[data-fx~="diagrams"] .diagram--problem .pb-s4 { animation-delay: 1500ms; }

    html[data-fx~="diagrams"] .diagram--problem :is(.pb-break, .pb-ring) {
      animation: dg-fade 420ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .diagram--problem .pb-b0 { animation-delay: 1500ms; }
    html[data-fx~="diagrams"] .diagram--problem .pb-b1 { animation-delay: 1700ms; }
    html[data-fx~="diagrams"] .diagram--problem .pb-b2 { animation-delay: 1900ms; }
    html[data-fx~="diagrams"] .diagram--problem .pb-r0 { animation-delay: 600ms; }
    html[data-fx~="diagrams"] .diagram--problem .pb-r1 { animation-delay: 900ms; }
    html[data-fx~="diagrams"] .diagram--problem .pb-r2 { animation-delay: 1200ms; }

    html[data-fx~="diagrams"] .pb-copies .pb-pill {
      animation: dg-pop 420ms var(--ease-pop) both;
      transform-box: fill-box;
      transform-origin: center;
    }

    html[data-fx~="diagrams"] .pb-copies .pb-p0 { animation-delay: 1300ms; }
    html[data-fx~="diagrams"] .pb-copies .pb-p1 { animation-delay: 1550ms; }
    html[data-fx~="diagrams"] .pb-copies .pb-p2 { animation-delay: 1800ms; }

    html[data-fx~="diagrams"] .pb-reach .pb-person { animation-name: dg-pop; animation-timing-function: var(--ease-pop); transform-box: fill-box; transform-origin: center; }
    html[data-fx~="diagrams"] .pb-reach .pb-p0 { animation-delay: 1400ms; }
    html[data-fx~="diagrams"] .pb-reach .pb-p1 { animation-delay: 1550ms; }
    html[data-fx~="diagrams"] .pb-reach .pb-p2 { animation-delay: 1700ms; }
    html[data-fx~="diagrams"] .pb-reach .pb-p3 { animation-delay: 1850ms; }
    html[data-fx~="diagrams"] .pb-reach .pb-p4 { animation-delay: 2000ms; }
    html[data-fx~="diagrams"] .pb-reach .pb-p5 { animation-delay: 2150ms; }
    html[data-fx~="diagrams"] .pb-reach .pb-p6 { animation-delay: 2300ms; }
    html[data-fx~="diagrams"] .pb-reach .pb-p7 { animation-delay: 2450ms; }

    html[data-fx~="diagrams"] .pb-community .pb-house {
      animation: bp-light 520ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .pb-community .pb-h0 .pb-house { animation-delay: 900ms; }
    html[data-fx~="diagrams"] .pb-community .pb-h1 .pb-house { animation-delay: 1150ms; }
    html[data-fx~="diagrams"] .pb-community .pb-h2 .pb-house { animation-delay: 1400ms; }
    html[data-fx~="diagrams"] .pb-community .pb-h3 .pb-house { animation-delay: 1650ms; }
    html[data-fx~="diagrams"] .pb-community .pb-h4 .pb-house { animation-delay: 1900ms; }
    html[data-fx~="diagrams"] .pb-community .pb-h5 .pb-house { animation-delay: 2150ms; }
    html[data-fx~="diagrams"] .pb-community .pb-h6 .pb-house { animation-delay: 2400ms; }
    html[data-fx~="diagrams"] .pb-community .pb-h7 .pb-house { animation-delay: 2650ms; }
    html[data-fx~="diagrams"] .pb-community .pb-h8 .pb-house { animation-delay: 2900ms; }
    html[data-fx~="diagrams"] .pb-community .pb-home { animation-delay: 300ms; }

    html[data-fx~="diagrams"] .pb-feed .pb-flow { animation-delay: 1100ms; }
    html[data-fx~="diagrams"] .pb-feed .pb-f1 { animation-delay: 1300ms; }
    html[data-fx~="diagrams"] .pb-feed .pb-f2 { animation-delay: 1500ms; }
    html[data-fx~="diagrams"] .pb-feed .pb-site { animation-delay: 1700ms; }

    /* Blueprint (home "What we build"): the root, then the trunk draws, each
       branch draws, each part slides in, then the parts light up mint one by
       one; the static drawing is the lit, finished one */
    html[data-fx~="diagrams"] .diagram--blueprint .bp-trunk {
      animation-delay: 250ms;
    }

    html[data-fx~="diagrams"] .diagram--blueprint .bp-part {
      animation: cw-slide 460ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .diagram--blueprint .bp-card {
      animation: bp-light 520ms var(--ease-out) both;
    }

    html[data-fx~="diagrams"] .diagram--blueprint .bp-b0 { animation-delay: 700ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p0 { animation-delay: 800ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p0 .bp-card { animation-delay: 2300ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-b1 { animation-delay: 900ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p1 { animation-delay: 1000ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p1 .bp-card { animation-delay: 2500ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-b2 { animation-delay: 1100ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p2 { animation-delay: 1200ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p2 .bp-card { animation-delay: 2700ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-b3 { animation-delay: 1300ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p3 { animation-delay: 1400ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p3 .bp-card { animation-delay: 2900ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-b4 { animation-delay: 1500ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p4 { animation-delay: 1600ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p4 .bp-card { animation-delay: 3100ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-b5 { animation-delay: 1700ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p5 { animation-delay: 1800ms; }
    html[data-fx~="diagrams"] .diagram--blueprint .bp-p5 .bp-card { animation-delay: 3300ms; }

    /* It sits far down the page: held at its first frame until it scrolls into
       view (motion.js tags [data-play] with .is-in, as for the location map) */
    html.js-motion[data-fx~="diagrams"] .points__map[data-play]:not(.is-in) .diagram--blueprint :is(.dg-line, .bp-part, .bp-card) {
      animation-play-state: paused;
    }
    /* /fx:diagrams */

    /* fx:timeline ---- The tier pages' timeline (cards block, timeline style): discs pop as
       their step reveals; the line fills toward the next step (scaleX on the row from 64rem,
       scaleY on phones). With scroll-driven animations the fill follows the scroll instead.
       Only under html.js-motion, so without the script the lines are complete. The story
       timeline (About) is in about.css. */
    html[data-fx~="timeline"] .timeline__num {
      transition: transform var(--motion-reveal) var(--ease-pop);
      transition-delay: calc(var(--i, 0) * var(--motion-stagger) + 120ms);
    }

    html[data-fx~="timeline"] .timeline__step::after {
      transition: transform 700ms var(--ease-out) 250ms;
    }

    html.js-motion[data-fx~="timeline"] .timeline__step[data-reveal]:not(.is-in) .timeline__num {
      transform: scale(0.5);
    }

    html.js-motion[data-fx~="timeline"] .timeline__step[data-reveal]:not(.is-in)::after {
      transform: scaleY(0);
    }

    @media (min-width: 64rem) {
      html[data-fx~="timeline"] .timeline__step::after {
        transition-delay: calc(var(--i, 0) * 450ms + 300ms);
      }

      html.js-motion[data-fx~="timeline"] .timeline__step[data-reveal]:not(.is-in)::after {
        transform: scaleX(0);
      }
    }

    @supports (animation-timeline: view()) {
      html[data-fx~="timeline"] .timeline {
        view-timeline: --tl block;
      }

      html[data-fx~="timeline"] .timeline__step {
        view-timeline: --tl-step block;
      }

      html.js-motion[data-fx~="timeline"] .timeline__step:not(:last-child)::after {
        transition: none;
        animation: tl-fill-y linear both;
        animation-timeline: --tl-step;
        animation-range: entry 100% cover 55%;
      }

      @media (min-width: 64rem) {
        html.js-motion[data-fx~="timeline"] .timeline__step:not(:last-child)::after {
          animation-name: tl-fill-x;
          animation-timeline: --tl;
          animation-range: cover 22% cover 34%;
        }

        html.js-motion[data-fx~="timeline"] .timeline__step:nth-child(2):not(:last-child)::after {
          animation-range: cover 34% cover 46%;
        }

        html.js-motion[data-fx~="timeline"] .timeline__step:nth-child(n + 3):not(:last-child)::after {
          animation-range: cover 46% cover 58%;
        }
      }
    }
    /* /fx:timeline */
  }

  @keyframes dg-draw {
    from {
      stroke-dashoffset: 1;
    }

    to {
      stroke-dashoffset: 0;
    }
  }

  @keyframes dg-pop {
    from {
      opacity: 0;
      transform: scale(0.4);
    }
  }

  @keyframes dg-fade {
    from {
      opacity: 0;
    }
  }

  @keyframes cr-tick {
    from {
      fill: var(--color-white);
      transform: scale(0.6);
    }
  }

  @keyframes bp-light {
    from {
      fill: var(--color-white);
    }
  }

  @keyframes lc-hide {
    from {
      opacity: 1;
    }
  }

  @keyframes lc-type {
    from {
      transform: scaleX(0);
    }
  }

  @keyframes cw-slide {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }

  @keyframes cw-cursor {
    from {
      opacity: 0;
      transform: translate(220px, 120px);
    }

    30% {
      opacity: 1;
    }
  }

  @keyframes cw-cursor-phone {
    from {
      opacity: 0;
      transform: translate(80px, 150px);
    }

    30% {
      opacity: 1;
    }
  }

  @keyframes cw-light {
    from {
      fill: var(--color-white);
    }
  }

  @keyframes cw-ring {
    0% {
      opacity: 0;
      transform: scale(0.85);
    }

    40% {
      opacity: 1;
    }

    100% {
      opacity: 0;
      transform: scale(1.2);
    }
  }

  @keyframes tl-fill-x {
    from {
      transform: scaleX(0);
    }
  }
}

/*
 * The tier diagram beside a mid-page section (blocks/hero.php, hero--aside;
 * the Network page's "who owns what" section, owner 2026-11-26). Here, not
 * in tiers.css, because this file is in the head: the section sits above the
 * first Tier page section, where tiers.css is linked. The section reads as a
 * section, not a second hero: a section-size heading and a smaller drawing.
 * The "owns" variant is two colors: the brand's part in butter, each
 * location's in mint (the same pair as the brand parts picture under it).
 * The SVG carries its width and height, so nothing shifts.
 */
@layer blocks {
  .hero--aside .hero__title {
    font-size: var(--step-4);
    line-height: var(--leading-heading);
  }

  .hero--aside .hero__lead {
    margin-block-start: var(--space-3);
  }

  .hero--aside .hero__media--diagram {
    max-width: 30rem;
  }

  .diagram.diagram--owns .dg-hub {
    fill: var(--color-butter);
  }

  .diagram.diagram--owns :is(.dg-site, .dg-mint, .dg-peach) {
    fill: var(--color-brand);
  }
}

@layer motion {
  @media screen and (prefers-reduced-motion: no-preference) {
    /* fx:diagrams ---- It waits for its section's reveal (motion.js tags the hero--aside
       container like any section's and adds is-in in view), so it draws when the visitor
       reaches it, once; a section in view at load is never tagged and plays at once. From 60rem the three locations pop in one at a time, then their pages.
       Below 60rem the levels follow the drawing's own view timeline, as in the hero. */
    html.js-motion[data-fx~="diagrams"] :is([data-reveal]:not(.is-in) .hero--aside, .hero--aside [data-reveal]:not(.is-in), .hero--aside[data-reveal]:not(.is-in)) .diagram :is(.dg-line, .dg-ring, .dg-node, .dg-label) {
      animation-play-state: paused;
    }

    @media (min-width: 60rem) {
      html[data-fx~="diagrams"] .diagram.diagram--owns .dg-l2 g.dg-node:nth-of-type(1) {
        animation-delay: 800ms;
      }

      html[data-fx~="diagrams"] .diagram.diagram--owns .dg-l2 g.dg-node:nth-of-type(2) {
        animation-delay: 1040ms;
      }

      html[data-fx~="diagrams"] .diagram.diagram--owns .dg-l2 g.dg-node:nth-of-type(3) {
        animation-delay: 1280ms;
      }

      html[data-fx~="diagrams"] .diagram.diagram--owns .dg-l3 .dg-line {
        animation-delay: 1500ms;
      }

      html[data-fx~="diagrams"] .diagram.diagram--owns .dg-l4 .dg-node {
        animation-delay: 1900ms;
      }

      html[data-fx~="diagrams"] .diagram.diagram--owns .dg-l5 .dg-label {
        animation-delay: 2100ms;
      }
    }
  }
}

/*
 * Single Location (long run)
 * The tier drawing beside the page's "you go to them" section (blocks/hero.php,
 * hero--aside; diagrams/single-location.php, diagram--reach; owner 2026-11-26).
 * From 60rem the hub reaches the towns one at a time, clockwise: each line draws,
 * its town pops, its label fades in; done by about 3s. Below 60rem the levels follow
 * the drawing's own view timeline, as in the hero. The start states are the shared
 * keyframes', so with reduced motion or without the key the drawing is complete. The
 * SVG carries its width and height, so nothing shifts.
 */
@layer motion {
  @media screen and (prefers-reduced-motion: no-preference) and (min-width: 60rem) {
    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l3 .dg-line:nth-of-type(1) {
      animation-delay: 800ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l4 .dg-node:nth-of-type(1) {
      animation-delay: 1100ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l5 .dg-label:nth-of-type(3) {
      animation-delay: 1250ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l3 .dg-line:nth-of-type(2) {
      animation-delay: 1020ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l4 .dg-node:nth-of-type(2) {
      animation-delay: 1320ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l5 .dg-label:nth-of-type(4) {
      animation-delay: 1470ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l3 .dg-line:nth-of-type(3) {
      animation-delay: 1240ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l4 .dg-node:nth-of-type(3) {
      animation-delay: 1540ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l5 .dg-label:nth-of-type(5) {
      animation-delay: 1690ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l3 .dg-line:nth-of-type(4) {
      animation-delay: 1460ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l4 .dg-node:nth-of-type(4) {
      animation-delay: 1760ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l5 .dg-label:nth-of-type(6) {
      animation-delay: 1910ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l3 .dg-line:nth-of-type(5) {
      animation-delay: 1680ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l4 .dg-node:nth-of-type(5) {
      animation-delay: 1980ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l5 .dg-label:nth-of-type(7) {
      animation-delay: 2130ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l3 .dg-line:nth-of-type(6) {
      animation-delay: 1900ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l4 .dg-node:nth-of-type(6) {
      animation-delay: 2200ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l5 .dg-label:nth-of-type(8) {
      animation-delay: 2350ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l3 .dg-line:nth-of-type(7) {
      animation-delay: 2120ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l4 .dg-node:nth-of-type(7) {
      animation-delay: 2420ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--reach .dg-l5 .dg-label:nth-of-type(9) {
      animation-delay: 2570ms;
    }
  }
}

/*
 * Regional (long run)
 * The Regional drawing beside "One website, or one per metro?" (blocks/hero.php,
 * hero--aside; diagrams/regional.php, variant diagram--relate): how the metros
 * relate. The colors stay the tier drawing's. Each metro arrives on its own,
 * its boundary first and then its hub, left to right, so the three read as
 * three separate hubs under one site; their cities and the labels follow.
 * From 60rem it is timed and waits for its section's reveal, like the other two
 * tier drawings beside a section (the shared rule above). Below 60rem the
 * shared view timeline applies, as in the hero. Paint only: the SVG carries
 * its width and height, so nothing shifts, and under reduced motion the
 * drawing is complete and still.
 */
@layer motion {
  @media screen and (prefers-reduced-motion: no-preference) and (min-width: 60rem) {
    html[data-fx~="diagrams"] .diagram.diagram--relate .dg-l1 .dg-ring:nth-of-type(1) {
      animation-delay: 700ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--relate .dg-l1 .dg-ring:nth-of-type(2) {
      animation-delay: 980ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--relate .dg-l1 .dg-ring:nth-of-type(3) {
      animation-delay: 1260ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--relate .dg-l2 .dg-hub:nth-of-type(2) {
      animation-delay: 840ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--relate .dg-l2 .dg-hub:nth-of-type(3) {
      animation-delay: 1120ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--relate .dg-l2 .dg-hub:nth-of-type(4) {
      animation-delay: 1400ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--relate .dg-l3 .dg-line {
      animation-delay: 1640ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--relate .dg-l4 .dg-node {
      animation-delay: 2040ms;
    }

    html[data-fx~="diagrams"] .diagram.diagram--relate .dg-l5 .dg-label {
      animation-delay: 2260ms;
    }
  }
}

/* The long service pages, the ones with the industry switch (the tier pages,
   Custom websites, the Search pages, Partnership, Site Insight, Marketing
   systems, Website care, About), review fixes 9.2 (2026-11-29): as on home
   (site.css), sections from the third on skip rendering until they near the
   viewport, so their style, layout and paint work (the demos, the drawings,
   the moving graphics) waits until the reader scrolls toward them; in view
   nothing changes and nothing moves. "auto" remembers each section's real
   height once it has rendered. The estimates sit under these pages' average
   section heights (measured 2026-11-30: 54rem or more on phones, 42rem or
   more from 48rem up), so a page is never taller on screen than in print
   (site-rules.mjs, the print layout check). The Group B pages wrap their sections in
   .ub-page. In this file because it is linked in the head of every one of
   these pages (each has a .diagram). */
@layer layout {
  @media screen {
    :is(main:has(> .block-indswitch), main > .ub-page:has(> .block-indswitch)) > .section:nth-child(n + 3) {
      content-visibility: auto;
      contain-intrinsic-size: auto 50rem;
    }
  }

  @media screen and (min-width: 48rem) {
    :is(main:has(> .block-indswitch), main > .ub-page:has(> .block-indswitch)) > .section:nth-child(n + 3) {
      contain-intrinsic-size: auto 35rem;
    }
  }
}

/* The same pages: the hero's lead paragraph is often the largest text in the
   first view (Regional, Network, Custom websites, Site Insight, Content
   plans), so it is their LCP element. Like the H1 and the hero image
   (motion-core.css, fx:enter) it only lifts and never fades, so its first
   paint is not held back by the entrance (review fixes 9.2). */
@layer motion {
  @media screen and (prefers-reduced-motion: no-preference) {
    html[data-fx~="enter"] main:has(.block-indswitch) .hero-enter > .hero__lead {
      animation-name: motion-lift;
    }
  }
}
