/**
 * Coaches page, final pass (2026-11-21): the two new readable visuals,
 * p08x-path (One path, one button) and p08x-proof (Proof, and room for
 * people who are not ready yet). Loaded for the class prefix p08x-
 * (site/plugins/peanut-site/extensions/stylesheets.php). Tokens only.
 * Layer blocks for the static state (the still is the finished one), layer
 * motion for what moves. Nothing changes size when the scripts run: the
 * drawn steps and labels turn into buttons of the same size, and the hint
 * and the switch keep their space while hidden.
 */

@layer blocks {
  /* ---------- Shared: a sample site in a browser frame ---------- */

  .p08x-path,
  .p08x-proof {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    margin: 0;
    font-size: var(--step--1);
    line-height: 1.5;
  }

  /* the hints are the shared ones (snippets/demo/hint.php, industry.css);
     the hints and the switch keep their space until the script shows them */
  .p08x-path:not(.is-live) :is(.p08x-path__hint, .p08x-path__mhint, .p08x-path__switch),
  .p08x-proof:not(.is-live) .p08x-proof__hint {
    visibility: hidden;
  }

  .p08x-path__frame,
  .p08x-proof__frame {
    overflow: hidden;
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-sm);
  }

  .p08x-path__bar,
  .p08x-proof__bar {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    min-width: 0;
    margin: 0;
    padding: 0.5rem 0.875rem;
    border-block-end: var(--border);
    font-size: 0.75rem;
  }

  /* three small dots, the browser frame's buttons */
  .p08x-path__dots,
  .p08x-proof__dots {
    flex: none;
    width: 0.375rem;
    height: 0.375rem;
    margin-inline-end: 1.25rem;
    background: var(--color-ink);
    border-radius: 50%;
    box-shadow: 0.625rem 0 0 var(--color-ink), 1.25rem 0 0 var(--color-ink);
    opacity: 0.45;
  }

  .p08x-path__tag,
  .p08x-proof__tag {
    flex: none;
    padding: 0.0625rem 0.5rem;
    background: var(--color-brand);
    border-radius: var(--radius-pill);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .p08x-path__url,
  .p08x-proof__url {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .p08x-path__cap,
  .p08x-proof__cap {
    margin: 0;
    font-size: 0.75rem;
  }

  /* the drawn buttons of the sample site: pictures, not controls */
  .p08x-path__btn,
  .p08x-proof__btn {
    display: inline-block;
    padding: 0.4375rem 0.75rem;
    background: var(--color-ink);
    border: 1px solid var(--color-ink);
    border-radius: var(--radius-pill);
    color: var(--color-white);
    font-size: 0.625rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
  }

  /* ---------- One path, one button (visuals/p08x-path) ---------- */

  .p08x-path__steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .p08x-path__stepslot {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  /* a small chevron after each step but the last, so a wrapped row never
     starts with one */
  .p08x-path__stepslot:not(:last-child)::after {
    content: "";
    width: 0.375rem;
    height: 0.375rem;
    border-block-start: 1.5px solid var(--color-ink);
    border-inline-end: 1.5px solid var(--color-ink);
    transform: rotate(45deg);
  }

  .p08x-path__step {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    min-height: 2.75rem;
    margin: 0;
    padding: 0.375rem 1rem 0.375rem 0.4375rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-pill);
    color: var(--color-ink);
    font: inherit;
    font-weight: 500;
    line-height: 1.3;
    text-align: start;
  }

  .p08x-path__num {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--color-brand);
    border: var(--border);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
  }

  button.p08x-path__step,
  .p08x-path__mode {
    cursor: pointer;
  }

  .p08x-path__step[aria-pressed="true"] {
    background: var(--color-ink);
    color: var(--color-white);
  }

  .p08x-path__step[aria-pressed="true"] .p08x-path__num {
    border-color: var(--color-white);
    color: var(--color-ink);
  }

  .p08x-path__step:focus-visible,
  .p08x-path__mode:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
  }

  .p08x-path__url {
    flex: 1 1 auto;
  }

  /* the camera's window: the page inside may zoom while it plays */
  .p08x-path__view {
    overflow: hidden;
  }

  .p08x-path__page {
    display: grid;
    gap: 0.625rem;
    padding: 0.875rem var(--space-2) var(--space-2);
    transform-origin: 0 0;
  }

  .p08x-path__top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    padding-block-end: 0.625rem;
    border-block-end: 1px solid var(--color-ink-line-faint);
  }

  .p08x-path__logo {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: var(--weight-heading);
  }

  .p08x-path__btn--sm {
    padding: 0.3125rem 0.625rem;
    font-size: 0.5625rem;
  }

  .p08x-path__btn--even {
    width: 9rem;
    padding-inline: 0.5rem;
  }

  .p08x-path__hero {
    display: grid;
    gap: 0.375rem;
    padding-block: 0.25rem 0.375rem;
  }

  .p08x-path__h,
  .p08x-path__name,
  .p08x-path__endh {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: var(--weight-heading);
    line-height: 1.2;
  }

  .p08x-path__h {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5625rem);
  }

  .p08x-path__sub,
  .p08x-path__text,
  .p08x-path__kicker {
    margin: 0;
    font-size: 0.75rem;
  }

  /* one button or two share one cell, so the hero never changes height */
  .p08x-path__cta {
    position: relative;
    display: grid;
    justify-items: start;
    margin-block-start: 0.375rem;
  }

  .p08x-path__one,
  .p08x-path__two {
    grid-area: 1 / 1;
  }

  .p08x-path__two {
    display: flex;
    gap: 0.5rem;
    visibility: hidden;
  }

  .p08x-path[data-mode="two"] .p08x-path__two {
    visibility: visible;
  }

  .p08x-path[data-mode="two"] .p08x-path__one {
    visibility: hidden;
  }

  /* the shared cursor; its tip sits between the two buttons (9rem each
     and the 0.5rem gap), moved left onto the one button */
  .p08x-path .p08x-path__cursor {
    position: absolute;
    top: 1rem;
    left: 9.25rem;
    width: 1.25rem;
    pointer-events: none;
    transform: translateX(-3rem);
  }

  .p08x-path[data-mode="two"] .p08x-path__cursor {
    transform: none;
  }

  /* where a step lives on the sample page: lit when its step is chosen */
  .p08x-path__area {
    display: grid;
    gap: 0.375rem;
    justify-items: start;
    padding: 0.5rem 0.625rem;
    border: 1px dashed var(--color-ink-track);
    border-radius: 0.5rem;
  }

  .p08x-path__area[data-lit] {
    background: var(--color-brand);
    border: var(--border);
  }

  .p08x-path__kicker {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .p08x-path__card {
    display: grid;
    gap: 0.375rem;
    justify-items: start;
    width: 100%;
    padding: 0.625rem 0.75rem 0.75rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: 0.5rem;
  }

  .p08x-path__name {
    font-size: 1.0625rem;
  }

  .p08x-path__end {
    display: grid;
    gap: 0.5rem;
    justify-items: start;
    padding-block-start: 0.75rem;
    border-block-start: 1px solid var(--color-ink-line-faint);
  }

  .p08x-path__endh {
    font-size: 1.125rem;
  }

  /* a place of the one button: a coral ring and its number, 1 to 4 */
  .p08x-path__place {
    position: relative;
    display: inline-block;
  }

  .p08x-path__place .p08x-path__btn {
    box-shadow: 0 0 0 3px var(--color-accent-2);
  }

  .p08x-path__mark {
    position: absolute;
    inset-block-start: -0.625rem;
    inset-inline-end: -0.625rem;
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--color-accent-2);
    border: var(--border);
    border-radius: 50%;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
  }

  .p08x-path__place[data-off] .p08x-path__btn,
  .p08x-path[data-mode="two"] .p08x-path__place .p08x-path__btn {
    box-shadow: none;
  }

  .p08x-path__place[data-off] .p08x-path__mark,
  .p08x-path[data-mode="two"] .p08x-path__mark {
    opacity: 0;
    transform: scale(0.4);
  }

  .p08x-path__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    justify-content: space-between;
  }

  .p08x-path__count {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
  }

  /* the switch under its own hint */
  .p08x-path__choose {
    display: grid;
    gap: 0.375rem;
    justify-items: start;
  }

  .p08x-path__switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .p08x-path__mode {
    min-height: 2.75rem;
    margin: 0;
    padding: 0.5rem 1rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-pill);
    color: var(--color-ink);
    font: inherit;
    font-weight: 500;
  }

  .p08x-path__mode[aria-pressed="true"] {
    background: var(--color-ink);
    color: var(--color-white);
  }

  /* ---------- Proof, and room for people who aren't ready yet
     (visuals/p08x-proof) ---------- */

  .p08x-proof__switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* without the script a key; with it a switch of the same size */
  .p08x-proof__pick {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    min-height: 2.75rem;
    margin: 0;
    padding: 0.5rem 1rem 0.5rem 0.75rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: var(--radius-pill);
    color: var(--color-ink);
    font: inherit;
    font-weight: 500;
    line-height: 1.3;
  }

  /* the path's color, a small swatch */
  .p08x-proof__pick::before {
    content: "";
    flex: none;
    width: 0.875rem;
    height: 0.875rem;
    background: var(--color-brand);
    border: var(--border);
    border-radius: 50%;
  }

  .p08x-proof__pick--later::before {
    background: var(--color-butter);
  }

  button.p08x-proof__pick {
    cursor: pointer;
  }

  .p08x-proof__pick[aria-pressed="true"] {
    background: var(--color-ink);
    color: var(--color-white);
  }

  .p08x-proof__pick[aria-pressed="true"]::before {
    border-color: var(--color-white);
  }

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

  .p08x-proof__url {
    flex: 1 1 auto;
  }

  /* the frame is the container: its width decides the layout inside */
  .p08x-proof__frame {
    container: p08x-proof / inline-size;
  }

  .p08x-proof__page {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-2);
  }

  /* each path: the main one mint, the one beside it butter, drawn smaller
     and offset */
  .p08x-proof__path {
    display: grid;
    gap: 0.75rem;
    align-content: start;
    justify-items: start;
    min-width: 0;
    padding: 0.875rem;
    background: var(--color-brand);
    border: var(--border);
    border-radius: 0.625rem;
  }

  .p08x-proof__path--later {
    gap: 0.625rem;
    margin-inline-start: var(--space-3);
    padding: 0.75rem;
    background: var(--color-butter);
    font-size: 0.75rem;
  }

  .p08x-proof__pair {
    display: grid;
    gap: 0.625rem;
    width: 100%;
  }

  .p08x-proof__card,
  .p08x-proof__quote,
  .p08x-proof__guide,
  .p08x-proof__news {
    display: grid;
    gap: 0.375rem;
    align-content: start;
    min-width: 0;
    padding: 0.625rem 0.75rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: 0.5rem;
  }

  .p08x-proof__guide,
  .p08x-proof__news {
    justify-items: start;
    width: 100%;
  }

  .p08x-proof__name,
  .p08x-proof__words,
  .p08x-proof__gname {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: var(--weight-heading);
    line-height: 1.2;
  }

  .p08x-proof__name {
    font-size: 1.0625rem;
  }

  .p08x-proof__words {
    font-size: 1.125rem;
  }

  .p08x-proof__gname {
    font-size: 1rem;
  }

  .p08x-proof__list {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    font-size: 0.75rem;
    list-style: none;
  }

  /* a small check before each line */
  .p08x-proof__list li {
    position: relative;
    padding-inline-start: 1rem;
  }

  .p08x-proof__list li::before {
    content: "";
    position: absolute;
    inset-block-start: 0.3em;
    inset-inline-start: 0.125rem;
    width: 0.3125rem;
    height: 0.5625rem;
    border-block-end: 1.5px solid var(--color-ink);
    border-inline-end: 1.5px solid var(--color-ink);
    transform: rotate(45deg);
  }

  /* the quote sits beside the package, a tail pointing at it */
  .p08x-proof__quote {
    position: relative;
  }

  .p08x-proof__sample,
  .p08x-proof__kicker {
    justify-self: start;
    margin: 0;
    padding: 0.0625rem 0.5rem;
    background: var(--color-butter);
    border-radius: var(--radius-pill);
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .p08x-proof__kicker {
    background: var(--color-brand);
  }

  .p08x-proof__who,
  .p08x-proof__ntext,
  .p08x-proof__wait {
    margin: 0;
    font-size: 0.75rem;
  }

  .p08x-proof__who {
    font-weight: 600;
  }

  .p08x-proof__btn--line {
    background: var(--color-white);
    color: var(--color-ink);
  }

  .p08x-proof__btn--sm {
    flex: none;
    padding: 0.375rem 0.625rem;
    font-size: 0.5625rem;
  }

  /* a picture of a form: a field and a button, nothing to type in */
  .p08x-proof__form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
    width: 100%;
  }

  .p08x-proof__field {
    flex: 1 1 6rem;
    min-width: 0;
    padding: 0.3125rem 0.5rem;
    background: var(--color-paper);
    border: 1px dashed var(--color-ink);
    border-radius: 0.375rem;
    font-size: 0.6875rem;
  }

  .p08x-proof__wait {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: var(--weight-heading);
  }

  /* the quote beside the package once there is room */
  @container p08x-proof (min-width: 24rem) {
    .p08x-proof__pair {
      grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }
  }

  /* wide: the main path full width on top (the package and the quote side
     by side, the button under them); the second path below it, smaller and
     offset to the right, its guide and newsletter side by side, so it reads
     as beside the main path and never in its way */
  @container p08x-proof (min-width: 34rem) {
    .p08x-proof__path--later {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      align-items: stretch;
      margin-inline-start: 18%;
    }

    .p08x-proof__wait {
      grid-column: 1 / -1;
    }
  }

  /* with the script: the chosen path drawn full, the other one quieter in
     place (a dashed line, no fill, a touch smaller); text stays full ink */
  .p08x-proof[data-view="ready"] .p08x-proof__path--later,
  .p08x-proof[data-view="later"] .p08x-proof__path--ready {
    background: var(--color-white);
    border-style: dashed;
    transform: scale(0.96);
  }

  .p08x-proof[data-view="ready"] .p08x-proof__path--ready,
  .p08x-proof[data-view="later"] .p08x-proof__path--later {
    box-shadow: 4px 4px 0 var(--color-ink);
  }

  .p08x-proof__path--ready {
    transform-origin: 0 0;
  }

  .p08x-proof__path--later {
    transform-origin: 100% 0;
  }

  /* Print: the still, as without the script */
  @media print {
    .p08x-path__choose,
    .p08x-path__cursor {
      display: none;
    }

    .p08x-path__page {
      transform: none;
    }

    .p08x-proof__path {
      transform: none;
    }
  }
}

@layer motion {
  @media screen and (prefers-reduced-motion: no-preference) {
    /* the camera glides between the four places */
    .p08x-path.is-live .p08x-path__page {
      transition: transform 800ms var(--ease-out);
    }

    .p08x-path.is-live .p08x-path__area,
    .p08x-path.is-live .p08x-path__place .p08x-path__btn {
      transition: background-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
    }

    .p08x-path.is-live .p08x-path__mark {
      transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
    }

    /* Two buttons: the cursor hesitates between them, then stays between */
    .p08x-path.is-moved[data-mode="two"] .p08x-path__cursor {
      animation: p08x-hesitate 3200ms var(--ease) both;
    }

    /* One button: the cursor goes straight to it */
    .p08x-path.is-moved[data-mode="one"] .p08x-path__cursor {
      animation: p08x-straight 900ms var(--ease-out) both;
    }

    .p08x-proof.is-live .p08x-proof__path {
      transition: transform 400ms var(--ease-out), background-color 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
    }
  }

  @keyframes p08x-hesitate {
    0% {
      transform: translateX(-3rem);
    }

    20% {
      transform: translate(-4.25rem, 0.125rem);
    }

    42% {
      transform: translate(4rem, 0);
    }

    62% {
      transform: translate(-3rem, 0.125rem);
    }

    82% {
      transform: translate(2.25rem, 0);
    }

    100% {
      transform: none;
    }
  }

  @keyframes p08x-straight {
    0% {
      opacity: 0;
      transform: translate(4rem, 2.5rem);
    }

    25% {
      opacity: 1;
    }

    100% {
      transform: translateX(-3rem);
    }
  }
}
