/* Quinta etapa ativa: Lavagem de mãos antes do módulo Unity. */
.journey-mobile-copy { display: none; }
.profile-page .learning-trail {
  min-height: 1660px;
  grid-template-rows: repeat(5, minmax(184px, 1fr)) minmax(164px, auto) minmax(210px, auto);
}

/* Percurso mobile; conserva ações e estado dos certificados, sem simular progresso. */
.learning-mobile-node, .learning-mobile-curve, .learning-mobile-certificate { display: none; }
@media (max-width: 900px) {
  .profile-page[data-profile-view="collaborator"] .profile-hero {
    min-height: 0; display: block; padding: 18px; border-radius: 18px;
    box-shadow: 0 5px 0 rgba(52, 27, 95, .1);
  }
  .profile-page[data-profile-view="collaborator"] .profile-hero-copy {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
    text-align: left;
  }
  .profile-page[data-profile-view="collaborator"] .profile-hero h1 {
    grid-column: 1 / -1; max-width: none; font-size: clamp(1.3rem, 5.5vw, 1.65rem); line-height: 1.25;
  }
  .profile-page[data-profile-view="collaborator"] [data-profile-hero-description],
  .profile-page[data-profile-view="collaborator"] .profile-hero-art,
  .profile-page[data-profile-view="collaborator"] .profile-hero-availability small,
  .profile-page[data-profile-view="collaborator"] .profile-hero-availability::after { display: none; }
  .profile-page[data-profile-view="collaborator"] .journey-mobile-copy {
    display: block; grid-column: 1 / -1; color: #655a71; font-size: .85rem; line-height: 1.5;
  }
  .profile-page[data-profile-view="collaborator"] .profile-hero-actions { margin: 0; align-self: center; }
  .profile-page[data-profile-view="collaborator"] .profile-primary-action {
    min-height: 44px; margin: 0; padding: 10px 12px; font-size: .8rem; justify-content: center;
  }
  .profile-page[data-profile-view="collaborator"] .profile-hero-availability {
    width: 100%; min-height: 44px; gap: 8px; margin: 0; padding: 8px; border-width: 1px; align-self: center;
  }
  .profile-page[data-profile-view="collaborator"] .profile-hero-availability strong { font-size: 1.6rem; }
  .profile-page[data-profile-view="collaborator"] .profile-hero-availability span { font-size: .62rem; line-height: 1.3; }
  .profile-page #profileCollaborator { margin-top: 24px; }
  .profile-page #profileCollaborator .profile-section-heading h2 { font-size: 1.2rem; line-height: 1.3; margin: 0; }
  .profile-page #profileCollaborator .profile-trail-note {
    margin-top: 8px; padding: 0; border: 0; background: transparent; box-shadow: none;
    font-size: .8rem; font-weight: 500; line-height: 1.5;
  }
  .profile-page #profileCollaborator .profile-trail-note > span { display: none; }
  .profile-page #profileCollaborator .learning-trail {
    min-height: 0; max-width: 620px; grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none; gap: 18px; margin: 18px auto 0; padding: 0;
  }
  .profile-page #profileCollaborator .learning-trail::before,
  .profile-page #profileCollaborator .learning-trail-river,
  .profile-page #profileCollaborator .learning-trail-guide { display: none; }
  .profile-page #profileCollaborator .learning-trail-town {
    position: absolute; left: auto; right: 0; top: 12px; bottom: auto; width: 82px; transform: none; filter: none;
  }
  .profile-page #profileCollaborator .learning-trail-step {
    grid-column: 1; grid-row: auto; display: grid; grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px; align-items: start; align-self: start;
  }
  .profile-page #profileCollaborator .learning-trail-marker {
    position: relative; inset: auto; grid-column: 1; grid-row: 1;
    width: 56px; height: 56px; transform: none; border-width: 2px;
  }
  .profile-page #profileCollaborator .learning-trail-marker span { font-size: 1rem; }
  .profile-page #profileCollaborator .learning-trail-marker small { font-size: .52rem; }
  .profile-page #profileCollaborator .learning-trail-content.learning-card {
    grid-column: 2; grid-row: 1; min-height: 0; padding: 14px;
    border-radius: 16px; box-shadow: 0 5px 0 rgba(52, 27, 95, .13);
  }
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-step {
    position: relative; display: block; min-height: 136px; --node-x: 35%;
    --node-background: linear-gradient(145deg, #2b7ed9, #6643ad);
  }
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-step-dica,
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-step-hands { --node-x: 65%; }
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-step-dica { --node-background: linear-gradient(145deg, #ed6f9e, #8b3eb2); }
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-step-match { --node-background: linear-gradient(145deg, #ec3a85, #7b349e); }
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-step-hands { --node-background: linear-gradient(145deg, #0e8f94, #2d72bd 60%, #51377d); }
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-step-unity { --node-background: linear-gradient(145deg, #178f88, #285e92 62%, #42306d); }
  .profile-page #profileCollaborator .has-mobile-trail .learning-mobile-curve {
    display: block; position: absolute; inset: 68px 0 auto; width: 100%; height: calc(100% + 18px);
    overflow: visible; pointer-events: none; z-index: 0;
  }
  .profile-page #profileCollaborator .learning-mobile-curve path {
    fill: none; stroke: #b9b0d4; stroke-width: 6px; vector-effect: non-scaling-stroke; stroke-linecap: round;
  }
  .profile-page #profileCollaborator .has-mobile-trail .learning-mobile-node {
    display: grid; position: relative; z-index: 1; grid-template-rows: 32px 1fr; gap: 12px;
    width: 136px; height: 136px; margin-left: calc(var(--node-x) - 68px); padding: 14px;
    border: 2px solid rgba(255, 255, 255, .5); border-radius: 18px;
    background: var(--node-background); box-shadow: 0 5px 0 rgba(52, 27, 95, .25); color: white; cursor: pointer;
  }
  .profile-page #profileCollaborator .learning-mobile-node-icon {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
  }
  .profile-page #profileCollaborator .learning-mobile-node-icon svg { width: 28px; height: 28px; }
  .profile-page #profileCollaborator .learning-mobile-node-icon small {
    padding: 4px 6px; border-radius: 7px; background: rgba(255, 255, 255, .18);
    font-size: .7rem; font-weight: 800;
  }
  .profile-page #profileCollaborator .learning-mobile-node-title {
    align-self: end; font-size: .87rem; font-weight: 800; line-height: 1.3; text-align: left;
  }
  .profile-page #profileCollaborator .learning-mobile-node:focus-visible,
  .profile-page #profileCollaborator .learning-mobile-node[aria-expanded="true"] {
    outline: 3px solid #35215e; outline-offset: 4px;
  }
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-content { display: none; }
  .profile-page #profileCollaborator .has-mobile-trail .is-mobile-step-open .learning-trail-content {
    display: block; position: relative; z-index: 1; margin: 16px 0 8px; padding: 14px;
  }
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-marker { display: none; }
  .profile-page #profileCollaborator .has-mobile-trail .is-mobile-step-open .learning-trail-marker {
    display: flex; position: absolute; z-index: 2; top: 158px; right: 10px; left: auto; width: 44px; height: 44px;
  }
  .profile-page #profileCollaborator .has-mobile-trail .is-mobile-step-open .learning-trail-content h3 { padding-right: 50px; }
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-marker :is(span, small),
  .profile-page #profileCollaborator .has-mobile-trail .learning-trail-marker::after { display: none; }
  .profile-page #profileCollaborator .has-mobile-trail .learning-mobile-certificate {
    display: block; width: 24px; height: 24px; color: #655a71;
  }
  .profile-page #profileCollaborator .learning-trail-content.learning-card h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
  .profile-page #profileCollaborator .learning-trail-content.learning-card > p {
    margin: 8px 0 0; font-size: .82rem; font-weight: 500; line-height: 1.5;
  }
  .profile-page #profileCollaborator .learning-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .profile-page #profileCollaborator .learning-card-actions :is(button, a) {
    width: auto; min-width: 0; min-height: 44px; margin: 0; padding: 8px 10px; font-size: .8rem; line-height: 1.3;
    border-radius: 10px; justify-content: center;
  }
  .profile-page #profileCollaborator .learning-trail-content.learning-card::after { display: none; }
  .profile-page #profileCollaborator .learning-trail-future,
  .profile-page #profileCollaborator .learning-trail-horizon {
    grid-column: 1; grid-row: auto; min-height: 0; padding-left: 0; justify-items: center;
  }
  .profile-page #profileCollaborator .learning-trail-future-art { width: 120px; max-width: 100%; }
  .profile-page #profileCollaborator .learning-trail-future-caption { font-size: .75rem; line-height: 1.5; }
  .profile-page #profileCollaborator .learning-trail-end-marker { width: 100%; padding: 16px; }
  .profile-page #profileCollaborator .learning-trail-horizon::before,
  .profile-page #profileCollaborator .learning-trail-horizon::after { display: none; }
}

.profile-page .learning-trail-step-hands {
  grid-column: 1 / 7;
  grid-row: 4;
}

.profile-page .learning-trail-step-hands .learning-trail-marker {
  right: -50px;
}

.profile-page .learning-trail-step-hands .learning-trail-marker span {
  color: #138f88;
}

.profile-page .learning-trail-step-hands .learning-trail-marker::after {
  color: #ffe66d;
  content: "✦";
}

.profile-page .learning-card-hands {
  min-height: 184px;
  padding: 23px 70px 22px 24px;
  background: linear-gradient(145deg, #0e8f94, #2d72bd 60%, #51377d);
  box-shadow: 7px 8px 0 rgba(52, 27, 95, .16);
}

.profile-page .learning-card-hands::after {
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: rgba(255, 255, 255, .2);
  content: "04";
  font-size: 3.25rem;
  font-weight: 1000;
  line-height: 1;
}

.profile-page .learning-card-hands:hover {
  box-shadow: 9px 11px 0 rgba(52, 27, 95, .18);
  transform: translateY(-2px);
}

.profile-page .learning-trail-step-unity {
  grid-column: 7 / -1;
  grid-row: 5;
}

.profile-page .learning-trail-step-unity .learning-trail-marker {
  right: auto;
  left: -50px;
}

.profile-page .learning-trail-step-unity .learning-trail-content.learning-card {
  padding: 23px 24px 22px 70px;
}

.profile-page .learning-card-upcoming-action {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  max-width: 30ch;
  margin-top: 15px;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(255, 255, 255, .13);
  font-size: .67rem;
  font-weight: 900;
  line-height: 1.2;
}

.profile-page .learning-trail-future {
  grid-row: 6;
}

.profile-page .learning-trail-horizon {
  grid-row: 7;
}

@media (max-width: 850px) and (min-width: 561px) {
  .profile-page .learning-trail {
    min-height: 1460px;
    grid-template-rows: repeat(5, minmax(162px, 1fr)) minmax(148px, auto) minmax(184px, auto);
  }

  .profile-page .learning-trail-step-hands .learning-trail-marker {
    right: -43px;
  }

  .profile-page .learning-card-hands {
    min-height: 164px;
    padding: 20px 58px 20px 19px;
  }

  .profile-page .learning-trail-step-unity .learning-trail-marker {
    left: -43px;
  }

  .profile-page .learning-trail-step-unity .learning-trail-content.learning-card {
    padding: 20px 19px 20px 58px;
  }
}

@media (max-width: 560px) {
  .profile-page .learning-trail {
    min-height: 0;
    grid-template-rows: 72px repeat(5, auto) minmax(142px, auto) minmax(190px, auto);
  }

  .profile-page .learning-trail-step-hands {
    grid-column: 1 / -1;
    grid-row: 5;
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .profile-page .learning-trail-step-hands .learning-trail-marker {
    right: auto;
    left: auto;
    grid-column: 1;
    width: 60px;
    height: 60px;
  }

  .profile-page .learning-card-hands {
    grid-column: 2;
    grid-row: 1;
    min-height: 183px;
    padding: 19px;
  }

  .profile-page .learning-trail-step-unity {
    grid-column: 1 / -1;
    grid-row: 6;
  }

  .profile-page .learning-trail-step-unity .learning-trail-marker {
    left: auto;
  }

  .profile-page .learning-card-upcoming-action {
    max-width: 24ch;
    border-radius: 14px;
    font-size: .62rem;
  }

  .profile-page .learning-trail-future {
    grid-row: 7;
  }

  .profile-page .learning-trail-horizon {
    grid-row: 8;
  }
}
