/*
 * Scroll mockup, layout "diagram" (site/snippets/blocks/scrollmock.php; first
 * on the nanny agency page's "What it needs to do", 2026-11-18; any mockup
 * that prints $marks can use it): the heading and
 * intro, the whole mockup centered and large with a numbered marker on each
 * item's part, then the items in a numbered grid. Pointing at or focusing an
 * item lights its part (public/assets/js/jobmap.js, the .is-tracking and
 * .is-lit rules of the mockups in industry.css); nothing sticks or moves
 * with the scroll. Linked in the body right before the section
 * (peanut_page_css() in the snippet). Layer: blocks. Tokens only.
 */

@layer blocks {
  .jobmap__head {
    max-width: 44rem;
    margin-block-end: var(--space-5);
  }

  .jobmap__title {
    margin: 0;
  }

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

  /* ---------- The mockup, any of site/snippets/mockups/: centered, with a
     numbered marker on each item's part (top left of the part) ---------- */

  .jobmap__stage {
    max-width: 56rem;
    margin-inline: auto;
    padding: var(--space-3) var(--space-2) 0;
  }

  .jobmap .mock {
    overflow: visible;
  }

  .jobmap .mock__part {
    position: relative;
  }

  .jobmap .mock__mark {
    position: absolute;
    inset-block-start: -0.875rem;
    inset-inline-start: -0.875rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
  }

  .jobmap .mock__part.is-lit .mock__mark {
    background: var(--color-ink);
    color: var(--color-white);
  }

  /* ---------- The browser mockup (mockups/nanny-agency.php): larger type,
     the parts in two columns from tablets ---------- */

  .jobmap .mock--browser .mock__bar {
    border-start-start-radius: var(--radius-sm);
    border-start-end-radius: var(--radius-sm);
  }

  .jobmap .mock--browser .mock__has-list {
    position: relative;
  }

  /* phones: the press strip keeps its label on one line */
  .jobmap .mock--browser .mock__press > span:not([class]) {
    white-space: nowrap;
  }

  /* the badges row: the list inside the part keeps its grid */
  .jobmap .mock--browser .mock__badges-wrap .mock__badges {
    padding: 0;
  }

  @media (min-width: 48rem) {
    .jobmap .mock--browser {
      font-size: 0.8125rem;
    }

    .jobmap .mock--browser .mock__body {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      grid-auto-flow: row dense;
      gap: var(--space-3);
      padding: var(--space-3) var(--space-4) var(--space-4);
    }

    .jobmap .mock--browser .mock__body > :not(.mock__card) {
      grid-column: 1 / -1;
    }

    .jobmap .mock--browser .mock__hero {
      padding: var(--space-4) var(--space-3);
    }

    .jobmap .mock--browser .mock__list {
      width: 11rem;
    }
  }

  @media (min-width: 64rem) {
    .jobmap .mock--browser {
      font-size: 0.9375rem;
    }

    .jobmap .mock--browser .mock__logo {
      font-size: var(--step-1);
    }
  }

  /* ---------- The items: numbered to match, a list on phones, two across on
     tablets, three across on wide screens (four when there are seven or
     eight, so no row is left with one) ---------- */

  .jobmap__jobs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin: var(--space-6) 0 0;
    padding: 0;
    list-style: none;
  }

  .jobmap__job {
    --jobmap-cols: 1;
    flex: 0 0 calc((100% - (var(--jobmap-cols) - 1) * var(--space-3)) / var(--jobmap-cols));
    min-width: 0;
    padding: var(--space-3);
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-sm);
    transition: background-color 200ms var(--ease-out);
  }

  .section--white .jobmap__job {
    background: var(--color-paper);
  }

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

  .jobmap__job.is-current,
  .jobmap__job:focus-within {
    background: var(--color-mint-pale);
  }

  .jobmap__num {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-block-end: var(--space-2);
    border: var(--border);
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
  }

  .jobmap__job.is-current .jobmap__num,
  .jobmap__job:focus-within .jobmap__num {
    background: var(--color-ink);
    color: var(--color-white);
  }

  .jobmap__name {
    margin: 0 0 var(--space-1);
    font-size: var(--step-2);
  }

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

  @media (min-width: 48rem) {
    .jobmap__job {
      --jobmap-cols: 2;
    }
  }

  @media (min-width: 64rem) {
    .jobmap__job {
      --jobmap-cols: 3;
    }

    .jobmap__jobs--n7 .jobmap__job,
    .jobmap__jobs--n8 .jobmap__job {
      --jobmap-cols: 4;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .jobmap .mock__mark,
    .jobmap__job {
      transition: none;
    }
  }
}
