/*
 * Midwife and birth center page (classes p07-) and the three blocks its
 * brief introduced, which any industry page can use: the Stage timeline
 * (stagetimeline), the Style slider (styleslider) and the Photo hotspots
 * (hotspots). 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 style slider's two wrong looks (cold, homemade) are built from the
 * system's own tokens and faces: ink at an alpha and grey boxes for the
 * cold one, the heading italic against heavy caps, tilts and clip art
 * shapes for the homemade one. No foreign color or typeface.
 */

@layer blocks {
  /* ---------- Live card midwife-credentials: the name, the badges one by
     one, the two buttons, then the book button with the due month chips.
     The static card is the finished one. ---------- */

  .p07-card__name {
    margin-block-end: var(--space-1);
  }

  .p07-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0 0 var(--space-2);
    padding: 0;
    list-style: none;
  }

  .p07-badge {
    padding: 0.1875rem 0.5rem;
    background: var(--color-brand);
    border: var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.3;
  }

  .p07-card__choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-block-end: var(--space-2);
  }

  .p07-card .lcard__choice {
    padding-inline: 0.5rem;
    font-size: 0.75rem;
  }

  /* ---------- The drawings' own parts (the problems, the birth suite, the
     service area map): the static drawing is the finished one ---------- */

  .diagram .p07-tick {
    stroke: var(--color-ink);
    stroke-width: 1.5;
    opacity: 0.55;
  }

  .diagram .p07-cross,
  .diagram .p07-check {
    fill: none;
    stroke: var(--color-ink);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .diagram .p07-drop,
  .diagram .p07-walk,
  .diagram .p07-swing {
    fill: none;
    stroke: var(--color-ink);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 3 4;
    opacity: 0.5;
  }

  .diagram .p07-late {
    opacity: 0.55;
  }

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

  .diagram .p07-hour {
    fill: var(--color-accent-2);
    stroke: var(--color-ink);
    stroke-width: 1;
  }

  .diagram .p07-cold {
    opacity: 0.8;
  }

  .diagram .p07-coldbox {
    fill: var(--color-paper);
    stroke: var(--color-ink);
    stroke-width: 1;
    opacity: 0.55;
  }

  .diagram .p07-squiggle,
  .diagram .p07-ripple {
    fill: none;
    stroke: var(--color-accent-2);
    stroke-width: 2;
    stroke-linecap: round;
  }

  .diagram .p07-ripple {
    stroke: var(--color-ink);
    stroke-width: 1.2;
    opacity: 0.5;
  }

  .diagram .p07-floor {
    fill: var(--color-paper);
  }

  .diagram .p07-wall,
  .diagram .p07-door {
    fill: none;
    stroke: var(--color-ink);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .diagram .p07-wall--inner {
    stroke-width: 1.5;
    opacity: 0.35;
  }

  .diagram .p07-mat {
    fill: var(--color-white);
    stroke: var(--color-ink);
    stroke-width: 1;
    stroke-dasharray: 4 4;
    opacity: 0.7;
  }

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

  .diagram .p07-county {
    fill: var(--color-paper);
    stroke: var(--color-ink);
    stroke-width: 1.2;
    stroke-linejoin: round;
    opacity: 0.85;
  }

  .diagram .p07-radius {
    stroke-width: 1.5;
  }

  .diagram .p07-town {
    transform-box: fill-box;
    transform-origin: center;
  }

  /* the map's labels as tags, clear of the county lines */
  .diagram .p07-maptag {
    fill: var(--color-white);
    stroke: var(--color-ink);
    stroke-width: 1;
  }

  .diagram .p07-maptag--grey {
    stroke-opacity: 0.45;
  }

  .diagram .p07-leader {
    fill: none;
    stroke: var(--color-ink);
    stroke-width: 1.2;
    stroke-dasharray: 2 3;
    opacity: 0.5;
  }

  /* ---------- The two sample drawings beside the credentials copy
     (minis/p07-credentials, minis/p07-questions): wider than a small
     drawing, since each is half the section ---------- */

  .minis__drawing:has(.p07-sample) {
    max-width: none;
    margin-block-end: var(--space-3);
  }

  .p07-sample {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .p07-sample__page {
    display: grid;
    gap: 0.5rem;
    align-content: start;
    padding: var(--space-3);
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-sm);
  }

  .p07-sample__kicker {
    margin: 0;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  .p07-sample__h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--step-3);
    font-weight: var(--weight-heading);
    line-height: 1.1;
  }

  .p07-badges--sample {
    margin: 0;
  }

  .p07-bar {
    display: block;
    width: 70%;
    height: 0.375rem;
    background: var(--color-ink);
    border-radius: var(--radius-pill);
    opacity: 0.22;
  }

  .p07-bar--mid {
    width: 55%;
  }

  .p07-bar--short {
    width: 45%;
  }

  .p07-bar--tiny {
    width: 25%;
  }

  .p07-sample__btn {
    justify-self: start;
    margin-block-start: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--color-ink);
    color: var(--color-white);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  .p07-sample__about {
    display: grid;
    align-content: start;
    margin: 0;
    padding: 0 var(--space-2);
    list-style: none;
    border-inline-start: var(--border);
  }

  .p07-sample__fact {
    display: grid;
    gap: 0.375rem;
    padding: 0.625rem 0;
    border-block-end: 1px solid var(--color-ink-line-faint);
  }

  .p07-sample__fact:last-child {
    border-block-end: 0;
  }

  .p07-sample__fact b {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  .p07-sample__fact .p07-bar {
    margin: 0;
  }

  @media (min-width: 30rem) {
    .p07-sample--hero {
      grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
      align-items: start;
    }
  }

  .p07-qcard {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: 0.375rem var(--space-2);
    align-items: start;
    padding: 0.75rem var(--space-2);
    background: var(--color-white);
    border: var(--border);
    border-radius: 0.625rem;
  }

  .p07-qcard__num {
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--color-gold-soft);
    border: var(--border);
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
  }

  .p07-qcard__q {
    align-self: center;
    font-size: var(--step--1);
    font-weight: 500;
  }

  .p07-qcard__a {
    grid-column: 2;
    justify-self: start;
    padding: 0.3125rem 0.625rem;
    background: var(--color-paper);
    border: 1px dashed var(--color-ink);
    border-radius: 0.375rem;
    opacity: 0.75;
  }

  /* ---------- Stage timeline (blocks/stagetimeline): without the script
     the cards stacked, each under its stage's name; with it the hint, the
     previous and next buttons, the line with the stages as tabs and its
     progress fill, and one card at a time under it (every card in one grid
     cell, so the height never changes). Phones: the stages as a vertical
     list; from 48rem the line runs across. ---------- */

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

  .stagetimeline__title {
    margin: 0;
  }

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

  .stagetimeline__controls {
    margin-block-end: var(--space-3);
  }

  .stagetimeline__controls[hidden] {
    display: none;
  }

  .stagetimeline__top {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    justify-content: space-between;
    align-items: center;
    margin-block-end: var(--space-2);
  }

  /* the "Tap a stage" hint and its mark are the shared ones
     (snippets/demo/hint.php, industry.css) */

  .stagetimeline__steps {
    display: flex;
    gap: var(--space-2);
  }

  .stagetimeline__steps .btn[aria-disabled="true"] {
    opacity: 0.35;
    cursor: default;
  }

  .stagetimeline__track {
    position: relative;
  }

  .stagetimeline__ends {
    display: none;
  }

  .stagetimeline__tabs {
    position: relative;
    display: grid;
  }

  .stagetimeline__tab {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    min-height: 2.75rem;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    font-size: var(--step--1);
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
  }

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

  .stagetimeline__dot {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }

  .stagetimeline__label {
    padding: 0.3125rem 0.75rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
  }

  .stagetimeline__tab:hover .stagetimeline__label {
    border-color: var(--color-ink);
  }

  .stagetimeline__tab.is-past .stagetimeline__dot {
    background: var(--color-brand);
  }

  .stagetimeline__tab[aria-selected="true"] .stagetimeline__dot {
    background: var(--color-ink);
    color: var(--color-white);
    box-shadow: 2px 2px 0 var(--color-brand);
  }

  .stagetimeline__tab[aria-selected="true"] .stagetimeline__label {
    background: var(--color-brand);
    border-color: var(--color-ink);
    font-weight: 600;
  }

  /* the line through the dots (vertical on phones) and the fill up to the
     chosen stage: --n of --count */
  .stagetimeline__rail {
    position: absolute;
    top: 1.375rem;
    bottom: 1.375rem;
    left: calc(0.875rem - 1px);
    width: 2px;
    background: var(--color-ink-track);
  }

  .stagetimeline__fill {
    position: absolute;
    inset: 0;
    background: var(--color-ink);
    transform-origin: 50% 0;
    scale: 1 calc(var(--n) / (var(--count) - 1));
  }

  .stagetimeline__panels {
    display: grid;
    gap: var(--space-4);
  }

  .stagetimeline__card {
    position: relative;
    display: grid;
    gap: var(--space-3);
    align-content: start;
    padding: var(--space-3) var(--space-3) var(--space-4);
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-sm);
  }

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

  .stagetimeline__stage {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  .stagetimeline__num {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--color-gold-soft);
    border: var(--border);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    line-height: 1;
  }

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

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

  .stagetimeline__answer {
    margin: 0;
    font-size: var(--step-1);
    line-height: 1.5;
  }

  .stagetimeline__text {
    margin-block-start: var(--space-2);
    font-size: var(--step--1);
    line-height: var(--leading-body);
  }

  .stagetimeline__text p {
    margin: 0 0 0.5rem;
  }

  .stagetimeline__text p:last-child {
    margin-block-end: 0;
  }

  /* a plain step with a drawing or a Who line (the Network page,
     2026-11-23): the card is as tall as its own content. Phones: the
     drawing beside the step's name, the line and the Who line under both */
  .stagetimeline__card--plain {
    align-self: start;
  }

  .stagetimeline__card.stagetimeline__card--art {
    grid-template-columns: minmax(0, 1fr) 6rem;
    column-gap: var(--space-2);
  }

  .stagetimeline__card--art .stagetimeline__stage {
    grid-column: 1;
    grid-row: 1;
  }

  .stagetimeline__card--art .stagetimeline__art {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .stagetimeline__card--art .stagetimeline__show {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .stagetimeline__who {
    margin: var(--space-2) 0 0;
    padding-block-start: var(--space-2);
    border-block-start: 1px solid var(--color-ink-line-faint);
    font-size: var(--text-body);
    line-height: var(--leading-body);
  }

  .stagetimeline__wholabel {
    margin-inline-end: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  /* the shapes: panels after the steps, the container's full width, each
     with its drawing, title and text; stacked on phones */
  .stagetimeline__shapes {
    display: grid;
    gap: var(--space-3);
    margin-block-start: var(--space-3);
  }

  .stagetimeline__shape {
    display: grid;
    gap: var(--space-2);
    align-content: start;
    padding: var(--space-3);
    background: var(--color-paper);
    border: var(--border);
    border-radius: var(--radius-sm);
  }

  .stagetimeline__shapeart {
    margin-block-end: var(--space-1);
  }

  .stagetimeline__shapeart .diagram {
    max-width: 22rem;
    margin-inline: auto;
  }

  .stagetimeline__shapetitle {
    margin: 0;
    font-size: var(--step-2);
    line-height: 1.25;
  }

  .stagetimeline__shapetext {
    margin: 0;
  }

  .stagetimeline__shapes + .stagetimeline__outro {
    margin-block-start: var(--space-3);
  }

  /* the drawings' own bits (site/snippets/diagrams/step-*, shape-*) */
  .stagetimeline .diagram .st-strong {
    opacity: 1;
  }

  .stagetimeline .diagram .st-faint {
    opacity: 0.55;
  }

  .stagetimeline__outro {
    max-width: 44rem;
    margin: var(--space-4) 0 0;
  }

  /* an outro of paragraphs (the Network page: the two shapes) */
  .stagetimeline__outro--paras > p {
    margin: 0;
  }

  .stagetimeline__outro--paras > p + p {
    margin-block-start: var(--space-2);
  }

  /* with the script: one card at a time, all in one cell */
  .stagetimeline.is-live .stagetimeline__panels {
    gap: 0;
  }

  .stagetimeline.is-live .stagetimeline__card {
    grid-area: 1 / 1;
  }

  .stagetimeline.is-live .stagetimeline__card[data-off] {
    visibility: hidden;
  }

  @media (min-width: 48rem) {
    .stagetimeline__card {
      grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
      column-gap: var(--space-5);
      padding: var(--space-4);
    }

    .stagetimeline__stage {
      grid-column: 1 / -1;
    }

    .stagetimeline__text {
      max-width: 52ch;
    }

    /* the line across: the two ends over it, the stages as columns on it */
    .stagetimeline__ends {
      display: flex;
      justify-content: space-between;
      margin: 0 0 0.5rem;
      padding-inline: max(0px, calc(50% / var(--count) - 2.5rem));
      font-size: 0.6875rem;
      font-weight: 600;
      letter-spacing: var(--tracking-caps);
      line-height: 1rem;
      text-transform: uppercase;
      opacity: 0.7;
    }

    .stagetimeline__tabs {
      grid-template-columns: repeat(var(--count), minmax(0, 1fr));
      column-gap: 0;
    }

    .stagetimeline__tab {
      flex-direction: column;
      gap: 0.5rem;
      padding: 0.25rem 0.25rem 0.5rem;
      text-align: center;
    }

    .stagetimeline__rail {
      top: calc(1.5rem + 0.25rem + 0.875rem - 1px);
      right: calc(50% / var(--count));
      bottom: auto;
      left: calc(50% / var(--count));
      width: auto;
      height: 2px;
    }

    .stagetimeline__fill {
      transform-origin: 0 50%;
      scale: calc(var(--n) / (var(--count) - 1)) 1;
    }

    /* the caret on the open card points at its stage */
    .stagetimeline.is-live .stagetimeline__card::before {
      content: "";
      position: absolute;
      top: -0.5625rem;
      left: calc((var(--n) + 0.5) / var(--count) * 100%);
      width: 1rem;
      height: 1rem;
      background: var(--color-white);
      border-top: 1px solid var(--color-ink);
      border-left: 1px solid var(--color-ink);
      translate: -50% 0;
      rotate: 45deg;
    }

    /* a plain step: its line uses the card's width (no empty second
       column); with a drawing, the drawing stands on the right beside the
       name, the line and the Who line */
    .stagetimeline__card.stagetimeline__card--plain {
      grid-template-columns: minmax(0, 1fr);
    }

    .stagetimeline__card--plain .stagetimeline__show {
      max-width: 44rem;
    }

    .stagetimeline__card.stagetimeline__card--art {
      grid-template-columns: minmax(0, 1fr) 11rem;
      column-gap: var(--space-5);
      row-gap: var(--space-2);
      padding-block: var(--space-3);
    }

    .stagetimeline__card--art .stagetimeline__show {
      grid-column: 1;
    }

    .stagetimeline__card--art .stagetimeline__art {
      grid-row: 1 / span 2;
    }

    .stagetimeline__shapes {
      grid-auto-columns: minmax(0, 1fr);
      grid-auto-flow: column;
      gap: var(--space-4);
      margin-block-start: var(--space-4);
    }

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

  @media print {
    .stagetimeline__controls {
      display: none;
    }

    .stagetimeline.is-live .stagetimeline__panels {
      gap: var(--space-3);
    }

    .stagetimeline.is-live .stagetimeline__card {
      grid-area: auto;
      break-inside: avoid;
    }

    .stagetimeline.is-live .stagetimeline__card[data-off] {
      visibility: visible;
    }

    .stagetimeline.is-live .stagetimeline__card::before {
      content: none;
    }
  }

  /* ---------- Style slider (blocks/styleslider, now a style switcher): the
     sample header and the three looks as cards that choose it (the sample
     first on phones). The looks are on the block's state class, --s0, --s1
     and --s2. ---------- */

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

  .styleslider__title {
    margin: 0;
  }

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

  .styleslider__grid {
    display: grid;
    gap: var(--space-5);
  }

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

  .styleslider [data-state] {
    display: none;
  }

  .styleslider--s0 [data-state="0"],
  .styleslider--s1 [data-state="1"],
  .styleslider--s2 [data-state="2"] {
    display: block;
  }

  .styleslider__page {
    overflow: hidden;
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-sm);
    color: var(--color-ink);
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .styleslider__bar {
    display: flex;
    gap: var(--space-2);
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem var(--space-3);
    background: var(--color-paper);
    border-block-end: var(--border);
  }

  .styleslider__brand {
    font-family: var(--font-heading);
    font-size: var(--step-1);
    font-weight: var(--weight-heading);
    line-height: 1.1;
  }

  .styleslider__nav {
    display: flex;
    gap: 0.5rem;
  }

  .styleslider__nav i {
    width: 1.5rem;
    height: 0.3125rem;
    background: var(--color-ink);
    border-radius: var(--radius-pill);
    opacity: 0.35;
  }

  .styleslider__hero {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-3);
  }

  .styleslider__art {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 0.5rem;
  }

  .styleslider__icons {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: 64%;
  }

  .styleslider__icons i {
    aspect-ratio: 1;
    background: var(--color-ink-line-faint);
    border: 1px solid var(--color-ink-track);
    border-radius: 0.25rem;
  }

  .styleslider__photo {
    display: none;
    position: absolute;
    inset: 0;
    background: var(--gradient-home-wash);
    border: 1px solid var(--color-ink);
    border-radius: 0.5rem;
  }

  .styleslider__photo::after {
    content: "";
    position: absolute;
    right: 12%;
    bottom: 0;
    width: 46%;
    height: 68%;
    background: var(--color-butter);
    border: 1px solid var(--color-ink);
    border-radius: 45% 45% 0 0;
    opacity: 0.9;
  }

  .styleslider__clip {
    display: none;
    position: absolute;
  }

  .styleslider__clip--heart {
    top: 22%;
    left: 18%;
    width: 2.25rem;
    height: 2.25rem;
    background: var(--color-accent-2);
    rotate: -45deg;
  }

  .styleslider__clip--heart::before,
  .styleslider__clip--heart::after {
    content: "";
    position: absolute;
    width: 2.25rem;
    height: 2.25rem;
    background: var(--color-accent-2);
    border-radius: 50%;
  }

  .styleslider__clip--heart::before {
    top: -1.125rem;
    left: 0;
  }

  .styleslider__clip--heart::after {
    top: 0;
    left: 1.125rem;
  }

  .styleslider__clip--flower {
    right: 18%;
    bottom: 18%;
    width: 3rem;
    height: 3rem;
    rotate: 12deg;
  }

  .styleslider__clip--flower i,
  .styleslider__clip--flower::after {
    content: "";
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--color-butter);
    border: 1px solid var(--color-ink);
    border-radius: 50%;
  }

  .styleslider__clip--flower i:nth-child(1) { top: 0; left: 0.875rem; }
  .styleslider__clip--flower i:nth-child(2) { top: 0.875rem; left: 0; }
  .styleslider__clip--flower i:nth-child(3) { top: 0.875rem; right: 0; }
  .styleslider__clip--flower i:nth-child(4) { bottom: 0; left: 0.875rem; }

  .styleslider__clip--flower::after {
    top: 0.875rem;
    left: 0.875rem;
    background: var(--color-brand);
  }

  .styleslider__words {
    display: grid;
    gap: 0.625rem;
    align-content: center;
  }

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

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

  .styleslider__badges li {
    padding: 0.1875rem 0.5rem;
    background: var(--color-brand);
    border: var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
  }

  .styleslider__sub {
    margin: 0;
  }

  .styleslider__btn {
    justify-self: start;
    margin-block-start: 0.25rem;
    padding: 0.5rem 0.875rem;
    background: var(--color-ink);
    color: var(--color-white);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  /* Yours: the warm photo, the badges under the name */
  .styleslider--s1 .styleslider__photo {
    display: block;
  }

  .styleslider--s1 .styleslider__badges {
    display: flex;
  }

  /* Clinical: ink and grey, a grid of icon boxes, caps written for colleagues */
  .styleslider--s0 .styleslider__page {
    background: var(--color-paper);
  }

  .styleslider--s0 .styleslider__bar {
    background: var(--color-ink);
    border-block-end-color: var(--color-ink);
    color: var(--color-white);
  }

  .styleslider--s0 .styleslider__brand {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  .styleslider--s0 .styleslider__nav i {
    background: var(--color-white);
    opacity: 0.6;
  }

  .styleslider--s0 .styleslider__art {
    background: var(--color-ink-line-faint);
    border: 1px solid var(--color-ink-track);
  }

  .styleslider--s0 .styleslider__icons {
    display: grid;
  }

  .styleslider--s0 .styleslider__headline {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: var(--weight-strong);
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
    opacity: 0.85;
  }

  .styleslider--s0 .styleslider__sub {
    font-size: 0.6875rem;
    opacity: 0.7;
  }

  .styleslider--s0 .styleslider__btn {
    background: none;
    border: 1.5px solid var(--color-ink);
    color: var(--color-ink);
    opacity: 0.8;
  }

  /* Homemade: butter and coral, the heading italic shouting against heavy
     caps, a heart and a flower, nothing lined up */
  .styleslider--s2 .styleslider__page {
    background: var(--color-butter);
    border: 3px dotted var(--color-accent-2);
    rotate: -1.5deg;
  }

  .styleslider--s2 .styleslider__bar {
    background: var(--color-accent-2);
    border-block-end: 2px dashed var(--color-ink);
  }

  .styleslider--s2 .styleslider__brand {
    font-size: var(--step-2);
    font-style: italic;
    text-shadow: 2px 2px 0 var(--color-white);
  }

  .styleslider--s2 .styleslider__art {
    background: var(--color-white);
    border: 2px dashed var(--color-accent-2);
    border-radius: 50% 50% 45% 45%;
  }

  .styleslider--s2 .styleslider__clip {
    display: block;
  }

  .styleslider--s2 .styleslider__words {
    text-align: center;
  }

  .styleslider--s2 .styleslider__headline {
    font-size: var(--step-4);
    font-style: italic;
    letter-spacing: 0.04em;
    text-shadow: 2px 2px 0 var(--color-accent-2);
    rotate: -2deg;
  }

  .styleslider--s2 .styleslider__sub {
    font-size: 0.6875rem;
    font-weight: var(--weight-strong);
    letter-spacing: 0.12em;
    text-decoration: underline wavy var(--color-accent-2);
    text-transform: uppercase;
  }

  .styleslider--s2 .styleslider__btn {
    justify-self: center;
    padding: 0.625rem 1.25rem;
    background: var(--color-accent-2);
    border: 2px dashed var(--color-ink);
    border-radius: var(--radius-pill);
    color: var(--color-ink);
    font-weight: var(--weight-strong);
    letter-spacing: 0.04em;
    text-transform: none;
    rotate: 2deg;
  }

  /* the three looks as cards; with the script they are the controls: a
     button in each heading whose hit area is the whole card, a ring that
     fills on the chosen one, and the chosen card in mint */
  .styleslider__choices {
    display: grid;
    gap: var(--space-2);
    align-content: start;
  }

  /* the "Tap a style" hint and its mark are the shared ones
     (snippets/demo/hint.php, industry.css) */

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

  .styleslider__version {
    position: relative;
    padding: var(--space-3);
    border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
    border-radius: var(--radius-sm);
  }

  .styleslider__version.is-current {
    background: color-mix(in srgb, currentColor 8%, transparent);
    border-color: currentColor;
  }

  .styleslider__name {
    margin: 0 0 0.25rem;
    font-family: var(--font-heading);
    font-size: var(--step-2);
    font-weight: var(--weight-heading);
    line-height: 1.2;
  }

  .styleslider__caption-text {
    margin: 0;
    font-weight: 500;
  }

  .styleslider__desc {
    margin: 0.5rem 0 0;
    font-size: var(--step--1);
    line-height: var(--leading-body);
    opacity: 0.85;
  }

  .styleslider__desc a {
    position: relative;
    z-index: 1;
  }

  .styleslider__pick {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .styleslider__pick::before {
    content: "";
    position: absolute;
    inset: 0;
  }

  .styleslider__pick:focus-visible {
    outline: none;
  }

  .styleslider.is-live .styleslider__version {
    padding-inline-end: calc(var(--space-3) + 2rem);
  }

  .styleslider.is-live .styleslider__version::after {
    content: "";
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 1.25rem;
    height: 1.25rem;
    border: 1.5px solid currentColor;
    border-radius: 50%;
  }

  .styleslider.is-live .styleslider__version:hover {
    border-color: currentColor;
  }

  .styleslider.is-live .styleslider__version.is-current {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: var(--color-ink);
  }

  .styleslider.is-live .styleslider__version.is-current::after {
    background: var(--color-ink);
    box-shadow: inset 0 0 0 3px var(--color-brand);
  }

  .styleslider__version:has(.styleslider__pick:focus-visible) {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
  }

  .styleslider__outro {
    max-width: 40rem;
    margin: var(--space-5) 0 0;
    font-size: var(--step-1);
    line-height: var(--leading-body);
  }

  @media (min-width: 48rem) {
    .styleslider__hero {
      grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
      align-items: center;
    }
  }

  @media (min-width: 60rem) {
    .styleslider__grid {
      grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
      column-gap: var(--space-6);
      align-items: start;
    }

    /* the sample stands level with the middle of the three cards */
    .styleslider__stage {
      align-self: center;
    }
  }

  /* ---------- Photo hotspots (blocks/hotspots): the picture with its
     marks and bubbles, the numbered list beside it, the side note under */

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

  .hotspots__title {
    margin: 0;
  }

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

  .hotspots__grid {
    display: grid;
    gap: var(--space-4);
  }

  /* the tap hint over the photo (snippets/demo/hint.php, industry.css) */
  .hotspots__hint {
    margin-block-end: var(--space-2);
  }

  .hotspots__frame {
    position: relative;
  }

  .hotspots__drawing {
    overflow: hidden;
    background: var(--color-paper);
    border: 1px solid var(--color-ink);
    border-radius: var(--radius-sm);
  }

  .hotspots__drawing .diagram {
    display: block;
  }

  .hotspots__want {
    margin: 0.625rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .hotspots__want .photo-slot__label {
    display: inline;
    margin: 0 0.375rem 0 0;
  }

  .hotspots__spot {
    position: absolute;
    top: var(--y);
    left: var(--x);
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    background: var(--color-gold-soft);
    border: var(--border);
    border-radius: 50%;
    box-shadow: 2px 2px 0 var(--color-ink);
    color: var(--color-ink);
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-decoration: none;
    translate: -50% -50%;
    transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
  }

  .hotspots__spot:hover,
  .hotspots__spot.is-open {
    background: var(--color-ink);
    color: var(--color-white);
  }

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

  .hotspots__bubble {
    position: absolute;
    top: var(--y);
    left: var(--x);
    z-index: 2;
    width: max-content;
    max-width: min(16rem, 72%);
    margin: 0;
    padding: 0.625rem 0.875rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: 0.625rem;
    box-shadow: 3px 3px 0 var(--color-ink);
    font-size: 0.75rem;
    line-height: 1.4;
    visibility: hidden;
    opacity: 0;
    translate: -50% calc(-100% - 1.5rem);
  }

  .hotspots__bubble strong {
    display: block;
    font-weight: 600;
  }

  .hotspots__bubble.is-left {
    translate: -1.25rem calc(-100% - 1.5rem);
  }

  .hotspots__bubble.is-right {
    translate: calc(-100% + 1.25rem) calc(-100% - 1.5rem);
  }

  .hotspots__bubble.is-low {
    translate: -50% 1.5rem;
  }

  .hotspots__bubble.is-low.is-left {
    translate: -1.25rem 1.5rem;
  }

  .hotspots__bubble.is-low.is-right {
    translate: calc(-100% + 1.25rem) 1.5rem;
  }

  .hotspots__bubble.is-open {
    visibility: visible;
    opacity: 1;
  }

  .hotspots__notes {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .hotspots__note {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.125rem var(--space-2);
    padding: var(--space-2);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out);
  }

  .hotspots__note.is-current {
    background: var(--color-brand);
    border-color: var(--color-ink);
  }

  .hotspots__note .hotspots__num {
    display: grid;
    grid-row: 1 / span 2;
    place-items: center;
    width: 2rem;
    height: 2rem;
    background: var(--color-gold-soft);
    border: var(--border);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out);
  }

  .hotspots__note.is-current .hotspots__num {
    background: var(--color-ink);
    color: var(--color-white);
  }

  .hotspots__name {
    grid-column: 2;
    align-self: center;
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--step-1);
    font-weight: var(--weight-heading);
    line-height: 1.2;
  }

  .hotspots__caption {
    grid-column: 2;
    margin: 0;
    font-size: var(--step--1);
    line-height: 1.5;
  }

  /* the two cards under the picture: the entrance (a door with a map pin,
     a sample address line) and the tour button (a drawing of the
     practice's own button on a small page, never a link) */
  .hotspots__cards {
    display: grid;
    gap: var(--space-3);
  }

  .hotspots__card {
    display: grid;
    gap: 0.5rem;
    align-content: start;
    padding: var(--space-3);
    background: var(--color-paper);
    border: var(--border);
    border-radius: var(--radius-sm);
  }

  .hotspots__cardart {
    display: flex;
    align-items: flex-end;
    height: 5.25rem;
    margin-block-end: 0.25rem;
  }

  .hotspots__cardart .diagram {
    width: auto;
    height: 100%;
  }

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

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

  .hotspots__cardtext {
    margin: 0;
    font-size: var(--step--1);
    line-height: 1.5;
  }

  .hotspots__address {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
  }

  .hotspots__pin {
    flex: none;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--color-brand);
    border: var(--border);
    border-radius: 50% 50% 50% 0;
    rotate: -45deg;
  }

  /* the small page the tour button sits on: a nav bar and two text lines,
     the button (the heading) laid over its lower half */
  .hotspots__mock {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.625rem 0.75rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: 0.5rem;
  }

  .hotspots__mockbar,
  .hotspots__mocklines {
    display: flex;
    gap: 0.375rem;
  }

  .hotspots__mockbar {
    justify-content: flex-end;
  }

  .hotspots__mockbar i,
  .hotspots__mocklines i {
    height: 0.3125rem;
    background: var(--color-ink);
    border-radius: var(--radius-pill);
    opacity: 0.2;
  }

  .hotspots__mockbar i {
    width: 1.5rem;
  }

  .hotspots__mocklines {
    flex-direction: column;
  }

  .hotspots__mocklines i:first-child {
    width: 62%;
    height: 0.4375rem;
    opacity: 0.35;
  }

  .hotspots__mocklines i:last-child {
    width: 44%;
  }

  .hotspots__card--tour .hotspots__cardtitle {
    position: relative;
    margin: -3.25rem 0 0.75rem 0.75rem;
  }

  .hotspots__demo {
    display: inline-block;
    padding: 0.625rem 1rem;
    background: var(--color-ink);
    border-radius: 0.375rem;
    box-shadow: 2px 2px 0 var(--color-brand);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .hotspots__aside {
    display: grid;
    gap: var(--space-3);
    margin-block-start: var(--space-2);
    padding-block-start: var(--space-4);
    border-block-start: var(--border);
  }

  .hotspots__asideart {
    max-width: 18rem;
  }

  .hotspots__asidetitle {
    margin: 0 0 var(--space-2);
  }

  .hotspots__asidetext {
    margin: 0;
  }

  .hotspots__outro {
    max-width: 44rem;
    margin: var(--space-4) 0 0;
  }

  @media (min-width: 48rem) {
    .hotspots__aside {
      grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
      column-gap: var(--space-5);
      align-items: center;
    }
  }

  @media (min-width: 40rem) {
    .hotspots__cards {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (min-width: 60rem) {
    .hotspots__grid {
      grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
      column-gap: var(--space-5);
      align-items: start;
    }

    /* the cards under the picture, the list beside both */
    .hotspots--cards .hotspots__stage {
      grid-area: 1 / 1;
    }

    .hotspots--cards .hotspots__notes {
      grid-column: 2;
      grid-row: 1 / span 2;
    }

    .hotspots--cards .hotspots__cards {
      grid-area: 2 / 1;
    }

    .hotspots__aside {
      grid-column: 1 / -1;
      margin-block-start: var(--space-3);
    }
  }
}

@layer motion {
  @media screen and (prefers-reduced-motion: no-preference) {
    /* The live card: each badge pops as it arrives */
    html[data-fx~="diagrams"] .lcard.is-live .p07-badge.is-on {
      animation: p07-pop 420ms var(--ease-pop) both;
    }

    /* Problem 02: the hour fills on the clock once the cards have landed */
    html[data-fx~="diagrams"] .pb-midwife-questions .p07-hour {
      transform-box: fill-box;
      transform-origin: 0% 100%;
      animation: p07-sweep 1100ms var(--ease-out) 1800ms both;
    }

    /* Problem 03: the heart on the homemade page beats twice */
    html[data-fx~="diagrams"] .pb-midwife-tone .p07-heart {
      transform-box: fill-box;
      transform-origin: center;
      animation: p07-beat 1400ms var(--ease-out) 1300ms both;
    }

    /* The credentials sample: the badges pop in one by one; the question
       cards rise one after another */
    html.js-motion .minis__drawing[data-play] .p07-badge {
      transition: opacity 360ms var(--ease-pop), transform 360ms var(--ease-pop);
      transition-delay: calc(var(--i, 0) * 180ms + 200ms);
    }

    html.js-motion .minis__drawing[data-play]:not(.is-in) .p07-badge {
      opacity: 0;
      transform: scale(0.6);
    }

    html.js-motion .minis__drawing[data-play] .p07-qcard {
      transition: opacity 420ms var(--ease-out), translate 420ms var(--ease-out);
      transition-delay: calc(var(--i, 0) * 160ms + 120ms);
    }

    html.js-motion .minis__drawing[data-play]:not(.is-in) .p07-qcard {
      opacity: 0;
      translate: 0 0.75rem;
    }

    /* The service area map: the towns pop in */
    html.js-motion .hotspots__asideart[data-play] .p07-town {
      transition: opacity 320ms var(--ease-pop), transform 320ms var(--ease-pop);
      transition-delay: calc(var(--i, 0) * 140ms + 300ms);
    }

    html.js-motion .hotspots__asideart[data-play]:not(.is-in) .p07-town {
      opacity: 0;
      transform: scale(0.4);
    }

    /* Stage timeline: the fill and the caret slide to the stage, the dots
       and the pill change color, the card rises */
    .stagetimeline__fill {
      transition: scale 600ms var(--ease-out);
    }

    .stagetimeline__dot,
    .stagetimeline__label {
      transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out), border-color 240ms var(--ease-out);
    }

    .stagetimeline.is-live .stagetimeline__card::before {
      transition: left 360ms var(--ease-out);
    }

    .stagetimeline.is-live .stagetimeline__card:not([data-off]) {
      animation: p07-rise 320ms var(--ease-out) both;
    }

    /* Its drawings: the tier hero's draw-in on load (motion-tiers.css) is
       off for them; a step's drawing settles in and its lines draw each
       time its step opens; the shapes stay still */
    html[data-fx~="diagrams"] .stagetimeline .st-art :is(.dg-line, .dg-ring, .dg-node, .dg-label) {
      animation: none;
    }

    html[data-fx~="diagrams"] .stagetimeline.is-live .stagetimeline__card:not([data-off]) .stagetimeline__art {
      animation: p07-settle 480ms var(--ease-out) 120ms both;
    }

    html[data-fx~="diagrams"] .stagetimeline.is-live .stagetimeline__card:not([data-off]) .st-art .dg-line {
      stroke-dasharray: 1;
      animation: p07-draw 640ms var(--ease-out) 320ms both;
    }

    /* Style slider: the looks blend into each other */
    .styleslider__page,
    .styleslider__bar,
    .styleslider__art,
    .styleslider__brand,
    .styleslider__btn {
      transition: background-color 420ms var(--ease-out), color 420ms var(--ease-out), border-color 420ms var(--ease-out), rotate 420ms var(--ease-out), opacity 420ms var(--ease-out);
    }

    .styleslider__version {
      transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out), color 240ms var(--ease-out);
    }

    /* Hotspots: the bubble rises out of its mark */
    .hotspots__bubble {
      transition: opacity 240ms var(--ease-out), visibility 240ms, translate 240ms var(--ease-out);
    }

    .hotspots__bubble:not(.is-open) {
      translate: -50% calc(-100% - 1rem);
    }

    .hotspots__bubble.is-left:not(.is-open) {
      translate: -1.25rem calc(-100% - 1rem);
    }

    .hotspots__bubble.is-right:not(.is-open) {
      translate: calc(-100% + 1.25rem) calc(-100% - 1rem);
    }

    .hotspots__bubble.is-low:not(.is-open) {
      translate: -50% 1rem;
    }

    .hotspots__bubble.is-low.is-left:not(.is-open) {
      translate: -1.25rem 1rem;
    }

    .hotspots__bubble.is-low.is-right:not(.is-open) {
      translate: calc(-100% + 1.25rem) 1rem;
    }
  }

  @keyframes p07-pop {
    from {
      transform: scale(0.6);
    }

    60% {
      transform: scale(1.1);
    }

    to {
      transform: none;
    }
  }

  @keyframes p07-sweep {
    from {
      transform: scale(0);
    }
  }

  @keyframes p07-beat {
    0%,
    100% {
      transform: none;
    }

    20%,
    60% {
      transform: scale(1.15);
    }

    40%,
    80% {
      transform: scale(1);
    }
  }

  @keyframes p07-rise {
    from {
      opacity: 0;
      translate: 0 0.5rem;
    }
  }

  @keyframes p07-settle {
    from {
      opacity: 0;
      scale: 0.92;
    }
  }

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