/*
 * Med spa page (classes p04-) and the block its brief introduced, which any
 * page can use: the Provider cards (providers). Linked only on pages with
 * those classes (peanut_scoped_css()). Tokens only. Layer blocks for the
 * static state, layer motion for what moves (docs/design/components.md,
 * "Industry pages"). The page is calm: slower changes, more air, cream and
 * ink with mint as the one accent.
 */

@layer blocks {
  /* ---------- Live card med-spa-booking: the location chips, the concern
     chips, then a provider with an open slot and the booking button. Slower
     than the other cards ---------- */

  .lcard.p04-card.is-live [data-at] {
    transition-duration: 560ms;
  }

  .p04-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
  }

  .p04-chip {
    padding: 0.5rem 0.875rem;
    border: var(--border);
    border-radius: var(--radius-pill);
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 400ms var(--ease-out);
  }

  .p04-chip.is-tapped {
    background: var(--color-brand);
  }

  .p04-chip--quiet {
    border-style: dashed;
  }

  .p04-provider {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    margin-block-end: var(--space-2);
  }

  .p04-provider__face {
    position: relative;
    flex: none;
    width: 2.25rem;
    height: 2.25rem;
    overflow: hidden;
    background: var(--color-butter);
    border: var(--border);
    border-radius: 50%;
  }

  .p04-provider__face::before,
  .p04-provider__face::after {
    content: "";
    position: absolute;
    left: 50%;
    background: var(--color-white);
    border-radius: 50%;
    translate: -50% 0;
  }

  .p04-provider__face::before {
    top: 0.5rem;
    width: 0.75rem;
    height: 0.75rem;
  }

  .p04-provider__face::after {
    top: 1.375rem;
    width: 1.5rem;
    height: 1.25rem;
  }

  .p04-provider__name {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--step-1);
    font-weight: var(--weight-heading);
    line-height: 1.2;
  }

  .p04-slots {
    grid-template-columns: 1fr minmax(0, 2.6fr) 1fr;
  }

  .p04-slot {
    min-height: 2.25rem;
    padding-inline: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
  }

  .p04-slot--taken {
    border-style: dashed;
    opacity: 0.45;
  }

  .p04-book {
    display: block;
    margin-block-start: var(--space-2);
    padding: 0.625rem var(--space-2);
    background: var(--color-ink);
    color: var(--color-white);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-align: center;
    text-transform: uppercase;
  }

  /* ---------- The drawings' own parts (problems, the brand visual, the
     carry-over tiles, the three small drawings): the static drawing is the
     finished one ---------- */

  .diagram .p04-grey {
    opacity: 0.5;
  }

  .diagram .p04-strong {
    font-weight: 600;
  }

  .diagram .p04-index {
    font-weight: 600;
    opacity: 0.5;
  }

  .diagram .p04-trail {
    fill: none;
    stroke: var(--color-ink);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 4 5;
    opacity: 0.6;
  }

  .diagram .p04-leave,
  .diagram .p04-copyarrow,
  .diagram .p04-grow,
  .diagram .p04-rebook {
    fill: none;
    stroke: var(--color-ink);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .diagram .p04-leave {
    opacity: 0.6;
  }

  .diagram .p04-rebook {
    stroke-dasharray: 4 4;
  }

  .diagram .p04-rebook--head {
    stroke-dasharray: none;
  }

  .diagram .p04-road {
    fill: none;
    stroke: var(--color-ink);
    stroke-width: 1.5;
    stroke-linecap: round;
    opacity: 0.2;
  }

  .diagram .p04-cell {
    stroke-width: 1.2;
    opacity: 0.35;
  }

  .diagram .p04-ontext {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    fill: var(--color-white);
  }

  .diagram .p04-pill {
    stroke-width: 1.2;
    opacity: 1;
  }

  /* the new mini-site: dotted until it opens; the static drawing has it open */
  .diagram .p04-site__dots {
    opacity: 0;
  }

  /* last month's special is gone in the static drawing */
  .diagram .p04-month--old {
    opacity: 0;
  }

  .p04-brand {
    max-width: 36rem;
    margin-inline: auto;
  }

  .p04-carry {
    max-width: 26rem;
    margin-inline: auto;
  }

  .p04-mini {
    max-width: 15rem;
  }

  /* ---------- Provider cards: a row of still cards, everything visible,
     the sample button at the foot of each; one column on phones ---------- */

  .providers__sample {
    display: inline-block;
    margin: 0 0 var(--space-3);
    padding: 0.25rem 0.75rem;
    border: 1px dashed var(--color-ink);
    border-radius: var(--radius-pill);
    font-size: var(--pill-font-size);
    font-weight: var(--pill-weight);
    letter-spacing: var(--pill-tracking);
    text-transform: uppercase;
  }

  .providers__head {
    max-width: 44rem;
    margin-block-end: var(--space-6);
  }

  .providers__title {
    margin: 0;
  }

  .providers__intro {
    margin: var(--space-3) 0 0;
  }

  .providers__list {
    display: grid;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .providers__card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-sm);
  }

  .providers__photo {
    display: grid;
    margin-block-end: var(--space-1);
  }

  .providers__name {
    margin: 0;
    font-size: var(--step-2);
  }

  .providers__creds {
    margin: calc(var(--space-1) * -1) 0 0;
    font-size: var(--step--1);
    font-weight: 500;
  }

  .providers__bio {
    font-size: var(--text-body);
    line-height: var(--leading-body);
  }

  .providers__bio p {
    margin: 0;
  }

  .providers__bio p + p {
    margin-block-start: var(--space-1);
  }

  .providers__label {
    margin: var(--space-1) 0 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  .providers__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .providers__chips li {
    padding: 0.25rem 0.75rem;
    background: var(--color-brand);
    border: var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 500;
  }

  .providers__where {
    display: grid;
    margin: var(--space-1) 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--step--1);
  }

  .providers__where li {
    display: flex;
    gap: var(--space-2);
    justify-content: space-between;
    padding: 0.5rem 0;
    border-block-start: 1px solid var(--color-ink-line-faint);
  }

  .providers__where li:last-child {
    border-block-end: 1px solid var(--color-ink-line-faint);
  }

  .providers__place {
    font-weight: 500;
  }

  /* the sample button sits at the foot of the card, whatever stands above it */
  .providers__cta {
    margin: auto 0 0;
    padding-block-start: var(--space-2);
  }

  .providers__fakebtn {
    display: block;
    padding: 0.75rem var(--space-2);
    background: var(--color-ink);
    color: var(--color-white);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-align: center;
    text-transform: uppercase;
  }

  .providers__outro {
    max-width: 36rem;
    margin: var(--space-6) auto 0;
    font-family: var(--font-heading);
    font-size: var(--step-3);
    font-weight: var(--weight-heading);
    line-height: 1.3;
    text-align: center;
    text-wrap: balance;
  }

  /* two cards a row from tablets, three or four on wide screens; the cards
     in a row share one height (grid stretch) */
  @media (min-width: 48rem) {
    .providers__list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (min-width: 60rem) {
    .providers--n3 .providers__list {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  @media (min-width: 64rem) {
    .providers--n4 .providers__list {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  /* ---------- One brand, every location: the location switcher
     (visuals/p04-locations.php), a sample site in a browser frame with one
     tab per location. The intro above it keeps to about 65 characters a
     line ---------- */

  .showcase:has(.p04-locs) .showcase__intro {
    max-width: 32rem;
  }

  /* the tap hint over the frame (the shared one, industry.css) */
  .p04-locs__hint {
    margin: 0 0 var(--space-2);
  }

  .p04-locs {
    font-size: var(--step--1);
    line-height: 1.45;
  }

  .p04-locs__frame {
    overflow: hidden;
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-sm);
  }

  .p04-locs__bar {
    display: flex;
    align-items: center;
    padding: 0.5rem var(--space-2);
    background: var(--color-paper);
    border-block-end: var(--border);
    font-size: 0.75rem;
  }

  .p04-locs__dots {
    flex: none;
    width: 0.4375rem;
    height: 0.4375rem;
    margin-inline-end: 2.5rem;
    background: var(--color-ink);
    border-radius: 50%;
    box-shadow: 0.75rem 0 0 var(--color-ink), 1.5rem 0 0 var(--color-ink);
    opacity: 0.35;
  }

  .p04-locs__url {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding: 0.125rem 0.625rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-pill);
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .p04-locs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    align-items: center;
    padding: var(--space-2) var(--space-3);
    border-block-end: 1px solid var(--color-ink-line-faint);
  }

  .p04-locs__brand {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--step-1);
    font-weight: var(--weight-heading);
    line-height: 1.2;
  }

  .p04-locs__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem;
    width: 100%;
  }

  .p04-locs__tabs[hidden] {
    display: none;
  }

  .p04-locs__tab {
    position: relative;
    overflow: hidden;
    min-height: 2.75rem;
    margin: 0;
    padding: 0.5rem 0.875rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-pill);
    color: var(--color-ink);
    font: inherit;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 400ms var(--ease-out);
  }

  .p04-locs__tab[aria-selected="true"] {
    background: var(--color-brand);
  }

  .p04-locs__tab--next {
    border-style: dashed;
  }

  .p04-locs__tab--next[aria-selected="true"] {
    background: var(--color-paper);
  }

  .p04-locs__tab:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
  }

  .p04-locs__panels {
    padding: var(--space-3);
  }

  .p04-locs__panel {
    display: grid;
    gap: var(--space-3);
    align-content: start;
  }

  .p04-locs__panel:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 4px;
  }

  /* without the script every location stands one under the other */
  .p04-locs:not(.is-live) .p04-locs__panel + .p04-locs__panel {
    margin-block-start: var(--space-3);
    padding-block-start: var(--space-3);
    border-block-start: var(--border);
  }

  /* with it the pages share one cell: the tallest sets the height, so a
     switch never moves the page */
  .p04-locs.is-live .p04-locs__panels {
    display: grid;
  }

  .p04-locs.is-live .p04-locs__panel {
    grid-area: 1 / 1;
  }

  .p04-locs.is-live .p04-locs__panel[data-off] {
    visibility: hidden;
  }

  .p04-locs__name {
    margin: 0 0 var(--space-1);
    font-family: var(--font-heading);
    font-size: var(--step-3);
    font-weight: var(--weight-heading);
    line-height: 1.15;
  }

  .p04-locs__facts {
    display: grid;
    margin: 0;
  }

  .p04-locs__fact {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: var(--space-2);
    padding: 0.625rem 0;
    border-block-start: 1px solid var(--color-ink-line-faint);
  }

  .p04-locs__fact:last-child {
    border-block-end: 1px solid var(--color-ink-line-faint);
  }

  .p04-locs__fact dt,
  .p04-locs__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    line-height: 1.6;
    text-transform: uppercase;
  }

  .p04-locs__fact dd {
    margin: 0;
  }

  .p04-locs__hours {
    display: grid;
    gap: 0.125rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .p04-locs__hours li {
    display: flex;
    gap: var(--space-2);
    justify-content: space-between;
  }

  .p04-locs__side {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
  }

  .p04-locs__label {
    margin: 0;
  }

  .p04-locs__label + .p04-locs__chips,
  .p04-locs__label + .p04-locs__people {
    margin-block-end: var(--space-1);
  }

  .p04-locs__people {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .p04-locs__person {
    display: flex;
    gap: 0.75rem;
    align-items: center;
  }

  .p04-locs__face {
    flex: none;
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border: var(--border);
    border-radius: 50%;
  }

  .p04-locs__face--initials {
    display: grid;
    place-items: center;
    background: var(--color-butter);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
  }

  .p04-locs__who {
    display: grid;
  }

  .p04-locs__pname {
    font-weight: 500;
  }

  .p04-locs__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .p04-locs__chips li {
    padding: 0.25rem 0.75rem;
    background: var(--color-brand);
    border: var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 500;
  }

  .p04-locs__cta {
    margin: auto 0 0;
    padding-block-start: var(--space-2);
  }

  .p04-locs__btn {
    display: block;
    padding: 0.75rem var(--space-2);
    background: var(--color-ink);
    color: var(--color-white);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-align: center;
    text-transform: uppercase;
  }

  /* the next location: an empty page waiting for its lease */
  .p04-locs__empty {
    display: grid;
    place-content: center;
    gap: var(--space-1);
    min-height: 14rem;
    padding: var(--space-4) var(--space-3);
    border: 1px dashed var(--color-ink);
    border-radius: 0.5rem;
    text-align: center;
  }

  .p04-locs.is-live .p04-locs__panel--next {
    align-content: stretch;
  }

  .p04-locs__wait {
    max-width: 24rem;
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--step-3);
    font-weight: var(--weight-heading);
    line-height: 1.25;
    text-wrap: balance;
  }

  @media (min-width: 40rem) {
    .p04-locs__tabs {
      display: flex;
      flex-wrap: wrap;
      width: auto;
    }
  }

  @media (min-width: 48rem) {
    .p04-locs__panel:not(.p04-locs__panel--next) {
      grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
      gap: var(--space-5);
    }

    .p04-locs__panels {
      padding: var(--space-4);
    }
  }

  @media (min-width: 60rem) {
    .p04-locs__nav {
      justify-content: space-between;
      padding-inline: var(--space-4);
    }
  }

  /* ---------- Two-view flip, Side by side (flip--side, the med spa page's
     "Say it plainly"): no toggle, no turn; the example on the left, the
     plain version on the right, one under the other on phones. Its base
     (the card, the sample page) is ind-p03.css; these rules only add ----- */

  .flip--side .flip__view {
    display: flex;
    flex-direction: column;
  }

  .flip--side .flip__body {
    flex: 1;
  }

  .flip--side .flip__page {
    height: 100%;
  }

  .flip--side .flip__label {
    margin-block-end: var(--space-2);
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    line-height: 1.4;
    text-transform: uppercase;
  }

  /* the plain version: the one to copy, so it stands forward */
  .flip--side .flip__view:not(.flip__view--example) {
    box-shadow: 4px 4px 0 var(--color-ink);
  }

  /* the example: struck through in full ink, so it stays readable (AA);
     the <del> draws the line, and screen readers hear "Avoid:" first */
  .flip--side .flip__view--example :is(.flip__heading, .flip__banner, .flip__lines li) {
    text-decoration: none;
    opacity: 1;
  }

  .flip--side .flip__view--example .flip__banner {
    background: var(--color-accent-2);
  }

  .flip--side del {
    color: inherit;
    text-decoration-line: line-through;
    text-decoration-thickness: 1px;
  }

  @media (min-width: 48rem) {
    .flip--side .flip__card {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-3);
    }
  }

  @media print {
    .flip--side .flip__view {
      break-inside: avoid;
    }

    .flip--side .flip__view:not(.flip__view--example) {
      box-shadow: none;
    }
  }

  /* ---------- The honesty panel ("What we haven't done" beside "What
     carries over"): the showcase's two items as one quiet two-column panel,
     keyed on the page's carry-over drawing ---------- */

  .showcase:has(.p04-carry) .showcase__items {
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--color-paper);
    border: var(--border);
    border-radius: var(--radius-sm);
  }

  .showcase:has(.p04-carry) .showcase__item + .showcase__item {
    padding-block-start: var(--space-4);
    border-block-start: var(--border);
  }

  .showcase:has(.p04-carry) .showcase__name {
    font-size: 0.6875rem;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  /* two columns only once the copy column is wide enough for them */
  @media (min-width: 70rem) {
    .showcase:has(.p04-carry) .showcase__items {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .showcase:has(.p04-carry) .showcase__item + .showcase__item {
      padding-block-start: 0;
      padding-inline-start: var(--space-4);
      border-block-start: 0;
      border-inline-start: var(--border);
    }
  }
}

@layer motion {
  @media screen and (prefers-reduced-motion: no-preference) {
    /* The live card: the booking button settles in once the last screen shows */
    html[data-fx~="diagrams"] .lcard.p04-card.is-live [data-at="5"].is-on .p04-book {
      animation: p04-pulse 1200ms var(--ease-out) 700ms both;
    }

    /* Problem 01: the menu scrolls past, the cursor's trail wanders down it,
       the exit arrow draws */
    html[data-fx~="diagrams"] .pb-spa-menu .p04-menu {
      animation: p04-scroll 2600ms var(--ease-out) 900ms both;
    }

    html[data-fx~="diagrams"] .pb-spa-menu .p04-trail {
      animation: p04-march 1800ms linear 1300ms both;
    }

    html[data-fx~="diagrams"] .pb-spa-menu .p04-leave {
      stroke-dasharray: 1;
      animation: p04-draw 700ms var(--ease-out) 1900ms both;
    }

    /* Problem 02: the bookings land one color at a time, then the rebook
       arrow draws back to the other pin */
    html[data-fx~="diagrams"] .pb-spa-calendar .p04-booking {
      transform-box: fill-box;
      transform-origin: center;
      animation: p04-pop 480ms var(--ease-pop) 1500ms both;
    }

    html[data-fx~="diagrams"] .pb-spa-calendar .p04-booking:nth-child(2n) {
      animation-delay: 1700ms;
    }

    html[data-fx~="diagrams"] .pb-spa-calendar .p04-booking--peach {
      animation-delay: 2200ms;
    }

    html[data-fx~="diagrams"] .pb-spa-calendar .p04-booking--peach:nth-child(2n) {
      animation-delay: 2400ms;
    }

    html[data-fx~="diagrams"] .pb-spa-calendar .p04-rebook {
      stroke-dasharray: 1;
      animation: p04-draw 900ms var(--ease-out) 2600ms both;
    }

    html[data-fx~="diagrams"] .pb-spa-calendar .p04-rebook--head {
      animation-delay: 3300ms;
    }

    /* Problem 03: the second page slides out from under the first as a copy */
    html[data-fx~="diagrams"] .pb-spa-copy .p04-page--two {
      animation: p04-copy 900ms var(--ease-out) 800ms both;
    }

    /* One brand, every location: the third mini-site stands dotted until the
       section comes into view, then fills in */
    html.js-motion .showcase__visual[data-play] .p04-site--next :is(.p04-site__box, .p04-site__inside, .p04-site__label, .p04-site__dots),
    html.js-motion .showcase__visual[data-play] .p04-brand__line--next {
      transition: opacity 900ms var(--ease-out) 500ms;
    }

    html.js-motion .showcase__visual[data-play]:not(.is-in) .p04-site--next :is(.p04-site__box, .p04-site__inside, .p04-site__label),
    html.js-motion .showcase__visual[data-play]:not(.is-in) .p04-brand__line--next {
      opacity: 0;
    }

    html.js-motion .showcase__visual[data-play]:not(.is-in) .p04-site--next .p04-site__dots {
      opacity: 1;
    }

    /* What carries over: the three tiles rise in one by one; the second
       location appears last */
    html.js-motion .showcase__visual[data-play] .p04-tile {
      transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
    }

    html.js-motion .showcase__visual[data-play] .p04-tile--1 {
      transition-delay: 220ms;
    }

    html.js-motion .showcase__visual[data-play] .p04-tile--2 {
      transition-delay: 440ms;
    }

    html.js-motion .showcase__visual[data-play] .p04-second {
      transition: opacity 600ms var(--ease-out) 1300ms;
    }

    html.js-motion .showcase__visual[data-play]:not(.is-in) .p04-tile {
      opacity: 0;
      transform: translateY(14px);
    }

    html.js-motion .showcase__visual[data-play]:not(.is-in) .p04-second {
      opacity: 0;
    }

    /* The rest of the needs: the form draws itself field by field; last
       month's special leaves and this month's arrives; the search result
       rises and its pin lights up */
    html.js-motion .minis__drawing[data-play]:not(.is-in) :is(.p04-field, .p04-month--new, .p04-result) {
      opacity: 0;
    }

    html.js-motion .minis__drawing[data-play].is-in .p04-field {
      animation: p04-in 520ms var(--ease-out) both;
    }

    html.js-motion .minis__drawing[data-play].is-in .p04-field--1 { animation-delay: 380ms; }
    html.js-motion .minis__drawing[data-play].is-in .p04-field--2 { animation-delay: 760ms; }
    html.js-motion .minis__drawing[data-play].is-in .p04-field--3 { animation-delay: 1140ms; }
    html.js-motion .minis__drawing[data-play].is-in .p04-field--4 { animation-delay: 1600ms; }

    html.js-motion .minis__drawing[data-play].is-in .p04-month--old {
      animation: p04-in-out 3200ms var(--ease-out) 200ms both;
    }

    html.js-motion .minis__drawing[data-play].is-in .p04-month--new {
      animation: p04-in 600ms var(--ease-out) 3200ms both;
    }

    html.js-motion .minis__drawing[data-play].is-in .p04-result {
      animation: p04-in 700ms var(--ease-out) 300ms both;
    }

    html.js-motion .minis__drawing[data-play].is-in .p04-result__pin {
      animation: p04-light 600ms var(--ease-out) 1100ms both;
    }
  }

  @media screen and (prefers-reduced-motion: no-preference) {
    /* The location switcher's auto-play: a thin bar fills under the current
       tab until the next one; a page fades in as its tab is chosen */
    .p04-locs.is-auto .p04-locs__tab[aria-selected="true"]::after {
      content: "";
      position: absolute;
      inset: auto 0 0;
      height: 3px;
      background: var(--color-ink);
      transform-origin: left center;
      animation: p04-step var(--locs-step, 4000ms) linear both;
    }

    .p04-locs.is-live .p04-locs__panel:not([data-off]) {
      animation: p04-in 480ms var(--ease-out) both;
    }
  }

  @keyframes p04-step {
    from {
      transform: scaleX(0);
    }

    to {
      transform: scaleX(1);
    }
  }

  @keyframes p04-pulse {
    0% {
      box-shadow: 0 0 0 0 var(--color-brand-glow-strong);
      transform: scale(1);
    }

    40% {
      transform: scale(1.03);
    }

    100% {
      box-shadow: 0 0 0 0.75rem var(--color-brand-clear);
      transform: scale(1);
    }
  }

  @keyframes p04-scroll {
    from {
      transform: translateY(48px);
    }

    to {
      transform: none;
    }
  }

  @keyframes p04-march {
    from {
      stroke-dashoffset: 220;
    }

    to {
      stroke-dashoffset: 0;
    }
  }

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

    to {
      stroke-dashoffset: 0;
    }
  }

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

    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes p04-copy {
    from {
      opacity: 0;
      transform: translateX(-114px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes p04-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes p04-in-out {
    0% {
      opacity: 0;
      transform: translateY(10px);
    }

    14% {
      opacity: 1;
      transform: none;
    }

    78% {
      opacity: 1;
      transform: none;
    }

    92% {
      opacity: 0;
      transform: translateY(-8px);
    }

    100% {
      opacity: 0;
    }
  }

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